1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

- Support USE_GETOPT_LONG

- Avoid unexpected side effect by other ports

PR:		ports/65081
Submitted by:	Ports Fury
This commit is contained in:
Kirill Ponomarev 2004-04-02 19:02:46 +00:00
parent 9d79490219
commit a93752abaf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105979
8 changed files with 134 additions and 30 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= id-utils
PORTVERSION= 3.2d
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU_ALPHA}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -17,14 +17,16 @@ COMMENT= The classic Berkeley gid/lid tools for looking up variables in code
CONFLICTS= coreutils-* sh-utils-*
USE_REINPLACE= yes
USE_GETOPT_LONG= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
INFO= id-utils
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
@ -33,16 +35,10 @@ USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
.if exists(${LOCALBASE}/bin/emacs)
PLIST_SUB+= EMACS="" EMACSDIR=share/emacs
.elif exists(${LOCALBASE}/bin/xemacs)
PLIST_SUB+= EMACS="" EMACSDIR=lib/xemacs
.else
PLIST_SUB+= EMACS="@comment " EMACSDIR=""
.endif
post-extract:
@${RM} -f ${WRKSRC}/lib/getopt.h
post-patch:
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|@EMACS@|no|g'
post-install:
${INSTALL_DATA} ${WRKSRC}/lisp/id-utils.el ${PREFIX}/share/emacs/site-lisp
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig Tue Apr 6 17:28:35 1999
+++ Makefile.in Tue Mar 30 20:10:48 2004
@@ -95,7 +95,7 @@
AUTOMAKE_OPTIONS = gnits 1.2h
-SUBDIRS = lib libidu intl src lisp m4 po doc testsuite
+SUBDIRS = lib libidu intl src m4 po doc testsuite
# Remove this file here (it is created via configure), not from within intl.
DISTCLEANFILES = intl/libintl.h

View File

@ -0,0 +1,45 @@
--- lib/Makefile.in.orig Tue Apr 6 17:28:36 1999
+++ lib/Makefile.in Tue Mar 30 20:20:55 2004
@@ -100,9 +100,9 @@
EXTRA_DIST = alloca.c basename.c dirname.c error.c fnmatch.c memcpy.c memset.c obstack.c regex.c strcasecmp.c strcspn.c strdup.c strndup.c strpbrk.c strspn.c strstr.c strtok.c
-libsys_a_SOURCES = xgetcwd.c xmalloc.c getopt.c getopt1.c
+libsys_a_SOURCES = xgetcwd.c xmalloc.c
-noinst_HEADERS = ansidecl.h error.h fnmatch.h getopt.h obstack.h pathmax.h regex.h xalloca.h xdirent.h xfnmatch.h xmalloc.h xobstack.h xstddef.h xstdlib.h xstring.h xsysstat.h xunistd.h
+noinst_HEADERS = ansidecl.h error.h fnmatch.h obstack.h pathmax.h regex.h xalloca.h xdirent.h xfnmatch.h xmalloc.h xobstack.h xstddef.h xstdlib.h xstring.h xsysstat.h xunistd.h
INCLUDES = -I. -I$(srcdir) -I../intl -I$(top_srcdir)/intl -I.. -I$(top_srcdir)
@@ -118,7 +118,7 @@
LIBS = @LIBS@
ANSI2KNR = ../src/ansi2knr
libsys_a_DEPENDENCIES = @LIBOBJS@ @ALLOCA@
-libsys_a_OBJECTS = xgetcwd$U.o xmalloc$U.o getopt$U.o getopt1$U.o
+libsys_a_OBJECTS = xgetcwd$U.o xmalloc$U.o
AR = ar
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -205,10 +205,6 @@
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c
fnmatch_.c: fnmatch.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fnmatch.c; then echo $(srcdir)/fnmatch.c; else echo fnmatch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > fnmatch_.c
-getopt_.c: getopt.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c
-getopt1_.c: getopt1.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c
memcpy_.c: memcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcpy_.c
memset_.c: memset.c $(ANSI2KNR)
@@ -235,8 +231,8 @@
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgetcwd_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
-alloca_.o basename_.o dirname_.o error_.o fnmatch_.o getopt_.o \
-getopt1_.o memcpy_.o memset_.o obstack_.o regex_.o strcspn_.o strdup_.o \
+alloca_.o basename_.o dirname_.o error_.o fnmatch_.o \
+memcpy_.o memset_.o obstack_.o regex_.o strcspn_.o strdup_.o \
strndup_.o strpbrk_.o strspn_.o strstr_.o strtok_.o xgetcwd_.o \
xmalloc_.o : $(ANSI2KNR)

View File

@ -7,7 +7,7 @@ bin/gid
bin/lid
bin/mkid
bin/xtokid
%%EMACS%%%%EMACSDIR%%/share/emacs/site-lisp/id-utils.el
share/emacs/site-lisp/id-utils.el
share/id-lang.map
%%NLS%%share/locale/de/LC_MESSAGES/id-utils.mo
%%NLS%%share/locale/fr/LC_MESSAGES/id-utils.mo

