jpeg-9b.ebuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils libtool toolchain-funcs multilib-minimal
  5. DESCRIPTION="Library to load, handle and manipulate images in the JPEG format"
  6. HOMEPAGE="http://jpegclub.org/ http://www.ijg.org/"
  7. SRC_URI="http://www.ijg.org/files/${PN}src.v${PV}.tar.gz
  8. mirror://debian/pool/main/libj/lib${PN}8/lib${PN}8_8d-1.debian.tar.gz"
  9. LICENSE="IJG"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  12. IUSE="static-libs"
  13. RDEPEND="!media-libs/libjpeg-turbo:0
  14. abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r5
  15. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
  16. DEPEND="${RDEPEND}"
  17. src_prepare() {
  18. epatch "${FILESDIR}"/${PN}-7-maxmem_sysconf.patch
  19. elibtoolize
  20. }
  21. multilib_src_configure() {
  22. # Fix building against this library on eg. Solaris and DragonFly BSD, see:
  23. # http://mail-index.netbsd.org/pkgsrc-bugs/2010/01/18/msg035644.html
  24. local ldverscript=
  25. [[ ${CHOST} == *-solaris* ]] && ldverscript="--disable-ld-version-script"
  26. ECONF_SOURCE=${S} \
  27. econf \
  28. $(use_enable static-libs static) \
  29. --enable-maxmem=64 \
  30. ${ldverscript}
  31. }
  32. multilib_src_compile() {
  33. emake
  34. if multilib_is_native_abi; then
  35. # Build exifautotran and jpegexiforient
  36. cd ../debian/extra
  37. emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
  38. fi
  39. }
  40. multilib_src_install() {
  41. emake DESTDIR="${D}" install
  42. }
  43. multilib_src_install_all() {
  44. prune_libtool_files
  45. dodoc change.log example.c README *.txt
  46. # Install exifautotran and jpegexiforient
  47. newdoc ../debian/changelog changelog.debian
  48. cd ../debian/extra
  49. emake \
  50. DESTDIR="${D}" prefix="${EPREFIX}"/usr \
  51. INSTALL="install -m755" INSTALLDIR="install -d -m755" \
  52. install
  53. # Remove +x bits from man pages.
  54. find "${ED}"/usr/share/man/ -type f -perm /1 -exec chmod a-x {} + || die
  55. }