* [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/
@ 2020-03-10 19:35 Sergei Trofimovich
0 siblings, 0 replies; 5+ messages in thread
From: Sergei Trofimovich @ 2020-03-10 19:35 UTC (permalink / raw
To: gentoo-commits
commit: 18402f2ef1d009c5141c7dd628ab1cc7edea2d91
Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
AuthorDate: Tue Feb 18 15:31:45 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Mar 10 19:35:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18402f2e
sys-apps/heirloom-tools: fix building with glibc 2.30
While at it, fix patching with fuzz.
Closes: https://bugs.gentoo.org/692770
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
Closes: https://github.com/gentoo/gentoo/pull/14693
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../files/heirloom-tools-070715-glibc-2.30.patch | 13 ++++
.../files/heirloom-tools-070715-major.patch | 70 +++++++++++++++++++++-
.../heirloom-tools/heirloom-tools-070715-r1.ebuild | 8 +--
3 files changed, 82 insertions(+), 9 deletions(-)
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch
new file mode 100644
index 00000000000..19b90cea6d2
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.30.patch
@@ -0,0 +1,13 @@
+diff --git a/shl/shl.c b/shl/shl.c
+index 6f5c2df..30d296c 100644
+--- a/shl/shl.c
++++ b/shl/shl.c
+@@ -86,7 +86,7 @@ extern int sysv3;
+ #include <libgen.h>
+ #include <limits.h>
+ #include <stdarg.h>
+-#if !defined (__dietlibc__) && !defined (__UCLIBC__)
++#if !defined (__dietlibc__) && !defined (__UCLIBC__) && !defined(__linux__)
+ #include <stropts.h>
+ #endif
+ #include <poll.h>
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch
index 82d32315d81..81e6755e7e3 100644
--- a/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-major.patch
@@ -1,6 +1,8 @@
+diff --git a/cpio/cpio.c b/cpio/cpio.c
+index 89c5cbc..210287b 100644
--- a/cpio/cpio.c
+++ b/cpio/cpio.c
-@@ -91,9 +91,9 @@
+@@ -91,11 +91,12 @@
#include <sfile.h>
#include <atoll.h>
@@ -10,11 +12,45 @@
-#endif /* _AIX */
+#endif /* _AIX || __GLIBC__ */
- #ifndef major
+-#ifndef major
++#include <sys/sysmacros.h>
++#if 0
#include <sys/mkdev.h>
+ #endif /* !major */
+
+diff --git a/file/file.c b/file/file.c
+index 6609734..d90af86 100644
+--- a/file/file.c
++++ b/file/file.c
+@@ -66,7 +66,8 @@ static const char sccsid[] USED = "@(#)file.sl 1.33 (gritter) 4/14/06";
+ #include <fcntl.h>
+ #include <libgen.h>
+ #include <inttypes.h>
+-#ifndef major
++#include <sys/sysmacros.h>
++#if 0
+ #include <sys/mkdev.h>
+ #endif
+ #include "iblok.h"
+diff --git a/find/find.c b/find/find.c
+index fac70f0..28e1b7f 100644
+--- a/find/find.c
++++ b/find/find.c
+@@ -83,7 +83,8 @@ static const char sccsid[] USED = "@(#)find.sl 1.45 (gritter) 5/8/06";
+ #ifdef _AIX
+ #include <sys/sysmacros.h>
+ #endif
+-#ifndef major
++#include <sys/sysmacros.h>
++#if 0
+ #include <sys/mkdev.h>
+ #endif
+ #if __NetBSD_Version__>= 300000000
+diff --git a/ls/ls.c b/ls/ls.c
+index e4480d0..17186ba 100644
--- a/ls/ls.c
+++ b/ls/ls.c
-@@ -119,7 +119,7 @@
+@@ -119,7 +119,7 @@ static char ifmt_c[] = "-pc-d-b--nl-SD--";
#include <termcap.h>
#endif /* USE_TERMCAP */
@@ -23,3 +59,31 @@
#include <sys/sysmacros.h>
#endif
+diff --git a/mknod/mknod.c b/mknod/mknod.c
+index b772b88..f465883 100644
+--- a/mknod/mknod.c
++++ b/mknod/mknod.c
+@@ -45,7 +45,8 @@ static const char sccsid[] USED = "@(#)mknod.sl 1.8 (gritter) 5/29/05";
+ #include <string.h>
+ #include <limits.h>
+ #include <unistd.h>
+-#ifndef major
++#include <sys/sysmacros.h>
++#if 0
+ #include <sys/mkdev.h>
+ #endif /* !major */
+
+diff --git a/tar/tar.c b/tar/tar.c
+index 2d3dada..a8f1ccb 100644
+--- a/tar/tar.c
++++ b/tar/tar.c
+@@ -98,7 +98,8 @@ static const char sccsid[] USED = "@(#)tar.sl 1.177 (gritter) 4/14/07";
+ #include <sys/sysmacros.h>
+ #endif
+
+-#ifndef major
++#include <sys/sysmacros.h>
++#if 0
+ #include <sys/mkdev.h>
+ #endif /* !major */
+
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
index 9d55edab0b4..80d2232221a 100644
--- a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,16 +23,12 @@ DEPEND="
S="${WORKDIR}/heirloom-${PV}"
PATCHES=(
"${FILESDIR}"/${P}-major.patch
+ "${FILESDIR}"/${P}-glibc-2.30.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 \
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/
@ 2020-03-26 9:22 David Seifert
0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2020-03-26 9:22 UTC (permalink / raw
To: gentoo-commits
commit: fc98ef6d53fe28b690ca2b67d96cde766d1432c6
Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
AuthorDate: Thu Mar 26 09:21:53 2020 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Mar 26 09:21:53 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc98ef6d
sys-apps/heirloom-tools: fix build with glibc 2.31
Closes: https://bugs.gentoo.org/709410
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../files/heirloom-tools-070715-glibc-2.31.patch | 41 ++++++++++++++++++++++
.../heirloom-tools/heirloom-tools-070715-r1.ebuild | 1 +
2 files changed, 42 insertions(+)
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch
new file mode 100644
index 00000000000..5186aa1cc2e
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-glibc-2.31.patch
@@ -0,0 +1,41 @@
+--- a/date/date.c
++++ b/date/date.c
+@@ -134,26 +134,13 @@ badtime:
+ return (time_t)-1;
+ }
+
+-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || \
+- defined (__DragonFly__) || defined (__APPLE__)
+-static int
+-stime(time_t *t)
+-{
+- struct timeval tv;
+-
+- tv.tv_sec = *t;
+- tv.tv_usec = 0;
+-
+- return settimeofday(&tv, NULL);
+-}
+-#endif /* __FreeBSD__, __NetBSD__, __OpenBSD__, __DragonFly__, __APPLE__ */
+-
+ static void
+ settime(char *op)
+ {
+ struct utmpx before, after;
+ const char wtmpxfile[] = "/var/log/wtmp";
+ time_t newtime;
++ struct timeval tv;
+
+ memset(&before, 0, sizeof before);
+ memset(&after, 0, sizeof after);
+@@ -164,7 +151,9 @@ settime(char *op)
+ if ((newtime = timeop(op)) == (time_t)-1)
+ badconv();
+ gettimeofday(&before.ut_tv, NULL);
+- if (stime(&newtime) < 0) {
++ tv.tv_sec = newtime;
++ tv.tv_usec = 0;
++ if (settimeofday(&tv, NULL) < 0) {
+ fprintf(stderr, "%s: no permission\n", progname);
+ exit(1);
+ }
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
index 80d2232221a..26da82f5c8b 100644
--- a/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r1.ebuild
@@ -24,6 +24,7 @@ S="${WORKDIR}/heirloom-${PV}"
PATCHES=(
"${FILESDIR}"/${P}-major.patch
"${FILESDIR}"/${P}-glibc-2.30.patch
+ "${FILESDIR}"/${P}-glibc-2.31.patch
)
# slightly broken
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/
@ 2020-03-26 17:46 Joonas Niilola
0 siblings, 0 replies; 5+ messages in thread
From: Joonas Niilola @ 2020-03-26 17:46 UTC (permalink / raw
To: gentoo-commits
commit: f13ea5002842f34785a6a9d4938d6b3001d3002b
Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
AuthorDate: Thu Mar 26 15:34:52 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Mar 26 17:46:42 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f13ea500
sys-apps/heirloom-tools: fix some QA issues, EAPI 7
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
Closes: https://github.com/gentoo/gentoo/pull/15127
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../files/heirloom-tools-070715-makefile.patch | 16 ++++++++++
...5-r2.ebuild => heirloom-tools-070715-r3.ebuild} | 35 ++++++++++++++++++----
2 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-makefile.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-makefile.patch
new file mode 100644
index 00000000000..a4ce2970589
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-makefile.patch
@@ -0,0 +1,16 @@
+diff --git a/Makefile.mk b/Makefile.mk
+index 28a20f1..1cf36b8 100644
+--- a/Makefile.mk
++++ b/Makefile.mk
+@@ -73,11 +73,6 @@ links:
+ sh build/crossln $(ROOT)$(SV3BIN)/more $(ROOT)$(UCBBIN)/more $(ROOT)
+ rm -f $(ROOT)$(UCBBIN)/catman
+ sh build/crossln $(ROOT)$(DEFSBIN)/catman $(ROOT)$(UCBBIN)/catman $(ROOT)
+- for i in sccs prt; \
+- do \
+- rm -f $(ROOT)$(UCBBIN)/$$i; \
+- sh build/crossln $(ROOT)$(CCSBIN)/$$i $(ROOT)$(UCBBIN)/$$i $(ROOT); \
+- done
+ rm -f $(ROOT)$(SV3BIN)/awk
+ sh build/crossln $(ROOT)$(DEFBIN)/oawk $(ROOT)$(SV3BIN)/awk $(ROOT)
+ rm -f $(ROOT)$(S42BIN)/awk
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r2.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
similarity index 57%
rename from sys-apps/heirloom-tools/heirloom-tools-070715-r2.ebuild
rename to sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
index f45cc2e1c88..34e2e70756e 100644
--- a/sys-apps/heirloom-tools/heirloom-tools-070715-r2.ebuild
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit flag-o-matic toolchain-funcs
DESCRIPTION="Heirloom toolchest - original Unix tools"
@@ -15,8 +15,8 @@ KEYWORDS="~amd64 ~x86"
RDEPEND="
sys-libs/zlib
"
-DEPEND="
- ${RDEPEND}
+DEPEND=${RDEPEND}
+BDEPEND="
sys-apps/ed
sys-devel/bc
virtual/pkgconfig
@@ -24,6 +24,7 @@ DEPEND="
S="${WORKDIR}/heirloom-${PV}"
PATCHES=(
"${FILESDIR}"/${P}-major.patch
+ "${FILESDIR}"/${P}-makefile.patch
"${FILESDIR}"/${P}-glibc-2.30.patch
"${FILESDIR}"/${P}-glibc-2.31.patch
"${FILESDIR}"/${P}-gcc-10.patch
@@ -43,17 +44,39 @@ src_compile() {
CPPFLAGS="${CPPFLAGS}" \
LCURS="$( $(tc-getPKG_CONFIG) --libs ncurses)" \
LDFLAGS="${LDFLAGS}" \
+ ROOT="${ED}" \
+ DEFBIN="/usr/bin/${PN}/5bin" \
+ DEFSBIN="/usr/bin/${PN}/5bin" \
+ SV3BIN="/usr/bin/${PN}/5bin" \
+ S42BIN="/usr/bin/${PN}/5bin/s42" \
+ SUSBIN="/usr/bin/${PN}/5bin/posix" \
+ UCBBIN="/usr/bin/${PN}/ucb" \
+ CCSBIN="/usr/bin/${PN}/ccs/bin" \
+ SU3BIN="/usr/bin/${PN}/5bin/posix2001" \
+ DEFLIB="/usr/bin/${PN}/5lib" \
LIBZ=-lz
}
src_install() {
# we don't want to strip here, so use "true" as noop
- emake STRIP="true" ROOT="${D}" -j1 install
+ emake -j1 \
+ STRIP="true" \
+ ROOT="${ED}" \
+ DEFBIN="/usr/bin/${PN}/5bin" \
+ DEFSBIN="/usr/bin/${PN}/5bin" \
+ SV3BIN="/usr/bin/${PN}/5bin" \
+ S42BIN="/usr/bin/${PN}/5bin/s42" \
+ SUSBIN="/usr/bin/${PN}/5bin/posix" \
+ UCBBIN="/usr/bin/${PN}/ucb" \
+ CCSBIN="/usr/bin/${PN}/ccs/bin" \
+ SU3BIN="/usr/bin/${PN}/5bin/posix2001" \
+ DEFLIB="/usr/bin/${PN}/5lib" \
+ 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 "You may want to adjust your \$PATH, to enable "
+ elog "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."
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/
@ 2020-09-12 15:13 Stephan Hartmann
0 siblings, 0 replies; 5+ messages in thread
From: Stephan Hartmann @ 2020-09-12 15:13 UTC (permalink / raw
To: gentoo-commits
commit: ab8cd0d32bfb1548eefa27b8567b27e84a1a31d3
Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 12 15:11:39 2020 +0000
Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
CommitDate: Sat Sep 12 15:12:41 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab8cd0d3
sys-apps/heirloom-tools: fix building with clang
Closes: https://bugs.gentoo.org/741819
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>
.../heirloom-tools/files/heirloom-tools-070715-clang.patch | 13 +++++++++++++
sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild | 1 +
2 files changed, 14 insertions(+)
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-clang.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-clang.patch
new file mode 100644
index 00000000000..54831eef080
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-clang.patch
@@ -0,0 +1,13 @@
+diff --git a/nawk/main.c b/nawk/main.c
+index 9666638..b50b283 100644
+--- a/nawk/main.c
++++ b/nawk/main.c
+@@ -66,7 +66,7 @@ int mb_cur_max; /* MB_CUR_MAX, for acceleration */
+
+ extern const char badopen[];
+
+-int main(int argc, unsigned char *argv[], unsigned char *envp[])
++int main(int argc, char *argv[], char *envp[])
+ {
+ unsigned char *fs = NULL;
+ char label[MAXLABEL+1]; /* Space for the catalogue label */
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
index 34e2e70756e..2c6c2ef1876 100644
--- a/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r3.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
"${FILESDIR}"/${P}-glibc-2.30.patch
"${FILESDIR}"/${P}-glibc-2.31.patch
"${FILESDIR}"/${P}-gcc-10.patch
+ "${FILESDIR}"/${P}-clang.patch
)
# slightly broken
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/
@ 2025-04-12 20:50 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2025-04-12 20:50 UTC (permalink / raw
To: gentoo-commits
commit: 523077d310988df0b54b4ae9c59a97db8f8c3a9b
Author: NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Apr 12 20:16:26 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 12 20:43:40 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=523077d3
sys-apps/heirloom-tools: Fix C99 and broken build graph errors
Including missing generated headers in build graph,
correct usage of gettimeoftheday, cast of pointer types to type
with same width and renaming of true and false.
Not fixed: Sometimes, in some shuffle values root makefile
tries to run branch makefiles before generating them. Don't
understand that and can't fix it.
Closes: https://bugs.gentoo.org/896314
Closes: https://bugs.gentoo.org/880189
Closes: https://bugs.gentoo.org/946205
Closes: https://bugs.gentoo.org/919459
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/41564
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/heirloom-tools-070715-gcc-15.patch | 524 +++++++++++++++++++++
.../heirloom-tools-070715-make-ordering.patch | 45 ++
.../heirloom-tools/heirloom-tools-070715-r7.ebuild | 100 ++++
3 files changed, 669 insertions(+)
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-gcc-15.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-gcc-15.patch
new file mode 100644
index 000000000000..4d42212d620d
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-gcc-15.patch
@@ -0,0 +1,524 @@
+Port to C99/C23. Correct usage of timeval in utmp, rename reserved keywords
+Also cast pointers to pointers to signed chars to unsigned chars
+It's that or redo multiple functions from unsigned chars to signed chars
+and unsigned chars with implicit cast worked so far.
+https://bugs.gentoo.org/919459
+https://bugs.gentoo.org/946205
+--- a/date/date.c
++++ b/date/date.c
+@@ -141,6 +141,7 @@
+ const char wtmpxfile[] = "/var/log/wtmp";
+ time_t newtime;
+ struct timeval tv;
++ struct timeval before_tv, after_tv;
+
+ memset(&before, 0, sizeof before);
+ memset(&after, 0, sizeof after);
+@@ -150,14 +151,19 @@
+ strcpy(after.ut_line, "new time");
+ if ((newtime = timeop(op)) == (time_t)-1)
+ badconv();
+- gettimeofday(&before.ut_tv, NULL);
++ gettimeofday(&before_tv, NULL);
++ before.ut_tv.tv_sec = before_tv.tv_sec;
++ before.ut_tv.tv_usec = before_tv.tv_usec;
+ tv.tv_sec = newtime;
+ tv.tv_usec = 0;
+ if (settimeofday(&tv, NULL) < 0) {
+ fprintf(stderr, "%s: no permission\n", progname);
+ exit(1);
+ }
+- gettimeofday(&after.ut_tv, NULL);
++ gettimeofday(&after_tv, NULL);
++ after.ut_tv.tv_sec = after_tv.tv_sec;
++ after.ut_tv.tv_usec = after_tv.tv_usec;
++
+ #ifdef __linux__
+ system("/sbin/hwclock -w >/dev/null 2>&1");
+ #endif /* __linux__ */
+--- a/nawk/main.c
++++ b/nawk/main.c
+@@ -168,18 +168,18 @@
+ }
+ /* hold leading name=val arguments until just after BEGIN */
+ if (posix && argc > 1 && isclvar(argv[1])) {
+- start_delayed = &argv[0];
++ start_delayed = (unsigned char **)&argv[0];
+ do {
+ argv[0] = argv[1];
+ argv++;
+ } while (--argc > 1 && isclvar(argv[1]));
+- after_delayed = &argv[0];
++ after_delayed = (unsigned char **)&argv[0];
+ }
+ compile_time = 1;
+ argv[0] = cmdname; /* put prog name at front of arglist */
+ dprintf( ("argc=%d, argv[0]=%s\n", argc, argv[0]) );
+- arginit(argc, argv);
+- envinit(envp);
++ arginit(argc, (unsigned char **)argv);
++ envinit((unsigned char **)envp);
+ yyparse();
+ if (fs)
+ *FS = tostring(qstring(fs, '\0'));
+--- a/nawk/run.c
++++ b/nawk/run.c
+@@ -61,9 +61,9 @@
+ Cell *tmps;
+
+ static Cell truecell ={ OBOOL, BTRUE, 0, 0, 1.0, NUM };
+-Cell *true = &truecell;
++Cell *trueval = &truecell;
+ static Cell falsecell ={ OBOOL, BFALSE, 0, 0, 0.0, NUM };
+-Cell *false = &falsecell;
++Cell *falseval = &falsecell;
+ static Cell breakcell ={ OJUMP, JBREAK, 0, 0, 0.0, NUM };
+ Cell *jbreak = &breakcell;
+ static Cell contcell ={ OJUMP, JCONT, 0, 0, 0.0, NUM };
+@@ -108,7 +108,7 @@
+ register Node *a;
+
+ if (u == NULL)
+- return(true);
++ return(trueval);
+ for (a = u; ; a = a->nnext) {
+ curnode = a;
+ if (isvalue(a)) {
+@@ -148,7 +148,7 @@
+ if (a[0]) { /* BEGIN */
+ x = execute(a[0]);
+ if (isexit(x))
+- return(true);
++ return(trueval);
+ if (isjump(x))
+ error(MM_ERROR,
+ ":44:Illegal break, continue or next from BEGIN");
+@@ -174,7 +174,7 @@
+ if(x != 0) { tempfree(x, ""); }
+ }
+ ex1:
+- return(true);
++ return(trueval);
+ }
+
+ struct Frame {
+@@ -461,7 +461,7 @@
+
+ x = execute(a[0]); /* Cell* for symbol table */
+ if (!isarr(x))
+- return true;
++ return trueval;
+ subseplen = strlen((char *)*SUBSEP);
+ growbuf(&buf, &bufsz, CHUNK, NULL, "delete");
+ buf[0] = 0;
+@@ -479,7 +479,7 @@
+ freeelem(x, buf);
+ tempfree(x, "");
+ free(buf);
+- return true;
++ return trueval;
+ }
+
+ Cell *intest(Node **a, int n)
+@@ -511,9 +511,9 @@
+ tempfree(ap, "");
+ free(buf);
+ if (k == NULL)
+- return(false);
++ return(falseval);
+ else
+- return(true);
++ return(trueval);
+ }
+
+
+@@ -557,9 +557,9 @@
+ x->fval = start;
+ return x;
+ } else if ((n == MATCH && i == 1) || (n == NOTMATCH && i == 0))
+- return(true);
++ return(trueval);
+ else
+- return(false);
++ return(falseval);
+ }
+
+
+@@ -573,22 +573,22 @@
+ tempfree(x, "");
+ switch (n) {
+ case BOR:
+- if (i) return(true);
++ if (i) return(trueval);
+ y = execute(a[1]);
+ i = istrue(y);
+ tempfree(y, "");
+- if (i) return(true);
+- else return(false);
++ if (i) return(trueval);
++ else return(falseval);
+ case AND:
+- if ( !i ) return(false);
++ if ( !i ) return(falseval);
+ y = execute(a[1]);
+ i = istrue(y);
+ tempfree(y, "");
+- if (i) return(true);
+- else return(false);
++ if (i) return(trueval);
++ else return(falseval);
+ case NOT:
+- if (i) return(false);
+- else return(true);
++ if (i) return(falseval);
++ else return(trueval);
+ default: /* can't happen */
+ error(MM_ERROR, ":55:Unknown boolean operator %d", n);
+ }
+@@ -613,18 +613,18 @@
+ tempfree(x, "");
+ tempfree(y, "");
+ switch (n) {
+- case LT: if (i<0) return(true);
+- else return(false);
+- case LE: if (i<=0) return(true);
+- else return(false);
+- case NE: if (i!=0) return(true);
+- else return(false);
+- case EQ: if (i == 0) return(true);
+- else return(false);
+- case GE: if (i>=0) return(true);
+- else return(false);
+- case GT: if (i>0) return(true);
+- else return(false);
++ case LT: if (i<0) return(trueval);
++ else return(falseval);
++ case LE: if (i<=0) return(trueval);
++ else return(falseval);
++ case NE: if (i!=0) return(trueval);
++ else return(falseval);
++ case EQ: if (i == 0) return(trueval);
++ else return(falseval);
++ case GE: if (i>=0) return(trueval);
++ else return(falseval);
++ case GT: if (i>0) return(trueval);
++ else return(falseval);
+ default: /* can't happen */
+ error(MM_ERROR, ":56:Unknown relational operator %d", n);
+ }
+@@ -944,7 +944,7 @@
+ }
+ free(buf);
+ }
+- return(true);
++ return(trueval);
+ }
+
+ Cell *arith(Node **a, int n)
+@@ -1155,7 +1155,7 @@
+ x = execute(a[2]);
+ return(x);
+ }
+- return(false);
++ return(falseval);
+ }
+
+ Cell *split(Node **a, int nnn)
+@@ -1312,7 +1312,7 @@
+ tempfree(x, "");
+ x = execute(a[1]);
+ if (isbreak(x)) {
+- x = true;
++ x = trueval;
+ in_loop--;
+ return(x);
+ }
+@@ -1334,7 +1334,7 @@
+ x = execute(a[0]);
+ if (isbreak(x)) {
+ in_loop--;
+- return true;
++ return trueval;
+ }
+ if (isnext(x) || isexit(x) || isret(x)) {
+ in_loop--;
+@@ -1371,7 +1371,7 @@
+ x = execute(a[3]);
+ if (isbreak(x)) { /* turn off break */
+ in_loop--;
+- return true;
++ return trueval;
+ }
+ if (isnext(x) || isexit(x) || isret(x)) {
+ in_loop--;
+@@ -1405,7 +1405,7 @@
+ if (isbreak(x)) {
+ tempfree(vp, "");
+ in_loop--;
+- return true;
++ return trueval;
+ }
+ if (isnext(x) || isexit(x) || isret(x)) {
+ tempfree(vp, "");
+@@ -1416,7 +1416,7 @@
+ }
+ }
+ in_loop--;
+- return true;
++ return trueval;
+ }
+
+ static int closefile(const char *a);
+@@ -1552,7 +1552,7 @@
+ }
+ if (a[1] != 0)
+ fflush(fp);
+- return(true);
++ return(trueval);
+ }
+
+ /*ARGSUSED*/
+@@ -1694,7 +1694,7 @@
+ tempfree(y, "");
+ }
+ y = execute(a[2]); /* replacement string */
+- result = false;
++ result = falseval;
+ if (pmatch(pfa, t)) {
+ growbuf(&buf, &bufsize, CHUNK, NULL, "sub");
+ pb = buf;
+@@ -1730,7 +1730,7 @@
+ "sub");
+ }
+ setsval(x, buf);
+- result = true;;
++ result = trueval;;
+ free(buf);
+ }
+ tempfree(x, "");
+--- a/oawk/awk.def
++++ b/oawk/awk.def
+@@ -215,7 +215,7 @@
+ #define NPA2 4
+
+ extern obj (*proctab[])(node **, int);
+-extern obj true, false;
++extern obj trueval, falseval;
+ extern int pairstack[], paircnt;
+
+ #define cantexec(n) (n->ntype == NVALUE)
+--- a/oawk/run.c
++++ b/oawk/run.c
+@@ -96,8 +96,8 @@
+ #define MAXTMP 20
+ cell tmps[MAXTMP];
+ static cell nullval ={EMPTY,EMPTY,0.0,NUM,0};
+-obj true ={ OBOOL, BTRUE, 0 };
+-obj false ={ OBOOL, BFALSE, 0 };
++obj trueval ={ OBOOL, BTRUE, 0 };
++obj falseval ={ OBOOL, BFALSE, 0 };
+
+ int chrlen(const char *s);
+ int chrdist(const char *s, const char *end);
+@@ -125,7 +125,7 @@
+ node *a;
+
+ if (u==(node *)NULL)
+- return(true);
++ return(trueval);
+ for (a = u; ; a = a->nnext) {
+ if (cantexec(a))
+ return(nodetoobj(a));
+@@ -156,7 +156,7 @@
+ if (a[0] != NULL) {
+ x = execute(a[0]);
+ if (isexit(x))
+- return(true);
++ return(trueval);
+ if (isjump(x))
+ error(FATAL, "unexpected break, continue or next");
+ tempfree(x);
+@@ -173,7 +173,7 @@
+ error(FATAL, "unexpected break, continue or next");
+ tempfree(x);
+ }
+- return(true);
++ return(trueval);
+ }
+
+ /*ARGSUSED*/
+@@ -228,9 +228,9 @@
+ tempfree(x);
+ i = match((struct fa *)a[1], s);
+ if (n==MATCH && i==1 || n==NOTMATCH && i==0)
+- return(true);
++ return(trueval);
+ else
+- return(false);
++ return(falseval);
+ }
+
+ obj boolop(node **a,int n)
+@@ -245,22 +245,22 @@
+ default:
+ error(FATAL, "unknown boolean operator %d", n);
+ case BOR:
+- if (i) return(true);
++ if (i) return(trueval);
+ y = execute(a[1]);
+ i = istrue(y);
+ tempfree(y);
+- if (i) return(true);
+- else return(false);
++ if (i) return(trueval);
++ else return(falseval);
+ case AND:
+- if ( !i ) return(false);
++ if ( !i ) return(falseval);
+ y = execute(a[1]);
+ i = istrue(y);
+ tempfree(y);
+- if (i) return(true);
+- else return(false);
++ if (i) return(trueval);
++ else return(falseval);
+ case NOT:
+- if (i) return(false);
+- else return(true);
++ if (i) return(falseval);
++ else return(trueval);
+ }
+ }
+
+@@ -283,18 +283,18 @@
+ switch (n) {
+ default:
+ error(FATAL, "unknown relational operator %d", n);
+- case LT: if (i<0) return(true);
+- else return(false);
+- case LE: if (i<=0) return(true);
+- else return(false);
+- case NE: if (i!=0) return(true);
+- else return(false);
+- case EQ: if (i==0) return(true);
+- else return(false);
+- case GE: if (i>=0) return(true);
+- else return(false);
+- case GT: if (i>0) return(true);
+- else return(false);
++ case LT: if (i<0) return(trueval);
++ else return(falseval);
++ case LE: if (i<=0) return(trueval);
++ else return(falseval);
++ case NE: if (i!=0) return(trueval);
++ else return(falseval);
++ case EQ: if (i==0) return(trueval);
++ else return(falseval);
++ case GE: if (i>=0) return(trueval);
++ else return(falseval);
++ case GT: if (i>0) return(trueval);
++ else return(falseval);
+ }
+ }
+
+@@ -675,7 +675,7 @@
+ obj x;
+
+ if (a[0]==nullstat)
+- x = true;
++ x = trueval;
+ else
+ x = execute(a[0]);
+ if (istrue(x)) {
+@@ -703,7 +703,7 @@
+ x = execute(a[2]);
+ return(x);
+ }
+- return(false);
++ return(falseval);
+ }
+
+ obj aprintf(node **a,int n)
+@@ -714,7 +714,7 @@
+ if (a[1]==NULL) {
+ printf("%s", x.optr->sval);
+ tempfree(x);
+- return(true);
++ return(trueval);
+ }
+ redirprint(x.optr->sval, (intptr_t)a[1], a[2]);
+ return(x);
+@@ -823,7 +823,7 @@
+ tempfree(x);
+ x = execute(a[1]);
+ if (isbreak(x)) {
+- x = true;
++ x = trueval;
+ return(x);
+ }
+ if (isnext(x) || isexit(x))
+@@ -845,7 +845,7 @@
+ }
+ x = execute(a[3]);
+ if (isbreak(x)) { /* turn off break */
+- x = true;
++ x = trueval;
+ return(x);
+ }
+ if (isnext(x) || isexit(x))
+@@ -871,7 +871,7 @@
+ setsval(vp, cp->nval);
+ x = execute(a[2]);
+ if (isbreak(x)) {
+- x = true;
++ x = trueval;
+ return(x);
+ }
+ if (isnext(x) || isexit(x))
+@@ -879,7 +879,7 @@
+ tempfree(x);
+ }
+ }
+- return (true);
++ return (trueval);
+ }
+
+ obj jump(node **a,int n)
+@@ -971,14 +971,14 @@
+ }
+ if (a[1]==nullstat) {
+ printf("%s", s);
+- return(true);
++ return(trueval);
+ }
+ redirprint(s, (intptr_t)a[1], a[2]);
+- return(false);
++ return(falseval);
+ }
+
+ /*ARGSUSED*/
+-obj nullproc(node **a, int n) {return(true);}
++obj nullproc(node **a, int n) {return(trueval);}
+
+ obj nodetoobj(node *a)
+ {
+--- a/shl/shl.c
++++ b/shl/shl.c
+@@ -322,13 +322,16 @@
+ */
+ struct passwd *pwd = getpwuid(myuid);
+ struct utmpx utx;
++ struct timeval tv;
+ char *id;
+
+ memset(&utx, 0, sizeof utx);
+ strncpy(utx.ut_line, l->l_line + 5, sizeof utx.ut_line);
+ strncpy(utx.ut_user, pwd->pw_name, sizeof utx.ut_user);
+ utx.ut_pid = l->l_pid;
+- gettimeofday(&utx.ut_tv, NULL);
++ gettimeofday(&tv, NULL);
++ utx.ut_tv.tv_sec = tv.tv_sec;
++ utx.ut_tv.tv_usec = tv.tv_usec;
+ if ((id = strrchr(l->l_line, '/')) != NULL)
+ strncpy(utx.ut_id, id, sizeof utx.ut_id);
+ switch (action) {
diff --git a/sys-apps/heirloom-tools/files/heirloom-tools-070715-make-ordering.patch b/sys-apps/heirloom-tools/files/heirloom-tools-070715-make-ordering.patch
new file mode 100644
index 000000000000..64fefef616c2
--- /dev/null
+++ b/sys-apps/heirloom-tools/files/heirloom-tools-070715-make-ordering.patch
@@ -0,0 +1,45 @@
+y.tab.h is side-product of different rule. Explicitly add it to rulesets so
+shuffle and friends won't break graph ordering.
+config.h and awk.h are just a missing dependency.
+https://bugs.gentoo.org/880189
+https://bugs.gentoo.org/896314
+--- a/nawk/Makefile.mk
++++ b/nawk/Makefile.mk
+@@ -17,6 +17,8 @@
+ (echo '1i'; echo '#include <inttypes.h>'; echo '.'; echo 'w';) | \
+ ed -s y.tab.h
+
++y.tab.h: awk.g.c
++
+ awk.g.2001.c: awk.g.2001.y awk.g.c
+ $(YACC) awk.g.2001.y
+ mv -f y.tab.c awk.g.2001.c
+--- a/grep/Makefile.mk
++++ b/grep/Makefile.mk
+@@ -104,5 +104,5 @@
+ svid3.o: grep.h config.h
+ sus.o: grep.h config.h alloc.h
+ su3.o: grep.h config.h alloc.h
+-ac.o: alloc.h grep.h
++ac.o: alloc.h grep.h config.h
+ rcomp.o: grep.h config.h alloc.h
+--- a/oawk/Makefile.mk
++++ b/oawk/Makefile.mk
+@@ -43,7 +43,7 @@
+ lib.o: lib.c
+ $(CC) $(CFLAGSS) $(CPPFLAGS) $(XO5FL) $(LARGEF) $(IUXRE) $(ICOMMON) $(IWCHAR) -c lib.c
+
+-main.o: main.c
++main.o: main.c awk.h
+ $(CC) $(CFLAGSS) $(CPPFLAGS) $(XO5FL) $(LARGEF) $(IUXRE) $(ICOMMON) $(IWCHAR) -c main.c
+
+ parse.o: parse.c
+@@ -55,7 +55,7 @@
+ run.o: run.c
+ $(CC) $(CFLAGSS) $(CPPFLAGS) $(XO5FL) $(LARGEF) $(IUXRE) $(ICOMMON) $(IWCHAR) -c run.c
+
+-tran.o: tran.c
++tran.o: tran.c awk.h
+ $(CC) $(CFLAGSS) $(CPPFLAGS) $(XO5FL) $(LARGEF) $(IUXRE) $(ICOMMON) $(IWCHAR) -c tran.c
+
+ token.o: token.c
diff --git a/sys-apps/heirloom-tools/heirloom-tools-070715-r7.ebuild b/sys-apps/heirloom-tools/heirloom-tools-070715-r7.ebuild
new file mode 100644
index 000000000000..02c8bac8437c
--- /dev/null
+++ b/sys-apps/heirloom-tools/heirloom-tools-070715-r7.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic readme.gentoo-r1 toolchain-funcs
+
+DESCRIPTION="Heirloom toolchest - original Unix tools"
+HOMEPAGE="https://heirloom.sourceforge.net/tools.html"
+SRC_URI="https://downloads.sourceforge.net/heirloom/heirloom/${PV}/heirloom-${PV}.tar.bz2"
+S="${WORKDIR}/heirloom-${PV}"
+
+LICENSE="ZLIB BSD BSD-4 CDDL GPL-2+ LGPL-2.1+ LPL-1.02 Info-ZIP public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+# slightly broken
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/ncurses:=
+ sys-libs/zlib
+ virtual/libcrypt:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-apps/ed
+ app-alternatives/bc
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-major.patch
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-glibc-2.30.patch
+ "${FILESDIR}"/${P}-glibc-2.31.patch
+ "${FILESDIR}"/${P}-gcc-10.patch
+ "${FILESDIR}"/${P}-clang.patch
+ "${FILESDIR}"/${P}-gcc-15.patch
+ "${FILESDIR}"/${P}-make-ordering.patch
+)
+
+src_prepare() {
+ default
+ sed -i "s:\bar\b:$(tc-getAR):g" libwchar/Makefile.mk || die
+}
+
+src_compile() {
+ mypaths=(
+ DEFBIN="${EPREFIX}/usr/lib/${PN}/5bin"
+ SV3BIN="${EPREFIX}/usr/lib/${PN}/5bin"
+ S42BIN="${EPREFIX}/usr/lib/${PN}/5bin/s42"
+ SUSBIN="${EPREFIX}/usr/lib/${PN}/5bin/posix"
+ SU3BIN="${EPREFIX}/usr/lib/${PN}/5bin/posix2001"
+ UCBBIN="${EPREFIX}/usr/lib/${PN}/ucb"
+ CCSBIN="${EPREFIX}/usr/lib/${PN}/ccs/bin"
+ DEFLIB="${EPREFIX}/usr/lib/${PN}/5lib"
+ DEFSBIN="${EPREFIX}/usr/lib/${PN}/5bin"
+ MANDIR="${EPREFIX}/usr/share/man/5man"
+ DFLDIR="${EPREFIX}/etc/default"
+ SPELLHIST="/dev/null"
+ SULOG="${EPREFIX}/var/log/sulog"
+ )
+
+ append-cppflags -D_GNU_SOURCE
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ CFLAGS="${CFLAGS}" \
+ CFLAGS2="${CFLAGS}" \
+ CFLAGSS="${CFLAGS}" \
+ CFLAGSU="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LCURS="$($(tc-getPKG_CONFIG) --libs ncurses)" \
+ LDFLAGS="${LDFLAGS}" \
+ LIBZ="-lz" \
+ "${mypaths[@]}"
+}
+
+src_install() {
+ # we don't want to strip here, so use "true" as noop
+ emake -j1 \
+ STRIP="true" \
+ ROOT="${D}" \
+ "${mypaths[@]}" \
+ install
+ rm -r "${D}/dev" || die
+
+ dodoc CHANGES README
+
+ local DOC_CONTENTS="You may want to adjust your PATH, to enable
+ using the apps of ${PN} by default.
+ \\n\\nMan pages are installed in /usr/share/man/5man/.
+ You may need to set MANPATH to access them."
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-12 20:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-10 19:35 [gentoo-commits] repo/gentoo:master commit in: sys-apps/heirloom-tools/files/, sys-apps/heirloom-tools/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2020-03-26 9:22 David Seifert
2020-03-26 17:46 Joonas Niilola
2020-09-12 15:13 Stephan Hartmann
2025-04-12 20:50 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox