# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344600766 -7200 # Node ID 0838649dd3251c35ec86cd09ba7e6dd660fd62d4 # Parent bf3bcd187edf5447bd5796b70b80c87cf08b595b Import package vendor original specs for necessary manipulations. diff -r bf3bcd187edf -r 0838649dd325 tetex/tetex.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tetex/tetex.patch Fri Aug 10 14:12:46 2012 +0200 @@ -0,0 +1,116 @@ +Index: texk/gsftopk/gsftopk.c +diff -Nau texk/gsftopk/gsftopk.c.orig texk/gsftopk/gsftopk.c +--- texk/gsftopk/gsftopk.c.orig 2005-03-15 13:05:16.817449597 +0100 ++++ texk/gsftopk/gsftopk.c 2005-03-15 13:06:07.241499293 +0100 +@@ -417,7 +417,7 @@ + Boolean dosnames = False; + Boolean quiet = False; + +-struct option { ++struct option_loc { + const char *longname; + short shortname; + Boolean has_arg; +@@ -425,7 +425,7 @@ + int value; + }; + +-static const struct option options[] = { ++static const struct option_loc options[] = { + {"test", 't', False, &test, True}, + {"mapline", 0, True, &mapline, 0}, + {"mapfile", 0, True, &mapfile, 0}, +@@ -2099,8 +2099,8 @@ + + argp = argv; + while (++argp < argv + argc && (*argp)[0] == '-') { +- const struct option *opt_ptr; +- const struct option *opt; ++ const struct option_loc *opt_ptr; ++ const struct option_loc *opt; + char *arg = *argp + 1; + + if (*arg == '\0') --arg; /* this will flag an error later */ + +Index: texk/dvipsk/texc.script +--- texk/dvipsk/texc.script.orig 2005-09-25 22:05:56 +0200 ++++ texk/dvipsk/texc.script 2005-09-25 22:05:56 +0200 +@@ -4,9 +4,7 @@ + # To use it, say + # texc.script tex.lpro texc.lpro + # +-ed $1 <$2 + +Index: texk/web2c/omegafonts/pl.l +--- texk/web2c/omegafonts/pl.l.orig 2003-05-06 10:30:52 +0200 ++++ texk/web2c/omegafonts/pl.l 2007-12-22 12:11:05 +0100 +@@ -63,12 +63,6 @@ + + %} + +-/* For Solaris's lex, to increase tables sizes --RP */ +-/* Space before number keeps ancient flex happy. */ +-%e 4000 +-%p 7000 +-%n 1000 +- + ws [ \t]+ + hexnumber H{ws}[A-F0-9]+ + octnumber O{ws}[0-7]+ +Index: libs/ncurses/ncurses/tinfo/lib_baudrate.c +--- libs/ncurses/ncurses/tinfo/lib_baudrate.c.orig 2002-01-20 00:07:53 +0100 ++++ libs/ncurses/ncurses/tinfo/lib_baudrate.c 2010-01-08 10:40:05 +0100 +@@ -46,7 +46,7 @@ + * of the indices up to B115200 fit nicely in a 'short', allowing us to retain + * ospeed's type for compatibility. + */ +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #undef B0 + #undef B50 + #undef B75 +Index: libs/gd/gd_png.c +--- libs/gd/gd_png.c.orig 2004-10-28 20:09:52 +0200 ++++ libs/gd/gd_png.c 2010-01-08 10:57:27 +0100 +@@ -143,7 +143,7 @@ + /* first do a quick check that the file really is a PNG image; could + * have used slightly more general png_sig_cmp() function instead */ + gdGetBuf (sig, 8, infile); +- if (!png_check_sig (sig, 8)) ++ if (png_sig_cmp (sig, 0, 8) > 0) + return NULL; /* bad signature */ + + #ifndef PNG_SETJMP_NOT_SUPPORTED +Index: texk/dvipdfm/pngimage.c +--- texk/dvipdfm/pngimage.c.orig 2002-12-25 18:51:16 +0100 ++++ texk/dvipdfm/pngimage.c 2010-01-08 10:58:28 +0100 +@@ -42,7 +42,7 @@ + rewind (png_file); + if (fread (sigbytes, 1, sizeof(sigbytes), png_file) != + sizeof(sigbytes) || +- (!png_check_sig (sigbytes, sizeof(sigbytes)))) ++ (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)) > 0)) + return 0; + else + return 1; +Index: texk/dvipdfm/thumbnail.c +--- texk/dvipdfm/thumbnail.c.orig 2002-12-25 18:51:16 +0100 ++++ texk/dvipdfm/thumbnail.c 2010-01-08 10:58:39 +0100 +@@ -79,7 +79,7 @@ + } + if (fread (sigbytes, 1, sizeof(sigbytes), thumb_file) != + sizeof(sigbytes) || +- (!png_check_sig (sigbytes, sizeof(sigbytes)))) { ++ (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)) > 0)) { + fprintf (stderr, "\nThumbnail not a png file! Skipping\n"); + return NULL; + } diff -r bf3bcd187edf -r 0838649dd325 tetex/tetex.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tetex/tetex.spec Fri Aug 10 14:12:46 2012 +0200 @@ -0,0 +1,230 @@ +## +## tetex.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package versions +%define V_base 3.0 +%define V_src 3.0 +%define V_texmf 3.0 +%define V_xmltex 20020625 +%define V_passivetex 20031022 + +# package information +Name: tetex +Summary: The TeX Typesetting System +URL: http://tug.org/teTeX/ +Vendor: Thomas Esser et al. +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: BASE +Group: Typesetting +License: GPL +Version: %{V_src} +Release: 20120623 + +# list of sources +Source0: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-src-%{V_src}.tar.gz +Source1: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-texmf-%{V_texmf}.tar.gz +Source2: http://download.openpkg.org/components/versioned/tetex/passivetex-%{V_passivetex}.zip +Source3: http://download.openpkg.org/components/versioned/tetex/base-%{V_xmltex}.zip +Patch0: tetex.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, infozip, flex, bison +PreReq: OpenPKG, openpkg >= 20100101, perl +BuildPreReq: png, zlib +PreReq: png, zlib + +%description + teTeX is a complete TeX distribution for Unix compatible systems, + maintained by Thomas Esser. It is based on Karl Berry's original + Web2c distribution. TeX was invented by Donald E. Knuth, and the + most popular TeX macro set (LaTeX) for TeX was invented by Leslie + Lamport. The OpenPKG teTeX package also contains David Carlisle' + xmltex (namespace-aware XML parser written in TeX) and Sebastian + Rahtz' PassiveTeX (XSL-FO rendering engine). + +%track + prog tetex:tetex-src = { + version = %{V_src} + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/ + regex = ((\d+\.)+\d+) + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/ + regex = tetex-src-(__VER__)\.tar\.gz + } + prog tetex:tetex-texmf = { + version = %{V_texmf} + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/ + regex = ((\d+\.)+\d+) + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/ + regex = tetex-texmf-(__VER__)\.tar\.gz + } + +%prep + %setup -q -n tetex-src-%{V_src} + %patch -p0 + + # teTeX requires the texmf stuff to be already in place + # for building and installing the source parts. + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/texmf + %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\ + ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $? + + # add XMLTeX (XML parsing via TeX) + ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex + %{l_prefix}/bin/unzip -q -x %{SOURCE base-%{V_xmltex}.zip} + mv base xmltex + ) || exit $? + ( echo "" + echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]" + echo "xmltex latex language.dat xmltex.ini" + echo "pdfxmltex pdflatex language.dat pdfxmltex.ini" + echo "" + ) >>texk/web2c/fmtutil.in + ( echo "" + echo "% XMLTeX (XML parsing via TeX)" + echo "main_memory.xmltex = 2500000" + echo "main_memory.pdfxmltex = 2500000" + echo "param_size.xmltex = 1500" + echo "param_size.pdfxmltex = 1500" + echo "stack_size.xmltex = 1500" + echo "stack_size.pdfxmltex = 1500" + echo "hash_extra.xmltex = 50000" + echo "hash_extra.pdfxmltex = 50000" + echo "string_vacancies.xmltex = 45000" + echo "string_vacancies.pdfxmltex = 45000" + echo "pool_free.xmltex = 47500" + echo "pool_free.pdfxmltex = 47500" + echo "nest_size.xmltex = 500" + echo "nest_size.pdfxmltex = 500" + echo "save_size.xmltex = 10000" + echo "save_size.pdfxmltex = 10000" + echo "pool_size.xmltex = 500000" + echo "pool_size.pdfxmltex = 500000" + echo "max_strings.xmltex = 55000" + echo "max_strings.pdfxmltex = 55000" + echo "buf_size.xmltex = 200000" + echo "buf_size.pdfxmltex = 200000" + echo "" + ) >>texk/kpathsea/texmf.in + + # add PassiveTeX (XSL-FO to DVI/PDF translation via TeX) + ( %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex + cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex + %{l_prefix}/bin/unzip -q -x %{SOURCE passivetex-%{V_passivetex}.zip} + rm -f ChangeLog Makefile README.passivetex send + rm -rf test + ) || exit $? + + # minor fixes to the teTeX sources + %{l_shtool} subst \ + -e '1s;/usr/bin/perl;/usr/bin/env perl;' \ + texk/*/t1mapper + %{l_shtool} subst \ + -e "s;\(\$(scriptdir)/fmtutil-sys --all\);\1 --fmtdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c;" \ + -e "s,\(\$(scriptdir)/updmap-sys\);,\1 --dvipsoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap --pdftexoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap --dvipdfmoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap;," \ + Makefile.in + +%build + # configure the system by using the (wrong) paths to the temporary + # installation area, followed by by a step for fixing the paths + # (to the correct values) inside the kpathsea library (which + # performs the run-time searches). This way we get all the magic + # of the teTeX build system without problems, but still make sure + # that the built-in paths are correct. + %{l_shtool} subst -s -v \ + -e 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \ + texk/make/paths.mk + CC="%{l_cc}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LEX="%{l_prefix}/bin/flex" \ + ./configure \ + --prefix=$RPM_BUILD_ROOT%{l_prefix} \ + --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \ + --without-xdvik \ + --without-oxdvik \ + --without-x \ + --without-x11 \ + --without-x11win \ + --without-texinfo \ + --disable-multiplatform \ + --enable-gf \ + --with-system-pnglib \ + --with-pnglib-libdir=%{l_prefix}/lib \ + --with-pnglib-include=%{l_prefix}/include \ + --with-system-zlib \ + --with-zlib-libdir=%{l_prefix}/lib \ + --with-zlib-include=%{l_prefix}/include + ( cd texk/kpathsea + %{l_shtool} subst -v \ + -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \ + `find . -type f -print` + eval "make all" + ) || exit $? + + # build the sources + # (we cannot use %{l_make}, because teTeX dislikes absolute paths + # for make. Instead we work-around via $PATH. The redundant + # "eval" around the call is just to shut-up speclint) + eval "make all" + +%install + # reinstall teTeX texmf stuff + # (because RPM 5 implicitly removes $RPM_BUILD_ROOT at begin of %install) + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/share/texmf + %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\ + ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $? + + # perform the standard installation procdure of teTeX + # (we cannot use %{l_make}, because teTeX dislikes absolute paths + # for make. Instead we work-around via $PATH. The redundant + # "eval" around the call is just to shut-up speclint) + eval "make install" + + # create dynamically generated font directory + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/var/tetex + %{l_shtool} mkdir -f -p -m 777 \ + $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts + + # cleanup the installation + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/share/texmf/dvipdfm/config/config' \ + '%config %{l_prefix}/share/texmf/dvips/config/config.ps' \ + '%config %{l_prefix}/share/texmf/metafont/misc/modes.mf' \ + '%config %{l_prefix}/share/texmf/web2c/mktex.cnf' + +%files -f files + +%clean +