summaryrefslogtreecommitdiff
path: root/media-libs/netpbm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-11-25 03:02:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-11-25 03:02:44 +0000
commit7f0b7329b3aa78ea82792fdf68ab48415fe4cc35 (patch)
tree5c9f3c3f65f2be496e4d9778fdeb4d0da2207c29 /media-libs/netpbm
parent530a5a826feeb71085fb8a01927f4d775a0b131b (diff)
gentoo auto-resync : 25:11:2024 - 03:02:44
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--media-libs/netpbm/Manifest4
-rw-r--r--media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch14
-rw-r--r--media-libs/netpbm/netpbm-11.8.1-r1.ebuild (renamed from media-libs/netpbm/netpbm-11.8.1.ebuild)1
-rw-r--r--media-libs/netpbm/netpbm-9999.ebuild249
4 files changed, 267 insertions, 1 deletions
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index d15b8ffe4330..94c40c1aee11 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -5,8 +5,10 @@ AUX netpbm-11.1.0-fix-clang-O2.patch 773 BLAKE2B a8d2bef659d384b0f94560fec847d37
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
+AUX netpbm-11.8.1-fix-C23.patch 254 BLAKE2B 09c5385c80634990452030bc78f826b11e02d33bc2aba30c4ea0d822e776d6cdec00086fe64a863f9e324c017b0f02d8fa95a34933e2d639ac7f0ebfd7b4945b SHA512 e511958a4cd7ef63f53ddde2e6414b143f767d1e2a36a70ef953693a35aea3f13cb9749800927ce7c34029814872690779b0d2d2cbed72bf543c01bbee2863bf
DIST netpbm-11.2.11.tar.xz 3782252 BLAKE2B 422b9cefee2a54a9c222236935291f0c8d1f13f064f4ebd277d0f92974b9ce3d7e3d9ae6a0410d767553704a03c2de14ca8456996a53fca0f95d61f9ae72605f SHA512 3d94c0c8c25873a16c78af960c964f5756b3e7a29463f001345956acc3bf1378b0b0b4fc0c57d7388dced0979ba4e8cee0def2200092544dd96fc7d04304660b
DIST netpbm-11.8.1.tar.xz 3804004 BLAKE2B ed107d258a85c720de178a3e6488ad1b435135ec50227bb1e4ce9f3665a882a382c3a3e858e49055f88ee9bba6026b390291ad211a82299d03f41addaf93e7f9 SHA512 e4b1e8d7468fcd0233e50861e890669c788f95924edb6b6256f93b53d2ab16b7fd2c2099ca238b409fba7c764e51d54a9fbdbb22bb3bb1acf8296afdb807bd4f
EBUILD netpbm-11.2.11.ebuild 7143 BLAKE2B bd8f69323411bddb85369e36b71da318c608639fd5fd3c4fcb5b4955913f488ad3639419ace4ec4cb0e03ac37551ec24134873a2710c31462225e46a47c4d5fd SHA512 1f9bdf04b95e57811e48b31c827ef3fa3c2234c63efd47ef37415900f71e6891f43c230f05a7a62716614662a30765c38ca39c8e621ccd1bff04bd35f30b0f71
-EBUILD netpbm-11.8.1.ebuild 6939 BLAKE2B 773de213668f7e8c7c4e4243e4b5b4b38b4c7beba97d09bd4047c8a5b0b5122eb4ebca492f5a28f777555d3ee05891bfb1294c770f1f8b763461906354275194 SHA512 b6131f9c1c808d2cccdaa9476c0a02307e0efbde8991a7ab25f8bbf0f6b04c4fd52936ac013e3f2977171d261019187d9f7c466156c63abc970ee6c3afed1c22
+EBUILD netpbm-11.8.1-r1.ebuild 6982 BLAKE2B 675a317ba642fa765bc72cedfc182ea2e762f1f16c9b09be872bfabf153c673f125a79fdbf1be73c3328b9a026270426c450964aa2b1767b4305d97bce212d77 SHA512 ee3cab4f276c6fac1c92fd916c4923a77c61b4274f9bbb5cf8e244ee86725fb24e9d8947dff7684c4a4de03d5c6e65328f302ed6747e9b2618013d3bb90d390a
+EBUILD netpbm-9999.ebuild 6353 BLAKE2B 262f73572750cd90d0f8b7b631233c9b0dd9f7871b55b0284ade4c054cc43fd6390ea5fd7efdd7dab33598f21e221e7caa72b4f92ec46d343fb62948b1fd5e88 SHA512 2e7e4a3b03a85552e401cca78f5815a0bc80bf91e83346f6db29da4aec1a66d729174a28f43eec17c30f64a8ca7cdd117d8f0f831eddc47df9d70514f4d94402
MISC metadata.xml 424 BLAKE2B 9ccc907d6c15cb1a7d6cfe4679d6fa9f488642948897ca34958a06b439ebcfb912cfb18fa9d93f15f19573aed4bd7083d277151c477410a59cd64b4c9c0446d4 SHA512 a987be2134a44cc916d5a026068219b8ccaa149e577eaf2a53a7802321793129777cc79b069df95ec9320f15279249a5f9d8a61509452ef02effcb6c66cf9e80
diff --git a/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch b/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch
new file mode 100644
index 000000000000..a749ec434d31
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.8.1-fix-C23.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/943971
+
+--- a/buildtools/libopt.c
++++ b/buildtools/libopt.c
+@@ -89,7 +89,9 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+
++#if __STDC_VERSION__ < 202311L
+ typedef unsigned char bool;
++#endif
+ #ifndef TRUE
+ #define TRUE (1)
+ #endif
diff --git a/media-libs/netpbm/netpbm-11.8.1.ebuild b/media-libs/netpbm/netpbm-11.8.1-r1.ebuild
index 31d10bb8169f..3626f909bb88 100644
--- a/media-libs/netpbm/netpbm-11.8.1.ebuild
+++ b/media-libs/netpbm/netpbm-11.8.1-r1.ebuild
@@ -59,6 +59,7 @@ PATCHES=(
"${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
+ "${FILESDIR}"/netpbm-11.8.1-fix-C23.patch
)
netpbm_libtype() {
diff --git a/media-libs/netpbm/netpbm-9999.ebuild b/media-libs/netpbm/netpbm-9999.ebuild
new file mode 100644
index 000000000000..7f6949c9f55c
--- /dev/null
+++ b/media-libs/netpbm/netpbm-9999.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic multilib subversion toolchain-funcs
+
+# A detailed explanation is here https://netpbm.sourceforge.net/release.html
+# This is the development branch, used for testing only. It does not contain the man pages.
+
+DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
+HOMEPAGE="https://netpbm.sourceforge.net/"
+ESVN_REPO_URI="http://svn.code.sf.net/p/netpbm/code/trunk"
+
+LICENSE="Artistic BSD GPL-2 IJG LGPL-2.1 MIT public-domain"
+SLOT="0/devel"
+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.6.1-incompatible-pointer-types.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 '/SUPPORT_SUBDIRS/s:urt::' -i GNUmakefile || die
+ rm -r urt converter/other/jbig/libjbig converter/other/jpeg2000/libjasper || 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 \
+ -e '/^importinc:/s|^|importinc:\nmanual_|' \
+ -e '/-Iimportinc/s|-Iimp|-I"$(BUILDDIR)"/imp|g'\
+ -i common.mk || die
+ sed \
+ -e '/%.c/s: importinc$::' \
+ -i common.mk lib/Makefile lib/util/Makefile || die
+ sed \
+ -e 's:pkg-config:$(PKG_CONFIG):' \
+ -i GNUmakefile converter/other/Makefile other/pamx/Makefile || die
+
+ # The postscript knob is currently bound up with a fork test.
+ if ! use postscript ; then
+ sed \
+ -e 's:$(DONT_HAVE_PROCESS_MGMT):Y:' \
+ -i converter/other/Makefile generator/Makefile || die
+ sed -r \
+ -e 's:(pbmtextps|pnmtops|pstopnm).*::' \
+ -i test/all-in-place.{ok,test} || die
+ sed \
+ -e 's:lps-roundtrip.*::' \
+ -e 's:pbmtextps-dump.*::' \
+ -e 's:pbmtextps.*::' \
+ -i test/Test-Order || die
+ sed \
+ -e '/^$/d' \
+ -i test/all-in-place.ok || die
+ sed \
+ '2iexit 80' \
+ -i test/ps-{alt-,flate-,}roundtrip.test || die
+ fi
+
+ # Do not test png if not built
+ if ! use png ; then
+ sed -E \
+ -e 's:(pamtopng|pngtopam|pnmtopng).*::' \
+ -i test/all-in-place.{ok,test} || die
+ sed \
+ -e '/^$/d' \
+ -i test/all-in-place.ok || die
+
+ sed -E \
+ -e 's:(pamrgbatopng|pngtopnm).*::' \
+ -i test/legacy-names.{ok,test} || die
+ sed \
+ -e '/^$/d' \
+ -i test/legacy-names.ok || die
+ sed \
+ -e 's:png-roundtrip.*::' \
+ -e 's:winicon-roundtrip.*::' \
+ -i 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 and pnmindex are broken on musl
+ # bug #907295
+ if use elibc_musl; then
+ sed \
+ -e 's:pbmtext-iso88591.*::' \
+ -e 's:pbmtext-utf8.*::' \
+ -e 's:ppmpat-random.*::' \
+ -e 's:pnmindex.*::' \
+ -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
+
+ dodoc README
+
+ cd doc || die
+ dodoc HISTORY USERDOC
+ docinto html
+}