1 |
commit: 94132bac4609f09fab26fa59b9769a2bda95034f |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 29 15:10:31 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 29 15:10:48 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94132bac |
7 |
|
8 |
sys-apps/heirloom-tools: Fix many bugs (also bug #649788). |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
.../files/heirloom-tools-070715-major.patch | 25 ++++++++++ |
13 |
.../heirloom-tools/heirloom-tools-070715-r1.ebuild | 57 ++++++++++++++++++++++ |
14 |
2 files changed, 82 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..82d32315d81 |
19 |
--- /dev/null |
20 |
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch |
21 |
@@ -0,0 +1,25 @@ |
22 |
+--- a/cpio/cpio.c |
23 |
++++ b/cpio/cpio.c |
24 |
+@@ -91,9 +91,9 @@ |
25 |
+ #include <sfile.h> |
26 |
+ #include <atoll.h> |
27 |
+ |
28 |
+-#ifdef _AIX |
29 |
++#if defined (_AIX) || defined (__GLIBC__) |
30 |
+ #include <sys/sysmacros.h> |
31 |
+-#endif /* _AIX */ |
32 |
++#endif /* _AIX || __GLIBC__ */ |
33 |
+ |
34 |
+ #ifndef major |
35 |
+ #include <sys/mkdev.h> |
36 |
+--- a/ls/ls.c |
37 |
++++ b/ls/ls.c |
38 |
+@@ -119,7 +119,7 @@ |
39 |
+ #include <termcap.h> |
40 |
+ #endif /* USE_TERMCAP */ |
41 |
+ |
42 |
+-#ifdef _AIX |
43 |
++#if defined (_AIX) || defined (__GLIBC__) |
44 |
+ #include <sys/sysmacros.h> |
45 |
+ #endif |
46 |
+ |
47 |
|
48 |
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild |
49 |
new file mode 100644 |
50 |
index 00000000000..9d55edab0b4 |
51 |
--- /dev/null |
52 |
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild |
53 |
@@ -0,0 +1,57 @@ |
54 |
+# Copyright 1999-2018 Gentoo Foundation |
55 |
+# Distributed under the terms of the GNU General Public License v2 |
56 |
+ |
57 |
+EAPI=6 |
58 |
+inherit flag-o-matic toolchain-funcs |
59 |
+ |
60 |
+DESCRIPTION="Heirloom toolchest - original Unix tools" |
61 |
+HOMEPAGE="http://heirloom.sourceforge.net/tools.html" |
62 |
+SRC_URI="http://downloads.sourceforge.net/project/heirloom/heirloom/${PV}/heirloom-${PV}.tar.bz2" |
63 |
+ |
64 |
+LICENSE="CDDL GPL-2 LGPL-2.1 9base ZLIB" |
65 |
+SLOT="0" |
66 |
+KEYWORDS="~amd64 ~x86" |
67 |
+ |
68 |
+RDEPEND=" |
69 |
+ sys-libs/zlib |
70 |
+" |
71 |
+DEPEND=" |
72 |
+ ${RDEPEND} |
73 |
+ sys-apps/ed |
74 |
+ virtual/pkgconfig |
75 |
+" |
76 |
+S="${WORKDIR}/heirloom-${PV}" |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/${P}-major.patch |
79 |
+) |
80 |
+ |
81 |
+# slightly broken |
82 |
+RESTRICT="test" |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ find . -name '*.c' -exec sed -i -e 's|#ifndef[[:space:]]*major|#include <sys/sysmacros.h>\n#if 0|g' {} + || die |
86 |
+ |
87 |
+ default |
88 |
+} |
89 |
+src_compile() { |
90 |
+ append-cppflags -D_GNU_SOURCE |
91 |
+ emake -j1 \ |
92 |
+ CC="$(tc-getCC)" \ |
93 |
+ CFLAGS="${CFLAGS}" \ |
94 |
+ CPPFLAGS="${CPPFLAGS}" \ |
95 |
+ LCURS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \ |
96 |
+ LDFLAGS="${LDFLAGS}" \ |
97 |
+ LIBZ=-lz |
98 |
+} |
99 |
+ |
100 |
+src_install() { |
101 |
+ # we don't want to strip here, so use "true" as noop |
102 |
+ emake STRIP="true" ROOT="${D}" -j1 install |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ elog "You may want to add /usr/5bin or /usr/ucb to \$PATH" |
107 |
+ elog "to enable using the apps of heirloom toolchest by default." |
108 |
+ elog "Man pages are installed in /usr/share/man/5man/" |
109 |
+ elog "You may need to set \$MANPATH to access them." |
110 |
+} |