tetex/tetex.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 515
2f4b17c140a1
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  tetex.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package versions
    25 %define       V_base       3.0
    26 %define       V_src        3.0
    27 %define       V_texmf      3.0
    28 %define       V_xmltex     20020625
    29 %define       V_passivetex 20031022
    31 #   package information
    32 Name:         tetex
    33 Summary:      The TeX Typesetting System
    34 URL:          http://tug.org/teTeX/
    35 Vendor:       Thomas Esser et al.
    36 Packager:     OpenPKG Foundation e.V.
    37 Distribution: OpenPKG Community
    38 Class:        BASE
    39 Group:        Typesetting
    40 License:      GPL
    41 Version:      %{V_src}
    42 Release:      20120800
    44 #   list of sources
    45 Source0:      ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-src-%{V_src}.tar.gz
    46 Source1:      ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-texmf-%{V_texmf}.tar.gz
    47 Source2:      http://download.openpkg.org/components/versioned/tetex/passivetex-%{V_passivetex}.zip
    48 Source3:      http://download.openpkg.org/components/versioned/tetex/base-%{V_xmltex}.zip
    49 Patch0:       tetex.patch
    51 #   build information
    52 BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, infozip, flex, bison
    53 PreReq:       OpenPKG, openpkg >= 20100101, perl
    54 BuildPreReq:  png, zlib
    55 PreReq:       png, zlib
    57 %description
    58     teTeX is a complete TeX distribution for Unix compatible systems,
    59     maintained by Thomas Esser. It is based on Karl Berry's original
    60     Web2c distribution. TeX was invented by Donald E. Knuth, and the
    61     most popular TeX macro set (LaTeX) for TeX was invented by Leslie
    62     Lamport. The OpenPKG teTeX package also contains David Carlisle'
    63     xmltex (namespace-aware XML parser written in TeX) and Sebastian
    64     Rahtz' PassiveTeX (XSL-FO rendering engine).
    66 %track
    67     prog tetex:tetex-src = {
    68         version   = %{V_src}
    69         url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
    70         regex     = ((\d+\.)+\d+)
    71         url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
    72         regex     = tetex-src-(__VER__)\.tar\.gz
    73     }
    74     prog tetex:tetex-texmf = {
    75         version   = %{V_texmf}
    76         url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
    77         regex     = ((\d+\.)+\d+)
    78         url       = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
    79         regex     = tetex-texmf-(__VER__)\.tar\.gz
    80     }
    82 %prep
    83     %setup -q -n tetex-src-%{V_src}
    84     %patch -p0
    86     #   teTeX requires the texmf stuff to be already in place
    87     #   for building and installing the source parts.
    88     %{l_shtool} mkdir -f -p -m 755 \
    89         $RPM_BUILD_ROOT%{l_prefix}/share/texmf
    90     %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
    91         ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
    93     #   add XMLTeX (XML parsing via TeX)
    94     ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex
    95       %{l_prefix}/bin/unzip -q -x %{SOURCE base-%{V_xmltex}.zip}
    96       mv base xmltex
    97     ) || exit $?
    98     ( echo ""
    99       echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]"
   100       echo "xmltex    latex    language.dat xmltex.ini"
   101       echo "pdfxmltex pdflatex language.dat pdfxmltex.ini"
   102       echo ""
   103     ) >>texk/web2c/fmtutil.in
   104     ( echo ""
   105       echo "% XMLTeX (XML parsing via TeX)"
   106       echo "main_memory.xmltex = 2500000"
   107       echo "main_memory.pdfxmltex = 2500000"
   108       echo "param_size.xmltex = 1500"
   109       echo "param_size.pdfxmltex = 1500"
   110       echo "stack_size.xmltex = 1500"
   111       echo "stack_size.pdfxmltex = 1500"
   112       echo "hash_extra.xmltex = 50000"
   113       echo "hash_extra.pdfxmltex = 50000"
   114       echo "string_vacancies.xmltex = 45000"
   115       echo "string_vacancies.pdfxmltex = 45000"
   116       echo "pool_free.xmltex = 47500"
   117       echo "pool_free.pdfxmltex = 47500"
   118       echo "nest_size.xmltex = 500"
   119       echo "nest_size.pdfxmltex = 500"
   120       echo "save_size.xmltex = 10000"
   121       echo "save_size.pdfxmltex = 10000"
   122       echo "pool_size.xmltex = 500000"
   123       echo "pool_size.pdfxmltex = 500000"
   124       echo "max_strings.xmltex = 55000"
   125       echo "max_strings.pdfxmltex = 55000"
   126       echo "buf_size.xmltex = 200000"
   127       echo "buf_size.pdfxmltex = 200000"
   128       echo ""
   129     ) >>texk/kpathsea/texmf.in
   131     #   add PassiveTeX (XSL-FO to DVI/PDF translation via TeX)
   132     ( %{l_shtool} mkdir -f -p -m 755 \
   133          $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
   134       cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
   135       %{l_prefix}/bin/unzip -q -x %{SOURCE passivetex-%{V_passivetex}.zip}
   136       rm -f ChangeLog Makefile README.passivetex send
   137       rm -rf test
   138     ) || exit $?
   140     #   minor fixes to the teTeX sources
   141     %{l_shtool} subst \
   142         -e '1s;/usr/bin/perl;/usr/bin/env perl;' \
   143         texk/*/t1mapper
   144     %{l_shtool} subst \
   145         -e "s;\(\$(scriptdir)/fmtutil-sys --all\);\1 --fmtdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c;" \
   146         -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;," \
   147         Makefile.in
   149 %build
   150     #   configure the system by using the (wrong) paths to the temporary
   151     #   installation area, followed by by a step for fixing the paths
   152     #   (to the correct values) inside the kpathsea library (which
   153     #   performs the runtime searches). This way we get all the magic
   154     #   of the teTeX build system without problems, but still make sure
   155     #   that the builtin paths are correct.
   156     %{l_shtool} subst -s -v \
   157         -e 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \
   158         texk/make/paths.mk
   159     CC="%{l_cc}" \
   160     CXX="%{l_cxx}" \
   161     CFLAGS="%{l_cflags -O}" \
   162     CXXFLAGS="%{l_cxxflags -O}" \
   163     CPPFLAGS="%{l_cppflags}" \
   164     LEX="%{l_prefix}/bin/flex" \
   165     ./configure \
   166         --prefix=$RPM_BUILD_ROOT%{l_prefix} \
   167         --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \
   168         --without-xdvik \
   169         --without-oxdvik \
   170         --without-x \
   171         --without-x11 \
   172         --without-x11win \
   173         --without-texinfo \
   174         --disable-multiplatform \
   175         --enable-gf \
   176         --with-system-pnglib \
   177         --with-pnglib-libdir=%{l_prefix}/lib \
   178         --with-pnglib-include=%{l_prefix}/include \
   179         --with-system-zlib \
   180         --with-zlib-libdir=%{l_prefix}/lib \
   181         --with-zlib-include=%{l_prefix}/include
   182     ( cd texk/kpathsea
   183       %{l_shtool} subst -v \
   184           -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \
   185           `find . -type f -print`
   186       eval "make all"
   187     ) || exit $?
   189     #   build the sources
   190     #   (we cannot use %{l_make}, because teTeX dislikes absolute paths
   191     #   for make. Instead we work around via $PATH. The redundant
   192     #   "eval" around the call is just to shut up speclint)
   193     eval "make all"
   195 %install
   196     #   reinstall teTeX texmf stuff
   197     #   (because RPM 5 implicitly removes $RPM_BUILD_ROOT at begin of %install)
   198     %{l_shtool} mkdir -f -p -m 755 \
   199         $RPM_BUILD_ROOT%{l_prefix}/share/texmf
   200     %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
   201         ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
   203     #   perform the standard installation procdure of teTeX
   204     #   (we cannot use %{l_make}, because teTeX dislikes absolute paths
   205     #   for make. Instead we work around via $PATH. The redundant
   206     #   "eval" around the call is just to shut up speclint)
   207     eval "make install"
   209     #   create dynamically generated font directory
   210     %{l_shtool} mkdir -f -p -m 755 \
   211         $RPM_BUILD_ROOT%{l_prefix}/var/tetex
   212     %{l_shtool} mkdir -f -p -m 777 \
   213         $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts
   215     #   cleanup the installation
   216     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   217     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   219     #   determine installation files
   220     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   221         %{l_files_std} \
   222         '%config %{l_prefix}/share/texmf/dvipdfm/config/config' \
   223         '%config %{l_prefix}/share/texmf/dvips/config/config.ps' \
   224         '%config %{l_prefix}/share/texmf/metafont/misc/modes.mf' \
   225         '%config %{l_prefix}/share/texmf/web2c/mktex.cnf'
   227 %files -f files
   229 %clean

mercurial