summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-05-24 11:49:47 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-05-24 11:49:47 +0000
commitef40417cafc11045cf7209435c52b07ceb510493 (patch)
treeb7a6f16ca5351bc85b5d6b4e70e66030bdf56736 /app-misc
parentAdd visibility patch to enable KDE hidden visibility. Enable only in presence... (diff)
downloadhistorical-ef40417cafc11045cf7209435c52b07ceb510493.tar.gz
historical-ef40417cafc11045cf7209435c52b07ceb510493.tar.bz2
historical-ef40417cafc11045cf7209435c52b07ceb510493.zip
Add getopt package providing getopt-long for platforms where getopt(1) does not support GNU style long options.
Package-Manager: portage-2.1_rc2-r2
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/getopt/ChangeLog12
-rw-r--r--app-misc/getopt/Manifest34
-rw-r--r--app-misc/getopt/files/digest-getopt-1.1.43
-rw-r--r--app-misc/getopt/files/getopt-1.1.4-libintl.patch34
-rw-r--r--app-misc/getopt/files/getopt-1.1.4-longrename.patch118
-rw-r--r--app-misc/getopt/getopt-1.1.4.ebuild50
-rw-r--r--app-misc/getopt/metadata.xml5
7 files changed, 256 insertions, 0 deletions
diff --git a/app-misc/getopt/ChangeLog b/app-misc/getopt/ChangeLog
new file mode 100644
index 000000000000..46e5d1497531
--- /dev/null
+++ b/app-misc/getopt/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for app-misc/getopt
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/getopt/ChangeLog,v 1.1 2006/05/24 11:49:47 flameeyes Exp $
+
+*getopt-1.1.4 (24 May 2006)
+
+ 24 May 2006; Diego Pettenò <flameeyes@gentoo.org>
+ +files/getopt-1.1.4-libintl.patch, +files/getopt-1.1.4-longrename.patch,
+ +metadata.xml, +getopt-1.1.4.ebuild:
+ Add getopt package providing getopt-long for platforms where getopt(1) does
+ not support GNU style long options.
+
diff --git a/app-misc/getopt/Manifest b/app-misc/getopt/Manifest
new file mode 100644
index 000000000000..ddafb88419a0
--- /dev/null
+++ b/app-misc/getopt/Manifest
@@ -0,0 +1,34 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX getopt-1.1.4-libintl.patch 1119 RMD160 95e722e15e3a568a0731f769897cb4b494d84474 SHA1 f23a24a0e2a960114e248036127e49b5eb114ea8 SHA256 59566da700ae2dec970a5bc3c7e5112c63b55dba93a24138db5097204f462a8d
+MD5 8e6f890efa326f8c4e7877feb9df2e96 files/getopt-1.1.4-libintl.patch 1119
+RMD160 95e722e15e3a568a0731f769897cb4b494d84474 files/getopt-1.1.4-libintl.patch 1119
+SHA256 59566da700ae2dec970a5bc3c7e5112c63b55dba93a24138db5097204f462a8d files/getopt-1.1.4-libintl.patch 1119
+AUX getopt-1.1.4-longrename.patch 4825 RMD160 3e2b2eba6696e759a7e5143de8db3c615f0542eb SHA1 7768c4499b90049c3494de27b9e69fe4e357bd35 SHA256 c6331d44293dc315251ab3014f039456bf99e32880084ddc792b9a2ac2b971d0
+MD5 5fede04ea29ec883c15d31699d18dad0 files/getopt-1.1.4-longrename.patch 4825
+RMD160 3e2b2eba6696e759a7e5143de8db3c615f0542eb files/getopt-1.1.4-longrename.patch 4825
+SHA256 c6331d44293dc315251ab3014f039456bf99e32880084ddc792b9a2ac2b971d0 files/getopt-1.1.4-longrename.patch 4825
+DIST getopt-1.1.4.tar.gz 37163 RMD160 79fffccf1b48956bfc1fbb19c22c2d94adf10dff SHA1 8b9b329b3a8f5d52c91c0381616ecbd1ba291486 SHA256 41083d9993c26792851e79b81a0991996a3f61e14998fdd607615cc3bf933bab
+EBUILD getopt-1.1.4.ebuild 1194 RMD160 5e8d8cbd3b955a2bec7d3b7daef3c4a6915717d4 SHA1 2715e4666865aae578abee52dcec5655d59851fc SHA256 696252c7b218b857e5d75a1cbfe3c5e4b17552db784ed909b1589dcc6524f4fa
+MD5 75f5ab366e5de44bd37223930d4c5430 getopt-1.1.4.ebuild 1194
+RMD160 5e8d8cbd3b955a2bec7d3b7daef3c4a6915717d4 getopt-1.1.4.ebuild 1194
+SHA256 696252c7b218b857e5d75a1cbfe3c5e4b17552db784ed909b1589dcc6524f4fa getopt-1.1.4.ebuild 1194
+MISC ChangeLog 519 RMD160 b0cd0501d68b677c9af4159742c533e0ce472888 SHA1 59cae22f5b96dcc6e71f84e58379908a8a5634d6 SHA256 39b78596f99aaab282f2a099642fa50e4ec32105bd79360c8b1baec0e15d913f
+MD5 127b241f4a843c0ee04d8dde4cae5cd3 ChangeLog 519
+RMD160 b0cd0501d68b677c9af4159742c533e0ce472888 ChangeLog 519
+SHA256 39b78596f99aaab282f2a099642fa50e4ec32105bd79360c8b1baec0e15d913f ChangeLog 519
+MISC metadata.xml 156 RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 SHA1 d9d9d4f2b5afc58339ea3e562fca490156935f1f SHA256 30ab515d6ac492d3d6c36ac3c675511742c2149e56a6b3228c8d22ab8edb3ff7
+MD5 2bd48a5ae413433cbb36110b219ce97c metadata.xml 156
+RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 metadata.xml 156
+SHA256 30ab515d6ac492d3d6c36ac3c675511742c2149e56a6b3228c8d22ab8edb3ff7 metadata.xml 156
+MD5 2e42c8a4db1cd0b3b54e9b0dcb73f4e9 files/digest-getopt-1.1.4 235
+RMD160 604c511e6e5fa154442804df8cdc8b25d2f33552 files/digest-getopt-1.1.4 235
+SHA256 0b01b041a58983d70d8c6f65c2bb971590da5bdfff55175cc262b06eda8db035 files/digest-getopt-1.1.4 235
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.3 (GNU/Linux)
+
+iD8DBQFEdEhkAiZjviIA2XgRAg53AKCVRh8nuE5I1+DlypyLyBCfB0/vNwCdG67J
+8f7iyVo+HYgWPniuEKhJw0M=
+=7rZW
+-----END PGP SIGNATURE-----
diff --git a/app-misc/getopt/files/digest-getopt-1.1.4 b/app-misc/getopt/files/digest-getopt-1.1.4
new file mode 100644
index 000000000000..13d586c2a340
--- /dev/null
+++ b/app-misc/getopt/files/digest-getopt-1.1.4
@@ -0,0 +1,3 @@
+MD5 02188ca68da27c4175d6e9f3da732101 getopt-1.1.4.tar.gz 37163
+RMD160 79fffccf1b48956bfc1fbb19c22c2d94adf10dff getopt-1.1.4.tar.gz 37163
+SHA256 41083d9993c26792851e79b81a0991996a3f61e14998fdd607615cc3bf933bab getopt-1.1.4.tar.gz 37163
diff --git a/app-misc/getopt/files/getopt-1.1.4-libintl.patch b/app-misc/getopt/files/getopt-1.1.4-libintl.patch
new file mode 100644
index 000000000000..232e487b3d31
--- /dev/null
+++ b/app-misc/getopt/files/getopt-1.1.4-libintl.patch
@@ -0,0 +1,34 @@
+Index: getopt-1.1.4/Makefile
+===================================================================
+--- getopt-1.1.4.orig/Makefile
++++ getopt-1.1.4/Makefile
+@@ -33,7 +33,10 @@ MSGFMT=msgfmt
+ LANGUAGES = cs de es fr it ja nl pt_BR
+ MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES))
+
+-CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
++CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
++ifeq ($(WITHOUT_GETTEXT),1)
++CPPFLAGS+=-DWITHOUT_GETTEXT
++endif
+ ifeq ($(LIBCGETOPT),0)
+ CPPFLAGS+=-I./gnu
+ endif
+@@ -62,7 +65,7 @@ clean: clean_po
+ -$(RM) $(objects) $(binaries)
+
+ getopt: $(objects)
+- $(CC) $(LDFLAGS) -o $@ $(objects)
++ $(CC) $(LDFLAGS) -o $@ $(objects) $(LIBINTL)
+
+ install: getopt install_po
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+@@ -75,7 +78,7 @@ install_doc:
+ getopt-test.bash getopt-test.tcsh \
+ $(DESTDIR)$(getoptdir)
+
+-ifeq ($(WITH_GETTEXT),1)
++ifeq ($(WITHOUT_GETTEXT),0)
+ all_po: $(MOFILES)
+ install_po: all_po
+ $(INSTALL) -m 755 -d $(DESTDIR)$(localedir)
diff --git a/app-misc/getopt/files/getopt-1.1.4-longrename.patch b/app-misc/getopt/files/getopt-1.1.4-longrename.patch
new file mode 100644
index 000000000000..dc3ecb066378
--- /dev/null
+++ b/app-misc/getopt/files/getopt-1.1.4-longrename.patch
@@ -0,0 +1,118 @@
+Index: getopt-1.1.4/getopt.c
+===================================================================
+--- getopt-1.1.4.orig/getopt.c
++++ getopt-1.1.4/getopt.c
+@@ -88,7 +88,7 @@ void *our_malloc(size_t size)
+ {
+ void *ret=malloc(size);
+ if (! ret) {
+- fprintf(stderr,_("%s: Out of memory!\n"),"getopt");
++ fprintf(stderr,_("%s: Out of memory!\n"),"getopt-long");
+ exit(3);
+ }
+ return(ret);
+@@ -98,7 +98,7 @@ void *our_realloc(void *ptr, size_t size
+ {
+ void *ret=realloc(ptr,size);
+ if (! ret && size) {
+- fprintf(stderr,_("%s: Out of memory!\n"),"getopt");
++ fprintf(stderr,_("%s: Out of memory!\n"),"getopt-long");
+ exit(3);
+ }
+ return(ret);
+@@ -231,8 +231,8 @@ int generate_output(char * argv[],int ar
+ void parse_error(const char *message)
+ {
+ if (message)
+- fprintf(stderr,"getopt: %s\n",message);
+- fputs(_("Try `getopt --help' for more information.\n"),stderr);
++ fprintf(stderr,"getopt-long: %s\n",message);
++ fputs(_("Try `getopt-long --help' for more information.\n"),stderr);
+ exit(2);
+ }
+
+@@ -323,10 +323,10 @@ void set_shell(const char *new_shell)
+
+ void print_help(void)
+ {
+- fputs(_("Usage: getopt optstring parameters\n"),stderr);
+- fputs(_(" getopt [options] [--] optstring parameters\n"),stderr);
+- fputs(_(" getopt [options] -o|--options optstring [options] [--]\n"),stderr);
+- fputs(_(" parameters\n"),stderr);
++ fputs(_("Usage: getopt-long optstring parameters\n"),stderr);
++ fputs(_(" getopt-long [options] [--] optstring parameters\n"),stderr);
++ fputs(_(" getopt-long [options] -o|--options optstring [options] [--]\n"),stderr);
++ fputs(_(" parameters\n"),stderr);
+ fputs(_(" -a, --alternative Allow long options starting with single -\n"),stderr);
+ fputs(_(" -h, --help This small usage guide\n"),stderr);
+ fputs(_(" -l, --longoptions=longopts Long options to be recognized\n"),stderr);
+@@ -335,7 +335,7 @@ void print_help(void)
+ fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"),stderr);
+ fputs(_(" -Q, --quiet-output No normal output\n"),stderr);
+ fputs(_(" -s, --shell=shell Set shell quoting conventions\n"),stderr);
+- fputs(_(" -T, --test Test for getopt(1) version\n"),stderr);
++ fputs(_(" -T, --test Test for getopt-long(1) version\n"),stderr);
+ fputs(_(" -u, --unqote Do not quote the output\n"),stderr);
+ fputs(_(" -V, --version Output version information\n"),stderr);
+ exit(2);
+@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
+ quote=0;
+ break;
+ case 'V':
+- printf(_("getopt (enhanced) 1.1.4\n"));
++ printf(_("getopt-long (enhanced) 1.1.4\n"));
+ exit(0);
+ case '?':
+ case ':':
+Index: getopt-1.1.4/getopt-parse.bash
+===================================================================
+--- getopt-1.1.4.orig/getopt-parse.bash
++++ getopt-1.1.4/getopt-parse.bash
+@@ -19,7 +19,7 @@
+ # Note that we use `"$@"' to let each command-line parameter expand to a
+ # separate word. The quotes around `$@' are essential!
+ # We need TEMP as the `eval set --' would nuke the return value of getopt.
+-TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
++TEMP=`getopt-long -o ab:c:: --long a-long,b-long:,c-long:: \
+ -n 'example.bash' -- "$@"`
+
+ if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+Index: getopt-1.1.4/getopt-parse.tcsh
+===================================================================
+--- getopt-1.1.4.orig/getopt-parse.tcsh
++++ getopt-1.1.4/getopt-parse.tcsh
+@@ -26,7 +26,7 @@
+ # as a list. The ':q` copies that list without doing any substitutions:
+ # each element of argv becomes a separate argument for getopt. The braces
+ # are needed because the result is also a list.
+-set temp=(`getopt -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`)
++set temp=(`getopt-long -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`)
+ if ($? != 0) then
+ echo "Terminating..." >/dev/stderr
+ exit 1
+Index: getopt-1.1.4/Makefile
+===================================================================
+--- getopt-1.1.4.orig/Makefile
++++ getopt-1.1.4/Makefile
+@@ -85,7 +85,7 @@ install_po: all_po
+ for lang in $(LANGUAGES) ; do \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(INSTALL) -m 755 -d $(DESTDIR)$$dir ;\
+- $(INSTALL) -m 644 po/$$lang.mo $(DESTDIR)$$dir/getopt.mo ;\
++ $(INSTALL) -m 644 po/$$lang.mo $(DESTDIR)$$dir/getopt-long.mo ;\
+ done
+ clean_po:
+ $(RM) $(MOFILES)
+Index: getopt-1.1.4/nls.h
+===================================================================
+--- getopt-1.1.4.orig/nls.h
++++ getopt-1.1.4/nls.h
+@@ -29,7 +29,7 @@
+ #ifndef GETOPT_NLS
+ #define GETOPT_NLS
+
+-#define PACKAGE "getopt"
++#define PACKAGE "getopt-long"
+
+ #ifndef WITHOUT_GETTEXT
+ #include <libintl.h>
diff --git a/app-misc/getopt/getopt-1.1.4.ebuild b/app-misc/getopt/getopt-1.1.4.ebuild
new file mode 100644
index 000000000000..bc5d7c07f30f
--- /dev/null
+++ b/app-misc/getopt/getopt-1.1.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/getopt/getopt-1.1.4.ebuild,v 1.1 2006/05/24 11:49:47 flameeyes Exp $
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="getopt(1) replacement supporting GNU-style long options"
+HOMEPAGE="http://software.frodo.looijaard.name/getopt/"
+SRC_URI="http://software.frodo.looijaard.name/getopt/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+IUSE="nls"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-libintl.patch"
+ epatch "${FILESDIR}/${P}-longrename.patch"
+}
+
+src_compile() {
+ local nogettext="1"
+ local libintl=""
+
+ if use nls; then
+ nogettext=0
+ has_version sys-libs/glibc || libintl="-lintl"
+ fi
+
+ emake CC="$(tc-getCC)" prefix="/usr" \
+ WITHOUT_GETTEXT=${nogettext} LIBINTL=${libintl} \
+ CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ use nls && make prefix="/usr" DESTDIR="${D}" install_po
+
+ into /usr
+ newbin getopt getopt-long
+ newman getopt.1 getopt-long.1
+
+ dodoc "${S}/getopt-"*sh
+}
diff --git a/app-misc/getopt/metadata.xml b/app-misc/getopt/metadata.xml
new file mode 100644
index 000000000000..ecedda4aa2cc
--- /dev/null
+++ b/app-misc/getopt/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>bsd</herd>
+</pkgmetadata>