diff options
author | Fabian Groffen <grobian@gentoo.org> | 2012-12-28 09:10:26 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2012-12-28 09:10:26 +0000 |
commit | 34ec3cf5879a3223fb56c4860b67487e7ad9c953 (patch) | |
tree | 94117877054711cd73532e72b9dad55fa8fe13ff /app-misc/getopt | |
parent | Fix build failure against dev-haskell/test-framework-0.8 (diff) | |
download | gentoo-2-34ec3cf5879a3223fb56c4860b67487e7ad9c953.tar.gz gentoo-2-34ec3cf5879a3223fb56c4860b67487e7ad9c953.tar.bz2 gentoo-2-34ec3cf5879a3223fb56c4860b67487e7ad9c953.zip |
Version bump, fix for build problem on OpenIndiana
(Portage version: 2.2.01.21418-prefix/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89)
Diffstat (limited to 'app-misc/getopt')
-rw-r--r-- | app-misc/getopt/ChangeLog | 10 | ||||
-rw-r--r-- | app-misc/getopt/files/getopt-1.1.5-longrename.patch | 79 | ||||
-rw-r--r-- | app-misc/getopt/files/getopt-1.1.5-setlocale.patch | 12 | ||||
-rw-r--r-- | app-misc/getopt/getopt-1.1.5.ebuild | 59 |
4 files changed, 158 insertions, 2 deletions
diff --git a/app-misc/getopt/ChangeLog b/app-misc/getopt/ChangeLog index 8a677c8ead39..423e1f276f1f 100644 --- a/app-misc/getopt/ChangeLog +++ b/app-misc/getopt/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-misc/getopt # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/getopt/ChangeLog,v 1.7 2012/04/26 17:13:54 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/getopt/ChangeLog,v 1.8 2012/12/28 09:10:26 grobian Exp $ + +*getopt-1.1.5 (28 Dec 2012) + + 28 Dec 2012; Fabian Groffen <grobian@gentoo.org> + +files/getopt-1.1.5-longrename.patch, +files/getopt-1.1.5-setlocale.patch, + +getopt-1.1.5.ebuild: + Version bump, fix for build problem on OpenIndiana 26 Apr 2012; Alexis Ballier <aballier@gentoo.org> getopt-1.1.4.ebuild: keyword ~amd64-fbsd @@ -29,4 +36,3 @@ +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/files/getopt-1.1.5-longrename.patch b/app-misc/getopt/files/getopt-1.1.5-longrename.patch new file mode 100644 index 000000000000..03f2ca5a7445 --- /dev/null +++ b/app-misc/getopt/files/getopt-1.1.5-longrename.patch @@ -0,0 +1,79 @@ +--- getopt-1.1.5/getopt-parse.bash ++++ getopt-1.1.5/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 +--- getopt-1.1.5/getopt-parse.tcsh ++++ getopt-1.1.5/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 +--- getopt-1.1.5/getopt.c ++++ getopt-1.1.5/getopt.c +@@ -320,10 +320,10 @@ + + static void __attribute__ ((__noreturn__)) 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(_("\nOptions:\n"), stderr); + fputs(_(" -a, --alternative Allow long options starting with single -\n"), stderr); + fputs(_(" -h, --help This small usage guide\n"), stderr); +@@ -333,7 +333,7 @@ + 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, --unquote Do not quote the output\n"), stderr); + fputs(_(" -V, --version Output version information\n"), stderr); + fputc('\n', stderr); +--- getopt-1.1.5/Makefile ++++ getopt-1.1.5/Makefile +@@ -32,7 +32,7 @@ + LANGUAGES = ca cs da de es et eu fi fr gl hu id it ja nl pl pt_BR ru sl sv tr uk vi zh_CN zh_TW + MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES)) + +-CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\" -Dprogram_version=\"$(VERSION)\" ++CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)-long\" -Dprogram_version=\"$(VERSION)\" + ifeq ($(LIBCGETOPT),0) + CPPFLAGS+=-I./gnu + endif +@@ -81,7 +81,7 @@ + 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) +--- getopt-1.1.5/nls.h ++++ getopt-1.1.5/nls.h +@@ -29,7 +29,7 @@ + #ifndef GETOPT_NLS + #define GETOPT_NLS + +-#define PACKAGE "getopt" ++#define PACKAGE "getopt-long" + + #if WITHOUT_GETTEXT + #define _(Text) (Text) diff --git a/app-misc/getopt/files/getopt-1.1.5-setlocale.patch b/app-misc/getopt/files/getopt-1.1.5-setlocale.patch new file mode 100644 index 000000000000..2d302d9c6a67 --- /dev/null +++ b/app-misc/getopt/files/getopt-1.1.5-setlocale.patch @@ -0,0 +1,12 @@ +setlocale: we need locale.h for LC_ALL on OpenIndiana + +--- getopt-1.1.5/nls.h ++++ getopt-1.1.5/nls.h +@@ -40,6 +40,7 @@ + #undef setlocale + #define setlocale(Category,Locale) /* empty */ + #else /* not WITHOUT_GETTEXT */ ++#include <locale.h> + #include <libintl.h> + #define _(Text) gettext (Text) + #endif /* WITHOUT_GETTEXT */ diff --git a/app-misc/getopt/getopt-1.1.5.ebuild b/app-misc/getopt/getopt-1.1.5.ebuild new file mode 100644 index 000000000000..d47c904dd22b --- /dev/null +++ b/app-misc/getopt/getopt-1.1.5.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/getopt/getopt-1.1.5.ebuild,v 1.1 2012/12/28 09:10:26 grobian Exp $ + +EAPI=3 + +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="~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="nls" + +RDEPEND="nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +src_prepare() { + epatch "${FILESDIR}"/${P}-setlocale.patch + epatch "${FILESDIR}"/${P}-longrename.patch + + # hopefully this is portable enough + epatch "${FILESDIR}"/${PN}-1.1.4-irix.patch +} + +src_compile() { + local nogettext="1" + local libcgetopt=1 + + use nls && nogettext=0 + [[ ${CHOST} == *-irix* ]] && libcgetopt=0 + [[ ${CHOST} == *-interix* ]] && libcgetopt=0 + + emake CC="$(tc-getCC)" prefix="${EPREFIX}/usr" \ + LIBCGETOPT=${libcgetopt} \ + WITHOUT_GETTEXT=${nogettext} \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + use nls && make prefix="${EPREFIX}/usr" DESTDIR="${D}" install_po + + into /usr + newbin getopt getopt-long + + # at least on interix, the system getopt is ... broken... + # util-linux, which would provide the getopt binary, does not build & + # install on interix/prefix, so, this has to provide it. + [[ ${CHOST} == *-interix* || ${CHOST} == *-mint* ]] && \ + dosym getopt-long /usr/bin/getopt + + newman getopt.1 getopt-long.1 + + dodoc "${S}/getopt-"*sh +} |