View File

@ -7,7 +7,7 @@
PORTNAME= id-utils
PORTVERSION= 3.2d
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU_ALPHA}
MASTER_SITE_SUBDIR= ${PORTNAME}
@ -17,14 +17,16 @@ COMMENT= The classic Berkeley gid/lid tools for looking up variables in code
CONFLICTS= coreutils-* sh-utils-*
USE_REINPLACE= yes
USE_GETOPT_LONG= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
INFO= id-utils
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
@ -33,16 +35,10 @@ USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.endif
.if exists(${LOCALBASE}/bin/emacs)
PLIST_SUB+= EMACS="" EMACSDIR=share/emacs
.elif exists(${LOCALBASE}/bin/xemacs)
PLIST_SUB+= EMACS="" EMACSDIR=lib/xemacs
.else
PLIST_SUB+= EMACS="@comment " EMACSDIR=""
.endif
post-extract:
@${RM} -f ${WRKSRC}/lib/getopt.h
post-patch:
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's|@EMACS@|no|g'
post-install:
${INSTALL_DATA} ${WRKSRC}/lisp/id-utils.el ${PREFIX}/share/emacs/site-lisp
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig Tue Apr 6 17:28:35 1999
+++ Makefile.in Tue Mar 30 20:10:48 2004
@@ -95,7 +95,7 @@
AUTOMAKE_OPTIONS = gnits 1.2h
-SUBDIRS = lib libidu intl src lisp m4 po doc testsuite
+SUBDIRS = lib libidu intl src m4 po doc testsuite
# Remove this file here (it is created via configure), not from within intl.
DISTCLEANFILES = intl/libintl.h

View File

@ -0,0 +1,45 @@
--- lib/Makefile.in.orig Tue Apr 6 17:28:36 1999
+++ lib/Makefile.in Tue Mar 30 20:20:55 2004
@@ -100,9 +100,9 @@
EXTRA_DIST = alloca.c basename.c dirname.c error.c fnmatch.c memcpy.c memset.c obstack.c regex.c strcasecmp.c strcspn.c strdup.c strndup.c strpbrk.c strspn.c strstr.c strtok.c
-libsys_a_SOURCES = xgetcwd.c xmalloc.c getopt.c getopt1.c
+libsys_a_SOURCES = xgetcwd.c xmalloc.c
-noinst_HEADERS = ansidecl.h error.h fnmatch.h getopt.h obstack.h pathmax.h regex.h xalloca.h xdirent.h xfnmatch.h xmalloc.h xobstack.h xstddef.h xstdlib.h xstring.h xsysstat.h xunistd.h
+noinst_HEADERS = ansidecl.h error.h fnmatch.h obstack.h pathmax.h regex.h xalloca.h xdirent.h xfnmatch.h xmalloc.h xobstack.h xstddef.h xstdlib.h xstring.h xsysstat.h xunistd.h
INCLUDES = -I. -I$(srcdir) -I../intl -I$(top_srcdir)/intl -I.. -I$(top_srcdir)
@@ -118,7 +118,7 @@
LIBS = @LIBS@
ANSI2KNR = ../src/ansi2knr
libsys_a_DEPENDENCIES = @LIBOBJS@ @ALLOCA@
-libsys_a_OBJECTS = xgetcwd$U.o xmalloc$U.o getopt$U.o getopt1$U.o
+libsys_a_OBJECTS = xgetcwd$U.o xmalloc$U.o
AR = ar
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -205,10 +205,6 @@
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c
fnmatch_.c: fnmatch.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fnmatch.c; then echo $(srcdir)/fnmatch.c; else echo fnmatch.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > fnmatch_.c
-getopt_.c: getopt.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt_.c
-getopt1_.c: getopt1.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > getopt1_.c
memcpy_.c: memcpy.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memcpy_.c
memset_.c: memset.c $(ANSI2KNR)
@@ -235,8 +231,8 @@
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xgetcwd_.c
xmalloc_.c: xmalloc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c
-alloca_.o basename_.o dirname_.o error_.o fnmatch_.o getopt_.o \
-getopt1_.o memcpy_.o memset_.o obstack_.o regex_.o strcspn_.o strdup_.o \
+alloca_.o basename_.o dirname_.o error_.o fnmatch_.o \
+memcpy_.o memset_.o obstack_.o regex_.o strcspn_.o strdup_.o \
strndup_.o strpbrk_.o strspn_.o strstr_.o strtok_.o xgetcwd_.o \
xmalloc_.o : $(ANSI2KNR)

View File

@ -7,7 +7,7 @@ bin/gid
bin/lid
bin/mkid
bin/xtokid
%%EMACS%%%%EMACSDIR%%/share/emacs/site-lisp/id-utils.el
share/emacs/site-lisp/id-utils.el
share/id-lang.map
%%NLS%%share/locale/de/LC_MESSAGES/id-utils.mo
%%NLS%%share/locale/fr/LC_MESSAGES/id-utils.mo