exact-image-0.8.1-r3.ebuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils multilib python-single-r1 toolchain-funcs
  6. DESCRIPTION="A fast, modern and generic image processing library"
  7. HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/"
  8. SRC_URI="http://dl.exactcode.de/oss/${PN}/${P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="expat jpeg jpeg2k lua openexr php perl png python ruby swig tiff truetype X"
  13. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  14. RDEPEND="x11-libs/agg[truetype]
  15. sys-libs/zlib
  16. expat? ( dev-libs/expat )
  17. jpeg2k? ( media-libs/jasper )
  18. jpeg? ( virtual/jpeg )
  19. lua? ( dev-lang/lua )
  20. openexr? ( media-libs/openexr )
  21. php? ( dev-lang/php )
  22. perl? ( dev-lang/perl )
  23. png? ( >=media-libs/libpng-1.2.43 )
  24. python? ( ${PYTHON_DEPS} )
  25. ruby? ( dev-lang/ruby )
  26. tiff? ( media-libs/tiff )
  27. truetype? ( >=media-libs/freetype-2 )
  28. X? (
  29. x11-libs/libXext
  30. x11-libs/libXt
  31. x11-libs/libICE
  32. x11-libs/libSM
  33. )"
  34. DEPEND="${RDEPEND}
  35. virtual/pkgconfig
  36. swig? ( dev-lang/swig )"
  37. pkg_setup() {
  38. use python && python-single-r1_pkg_setup
  39. }
  40. src_prepare() {
  41. eapply \
  42. "${FILESDIR}"/${PN}-0.7.5-libpng14.patch \
  43. "${FILESDIR}"/${P}-libpng15.patch
  44. eapply_user
  45. # fix python hardcoded path wrt bug #327171
  46. sed -i -e "s:python2.5:${EPYTHON}:" \
  47. -e "s:\$(libdir):usr/$(get_libdir):" \
  48. "${S}"/api/python/Makefile || die
  49. # Respect user CFLAGS/CXXFLAGS.
  50. sed -i \
  51. -e '/C\(XX\)\?FLAGS =/s/-O2//' \
  52. -e "\$aCFLAGS += ${CFLAGS}\nCXXFLAGS += ${CXXFLAGS}" \
  53. Makefile || die
  54. # Show commands. Use qualified CC/CXX.
  55. sed -i \
  56. -e '/^Q =/d' \
  57. -e '/^\t@echo /d' \
  58. -e "\$aCC:=$(tc-getCC)\nCXX:=$(tc-getCXX)" \
  59. build/bottom.make || die
  60. # The copied string fits exactly. Use memcpy to reflect that a null
  61. # terminator is not needed.
  62. sed -i \
  63. -e 's/strcpy(\([^,]*\)\(,["a-zA-Z -]*\))/memcpy(\1\2, sizeof(\1))/' \
  64. codecs/tga.cc || die
  65. }
  66. src_configure() {
  67. # evas -> enlightenment overlay
  68. # bardecode -> protected by custom license
  69. # libungif -> not supported anymore
  70. ./configure \
  71. --prefix=/usr \
  72. --libdir=/usr/$(get_libdir) \
  73. $(use_with X x11) \
  74. $(use_with truetype freetype) \
  75. --without-evas \
  76. $(use_with jpeg libjpeg) \
  77. $(use_with tiff libtiff) \
  78. $(use_with png libpng) \
  79. --without-libungif \
  80. $(use_with jpeg2k jasper) \
  81. $(use_with openexr) \
  82. $(use_with expat) \
  83. --without-lcms \
  84. --without-bardecode \
  85. $(use_with lua) \
  86. $(use_with swig) \
  87. $(use_with perl) \
  88. $(use_with python) \
  89. $(use_with php) \
  90. $(use_with ruby) || die
  91. }