summaryrefslogtreecommitdiff
path: root/media-libs/netpbm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-09-30 01:25:53 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-09-30 01:25:53 +0100
commitf16e0a3eea2c1d2e5c495ed1802dea365b4fda4b (patch)
tree8942fce466ff12eb53fafa1a5731ff2751fcd593 /media-libs/netpbm
parent04ac238703da84168e02b06fb131d1d17d85be23 (diff)
gentoo auto-resync : 30:09:2024 - 01:25:52
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--media-libs/netpbm/Manifest7
-rw-r--r--media-libs/netpbm/files/netpbm-11.7.2-lto.patch58
-rw-r--r--media-libs/netpbm/netpbm-11.2.11.ebuild266
-rw-r--r--media-libs/netpbm/netpbm-11.7.2.ebuild (renamed from media-libs/netpbm/netpbm-11.7.1.ebuild)1
4 files changed, 330 insertions, 2 deletions
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index b684e41b7205..4e459129e278 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -4,10 +4,13 @@ AUX netpbm-11.0.0-misc-deps.patch 1446 BLAKE2B 721e926a83d50d04d4a407051ee077db5
AUX netpbm-11.1.0-fix-clang-O2.patch 773 BLAKE2B a8d2bef659d384b0f94560fec847d37731315f5cdb67e5474efb596672d146446c6d545caa816d74f9d4c32fe486ce49f8cb55f38e9706bae6b0ba79c0dbbb5e SHA512 0a0049415d5c252603c47325d69ae582bec76ac15f442682ef0a2ff8c5a8cd19e28543644883bde891f2a376a401f43ed923b184112f49c67d295b9215d519de
AUX netpbm-11.2.7-fix-pnmcolormap2-test.patch 7051 BLAKE2B 741d4943b2e9eab1fb0061d6265271df8e25e458c1eb39f50aed8a392edf8369c9f0f3c43fc6ca0b940dd376166c9419c5039ddeaf10487859a7ea9bec4e6075 SHA512 4c7be95b582db27e3ce542b8f53bfdad2e6882b22ccc383aa7ca480cb5ba2a6aa000724dae3c5107efd1071bb87fac0648061dd46b0b75f1072ef05b7e128a68
AUX netpbm-11.6.1-incompatible-pointer-types.patch 514 BLAKE2B 0ea8a3c50838776ee645e61accc13645a690dc7e75cde2c33afd1ac7f07abbcb85a97b7e113217af12617ec5ad314eca0324c7bfbe7beb445aee85de47649ffb SHA512 a3a46607904c8ff9757f0a136aa2336382033760bc69bcca5a5d7662ca824f9a7d4281fe3996efc57456c3b30ddf7319fb70a1cb950ef974507f82340a226abb
+AUX netpbm-11.7.2-lto.patch 2699 BLAKE2B 51da4abfa35da594597eb1091f8f3ade875491d428231215f91ff3d637826db6310f2c8f7bf59cb62d025cde170dc247fadedd90dedc5049f68f61d02adbfc0e SHA512 809d1b86d436534219936959037e5c4c17761b4c0e464eb968fdc961f68d5a3d2a60974f52e330fa49b8933aa1bfc486515e019b2bc0d15bbc525b9c4f852eb2
DIST netpbm-11.2.10.tar.xz 3782160 BLAKE2B 22dab865106f48a83992ff780a3a3cb26e7fd279b4e22f622a5f6459f90aecf70ce85ce65fd9f14ebe9a148a92ac2b0eb35ca95b0feb88dc0cbe24d11921e4d3 SHA512 baa12b1aa5d66967d900f3d92ebd9cdf2bc936389fd943b995ed863b9f57977bdb6c1e92588252b6219d26d06085b7ea5e3400f1d9be688cb538c807b84293bf
+DIST netpbm-11.2.11.tar.xz 3782252 BLAKE2B 422b9cefee2a54a9c222236935291f0c8d1f13f064f4ebd277d0f92974b9ce3d7e3d9ae6a0410d767553704a03c2de14ca8456996a53fca0f95d61f9ae72605f SHA512 3d94c0c8c25873a16c78af960c964f5756b3e7a29463f001345956acc3bf1378b0b0b4fc0c57d7388dced0979ba4e8cee0def2200092544dd96fc7d04304660b
DIST netpbm-11.2.9.tar.xz 3782172 BLAKE2B b5acec8306c820e7b0ac2dec21ab5df8f2cdbec01d3d59f82b307d90111954e81e1b01ad7d8e25e8fbd0ea7cf61e8b023e3dfaed6d1cab71b51f7e367d792e56 SHA512 02961bb2ac4a4292e028ed5dbd05daf89ac795f50d36d97be67c49a61be0cbd977e954aa9266c4649d9a46de3fbe7c4b2b51c8363cc7bee322926dd4a9af2ab1
-DIST netpbm-11.7.1.tar.xz 3805692 BLAKE2B af7d9374c0dbea1b77a02bb9ea371dd46faac4225cef179d5076ae3f41115b681728267a9cc84c8544f0217647206648242499043b15cf9e076f1c5e41c134ec SHA512 7a07a0d959944a95c51853d9a5392302de00ebd0c18a9039ceeaf4b398bf796c9079aa8c0c46865f4b19628c1bda29b60c9efec4ee7b7968db82ba3e83f5c079
+DIST netpbm-11.7.2.tar.xz 3805736 BLAKE2B 8b194c5c49d2422cb5101579716a0295bb364c80172e9a4eeb563e1cdbe44e681397e15207d117da7f0bb997cb90d3c4c8cb4299bc33ede74f9e845714448c1d SHA512 1a56118e89ce68caca09b59b05da7291e1ca706279862ea77e5266022aa939f32e49f9ea127065776f64faff3222ea3f24b6a385bcd6c34a60eb86207983a9b8
EBUILD netpbm-11.2.10.ebuild 7112 BLAKE2B a5aa490176c0b511a3b11c20cd05bc68171448348283c84c1e7a1c998503c0d4fded30b7a34f23089994a8543e3ed5116301885fee00a22924f5ff4be93614fc SHA512 aba9627a905f1546fe8e1afed27ed02df556aaaf871e646686b4a9e88f51f3f8ad46abdc5feae1d0fb0cedfb67a891ffc2c364d85e96526c7a94fc987b3711fc
+EBUILD netpbm-11.2.11.ebuild 7151 BLAKE2B 8fd153a8ef9e959b4116029eb5dc082d72f7b02324e6fbbde885515a0379db2c476bb7ea63c622eb649ca5dd22102dcff9f2c4b1d7d58135f78973fc7ab4d970 SHA512 2a42daaca1ce228cc3c45e40ea6985999076688345f8f6045a1173bed379cef9523c70b88544ee6f9159c2b2756cc95a55ec6bf30ef57f4452d0fbcb61120004
EBUILD netpbm-11.2.9-r1.ebuild 7104 BLAKE2B eec9a81b43abeb3877d1913c4daacae40773b23b64b1a1060b8a136b147af9669dfa9baca38f63519df283da9f9cf330f407077429446f99fb06383367b2f749 SHA512 85a09d2c0eb97d80c193d57c5302d21367f08d380ba00d5a91cfa55b01370f28b1e392ba0aeeedc282d4bafd4bf2dfa4cf685a377fe615d7d1d47c1169217a53
-EBUILD netpbm-11.7.1.ebuild 6900 BLAKE2B 290567ddd75d93365cfdc6b7d9afa14540199877642a1210c421ac53ec0f8094f9bc098011c83c23ac9356c4cdff9eb746faa18063201a4ba13777fba8c056ad SHA512 7ab008a76c9b44c299478f451c7e8ddaef79d527abdd501fcb3f0d70fa02db326b527b135afeaaafe962bf4b2fa4474c6746644da52e6c1a41e5e70f33b9c97d
+EBUILD netpbm-11.7.2.ebuild 6939 BLAKE2B c6a23bb88af42b125ad2da793489199607d5c1c5b11e1c9f51f7da79a52b6240ed5a373de4d08dc8c061263f58c8fc2d32bb36057c30512afedad00d2336f66d SHA512 8ed08d9fb174dddd85e275c4d3daec93a6148daccb5945f1d78d14ed6fdfa99336b6b0763e2869ee966735c58ae744f0041ec6cbc73d0f59dda63376e8ad0f45
MISC metadata.xml 424 BLAKE2B 9ccc907d6c15cb1a7d6cfe4679d6fa9f488642948897ca34958a06b439ebcfb912cfb18fa9d93f15f19573aed4bd7083d277151c477410a59cd64b4c9c0446d4 SHA512 a987be2134a44cc916d5a026068219b8ccaa149e577eaf2a53a7802321793129777cc79b069df95ec9320f15279249a5f9d8a61509452ef02effcb6c66cf9e80
diff --git a/media-libs/netpbm/files/netpbm-11.7.2-lto.patch b/media-libs/netpbm/files/netpbm-11.7.2-lto.patch
new file mode 100644
index 000000000000..b3e47fbcdcd4
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.7.2-lto.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/940328
+
+--- a/converter/ppm/ppmtompeg/mpeg.c
++++ b/converter/ppm/ppmtompeg/mpeg.c
+@@ -97,7 +97,7 @@
+ /* important -- don't initialize anything here */
+ /* must be re-initted anyway in GenMPEGStream */
+
+-extern int IOtime;
++extern time_t IOtime;
+ extern boolean resizeFrame;
+ extern int outputWidth, outputHeight;
+ int gopSize = 100; /* default */
+@@ -431,7 +431,7 @@
+ boolean const childProcess,
+ boolean const remoteIO,
+ MpegFrame ** const bFramePP,
+- int * const IOtimeP,
++ time_t * const IOtimeP,
+ unsigned int * const framesReadP) {
+ /*----------------------------------------------------------------------------
+ Get Frame 'frameNum', which is a B frame related to previous reference
+@@ -480,7 +480,7 @@
+ struct inputSource * const inputSourceP,
+ boolean const remoteIo,
+ boolean const childProcess,
+- int * const IOtimeP,
++ time_t * const IOtimeP,
+ BitBucket * const wholeStreamBbP,
+ const char * const outputFileName,
+ unsigned int * const framesReadP,
+@@ -653,7 +653,7 @@
+ const char * const inputConversion,
+ MpegFrame * const pastRefFrameP,
+ unsigned int * const framesReadP,
+- int * const ioTimeP,
++ time_t * const ioTimeP,
+ bool * const endOfStreamP) {
+ /*----------------------------------------------------------------------------
+ Read the next frame from Standard Input and add it to the linked list
+@@ -804,7 +804,7 @@
+ const char * const inputConversion,
+ MpegFrame ** const framePP,
+ unsigned int * const framesReadP,
+- int * const ioTimeP) {
++ time_t * const ioTimeP) {
+
+ /* This needs to be modularized. It shouldn't issue messages about
+ encoding GOPs and B frames, since it knows nothing about those.
+@@ -913,7 +913,7 @@
+ const char * const slaveConversion,
+ const char * const inputConversion,
+ unsigned int * const framesReadP,
+- int * const ioTimeP) {
++ time_t * const ioTimeP) {
+ /*----------------------------------------------------------------------------
+ Get frame with number 'frameNumber' as *frameP.
+
diff --git a/media-libs/netpbm/netpbm-11.2.11.ebuild b/media-libs/netpbm/netpbm-11.2.11.ebuild
new file mode 100644
index 000000000000..9a28f7bcf4a0
--- /dev/null
+++ b/media-libs/netpbm/netpbm-11.2.11.ebuild
@@ -0,0 +1,266 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic multilib toolchain-funcs
+
+# Upstream has 3 flavors of netpbm: super stable, stable and advanced.
+# They only provide a tarball for super stable, but super stable is a bit lagging.
+# So we package the stable branch of their svn (currently versions 11.2.xx) on SLOT "0/stable"
+# and the advanced branch of their svn (currently versions 11.7.yy) on SLOT "0/advanced".
+# The stable branch is stabilized according to usual Gentoo rules, while the
+# advanced branch will not be stabilized.
+# A detailed explanation is here https://netpbm.sourceforge.net/release.html
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="https://netpbm.sourceforge.net/"
+SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${P}.tar.xz"
+
+LICENSE="Artistic BSD GPL-2 IJG LGPL-2.1 MIT public-domain"
+SLOT="0/stable"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="jbig jpeg png postscript rle cpu_flags_x86_sse2 static-libs svga tiff X xml"
+
+# app-text/ghostscript-gpl is really needed for postscript
+# some utilities execute /usr/bin/gs
+# some installed programs are perl scripts
+RDEPEND="
+ dev-lang/perl
+ jbig? ( media-libs/jbigkit:= )
+ jpeg? ( media-libs/libjpeg-turbo:=[static-libs?] )
+ png? (
+ >=media-libs/libpng-1.4:0=
+ sys-libs/zlib
+ )
+ postscript? (
+ app-text/ghostscript-gpl
+ sys-libs/zlib
+ )
+ rle? ( media-libs/urt:= )
+ svga? ( media-libs/svgalib )
+ tiff? ( >=media-libs/tiff-3.5.5:= )
+ xml? ( dev-libs/libxml2 )
+ X? ( x11-libs/libX11 )
+"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+"
+BDEPEND="
+ app-arch/xz-utils
+ app-alternatives/lex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/netpbm-10.86.21-build.patch
+ "${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
+ "${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
+ "${FILESDIR}"/netpbm-11.2.7-fix-pnmcolormap2-test.patch
+ "${FILESDIR}"/netpbm-11.6.1-incompatible-pointer-types.patch
+ "${FILESDIR}"/netpbm-11.7.2-lto.patch
+)
+
+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_lib() {
+ usex ${1} -l${2:-$1} NONE
+}
+
+# for bug #828127
+netpbm_cflags_for_build() {
+ if is-flagq -fPIC; then
+ echo -fPIC
+ fi
+}
+
+src_prepare() {
+ default
+
+ # 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
+
+ # fix typo in a test
+ sed -i \
+ -e 's:^o#! /bin/sh:#! /bin/sh:' \
+ test/stdin-ppm3.test || die
+
+ # 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
+ sed -i \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ GNUmakefile converter/other/Makefile other/pamx/Makefile || die
+
+ # The postscript knob is currently bound up with a fork test.
+ if ! use postscript ; then
+ sed -i \
+ -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
+ converter/other/Makefile generator/Makefile || die
+ sed -i -r \
+ -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
+ test/all-in-place.{ok,test} || die
+ sed -i \
+ -e 's:lps-roundtrip.*::' \
+ -e 's:pbmtextps-dump.*::' \
+ -e 's:pbmtextps.*::' \
+ test/Test-Order || die
+ sed -i \
+ -e '/^$/d' \
+ test/all-in-place.ok || die
+ sed -i \
+ '2iexit 80' \
+ test/ps-{alt-,flate-,}roundtrip.test || die
+ fi
+
+ # the new postscript test needs +x
+ chmod +x test/lps-roundtrip.test || die
+
+ # Do not test png if not built
+ if ! use png ; then
+ sed -i -E \
+ -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
+ test/all-in-place.{ok,test} || die
+ sed -i \
+ -e '/^$/d' \
+ test/all-in-place.ok || die
+
+ sed -i -E \
+ -e 's:(pamrgbatopng|pngtopnm).*::' \
+ test/legacy-names.{ok,test} || die
+ sed -i \
+ -e '/^$/d' \
+ test/legacy-names.ok || die
+ sed -i \
+ -e 's:png-roundtrip.*::' \
+ -e 's:winicon-roundtrip.*::' \
+ test/Test-Order || die
+ fi
+
+ # pbmtext-iso88591 requires LC_ALL=en_US.iso88591, not available on musl
+ # pbmtext-utf8 requires locale, not available on musl
+ # ppmpat-random is broken on musl
+ # bug #907295
+ if use elibc_musl; then
+ sed \
+ -e 's:pbmtext-iso88591.*::' \
+ -e 's:pbmtext-utf8.*::' \
+ -e 's:ppmpat-random.*::' \
+ -i test/Test-Order || die
+ fi
+}
+
+src_configure() {
+ cat config.mk.in - >> config.mk <<-EOF || die "writing config.mk failed"
+ # Misc stuff
+ 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)
+ PKG_CONFIG = $(tc-getPKG_CONFIG)
+
+ STRIPFLAG =
+ CFLAGS_SHLIB = -fPIC
+ CFLAGS_FOR_BUILD += $(netpbm_cflags_for_build)
+
+ 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_lib tiff)
+ # Let tiff worry about its own dependencies #395753
+ TIFFLIB_NEEDS_JPEG = N
+ TIFFLIB_NEEDS_Z = N
+ JPEGLIB = $(netpbm_config_lib jpeg)
+ PNGLIB = $(netpbm_config_lib png)
+ ZLIB = $($(tc-getPKG_CONFIG) --libs zlib)
+ LINUXSVGALIB = $(netpbm_config_lib svga vga)
+ XML2_LIBS = $(netpbm_config_lib xml xml2)
+ JBIGLIB = $(netpbm_config_lib jbig)
+ JBIGHDR_DIR =
+ JASPERLIB = NONE
+ JASPERHDR_DIR =
+ URTLIB = $(netpbm_config_lib rle)
+ URTHDR_DIR =
+ X11LIB = $(netpbm_config_lib X X11)
+ X11HDR_DIR =
+ EOF
+}
+
+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
+
+ 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/{README,VERSION,{pkgconfig,config}_template,pkginfo} || die
+
+ dodir /usr/share
+ mv "${ED}"/usr/misc "${ED}"/usr/share/netpbm || die
+
+ doman userguide/*.[0-9]
+ dodoc README
+
+ cd doc || die
+ dodoc HISTORY Netpbm.programming USERDOC
+ docinto html
+ dodoc -r ../userguide/*.html
+}
diff --git a/media-libs/netpbm/netpbm-11.7.1.ebuild b/media-libs/netpbm/netpbm-11.7.2.ebuild
index 65bc56ebbe9d..7d8bd8900ea6 100644
--- a/media-libs/netpbm/netpbm-11.7.1.ebuild
+++ b/media-libs/netpbm/netpbm-11.7.2.ebuild
@@ -58,6 +58,7 @@ PATCHES=(
"${FILESDIR}"/netpbm-11.0.0-misc-deps.patch
"${FILESDIR}"/netpbm-11.1.0-fix-clang-O2.patch
"${FILESDIR}"/netpbm-11.6.1-incompatible-pointer-types.patch
+ "${FILESDIR}"/netpbm-11.7.2-lto.patch
)
netpbm_libtype() {