[csw-devel] SF.net SVN: gar:[14995] csw/mgar/pkg/libgnugetopt/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Wed Jul 6 15:37:18 CEST 2011


Revision: 14995
          http://gar.svn.sourceforge.net/gar/?rev=14995&view=rev
Author:   dmichelsen
Date:     2011-07-06 13:37:18 +0000 (Wed, 06 Jul 2011)

Log Message:
-----------
liibgnugetopt: Split packages, add patch to getopt.h

Modified Paths:
--------------
    csw/mgar/pkg/libgnugetopt/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/libgnugetopt/trunk/files/0001-Sanitize-getopt.h.patch

Modified: csw/mgar/pkg/libgnugetopt/trunk/Makefile
===================================================================
--- csw/mgar/pkg/libgnugetopt/trunk/Makefile	2011-07-06 13:27:49 UTC (rev 14994)
+++ csw/mgar/pkg/libgnugetopt/trunk/Makefile	2011-07-06 13:37:18 UTC (rev 14995)
@@ -9,12 +9,23 @@
 MASTER_SITES = http://distfiles.macports.org/libgnugetopt/
 DISTFILES  = $(NAME)-$(VERSION).tar.bz2
 
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.bz2
+# Patch from http://lists.gnu.org/archive/html/bug-bison/2010-04/msg00046.html
+PATCHFILES += 0001-Sanitize-getopt.h.patch
 
+LICENSE = README
+
+PACKAGES += CSWlibgnugetopt0
+SPKG_DESC_CSWlibgnugetopt0 = Library containing getopt_long, libgnugetopt.so.0
+PKGFILES_CSWlibgnugetopt0 += $(call pkgfiles_lib,libgnugetopt.so.0)
+OBSOLETED_BY_CSWlibgnugetopt0 += CSWlibgnugetopt
+
+PACKAGES += CSWlibgnugetopt-dev
+SPKG_DESC_CSWlibgnugetopt-dev = Development files for libgnugetopt.so.0
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWlibgnugetopt-dev += CSWlibgnugetopt0
+
+EXTRA_CFLAGS += -Xc
+
 BUILD64 = 1
-CONFIGURE_ARGS = $(DIRPATHS)
 
-TEST_TARGET = check
-
 include gar/category.mk

Copied: csw/mgar/pkg/libgnugetopt/trunk/files/0001-Sanitize-getopt.h.patch (from rev 14991, csw/mgar/pkg/getopt/trunk/files/0004-Sanitize-getopt.h.patch)
===================================================================
--- csw/mgar/pkg/libgnugetopt/trunk/files/0001-Sanitize-getopt.h.patch	                        (rev 0)
+++ csw/mgar/pkg/libgnugetopt/trunk/files/0001-Sanitize-getopt.h.patch	2011-07-06 13:37:18 UTC (rev 14995)
@@ -0,0 +1,47 @@
+From 0aebf343c11fd9e5f568a1040e54715ee4ed4dc5 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Wed, 6 Jul 2011 15:20:26 +0200
+Subject: [PATCH] Sanitize getopt.h
+
+---
+ getopt.h |   13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/getopt.h b/getopt.h
+index fb30719..f5ef8dc 100644
+--- a/getopt.h
++++ b/getopt.h
+@@ -80,7 +80,7 @@ extern int optopt;
+ 
+ struct option
+ {
+-#if defined (__STDC__) && __STDC__
++#if defined (__STDC__) && (__STDC__ || defined __sun)
+   const char *name;
+ #else
+   char *name;
+@@ -98,15 +98,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