diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85a38e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +SOURCES/cfgcache.pm +SOURCES/l2h-2K8-jp20081220.tar.gz +SOURCES/latex2html-2012.tgz +SOURCES/latex2html-manpages.tar.gz diff --git a/.latex2html.metadata b/.latex2html.metadata new file mode 100644 index 0000000..caa4fbf --- /dev/null +++ b/.latex2html.metadata @@ -0,0 +1,4 @@ +a0e51f49b799a35f7ea884cf99117d9519a732c2 SOURCES/cfgcache.pm +add27f5cf3eef40aa68d4bfdbd566bda49bea02c SOURCES/l2h-2K8-jp20081220.tar.gz +54b42d3fb812b0bf3d25bbde7e0ea2daf84e69ff SOURCES/latex2html-2012.tgz +e87245982fd87931dc32b703cefc88dad6450681 SOURCES/latex2html-manpages.tar.gz diff --git a/SOURCES/latex2html-2002-2-1-SHLIB.patch b/SOURCES/latex2html-2002-2-1-SHLIB.patch new file mode 100644 index 0000000..0165454 --- /dev/null +++ b/SOURCES/latex2html-2002-2-1-SHLIB.patch @@ -0,0 +1,20 @@ +--- latex2html-2002-2-1/config/config.pl.orig 2004-11-02 20:17:57.000000000 +0900 ++++ latex2html-2002-2-1/config/config.pl 2004-11-02 20:48:22.024993493 +0900 +@@ -1915,12 +1915,12 @@ + else { + # similar to the perl installation procedure, append latex2html only + # if it does not appear in the PREFIX +- if($newcfg{'PREFIX'} =~ /l2h|latex2html/i) { +- $newcfg{'SHLIBDIR'} = $newcfg{'PREFIX'}; +- } +- else { ++# if($newcfg{'PREFIX'} =~ /l2h|latex2html/i) { ++# $newcfg{'SHLIBDIR'} = $newcfg{'PREFIX'}; ++# } ++# else { + $newcfg{'SHLIBDIR'} = "$newcfg{'PREFIX'}${dd}share${dd}lib${dd}latex2html"; +- } ++# } + } + add_drive_letter($newcfg{'SHLIBDIR'}); + diff --git a/SOURCES/latex2html-2002-2-1-gsfont.patch b/SOURCES/latex2html-2002-2-1-gsfont.patch new file mode 100644 index 0000000..d098505 --- /dev/null +++ b/SOURCES/latex2html-2002-2-1-gsfont.patch @@ -0,0 +1,11 @@ +--- latex2html-2002-2-1/config/config.pl.gsfont 2002-09-28 07:15:01.000000000 +0200 ++++ latex2html-2002-2-1/config/config.pl 2005-03-16 10:50:17.392513136 +0100 +@@ -1176,7 +1176,7 @@ + push(@right_paths,L2hos->path2os($testpath)); + $gs_lib = 1; + } +- $testpath .= "${dd}fonts" unless($testpath =~ /\Q$dd\Efonts$/i); ++ $testpath .= "${dd}fonts" unless($testpath =~ /\Q$dd\Efonts/i); + if(!$gs_fonts && -d $testpath) { + push(@right_paths,L2hos->path2os($testpath)); + $gs_fonts = 1; diff --git a/SOURCES/latex2html-2002.2.1-grayimg.patch b/SOURCES/latex2html-2002.2.1-grayimg.patch new file mode 100644 index 0000000..329359d --- /dev/null +++ b/SOURCES/latex2html-2002.2.1-grayimg.patch @@ -0,0 +1,11 @@ +--- latex2html-2002-2-1/pstoimg.pin.grayimg 2005-05-04 11:20:46.000000000 +0200 ++++ latex2html-2002-2-1/pstoimg.pin 2005-06-21 14:54:30.899550448 +0200 +@@ -1021,7 +1021,7 @@ sub ps2pnm { + } + my $had_nonwhite; + if($opt{white}) { +- $had_nonwhite = ($ps =~ s/(\n\d+ \d+ bop gsave) \d*\.\d+ (TeXcolorgray clippath fill grestore)/$1 1 $2/s); ++ $had_nonwhite = ($ps =~ s/(\d+ \d+ bop gsave) \d*\.\d+ (TeXcolorgray clippath fill grestore)/$1 1 $2/s); + } + $ps_changed = $had_papersize || $had_nonwhite; + if($ps_changed) { diff --git a/SOURCES/latex2html-2K.1beta-DB.patch b/SOURCES/latex2html-2K.1beta-DB.patch new file mode 100644 index 0000000..1f1ef64 --- /dev/null +++ b/SOURCES/latex2html-2K.1beta-DB.patch @@ -0,0 +1,11 @@ +--- teTeX-1.0/latex2html-2K.1beta/config/config.pl.DB Wed Jan 16 13:08:34 2002 ++++ teTeX-1.0/latex2html-2K.1beta/config/config.pl Wed Jan 16 13:09:14 2002 +@@ -587,7 +587,7 @@ + + &checking('if perl supports some dbm'); + +-use DB_File; ++use DB; + my %array; + unless(eval {dbmopen(%array,'DBMtest',0755)}) { + my $err = $@ || 'dbmopen failed'; diff --git a/SOURCES/latex2html-2K.1beta-tabularx.patch b/SOURCES/latex2html-2K.1beta-tabularx.patch new file mode 100644 index 0000000..90ed3be --- /dev/null +++ b/SOURCES/latex2html-2K.1beta-tabularx.patch @@ -0,0 +1,26 @@ +--- latex2html-2K.1beta/versions/table.pl.tabularx Fri Nov 14 11:10:52 1997 ++++ latex2html-2K.1beta/versions/table.pl Wed Jan 24 15:11:01 2001 +@@ -121,6 +121,10 @@ + $htmlcolspec .= ""; + push(@colspec,"$cellopen=RIGHT NOWRAP>$content_mark$cellclose"); + $cols++; ++ } elsif ( $char eq "X" ) { ++ $htmlcolspec .= ""; ++ push(@colspec,"$cellopen=LEFT>$content_mark$cellclose"); ++ $cols++; + } elsif ( $char eq "p" ) { + $colspec =~ s/$next_pair_rx//; + ($pts,$len) = &convert_length($2); +@@ -170,7 +174,11 @@ + local($_) = @_; + s/$next_pair_rx//; + local($pts,$len) = &convert_length($2); +- &do_env_tabular($_," width=$pts"); ++ if ($pts != "") { ++ &do_env_tabular($_," width=$pts"); ++ } else { ++ &do_env_tabular($_); ++ } + } + + sub do_env_tabular { diff --git a/SOURCES/teTeX-l2h-config.patch b/SOURCES/teTeX-l2h-config.patch new file mode 100644 index 0000000..9d245eb --- /dev/null +++ b/SOURCES/teTeX-l2h-config.patch @@ -0,0 +1,10 @@ +--- teTeX-1.0/latex2html-2K.1beta/config/config.pl.orig Fri May 4 12:26:45 2001 ++++ teTeX-1.0/latex2html-2K.1beta/config/config.pl Fri May 4 12:27:11 2001 +@@ -566,6 +566,7 @@ + + &checking('if perl supports some dbm'); + ++use DB_File; + my %array; + unless(eval {dbmopen(%array,'DBMtest',0755)}) { + my $err = $@ || 'dbmopen failed'; diff --git a/SPECS/latex2html.spec b/SPECS/latex2html.spec new file mode 100644 index 0000000..1075cbd --- /dev/null +++ b/SPECS/latex2html.spec @@ -0,0 +1,321 @@ +%define enable_japanese 1 + +Summary: Converts LaTeX documents to HTML +Name: latex2html +Version: 2012 +Release: 3%{?dist} +License: GPLv2+ +Group: Applications/Publishing +URL: http://www.latex2html.org/ +# main latex2html source +Source0: http://mirrors.ctan.org/support/latex2html/%{name}-%{version}.tgz +Source1: cfgcache.pm +Source2: %{name}-manpages.tar.gz +# support for Japanese +Source3: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/current/data/l2h-2K8-jp20081220.tar.gz +Patch0: latex2html-2K.1beta-tabularx.patch +Patch1: teTeX-l2h-config.patch +Patch3: latex2html-2K.1beta-DB.patch +Patch4: latex2html-2002-2-1-SHLIB.patch +Patch5: latex2html-2002-2-1-gsfont.patch +Patch6: latex2html-2002.2.1-grayimg.patch +Requires: tex(latex), tex(dvips), tex(url.sty), netpbm-progs +BuildRequires: perl >= 5.003, ghostscript >= 4.03, netpbm-progs >= 9.21, tex(latex) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +%description +LATEX2HTML is a converter written in Perl that converts LATEX +documents to HTML. This way e.g. scientific papers - primarily typeset +for printing - can be put on the Web for online viewing. + +LATEX2HTML does also a good job in rapid web site deployment. These +pages are generated from a single LATEX source. + +%prep +%setup -q -n %{name}-%{version} -c -a 0 + +pushd %{name}-%{version} +# patch latex2html to support tabularx environments better +%patch0 -p1 -b .tabularx + +# Patch from Oliver Paukstadt +%patch1 -p2 -b .config + +# Fix latex2html not to use DB_File +%patch3 -p2 -b .db_file + +# fix SHLIBDIR +%patch4 -p1 -b .shlib + +# don't require the font directory to be ended with PATH/fonts +%patch5 -p1 -b .gsfont + +# remove all platforms we don't need +for i in Dos Mac OS2 Win32; do + rm -f L2hos/${i}.pm +done +rm -rf cweb2html +rm -f readme.hthtml +popd + +%if %{enable_japanese} +cp -a %{name}-%{version} %{name}-%{version}JA +pushd %{name}-%{version}JA +tar fxz %{SOURCE3} +popd +%endif + +pushd %{name}-%{version} +# don't generate gray images as output from latex2html +# it's patched here to let the .jp2 patch be cleanly applied +%patch6 -p1 -b .grayimg +popd + +%build +pushd %{name}-%{version} +cp %{SOURCE1} cfgcache.pm +tar fxz %{SOURCE2} + +./configure --program-prefix=%{?_program_prefix} \ + --prefix=%{_prefix} \ + --exec-prefix=%{_exec_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --sysconfdir=%{_sysconfdir} \ + --datadir=%{_datadir} \ + --includedir=%{_includedir} \ + --libdir=%{_datadir}/latex2html \ + --libexecdir=%{_libexecdir} \ + --localstatedir=%{_localstatedir} \ + --sharedstatedir=%{_sharedstatedir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --shlibdir=%{_datadir}/latex2html \ + --with-texpath=%{_datadir}/texmf/tex/latex/html + +perl -pi -e"s,/usr/(share/)?lib,%{_datadir}," cfgcache.pm +make +popd + +%if %{enable_japanese} +pushd %{name}-%{version}JA +sed s/latex2html/jlatex2html/g < %{SOURCE1} > cfgcache.pm +perl -pi -e"s,/usr/bin/dvips,/usr/bin/pdvips," cfgcache.pm +perl -pi -e"s,/usr/bin/latex,/usr/bin/platex," cfgcache.pm + +./configure --program-prefix=%{?_program_prefix} \ + --prefix=%{_prefix} \ + --exec-prefix=%{_exec_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --sysconfdir=%{_sysconfdir} \ + --datadir=%{_datadir} \ + --includedir=%{_includedir} \ + --libdir=%{_datadir}/jlatex2html \ + --libexecdir=%{_libexecdir} \ + --localstatedir=%{_localstatedir} \ + --sharedstatedir=%{_sharedstatedir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --shlibdir=%{_datadir}/jlatex2html \ + --with-texpath=%{_datadir}/texmf/tex/latex/html + +perl -pi -e"s,/usr/(share/)?lib,%{_datadir},; + s,%{_datadir}/latex2html,%{_datadir}/jlatex2html," cfgcache.pm +make +perl -pi -e"s,\\\${dd}pstoimg,\\\${dd}jpstoimg, ; + s,\\\${dd}texexpand,\\\${dd}jtexexpand," l2hconf.pm + +for i in latex2html pstoimg texexpand ; do + mv ${i} j${i} +done +popd +%endif + +%install +rm -rf %{buildroot} + +pushd %{name}-%{version} +perl -pi -e"s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm +perl -pi -e"s,/.*\\\${dd}texexpand,%{_bindir}/texexpand,; + s,/.*\\\${dd}pstoimg,%{_bindir}/pstoimg,; + s,/.*\\\${dd}*icons,\\\${LATEX2HTMLDIR}/icons,; + s,/.*\\\${dd}rgb.txt,\\\${LATEX2HTMLDIR}/styles/rgb.txt,; + s,/.*\\\${dd}styles\\\${dd}crayola.txt,\\\${LATEX2HTMLDIR}/styles/crayola.txt," latex2html +perl -pi -e"s,%{buildroot},," l2hconf.pm + +make install +rm -f %{buildroot}%{_datadir}/latex2html/versions/table.pl.orig +rm -rf %{buildroot}%{_datadir}/latex2html/docs/ +rm -rf %{buildroot}%{_datadir}/latex2html/example/ +perl -pi -e"s,%{buildroot},," %{buildroot}%{_datadir}/latex2html/cfgcache.pm +perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/pstoimg +perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/texexpand +perl -pi -e"s,%{buildroot},," cfgcache.pm +perl -pi -e"s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm +install -m0644 *.pm %{buildroot}%{_datadir}/latex2html +chmod +x %{buildroot}%{_datadir}/latex2html/makeseg/makeseg %{buildroot}%{_datadir}/latex2html/makemap + +# install man pages +mkdir -p %{buildroot}%{_mandir}/man1 +install -m0644 *.1 %{buildroot}%{_mandir}/man1 +popd + +%if %{enable_japanese} +pushd %{name}-%{version}JA +perl -pi -e"s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm +perl -pi -e"s,latex2html pstoimg texexpand,jlatex2html jpstoimg jtexexpand," config/install.pl +perl -pi -e"s,/.*\\\${dd}texexpand,%{_bindir}/jtexexpand,; + s,/.*\\\${dd}pstoimg,%{_bindir}/jpstoimg,; + s,/.*\\\${dd}icons,\\\${LATEX2HTMLDIR}/icons,; + s,/.*\\\${dd}styles\\\${dd}rgb.txt,\\\${LATEX2HTMLDIR}/styles/rgb.txt,; + s,/.*\\\${dd}styles\\\${dd}crayola.txt,\\\${LATEX2HTMLDIR}/styles/crayola.txt," jlatex2html +perl -pi -e"s,%{buildroot},," l2hconf.pm + +make install +rm -f %{buildroot}%{_datadir}/jlatex2html/versions/table.pl.orig +rm -rf %{buildroot}%{_datadir}/jlatex2html/docs/ +rm -rf %{buildroot}%{_datadir}/jlatex2html/example/ +perl -pi -e"s,%{buildroot},," %{buildroot}%{_datadir}/jlatex2html/cfgcache.pm +perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/jpstoimg +perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/jtexexpand +perl -pi -e"s,%{buildroot},," cfgcache.pm +perl -pi -e"s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm +install -m0644 *.pm %{buildroot}%{_datadir}/jlatex2html +chmod +x %{buildroot}%{_datadir}/jlatex2html/makeseg/makeseg %{buildroot}%{_datadir}/jlatex2html/makemap +popd +%endif + +for f in cweb2html/cweb2html makeseg/makeseg makemap ; do + perl -pi -e "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/latex2html/$f +%if %{enable_japanese} + perl -pi -e "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/jlatex2html/$f +%endif +done + +# do not clash with texlive, prefer url.sty from texlive instead +rm -f %{buildroot}%{_datadir}/texmf/tex/latex/html/url.sty + +%clean +rm -rf %{buildroot} + +%post +[ -x %{_bindir}/texconfig-sys ] && %{_bindir}/texconfig-sys rehash 2> /dev/null || : + +%postun +[ -x %{_bindir}/texconfig-sys ] && %{_bindir}/texconfig-sys rehash 2> /dev/null || : + +%files +%defattr(-,root,root,-) +%doc latex2html-%{version}/{LICENSE,LICENSE.orig,README,FAQ,BUGS,docs,example} +%{_bindir}/latex2html +%{_bindir}/pstoimg +%{_bindir}/texexpand +%dir %{_datadir}/latex2html +%{_datadir}/latex2html/* +%dir %{_datadir}/texmf/tex/latex/html +%{_datadir}/texmf/tex/latex/html/* + +%if %{enable_japanese} +%{_bindir}/jlatex2html +%{_bindir}/jpstoimg +%{_bindir}/jtexexpand +%dir %{_datadir}/jlatex2html +%{_datadir}/jlatex2html/* +%endif + +%{_mandir}/man1/latex2html.* +%{_mandir}/man1/texexpand.* +%{_mandir}/man1/pstoimg.* + +%changelog +* Fri Dec 27 2013 Daniel Mach - 2012-3 +- Mass rebuild 2013-12-27 + +* Tue Jan 29 2013 Jindrich Novy 2012-2 +- prefer url.sty from texlive (#904888) + +* Wed Nov 21 2012 Jindrich Novy 2012-1 +- update to latex2html 2012 +- update URL + +* Thu Nov 15 2012 Jindrich Novy 2008-8 +- BR: netpbm-progs to fix build + +* Thu Jul 19 2012 Fedora Release Engineering - 2008-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2008-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 2008-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Dec 11 2009 Jindrich Novy 2008-4 +- require netpbm-progs +- review fixes (#225980): + - include documentation + - set executable bit for makeseg and makemap scripts + - white-space spec correction + - move docs and example directory to %%doc + - nuke duplicated stuff + +* Fri Jul 24 2009 Fedora Release Engineering - 2008-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2008-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Jan 02 2009 Jindrich Novy 2008 +- update to latex2html-2008 +- license changed to GPL +- update japanese support to l2h-2K8-jp20081220 +- update cfgcache.pm +- fix BR + +* Mon Jan 07 2008 Jindrich Novy 2002.2.1-8 +- fix post/postun scriptlets + +* Wed Nov 29 2006 Jindrich Novy 2002.2.1-7 +- add dist tag, fix BuildRoot +- fix typo in description + +* Tue Jun 27 2006 Jindrich Novy 2002.2.1-6 +- remove .pdvips patch +- man pages are now stored in tar.gz +- rebuilt + +* Sun Jun 25 2006 Mamoru Tasaka +- fix BuildRequires to be rebuilt with mock (#191762) +- fix spec file scripts. +- update source files (use tar.gz with the date 20041025 and 2.1b1.6 Japanese patch) + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Nov 24 2005 Jindrich Novy 2002.2.1-5 +- fix path to rgb.txt, thanks to Ville Skyttä (#174089) + +* Tue Jun 21 2005 Jindrich Novy 2002.2.1-4 +- remove '\n' causing that pstoimg generates gray images + (#161186, #127010), solution from Julius Smith + +* Wed May 4 2005 Jindrich Novy 2002.2.1-3 +- add latex2html, texexpand, pstoimg man pages (#60308) + +* Tue May 3 2005 Jindrich Novy 2002.2.1-2 +- run texhash in the %%post and %%postun phase (#156660) + +* Fri Mar 15 2005 Jindrich Novy 2002.2.1-1 +- create backups for patches +- update Source1 +- BuildArchitectures -> BuildArch +- remove direct RPM_BUILD_ROOT links from l2hconf.pm +- fix bad interpreter name path in pstoimg, texexpand +- define --with-texpath explicitely +- remove Dos.pm, Mac.pm, OS2.pm, Win32.pm +- don't require the font directory to be ended with PATH/fonts + +* Wed Dec 15 2004 MATSUURA Takanori +- Initial build.