diff options
author | Sam James <sam@gentoo.org> | 2020-10-25 19:39:32 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-10-25 19:47:44 +0000 |
commit | f6c3d4788f168af4ff06302bf3fc10503d5d328f (patch) | |
tree | ffc67db5a60d20b83cf6bc1bd5a7b022b942d472 /media-libs/netpbm | |
parent | app-arch/unp: x86 stable (bug #750467) (diff) | |
download | gentoo-f6c3d4788f168af4ff06302bf3fc10503d5d328f.tar.gz gentoo-f6c3d4788f168af4ff06302bf3fc10503d5d328f.tar.bz2 gentoo-f6c3d4788f168af4ff06302bf3fc10503d5d328f.zip |
media-libs/netpbm: port to EAPI 7
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--[-rwxr-xr-x] | media-libs/netpbm/files/make-tarball.sh | 0 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.31-build.patch | 12 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.70-system-libs.patch | 8 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch | 12 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch | 4 | ||||
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.76.00-test.patch | 40 | ||||
-rw-r--r-- | media-libs/netpbm/netpbm-10.70.00.ebuild | 59 | ||||
-rw-r--r-- | media-libs/netpbm/netpbm-10.76.00.ebuild | 48 |
8 files changed, 106 insertions, 77 deletions
diff --git a/media-libs/netpbm/files/make-tarball.sh b/media-libs/netpbm/files/make-tarball.sh index 90a64ffb34d7..90a64ffb34d7 100755..100644 --- a/media-libs/netpbm/files/make-tarball.sh +++ b/media-libs/netpbm/files/make-tarball.sh diff --git a/media-libs/netpbm/files/netpbm-10.31-build.patch b/media-libs/netpbm/files/netpbm-10.31-build.patch index cd744743636c..281f8ee928f7 100644 --- a/media-libs/netpbm/files/netpbm-10.31-build.patch +++ b/media-libs/netpbm/files/netpbm-10.31-build.patch @@ -2,8 +2,8 @@ - Try to fix parallel building - Make the libopt tool less 'helpful' ---- lib/Makefile -+++ lib/Makefile +--- a/lib/Makefile ++++ b/lib/Makefile @@ -249,7 +249,7 @@ .PHONY: install.staticlib install.staticlib: $(PKGDIR)/link @@ -25,8 +25,8 @@ libnetpbm.$(NETPBMLIBSUFFIX) endif ifeq ($(NETPBMLIBTYPE),dll) ---- GNUmakefile -+++ GNUmakefile +--- a/GNUmakefile ++++ b/GNUmakefile @@ -87,6 +87,9 @@ .PHONY: nonmerge @@ -37,8 +37,8 @@ OMIT_CONFIG_RULE = 1 include $(SRCDIR)/Makefile.common ---- buildtools/libopt.c -+++ buildtools/libopt.c +--- a/buildtools/libopt.c ++++ b/buildtools/libopt.c @@ -502,7 +502,7 @@ strcpy(outputLine, ""); /* initial value */ diff --git a/media-libs/netpbm/files/netpbm-10.70-system-libs.patch b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch index ef50ff2435dd..efe9fd8dd3c4 100644 --- a/media-libs/netpbm/files/netpbm-10.70-system-libs.patch +++ b/media-libs/netpbm/files/netpbm-10.70-system-libs.patch @@ -1,7 +1,7 @@ when we disable the bundled libs, make sure we don't try to run install in them ---- converter/other/jbig/Makefile -+++ converter/other/jbig/Makefile +--- a/converter/other/jbig/Makefile ++++ b/converter/other/jbig/Makefile @@ -5,7 +5,7 @@ endif SUBDIR = converter/other/jbig VPATH=.:$(SRCDIR)/$(SUBDIR) @@ -19,8 +19,8 @@ when we disable the bundled libs, make sure we don't try to run install in them else # It's not our internal version; user's on his own to make sure it's built endif ---- converter/other/jpeg2000/Makefile -+++ converter/other/jpeg2000/Makefile +--- a/converter/other/jpeg2000/Makefile ++++ b/converter/other/jpeg2000/Makefile @@ -5,7 +5,7 @@ endif SUBDIR = converter/other/jpeg2000 VPATH=.:$(SRCDIR)/$(SUBDIR) diff --git a/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch b/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch index 392eae0f40e4..bd894bfb3159 100644 --- a/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch +++ b/media-libs/netpbm/files/netpbm-10.76.00-misc-deps.patch @@ -1,7 +1,7 @@ do not autoprobe deps when we disabled them ---- GNUmakefile -+++ GNUmakefile +--- a/GNUmakefile ++++ b/GNUmakefile @@ -74,7 +74,10 @@ include $(BUILDDIR)/config.mk PROG_SUBDIRS = converter analyzer editor generator other @@ -14,8 +14,8 @@ do not autoprobe deps when we disabled them SUBDIRS = $(PRODUCT_SUBDIRS) $(SUPPORT_SUBDIRS) ---- converter/other/Makefile -+++ converter/other/Makefile +--- a/converter/other/Makefile ++++ b/converter/other/Makefile @@ -7,6 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR) include $(BUILDDIR)/config.mk @@ -48,8 +48,8 @@ do not autoprobe deps when we disabled them ifneq ($(JPEGLIB),NONE) ifneq ($(JPEGHDR_DIR)x,x) ---- other/pamx/Makefile -+++ other/pamx/Makefile +--- a/other/pamx/Makefile ++++ b/other/pamx/Makefile @@ -9,6 +9,7 @@ include $(BUILDDIR)/config.mk EXTERN_INCLUDE = diff --git a/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch index cdc075e5293f..717c86a72ac5 100644 --- a/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch +++ b/media-libs/netpbm/files/netpbm-10.76.00-pbmtext-test.patch @@ -3,8 +3,8 @@ what awk generates. force it to C/ASCII to avoid that. https://bugs.gentoo.org/601012 ---- test/pbmtext.test -+++ test/pbmtext.test +--- a/test/pbmtext.test ++++ b/test/pbmtext.test @@ -81,12 +81,14 @@ rm ${fontRectangle_txt} ${font_pbm} # One long row diff --git a/media-libs/netpbm/files/netpbm-10.76.00-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-test.patch index 870998bc98a8..8bb1b17e15fa 100644 --- a/media-libs/netpbm/files/netpbm-10.76.00-test.patch +++ b/media-libs/netpbm/files/netpbm-10.76.00-test.patch @@ -1,7 +1,7 @@ automatically skip tests of disabled tools ---- GNUmakefile -+++ GNUmakefile +--- a/GNUmakefile ++++ b/GNUmakefile @@ -455,6 +458,21 @@ deb: .PHONY: check-package .PHONY: check-install @@ -60,8 +60,8 @@ automatically skip tests of disabled tools $(SRCDIR)/test/Execute-Tests 2>&1 ---- test/all-in-place.test -+++ test/all-in-place.test +--- a/test/all-in-place.test ++++ b/test/all-in-place.test @@ -367,11 +367,62 @@ ordinary_testprogs="\ zeisstopnm \ " @@ -125,8 +125,8 @@ automatically skip tests of disabled tools $i --version 2>&1 | \ egrep -v -e fiascotopnm -e \ "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ ---- test/fiasco-roundtrip.test -+++ test/fiasco-roundtrip.test +--- a/test/fiasco-roundtrip.test ++++ b/test/fiasco-roundtrip.test @@ -2,6 +2,10 @@ # This script tests: pnmtofiasco fiascotopnm # Also requires: pnmpad @@ -138,8 +138,8 @@ automatically skip tests of disabled tools # Should print 215556145 102615 pnmpad --black --bottom 1 --left 1 testimg.ppm | \ ---- test/jbig-roundtrip.test -+++ test/jbig-roundtrip.test +--- a/test/jbig-roundtrip.test ++++ b/test/jbig-roundtrip.test @@ -2,6 +2,9 @@ # This script tests: pnmtojbig jbigtopnm # Also requires: pamchannel pamtopnm @@ -150,8 +150,8 @@ automatically skip tests of disabled tools # Test 1. Should print 2425386270 41 pnmtojbig testgrid.pbm | jbigtopnm | cksum ---- test/legacy-names.test -+++ test/legacy-names.test +--- a/test/legacy-names.test ++++ b/test/legacy-names.test @@ -94,8 +94,30 @@ ordinary_testprogs="\ ppmtouil \ " @@ -183,8 +183,8 @@ automatically skip tests of disabled tools $i --version 2>&1 | \ egrep -v \ "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \ ---- test/png-roundtrip.test -+++ test/png-roundtrip.test +--- a/test/png-roundtrip.test ++++ b/test/png-roundtrip.test @@ -6,6 +6,10 @@ ## If this test fails and pnm-roundtrip2.test succeeds, it indicates ## some problem with pnmtopng. @@ -196,8 +196,8 @@ automatically skip tests of disabled tools # Test 1. Should print 1926073387 101484 18 times for flags in "" -interlace \ -gamma=.45 \ ---- test/png-roundtrip2.test -+++ test/png-roundtrip2.test +--- a/test/png-roundtrip2.test ++++ b/test/png-roundtrip2.test @@ -9,6 +9,10 @@ ## If both tests fail, the likely cause is a problem with pngtopam. ## It is also possible that there is some problem in libpng. @@ -209,8 +209,8 @@ automatically skip tests of disabled tools # Test 1. Should print 1926073387 101484 twice for flags in "" -gamma=.45 do ---- test/ps-roundtrip.test -+++ test/ps-roundtrip.test +--- a/test/ps-roundtrip.test ++++ b/test/ps-roundtrip.test @@ -8,6 +8,10 @@ ## (1) zlib was not linked. ## (2) ghostscript is not available. @@ -222,8 +222,8 @@ automatically skip tests of disabled tools tmpdir=${tmpdir:-/tmp} # pstopnm does not use libnetpbm functions for output. ---- test/tiff-roundtrip.test -+++ test/tiff-roundtrip.test +--- a/test/tiff-roundtrip.test ++++ b/test/tiff-roundtrip.test @@ -2,6 +2,9 @@ # This script tests: pamtotiff tifftopnm # Also requires: @@ -234,8 +234,8 @@ automatically skip tests of disabled tools # Failure message ## Second test fails if Netpbm was built without the flate library ---- test/utahrle-roundtrip.test -+++ test/utahrle-roundtrip.test +--- a/test/utahrle-roundtrip.test ++++ b/test/utahrle-roundtrip.test @@ -2,6 +2,9 @@ # This script tests: pnmtorle rletopnm # Also requires: pamchannel pamtopnm diff --git a/media-libs/netpbm/netpbm-10.70.00.ebuild b/media-libs/netpbm/netpbm-10.70.00.ebuild index 9819f53b3fc7..1824974a3eec 100644 --- a/media-libs/netpbm/netpbm-10.70.00.ebuild +++ b/media-libs/netpbm/netpbm-10.70.00.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=7 -inherit toolchain-funcs eutils multilib +inherit toolchain-funcs DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats" HOMEPAGE="http://netpbm.sourceforge.net/" @@ -14,6 +14,8 @@ SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="doc jbig jpeg png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib" +BDEPEND="app-arch/xz-utils + sys-devel/flex" RDEPEND="jbig? ( media-libs/jbigkit ) jpeg? ( virtual/jpeg:0 ) png? ( >=media-libs/libpng-1.4:0 ) @@ -23,38 +25,43 @@ RDEPEND="jbig? ( media-libs/jbigkit ) xml? ( dev-libs/libxml2 ) zlib? ( sys-libs/zlib ) X? ( x11-libs/libX11 )" -DEPEND="${RDEPEND} - app-arch/xz-utils - sys-devel/flex" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/netpbm-10.31-build.patch + "${FILESDIR}"/netpbm-10.66-test.patch #450530 + "${FILESDIR}"/netpbm-10.70-system-libs.patch +) netpbm_libtype() { case ${CHOST} in - *-darwin*) echo dylib;; - *) echo unixshared;; + *-darwin*) echo dylib;; + *) echo unixshared;; esac } + netpbm_libsuffix() { local suffix=$(get_libname) - echo ${suffix//\.} + echo "${suffix//\.}" || die } + netpbm_ldshlib() { case ${CHOST} in - *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; - *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; + *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; + *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; esac } + netpbm_config() { if use $1 ; then [[ $2 != "!" ]] && echo -l${2:-$1} else - echo NONE + echo NONE || die fi } src_prepare() { - epatch "${FILESDIR}"/netpbm-10.31-build.patch - epatch "${FILESDIR}"/netpbm-10.66-test.patch #450530 - epatch "${FILESDIR}"/netpbm-10.70-system-libs.patch + default # make sure we use system libs sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die @@ -66,9 +73,11 @@ src_prepare() { $(usex rle '' 'utahrle-roundtrip') $(usex tiff '' 'tiff-roundtrip') ) - if [[ ${#del[@]} -gt 0 ]] ; then + + if [[ "${#del[@]}" -gt 0 ]] ; then sed -i -r $(printf -- ' -e /%s.test/d' "${del[@]}") test/Test-Order || die fi + del=( pnmtofiasco fiascotopnm # We always disable fiasco $(usex jpeg '' 'jpegtopnm pnmtojpeg ppmtojpeg') @@ -77,7 +86,8 @@ src_prepare() { $(usex rle '' 'pnmtorle rletopnm') $(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm') ) - if [[ ${#del[@]} -gt 0 ]] ; then + + if [[ "${#del[@]}" -gt 0 ]] ; then sed -i -r $(printf -- ' -e s/\<%s\>(:.ok)?//' "${del[@]}") test/all-in-place.{ok,test} || die sed -i '/^$/d' test/all-in-place.ok || die fi @@ -88,6 +98,7 @@ src_prepare() { -e '/^importinc:/s|^|importinc:\nmanual_|' \ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\ common.mk || die + sed -i \ -e '/%.c/s: importinc$::' \ common.mk lib/Makefile lib/util/Makefile || die @@ -149,7 +160,7 @@ src_configure() { EOF # cannot chain the die with the heredoc above as bash-3 # has a parser bug in that setup #282902 - [ $? -eq 0 ] || die "writing config.mk failed" + [[ $? -eq 0 ]] || die "writing config.mk failed" } src_compile() { @@ -168,21 +179,27 @@ src_install() { # without any actual dependencies, thus the -j1. emake -j1 package pkgdir="${ED}"/usr - [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) + if [[ $(get_libdir) != "lib" ]] ; then + mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die + fi # Remove cruft that we don't need, and move around stuff we want rm "${ED}"/usr/bin/{doc.url,manweb} || die rm -r "${ED}"/usr/man/web || die rm -r "${ED}"/usr/link || die rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die + dodir /usr/share mv "${ED}"/usr/man "${ED}"/usr/share/ || die mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die doman userguide/*.[0-9] - use doc && dohtml -r userguide dodoc README - cd doc + + cd doc || die dodoc HISTORY Netpbm.programming USERDOC - dohtml -r . + + docinto html + dodoc -r *.html + use doc && dodoc -r ../userguide/*.html } diff --git a/media-libs/netpbm/netpbm-10.76.00.ebuild b/media-libs/netpbm/netpbm-10.76.00.ebuild index 77c99fa54c23..32f9f2ae5d2b 100644 --- a/media-libs/netpbm/netpbm-10.76.00.ebuild +++ b/media-libs/netpbm/netpbm-10.76.00.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="5" +EAPI=7 -inherit toolchain-funcs eutils multilib +inherit toolchain-funcs DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats" HOMEPAGE="http://netpbm.sourceforge.net/" @@ -14,6 +14,8 @@ SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 s390 ~sparc ~x86 ~amd64-linux ~x86-linux" IUSE="doc jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib" +BDEPEND="app-arch/xz-utils + sys-devel/flex" RDEPEND="jbig? ( media-libs/jbigkit ) jpeg? ( virtual/jpeg:0 ) png? ( >=media-libs/libpng-1.4:0 ) @@ -24,24 +26,31 @@ RDEPEND="jbig? ( media-libs/jbigkit ) xml? ( dev-libs/libxml2 ) zlib? ( sys-libs/zlib ) X? ( x11-libs/libX11 )" -DEPEND="${RDEPEND} - app-arch/xz-utils - sys-devel/flex" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/netpbm-10.76.00-build.patch + "${FILESDIR}"/netpbm-10.76.00-test.patch #450530 + "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch + "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012 +) netpbm_libtype() { case ${CHOST} in - *-darwin*) echo dylib;; - *) echo unixshared;; + *-darwin*) echo dylib;; + *) echo unixshared;; esac } + netpbm_libsuffix() { local suffix=$(get_libname) echo ${suffix//\.} } + netpbm_ldshlib() { case ${CHOST} in - *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; - *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; + *-darwin*) echo '$(LDFLAGS) -dynamiclib -install_name $(SONAME)';; + *) echo '$(LDFLAGS) -shared -Wl,-soname,$(SONAME)';; esac } netpbm_config() { @@ -53,10 +62,7 @@ netpbm_config() { } src_prepare() { - epatch "${FILESDIR}"/netpbm-10.76.00-build.patch - epatch "${FILESDIR}"/netpbm-10.76.00-test.patch #450530 - epatch "${FILESDIR}"/netpbm-10.76.00-misc-deps.patch - epatch "${FILESDIR}"/netpbm-10.76.00-pbmtext-test.patch #601012 + default # make sure we use system libs sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die @@ -145,7 +151,7 @@ src_configure() { EOF # cannot chain the die with the heredoc above as bash-3 # has a parser bug in that setup #282902 - [ $? -eq 0 ] || die "writing config.mk failed" + [[ $? -eq 0 ]] || die "writing config.mk failed" } src_compile() { @@ -164,21 +170,27 @@ src_install() { # without any actual dependencies, thus the -j1. emake -j1 package pkgdir="${ED}"/usr - [[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) + if [[ $(get_libdir) != "lib" ]] ; then + mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir) || die + fi # Remove cruft that we don't need, and move around stuff we want rm "${ED}"/usr/bin/{doc.url,manweb} || die rm -r "${ED}"/usr/man/web || die rm -r "${ED}"/usr/link || die rm "${ED}"/usr/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die + dodir /usr/share mv "${ED}"/usr/man "${ED}"/usr/share/ || die mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die doman userguide/*.[0-9] - use doc && dohtml -r userguide dodoc README - cd doc + + cd doc || die dodoc HISTORY Netpbm.programming USERDOC - dohtml -r . + docinto html + dodoc -r *.html + + use doc && dodoc -r ../userguide/*.html } |