summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-22 22:09:05 +0000
committerMike Frysinger <vapier@gentoo.org>2010-09-22 22:09:05 +0000
commit3cb92836000b81817044f8c694d6a814be6ed27b (patch)
tree563d9d8d72bc7d6c8a2649b67803c01bf06b497c /media-libs/netpbm
parentold (diff)
downloadhistorical-3cb92836000b81817044f8c694d6a814be6ed27b.tar.gz
historical-3cb92836000b81817044f8c694d6a814be6ed27b.tar.bz2
historical-3cb92836000b81817044f8c694d6a814be6ed27b.zip
Add fix from upstream for nooffset with pnmconvol #338230 by Sergey Alirzaev.
Package-Manager: portage-2.2_rc85/cvs/Linux x86_64
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--media-libs/netpbm/ChangeLog10
-rw-r--r--media-libs/netpbm/Manifest11
-rw-r--r--media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch83
-rw-r--r--media-libs/netpbm/netpbm-10.51.00-r1.ebuild173
4 files changed, 271 insertions, 6 deletions
diff --git a/media-libs/netpbm/ChangeLog b/media-libs/netpbm/ChangeLog
index ea9bb1177095..b4224913aac9 100644
--- a/media-libs/netpbm/ChangeLog
+++ b/media-libs/netpbm/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-libs/netpbm
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.245 2010/09/19 22:04:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/ChangeLog,v 1.246 2010/09/22 22:09:05 vapier Exp $
+
+*netpbm-10.51.00-r1 (22 Sep 2010)
+
+ 22 Sep 2010; Mike Frysinger <vapier@gentoo.org>
+ +netpbm-10.51.00-r1.ebuild,
+ +files/netpbm-10.51.00-pnmconvol-nooffset.patch:
+ Add fix from upstream for nooffset with pnmconvol #338230 by Sergey
+ Alirzaev.
19 Sep 2010; Mike Frysinger <vapier@gentoo.org> netpbm-10.51.00.ebuild:
Fix install error with urt subdir #337971 by Steve Kutnar and drop importinc
diff --git a/media-libs/netpbm/Manifest b/media-libs/netpbm/Manifest
index 70ed256872a7..3a1cabd16ba7 100644
--- a/media-libs/netpbm/Manifest
+++ b/media-libs/netpbm/Manifest
@@ -9,18 +9,19 @@ AUX netpbm-10.46.00-min_DCT_v_scaled_size.patch 1022 RMD160 8b3370958c504c9330dc
AUX netpbm-10.48.00-pngx.patch 1149 RMD160 387a1f7df51b457eb2a87c32b7ac60a499249c82 SHA1 0823541f93d804f17d6e7512c5f7e9facc4558d6 SHA256 86ffe862542e882db61d4e32ae49c78e1f6056df42eaa44ffe8e43867c27ce74
AUX netpbm-10.48.00-pnmtopng-zlib.patch 419 RMD160 d4e51baf414ee3ca3ed2c1e8ba186bfa3be7a9dd SHA1 0cc0892bde1384b34d37fe1085866e4b919c0cb3 SHA256 29031875887a03adc503a2f6d5965a8b4eb1e82a1def98d9e3a6fb4250285897
AUX netpbm-10.49.00-sigpower.patch 719 RMD160 ef830e01c14424a8b1d2f8e149d12a601c397c83 SHA1 b765c7e1d8a3148557dcbc49c26d77a8a6ec05d8 SHA256 b4a5304f36384a2f96e5c208089230c7190dc06cb99beccfe826520234f9c6fe
+AUX netpbm-10.51.00-pnmconvol-nooffset.patch 3930 RMD160 c54357f13fc1147b8020b523b9c28c5ffd381647 SHA1 e3bf297d209783bfe15d2257b47dc3ed9b492826 SHA256 d9c7f70e58d50dac4998157021ac2fef92822d1abd9b9d060384b195e4f1cabb
AUX netpbm-10.51.00-ppmtompeg-free.patch 1199 RMD160 3e3594fc27166423904ec56c0d17e427811614cd SHA1 ebe9561fd836c930ebd417cb81f507e502b36d57 SHA256 45c0229b035e8b50f759a5aae646a60ef07f4c0fb156b4aee1dc52aa0c1cbc75
DIST netpbm-10.33-manpages.tar.bz2 236722 RMD160 5e43836a5f4d16f1ba5ece21e9996dbe60b252ae SHA1 6c0372f540ad040771beae15a8c2015252679e5f SHA256 aa18adee4a187ad5df243cb1a7c51097dc6a7d6a8072cf6da09972b74ac5454a
DIST netpbm-10.49.00.tar.lzma 1917909 RMD160 26ce43d25a1e7319627d82bfa9a8e73d3c87d1fa SHA1 72db0cff9f805a3f84766dd8add82eaa30685ed3 SHA256 4414fe9b64c695e5d750670aa6e2b03828877d653bc8806e778c1352553c7c8e
DIST netpbm-10.51.00.tar.xz 1834148 RMD160 71593d33e102de72230fbc306165ecc67bbb4c4f SHA1 ae5f9393ebcc75b0914f40c93a837de98a0a71c8 SHA256 6d7bb30d1d0e7f6a23b55c6f03bbb20b539909ad84281dc944b1072656dc1d0e
EBUILD netpbm-10.49.00.ebuild 4308 RMD160 f92fac1b63e0d4c066d57e1085669b5196dfa58f SHA1 637e36390084ecd4bee85497f9628dcff7d7ccec SHA256 41bcaa9810b8f815876b8d00ee115ab0b7b9432f4c6f44309c0330d8973b85f0
-EBUILD netpbm-10.51.00.ebuild 4571 RMD160 3dff3aaa34f9583bdafb4e5a0f3f02e593eacc9c SHA1 b06b2473362adc226130a01a8fc90cbda4cd1b30 SHA256 eab34019b77ba7f67dc590bb74524bb11fad36dc938c2007299658dc4a2de293
-MISC ChangeLog 33676 RMD160 9bacb07f248974aa3368773d1c9fa9e0ef15bae4 SHA1 80c95bddf7da478f9f58c6e88e8a94a93047c46b SHA256 965bce9a7f1eb9849a918c0b66d3a3819d358f20a76b283b40f7397cae1009ec
+EBUILD netpbm-10.51.00-r1.ebuild 4728 RMD160 5d5b695f926f3623ca6c5ce6996f360c20b19280 SHA1 c4e9eee909d32783c6495dd32e10e9ab81c06bd5 SHA256 e69ffcd47a2e72e8d2e2d580d6d324d228c208879cabdc010bb9c2f6f75da341
+MISC ChangeLog 33925 RMD160 56905228a4dd049916c20bc017d65f52f28ca16e SHA1 22c5af1f9d2c0b2496a2415e10d1d7e29357e838 SHA256 377965bc744915a8971bc8717ea0340f1efa8fb114356a1f94d3a6be4595ab66
MISC metadata.xml 266 RMD160 de6149ba44458a170c3f6f6d5c015a3b4e5fe3bd SHA1 bb0d212119622779ede27328c6df989b362deac3 SHA256 4db3c087a1641cf4b8ae3750db0fb27bf8ff9a4dcbe496d1c173a9f9c04df75d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
-iF4EAREIAAYFAkyWiOcACgkQTwhj9JtAlp4BcwD/ZNQP5uKTJXg/sc7P1gMLVCol
-otSPc0BIsHOChkePnk0BAMhpb+Lw9Ttqp81eDgdc8au/920pBuumKYEpzCZLVslC
-=1W9o
+iF4EAREIAAYFAkyafuYACgkQTwhj9JtAlp6eAgD/eW6keg4O4HqT2QJzagaFr3LE
+g4i4cSKjRbUcuYkTJ8sBAMKZbSbCK/k1rdRQRZMB1Qm8M1Cun2pG6Ct0KK6xl740
+=s/Kq
-----END PGP SIGNATURE-----
diff --git a/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
new file mode 100644
index 000000000000..1eb5506ddae2
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-10.51.00-pnmconvol-nooffset.patch
@@ -0,0 +1,83 @@
+taken from upstream
+
+http://bugs.gentoo.org/338230
+
+Index: editor/pnmconvol.c
+===================================================================
+--- editor/pnmconvol.c (revision 1297)
++++ editor/pnmconvol.c (revision 1298)
+@@ -455,13 +455,13 @@ static void
+ convKernelCreatePnm(struct pam * const cpamP,
+ tuple * const * const ctuples,
+ unsigned int const depth,
+- bool const offsetPgm,
++ bool const offsetPnm,
+ struct convKernel ** const convKernelPP) {
+ /*----------------------------------------------------------------------------
+- Compute the convolution matrix in normalized form from the PGM
+- form. Each element of the output matrix is the actual weight we give an
+- input pixel -- i.e. the thing by which we multiple a value from the
+- input image.
++ Compute the convolution matrix in normalized form from the PGM form
++ 'ctuples'/'cpamP'. Each element of the output matrix is the actual weight
++ we give an input pixel -- i.e. the thing by which we multiple a value from
++ the input image.
+
+ 'depth' is the required number of planes in the kernel. If 'ctuples' has
+ fewer planes than that, we duplicate as necessary. E.g. if 'ctuples' is
+@@ -470,13 +470,13 @@ convKernelCreatePnm(struct pam *
+ 'ctuples' has more planes than specified, we ignore the higher numbered
+ ones.
+
+- 'offsetPgm' means the PGM convolution matrix is defined in offset form so
++ 'offsetPnm' means the PNM convolution matrix is defined in offset form so
+ that it can represent negative values. E.g. with maxval 100, 50 means
+ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
+ and there are no negative weights.
+ -----------------------------------------------------------------------------*/
+- double const scale = (offsetPgm ? 2.0 : 1.0) / cpamP->maxval;
+- double const offset = offsetPgm ? - 1.0 : 0.0;
++ double const scale = (offsetPnm ? 2.0 : 1.0) / cpamP->maxval;
++ double const offset = offsetPnm ? - 1.0 : 0.0;
+ unsigned int const planes = MIN(3, depth);
+
+ struct convKernel * convKernelP;
+@@ -579,9 +579,19 @@ normalizeKernel(struct convKernel * cons
+ static void
+ getKernelPnm(const char * const fileName,
+ unsigned int const depth,
+- bool const nooffset,
++ bool const offset,
+ struct convKernel ** const convKernelPP) {
++/*----------------------------------------------------------------------------
++ Get the convolution kernel from the PNM file named 'fileName'.
++ 'offset' means the PNM convolution matrix is defined in offset form so
++ that it can represent negative values. E.g. with maxval 100, 50 means
++ 0, 100 means 50, and 0 means -50. If 'offsetPgm' is false, 0 means 0
++ and there are no negative weights.
++
++ Make the kernel suitable for convolving an image of depth 'depth'.
+
++ Return the kernel as *convKernelPP.
++-----------------------------------------------------------------------------*/
+ struct pam cpam;
+ FILE * cifP;
+ tuple ** ctuples;
+@@ -594,7 +604,7 @@ getKernelPnm(const char * const
+
+ validateKernelDimensions(cpam.width, cpam.height);
+
+- convKernelCreatePnm(&cpam, ctuples, depth, nooffset, convKernelPP);
++ convKernelCreatePnm(&cpam, ctuples, depth, offset, convKernelPP);
+ }
+
+
+@@ -893,7 +903,7 @@ getKernel(struct cmdlineInfo const cmd
+ struct convKernel * convKernelP;
+
+ if (cmdline.pnmMatrixFileName)
+- getKernelPnm(cmdline.pnmMatrixFileName, depth, cmdline.nooffset,
++ getKernelPnm(cmdline.pnmMatrixFileName, depth, !cmdline.nooffset,
+ &convKernelP);
+ else if (cmdline.matrixfile)
+ convKernelCreateSimpleFile(cmdline.matrixfile, cmdline.normalize,
diff --git a/media-libs/netpbm/netpbm-10.51.00-r1.ebuild b/media-libs/netpbm/netpbm-10.51.00-r1.ebuild
new file mode 100644
index 000000000000..e031e0a98401
--- /dev/null
+++ b/media-libs/netpbm/netpbm-10.51.00-r1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/netpbm/netpbm-10.51.00-r1.ebuild,v 1.1 2010/09/22 22:09:05 vapier Exp $
+
+EAPI="3"
+
+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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="jbig jpeg jpeg2k png rle svga tiff X xml zlib"
+
+RDEPEND="jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/jasper )
+ tiff? ( >=media-libs/tiff-3.5.5 )
+ png? ( >=media-libs/libpng-1.4 )
+ xml? ( dev-libs/libxml2 )
+ zlib? ( sys-libs/zlib )
+ svga? ( media-libs/svgalib )
+ jbig? ( media-libs/jbigkit )
+ rle? ( media-libs/urt )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ app-arch/xz-utils"
+
+maint_pkg_create() {
+ local base="/usr/local/src"
+ local srcdir="${base}/netpbm/release_number"
+ if [[ -d ${srcdir} ]] ; then
+ cd "${T}" || die
+
+ ebegin "Exporting ${srcdir}/${PV} to netpbm-${PV}"
+ svn export -q ${srcdir}/${PV} netpbm-${PV}
+ eend $? || return 1
+
+ ebegin "Creating netpbm-${PV}.tar.xz"
+ tar cf - netpbm-${PV} | xz > netpbm-${PV}.tar.xz
+ eend $?
+
+ einfo "Tarball now ready at: ${T}/netpbm-${PV}.tar.xz"
+ else
+ einfo "You need to run:"
+ einfo " cd ${base}"
+ einfo " svn co https://netpbm.svn.sourceforge.net/svnroot/netpbm"
+ die "need svn checkout dir"
+ fi
+}
+pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} && ! -e ${DISTDIR}/${P}.tar.xz ]] && maint_pkg_create ; }
+
+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.31-build.patch
+ epatch "${FILESDIR}"/${P}-ppmtompeg-free.patch
+ epatch "${FILESDIR}"/${P}-pnmconvol-nooffset.patch #338230
+
+ # make sure we use system urt
+ sed -i '/SUPPORT_SUBDIRS/s:urt::' GNUmakefile || die
+ rm -rf urt
+
+ # 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 /dev/stdin >> config.mk <<-EOF
+ # Misc crap
+ BUILD_FIASCO = N
+ SYMLINK = ln -sf
+
+ # 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)
+
+ # Gentoo build options
+ TIFFLIB = $(netpbm_config tiff)
+ 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 = -ljbig
+ JBIGHDR_DIR = $(netpbm_config jbig "!")
+ JASPERLIB = -ljasper
+ JASPERHDR_DIR = $(netpbm_config jpeg2k "!")
+ 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 || die #149843
+ emake || die
+}
+
+src_install() {
+ # Subdir make targets like to use `mkdir` all over the place
+ # without any actual dependencies, thus the -j1.
+ emake -j1 package pkgdir="${D}"/usr || die
+
+ [[ $(get_libdir) != "lib" ]] && mv "${D}"/usr/lib "${D}"/usr/$(get_libdir)
+
+ # Remove cruft that we don't need, and move around stuff we want
+ rm "${D}"/usr/bin/{doc.url,manweb} || die
+ rm -r "${D}"/usr/man/web || die
+ rm -r "${D}"/usr/link || die
+ rm "${D}"/usr/{README,VERSION,config_template,pkginfo} || die
+ dodir /usr/share
+ mv "${D}"/usr/man "${D}"/usr/share/ || die
+ mv "${D}"/usr/misc "${D}"/usr/share/netpbm || die
+
+ dodoc README
+ cd doc
+ GLOBIGNORE='*.html:.*' dodoc *
+ dohtml -r .
+}