public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/files/, media-libs/netpbm/
Date: Wed, 16 Nov 2016 04:51:09 +0000 (UTC)	[thread overview]
Message-ID: <1479271854.fe032ce65d9dd8ad43e6fe6043ada0b8ca8920df.vapier@gentoo> (raw)

commit:     fe032ce65d9dd8ad43e6fe6043ada0b8ca8920df
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 16 04:50:54 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Nov 16 04:50:54 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe032ce6

media-libs/netpbm: version bump to 10.76.00

 media-libs/netpbm/Manifest                         |   1 +
 .../netpbm/files/netpbm-10.76.00-build.patch       |  38 +++++
 media-libs/netpbm/files/netpbm-10.76.00-test.patch |  22 +++
 media-libs/netpbm/netpbm-10.76.00.ebuild           | 187 +++++++++++++++++++++
 4 files changed, 248 insertions(+)

diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 1fda332..2e5f5b2 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -1,2 +1,3 @@
 DIST netpbm-10.66.00.tar.xz 2575356 SHA256 7fe94f38e139be194e9e384e8d9c9747f2fe08c18295bba93c55a41c5bbf63fc SHA512 44348eb1155353d5cd5a2ce025bc6d9301cc3239acea6b68418c14432f4bd61fc5a8669bb51b3e86b96abaf5b02cc20115c662e40fa5b41aee202b0c2ae605af WHIRLPOOL fa937fccd2da9068a268d6a5729c8093baacc3025ab2382902611dadab985247fdacf3433f6e15407b081478b93b772237c41363f37340ea6c93c169357dd0cf
 DIST netpbm-10.70.00.tar.xz 2621612 SHA256 1268cb6801790619f6d057b964305355011dfe66247f2b71fe9978cdd7af7d93 SHA512 f70d6dd79ce813f9fc4935d382b50bd3cecdf02c324b0f012056e56e33f24b621e8c1b3d054c6f470d437d0d793593de95eaa9724055d59c342228398a40f0b4 WHIRLPOOL 8810a2e8d4ed6a834d6fbc2861079b4e2664f85ff2548d00f95a9c26f92d02dcebcb8d1b9c26226caba067accc41eabbe1211322607de77d61827b34a8b4c82a
+DIST netpbm-10.76.00.tar.xz 2657184 SHA256 b7fce2b1f43dcc821c3928ccc32dbee89e2d75cf22a76c38bc9c9ab4d91ea27a SHA512 234a5616a7631a8eb70817bb88ed509ddddfce93f71739654ef78a2735245b268c391adb49b514ed883569c9fc6ea9c3eeed10aa7898c02b797fee5249b11cf3 WHIRLPOOL 9082df9e257e247f3dd49119f925a11a0082905a78d3c57259328e13ba231608b81bfa2f1f1bcb9518ad94d8326aed82b7fff78a6b4f3befc00a34a2c2b0e70c

diff --git a/media-libs/netpbm/files/netpbm-10.76.00-build.patch b/media-libs/netpbm/files/netpbm-10.76.00-build.patch
new file mode 100644
index 00000000..231da54
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.76.00-build.patch
@@ -0,0 +1,38 @@
+- Don't install libnetpbm.a and libnetpbm.so into a sep link dir
+- Try to fix parallel building
+
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -249,7 +249,7 @@
+ .PHONY: install.staticlib
+ install.staticlib: $(PKGDIR)/link
+ 	$(INSTALL) -c -m $(INSTALL_PERM_LIBS) libnetpbm.$(STATICLIBSUFFIX) \
+-	  $(PKGDIR)/link
++	  $(PKGDIR)/lib
+ 
+ # Install a shared library stub -- the ".so" file used at link time to
+ # prepare a program for dynamically linking a library at run time 
+@@ -257,9 +257,9 @@
+ install.sharedlibstub: $(PKGDIR)/link
+ ifeq ($(NETPBMLIBTYPE),unixshared)
+ # install the link-time (.so) links to the runtime libraries
+-	cd $(PKGDIR)/link ; \
++	cd $(PKGDIR)/lib ; \
+           rm -f libnetpbm.$(NETPBMLIBSUFFIX); \
+-          $(SYMLINK) ../lib/libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
++          $(SYMLINK) libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ) \
+             libnetpbm.$(NETPBMLIBSUFFIX)
+ endif
+ ifeq ($(NETPBMLIBTYPE),dll)
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -87,6 +87,9 @@
+ 
+ .PHONY: nonmerge
+ nonmerge: $(PRODUCT_SUBDIRS:%=%/all)
++
++$(PRODUCT_SUBDIRS:%=%/all): buildtools/all
++converter/all analyzer/all editor/all generator/all other/all: lib/all
+ 
+ # Parallel make (make --jobs) is not smart enough to coordinate builds
+ # between submakes, so a naive parallel make would cause certain

