pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/libpcap



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Fri Jan 24 19:22:02 UTC 2025

Modified Files:
        pkgsrc/net/libpcap: buildlink3.mk

Log Message:
net/libpcap: Work around oopsie in netbsd-9 builtin pcap-config.

Should resolve failures like net/tcptraceroute's:

ld: cannot find -l@PACKAGE_NAME@


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/net/libpcap/buildlink3.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/libpcap/buildlink3.mk
diff -u pkgsrc/net/libpcap/buildlink3.mk:1.25 pkgsrc/net/libpcap/buildlink3.mk:1.26
--- pkgsrc/net/libpcap/buildlink3.mk:1.25       Sat Mar 16 19:48:38 2024
+++ pkgsrc/net/libpcap/buildlink3.mk    Fri Jan 24 19:22:02 2025
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.25 2024/03/16 19:48:38 nia Exp $
+# $NetBSD: buildlink3.mk,v 1.26 2025/01/24 19:22:02 riastradh Exp $
 
 .include "../../mk/bsd.fast.prefs.mk"
 
@@ -22,6 +22,24 @@ BUILDLINK_PKGSRCDIR.libpcap?=        ../../net/
 BUILDLINK_LDADD.libpcap+=      -lnsl -lsocket
 BUILDLINK_LDFLAGS.libpcap?=    ${BUILDLINK_LDADD.libpcap}
 .endif
+
+# NetBSD 9.0 shipped with an oopsie in pcap-config -- various
+# @variables@ like @PACKAGE_NAME@ were not substituted.
+.if ${OPSYS} == "NetBSD" && ${OS_VERSION:M9.*}
+CHECK_BUILTIN.libpcap:=                yes
+.  include "../../net/libpcap/builtin.mk"
+CHECK_BUILTIN.libpcap:=                no
+.  if ${USE_BUILTIN.libpcap:U:tl} == "yes"
+TOOLS_CREATE+=                 pcap-config
+TOOLS_SCRIPT.pcap-config+=     /usr/bin/pcap-config "$$@" | /usr/bin/sed \
+       -e 's|@PACKAGE_NAME@|pcap|g' \
+       -e 's|@V_RPATH_OPT@|-Wl,-rpath,|g' \
+       -e 's|@exec_prefix@|/usr|g' \
+       -e 's|@prefix@|/usr|g' \
+       # end of sed
+.  endif
+.endif
+
 .endif # LIBPCAP_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -libpcap



Home | Main Index | Thread Index | Old Index