/[gentoo-x86]/dev-tex/tex4ht/tex4ht-20090513_p1511.ebuild
Gentoo

Contents of /dev-tex/tex4ht/tex4ht-20090513_p1511.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat Jun 12 16:19:00 2010 UTC (4 years, 1 month ago) by aballier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
remove old
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-tex/tex4ht/tex4ht-20090513_p1511.ebuild,v 1.8 2009/12/26 19:25:26 pva Exp $
4
5 inherit latex-package toolchain-funcs java-pkg-opt-2
6
7 IUSE=""
8
9 # tex4ht-20050331_p2350 -> tex4ht-1.0.2005_03_31_2350
10 MY_P="${PN}-1.0.${PV:0:4}_${PV:4:2}_${PV:6:2}_${PV/*_p/}"
11
12 DESCRIPTION="Converts (La)TeX to (X)HTML, XML and OO.org"
13 HOMEPAGE="http://www.cse.ohio-state.edu/~gurari/TeX4ht/
14 http://www.cse.ohio-state.edu/~gurari/TeX4ht/bugfixes.html"
15 SRC_URI="http://www.cse.ohio-state.edu/~gurari/TeX4ht/fix/${MY_P}.tar.gz"
16
17 LICENSE="LPPL-1.2"
18 KEYWORDS="alpha amd64 arm hppa ia64 ~ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
19 SLOT="0"
20
21 DEPEND=">=sys-apps/sed-4
22 java? ( >=virtual/jdk-1.5 )"
23
24 RDEPEND="app-text/ghostscript-gpl
25 media-gfx/imagemagick
26 java? ( >=virtual/jre-1.5 )"
27
28 IUSE="java"
29
30 S="${WORKDIR}/${MY_P}"
31
32 src_unpack() {
33 unpack ${A}
34 cd "${S}/texmf/tex4ht/base/unix"
35 sed -i -e \
36 's#~/tex4ht.dir#/usr/share#' tex4ht.env || die
37 sed -i -e \
38 's#tpath/tex/texmf/fonts/tfm/!#t/usr/share/texmf/fonts/tfm/!\nt/usr/local/share/texmf/fonts/tfm/!\nt/var/cache/fonts/tfm/!#' tex4ht.env || die
39 sed -i -e \
40 's#%%~/texmf-dist#/usr/share/texmf#g' tex4ht.env || die
41
42 einfo "Removing precompiled java stuff"
43 find "${S}" '(' -name '*.class' -o -name '*.jar' ')' -print -delete
44
45 # Rename ht script to avoid collisions with app-editors/hteditor
46 # Bug #197213
47 mv "${S}/bin/ht/unix/ht" "${S}/bin/ht/unix/ht.tex4ht" || die
48 }
49
50 src_compile() {
51 cd "${S}/src/"
52 einfo "Compiling postprocessor sources..."
53 for f in tex4ht t4ht htcmd ; do
54 $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o $f $f.c \
55 -DENVFILE='"/usr/share/texmf/tex4ht/base/tex4ht.env"' \
56 -DHAVE_DIRENT_H -DKPATHSEA -lkpathsea \
57 || die "Compiling $f failed"
58 done
59 if use java; then
60 einfo "Compiling java files..."
61 cd java
62 ejavac *.java */*.java */*/*.java -d ../../texmf/tex4ht/bin
63 cd "${S}/texmf/tex4ht/bin"
64 # Create the jar needed by oolatex
65 jar -cf "${S}/${PN}.jar" * || die "failed to create jar"
66 fi
67 }
68
69 src_install () {
70 # install the binaries
71 dobin "${S}/src/tex4ht" "${S}/src/t4ht" "${S}/src/htcmd"
72 # install the scripts
73 if ! use java; then
74 rm -f "${S}"/bin/unix/oo*
75 rm -f "${S}"/bin/unix/jh*
76 fi
77 dobin "${S}"/bin/ht/unix/* || die
78 dobin "${S}"/bin/unix/mk4ht || die
79
80 # install the .4ht scripts
81 insinto /usr/share/texmf/tex/generic/tex4ht
82 doins "${S}"/texmf/tex/generic/tex4ht/* || die
83
84 # install the special htf fonts
85 insinto /usr/share/texmf/tex4ht
86 doins -r "${S}/texmf/tex4ht/ht-fonts" || die
87
88 if use java; then
89 # install the java files
90 doins -r "${S}/texmf/tex4ht/bin"
91 java-pkg_jarinto /usr/share/texmf/tex4ht/bin
92 java-pkg_dojar "${S}/${PN}.jar"
93 fi
94
95 # install the .4xt files
96 doins -r "${S}/texmf/tex4ht/xtpipes" || die
97
98 # install the env file
99 insinto /usr/share/texmf/tex4ht/base
100 newins "${S}/texmf/tex4ht/base/unix/tex4ht.env" tex4ht.env || die
101
102 if latex-package_has_tetex_3 ; then
103 insinto /etc/texmf/texmf.d
104 doins "${FILESDIR}/50tex4ht.cnf" || die
105 fi
106 }
107
108 pkg_postinst() {
109 use java || elog 'ODF converters (oolatex & friends) require the java use flag'
110 latex-package_pkg_postinst
111 elog "In order to avoid collisions with app-editors/hteditor"
112 elog "The helper script 'ht' has been renamed to 'ht.tex4ht'"
113 }

  ViewVC Help
Powered by ViewVC 1.1.20