Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tex/latex2html/files/, dev-tex/latex2html/
Date: Fri, 04 Aug 2017 09:44:15
Message-Id: 1501839829.d3b8c1e3cf57247cd2c5c014109040665109c44c.dilfridge@gentoo
1 commit: d3b8c1e3cf57247cd2c5c014109040665109c44c
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 4 09:29:59 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 4 09:43:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3b8c1e3
7
8 dev-tex/latex2html: Add build fixes for Perl 5.26, bug 617760
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 .../latex2html/files/latex2html-2017.2-brace.patch | 36 ++++++++++
13 .../files/latex2html-2017.2-dotinc-2.patch | 12 ++++
14 .../files/latex2html-2017.2-dotinc.patch | 33 +++++++++
15 dev-tex/latex2html/latex2html-2017.2-r1.ebuild | 81 ++++++++++++++++++++++
16 4 files changed, 162 insertions(+)
17
18 diff --git a/dev-tex/latex2html/files/latex2html-2017.2-brace.patch b/dev-tex/latex2html/files/latex2html-2017.2-brace.patch
19 new file mode 100644
20 index 00000000000..4782fb313e7
21 --- /dev/null
22 +++ b/dev-tex/latex2html/files/latex2html-2017.2-brace.patch
23 @@ -0,0 +1,36 @@
24 +diff -ruN latex2html-2017.2.orig/versions/html3_2.pl latex2html-2017.2/versions/html3_2.pl
25 +--- latex2html-2017.2.orig/versions/html3_2.pl 2017-01-23 17:14:25.000000000 -0000
26 ++++ latex2html-2017.2/versions/html3_2.pl 2017-08-04 09:38:17.219909442 -0000
27 +@@ -607,7 +607,7 @@
28 +
29 + if ($color_env) {
30 + local($color_test) = join(',',@$open_tags_R);
31 +- if ($color_test =~ /(color{[^}]*})/g ) {
32 ++ if ($color_test =~ /(color\{[^}]*})/g ) {
33 + $color_env = $1;
34 + }
35 + }
36 +diff -ruN latex2html-2017.2.orig/versions/html4_01.pl latex2html-2017.2/versions/html4_01.pl
37 +--- latex2html-2017.2.orig/versions/html4_01.pl 2017-01-23 17:14:25.000000000 -0000
38 ++++ latex2html-2017.2/versions/html4_01.pl 2017-08-04 09:39:32.529023088 -0000
39 +@@ -976,7 +976,7 @@
40 +
41 + if ($color_env) {
42 + local($color_test) = join(',',@$open_tags_R);
43 +- if ($color_test =~ /(color{[^}]*})/g ) {
44 ++ if ($color_test =~ /(color\{[^}]*})/g ) {
45 + $color_env = $1;
46 + }
47 + }
48 +diff -ruN latex2html-2017.2.orig/versions/html4_1.pl latex2html-2017.2/versions/html4_1.pl
49 +--- latex2html-2017.2.orig/versions/html4_1.pl 2017-01-23 17:14:25.000000000 -0000
50 ++++ latex2html-2017.2/versions/html4_1.pl 2017-08-04 09:37:48.507866114 -0000
51 +@@ -976,7 +976,7 @@
52 +
53 + if ($color_env) {
54 + local($color_test) = join(',',@$open_tags_R);
55 +- if ($color_test =~ /(color{[^}]*})/g ) {
56 ++ if ($color_test =~ /(color\{[^}]*})/g ) {
57 + $color_env = $1;
58 + }
59 + }
60
61 diff --git a/dev-tex/latex2html/files/latex2html-2017.2-dotinc-2.patch b/dev-tex/latex2html/files/latex2html-2017.2-dotinc-2.patch
62 new file mode 100644
63 index 00000000000..2e58c0070d7
64 --- /dev/null
65 +++ b/dev-tex/latex2html/files/latex2html-2017.2-dotinc-2.patch
66 @@ -0,0 +1,12 @@
67 +diff -ruN latex2html-2017.2.orig/configure latex2html-2017.2/configure
68 +--- latex2html-2017.2.orig/configure 2017-01-23 17:14:25.000000000 -0000
69 ++++ latex2html-2017.2/configure 2017-08-04 09:21:02.929355288 -0000
70 +@@ -1225,7 +1225,7 @@
71 + fi
72 +
73 + # this is used to get the values from the config file
74 +-eval `perl -w -e 'use cfgcache; foreach(keys %cfg) { print qq($_='"'"'$cfg{$_}'"'"'\n);}'`
75 ++eval `perl -w -e 'use lib q[.]; use cfgcache; foreach(keys %cfg) { print qq($_='"'"'$cfg{$_}'"'"'\n);}'`
76 +
77 +
78 +
79
80 diff --git a/dev-tex/latex2html/files/latex2html-2017.2-dotinc.patch b/dev-tex/latex2html/files/latex2html-2017.2-dotinc.patch
81 new file mode 100644
82 index 00000000000..e7f29ad5779
83 --- /dev/null
84 +++ b/dev-tex/latex2html/files/latex2html-2017.2-dotinc.patch
85 @@ -0,0 +1,33 @@
86 +diff -ruN latex2html-2017.2.orig/config/build.pl latex2html-2017.2/config/build.pl
87 +--- latex2html-2017.2.orig/config/build.pl 2017-01-23 17:14:25.000000000 -0000
88 ++++ latex2html-2017.2/config/build.pl 2017-08-04 09:13:26.040867263 -0000
89 +@@ -145,6 +145,7 @@
90 + # Read in the system's configuration
91 + use FindBin;
92 + use lib "$FindBin::Bin/..";
93 ++use lib "$FindBin::Bin";
94 + use cfgcache;
95 +
96 + my $dd = $cfg{'dd'};
97 +diff -ruN latex2html-2017.2.orig/config/config.pl latex2html-2017.2/config/config.pl
98 +--- latex2html-2017.2.orig/config/config.pl 2017-01-23 17:14:25.000000000 -0000
99 ++++ latex2html-2017.2/config/config.pl 2017-08-04 09:13:45.500980317 -0000
100 +@@ -435,6 +435,7 @@
101 +
102 + use FindBin;
103 + use lib "$FindBin::Bin/..";
104 ++use lib "$FindBin::Bin";
105 + use L2hos;
106 +
107 + #use diagnostics;
108 +diff -ruN latex2html-2017.2.orig/config/install.pl latex2html-2017.2/config/install.pl
109 +--- latex2html-2017.2.orig/config/install.pl 2017-08-04 09:08:53.608284554 -0000
110 ++++ latex2html-2017.2/config/install.pl 2017-08-04 09:13:57.116047796 -0000
111 +@@ -183,6 +183,7 @@
112 +
113 + use FindBin;
114 + use lib "$FindBin::Bin/..";
115 ++use lib "$FindBin::Bin";
116 + use cfgcache;
117 + use L2hos;
118 +
119
120 diff --git a/dev-tex/latex2html/latex2html-2017.2-r1.ebuild b/dev-tex/latex2html/latex2html-2017.2-r1.ebuild
121 new file mode 100644
122 index 00000000000..ff150f6a652
123 --- /dev/null
124 +++ b/dev-tex/latex2html/latex2html-2017.2-r1.ebuild
125 @@ -0,0 +1,81 @@
126 +# Copyright 1999-2017 Gentoo Foundation
127 +# Distributed under the terms of the GNU General Public License v2
128 +
129 +EAPI=6
130 +
131 +DESCRIPTION="Convertor written in Perl that converts LATEX documents to HTML"
132 +HOMEPAGE="http://www.latex2html.org/"
133 +SRC_URI="http://mirrors.ctan.org/support/latex2html/${P}.tar.gz"
134 +
135 +LICENSE="GPL-2"
136 +SLOT="0"
137 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
138 +IUSE="gif png"
139 +
140 +DEPEND="app-text/ghostscript-gpl
141 + virtual/latex-base
142 + media-libs/netpbm
143 + dev-lang/perl
144 + gif? ( media-libs/giflib )
145 + png? ( media-libs/libpng:0 )"
146 +RDEPEND="${DEPEND}"
147 +
148 +PATCHES=(
149 + "${FILESDIR}/${PN}"-{destdir,tests}.patch
150 + "${FILESDIR}/${P}"-dotinc.patch
151 + "${FILESDIR}/${P}"-dotinc-2.patch
152 + "${FILESDIR}/${P}"-brace.patch
153 +)
154 +
155 +src_prepare() {
156 + default
157 +
158 + sed -i -e 's%@PERL@%'"${EPREFIX}"'/usr/bin/perl%g' wrapper/unix.pin || die
159 +}
160 +
161 +src_configure() {
162 + local myconf
163 +
164 + use gif || use png || myconf="${myconf} --disable-images"
165 +
166 + econf --libdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \
167 + --shlibdir="${EPREFIX}"/usr/$(get_libdir)/latex2html \
168 + --enable-pk \
169 + --enable-eps \
170 + --enable-reverse \
171 + --enable-pipes \
172 + --enable-paths \
173 + --enable-wrapper \
174 + --with-texpath="${EPREFIX}"/usr/share/texmf-site/tex/latex/html \
175 + --without-mktexlsr \
176 + $(use_enable gif) \
177 + $(use_enable png) \
178 + ${myconf}
179 +}
180 +
181 +src_install() {
182 + emake DESTDIR="${D}" install
183 +
184 + # make /usr/share/latex2html sticky
185 + keepdir /usr/share/latex2html
186 +
187 + # clean the perl scripts up to remove references to the sandbox
188 + local dir="${ED}/usr/$(get_libdir)/latex2html"
189 + if use png || use gif; then
190 + # pstoimg isn't built unless gif or png useflags are enabled
191 + sed -i -e "s:${T}:/tmp:g" "${dir}"/pstoimg.pl || die
192 + fi
193 + sed -i -e "s:${S}::g" "${dir}"/latex2html.pl || die
194 + sed -i -e "s:${T}:/tmp:g" "${dir}"/cfgcache.pm || die
195 + sed -i -e "s:${T}:/tmp:g" "${dir}"/l2hconf.pm || die
196 +
197 + dodoc BUGS Changes FAQ MANIFEST README.md TODO
198 +}
199 +
200 +pkg_postinst() {
201 + "${EROOT}"/usr/bin/mktexlsr
202 +}
203 +
204 +pkg_postrm() {
205 + "${EROOT}"/usr/bin/mktexlsr
206 +}