diff options
Diffstat (limited to 'source/t/tetex')
-rwxr-xr-x | source/t/tetex/tetex.SlackBuild | 30 | ||||
-rw-r--r-- | source/t/tetex/tetex.afm2tfm.getline.diff | 38 | ||||
-rw-r--r-- | source/t/tetex/tetex.cpascal.getline.posix.2008.diff | 17 | ||||
-rw-r--r-- | source/t/tetex/tetex.leet.diff | 25 | ||||
-rw-r--r-- | source/t/tetex/tetex.png14.diff | 33 |
5 files changed, 140 insertions, 3 deletions
diff --git a/source/t/tetex/tetex.SlackBuild b/source/t/tetex/tetex.SlackBuild index f1927332..e813490d 100755 --- a/source/t/tetex/tetex.SlackBuild +++ b/source/t/tetex/tetex.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,9 +22,19 @@ VERSION=3.0 -ARCH=${ARCH:-x86_64} +BUILD=${BUILD:-8} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-6} CWD=$(pwd) TMP=${TMP:-/tmp} @@ -35,6 +45,8 @@ elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi # There were so many local security problems with this shared fontcache @@ -58,6 +70,8 @@ mkdir -p /usr/share/texmf tar xvf $CWD/tetex-texmf-$VERSION.tar.xz chown -R root:root . find . -type f -perm 666 -exec chmod 644 {} \; + # Change the sell-by date: + zcat $CWD/tetex.leet.diff.gz | patch -p1 --verbose || exit 1 ) cd $TMP rm -rf tetex-src-$VERSION @@ -91,6 +105,16 @@ zcat $CWD/tetex.amstex.fmtutil.diff.gz | patch -p1 --verbose || exit 1 # Don't leave texconfig junk in $TMP: zcat $CWD/tetex.tmp.cleanup.diff.gz | patch -p1 --verbose || exit 1 +# Fix the cpascal header so there's no conflict with getline() in the +# generated C code: +zcat $CWD/tetex.cpascal.getline.posix.2008.diff.gz | patch -p1 --verbose || exit 1 + +# Patch for libpng-1.4.0: +zcat $CWD/tetex.png14.diff.gz | patch -p1 --verbose || exit 1 + +# Another problem caused by getline() in glibc: +zcat $CWD/tetex.afm2tfm.getline.diff.gz | patch -p1 --verbose || exit 1 + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr/share/texmf \ diff --git a/source/t/tetex/tetex.afm2tfm.getline.diff b/source/t/tetex/tetex.afm2tfm.getline.diff new file mode 100644 index 00000000..8406aa89 --- /dev/null +++ b/source/t/tetex/tetex.afm2tfm.getline.diff @@ -0,0 +1,38 @@ +--- ./texk/dvipsk/afm2tfm.c.orig 2005-01-30 07:17:09.000000000 -0600 ++++ ./texk/dvipsk/afm2tfm.c 2010-02-19 11:56:12.000000000 -0600 +@@ -257,7 +257,7 @@ + } + + int +-getline P1H(void) { ++afm_int_getline P1H(void) { + register char *p ; + register int c ; + +@@ -606,7 +606,7 @@ + ai = newchar() ; + ai->adobenum = -1 ; + ai->adobename = "||" ; /* boundary character name */ +- while (getline()) { ++ while (afm_int_getline()) { + switch(interest(paramstring())) { + case FontName: + fontname = paramnewstring() ; +@@ -1882,7 +1882,7 @@ + + while (1) { + while (param == 0 || *param == 0) { +- if (getline() == 0) ++ if (afm_int_getline() == 0) + error("! premature end in encoding file") ; + for (p=buffer; *p; p++) + if (*p == '%') { +@@ -1973,7 +1973,7 @@ + p = gettoken() ; + if (strcmp(p, "]")) + error("! token 258 in encoding must be make-array (])") ; +- while (getline()) { ++ while (afm_int_getline()) { + for (p=buffer; *p; p++) + if (*p == '%') { + if (ignoreligkern == 0) diff --git a/source/t/tetex/tetex.cpascal.getline.posix.2008.diff b/source/t/tetex/tetex.cpascal.getline.posix.2008.diff new file mode 100644 index 00000000..879adc44 --- /dev/null +++ b/source/t/tetex/tetex.cpascal.getline.posix.2008.diff @@ -0,0 +1,17 @@ +--- ./texk/web2c/cpascal.h.orig 2004-08-28 15:49:59.000000000 -0500 ++++ ./texk/web2c/cpascal.h 2010-02-19 11:27:04.000000000 -0600 +@@ -241,6 +241,14 @@ + #define getname vms_getname + #endif + ++/* Apparently POSIX 2008 has getline and glibc 2.9.90 exports it. ++ tangle, weave, et al. use that symbol; try to define it away so ++ something that a standard won't usurp. */ ++#ifdef getline ++#undef getline ++#endif ++#define getline web2c_getline ++ + /* Declarations for the routines we provide ourselves in lib/. */ + + extern string basenamechangesuffix P3H(const_string,const_string,const_string); diff --git a/source/t/tetex/tetex.leet.diff b/source/t/tetex/tetex.leet.diff new file mode 100644 index 00000000..fe251893 --- /dev/null +++ b/source/t/tetex/tetex.leet.diff @@ -0,0 +1,25 @@ +--- ./tex/latex/base/latex.ltx.orig 2004-03-13 20:19:52.000000000 -0600 ++++ ./tex/latex/base/latex.ltx 2010-05-17 12:59:23.000000000 -0500 +@@ -525,11 +525,11 @@ + \advance\count@\month + \advance\count@-#2\relax} + \expandafter\reserved@a\fmtversion\@nil +-\ifnum\count@>65 ++\ifnum\count@>16044 + \typeout{^^J% + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J% + ! You are attempting to make a LaTeX format from a source file^^J% +-! That is more than five years old.^^J% ++! That is more than 1337 years old.^^J% + !^^J% + ! If you enter <return> to scroll past this message then the format^^J% + ! will be built, but please consider obtaining newer source files^^J% +@@ -537,7 +537,7 @@ + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J% + } + \errhelp{To avoid this error message, obtain new LaTeX sources.} +- \errmessage{LaTeX source files more than 5 years old!} ++ \errmessage{LaTeX source files more than 1337 years old!} + \fi + \let\reserved@a\relax + \fi diff --git a/source/t/tetex/tetex.png14.diff b/source/t/tetex/tetex.png14.diff new file mode 100644 index 00000000..4f6548ac --- /dev/null +++ b/source/t/tetex/tetex.png14.diff @@ -0,0 +1,33 @@ +--- ./texk/dvipdfm/pngimage.c.orig 2002-12-25 11:51:16.000000000 -0600 ++++ ./texk/dvipdfm/pngimage.c 2010-02-19 11:43:18.000000000 -0600 +@@ -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; +--- ./texk/dvipdfm/thumbnail.c.orig 2002-12-25 11:51:16.000000000 -0600 ++++ ./texk/dvipdfm/thumbnail.c 2010-02-19 11:42:41.000000000 -0600 +@@ -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; + } +--- ./libs/gd/gd_png.c.orig 2004-10-28 13:09:52.000000000 -0500 ++++ ./libs/gd/gd_png.c 2010-02-19 11:52:06.000000000 -0600 +@@ -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 |