summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hadaway <raker@gentoo.org>2003-01-13 11:01:07 +0000
committerNick Hadaway <raker@gentoo.org>2003-01-13 11:01:07 +0000
commitf16bcc7821eea9659ba8bf4fb8c1aef47889ca59 (patch)
treed938556cf72ea94dccf146853ecf2c59a54d1e2a /media-libs/pdflib
parentadded new version redhat-artwork-0.58 (diff)
downloadgentoo-2-f16bcc7821eea9659ba8bf4fb8c1aef47889ca59.tar.gz
gentoo-2-f16bcc7821eea9659ba8bf4fb8c1aef47889ca59.tar.bz2
gentoo-2-f16bcc7821eea9659ba8bf4fb8c1aef47889ca59.zip
language bindings should now install properly.
Diffstat (limited to 'media-libs/pdflib')
-rw-r--r--media-libs/pdflib/ChangeLog11
-rw-r--r--media-libs/pdflib/files/digest-pdflib-4.0.3-r12
-rw-r--r--media-libs/pdflib/pdflib-4.0.3-r1.ebuild121
3 files changed, 133 insertions, 1 deletions
diff --git a/media-libs/pdflib/ChangeLog b/media-libs/pdflib/ChangeLog
index 2655003eda4b..522ca3096337 100644
--- a/media-libs/pdflib/ChangeLog
+++ b/media-libs/pdflib/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for media-libs/pdflib
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/ChangeLog,v 1.12 2002/12/16 09:29:30 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/ChangeLog,v 1.13 2003/01/13 11:01:07 raker Exp $
+
+*pdflib-4.0.3-r1 (13 Jan 2003)
+
+ 13 Jan 2003; Nick Hadaway <raker@gentoo.org> pdflib-4.0.3-r1.ebuild,
+ files/digest-pdflib-4.0.3-r1 :
+ Reworked ebuild so python is detected if enabled in use. Had to limit
+ compatible pythons to the 2.2 series. No longer building against
+ system png, tiff, and jpeg libs as all language bindings are disabled
+ if linking against them.
*pdflib-4.0.3 (09 Nov 2002)
diff --git a/media-libs/pdflib/files/digest-pdflib-4.0.3-r1 b/media-libs/pdflib/files/digest-pdflib-4.0.3-r1
new file mode 100644
index 000000000000..21c33c47084b
--- /dev/null
+++ b/media-libs/pdflib/files/digest-pdflib-4.0.3-r1
@@ -0,0 +1,2 @@
+MD5 1b9e0d16f3e695902301aa26b6e92513 pdflib-4.0.3.tar.gz 2373817
+MD5 cd6ff4da6ca9d3001a0ed4c0211f5996 pdf.c 82725
diff --git a/media-libs/pdflib/pdflib-4.0.3-r1.ebuild b/media-libs/pdflib/pdflib-4.0.3-r1.ebuild
new file mode 100644
index 000000000000..58f6e0b86df2
--- /dev/null
+++ b/media-libs/pdflib/pdflib-4.0.3-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/pdflib-4.0.3-r1.ebuild,v 1.1 2003/01/13 11:01:07 raker Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="A library for generating PDF on the fly"
+SRC_URI="http://www.pdflib.com/pdflib/download/${P}.tar.gz
+ http://www.pdflib.com/pdflib/download/PHP-4.3.0/pdf.c"
+HOMEPAGE="http://www.pdflib.com"
+IUSE="tcltk perl python java"
+SLOT="4"
+LICENSE="Aladdin"
+KEYWORDS="~x86 ~sparc"
+
+DEPEND="tcltk? ( >=dev-lang/tk-8.2 )
+ perl? ( >=sys-devel/perl-5.1 )
+ python? ( =dev-lang/python-2.2* )
+ java? ( >=virtual/jdk-1.3 )"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd ${S}
+ # updated file for compatibility with php-4.3.0
+ cp ${DISTDIR}/pdf.c ${S}/bind/php/ext/pdf/
+}
+
+src_compile() {
+
+ # fix sandbox violations
+ # NOTE: the basic theory is to not compile pdflib.java during
+ # src_compile() or src_install(), but rather in pkg_postinstall(),
+ # and then install it where it can be found.
+ cp ${S}/bind/java/Makefile.in ${S}/bind/java/Makefile.in.orig
+ sed -e "s/all:\t\$(SWIG_LIB) pdflib.jar/all:\t\$(SWIG_LIB)/" \
+ -e "s/install: \$(SWIG_LIB) pdflib.jar/install: \$(SWIG_LIB)/" \
+ ${S}/bind/java/Makefile.in.orig > ${S}/bind/java/Makefile.in
+
+ local myconf
+ use tcltk || myconf="--with-tcl=no"
+
+ use perl || myconf="${myconf} --with-perl=no"
+
+ use python \
+ && myconf="${myconf} --with-py=/usr --with-pyincl=/usr/include/python2.2" \
+ || myconf="${myconf} --with-py=no"
+
+ use java \
+ && myconf="${myconf} --with-java=${JAVA_HOME}" \
+ || myconf="${myconf} --with-java=no"
+
+ # libpng-1.2.5 needs to be linked against stdc++ and zlib
+ cp configure configure.old
+ sed -e 's:-lpng:-lpng -lz -lstdc++:' configure.old > configure
+
+ econf \
+ --enable-cxx \
+ ${myconf} || die
+
+ emake || die
+}
+
+src_install() {
+
+ # fix sandbox violations
+ # NB: do this *after* build, otherwise we will get linker problems.
+ # all we basically do here is modify the install path for Makefiles that
+ # needs it.
+ cp ${S}/bind/java/Makefile ${S}/bind/java/Makefile.orig
+ sed -e "s:LANG_LIBDIR \t\= :LANG_LIBDIR\t\= ${D}:" \
+ ${S}/bind/java/Makefile.orig > ${S}/bind/java/Makefile
+ cp ${S}/bind/perl/Makefile ${S}/bind/perl/Makefile.orig
+ sed -e "s:LANG_LIBDIR \t\= :LANG_LIBDIR\t\= ${D}:" \
+ ${S}/bind/perl/Makefile.orig > ${S}/bind/perl/Makefile
+ cp ${S}/bind/python/Makefile ${S}/bind/python/Makefile.orig
+ sed -e "s:LANG_LIBDIR \t\= :LANG_LIBDIR\t\= ${D}:" \
+ ${S}/bind/python/Makefile.orig > ${S}/bind/python/Makefile
+ cp ${S}/bind/tcl/Makefile ${S}/bind/tcl/Makefile.orig
+ sed -e "s:LANG_LIBDIR \t\= :LANG_LIBDIR\t\= ${D}:" \
+ ${S}/bind/tcl/Makefile.orig > ${S}/bind/tcl/Makefile
+
+ # ok, this should create the correct lib dirs for perl and python.
+ # yes, i know it is messy, but as i see it, a ebuild should be generic
+ # ... ie. you should be able to just use cp to update it
+ if [ ! -z "`use perl`" ] && [ -x /usr/bin/perl ] ; then
+ local perlmajver="`/usr/bin/perl -v |grep 'This is perl' \
+ |cut -d ' ' -f 4 |cut -d '.' -f 1`"
+ local perlver="`/usr/bin/perl -v |grep 'This is perl' \
+ |cut -d ' ' -f 4`"
+ local perlarch="`/usr/bin/perl -v |grep 'This is perl' \
+ |cut -d ' ' -f 7`"
+ dodir /usr/lib/perl${perlmajver/v/}/site_perl/${perlver/v/}/${perlarch}
+ fi
+ if [ ! -z "`use python`" ] && [ -x /usr/bin/python ] ; then
+ local pyver="`/usr/bin/python -V 2>&1 \
+ |cut -d ' ' -f 2 |cut -d '.' -f 1,2`"
+ dodir /usr/lib/python${pyver}/lib-dynload
+ fi
+ #next line required for proper install
+ dodir /usr/bin
+ make prefix=${D}/usr \
+ install || die
+
+ dodoc readme.txt doc/*
+
+ # karltk: This is definitely NOT how it should be done!
+ # we need this to create pdflib.jar (we will not have the source when
+ # this is a binary package ...)
+ if [ "`use java`" ]
+ then
+ insinto /usr/share/pdflib
+ doins ${S}/bind/java/pdflib.java
+
+ mkdir -p com/pdflib
+ mv ${S}/bind/java/pdflib.java com/pdflib
+ javac com/pdflib/pdflib.java
+
+ jar cf pdflib.jar com/pdflib/*.class
+
+ dojar pdflib.jar
+ fi
+}