summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-03-29 17:10:31 +0200
committerJeroen Roovers <jer@gentoo.org>2018-03-29 17:10:48 +0200
commit94132bac4609f09fab26fa59b9769a2bda95034f (patch)
treea7a7d8f1f503583832542b62264d1789d29dcb76 /sys-apps/heirloom-tools
parentsys-apps/portage-mgorny: Drop old (diff)
downloadgentoo-94132bac4609f09fab26fa59b9769a2bda95034f.tar.gz
gentoo-94132bac4609f09fab26fa59b9769a2bda95034f.tar.bz2
gentoo-94132bac4609f09fab26fa59b9769a2bda95034f.zip
sys-apps/heirloom-tools: Fix many bugs (also bug #649788).
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sys-apps/heirloom-tools')
-rw-r--r--sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch25
-rw-r--r--sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild57
2 files changed, 82 insertions, 0 deletions
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch
new file mode 100644
index 000000000000..82d32315d819
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch
@@ -0,0 +1,25 @@
+--- a/cpio/cpio.c
++++ b/cpio/cpio.c
+@@ -91,9 +91,9 @@
+ #include <sfile.h>
+ #include <atoll.h>
+
+-#ifdef _AIX
++#if defined (_AIX) || defined (__GLIBC__)
+ #include <sys/sysmacros.h>
+-#endif /* _AIX */
++#endif /* _AIX || __GLIBC__ */
+
+ #ifndef major
+ #include <sys/mkdev.h>
+--- a/ls/ls.c
++++ b/ls/ls.c
+@@ -119,7 +119,7 @@
+ #include <termcap.h>
+ #endif /* USE_TERMCAP */
+
+-#ifdef _AIX
++#if defined (_AIX) || defined (__GLIBC__)
+ #include <sys/sysmacros.h>
+ #endif
+
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
new file mode 100644
index 000000000000..9d55edab0b49
--- /dev/null
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Heirloom toolchest - original Unix tools"
+HOMEPAGE="http://heirloom.sourceforge.net/tools.html"
+SRC_URI="http://downloads.sourceforge.net/project/heirloom/heirloom/${PV}/heirloom-${PV}.tar.bz2"
+
+LICENSE="CDDL GPL-2 LGPL-2.1 9base ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sys-libs/zlib
+"
+DEPEND="
+ ${RDEPEND}
+ sys-apps/ed
+ virtual/pkgconfig
+"
+S="${WORKDIR}/heirloom-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${P}-major.patch
+)
+
+# slightly broken
+RESTRICT="test"
+
+src_prepare() {
+ find . -name '*.c' -exec sed -i -e 's|#ifndef[[:space:]]*major|#include <sys/sysmacros.h>\n#if 0|g' {} + || die
+
+ default
+}
+src_compile() {
+ append-cppflags -D_GNU_SOURCE
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LCURS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBZ=-lz
+}
+
+src_install() {
+ # we don't want to strip here, so use "true" as noop
+ emake STRIP="true" ROOT="${D}" -j1 install
+}
+
+pkg_postinst() {
+ elog "You may want to add /usr/5bin or /usr/ucb to \$PATH"
+ elog "to enable using the apps of heirloom toolchest by default."
+ elog "Man pages are installed in /usr/share/man/5man/"
+ elog "You may need to set \$MANPATH to access them."
+}