From c8189c00cb2ce8c23c72aaeb2dd86efe18764ee3 Mon Sep 17 00:00:00 2001 From: kili Date: Sat, 9 Dec 2006 18:28:53 +0000 Subject: [PATCH] Update to 5.8.7. Fix regression tests and a use after realloc. ok jasper@ --- devel/autogen/Makefile | 12 +++---- devel/autogen/distinfo | 8 ++--- devel/autogen/patches/patch-agen5_defLoad_c | 31 +++++++++++++++++++ .../patches/patch-agen5_test_error_test | 15 +++++++++ .../patches/patch-autoopts_test_enums_test | 17 ++++++++++ devel/autogen/pkg/PLIST | 25 ++++++++++++--- 6 files changed, 94 insertions(+), 14 deletions(-) create mode 100644 devel/autogen/patches/patch-agen5_defLoad_c create mode 100644 devel/autogen/patches/patch-agen5_test_error_test create mode 100644 devel/autogen/patches/patch-autoopts_test_enums_test diff --git a/devel/autogen/Makefile b/devel/autogen/Makefile index aeadf924a73..d0c240de259 100644 --- a/devel/autogen/Makefile +++ b/devel/autogen/Makefile @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile,v 1.5 2006/10/28 11:19:20 espie Exp $ +# $OpenBSD: Makefile,v 1.6 2006/12/09 18:28:53 kili Exp $ COMMENT='automatic text creation from templates' CATEGORIES=devel -DISTNAME= autogen-5.6.5 -PKGNAME= ${DISTNAME}p1 -SHARED_LIBS += opts 23.1 # .23.1 -SHARED_LIBS += guileopts 0.1 # .0.1 +DISTNAME= autogen-5.8.7 +SHARED_LIBS += opts 27.5 # .27.5 +SHARED_LIBS += guileopts 1.0 # .0.1 +HOMEPAGE=http://autogen.sourceforge.net/ MASTER_SITES=${MASTER_SITE_SOURCEFORGE:=autogen/} # GPL @@ -18,7 +18,7 @@ PERMIT_DISTFILES_CDROM=Yes MODULES= converters/libiconv WANTLIB= c m z -LIB_DEPENDS= guile,guile-ltdl::lang/guile \ +LIB_DEPENDS= guile::lang/guile \ xml2::textproc/libxml CONFIGURE_STYLE=gnu CONFIGURE_ARGS= --without-libregex \ diff --git a/devel/autogen/distinfo b/devel/autogen/distinfo index c5c83470a19..3cc1fd6686d 100644 --- a/devel/autogen/distinfo +++ b/devel/autogen/distinfo @@ -1,4 +1,4 @@ -MD5 (autogen-5.6.5.tar.gz) = 54a6cb0be7e6b526af9aba4a73013885 -RMD160 (autogen-5.6.5.tar.gz) = 3ea4dc2cf5df7d90de8e7bdde44f4ab58cd96809 -SHA1 (autogen-5.6.5.tar.gz) = 99292675ab68aa0dfde26db7923c6eee052933ce -SIZE (autogen-5.6.5.tar.gz) = 1144260 +MD5 (autogen-5.8.7.tar.gz) = 53cf8e525d32cc5ac457e54e2327ea32 +RMD160 (autogen-5.8.7.tar.gz) = 52c07b37c0ae9e82d91261568390a6b924e0f445 +SHA1 (autogen-5.8.7.tar.gz) = 92e1a2e7f9782849062f7bca3b126d6a71ec26a4 +SIZE (autogen-5.8.7.tar.gz) = 1279984 diff --git a/devel/autogen/patches/patch-agen5_defLoad_c b/devel/autogen/patches/patch-agen5_defLoad_c new file mode 100644 index 00000000000..5ea55a9d5f2 --- /dev/null +++ b/devel/autogen/patches/patch-agen5_defLoad_c @@ -0,0 +1,31 @@ +$OpenBSD: patch-agen5_defLoad_c,v 1.1 2006/12/09 18:28:53 kili Exp $ + +# Fix use after realloc. + +--- agen5/defLoad.c.orig Sun Sep 24 04:58:59 2006 ++++ agen5/defLoad.c Sun Nov 19 18:30:20 2006 +@@ -418,6 +418,7 @@ readDefines( void ) + */ + if (sizeLeft == 0) { + tScanCtx* p; ++ char *oldPzData; + + /* + * IF it is a regular file, then we are done +@@ -430,6 +431,7 @@ readDefines( void ) + * Try to reallocate our input buffer. + */ + dataSize += (sizeLeft = 0x1000); ++ oldPzData = pBaseCtx->pzData; + p = (tScanCtx*)AGREALOC( (void*)pBaseCtx, + dataSize+4+sizeof( *pBaseCtx ), + "expanded file buffer" ); +@@ -442,7 +444,7 @@ readDefines( void ) + if (p != pBaseCtx) { + p->pzScan = \ + p->pzData = (char*)(p+1); +- pzData = p->pzData + (pzData - pBaseCtx->pzData); ++ pzData = p->pzData + (pzData - oldPzData); + pBaseCtx = p; + } + } diff --git a/devel/autogen/patches/patch-agen5_test_error_test b/devel/autogen/patches/patch-agen5_test_error_test new file mode 100644 index 00000000000..855c6950e03 --- /dev/null +++ b/devel/autogen/patches/patch-agen5_test_error_test @@ -0,0 +1,15 @@ +$OpenBSD: patch-agen5_test_error_test,v 1.1 2006/12/09 18:28:53 kili Exp $ + +# Cope with the additional abort message (don't panic -- this test +# intentionally checks abort behaviour). + +--- agen5/test/error.test.orig Sun Sep 24 04:11:15 2006 ++++ agen5/test/error.test Fri Nov 17 20:15:03 2006 +@@ -103,6 +103,7 @@ AutoGen aborting on signal + processing template error2.tpl + on line 2 + for function EXPR (11) ++Abort trap (core dumped) + _EOF_ + + sed '/THIS TEXT/,/ESAC/d;s,this is never seen,<= `die testing death` =>,' \ diff --git a/devel/autogen/patches/patch-autoopts_test_enums_test b/devel/autogen/patches/patch-autoopts_test_enums_test new file mode 100644 index 00000000000..ddfc6d9de42 --- /dev/null +++ b/devel/autogen/patches/patch-autoopts_test_enums_test @@ -0,0 +1,17 @@ +$OpenBSD: patch-autoopts_test_enums_test,v 1.1 2006/12/09 18:28:53 kili Exp $ + +# There are some strange shells in the wild, but not on OpenBSD. +# Removing the tab from the closing line isn't an option since this +# would be unethical. + +--- autoopts/test/enums.test.orig Sat Sep 23 03:45:13 2006 ++++ autoopts/test/enums.test Fri Nov 17 20:04:44 2006 +@@ -190,7 +190,7 @@ cat > ${testname}.tpl <<- \__EOF + } + __EOF + +-cat >> ${testname}.tpl <<__EOF ++cat >> ${testname}.tpl <<- __EOF + int + main( int argc, char** argv ) + { diff --git a/devel/autogen/pkg/PLIST b/devel/autogen/pkg/PLIST index be42ca109e7..ad71719e069 100644 --- a/devel/autogen/pkg/PLIST +++ b/devel/autogen/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.2 2006/08/04 16:31:00 espie Exp $ +@comment $OpenBSD: PLIST,v 1.3 2006/12/09 18:28:53 kili Exp $ %%SHARED%% bin/autogen bin/autoopts-config @@ -6,8 +6,9 @@ bin/columns bin/getdefs bin/xml2ag include/autogen/ -include/autogen/options.h -include/autogen/usage-txt.h +include/autogen/autoopts/ +include/autogen/autoopts/options.h +include/autogen/autoopts/usage-txt.h lib/libguileopts.a lib/libguileopts.la lib/libopts.a @@ -19,18 +20,34 @@ lib/pkgconfig/autoopts.pc @man man/man1/columns.1 @man man/man1/getdefs.1 @man man/man1/xml2ag.1 +@man man/man3/ao_string_tokenize.3 +@man man/man3/configFileLoad.3 +@man man/man3/optionFileLoad.3 +@man man/man3/optionFindNextValue.3 +@man man/man3/optionFindValue.3 @man man/man3/optionFree.3 +@man man/man3/optionGetValue.3 @man man/man3/optionLoadLine.3 +@man man/man3/optionNextValue.3 +@man man/man3/optionOnlyUsage.3 @man man/man3/optionProcess.3 @man man/man3/optionRestore.3 @man man/man3/optionSaveFile.3 @man man/man3/optionSaveState.3 +@man man/man3/optionUnloadNested.3 @man man/man3/optionVersion.3 +@man man/man3/strequate.3 +@man man/man3/streqvcmp.3 +@man man/man3/streqvmap.3 +@man man/man3/strneqvcmp.3 +@man man/man3/strtransform.3 share/aclocal/ share/aclocal/autoopts.m4 +share/aclocal/liboptschk.m4 share/autogen/ share/autogen/aginfo.tpl share/autogen/aginfo3.tpl +share/autogen/agman-lib.tpl share/autogen/agman1.tpl share/autogen/agman3.tpl share/autogen/autoopts.m4 @@ -40,7 +57,7 @@ share/autogen/fsm-macro.tpl share/autogen/fsm-trans.tpl share/autogen/fsm.tpl share/autogen/getopt.tpl -share/autogen/libopts-23.1.14.tar.gz +share/autogen/libopts-27.5.3.tar.gz share/autogen/optcode.tpl share/autogen/opthead.tpl share/autogen/options.tpl