pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
dma: Only link with libresolv where needed
Module Name: pkgsrc-wip
Committed By: Philip Dodd <orange.spyderman%gmail.com@localhost>
Pushed By: orange.spyderman
Date: Sun Nov 22 08:18:58 2026 +0000
Changeset: 08a4c1120c0abe344cad3c152dc15feafffc1e93
Modified Files:
dma/Makefile
dma/distinfo
dma/patches/patch-Makefile
Log Message:
dma: Only link with libresolv where needed
Pass the platform libraries through LIBS and link them after the
object files. Keep -lresolv on Linux, macOS and SunOS, and move
-lsocket and -lnsl from LDFLAGS to LIBS on SunOS.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=08a4c1120c0abe344cad3c152dc15feafffc1e93
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
dma/Makefile | 6 +++++-
dma/distinfo | 2 +-
dma/patches/patch-Makefile | 14 +++++++++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diffs:
diff --git a/dma/Makefile b/dma/Makefile
index ad6ef0dc59..b6a2608200 100644
--- a/dma/Makefile
+++ b/dma/Makefile
@@ -17,7 +17,10 @@ EGDIR= ${PREFIX}/share/examples/${PKGBASE}
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
USE_TOOLS+= flex byacc
-LDFLAGS.SunOS+= -lsocket -lnsl
+
+LIBS.Darwin+= -lresolv
+LIBS.Linux+= -lresolv
+LIBS.SunOS+= -lresolv -lsocket -lnsl
USE_LANGUAGES= c
@@ -48,6 +51,7 @@ CFLAGS+= -DDMA_GROUP=\"${DMA_GROUP}\"
CFLAGS+= -DDMA_ROOT_USER=\"${DMA_ROOT_USER}\"
MAKE_ENV+= CONFDIR=${PKG_SYSCONFDIR}
+MAKE_ENV+= LIBS=${LIBS:Q}
MAKE_FLAGS= "LIBEXEC=${PREFIX}/libexec"
MAKE_FLAGS+= "MAN=${PREFIX}/${PKGMANDIR}"
diff --git a/dma/distinfo b/dma/distinfo
index 73ef6dcd41..0aa03c9472 100644
--- a/dma/distinfo
+++ b/dma/distinfo
@@ -3,7 +3,7 @@ $NetBSD$
BLAKE2s (dma-0.14.tar.gz) = 12d3e184851f64fe856cf79a01789b7d18fa05eeb0b03955b3f3e49be1b990eb
SHA512 (dma-0.14.tar.gz) = c3ef94bb6f8fca64af673be392b9ae7f151bcfefb2996683dee101f15d777912f8ff5ecc9442c9c70e6d530db53baa4d71ff379018fb62632c85a8a61cc4b407
Size (dma-0.14.tar.gz) = 37572 bytes
-SHA1 (patch-Makefile) = e8db07f69c7f80c4faf39c26747aaf2211895a00
+SHA1 (patch-Makefile) = d9d1f5f16a70e26010bf5d97cd16d397d09c14a4
SHA1 (patch-dma.c) = be9e8fe53d808c6249802827de08de85efce15e1
SHA1 (patch-dma.h) = 1bb7e0b081d7bc4eaeefff86fb09cdafd310de10
SHA1 (patch-dns.c) = bb5b404558e7136e3d61971be5e774ac9e47814a
diff --git a/dma/patches/patch-Makefile b/dma/patches/patch-Makefile
index 65357a7643..48178a44ef 100644
--- a/dma/patches/patch-Makefile
+++ b/dma/patches/patch-Makefile
@@ -4,10 +4,22 @@ Stage executables without privileged ownership or modes.
Install dma into libexec alongside dma-mbox-create (rather than sbin).
The package declares their final permissions using SPECIAL_PERMS.
+
--- Makefile.orig
+++ Makefile
-@@ -55,2 +55,2 @@
+@@ -17,3 +17,3 @@
+ CFLAGS?= -O -pipe
+-LDADD?= -lssl -lcrypto -lresolv
++LDADD?= -lssl -lcrypto
+
+@@ -52,4 +52,4 @@
+ ${INSTALL} -d ${DESTDIR}${MAN}/man8 ${DESTDIR}${LIBEXEC}
- ${INSTALL} -m 2755 -o root -g mail dma ${DESTDIR}${SBIN}
- ${INSTALL} -m 4754 -o root -g mail dma-mbox-create ${DESTDIR}${LIBEXEC}
+ ${INSTALL} -m 0555 dma ${DESTDIR}${LIBEXEC}
+ ${INSTALL} -m 0555 dma-mbox-create ${DESTDIR}${LIBEXEC}
+ ${INSTALL} -m 0644 dma.8 ${DESTDIR}${MAN}/man8/
+@@ -98,3 +98,3 @@
+ dma: ${OBJS}
+- ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
++ ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} ${LIBS}
Home |
Main Index |
Thread Index |
Old Index