diff options
author | dholland <dholland> | 2012-12-24 01:50:57 +0000 |
---|---|---|
committer | dholland <dholland> | 2012-12-24 01:50:57 +0000 |
commit | e37a117f0182baf8833866d50db2082b8482698a (patch) | |
tree | dcd0e8852c499a77432e0b3c81f168124fe734aa /print | |
parent | 32a2a50135ea99587d36f830b0c5b11cb2afb213 (diff) | |
download | pkgsrc-e37a117f0182baf8833866d50db2082b8482698a.tar.gz |
Fix LP64 problems and patch up some other stuff that appeared while
doing so.
Diffstat (limited to 'print')
-rw-r--r-- | print/bibtool/Makefile | 3 | ||||
-rw-r--r-- | print/bibtool/distinfo | 6 | ||||
-rw-r--r-- | print/bibtool/patches/patch-configure | 17 | ||||
-rw-r--r-- | print/bibtool/patches/patch-main.c | 19 | ||||
-rw-r--r-- | print/bibtool/patches/patch-parse.c | 23 | ||||
-rw-r--r-- | print/bibtool/patches/patch-regex-0.12_regex.c | 67 |
6 files changed, 133 insertions, 2 deletions
diff --git a/print/bibtool/Makefile b/print/bibtool/Makefile index 58e1248f769..f2c4f4c9a5f 100644 --- a/print/bibtool/Makefile +++ b/print/bibtool/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2012/12/24 00:56:19 dholland Exp $ +# $NetBSD: Makefile,v 1.12 2012/12/24 01:50:57 dholland Exp $ DISTNAME= BibTool-2.48 +PKGREVISION= 1 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_TEX_CTAN:=biblio/bibtex/utils/bibtool/} diff --git a/print/bibtool/distinfo b/print/bibtool/distinfo index ce04ad77d52..9c11f23224b 100644 --- a/print/bibtool/distinfo +++ b/print/bibtool/distinfo @@ -1,7 +1,11 @@ -$NetBSD: distinfo,v 1.1.1.1 2006/03/31 03:11:56 smb Exp $ +$NetBSD: distinfo,v 1.2 2012/12/24 01:50:57 dholland Exp $ SHA1 (BibTool-2.48.tar.gz) = ed4d20823be38f4b90179613049a3be83dc51ab2 RMD160 (BibTool-2.48.tar.gz) = 7928faf26316ec1e014a4f8234f9510a32d0e6b9 Size (BibTool-2.48.tar.gz) = 634267 bytes SHA1 (patch-aa) = c145084288db91c4fc32ecc45c4205c9ee0a5ff3 SHA1 (patch-ab) = a57258c20dea53c924f4ecafcb9881db2ac9ee93 +SHA1 (patch-configure) = 6762349941de9086711fe9ec988f4f5784dd5d65 +SHA1 (patch-main.c) = 26fa84025ae93002ae73d42d78f52640d713f705 +SHA1 (patch-parse.c) = 5e9371428c4fe8324703ed97bff0283d03f6d441 +SHA1 (patch-regex-0.12_regex.c) = ebffe11aec2c1ff40b4f4c41c3b9342c9426ea7a diff --git a/print/bibtool/patches/patch-configure b/print/bibtool/patches/patch-configure new file mode 100644 index 00000000000..82ebd15e815 --- /dev/null +++ b/print/bibtool/patches/patch-configure @@ -0,0 +1,17 @@ +$NetBSD: patch-configure,v 1.1 2012/12/24 01:50:57 dholland Exp $ + +Disable a highly obsolete configure test that exercises undefined +behavior. + +--- configure~ 2012-12-24 01:44:27.000000000 +0000 ++++ configure +@@ -2789,7 +2789,8 @@ fi + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ # disabled 20121222, IRIX 4 is long dead and this test exercises UB. ++ if true; then + : + else + cat >conftest.$ac_ext <<_ACEOF diff --git a/print/bibtool/patches/patch-main.c b/print/bibtool/patches/patch-main.c new file mode 100644 index 00000000000..a436dd8fa17 --- /dev/null +++ b/print/bibtool/patches/patch-main.c @@ -0,0 +1,19 @@ +$NetBSD: patch-main.c,v 1.1 2012/12/24 01:50:57 dholland Exp $ + +Remove wrong casts. + +--- main.c~ 2004-02-08 09:41:38.000000000 +0000 ++++ main.c +@@ -789,10 +789,10 @@ static int update_crossref(db,rec) / + /* */ + t = *++hp; t++; /* */ + (void)sp_open(t); /* Try to extract */ +- if ( (s = SParseSymbol(&t)) == (Uchar)NULL ) /* the crossref as symbol*/ ++ if ( (s = SParseSymbol(&t)) == NULL ) /* the crossref as symbol*/ + { return 0; } /* */ + /* */ +- if ( (s = db_new_key(db,s)) == (Uchar)NULL ) /* */ ++ if ( (s = db_new_key(db,s)) == NULL ) /* */ + { ERROR2("Crossref not found: ",(char*)s); /* */ + return 0; /* */ + } /* */ diff --git a/print/bibtool/patches/patch-parse.c b/print/bibtool/patches/patch-parse.c new file mode 100644 index 00000000000..4f6aaff9e4c --- /dev/null +++ b/print/bibtool/patches/patch-parse.c @@ -0,0 +1,23 @@ +$NetBSD: patch-parse.c,v 1.1 2012/12/24 01:50:58 dholland Exp $ + +Fix bug handling EOF, detected by gcc. + +--- parse.c~ 2004-02-08 09:41:45.000000000 +0000 ++++ parse.c +@@ -533,13 +533,15 @@ static void parse_number() /* + static int parse_string(quotep) /* */ + int quotep; /* */ + { Uchar c; /* */ ++ int c1; /* */ + int left; /* */ + int start_flno = flno; /* */ + /* */ + left = 0; /* */ + if ( quotep ) (void)sbputchar('"',parse_sb); /*" */ + do /* */ +- { switch ( c=skip_nl() ) /* */ ++ { c=c1=skip_nl(); /* */ ++ switch ( c1 ) /* */ + { case EOF: /* */ + UnterminatedError("Unterminated double quote", + start_flno); diff --git a/print/bibtool/patches/patch-regex-0.12_regex.c b/print/bibtool/patches/patch-regex-0.12_regex.c new file mode 100644 index 00000000000..c5982004756 --- /dev/null +++ b/print/bibtool/patches/patch-regex-0.12_regex.c @@ -0,0 +1,67 @@ +$NetBSD: patch-regex-0.12_regex.c,v 1.1 2012/12/24 01:50:58 dholland Exp $ + +Use the right config.h. This package misuses autoconf fairly +extensively, and has its own config.h with its own config in it where +where autoconf packages would normally put autoconf's output config.h. + +Also patch up some integer/pointer casts. + +--- regex-0.12/regex.c.orig 2000-12-16 09:49:55.000000000 +0000 ++++ regex-0.12/regex.c +@@ -30,7 +30,7 @@ + #include <sys/types.h> + + #ifdef HAVE_CONFIG_H +-#include "config.h" ++#include "bibtool/config.h" + #endif + + /* The `emacs' switch turns on certain matching commands +@@ -65,9 +65,12 @@ + + #ifdef STDC_HEADERS + #include <stdlib.h> ++#include <stdint.h> + #else + char *malloc (); + char *realloc (); ++typedef long intptr_t; ++typedef unsigned long uintptr_t; + #endif + + +@@ -2404,10 +2407,10 @@ typedef struct + } \ + \ + DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ +- PUSH_FAILURE_ITEM (lowest_active_reg); \ ++ PUSH_FAILURE_ITEM ((uintptr_t)lowest_active_reg); \ + \ + DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ +- PUSH_FAILURE_ITEM (highest_active_reg); \ ++ PUSH_FAILURE_ITEM ((uintptr_t)highest_active_reg); \ + \ + DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ + DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ +@@ -2492,10 +2495,10 @@ typedef struct + DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ + \ + /* Restore register info. */ \ +- high_reg = (unsigned) POP_FAILURE_ITEM (); \ ++ high_reg = (unsigned)(uintptr_t) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ + \ +- low_reg = (unsigned) POP_FAILURE_ITEM (); \ ++ low_reg = (unsigned)(uintptr_t) POP_FAILURE_ITEM (); \ + DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ + \ + for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ +@@ -3762,7 +3765,7 @@ re_match_2 (bufp, string1, size1, string + regstart[r] = old_regstart[r]; + + /* xx why this test? */ +- if ((int) old_regend[r] >= (int) regstart[r]) ++ if ((intptr_t) old_regend[r] >= (intptr_t) regstart[r]) + regend[r] = old_regend[r]; + } + } |