Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 214920 | Differences between
and this patch

Collapse All | Expand All

(-)pdflib-7.0.2_p8.ebuild (-20 / +33 lines)
Lines 4-11 Link Here
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/_/}"
Lines 16-28 Link Here
16
SRC_URI="http://www.pdflib.com/binaries/${PN/pdf/PDF}/$(delete_all_version_separators ${PV/_*/})/${MY_P}.tar.gz"
16
SRC_URI="http://www.pdflib.com/binaries/${PN/pdf/PDF}/$(delete_all_version_separators ${PV/_*/})/${MY_P}.tar.gz"
17
LICENSE="PDFLite"
17
LICENSE="PDFLite"
18
SLOT="5"
18
SLOT="5"
19
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
19
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
20
IUSE="+cxx doc java perl python tcl" # ruby
20
IUSE="+cxx doc java perl python ruby tcl" 
21
21
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
27
DEPEND="${COMMON_DEP}
28
DEPEND="${COMMON_DEP}
28
	java? ( >=virtual/jdk-1.4 )"
29
	java? ( >=virtual/jdk-1.4 )"
Lines 32-38 Link Here
32
	java? ( >=virtual/jre-1.4 )"
33
	java? ( >=virtual/jre-1.4 )"
33
34
34
pkg_setup() {
35
pkg_setup() {
35
	use java && java-pkg-opt-2_pkg_setup
36
	java-pkg-opt-2_pkg_setup
36
	use perl && perl-module_pkg_setup
37
	use perl && perl-module_pkg_setup
37
}
38
}
38
39
Lines 40-50 Link Here
40
	unpack ${A}
41
	unpack ${A}
41
	cd "${S}"
42
	cd "${S}"
42
43
43
	epatch "${FILESDIR}"/${P}-gcc-4.3.patch
44
	#Fix Java bindings.
45
	epatch "${FILESDIR}"/${P}-javafixes.patch
44
46
45
	# fix broken configure option for ruby bindings.
46
	# do NOT call eautoreconf here, it breaks configure horribly.
47
	# do NOT call eautoreconf here, it breaks configure horribly.
47
	epatch "${FILESDIR}"/${P}-ruby-configure.patch
48
	eautoconf
48
	eautoconf
49
	elibtoolize
49
	elibtoolize
50
}
50
}
Lines 61-67 Link Here
61
	use cxx && tc-export CXX
61
	use cxx && tc-export CXX
62
62
63
	local myconf
63
	local myconf
64
	use cxx || myconf="${myconf} --with-cxx=no"
64
	use cxx || myconf="${myconf} --disable-cxx"
65
65
66
	use java \
66
	use java \
67
		&& myconf="${myconf} --with-java=${JAVA_HOME}" \
67
		&& myconf="${myconf} --with-java=${JAVA_HOME}" \
Lines 88-101 Link Here
88
88
89
	# ruby bindings disabled for now, configure uses hardcoded list of paths
89
	# ruby bindings disabled for now, configure uses hardcoded list of paths
90
	# for includes that do not cover all supported arches on Gentoo
90
	# for includes that do not cover all supported arches on Gentoo
91
	# use ruby \
91
	use ruby \
92
	#	&& myconf="${myconf} --with-ruby=${RUBY}"
92
		&& myconf="${myconf} --with-ruby=${RUBY}" \
93
	#	|| myconf="${myconf} --with-ruby=no"
93
		|| myconf="${myconf} --with-ruby=no"
94
94
95
	econf --with-ruby=no ${myconf}
95
	econf ${myconf}
96
96
97
	if use java; then
97
	if use java; then
98
		JAVACFLAGS="$(java-pkg_javac-args)" emake || die "emake failed"
98
		emake || die "emake failed"
99
		if use doc; then
99
		if use doc; then
100
			cd ./bind/pdflib/java || die
100
			cd ./bind/pdflib/java || die
101
			emake javadoc || die "Failed to generate javadoc"
101
			emake javadoc || die "Failed to generate javadoc"
Lines 130-139 Link Here
130
	docinto pdflib
130
	docinto pdflib
131
	dodoc doc/pdflib/*
131
	dodoc doc/pdflib/*
132
132
133
	# seemant: seems like the makefiles for pdflib generate the .jar file anyway
133
	if use java ; then
134
	use java && java-pkg_dojar bind/pdflib/java/pdflib.jar
134
		java-pkg_dojar bind/pdflib/java/pdflib.jar
135
	if use java && use doc; then
135
		java-pkg_regso "${D}/usr/$(get_libdir)/libpdf_java.so"
136
		java-pkg_dojavadoc ./bind/pdflib/java/javadoc
136
		use doc && java-pkg_dojavadoc ./bind/pdflib/java/javadoc
137
	fi
138
139
	# Lot of hakku for ruby
140
	if use ruby ; then
141
		local RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
142
		insinto ${RUBYLIBDIR}
143
		insopts -m 0755
144
		doins ./bind/pdflib/ruby/*.rb
145
		RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]')
146
		dodir ${RUBYLIBDIR}
147
		mv "${D}/usr/$(get_libdir)"/PDFlib.* "${D}/${RUBYLIBDIR}"/
148
		cp ./bind/pdflib/ruby/pdflib_ruby.lo "${D}/${RUBYLIBDIR}"/pdflib_ruby.so
149
		chmod 0755 "${D}/${RUBYLIBDIR}"/*.so*
137
	fi
150
	fi
138
}
151
}
139
152

Return to bug 214920