summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/pslib')
-rw-r--r--dev-libs/pslib/Manifest2
-rw-r--r--dev-libs/pslib/files/pslib-getline.patch47
-rw-r--r--dev-libs/pslib/files/pslib-lm.patch11
-rw-r--r--dev-libs/pslib/metadata.xml9
-rw-r--r--dev-libs/pslib/pslib-0.4.1-r2.ebuild50
-rw-r--r--dev-libs/pslib/pslib-0.4.5.ebuild50
6 files changed, 169 insertions, 0 deletions
diff --git a/dev-libs/pslib/Manifest b/dev-libs/pslib/Manifest
new file mode 100644
index 000000000000..5332be514bf9
--- /dev/null
+++ b/dev-libs/pslib/Manifest
@@ -0,0 +1,2 @@
+DIST pslib-0.4.1.tar.gz 531797 SHA256 d33768fa50c6f45e3f34e84848a039c36779f3ff4beea873d1815e86f6c46e5a SHA512 012c0b2de1cb151fc41498ca4e6f62ec15138b35afddd0199c6366b818c7b544877eea9575df0e1aee49a67cd52dcac47eae405854e7390abeb64fda221327cf WHIRLPOOL dc878df04ffa1b972ee8881725a9e81dd9d8012fe22dae68d01f12a80767d45b60f59473f4ebe96c3f66fd3a37f550dacaa76866e2a6c84746e4c00d73ea8721
+DIST pslib-0.4.5.tar.gz 493687 SHA256 7a33928982b281660206bb3749a4a563e3ac987eea64f41696f212df345212be SHA512 410abfdca6c52f16c07b7d0157930fbb7a996f03bfb84aee2bc951b2d859bc2186d3ba742b724cd957b9b1c48201364fbeb11c15d7f4ead34f78b0d0746abc6f WHIRLPOOL eaf5360b5ab5e35cf620963c8c8b38b753e640ef2c744351137870d680f55a23bf04b299592fd48d592f8021b35b14acf1d7943dc6a43838289904960f98a88b
diff --git a/dev-libs/pslib/files/pslib-getline.patch b/dev-libs/pslib/files/pslib-getline.patch
new file mode 100644
index 000000000000..cfe7ce4da732
--- /dev/null
+++ b/dev-libs/pslib/files/pslib-getline.patch
@@ -0,0 +1,47 @@
+--- src/ps_afm.c 2007-07-11 20:18:00.000000000 +0200
++++ src/ps_afm.c.fix 2009-07-11 14:51:05.000000000 +0200
+@@ -138,7 +138,7 @@
+ return (int)(acc>=0? floor(acc+0.5) : ceil(acc-0.5) ) ;
+ }
+
+-static int getline(FILE *afmin) {
++static int pslib_getline(FILE *afmin) {
+ char *p ;
+ int c ;
+
+@@ -616,7 +616,7 @@
+ return(-1);
+ }
+
+- while (getline(fp)) {
++ while (pslib_getline(fp)) {
+ switch(interest(paramstring())) {
+ case N:
+ handleprotusion(psdoc, metrics) ;
+@@ -664,7 +664,7 @@
+ /*
+ * Read file line by line.
+ */
+- while (getline(metric->afmin)) {
++ while (pslib_getline(metric->afmin)) {
+ switch(interest(paramstring())) {
+ case FontName:
+ metric->fontname = paramnewstring(psdoc) ;
+@@ -1039,7 +1039,7 @@
+
+ while (1) {
+ while (param == NULL || *param == '\0') {
+- if (getline(metrics->afmin) == 0)
++ if (pslib_getline(metrics->afmin) == 0)
+ ps_error(psdoc, PS_RuntimeError, _("Premature end of encoding file."));
+ for (p=buffer; *p != '\0'; p++)
+ if (*p == '%') {
+@@ -1160,7 +1160,7 @@
+ psdoc->free(psdoc, e);
+ return -1;
+ }
+- while (getline(metrics->afmin)) {
++ while (pslib_getline(metrics->afmin)) {
+ for (p=buffer; *p != '\0'; p++)
+ if (*p == '%') {
+ if (ignoreligkern == 0)
diff --git a/dev-libs/pslib/files/pslib-lm.patch b/dev-libs/pslib/files/pslib-lm.patch
new file mode 100644
index 000000000000..46292eee3d4a
--- /dev/null
+++ b/dev-libs/pslib/files/pslib-lm.patch
@@ -0,0 +1,11 @@
+--- a/configure.in 2007-10-30 02:38:30.000000000 -0500
++++ b/configure.in 2009-01-21 18:55:37.000000000 -0600
+@@ -92,6 +92,8 @@
+ AC_SUBST(LIBHNJ_CFLAGS)
+ AC_SUBST(LIBHNJ_LIBS)
+
++AC_CHECK_LIB([m], [pow])
++
+ PNG_PREFIX=no
+ AC_ARG_WITH(png, [ --with-png=DIR Path to png library (/usr)])
+ case "${withval}" in
diff --git a/dev-libs/pslib/metadata.xml b/dev-libs/pslib/metadata.xml
new file mode 100644
index 000000000000..f8f5d4685cef
--- /dev/null
+++ b/dev-libs/pslib/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>printing</herd>
+ <herd>tex</herd>
+ <upstream>
+ <remote-id type="sourceforge">pslib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/pslib/pslib-0.4.1-r2.ebuild b/dev-libs/pslib/pslib-0.4.1-r2.ebuild
new file mode 100644
index 000000000000..5a22cab134f2
--- /dev/null
+++ b/dev-libs/pslib/pslib-0.4.1-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="pslib is a C-library to create PostScript files on the fly"
+HOMEPAGE="http://pslib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pslib/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 ~sparc ~x86"
+IUSE="debug jpeg linguas_de png tiff"
+
+RDEPEND="png? ( >=media-libs/libpng-1.2.43-r2:0 )
+ jpeg? ( virtual/jpeg )
+ tiff? ( media-libs/tiff )"
+#gif? requires libungif, not in portage
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ >=dev-libs/glib-2
+ dev-util/intltool
+ dev-perl/XML-Parser"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-lm.patch \
+ "${FILESDIR}"/${PN}-getline.patch
+
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
+ src/pslib.c || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with png) \
+ $(use_with jpeg) \
+ $(use_with tiff) \
+ $(use_with debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS README
+ use linguas_de || rm -r "${D}/usr/share/locale/de"
+}
diff --git a/dev-libs/pslib/pslib-0.4.5.ebuild b/dev-libs/pslib/pslib-0.4.5.ebuild
new file mode 100644
index 000000000000..a72b79d74d59
--- /dev/null
+++ b/dev-libs/pslib/pslib-0.4.5.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="pslib is a C-library to create PostScript files on the fly"
+HOMEPAGE="http://pslib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pslib/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug jpeg png static-libs tiff"
+
+RDEPEND="
+ png? ( >=media-libs/libpng-1.2.43-r2:0 )
+ jpeg? ( virtual/jpeg )
+ tiff? ( media-libs/tiff )"
+#gif? requires libungif, not in portage
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ >=dev-libs/glib-2
+ dev-util/intltool
+ dev-perl/XML-Parser"
+
+src_prepare() {
+ # hackpatchfix underlinking
+ sed -i -e 's/$(TIFF_LIBS)/$(TIFF_LIBS) -lm/' src/Makefile.am || die
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-bmp \
+ $(use_enable static-libs static) \
+ $(use_with png) \
+ $(use_with jpeg) \
+ $(use_with tiff) \
+ $(use_with debug)
+}
+
+src_install() {
+ default
+
+ prune_libtool_files --all
+}