diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-22 11:40:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-22 11:40:06 +0100 |
commit | 7a86906b67693cc65671d3e1476835d3a7e13092 (patch) | |
tree | 9de1b9e2cf77833183d4e5ffab2e94d0403ef725 /app-misc/getopt | |
parent | d56d144655e3785864da43c9acb6c228ef9360ae (diff) |
gentoo resync : 22.06.2019
Diffstat (limited to 'app-misc/getopt')
-rw-r--r-- | app-misc/getopt/getopt-1.1.6-r1.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/app-misc/getopt/getopt-1.1.6-r1.ebuild b/app-misc/getopt/getopt-1.1.6-r1.ebuild new file mode 100644 index 000000000000..0acad8e55401 --- /dev/null +++ b/app-misc/getopt/getopt-1.1.6-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs eutils + +DESCRIPTION="getopt(1) replacement supporting GNU-style long options" +HOMEPAGE="http://frodo.looijaard.name/project/getopt/" +SRC_URI="http://frodo.looijaard.name/system/files/software/getopt/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64-fbsd ~m68k-mint ~ppc-aix ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-cygwin ~x64-macos ~x64-solaris ~x86-fbsd ~x86-macos ~x86-solaris" +IUSE="nls" + +RDEPEND="nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.5-libintl.patch + "${FILESDIR}"/${PN}-1.1.5-setlocale.patch + "${FILESDIR}"/${PN}-1.1.6-longrename.patch + "${FILESDIR}"/${PN}-1.1.4-irix.patch +) + +src_compile() { + local nogettext="1" + local libintl="" + local libcgetopt=1 + + if use nls; then + nogettext=0 + has_version sys-libs/glibc || libintl="-lintl" + fi + + [[ ${CHOST} == *-aix* ]] && libcgetopt=0 + [[ ${CHOST} == *-irix* ]] && libcgetopt=0 + [[ ${CHOST} == *-interix* ]] && libcgetopt=0 + + emake CC="$(tc-getCC)" prefix="${EPREFIX}/usr" \ + LIBCGETOPT=${libcgetopt} \ + WITHOUT_GETTEXT=${nogettext} LIBINTL=${libintl} \ + CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + use nls && emake prefix="${EPREFIX}/usr" DESTDIR="${D}" install_po + + 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 getopt-*sh +} |