[csw-devel] SF.net SVN: gar:[14991] csw/mgar/pkg/getopt/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Wed Jul 6 14:56:00 CEST 2011
Revision: 14991
http://gar.svn.sourceforge.net/gar/?rev=14991&view=rev
Author: dmichelsen
Date: 2011-07-06 12:56:00 +0000 (Wed, 06 Jul 2011)
Log Message:
-----------
getopt: Add patches and sanitizing
Modified Paths:
--------------
csw/mgar/pkg/getopt/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/getopt/trunk/files/0004-Sanitize-getopt.h.patch
Modified: csw/mgar/pkg/getopt/trunk/Makefile
===================================================================
--- csw/mgar/pkg/getopt/trunk/Makefile 2011-07-06 11:49:38 UTC (rev 14990)
+++ csw/mgar/pkg/getopt/trunk/Makefile 2011-07-06 12:56:00 UTC (rev 14991)
@@ -18,14 +18,16 @@
PATCHFILES += 0002-Do-not-make-standalone-version.patch
PATCHFILES += 0003-Makefile-settings.patch
-# File name regex to get notifications about upstream software releases
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+# Patch from http://lists.gnu.org/archive/html/bug-bison/2010-04/msg00046.html
+PATCHFILES += 0004-Sanitize-getopt.h.patch
PACKAGES = CSWggetopt
CATALOGNAME = ggetopt
VENDOR_URL = http://software.frodo.looijaard.name/getopt/
+EXTRA_CFLAGS += -Xc
+
# No scipt there...
CONFIGURE_SCRIPTS =
@@ -49,3 +51,8 @@
# Use correct version of 'install'
PATH := /opt/csw/gnu:$(PATH)
+
+post-install-modulated:
+ perl -pi -e 's,/usr/local/lib,$(libdir),' \
+ $(DESTDIR)$(mandir)/man1/getopt.1
+
Added: csw/mgar/pkg/getopt/trunk/files/0004-Sanitize-getopt.h.patch
===================================================================
--- csw/mgar/pkg/getopt/trunk/files/0004-Sanitize-getopt.h.patch (rev 0)
+++ csw/mgar/pkg/getopt/trunk/files/0004-Sanitize-getopt.h.patch 2011-07-06 12:56:00 UTC (rev 14991)
@@ -0,0 +1,47 @@
+From 7766515552cdbb601d17dadbdac393590a793783 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 6 Jul 2011 10:40:28 +0200
+Subject: [PATCH] Sanitize getopt.h
+
+---
+ gnu/getopt.h | 13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/gnu/getopt.h b/gnu/getopt.h
+index d6ceb0e..135bade 100644
+--- a/gnu/getopt.h
++++ b/gnu/getopt.h
+@@ -78,7 +78,7 @@ extern int optopt;
+
+ struct option
+ {
+-#if defined (__STDC__) && __STDC__
++#if defined (__STDC__) && (__STDC__ || defined __sun)
+ const char *name;
+ #else
+ char *name;
+@@ -96,15 +96,16 @@ struct option
+ #define required_argument 1
+ #define optional_argument 2
+
+-#if defined (__STDC__) && __STDC__
+-#ifdef __GNU_LIBRARY__
++
++#if defined (__STDC__) && (__STDC__ || defined __sun)
++#if defined __GNU_LIBRARY__ || defined __sun
+ /* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+- errors, only prototype getopt for the GNU C library. */
++ errors, only prototype getopt for the GNU C library and for Solaris. */
+ extern int getopt (int argc, char *const *argv, const char *shortopts);
+-#else /* not __GNU_LIBRARY__ */
++#else /* not __GNU_LIBRARY__ || __sun */
+ extern int getopt ();
+-#endif /* __GNU_LIBRARY__ */
++#endif /* __GNU_LIBRARY__ || __sun */
+ extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+ extern int getopt_long_only (int argc, char *const *argv,
+--
+1.7.6
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list