initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

151
netpbm/PKGBUILD Normal file
View File

@@ -0,0 +1,151 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
_pkgname=netpbm-libre
pkgname=netpbm
pkgver=10.73.31
pkgrel=2
pkgdesc="A toolkit for manipulation of graphic images"
arch=('i686' 'x86_64')
license=('custom:Netpbm')
url="http://netpbm.sourceforge.net/"
depends=('perl' 'libpng' 'libtiff' 'libjpeg-turbo' 'libxml2')
makedepends=('tauthon' 'jbigkit' 'libx11')
options=('!makeflags')
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
mksource=(https://downloads.sourceforge.net/project/netpbm/super_stable/$pkgver/netpbm-$pkgver.tgz)
source=(https://repo.hyperbola.info:50000/sources/${_pkgname}/${_pkgname}-${pkgver}.tar.gz{,.sig}
https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
netpbm-CAN-2005-2471.patch netpbm-libre-security-code.patch netpbm-security-scripts.patch)
mksha512sums=('22db95133809fce7e1e2a57b488e62d385e819228856471bc6fa4d0c0f95d77679f35226a20a8bccad64399cc83502ce5a2d7544730847e5ff92c563a19887f5')
sha512sums=('7e779585597896207123c9f1f01de784c4177ac56470107c2e202f7260dc0c49ccc07789c679d7ecd7a56c84bf7f8615c0cada2665bb2111faa9af8bc37bc5e6'
'SKIP'
'ef3c889d30fd1c1422e0a05c19b5e875a33fbcd737ffdd10f56b23a42e74e0bb33134e859f7330d2ab35488b95eb487d5cc15b0f253a220b09082c294713d25b'
'SKIP'
'a0d96195cfeeca818cf10a9f8b292eba7213f93f78dd7d0f1da6bd9e448bfa6cb8fdc8d4378defda1425a8ebbadb84655f5a9269eb3e0ea230170fd640236c8c'
'1cb28573ff5678040c08e4aa9d87fd421329155ecf9e876d04cd5632cd15e83b0f5e71ffcfa033a2bc639857e57a8ee5913658473136b16040e162e9de6fb24f'
'4b0d7603a4176ad97b325535f4f2ceafdd2edf5e2ddfca054aadff923245a35009ebb58191488ab677b48480b7f082ca1d81262c60e038347a117e46b882da4d')
validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90' # Eric Belanger
'C92BAA713B8D53D3CAE63FC9E6974752F9704456') # André Silva
mksource() {
cd $pkgname-$pkgver
# Removing hpcdtoppm/pcdindex (non comercial)
rm -rv converter/ppm/hpcdtoppm
# Removing ppmtogif/giftopnm (patent restriction)
rm -v converter/other/giftopnm.c converter/ppm/ppmtogif.c
rm -v test/gif-quant-roundtrip.test test/gif-roundtrip.test test/all-in-place.ok
# Removing programs without license information
rm -v other/pamchannel.c test/pamchannel.ok
rm -v converter/other/pamtopnm.c
rm -v converter/pbm/pbmto4425.c
rm -v converter/pbm/pbmtoln03.c
rm -v converter/pbm/pbmtolps.c
rm -v converter/pbm/pbmtopk.c
rm -v converter/pbm/pktopbm.c
rm -v converter/ppm/ppmtopjxl.c
rm -v converter/pgm/spottopgm.c
rm -v test/avs-roundtrip.test test/facesaver-roundtrip.test test/ilbm-roundtrip.test test/pamchannel.test \
test/pamditherbw.test test/pamenlarge.test test/pamfile.test test/pfm-roundtrip.test \
test/pgmtoppm.test test/pict-roundtrip.test test/pnminvert.test test/pnmremap1.test \
test/pnmremap2.test test/pnmtopnm-plain.test test/pnm-pam-roundtrip.test test/pnm-plain-roundtrip.test \
test/ps-alt-roundtrip.test test/ps-roundtrip.test test/sbig-roundtrip.test test/st4-roundtrip.test \
test/targa-roundtrip.test test/utahrle-roundtrip.test test/winicon-roundtrip.test test/xwd-roundtrip.test
}
prepare() {
cd $pkgname-$pkgver
# Removing references about hpcdtoppm/pcdindex (non comercial)
sed -i 's/hpcdtoppm//g' converter/ppm/Makefile
sed -i 's/hpcdtoppm\.1//g' buildtools/manpage.mk
sed -i 's/pcdindex\.1//g' buildtools/manpage.mk
# Removing references about ppmtogif/giftopnm (patent restriction)
sed -i 's/ppmtogif//g' converter/ppm/Makefile test/all-in-place.test
sed -i 's/ppmtogif\.1//g' buildtools/manpage.mk
sed -i 's/giftopnm//g' converter/other/Makefile test/all-in-place.test
sed -i 's/giftopnm\.1//g' buildtools/manpage.mk
sed -i '/giftopnm/d' converter/other/pnmtopalm/README
# Removing references about programs without license information
sed -i 's/pamchannel//g' other/Makefile test/all-in-place.test
sed -i 's/pamchannel\.1//g' buildtools/manpage.mk
sed -i 's/pamchannel\.test//g' test/Test-Order
sed -i 's/pamtopnm//g' converter/other/Makefile test/all-in-place.test
sed -i 's/pamtopnm\.1//g' buildtools/manpage.mk
sed -i '/pnmtopnm/d' netpbm.c
sed -i 's/pbmto4425//g' converter/pbm/Makefile test/all-in-place.test
sed -i 's/pbmto4425\.1//g' buildtools/manpage.mk
sed -i 's/pbmtoln03//g' converter/pbm/Makefile test/all-in-place.test
sed -i 's/pbmtoln03\.1//g' buildtools/manpage.mk
sed -i 's/pbmtolps//g' converter/pbm/Makefile test/all-in-place.test
sed -i 's/pbmtolps\.1//g' buildtools/manpage.mk
sed -i 's/pbmtopk//g' converter/pbm/Makefile test/all-in-place.test
sed -i 's/pbmtopk\.1//g' buildtools/manpage.mk
sed -i 's/pktopbm//g' converter/pbm/Makefile test/all-in-place.test
sed -i 's/pktopbm\.1//g' buildtools/manpage.mk
sed -i 's/ppmtopjxl//g' converter/ppm/Makefile test/all-in-place.test
sed -i 's/ppmtopjxl\.1//g' buildtools/manpage.mk
sed -i 's/spottopgm//g' converter/pgm/Makefile test/all-in-place.test
sed -i 's/spottopgm\.1//g' buildtools/manpage.mk
# Removing references about nonfree licenses part
sed -i '338,383d' doc/copyright_summary
patch -p1 < ../netpbm-CAN-2005-2471.patch
patch -p1 < ../netpbm-libre-security-code.patch
patch -p1 < ../netpbm-security-scripts.patch
sed -i 's|#!/usr/bin/python|#!/usr/bin/tauthon|' buildtools/makeman
sed -i 's|@python|@tauthon|' buildtools/manpage.mk
cp config.mk.in config.mk
echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
echo "NETPBM_DOCURL = file://${srcdir}/doc" >> config.mk
echo 'TIFFLIB = libtiff.so' >> config.mk
echo 'JPEGLIB = libjpeg.so' >> config.mk
echo 'PNGLIB = libpng.so' >> config.mk
echo 'ZLIB = libz.so' >> config.mk
echo 'JBIGLIB = /usr/lib/libjbig.a' >> config.mk
sed -i 's|misc|share/netpbm|' common.mk
sed -i 's|/link|/lib|' lib/Makefile
sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
}
build() {
cd $pkgname-$pkgver
make
# Generating useful man pages with html doc
make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" USERGUIDE=. \
-C ../doc -f "${srcdir}/$pkgname-$pkgver/buildtools/manpage.mk" manpages
}
package() {
cd $pkgname-$pkgver
make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev
# Removing dummy man pages
rm "${pkgdir}"/usr/share/man/man{1,3,5}/*
make MAKEMAN="${srcdir}/$pkgname-$pkgver/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
-C ../doc -f "${srcdir}/$pkgname-$pkgver/buildtools/manpage.mk" installman
# Replace obsolete utility
echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm"
# Licensing. Note that each program in the package has a separate license.
install -D -m644 "${srcdir}/$pkgname-$pkgver/doc/copyright_summary" \
"${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"
}