Author: randy
Date: 2011-01-04 13:30:48 -0700 (Tue, 04 Jan 2011)
New Revision: 2266

Added:
   trunk/tetex/tetex-3.0-gcc_4.4-1.patch
   trunk/tetex/tetex-3.0-glibc-1.patch
Log:
Added patches to allow TeTeX to build against modern toolchains

Added: trunk/tetex/tetex-3.0-gcc_4.4-1.patch
===================================================================
--- trunk/tetex/tetex-3.0-gcc_4.4-1.patch                               (rev 0)
+++ trunk/tetex/tetex-3.0-gcc_4.4-1.patch       2011-01-04 20:30:48 UTC (rev 
2266)
@@ -0,0 +1,29 @@
+Submitted By: Michael (rabenkind at selfservix dot org)
+Date: 2009-09-01
+Initial Package Version: 3.0
+Origin: Myself
+Upstream Status: Unknown
+Description: Fix compilation with gcc-4.4.1
+
+--- tetex-src-3.0/texk/web2c/cpascal.h.orig    2009-09-01 18:04:18.000000000 
+0200
++++ tetex-src-3.0/texk/web2c/cpascal.h 2009-09-01 17:54:12.000000000 +0200
+@@ -15,6 +15,8 @@
+ /* We must include this first, to resolve many C issues.  */
+ #include "config.h"
+ 
++#define getline pascal_getline
++
+ /* We only use getopt in the applications, not in web2c itself.  */
+ #include <kpathsea/getopt.h>
+ 
+--- tetex-src-3.0/texk/dvipsk/afm2tfm.c.orig   2009-09-01 18:07:35.000000000 
+0200
++++ tetex-src-3.0/texk/dvipsk/afm2tfm.c        2009-09-01 18:00:33.000000000 
+0200
+@@ -40,6 +40,8 @@
+ #endif
+ #endif /* KPATHSEA */
+ 
++#define getline pascal_getline
++
+ /* JLH: added these to make the code easier to read and remove some
+    ascii<->ebcdic dependencies */
+ #define ASCII_A 65

Added: trunk/tetex/tetex-3.0-glibc-1.patch
===================================================================
--- trunk/tetex/tetex-3.0-glibc-1.patch                         (rev 0)
+++ trunk/tetex/tetex-3.0-glibc-1.patch 2011-01-04 20:30:48 UTC (rev 2266)
@@ -0,0 +1,64 @@
+Submitted By: Guy Dalziel <gdalziel at linuxfromscratch dot org>
+Date: 2009-08-07
+Initial Package Version: 3.0 
+Upstream Status: unknown
+Origin: http://lists.ibiblio.org/pipermail/sm-commit/2009-July/024831.html
+Description: Fixes function conflicts with Glibc.
+
+diff -Naur tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c 
tetex-src-3.0/texk/dvipsk/afm2tfm.c
+--- tetex-src-3.0-orig/texk/dvipsk/afm2tfm.c   2009-08-07 13:49:35.579146458 
+0100
++++ tetex-src-3.0/texk/dvipsk/afm2tfm.c        2009-08-07 13:51:26.599146404 
+0100
+@@ -257,7 +257,7 @@
+ }
+ 
+ int
+-getline P1H(void) {
++afm_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_getline()) {
+       switch(interest(paramstring())) {
+ case FontName:
+          fontname = paramnewstring() ;
+@@ -1882,7 +1882,7 @@
+ 
+    while (1) {
+       while (param == 0 || *param == 0) {
+-         if (getline() == 0)
++         if (afm_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_getline()) {
+          for (p=buffer; *p; p++)
+             if (*p == '%') {
+                if (ignoreligkern == 0)
+diff -Naur tetex-src-3.0-orig/texk/web2c/cpascal.h 
tetex-src-3.0/texk/web2c/cpascal.h
+--- tetex-src-3.0-orig/texk/web2c/cpascal.h    2009-08-07 13:49:35.580142559 
+0100
++++ tetex-src-3.0/texk/web2c/cpascal.h 2009-08-07 13:50:34.401146251 +0100
+@@ -240,7 +240,12 @@
+ #undef getname
+ #define getname vms_getname
+ #endif
+-
++
++#ifdef getline
++#undef getline
++#endif
++#define getline tex_getline
++
+ /* Declarations for the routines we provide ourselves in lib/.  */
+ 
+ extern string basenamechangesuffix 
P3H(const_string,const_string,const_string);
+

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to