summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-12-28 09:10:26 +0000
committerFabian Groffen <grobian@gentoo.org>2012-12-28 09:10:26 +0000
commit34ec3cf5879a3223fb56c4860b67487e7ad9c953 (patch)
tree94117877054711cd73532e72b9dad55fa8fe13ff /app-misc/getopt/getopt-1.1.5.ebuild
parentFix build failure against dev-haskell/test-framework-0.8 (diff)
downloadgentoo-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/getopt-1.1.5.ebuild')
-rw-r--r--app-misc/getopt/getopt-1.1.5.ebuild59
1 files changed, 59 insertions, 0 deletions
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
+}