Lines 1-28
Link Here
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/pdflib/pdflib-7.0.2_p8.ebuild,v 1.10 2008/11/05 00:37:56 vapier Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
EAPI="1" |
5 |
EAPI="1" |
6 |
|
6 |
|
7 |
# RUBY_OPTIONAL="yes" |
7 |
RUBY_OPTIONAL="yes" |
8 |
inherit autotools libtool versionator flag-o-matic toolchain-funcs multilib perl-module java-pkg-opt-2 python # ruby |
8 |
inherit autotools libtool versionator flag-o-matic toolchain-funcs multilib perl-module java-pkg-opt-2 python ruby |
9 |
|
9 |
|
10 |
MY_PN="${PN/pdf/PDF}-Lite" |
10 |
MY_PN="${PN/pdf/PDF}-Lite" |
11 |
MY_P="${MY_PN}-${PV/_/}" |
11 |
MY_P="${MY_PN}-${PV/_/}" |
12 |
S="${WORKDIR}/${MY_P}" |
|
|
13 |
|
12 |
|
14 |
DESCRIPTION="A library for generating PDF on the fly." |
13 |
DESCRIPTION="A library for generating PDF on the fly." |
15 |
HOMEPAGE="http://www.pdflib.com/" |
14 |
HOMEPAGE="http://www.pdflib.com/" |
16 |
SRC_URI="http://www.pdflib.com/binaries/${PN/pdf/PDF}/$(delete_all_version_separators ${PV/_*/})/${MY_P}.tar.gz" |
15 |
SRC_URI="http://www.pdflib.com/binaries/${PN/pdf/PDF}/$(delete_all_version_separators ${PV})/${MY_P}.tar.gz" |
17 |
LICENSE="PDFLite" |
16 |
LICENSE="PDFLite" |
18 |
SLOT="5" |
17 |
SLOT="5" # Should it be changed to 6? |
19 |
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd" |
18 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
20 |
IUSE="+cxx doc java perl python tcl" # ruby |
19 |
IUSE="+cxx doc java perl python ruby tcl" |
21 |
|
20 |
|
|
|
21 |
# Should we bump deps versions? |
22 |
COMMON_DEP="tcl? ( >=dev-lang/tcl-8.2 ) |
22 |
COMMON_DEP="tcl? ( >=dev-lang/tcl-8.2 ) |
23 |
perl? ( >=dev-lang/perl-5.1 ) |
23 |
perl? ( >=dev-lang/perl-5.1 ) |
24 |
python? ( >=dev-lang/python-2.2 )" |
24 |
python? ( >=dev-lang/python-2.2 ) |
25 |
# ruby? ( virtual/ruby ) |
25 |
ruby? ( virtual/ruby )" |
26 |
|
26 |
|
27 |
DEPEND="${COMMON_DEP} |
27 |
DEPEND="${COMMON_DEP} |
28 |
java? ( >=virtual/jdk-1.4 )" |
28 |
java? ( >=virtual/jdk-1.4 )" |
Lines 31-38
Link Here
|
31 |
${COMMON_DEP} |
31 |
${COMMON_DEP} |
32 |
java? ( >=virtual/jre-1.4 )" |
32 |
java? ( >=virtual/jre-1.4 )" |
33 |
|
33 |
|
|
|
34 |
S="${WORKDIR}/${MY_P}" |
35 |
|
34 |
pkg_setup() { |
36 |
pkg_setup() { |
35 |
use java && java-pkg-opt-2_pkg_setup |
37 |
java-pkg-opt-2_pkg_setup |
36 |
use perl && perl-module_pkg_setup |
38 |
use perl && perl-module_pkg_setup |
37 |
} |
39 |
} |
38 |
|
40 |
|
Lines 40-50
Link Here
|
40 |
unpack ${A} |
42 |
unpack ${A} |
41 |
cd "${S}" |
43 |
cd "${S}" |
42 |
|
44 |
|
43 |
epatch "${FILESDIR}"/${P}-gcc-4.3.patch |
|
|
44 |
|
45 |
# fix broken configure option for ruby bindings. |
46 |
# do NOT call eautoreconf here, it breaks configure horribly. |
45 |
# do NOT call eautoreconf here, it breaks configure horribly. |
47 |
epatch "${FILESDIR}"/${P}-ruby-configure.patch |
|
|
48 |
eautoconf |
46 |
eautoconf |
49 |
elibtoolize |
47 |
elibtoolize |
50 |
} |
48 |
} |
Lines 61-67
Link Here
|
61 |
use cxx && tc-export CXX |
59 |
use cxx && tc-export CXX |
62 |
|
60 |
|
63 |
local myconf |
61 |
local myconf |
64 |
use cxx || myconf="${myconf} --with-cxx=no" |
62 |
use cxx || myconf="${myconf} --disable-cxx" |
65 |
|
63 |
|
66 |
use java \ |
64 |
use java \ |
67 |
&& myconf="${myconf} --with-java=${JAVA_HOME}" \ |
65 |
&& myconf="${myconf} --with-java=${JAVA_HOME}" \ |
Lines 88-101
Link Here
|
88 |
|
86 |
|
89 |
# ruby bindings disabled for now, configure uses hardcoded list of paths |
87 |
# ruby bindings disabled for now, configure uses hardcoded list of paths |
90 |
# for includes that do not cover all supported arches on Gentoo |
88 |
# for includes that do not cover all supported arches on Gentoo |
91 |
# use ruby \ |
89 |
use ruby \ |
92 |
# && myconf="${myconf} --with-ruby=${RUBY}" |
90 |
&& myconf="${myconf} --with-ruby=${RUBY}" \ |
93 |
# || myconf="${myconf} --with-ruby=no" |
91 |
|| myconf="${myconf} --with-ruby=no" |
94 |
|
92 |
|
95 |
econf --with-ruby=no ${myconf} |
93 |
econf ${myconf} |
96 |
|
94 |
|
97 |
if use java; then |
95 |
if use java; then |
98 |
JAVACFLAGS="$(java-pkg_javac-args)" emake || die "emake failed" |
96 |
emake || die "emake failed" |
99 |
if use doc; then |
97 |
if use doc; then |
100 |
cd ./bind/pdflib/java || die |
98 |
cd ./bind/pdflib/java || die |
101 |
emake javadoc || die "Failed to generate javadoc" |
99 |
emake javadoc || die "Failed to generate javadoc" |
Lines 130-150
Link Here
|
130 |
docinto pdflib |
128 |
docinto pdflib |
131 |
dodoc doc/pdflib/* |
129 |
dodoc doc/pdflib/* |
132 |
|
130 |
|
133 |
# seemant: seems like the makefiles for pdflib generate the .jar file anyway |
131 |
if use java ; then |
134 |
use java && java-pkg_dojar bind/pdflib/java/pdflib.jar |
132 |
java-pkg_dojar bind/pdflib/java/pdflib.jar |
135 |
if use java && use doc; then |
133 |
java-pkg_regso "${D}/usr/$(get_libdir)/libpdf_java.so" |
136 |
java-pkg_dojavadoc ./bind/pdflib/java/javadoc |
134 |
use doc && java-pkg_dojavadoc ./bind/pdflib/java/javadoc |
|
|
135 |
fi |
136 |
|
137 |
# Lot of hakku for ruby |
138 |
if use ruby ; then |
139 |
local RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]') |
140 |
insinto ${RUBYLIBDIR} |
141 |
insopts -m 0755 |
142 |
doins ./bind/pdflib/ruby/*.rb |
143 |
RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') |
144 |
dodir ${RUBYLIBDIR} |
145 |
mv "${D}/usr/$(get_libdir)"/PDFlib.* "${D}/${RUBYLIBDIR}"/ |
146 |
cp ./bind/pdflib/ruby/pdflib_ruby.lo "${D}/${RUBYLIBDIR}"/pdflib_ruby.so |
147 |
chmod 0755 "${D}/${RUBYLIBDIR}"/*.so* |
137 |
fi |
148 |
fi |
138 |
} |
149 |
} |
139 |
|
150 |
|
140 |
pkg_preinst () { |
151 |
pkg_preinst () { |
141 |
perl-module_pkg_preinst |
152 |
perl-module_pkg_preinst |
142 |
has_version "<${CATEGORY}/${PN}-7.0.1" |
153 |
has_version "<${CATEGORY}/${PN}-7.0.3" |
143 |
previous_less_than_7_0_1=$? |
154 |
previous_less_than_7_0_3=$? |
144 |
} |
155 |
} |
145 |
|
156 |
|
146 |
pkg_postinst() { |
157 |
pkg_postinst() { |
147 |
if [[ $previous_less_than_7_0_1 = 0 ]] ; then |
158 |
if [[ $previous_less_than_7_0_3 = 0 ]] ; then |
148 |
ewarn "Please run revdep-rebuild now! All packages that linked with" |
159 |
ewarn "Please run revdep-rebuild now! All packages that linked with" |
149 |
ewarn "previous versions of PDFLib will no longer work unless you" |
160 |
ewarn "previous versions of PDFLib will no longer work unless you" |
150 |
ewarn "run it." |
161 |
ewarn "run it." |