summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-02-18 18:28:47 +0100
committerDavid Seifert <soap@gentoo.org>2023-02-18 18:28:47 +0100
commitcd400b97268af2c440ae4a2e2a40f491a81fca27 (patch)
treeabf36c762131a414548ae6f070b11b163de5c836 /sys-process
parentsys-process/daemontools: fix C99 decls (diff)
downloadgentoo-cd400b97268af2c440ae4a2e2a40f491a81fca27.tar.gz
gentoo-cd400b97268af2c440ae4a2e2a40f491a81fca27.tar.bz2
gentoo-cd400b97268af2c440ae4a2e2a40f491a81fca27.zip
sys-process/daemontools: honour AR, CC
Closes: https://bugs.gentoo.org/721882 Closes: https://bugs.gentoo.org/729424 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/daemontools/daemontools-0.76-r10.ebuild (renamed from sys-process/daemontools/daemontools-0.76-r9.ebuild)23
-rw-r--r--sys-process/daemontools/files/0.76-makefile.patch137
2 files changed, 145 insertions, 15 deletions
diff --git a/sys-process/daemontools/daemontools-0.76-r9.ebuild b/sys-process/daemontools/daemontools-0.76-r10.ebuild
index bce6a908e6e5..5bf42bc7b17d 100644
--- a/sys-process/daemontools/daemontools-0.76-r9.ebuild
+++ b/sys-process/daemontools/daemontools-0.76-r10.ebuild
@@ -1,42 +1,35 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit fixheadtails flag-o-matic qmail
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Collection of tools for managing UNIX services"
HOMEPAGE="https://cr.yp.to/daemontools.html"
-SRC_URI="https://cr.yp.to/daemontools/${P}.tar.gz
+SRC_URI="
+ https://cr.yp.to/daemontools/${P}.tar.gz
http://smarden.org/pape/djb/manpages/${P}-man-20020131.tar.gz"
+S="${WORKDIR}/admin/${P}/src"
LICENSE="public-domain GPL-2" # GPL-2 for init script
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="selinux static"
-DEPEND=""
RDEPEND="selinux? ( sec-policy/selinux-daemontools )"
-S="${WORKDIR}/admin/${P}/src"
-
PATCHES=(
"${FILESDIR}"/${PV}-errno.patch
"${FILESDIR}"/${PV}-C99-decls.patch
+ "${FILESDIR}"/${PV}-makefile.patch
)
-src_prepare() {
- default
-
- ht_fix_file Makefile print-{cc,ld}.sh
-
+src_configure() {
+ tc-export AR CC
use static && append-ldflags -static
- qmail_set_cc
-}
-src_compile() {
touch home || die
- emake
}
src_install() {
diff --git a/sys-process/daemontools/files/0.76-makefile.patch b/sys-process/daemontools/files/0.76-makefile.patch
new file mode 100644
index 000000000000..3e47f278b82d
--- /dev/null
+++ b/sys-process/daemontools/files/0.76-makefile.patch
@@ -0,0 +1,137 @@
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@
+ stralloc_eady.o stralloc_opyb.o stralloc_opys.o stralloc_pend.o \
+ strerr_die.o strerr_sys.o subgetopt.o supervise supervise.o svc svc.o \
+ svok svok.o svscan svscan.o svscanboot svstat svstat.o sysdeps \
+- systype tai64n tai64n.o tai64nlocal tai64nlocal.o tai_now.o \
++ tai64n tai64n.o tai64nlocal tai64nlocal.o tai_now.o \
+ tai_pack.o tai_sub.o tai_unpack.o taia_add.o taia_approx.o \
+ taia_frac.o taia_less.o taia_now.o taia_pack.o taia_sub.o taia_uint.o \
+ time.a timestamp.o uint64.h unix.a wait_nohang.o wait_pid.o
+@@ -85,16 +85,16 @@
+ choose: choose.sh home warn-auto.sh
+ rm -f choose
+ cat warn-auto.sh choose.sh \
+- | sed s}HOME}"`head -1 home`"}g \
++ | sed s}HOME}"`head -n 1 home`"}g \
+ > choose
+ chmod 555 choose
+
+ coe.o: coe.c coe.h compile
+ ./compile coe.c
+
+-compile: conf-cc print-cc.sh systype warn-auto.sh
++compile: conf-cc print-cc.sh warn-auto.sh
+ rm -f compile
+- sh print-cc.sh > compile
++ cat print-cc.sh > compile
+ chmod 555 compile
+
+ deepsleep.o: compile deepsleep.c deepsleep.h iopause.h tai.h taia.h \
+@@ -179,9 +179,9 @@
+
+ it: rts sysdeps
+
+-load: conf-ld print-ld.sh systype warn-auto.sh
++load: conf-ld print-ld.sh warn-auto.sh
+ rm -f load
+- sh print-ld.sh > load
++ cat print-ld.sh > load
+ chmod 555 load
+
+ lock_ex.o: compile hasflock.h lock.h lock_ex.c
+@@ -190,9 +190,9 @@
+ lock_exnb.o: compile hasflock.h lock.h lock_exnb.c
+ ./compile lock_exnb.c
+
+-makelib: print-ar.sh systype warn-auto.sh
++makelib: print-ar.sh warn-auto.sh
+ rm -f makelib
+- sh print-ar.sh > makelib
++ cat print-ar.sh > makelib
+ chmod 555 makelib
+
+ match.o: compile match.c match.h
+@@ -390,7 +390,7 @@
+ svscanboot: home svscanboot.sh warn-auto.sh
+ rm -f svscanboot
+ cat warn-auto.sh svscanboot.sh \
+- | sed s}HOME}"`head -1 home`"}g \
++ | sed s}HOME}"`head -n 1 home`"}g \
+ > svscanboot
+ chmod 555 svscanboot
+
+@@ -402,10 +402,10 @@
+ ./compile svstat.c
+
+ sysdeps: compile direntry.h hasflock.h hasmkffo.h hassgact.h \
+-hassgprm.h hasshsgr.h haswaitp.h iopause.h load select.h systype \
++hassgprm.h hasshsgr.h haswaitp.h iopause.h load select.h \
+ uint64.h
+ rm -f sysdeps
+- cat systype compile load >> sysdeps
++ cat compile load >> sysdeps
+ grep sysdep direntry.h >> sysdeps
+ grep sysdep haswaitp.h >> sysdeps
+ grep sysdep hassgact.h >> sysdeps
+@@ -417,9 +417,6 @@
+ grep sysdep hasflock.h >> sysdeps
+ grep sysdep hasshsgr.h >> sysdeps
+
+-systype: find-systype.sh trycpp.c x86cpuid.c
+- sh find-systype.sh > systype
+-
+ tai64n: byte.a load tai64n.o time.a timestamp.o unix.a
+ ./load tai64n timestamp.o time.a unix.a byte.a
+
+--- a/print-ar.sh
++++ b/print-ar.sh
+@@ -1,14 +1,7 @@
+-cat warn-auto.sh
+-echo 'main="$1"; shift'
+-echo 'rm -f "$main"'
+-echo 'ar cr "$main" ${1+"$@"}'
+-case "`cat systype`" in
+- sunos-5.*) ;;
+- unix_sv*) ;;
+- irix64-*) ;;
+- irix-*) ;;
+- dgux-*) ;;
+- hp-ux-*) ;;
+- sco*) ;;
+- *) echo 'ranlib "$main"' ;;
+-esac
++#!/usr/bin/env sh
++
++lib=$1
++shift
++
++echo ${AR} rcs "${lib}" "$@"
++${AR} rcs "${lib}" "$@"
+--- a/print-cc.sh
++++ b/print-cc.sh
+@@ -1,5 +1,4 @@
+-cc="`head -1 conf-cc`"
+-systype="`cat systype`"
++#!/usr/bin/env sh
+
+-cat warn-auto.sh
+-echo exec "$cc" '-c ${1+"$@"}'
++echo ${CC} ${CPPFLAGS} ${CFLAGS} -c "$@"
++${CC} ${CPPFLAGS} ${CFLAGS} -c "$@"
+--- a/print-ld.sh
++++ b/print-ld.sh
+@@ -1,6 +1,7 @@
+-ld="`head -1 conf-ld`"
+-systype="`cat systype`"
++#!/usr/bin/env sh
+
+-cat warn-auto.sh
+-echo 'main="$1"; shift'
+-echo exec "$ld" '-o "$main" "$main".o ${1+"$@"}'
++exe=$1
++shift
++
++echo ${CC} ${CFLAGS} ${LDFLAGS} -o "${exe}" "${exe}.o" "$@" ${LIBS}
++${CC} ${CFLAGS} ${LDFLAGS} -o "${exe}" "${exe}.o" "$@" ${LIBS}