# HG changeset patch # User Michael Schloh von Bennewitz # Date 1231281910 -3600 # Node ID 01c515740aeb845349200ec032b56c871647e8d5 # Parent 0b0ffb65d7058d9aaafbb5d629b7e76d96a8d82a Include well tested and long contributed C++ version logic as a patch. diff -r 0b0ffb65d705 -r 01c515740aeb shtool/shtool.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shtool/shtool.patch Tue Jan 06 23:45:10 2009 +0100 @@ -0,0 +1,132 @@ +diff -Nau ChangeLog.orig ChangeLog +--- ChangeLog.orig 2008-07-18 09:57:29.000000000 +0200 ++++ ChangeLog 2009-01-06 01:29:18.000000000 +0100 +@@ -114,6 +114,9 @@ + + Changes between 2.0.1 and 2.0.2 (11-Aug-2004 to 15-Jun-2005): + ++ *) Added ISO C++ language output to "shtool version". ++ [Michael Schloh von Bennewitz ] ++ + *) Fix insecure temporary file handling (CAN-2005-1751, CAN-2005-1759). + [Eric Romang , Ralf S. Engelschall] + +diff -Nau RATIONAL.orig RATIONAL +--- RATIONAL.orig 2008-04-02 22:10:17.000000000 +0200 ++++ RATIONAL 2009-01-06 01:30:19.000000000 +0100 +@@ -6,8 +6,8 @@ + + GNU shtool -- The GNU Portable Shell Tool + +- RATIONAL +- ======== ++ RATIONALE ++ ========= + + The Context + +diff -Nau sh.version.orig sh.version +--- sh.version.orig 2008-04-02 22:10:17.000000000 +0200 ++++ sh.version 2009-01-06 01:32:32.000000000 +0100 +@@ -211,7 +211,7 @@ + ;; + c ) + echo >>$file "/*" +- echo >>$file "** ${file} -- Version Information for ${name} (syntax: C/C++)" ++ echo >>$file "** ${file} -- Version Information for ${name} (syntax: C)" + echo >>$file "** [automatically generated and maintained by GNU shtool]" + echo >>$file "*/" + echo >>$file "" +@@ -257,6 +257,65 @@ + echo >>$file "#endif /* _${filestr}_AS_HEADER_ */" + echo >>$file "" + ;; ++ cxx ) ++ echo >>$file "//" ++ echo >>$file "// ${file} -- Version Information for ${name} (syntax: ISO C++)" ++ echo >>$file "// [automatically generated and maintained by GNU shtool]" ++ echo >>$file "//" ++ echo >>$file "" ++ echo >>$file "#ifdef _${filestr}_AS_HEADER_" ++ echo >>$file "" ++ echo >>$file "#ifndef _${filestr}_" ++ echo >>$file "#define _${filestr}_" ++ echo >>$file "" ++ echo >>$file "#define ${prefixupper}VERSION ${vHex}" ++ echo >>$file "" ++ echo >>$file "typedef class ${prefix}version_class {" ++ echo >>$file "private:" ++ echo >>$file " const int v_hex;" ++ echo >>$file " const char *v_short;" ++ echo >>$file " const char *v_long;" ++ echo >>$file " const char *v_tex;" ++ echo >>$file " const char *v_gnu;" ++ echo >>$file " const char *v_web;" ++ echo >>$file " const char *v_sccs;" ++ echo >>$file " const char *v_rcs;" ++ echo >>$file "public:" ++ echo >>$file " ${prefix}version_class(void) : \\" ++ echo >>$file " v_hex(${vHex}), \\" ++ echo >>$file " v_short(\"${vShort}\"), \\" ++ echo >>$file " v_long(\"${vLong}\"), \\" ++ echo >>$file " v_tex(\"${vTeX}\"), \\" ++ echo >>$file " v_gnu(\"${vGNU}\"), \\" ++ echo >>$file " v_web(\"${vWeb}\"), \\" ++ echo >>$file " v_sccs(\"${vSCCS}\"), \\" ++ echo >>$file " v_rcs(\"${vRCS}\") \\" ++ echo >>$file " {}" ++ echo >>$file " const int getHex(void) {return (v_hex);};" ++ echo >>$file " const char *getShort(void) {return (v_short);};" ++ echo >>$file " const char *getLong(void) {return (v_long);};" ++ echo >>$file " const char *getTex(void) {return (v_tex);};" ++ echo >>$file " const char *getGnu(void) {return (v_gnu);};" ++ echo >>$file " const char *getWeb(void) {return (v_web);};" ++ echo >>$file " const char *getSccs(void) {return (v_sccs);};" ++ echo >>$file " const char *getRcs(void) {return (v_rcs);};" ++ echo >>$file "} ${prefix}version_t;" ++ echo >>$file "" ++ echo >>$file "extern ${prefix}version_t ${prefix}version;" ++ echo >>$file "" ++ echo >>$file "#endif // _${filestr}_" ++ echo >>$file "" ++ echo >>$file "#else // _${filestr}_AS_HEADER_" ++ echo >>$file "" ++ echo >>$file "#define _${filestr}_AS_HEADER_" ++ echo >>$file "#include \"${file}\"" ++ echo >>$file "#undef _${filestr}_AS_HEADER_" ++ echo >>$file "" ++ echo >>$file "${prefix}version_t ${prefix}version;" ++ echo >>$file "" ++ echo >>$file "#endif // _${filestr}_AS_HEADER_" ++ echo >>$file "" ++ ;; + m4 ) + echo >>$file "##" + echo >>$file "## ${file} -- Version Information for ${name} (syntax: M4)" +@@ -367,9 +426,9 @@ + + =item B<-l>, B<--language> I + +-Choose format of version file I. I="C", ANSI C +-(I="c"), M4 (I="m4"), Perl (I="perl") or Python +-(I="python"). Default is C. ++Choose format of version file I. I="C", ISO C ++(I="c"), ISO C++ (I="cxx"), M4 (I="m4"), Perl ++(I="perl") or Python (I="python"). Default is C. + + =item B<-n>, B<--name> I + +diff -Nau shtool.pod.orig shtool.pod +--- shtool.pod.orig 2008-04-02 22:10:17.000000000 +0200 ++++ shtool.pod 2009-01-06 01:32:54.000000000 +0100 +@@ -161,8 +161,8 @@ + + =item B + +-Maintain a version information file in either Text, C/C++, Perl or Python. +-format. ++Maintain a version information file in either Text, C, C++, M4, Perl or ++Python. + + =item B + diff -r 0b0ffb65d705 -r 01c515740aeb shtool/shtool.spec --- a/shtool/shtool.spec Tue Jan 06 23:43:55 2009 +0100 +++ b/shtool/shtool.spec Tue Jan 06 23:45:10 2009 +0100 @@ -1,6 +1,7 @@ ## ## shtool.spec -- OpenPKG RPM Package Specification -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. +## Copyright (c) 2000-2005 OpenPKG Foundation e.V. +## Copyright (c) 2000-2005 Ralf S. Engelschall ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that @@ -26,19 +27,20 @@ Summary: GNU Portable Shell Tool URL: http://www.gnu.org/software/shtool/ Vendor: Ralf S. Engelschall -Packager: OpenPKG Foundation e.V. -Distribution: OpenPKG Community +Packager: OpenPKG +Distribution: OpenPKG Class: CORE Group: Building License: GPL Version: 2.0.8 -Release: 20080718 +Release: 20090105 # package options %option with_shtoolize yes # list of sources Source0: ftp://ftp.gnu.org/gnu/shtool/shtool-%{version}.tar.gz +Patch0: shtool.patch # build information Prefix: %{l_prefix} @@ -57,7 +59,7 @@ successful use over many years in various free software projects. The compiled shtool script is intended to be used inside the source tree of those free software packages. There it can take over - various (usually non-portable) tasks related to the building and + various (usually nonportable) tasks related to the building and installation of such packages. %track @@ -69,6 +71,7 @@ %prep %setup -q + %patch -p0 %build ./configure \ @@ -85,7 +88,8 @@ rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/shtool %endif %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ - %{l_files_std} + %{l_files_std} \ + '%not %dir %{l_prefix}/share/aclocal' %files -f files