aseprite-1.1.7.ebuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils eutils flag-o-matic
  5. DESCRIPTION="Animated sprite editor & pixel art tool"
  6. HOMEPAGE="http://www.aseprite.org"
  7. SRC_URI="https://github.com/aseprite/aseprite/releases/download/v${PV}/Aseprite-v${PV}-Source.zip"
  8. # See https://github.com/aseprite/aseprite#credits
  9. # Some bundled third-party packages built-in:
  10. # gtest duktape modp_b64 simpleini
  11. LICENSE="BSD GPL-2 MIT"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE="bundled-libs debug kde gtk3 test webp"
  15. RDEPEND="dev-libs/tinyxml
  16. !bundled-libs? ( media-libs/allegro:0[X,png] )
  17. media-libs/freetype
  18. media-libs/giflib:=
  19. webp? ( media-libs/libwebp )
  20. media-libs/libpng:0=
  21. net-misc/curl
  22. sys-libs/zlib
  23. virtual/jpeg:0
  24. x11-libs/libX11
  25. x11-libs/pixman
  26. gtk3? ( dev-cpp/gtkmm:3.0 )
  27. kde? (
  28. dev-qt/qtcore:5
  29. kde-frameworks/kio:5 )"
  30. DEPEND="${RDEPEND}
  31. app-arch/unzip
  32. gtk3? ( virtual/pkgconfig )
  33. webp? ( virtual/pkgconfig )"
  34. DOCS=( docs/files/ase.txt
  35. docs/files/fli.txt
  36. docs/files/msk.txt
  37. docs/files/pic.txt
  38. docs/files/picpro.txt
  39. README.md )
  40. S="${WORKDIR}"
  41. PATCHES=( "${FILESDIR}/${P}_type-punned_pointer.patch" )
  42. src_prepare() {
  43. cmake-utils_src_prepare
  44. # Fix to make flag-o-matic work.
  45. if use debug ; then
  46. sed -i '/-DNDEBUG/d' CMakeLists.txt || die
  47. fi
  48. # Fix shebang in thumbnailer
  49. sed -i -e 's:#!/usr/bin/sh:#!/bin/sh:' desktop/aseprite-thumbnailer || die
  50. }
  51. src_configure() {
  52. use debug && append-cppflags -DDEBUGMODE -D_DEBUG
  53. local mycmakeargs=(
  54. -DENABLE_UPDATER=OFF
  55. -DFULLSCREEN_PLATFORM=ON
  56. -DUSE_SHARED_ALLEGRO4=$(usex !bundled-libs)
  57. -DUSE_SHARED_CURL=ON
  58. -DUSE_SHARED_FREETYPE=ON
  59. -DUSE_SHARED_GIFLIB=ON
  60. -DUSE_SHARED_JPEGLIB=ON
  61. -DUSE_SHARED_LIBLOADPNG=ON
  62. -DUSE_SHARED_LIBPNG=ON
  63. -DUSE_SHARED_PIXMAN=ON
  64. -DUSE_SHARED_TINYXML=ON
  65. -DUSE_SHARED_ZLIB=ON
  66. -DUSE_SHARED_LIBWEBP=ON
  67. -DWITH_DESKTOP_INTEGRATION=ON
  68. -DWITH_GTK_FILE_DIALOG_SUPPORT="$(usex gtk3)"
  69. -DWITH_QT_THUMBNAILER="$(usex kde)"
  70. -DWITH_WEBP_SUPPORT="$(usex webp)"
  71. -DENABLE_TESTS="$(usex test)"
  72. -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  73. )
  74. cmake-utils_src_configure
  75. }
  76. src_install() {
  77. newicon -s 64 "${S}/data/icons/ase64.png" "${PN}.png"
  78. cmake-utils_src_install
  79. }
  80. pkg_postinst() {
  81. if use !bundled-libs ; then
  82. ewarn "Aseprite has been built with system-wide Allegro 4."
  83. ewarn "Please note that you will not be able to resize the main window."
  84. ewarn "For resizing support enable USE-flag bundled-libs and rebuild package."
  85. fi
  86. }