diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-07-12 09:26:28 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-07-12 09:26:28 +0000 |
commit | 1b57b7edf712a378beee4310623af8f5a7437f4f (patch) | |
tree | 8dcbfc3507e0848342bfbd2f7f6f1a3756cf7b94 /sys-apps/gawk | |
parent | Don't report pam_chroot as deprecated, as it's now in portage (thanks Ali Pol... (diff) | |
download | gentoo-2-1b57b7edf712a378beee4310623af8f5a7437f4f.tar.gz gentoo-2-1b57b7edf712a378beee4310623af8f5a7437f4f.tar.bz2 gentoo-2-1b57b7edf712a378beee4310623af8f5a7437f4f.zip |
Move gawk to /usr/bin for non GNU userlands.
(Portage version: 2.1.3_rc7)
Diffstat (limited to 'sys-apps/gawk')
-rw-r--r-- | sys-apps/gawk/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/gawk/files/digest-gawk-3.1.5-r4 | 3 | ||||
-rw-r--r-- | sys-apps/gawk/gawk-3.1.5-r4.ebuild | 120 |
3 files changed, 129 insertions, 1 deletions
diff --git a/sys-apps/gawk/ChangeLog b/sys-apps/gawk/ChangeLog index 10b5e7287d78..89c55ecc79f6 100644 --- a/sys-apps/gawk/ChangeLog +++ b/sys-apps/gawk/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/gawk # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/ChangeLog,v 1.106 2007/07/09 03:36:08 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/ChangeLog,v 1.107 2007/07/12 09:26:28 uberlord Exp $ + +*gawk-3.1.5-r4 (12 Jul 2007) + + 12 Jul 2007; Roy Marples <uberlord@gentoo.org> +gawk-3.1.5-r4.ebuild: + Move gawk to /usr/bin for non GNU userlands. 09 Jul 2007; Jeroen Roovers <jer@gentoo.org> gawk-3.1.5-r3.ebuild: Stable for HPPA (bug #184465). diff --git a/sys-apps/gawk/files/digest-gawk-3.1.5-r4 b/sys-apps/gawk/files/digest-gawk-3.1.5-r4 new file mode 100644 index 000000000000..9ac602be41d5 --- /dev/null +++ b/sys-apps/gawk/files/digest-gawk-3.1.5-r4 @@ -0,0 +1,3 @@ +MD5 4760325489479cac17fe0114b8f62f30 gawk-3.1.5.tar.gz 2310919 +RMD160 8d875f4ea9e9ef5c932468cf43c691f6e082b197 gawk-3.1.5.tar.gz 2310919 +SHA256 463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8 gawk-3.1.5.tar.gz 2310919 diff --git a/sys-apps/gawk/gawk-3.1.5-r4.ebuild b/sys-apps/gawk/gawk-3.1.5-r4.ebuild new file mode 100644 index 000000000000..9641357285e7 --- /dev/null +++ b/sys-apps/gawk/gawk-3.1.5-r4.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/gawk-3.1.5-r4.ebuild,v 1.1 2007/07/12 09:26:28 uberlord Exp $ + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="GNU awk pattern-matching language" +HOMEPAGE="http://www.gnu.org/software/gawk/gawk.html" +SRC_URI="mirror://gnu/gawk/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="nls userland_GNU" + +RDEPEND="" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +SFFS=${WORKDIR}/filefuncs + +src_unpack() { + unpack ${P}.tar.gz + + # Copy filefuncs module's source over ... + cp -r "${FILESDIR}"/filefuncs "${SFFS}" || die "cp failed" + + cd "${S}" + epatch "${FILESDIR}"/${P}-core.patch + epatch "${FILESDIR}"/${P}-gcc4.patch + epatch "${FILESDIR}"/${P}-autotools-crap.patch #139397 + # Patches from Fedora + epatch "${FILESDIR}"/${PN}-3.1.3-getpgrp_void.patch + epatch "${FILESDIR}"/${P}-fieldwidths.patch #127163 + epatch "${FILESDIR}"/${P}-binmode.patch + epatch "${FILESDIR}"/${P}-num2str.patch + epatch "${FILESDIR}"/${P}-internal.patch + epatch "${FILESDIR}"/${P}-numflags.patch + epatch "${FILESDIR}"/${P}-syntaxerror.patch + epatch "${FILESDIR}"/${P}-wconcat.patch + epatch "${FILESDIR}"/${P}-freewstr.patch #135931 +} + +src_compile() { + local bindir=/usr/bin + use userland_GNU && bindir=/bin + econf \ + --bindir=${bindir} \ + --libexec='$(libdir)/misc' \ + $(use_enable nls) \ + --enable-switch \ + || die + emake || die "emake failed" + + cd "${SFFS}" + emake CC=$(tc-getCC) || die "filefuncs emake failed" +} + +src_install() { + make install DESTDIR="${D}" || die "install failed" + cd "${SFFS}" + make LIBDIR="$(get_libdir)" install || die "filefuncs install failed" + + dodir /usr/bin + # In some rare cases, (p)gawk gets installed as (p)gawk- and not + # (p)gawk-${PV} ... Also make sure that /bin/(p)gawk is a symlink + # to /bin/(p)gawk-${PV}. + local bindir=/usr/bin binpath= x= + use userland_GNU && bindir=/bin + for x in gawk pgawk igawk ; do + [[ ${x} == "gawk" ]] \ + && binpath=${bindir} \ + || binpath=/usr/bin + + if [[ -f ${D}/${bindir}/${x} && ! -f ${D}/${bindir}/${x}-${PV} ]] ; then + mv -f "${D}"/${bindir}/${x} "${D}"/${binpath}/${x}-${PV} + elif [[ -f ${D}/${bindir}/${x}- && ! -f ${D}/${bindir}/${x}-${PV} ]] ; then + mv -f "${D}"/${bindir}/${x}- "${D}"/${binpath}/${x}-${PV} + elif [[ ${binpath} == "/usr/bin" && -f ${D}/${bindir}/${x}-${PV} ]] ; then + mv -f "${D}"/${bindir}/${x}-${PV} "${D}"/${binpath}/${x}-${PV} + fi + + rm -f "${D}"/${bindir}/${x} + [[ -x "${D}"/${binpath}/${x}-${PV} ]] && dosym ${x}-${PV} ${binpath}/${x} + if use userland_GNU ; then + [[ ${binpath} == "/usr/bin" ]] && dosym /usr/bin/${x}-${PV} /bin/${x} + fi + done + + rm -f "${D}"/bin/awk + dodir /usr/bin + # Compat symlinks + dosym gawk-${PV} ${bindir}/awk + dosym ${bindir}/gawk-${PV} /usr/bin/awk + if [[ ${USERLAND} == "GNU" ]] ; then + dosym /bin/gawk-${PV} /usr/bin/gawk + else + rm -f "${D}"/{,usr/}bin/awk{,-${PV}} + fi + + # Install headers + insinto /usr/include/awk + doins "${S}"/*.h || die "ins headers failed" + # We do not want 'acconfig.h' in there ... + rm -f "${D}"/usr/include/awk/acconfig.h + + cd "${S}" + rm -f "${D}"/usr/share/man/man1/pgawk.1 + dosym gawk.1 /usr/share/man/man1/pgawk.1 + [[ ${USERLAND} == "GNU" ]] && dosym gawk.1 /usr/share/man/man1/awk.1 + dodoc AUTHORS ChangeLog FUTURES LIMITATIONS NEWS PROBLEMS POSIX.STD README + docinto README_d + dodoc README_d/* + docinto awklib + dodoc awklib/ChangeLog + docinto pc + dodoc pc/ChangeLog + docinto posix + dodoc posix/ChangeLog +} |