Import package vendor original specs for necessary manipulations.

Fri, 10 Aug 2012 14:12:46 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 10 Aug 2012 14:12:46 +0200
changeset 505
0838649dd325
parent 504
bf3bcd187edf
child 506
ed99728b62ad

Import package vendor original specs for necessary manipulations.

tetex/tetex.patch file | annotate | diff | comparison | revisions
tetex/tetex.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tetex/tetex.patch	Fri Aug 10 14:12:46 2012 +0200
     1.3 @@ -0,0 +1,116 @@
     1.4 +Index: texk/gsftopk/gsftopk.c
     1.5 +diff -Nau texk/gsftopk/gsftopk.c.orig texk/gsftopk/gsftopk.c
     1.6 +--- texk/gsftopk/gsftopk.c.orig	2005-03-15 13:05:16.817449597 +0100
     1.7 ++++ texk/gsftopk/gsftopk.c	2005-03-15 13:06:07.241499293 +0100
     1.8 +@@ -417,7 +417,7 @@
     1.9 + Boolean		dosnames	= False;
    1.10 + Boolean		quiet		= False;
    1.11 + 
    1.12 +-struct option {
    1.13 ++struct option_loc {
    1.14 + 	const char	*longname;
    1.15 + 	short		shortname;
    1.16 + 	Boolean		has_arg;
    1.17 +@@ -425,7 +425,7 @@
    1.18 + 	int		value;
    1.19 + };
    1.20 + 
    1.21 +-static	const struct option	options[]	= {
    1.22 ++static	const struct option_loc	options[]	= {
    1.23 + 		{"test",	't',	False,	&test,	True},
    1.24 + 		{"mapline",	0,	True,	&mapline, 0},
    1.25 + 		{"mapfile",	0,	True,	&mapfile, 0},
    1.26 +@@ -2099,8 +2099,8 @@
    1.27 + 
    1.28 + 	argp = argv;
    1.29 + 	while (++argp < argv + argc && (*argp)[0] == '-') {
    1.30 +-	    const struct option *opt_ptr;
    1.31 +-	    const struct option *opt;
    1.32 ++	    const struct option_loc *opt_ptr;
    1.33 ++	    const struct option_loc *opt;
    1.34 + 	    char *arg = *argp + 1;
    1.35 + 
    1.36 + 	    if (*arg == '\0') --arg;	/* this will flag an error later */
    1.37 +
    1.38 +Index: texk/dvipsk/texc.script
    1.39 +--- texk/dvipsk/texc.script.orig	2005-09-25 22:05:56 +0200
    1.40 ++++ texk/dvipsk/texc.script	2005-09-25 22:05:56 +0200
    1.41 +@@ -4,9 +4,7 @@
    1.42 + # To use it, say
    1.43 + #       texc.script tex.lpro texc.lpro
    1.44 + #
    1.45 +-ed $1 <<edscriptend
    1.46 +-/% begin code for uncompressed fonts only/d
    1.47 +-.,/% end code for uncompressed fonts only/d
    1.48 +-.,/% end of code for unpacking compressed fonts/s/% //
    1.49 +-w $2
    1.50 +-edscriptend
    1.51 ++sed <$1 \
    1.52 ++-e '/% end code for uncompressed fonts only/,/% end of code for unpacking compressed fonts/s/% //' \
    1.53 ++-e '/% begin code for uncompressed fonts only/,/end code for uncompressed fonts only/d' \
    1.54 ++>$2
    1.55 +
    1.56 +Index: texk/web2c/omegafonts/pl.l
    1.57 +--- texk/web2c/omegafonts/pl.l.orig	2003-05-06 10:30:52 +0200
    1.58 ++++ texk/web2c/omegafonts/pl.l	2007-12-22 12:11:05 +0100
    1.59 +@@ -63,12 +63,6 @@
    1.60 + 
    1.61 + %}
    1.62 + 
    1.63 +-/* For Solaris's lex, to increase tables sizes --RP */
    1.64 +-/* Space before number keeps ancient flex happy. */
    1.65 +-%e 4000
    1.66 +-%p 7000
    1.67 +-%n 1000
    1.68 +-
    1.69 + ws		[ \t]+
    1.70 + hexnumber       H{ws}[A-F0-9]+
    1.71 + octnumber       O{ws}[0-7]+
    1.72 +Index: libs/ncurses/ncurses/tinfo/lib_baudrate.c
    1.73 +--- libs/ncurses/ncurses/tinfo/lib_baudrate.c.orig	2002-01-20 00:07:53 +0100
    1.74 ++++ libs/ncurses/ncurses/tinfo/lib_baudrate.c	2010-01-08 10:40:05 +0100
    1.75 +@@ -46,7 +46,7 @@
    1.76 +  * of the indices up to B115200 fit nicely in a 'short', allowing us to retain
    1.77 +  * ospeed's type for compatibility.
    1.78 +  */
    1.79 +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
    1.80 ++#if defined(__NetBSD__) || defined(__OpenBSD__)
    1.81 + #undef B0
    1.82 + #undef B50
    1.83 + #undef B75
    1.84 +Index: libs/gd/gd_png.c
    1.85 +--- libs/gd/gd_png.c.orig	2004-10-28 20:09:52 +0200
    1.86 ++++ libs/gd/gd_png.c	2010-01-08 10:57:27 +0100
    1.87 +@@ -143,7 +143,7 @@
    1.88 +   /* first do a quick check that the file really is a PNG image; could
    1.89 +    * have used slightly more general png_sig_cmp() function instead */
    1.90 +   gdGetBuf (sig, 8, infile);
    1.91 +-  if (!png_check_sig (sig, 8))
    1.92 ++  if (png_sig_cmp (sig, 0, 8) > 0)
    1.93 +     return NULL;		/* bad signature */
    1.94 + 
    1.95 + #ifndef PNG_SETJMP_NOT_SUPPORTED
    1.96 +Index: texk/dvipdfm/pngimage.c
    1.97 +--- texk/dvipdfm/pngimage.c.orig	2002-12-25 18:51:16 +0100
    1.98 ++++ texk/dvipdfm/pngimage.c	2010-01-08 10:58:28 +0100
    1.99 +@@ -42,7 +42,7 @@
   1.100 +   rewind (png_file);
   1.101 +   if (fread (sigbytes, 1, sizeof(sigbytes), png_file) !=
   1.102 +       sizeof(sigbytes) ||
   1.103 +-      (!png_check_sig (sigbytes, sizeof(sigbytes))))
   1.104 ++      (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)) > 0))
   1.105 +     return 0;
   1.106 +   else
   1.107 +     return 1;
   1.108 +Index: texk/dvipdfm/thumbnail.c
   1.109 +--- texk/dvipdfm/thumbnail.c.orig	2002-12-25 18:51:16 +0100
   1.110 ++++ texk/dvipdfm/thumbnail.c	2010-01-08 10:58:39 +0100
   1.111 +@@ -79,7 +79,7 @@
   1.112 +   }
   1.113 +   if (fread (sigbytes, 1, sizeof(sigbytes), thumb_file) !=
   1.114 +       sizeof(sigbytes) ||
   1.115 +-      (!png_check_sig (sigbytes, sizeof(sigbytes)))) {
   1.116 ++      (png_sig_cmp (sigbytes, 0, sizeof(sigbytes)) > 0)) {
   1.117 +     fprintf (stderr, "\nThumbnail not a png file! Skipping\n");
   1.118 +     return NULL;
   1.119 +   }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tetex/tetex.spec	Fri Aug 10 14:12:46 2012 +0200
     2.3 @@ -0,0 +1,230 @@
     2.4 +##
     2.5 +##  tetex.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package versions
    2.28 +%define       V_base       3.0
    2.29 +%define       V_src        3.0
    2.30 +%define       V_texmf      3.0
    2.31 +%define       V_xmltex     20020625
    2.32 +%define       V_passivetex 20031022
    2.33 +
    2.34 +#   package information
    2.35 +Name:         tetex
    2.36 +Summary:      The TeX Typesetting System
    2.37 +URL:          http://tug.org/teTeX/
    2.38 +Vendor:       Thomas Esser et al.
    2.39 +Packager:     OpenPKG Foundation e.V.
    2.40 +Distribution: OpenPKG Community
    2.41 +Class:        BASE
    2.42 +Group:        Typesetting
    2.43 +License:      GPL
    2.44 +Version:      %{V_src}
    2.45 +Release:      20120623
    2.46 +
    2.47 +#   list of sources
    2.48 +Source0:      ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-src-%{V_src}.tar.gz
    2.49 +Source1:      ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-texmf-%{V_texmf}.tar.gz
    2.50 +Source2:      http://download.openpkg.org/components/versioned/tetex/passivetex-%{V_passivetex}.zip
    2.51 +Source3:      http://download.openpkg.org/components/versioned/tetex/base-%{V_xmltex}.zip
    2.52 +Patch0:       tetex.patch
    2.53 +
    2.54 +#   build information
    2.55 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, infozip, flex, bison
    2.56 +PreReq:       OpenPKG, openpkg >= 20100101, perl
    2.57 +BuildPreReq:  png, zlib
    2.58 +PreReq:       png, zlib
    2.59 +
    2.60 +%description
    2.61 +    teTeX is a complete TeX distribution for Unix compatible systems,
    2.62 +    maintained by Thomas Esser. It is based on Karl Berry's original
    2.63 +    Web2c distribution. TeX was invented by Donald E. Knuth, and the
    2.64 +    most popular TeX macro set (LaTeX) for TeX was invented by Leslie
    2.65 +    Lamport. The OpenPKG teTeX package also contains David Carlisle'
    2.66 +    xmltex (namespace-aware XML parser written in TeX) and Sebastian
    2.67 +    Rahtz' PassiveTeX (XSL-FO rendering engine).
    2.68 +
    2.69 +%track
    2.70 +    prog tetex:tetex-src = {
    2.71 +        version   = %{V_src}
    2.72 +        url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
    2.73 +        regex     = ((\d+\.)+\d+)
    2.74 +        url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
    2.75 +        regex     = tetex-src-(__VER__)\.tar\.gz
    2.76 +    }
    2.77 +    prog tetex:tetex-texmf = {
    2.78 +        version   = %{V_texmf}
    2.79 +        url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
    2.80 +        regex     = ((\d+\.)+\d+)
    2.81 +        url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
    2.82 +        regex     = tetex-texmf-(__VER__)\.tar\.gz
    2.83 +    }
    2.84 +
    2.85 +%prep
    2.86 +    %setup -q -n tetex-src-%{V_src}
    2.87 +    %patch -p0
    2.88 +
    2.89 +    #   teTeX requires the texmf stuff to be already in place
    2.90 +    #   for building and installing the source parts.
    2.91 +    %{l_shtool} mkdir -f -p -m 755 \
    2.92 +        $RPM_BUILD_ROOT%{l_prefix}/share/texmf
    2.93 +    %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
    2.94 +        ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
    2.95 +
    2.96 +    #   add XMLTeX (XML parsing via TeX)
    2.97 +    ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex
    2.98 +      %{l_prefix}/bin/unzip -q -x %{SOURCE base-%{V_xmltex}.zip}
    2.99 +      mv base xmltex
   2.100 +    ) || exit $?
   2.101 +    ( echo ""
   2.102 +      echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]"
   2.103 +      echo "xmltex    latex    language.dat xmltex.ini"
   2.104 +      echo "pdfxmltex pdflatex language.dat pdfxmltex.ini"
   2.105 +      echo ""
   2.106 +    ) >>texk/web2c/fmtutil.in
   2.107 +    ( echo ""
   2.108 +      echo "% XMLTeX (XML parsing via TeX)"
   2.109 +      echo "main_memory.xmltex = 2500000"
   2.110 +      echo "main_memory.pdfxmltex = 2500000"
   2.111 +      echo "param_size.xmltex = 1500"
   2.112 +      echo "param_size.pdfxmltex = 1500"
   2.113 +      echo "stack_size.xmltex = 1500"
   2.114 +      echo "stack_size.pdfxmltex = 1500"
   2.115 +      echo "hash_extra.xmltex = 50000"
   2.116 +      echo "hash_extra.pdfxmltex = 50000"
   2.117 +      echo "string_vacancies.xmltex = 45000"
   2.118 +      echo "string_vacancies.pdfxmltex = 45000"
   2.119 +      echo "pool_free.xmltex = 47500"
   2.120 +      echo "pool_free.pdfxmltex = 47500"
   2.121 +      echo "nest_size.xmltex = 500"
   2.122 +      echo "nest_size.pdfxmltex = 500"
   2.123 +      echo "save_size.xmltex = 10000"
   2.124 +      echo "save_size.pdfxmltex = 10000"
   2.125 +      echo "pool_size.xmltex = 500000"
   2.126 +      echo "pool_size.pdfxmltex = 500000"
   2.127 +      echo "max_strings.xmltex = 55000"
   2.128 +      echo "max_strings.pdfxmltex = 55000"
   2.129 +      echo "buf_size.xmltex = 200000"
   2.130 +      echo "buf_size.pdfxmltex = 200000"
   2.131 +      echo ""
   2.132 +    ) >>texk/kpathsea/texmf.in
   2.133 +
   2.134 +    #   add PassiveTeX (XSL-FO to DVI/PDF translation via TeX)
   2.135 +    ( %{l_shtool} mkdir -f -p -m 755 \
   2.136 +         $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
   2.137 +      cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
   2.138 +      %{l_prefix}/bin/unzip -q -x %{SOURCE passivetex-%{V_passivetex}.zip}
   2.139 +      rm -f ChangeLog Makefile README.passivetex send
   2.140 +      rm -rf test
   2.141 +    ) || exit $?
   2.142 +
   2.143 +    #   minor fixes to the teTeX sources
   2.144 +    %{l_shtool} subst \
   2.145 +        -e '1s;/usr/bin/perl;/usr/bin/env perl;' \
   2.146 +        texk/*/t1mapper
   2.147 +    %{l_shtool} subst \
   2.148 +        -e "s;\(\$(scriptdir)/fmtutil-sys --all\);\1 --fmtdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c;" \
   2.149 +        -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;," \
   2.150 +        Makefile.in
   2.151 +
   2.152 +%build
   2.153 +    #   configure the system by using the (wrong) paths to the temporary
   2.154 +    #   installation area, followed by by a step for fixing the paths
   2.155 +    #   (to the correct values) inside the kpathsea library (which
   2.156 +    #   performs the run-time searches). This way we get all the magic
   2.157 +    #   of the teTeX build system without problems, but still make sure
   2.158 +    #   that the built-in paths are correct.
   2.159 +    %{l_shtool} subst -s -v \
   2.160 +        -e 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \
   2.161 +        texk/make/paths.mk
   2.162 +    CC="%{l_cc}" \
   2.163 +    CXX="%{l_cxx}" \
   2.164 +    CFLAGS="%{l_cflags -O}" \
   2.165 +    CXXFLAGS="%{l_cxxflags -O}" \
   2.166 +    CPPFLAGS="%{l_cppflags}" \
   2.167 +    LEX="%{l_prefix}/bin/flex" \
   2.168 +    ./configure \
   2.169 +        --prefix=$RPM_BUILD_ROOT%{l_prefix} \
   2.170 +        --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \
   2.171 +        --without-xdvik \
   2.172 +        --without-oxdvik \
   2.173 +        --without-x \
   2.174 +        --without-x11 \
   2.175 +        --without-x11win \
   2.176 +        --without-texinfo \
   2.177 +        --disable-multiplatform \
   2.178 +        --enable-gf \
   2.179 +        --with-system-pnglib \
   2.180 +        --with-pnglib-libdir=%{l_prefix}/lib \
   2.181 +        --with-pnglib-include=%{l_prefix}/include \
   2.182 +        --with-system-zlib \
   2.183 +        --with-zlib-libdir=%{l_prefix}/lib \
   2.184 +        --with-zlib-include=%{l_prefix}/include
   2.185 +    ( cd texk/kpathsea
   2.186 +      %{l_shtool} subst -v \
   2.187 +          -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \
   2.188 +          `find . -type f -print`
   2.189 +      eval "make all"
   2.190 +    ) || exit $?
   2.191 +
   2.192 +    #   build the sources
   2.193 +    #   (we cannot use %{l_make}, because teTeX dislikes absolute paths
   2.194 +    #   for make. Instead we work-around via $PATH. The redundant
   2.195 +    #   "eval" around the call is just to shut-up speclint)
   2.196 +    eval "make all"
   2.197 +
   2.198 +%install
   2.199 +    #   reinstall teTeX texmf stuff
   2.200 +    #   (because RPM 5 implicitly removes $RPM_BUILD_ROOT at begin of %install)
   2.201 +    %{l_shtool} mkdir -f -p -m 755 \
   2.202 +        $RPM_BUILD_ROOT%{l_prefix}/share/texmf
   2.203 +    %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
   2.204 +        ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
   2.205 +
   2.206 +    #   perform the standard installation procdure of teTeX
   2.207 +    #   (we cannot use %{l_make}, because teTeX dislikes absolute paths
   2.208 +    #   for make. Instead we work-around via $PATH. The redundant
   2.209 +    #   "eval" around the call is just to shut-up speclint)
   2.210 +    eval "make install"
   2.211 +
   2.212 +    #   create dynamically generated font directory
   2.213 +    %{l_shtool} mkdir -f -p -m 755 \
   2.214 +        $RPM_BUILD_ROOT%{l_prefix}/var/tetex
   2.215 +    %{l_shtool} mkdir -f -p -m 777 \
   2.216 +        $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts
   2.217 +
   2.218 +    #   cleanup the installation
   2.219 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   2.220 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.221 +
   2.222 +    #   determine installation files
   2.223 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   2.224 +        %{l_files_std} \
   2.225 +        '%config %{l_prefix}/share/texmf/dvipdfm/config/config' \
   2.226 +        '%config %{l_prefix}/share/texmf/dvips/config/config.ps' \
   2.227 +        '%config %{l_prefix}/share/texmf/metafont/misc/modes.mf' \
   2.228 +        '%config %{l_prefix}/share/texmf/web2c/mktex.cnf'
   2.229 +
   2.230 +%files -f files
   2.231 +
   2.232 +%clean
   2.233 +

mercurial