| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-tex/luatex/luatex-0.70.1-r1.ebuild,v 1.16 2013/03/09 23:55:02 dilfridge Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit libtool eutils texlive-common
|
| 8 |
|
| 9 |
DESCRIPTION="An extended version of pdfTeX using Lua as an embedded scripting language."
|
| 10 |
HOMEPAGE="http://www.luatex.org/"
|
| 11 |
SRC_URI="http://foundry.supelec.fr/gf/download/frsrelease/392/1730/${PN}-beta-${PV}.tar.bz2
|
| 12 |
http://foundry.supelec.fr/gf/download/frsrelease/392/1732/${PN}-beta-${PV}-doc.tar.bz2"
|
| 13 |
|
| 14 |
LICENSE="GPL-2"
|
| 15 |
SLOT="0"
|
| 16 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
| 17 |
IUSE="doc"
|
| 18 |
|
| 19 |
RDEPEND="dev-libs/zziplib
|
| 20 |
>=media-libs/libpng-1.4
|
| 21 |
<app-text/poppler-0.22[xpdf-headers(+)]
|
| 22 |
sys-libs/zlib
|
| 23 |
>=dev-libs/kpathsea-6.0.1_p20110627"
|
| 24 |
DEPEND="${RDEPEND}
|
| 25 |
virtual/pkgconfig"
|
| 26 |
|
| 27 |
S="${WORKDIR}/${PN}-beta-${PV}/source"
|
| 28 |
PRELIBS="libs/obsdcompat"
|
| 29 |
#texk/kpathsea"
|
| 30 |
#kpathsea_extraconf="--disable-shared --disable-largefile"
|
| 31 |
|
| 32 |
src_prepare() {
|
| 33 |
has_version '>=app-text/poppler-0.18.0:0' && epatch "${FILESDIR}/poppler018.patch"
|
| 34 |
has_version '>=app-text/poppler-0.20.0:0' && epatch "${FILESDIR}/poppler020.patch"
|
| 35 |
epatch "${FILESDIR}/kpathsea2012.patch" \
|
| 36 |
"${FILESDIR}/remove-zlib-version-check.patch"
|
| 37 |
S="${S}/build-aux" elibtoolize --shallow
|
| 38 |
}
|
| 39 |
|
| 40 |
src_configure() {
|
| 41 |
# Too many regexps use A-Z a-z constructs, what causes problems with locales
|
| 42 |
# that don't have the same alphabetical order than ascii. Bug #244619
|
| 43 |
# So we set LC_ALL to C in order to avoid problems.
|
| 44 |
export LC_ALL=C
|
| 45 |
|
| 46 |
local myconf
|
| 47 |
myconf=""
|
| 48 |
#has_version '>=app-text/texlive-core-2009' && myconf="--with-system-kpathsea"
|
| 49 |
|
| 50 |
cd "${S}/texk/web2c"
|
| 51 |
econf \
|
| 52 |
--disable-cxx-runtime-hack \
|
| 53 |
--disable-all-pkgs \
|
| 54 |
--disable-mp \
|
| 55 |
--disable-ptex \
|
| 56 |
--disable-tex \
|
| 57 |
--disable-mf \
|
| 58 |
--disable-largefile \
|
| 59 |
--disable-ipc \
|
| 60 |
--disable-shared \
|
| 61 |
--enable-luatex \
|
| 62 |
--enable-dump-share \
|
| 63 |
--without-mf-x-toolkit \
|
| 64 |
--without-x \
|
| 65 |
--with-system-kpathsea \
|
| 66 |
--with-kpathsea-includes="${EPREFIX}"/usr/include \
|
| 67 |
--with-system-gd \
|
| 68 |
--with-system-libpng \
|
| 69 |
--with-system-teckit \
|
| 70 |
--with-system-zlib \
|
| 71 |
--with-system-t1lib \
|
| 72 |
--with-system-xpdf \
|
| 73 |
--with-system-poppler \
|
| 74 |
--with-system-zziplib \
|
| 75 |
--disable-multiplatform \
|
| 76 |
|
| 77 |
for i in ${PRELIBS} ; do
|
| 78 |
einfo "Configuring $i"
|
| 79 |
local j=$(basename $i)_extraconf
|
| 80 |
local myconf
|
| 81 |
eval myconf=\${$j}
|
| 82 |
cd "${S}/${i}"
|
| 83 |
econf ${myconf}
|
| 84 |
done
|
| 85 |
}
|
| 86 |
|
| 87 |
src_compile() {
|
| 88 |
texk/web2c/luatexdir/getluatexsvnversion.sh || die
|
| 89 |
for i in ${PRELIBS} ; do
|
| 90 |
cd "${S}/${i}"
|
| 91 |
emake || die "failed to build ${i}"
|
| 92 |
done
|
| 93 |
cd "${WORKDIR}/${PN}-beta-${PV}/source/texk/web2c"
|
| 94 |
emake luatex || die "failed to build luatex"
|
| 95 |
}
|
| 96 |
|
| 97 |
src_install() {
|
| 98 |
cd "${WORKDIR}/${PN}-beta-${PV}/source/texk/web2c"
|
| 99 |
emake DESTDIR="${D}" bin_PROGRAMS="luatex" SUBDIRS="" nodist_man_MANS="" \
|
| 100 |
install-exec-am || die
|
| 101 |
|
| 102 |
dodoc "${WORKDIR}/${PN}-beta-${PV}/README" || die
|
| 103 |
doman "${WORKDIR}/texmf/doc/man/man1/"*.1 || die
|
| 104 |
if use doc ; then
|
| 105 |
dodoc "${WORKDIR}/${PN}-beta-${PV}/manual/"*.pdf || die
|
| 106 |
dodoc "${WORKDIR}/texmf/doc/man/man1/"*.pdf || die
|
| 107 |
fi
|
| 108 |
}
|
| 109 |
|
| 110 |
pkg_postinst() {
|
| 111 |
if ! has_version '>=dev-texlive/texlive-basic-2008' ; then
|
| 112 |
elog "Note that this package does not install many files, mainly just the"
|
| 113 |
elog "${PN} executable, which needs other files in order to be"
|
| 114 |
elog "useful. Please consider installing a recent TeX distribution such as"
|
| 115 |
elog "TeX Live 2008 or later to take advantage of the full power of"
|
| 116 |
elog "${PN} ."
|
| 117 |
fi
|
| 118 |
efmtutil-sys
|
| 119 |
}
|