From 5131d09ef476c57f5957f8cf009d147ea6bff18c Mon Sep 17 00:00:00 2001 From: gryf Date: Sun, 20 May 2018 17:20:03 +0200 Subject: [PATCH] Changed aseprite use flags to be more accurate. Changed "bundled-libs" to "static" - since this is waht the flag actually do, added new flag "bundled-allegro" which is disabled by default, so that aseprite will use modified own version of allegor framework. In that case warning will be displayed to the user (as in original ebuild in gentoo repo). --- dev-games/aseprite/Manifest | 2 +- dev-games/aseprite/aseprite-9999.ebuild | 60 ++++++++++++++++++------- 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest index d789605..5bb1bdf 100644 --- a/dev-games/aseprite/Manifest +++ b/dev-games/aseprite/Manifest @@ -1 +1 @@ -EBUILD aseprite-9999.ebuild 1611 BLAKE2B 2aa50481340c160414305f959f257d18bd356977e988fd8b1e225e5b4c3a0541e7ee54f5242ba5df3ee6bc2e68f6d28b2b3593992bbf0669633cdffc497ce998 SHA512 ce0c94837de2bbf62b41883da64f23cf48f4e12f3a96242f8d69c1cd9c16246fc4d2bf3bd6c5c4058ad7cd794f99974d7a511d674ec50904e4c0bdc00a8498a6 +EBUILD aseprite-9999.ebuild 2082 BLAKE2B d1cc523b6ac3bd7769fe29d95d854701d522b627ddf2bfae4bffe5665c2c1a1295e51126e435d2bc6348ebb94ab73c7161b94d5f5f4e3ba2ca4c31a731eef1df SHA512 a83719fad45ceb7aa43e2721b21c6bcab9946f0407e211bb11ce692e52b4c20ccf3481382cb7a69d0b8a10a68eeb6e980a30e6a3fc9fa18894df50f3891b447a diff --git a/dev-games/aseprite/aseprite-9999.ebuild b/dev-games/aseprite/aseprite-9999.ebuild index 2cd9c5c..2c95304 100644 --- a/dev-games/aseprite/aseprite-9999.ebuild +++ b/dev-games/aseprite/aseprite-9999.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit cmake-utils eutils git-r3 +inherit cmake-utils eutils flag-o-matic git-r3 DESCRIPTION="Animated sprite editor & pixel art tool" HOMEPAGE="https://www.aseprite.org" @@ -15,15 +15,19 @@ CMAKE_BUILD_TYPE="Release" LICENSE="https://github.com/aseprite/aseprite/blob/master/EULA.txt" SLOT="0" KEYWORDS="~amd64" -IUSE="+bundled-libs webp" +IUSE="static debug kde gtk3 test +bundled-allegro webp" DEPEND="dev-util/cmake dev-util/ninja webp? ( media-libs/libwebp ) - !bundled-libs? ( dev-libs/tinyxml - media-libs/allegro:0[X,png] + !static? ( + !bundled-allegro? ( media-libs/allegro:0[X,png] ) + app-text/cmark + dev-libs/tinyxml media-libs/freetype - media-libs/giflib:= + media-libs/giflib + media-libs/harfbuzz + media-libs/libpng net-misc/curl sys-libs/zlib virtual/jpeg:0 @@ -34,19 +38,33 @@ DEPEND="dev-util/cmake RDEPEND="${DEPEND}" src_configure() { - local mycmakeargs=( + use debug && append-cppflags -DDEBUGMODE -D_DEBUG + + local mycmakeargs=() + + use !static && + mycmakeargs+=( + -DUSE_SHARED_CMARK=ON + -DUSE_SHARED_CURL=ON + -DUSE_SHARED_FREETYPE=ON + -DUSE_SHARED_GIFLIB=ON + -DUSE_SHARED_HARFBUZZ=ON + -DUSE_SHARED_JPEGLIB=ON + -DUSE_SHARED_LIBPNG=ON + -DUSE_SHARED_PIXMAN=ON + -DUSE_SHARED_TINYXML=ON + -DUSE_SHARED_ZLIB=ON + ) + + use !bundled-allegro && mycmakeargs+=( -DUSE_SHARED_ALLEGRO4=ON ) + + mycmakeargs+=( + -DENABLE_TESTS="$(usex test)" -DENABLE_UPDATER=OFF - -DUSE_SHARED_ALLEGRO4=$(usex !bundled-libs) - -DUSE_SHARED_CURL=$(usex !bundled-libs) - -DUSE_SHARED_FREETYPE=$(usex !bundled-libs) - -DUSE_SHARED_GIFLIB=$(usex !bundled-libs) - -DUSE_SHARED_JPEGLIB=$(usex !bundled-libs) - -DUSE_SHARED_LIBLOADPNG=$(usex !bundled-libs) - -DUSE_SHARED_LIBPNG=$(usex !bundled-libs) - -DUSE_SHARED_PIXMAN=$(usex !bundled-libs) - -DUSE_SHARED_TINYXML=$(usex !bundled-libs) - -DUSE_SHARED_ZLIB=$(usex !bundled-libs) - -DUSE_SHARED_LIBWEBP=$(usex !bundled-libs) + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON + -DWITH_DESKTOP_INTEGRATION=ON + -DWITH_GTK_FILE_DIALOG_SUPPORT="$(usex gtk3)" + -DWITH_QT_THUMBNAILER="$(usex kde)" -DWITH_WEBP_SUPPORT="$(usex webp)" ) cmake-utils_src_configure @@ -57,3 +75,11 @@ src_install() { mkdir -p "${D}usr/share/aseprite/" cp -a $BUILD_DIR/bin/data "${D}usr/share/aseprite/" } + +pkg_postinst() { + if use !bundled-allegro; then + ewarn "Aseprite has been built with system-wide Allegro 4." + ewarn "Please note that you will not be able to resize the main window." + ewarn "For resizing support enable USE-flag bundled-libs and rebuild package." + fi +}