diff --git a/media-libs/netpbm/files/netpbm-10.76.00-test.patch b/media-libs/netpbm/files/netpbm-10.76.00-test.patch
new file mode 100644
index 00000000..65f30d5
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.76.00-test.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/450530
+
+we disable fiascotopnm all the time, so delete the test too
+
+--- a/test/all-in-place.test
++++ b/test/all-in-place.test
+@@ -53,7 +53,6 @@ ordinary_testprogs="\
+   ddbugtopbm \
+   escp2topbm \
+   eyuvtoppm \
+-  fiascotopnm \
+   fitstopnm \
+   fstopgm \
+   g3topbm \
+--- a/test/Test-Order
++++ b/test/Test-Order
+@@ -153,5 +153,4 @@
+ 
+ # Round-trip tests : lossy converters
+ 
+-fiasco-roundtrip.test
+ yuv-roundtrip.test

diff --git a/media-libs/netpbm/netpbm-10.76.00.ebuild b/media-libs/netpbm/netpbm-10.76.00.ebuild
new file mode 100644
index 00000000..c940abf
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.76.00.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="http://netpbm.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc jbig jpeg jpeg2k png rle cpu_flags_x86_sse2 static-libs svga tiff X xml zlib"
+
+RDEPEND="jbig? ( media-libs/jbigkit )
+	jpeg? ( virtual/jpeg:0 )
+	jpeg2k? ( media-libs/jasper )
+	png? ( >=media-libs/libpng-1.4:0 )
+	rle? ( media-libs/urt )
+	svga? ( media-libs/svgalib )
+	tiff? ( >=media-libs/tiff-3.5.5:0 )
+	xml? ( dev-libs/libxml2 )
+	zlib? ( sys-libs/zlib )
+	X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	sys-devel/flex"
+
+netpbm_libtype() {
+	case ${CHOST} in
+	*-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)';;
+	esac
+}
+netpbm_config() {
+	if use $1 ; then
+		[[ $2 != "!" ]] && echo -l${2:-$1}
+	else
+		echo NONE
+	fi
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/netpbm-10.76.00-build.patch
+	epatch "${FILESDIR}"/netpbm-10.76.00-test.patch #450530
+
+	# make sure we use system libs
+	sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+	rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || die
+
+	# disable certain tests based on active USE flags
+	local del=(
+		$(usex jbig '' 'jbigtopnm pnmtojbig jbig-roundtrip')
+		$(usex rle '' 'utahrle-roundtrip')
+		$(usex tiff '' 'tiff-roundtrip')
+	)
+	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 jbig '' 'jbigtopnm pnmtojbig')
+		$(usex jpeg2k '' 'jpeg2ktopam pamtojpeg2k')
+		$(usex rle '' 'pnmtorle rletopnm')
+		$(usex tiff '' 'pamtotiff pnmtotiff pnmtotiffcmyk tifftopnm')
+	)
+	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
+
+	# take care of the importinc stuff ourselves by only doing it once
+	# at the top level and having all subdirs use that one set #149843
+	sed -i \
+		-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
+
+	# avoid ugly depend.mk warnings
+	touch $(find . -name Makefile | sed s:Makefile:depend.mk:g)
+}
+
+src_configure() {
+	cat config.mk.in - >> config.mk <<-EOF
+	# Misc crap
+	BUILD_FIASCO = N
+	SYMLINK = ln -sf
+
+	# These vars let src_test work by default
+	PKGDIR_DEFAULT = ${T}/netpbm
+	RESULTDIR_DEFAULT = ${T}/netpbm-test
+
+	# Toolchain options
+	CC = $(tc-getCC) -Wall
+	LD = \$(CC)
+	CC_FOR_BUILD = $(tc-getBUILD_CC)
+	LD_FOR_BUILD = \$(CC_FOR_BUILD)
+	AR = $(tc-getAR)
+	RANLIB = $(tc-getRANLIB)
+
+	STRIPFLAG =
+	CFLAGS_SHLIB = -fPIC
+
+	LDRELOC = \$(LD) -r
+	LDSHLIB = $(netpbm_ldshlib)
+	LINKER_CAN_DO_EXPLICIT_LIBRARY = N # we can, but dont want to
+	LINKERISCOMPILER = Y
+	NETPBMLIBSUFFIX = $(netpbm_libsuffix)
+	NETPBMLIBTYPE = $(netpbm_libtype)
+	STATICLIB_TOO = $(usex static-libs Y N)
+
+	# The var is called SSE, but the code is actually SSE2.
+	WANT_SSE = $(usex cpu_flags_x86_sse2 Y N)
+
+	# Gentoo build options
+	TIFFLIB = $(netpbm_config tiff)
+	# Let tiff worry about its own dependencies #395753
+	TIFFLIB_NEEDS_JPEG = N
+	TIFFLIB_NEEDS_Z = N
+	JPEGLIB = $(netpbm_config jpeg)
+	PNGLIB = $(netpbm_config png)
+	ZLIB = $(netpbm_config zlib z)
+	LINUXSVGALIB = $(netpbm_config svga vga)
+	XML2_LIBS = $(netpbm_config xml xml2)
+	JBIGLIB = $(netpbm_config jbig)
+	JBIGHDR_DIR =
+	JASPERLIB = $(netpbm_config jpeg2k jasper)
+	JASPERHDR_DIR =
+	URTLIB = $(netpbm_config rle)
+	URTHDR_DIR =
+	X11LIB = $(netpbm_config X X11)
+	X11HDR_DIR =
+	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"
+}
+
+src_compile() {
+	emake -j1 pm_config.h version.h manual_importinc #149843
+	emake
+}
+
+src_test() {
+	# The code wants to install everything first and then test the result.
+	emake install.{bin,lib,data}
+	emake check
+}
+
+src_install() {
+	# Subdir make targets like to use `mkdir` all over the place
+	# without any actual dependencies, thus the -j1.
+	emake -j1 package pkgdir="${ED}"/usr
+
+	[[ $(get_libdir) != "lib" ]] && mv "${ED}"/usr/lib "${ED}"/usr/$(get_libdir)
+
+	# 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
+	dodoc HISTORY Netpbm.programming USERDOC
+	dohtml -r .
+}


             reply	other threads:[~2016-11-16  4:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16  4:51 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-27  3:27 [gentoo-commits] repo/gentoo:master commit in: media-libs/netpbm/files/, media-libs/netpbm/ Mike Frysinger
2020-10-25 19:47 Sam James
2021-05-10  6:24 Joonas Niilola
2021-11-28  2:09 Ionen Wolkens
2021-11-29 23:46 Sam James
2021-12-03  0:12 Sam James
2024-04-12 10:04 Viorel Munteanu
2024-09-29  9:14 Viorel Munteanu
2024-11-24 11:21 Viorel Munteanu
2024-11-25  8:12 Viorel Munteanu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479271854.fe032ce65d9dd8ad43e6fe6043ada0b8ca8920df.vapier@gentoo \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox