summaryrefslogtreecommitdiff
path: root/libre/netpbm/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/netpbm/PKGBUILD')
-rw-r--r--libre/netpbm/PKGBUILD143
1 files changed, 67 insertions, 76 deletions
diff --git a/libre/netpbm/PKGBUILD b/libre/netpbm/PKGBUILD
index d79440322..9bb74cbc2 100644
--- a/libre/netpbm/PKGBUILD
+++ b/libre/netpbm/PKGBUILD
@@ -1,12 +1,16 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor (Hyperbola): André Silva <emulatorman@hyperbola.info>
+# Maintainer (Arch):
+# parabola changes and rationale:
+# - Added armv7h and i686 support
+# - Removed nonfree parts
pkgname=netpbm
-pkgver=10.73.31
+pkgver=10.73.36
pkgrel=1
pkgrel+=.parabola1
pkgdesc="A toolkit for manipulation of graphic images"
-pkgdesc+=", without nonfree parts and patent issues"
+pkgdesc+=", without nonfree parts"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('custom' 'BSD' 'GPL' 'LGPL')
@@ -17,91 +21,35 @@ options=('!makeflags')
# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
source=(https://downloads.sourceforge.net/project/netpbm/super_stable/$pkgver/netpbm-$pkgver.tgz
https://sources.archlinux.org/other/packages/netpbm/netpbm-doc-31Jan2014.tar.xz{,.sig}
- netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
-sha256sums=('584c95f1ccdcd66d5ca68d7d5501728ae1184cba324d713f6b2a3ca86424243b'
+ netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch
+ reproducible-man-gzip.patch use-source-date-epoch.patch)
+sha256sums=('93b31b11b003082d5fd4037ae5c768b91ea7330b10247a25086c10b5dd71e445'
'74bcf840ee643c6917330c382484010cb99c004a3fcf05391bebcac63815acb3'
'SKIP'
'991aba7897e0710687369b4e2edfba1397ecd77d62578eac496afbc47b5ca970'
- '2eaa0f842d90bb3dcbc66273d58ec9117b97029da231b141159e580e65b98eb0'
- '2c397588d9cba2c40dee55c07713d5e77e0e04245db939fdc1962d7de4cf4a33')
+ '83d75a80ce999d8b69572e54f04c4d220c60b0d09f9e52d3236264535c3bf216'
+ '2c397588d9cba2c40dee55c07713d5e77e0e04245db939fdc1962d7de4cf4a33'
+ '8e3efdb4fcbfdc8e9a5c8e9663c7d6b9ecef3a2379ce38d2acc5669c339f6814'
+ '68055341833f482c6910a56c2fdfe046978a1a92fd8442a2a9209c82ce3e4d13')
validpgpkeys=('5357F3B111688D88C1D88119FCF2CB179205AC90')
-prepare() {
- 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
-
- # 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
+remove_program() {
+ file="$1"
+ progname="$(basename ${file} | sed 's/\.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
+ rm -v "${file}"
+ sed -i "s/${progname}//g" "$(dirname ${file})/Makefile"
+ sed -i "s/${progname}\.1//g" buildtools/manpage.mk
+}
- #Removing references about nonfree licenses part
- sed -i '338,383d' doc/copyright_summary
+prepare() {
+ cd $pkgname-$pkgver
patch -p1 < ../netpbm-CAN-2005-2471.patch
patch -p1 < ../netpbm-security-code.patch
patch -p1 < ../netpbm-security-scripts.patch
+ patch -p1 < ../reproducible-man-gzip.patch
+ patch -p1 < ../use-source-date-epoch.patch
sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman
sed -i 's|@python|@python2|' buildtools/manpage.mk
@@ -118,6 +66,49 @@ prepare() {
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
+
+ # Remove the converter/ppm/hpcdtoppm directory:
+ # - hpcdtoppm: as hpcdtoppm is not even redistributable, this hpcdtoppm only
+ # prints a message to steer users toward downloading "the real hpcdtoppm"
+ # which is nonfree
+ # - pcdovtoppm: no license information
+ rm -rv converter/ppm/hpcdtoppm
+ sed '/\.\/converter\/ppm\/hpcdtoppm \\/d' -i GNUmakefile
+ sed 's/hpcdtoppm//g' -i converter/ppm/Makefile
+
+ # Removing programs without license information
+ remove_program converter/other/pamtopnm.c
+ remove_program converter/pbm/pbmto4425.c
+ remove_program converter/pbm/pbmtoln03.c
+ remove_program converter/pbm/pbmtolps.c
+ remove_program converter/pbm/pbmtopk.c
+ remove_program converter/pbm/pktopbm.c
+ remove_program converter/pgm/spottopgm.c
+ remove_program converter/ppm/ppmtogif.c
+ remove_program converter/ppm/ppmtopjxl.c
+ remove_program other/pamchannel.c
+
+ # Tests have no license information
+ rm -v -rf test/
+ # Remove test from "SUPPORT_SUBDIRS = urt icon buildtools test"
+ awk '{
+ if ($1 != "SUPPORT_SUBDIRS") {
+ print $0
+ } else {
+ for (i=1;i<=NF;i++) {
+ if($i != "test") {
+ printf $i " "
+ }
+ }
+ }
+ }' GNUmakefile > GNUmakefile.1
+ mv -f GNUmakefile.1 GNUmakefile
+
+ sed -i '/pnmtopnm/d' netpbm.c
+
+ #Removing references about nonfree licenses part
+ sed -i '338,383d' doc/copyright_summary
+
}
build() {