--- pdflib-7.0.2_p8.ebuild 2008-06-14 22:06:28.000000000 +0400 +++ pdflib-7.0.3.ebuild 2008-10-16 00:00:48.000000000 +0400 @@ -4,8 +4,8 @@ EAPI="1" -# RUBY_OPTIONAL="yes" -inherit autotools libtool versionator flag-o-matic toolchain-funcs multilib perl-module java-pkg-opt-2 python # ruby +RUBY_OPTIONAL="yes" +inherit autotools libtool versionator flag-o-matic toolchain-funcs multilib perl-module java-pkg-opt-2 python ruby MY_PN="${PN/pdf/PDF}-Lite" MY_P="${MY_PN}-${PV/_/}" @@ -16,13 +16,13 @@ SRC_URI="http://www.pdflib.com/binaries/${PN/pdf/PDF}/$(delete_all_version_separators ${PV/_*/})/${MY_P}.tar.gz" LICENSE="PDFLite" SLOT="5" -KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd" -IUSE="+cxx doc java perl python tcl" # ruby +KEYWORDS="~x86" +IUSE="+cxx doc java perl python ruby tcl" COMMON_DEP="tcl? ( >=dev-lang/tcl-8.2 ) perl? ( >=dev-lang/perl-5.1 ) - python? ( >=dev-lang/python-2.2 )" - # ruby? ( virtual/ruby ) + python? ( >=dev-lang/python-2.2 ) + ruby? ( virtual/ruby )" DEPEND="${COMMON_DEP} java? ( >=virtual/jdk-1.4 )" @@ -40,11 +40,7 @@ unpack ${A} cd "${S}" - epatch "${FILESDIR}"/${P}-gcc-4.3.patch - - # fix broken configure option for ruby bindings. # do NOT call eautoreconf here, it breaks configure horribly. - epatch "${FILESDIR}"/${P}-ruby-configure.patch eautoconf elibtoolize } @@ -61,7 +57,7 @@ use cxx && tc-export CXX local myconf - use cxx || myconf="${myconf} --with-cxx=no" + use cxx || myconf="${myconf} --disable-cxx" use java \ && myconf="${myconf} --with-java=${JAVA_HOME}" \ @@ -88,11 +84,11 @@ # ruby bindings disabled for now, configure uses hardcoded list of paths # for includes that do not cover all supported arches on Gentoo - # use ruby \ - # && myconf="${myconf} --with-ruby=${RUBY}" - # || myconf="${myconf} --with-ruby=no" + use ruby \ + && myconf="${myconf} --with-ruby=${RUBY}" \ + || myconf="${myconf} --with-ruby=no" - econf --with-ruby=no ${myconf} + econf ${myconf} if use java; then JAVACFLAGS="$(java-pkg_javac-args)" emake || die "emake failed" @@ -135,6 +131,18 @@ if use java && use doc; then java-pkg_dojavadoc ./bind/pdflib/java/javadoc fi + # Lot of hakku for ruby + if use ruby ; then + local RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]') + insinto ${RUBYLIBDIR} + insopts -m 0755 + doins ./bind/pdflib/ruby/*.rb + RUBYLIBDIR=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitearchdir"]') + dodir ${RUBYLIBDIR} + mv "${D}/usr/$(get_libdir)"/PDFlib.* "${D}/${RUBYLIBDIR}"/ + cp ./bind/pdflib/ruby/pdflib_ruby.lo "${D}/${RUBYLIBDIR}"/pdflib_ruby.so + chmod 0755 "${D}/${RUBYLIBDIR}"/*.so* + fi } pkg_preinst () {