Use econf/install with DESTDIR.
authorMike Frysinger <vapier@gentoo.org>
Mon, 22 Nov 2004 06:03:16 +0000 (06:03 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 22 Nov 2004 06:03:16 +0000 (06:03 +0000)
sys-apps/gawk/ChangeLog
sys-apps/gawk/Manifest
sys-apps/gawk/files/digest-gawk-3.1.3-r2 [new file with mode: 0644]
sys-apps/gawk/gawk-3.1.3-r2.ebuild [new file with mode: 0644]

index 8adcaa714ad3409a6c59737a9ca56b15f7aa04d7..218e4a1f35b0c710dedbba179810c05263ac4969 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for sys-apps/gawk
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/ChangeLog,v 1.46 2004/11/14 21:08:05 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/ChangeLog,v 1.47 2004/11/22 06:03:16 vapier Exp $
+
+*gawk-3.1.3-r2 (22 Nov 2004)
+
+  22 Nov 2004; Mike Frysinger <vapier@gentoo.org> +gawk-3.1.3-r2.ebuild:
+  Use econf/install with DESTDIR.
 
   14 Nov 2004; Tony Vroon <chainsaw@gentoo.org> gawk-3.1.3-r1.ebuild:
   Portability update to cp command, change -d to -P, which works on more OS's.
index c56f94d7710b59ed526777b528deabcf7c29be30..e96318a47133eb641f0890c7d28cd899fa613eef 100644 (file)
@@ -1,9 +1,21 @@
-MD5 d8f39f3846e3caf4fb3f6fd8969ecbc0 gawk-3.1.3-r1.ebuild 3192
-MD5 fd85d663355a6ecfaeb890a9e92954e5 ChangeLog 7605
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 d988c18870d649e7e26a6f095813a4ef ChangeLog 7741
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
+MD5 d8f39f3846e3caf4fb3f6fd8969ecbc0 gawk-3.1.3-r1.ebuild 3192
+MD5 4bdc10801b419b2aae08ee0378bf316e gawk-3.1.3-r2.ebuild 2764
+MD5 1a6ff83a6dd7c5f300803cae1cabd4ae files/gawk-3.1.2-dec-alpha-compiler.diff 461
 MD5 9f439b073b0d1903a54a04dca5aa44af files/gawk-3.1.2-input-filesize.patch 13485
 MD5 a3d79dbed6a930b14071084a6c2dbcc7 files/digest-gawk-3.1.3-r1 63
-MD5 1a6ff83a6dd7c5f300803cae1cabd4ae files/gawk-3.1.2-dec-alpha-compiler.diff 461
 MD5 c40ec6dfabda5864b7f62fa57d2329bd files/64bitnumfile.patch 340
+MD5 a3d79dbed6a930b14071084a6c2dbcc7 files/digest-gawk-3.1.3-r2 63
 MD5 36b5ebb691c9060f293762de7adc9d50 files/filefuncs/Makefile 943
 MD5 faae1ef835ae32125111e20cb9701c82 files/filefuncs/filefuncs.c 11021
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.9.10 (GNU/Linux)
+
+iD8DBQFBoYFoHTu7gpaalycRAnpGAKCPRPgUH8VS5SbpBqAMDcYUogabXACfS6pG
+CzQ7GB7oHmBgwW0tp+EKpVY=
+=egGu
+-----END PGP SIGNATURE-----
diff --git a/sys-apps/gawk/files/digest-gawk-3.1.3-r2 b/sys-apps/gawk/files/digest-gawk-3.1.3-r2
new file mode 100644 (file)
index 0000000..0bb5d21
--- /dev/null
@@ -0,0 +1 @@
+MD5 b637b454005f9e72a9a8eecfacd07ca0 gawk-3.1.3.tar.gz 2078246
diff --git a/sys-apps/gawk/gawk-3.1.3-r2.ebuild b/sys-apps/gawk/gawk-3.1.3-r2.ebuild
new file mode 100644 (file)
index 0000000..5b1b4ae
--- /dev/null
@@ -0,0 +1,109 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gawk/gawk-3.1.3-r2.ebuild,v 1.1 2004/11/22 06:03:16 vapier Exp $
+
+inherit eutils toolchain-funcs
+
+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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nls build uclibc"
+
+RDEPEND="virtual/libc"
+DEPEND="${RDEPEND}
+       nls? ( sys-devel/gettext )"
+
+src_unpack() {
+       unpack ${A}
+
+       # Copy filefuncs module's source over ...
+       cp -PR "${FILESDIR}/filefuncs" "${WORKDIR}/" || die "cp failed"
+
+       cd ${S}
+       # support for dec compiler.
+       [ "${CC}" == "ccc" ] && epatch ${FILESDIR}/${PN}-3.1.2-dec-alpha-compiler.diff
+       epatch ${FILESDIR}/64bitnumfile.patch
+}
+
+src_compile() {
+       econf --bindir=/bin $(use_enable nls) || die
+       emake || die "emake failed"
+
+       cd ${WORKDIR}/filefuncs
+       emake AWKINCDIR=${S} CC=$(tc-getCC) || die "filefuncs emake failed"
+}
+
+src_install() {
+       make install DESTDIR="${D}" || die "install failed"
+       cd ${WORKDIR}/filefuncs
+       make \
+               DESTDIR=${D} \
+               AWKINCDIR=${S} \
+               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 x=
+       for x in gawk pgawk igawk
+       do
+               local binpath="/bin"
+
+               case ${x} in
+               igawk|pgawk)
+                               binpath="/usr/bin"
+                               ;;
+               esac
+
+               if [ -f "${D}/bin/${x}" -a ! -f "${D}/bin/${x}-${PV}" ]
+               then
+                       mv -f ${D}/bin/${x} ${D}/${binpath}/${x}-${PV}
+               elif [ -f "${D}/bin/${x}-" -a ! -f "${D}/bin/${x}-${PV}" ]
+               then
+                       mv -f ${D}/bin/${x}- ${D}/${binpath}/${x}-${PV}
+               elif [ "${binpath}" = "/usr/bin" -a -f "${D}/bin/${x}-${PV}" ]
+               then
+                       mv -f ${D}/bin/${x}-${PV} ${D}/${binpath}/${x}-${PV}
+               fi
+
+               rm -f ${D}/bin/${x}
+               dosym ${x}-${PV} ${binpath}/${x}
+               [ "${binpath}" = "/usr/bin" ] && dosym /usr/bin/${x}-${PV} /bin/${x}
+       done
+
+       rm -f ${D}/bin/awk
+       dosym gawk-${PV} /bin/awk
+       # Compat symlinks
+       dodir /usr/bin
+       dosym /bin/gawk-${PV} /usr/bin/awk
+       dosym /bin/gawk-${PV} /usr/bin/gawk
+
+       # Install headers
+       insinto /usr/include/awk
+       for x in ${S}/*.h
+       do
+               # We do not want 'acconfig.h' in there ...
+               [ -f "${x}" -a "${x/acconfig\.h/}" = "${x}" ] && doins ${x}
+       done
+
+       if ! use build ; then
+               cd ${S}
+               dosym gawk.1.gz /usr/share/man/man1/awk.1.gz
+               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
+       else
+               rm -rf "${D}"/usr/share
+       fi
+}