Wed Sep 6 10:50:29 2023 UTC ()
sysutils/fam: fix linking error on Linux for missing standard libraries.


(vins)
diff -r1.46 -r1.47 pkgsrc/sysutils/fam/Makefile

cvs diff -r1.46 -r1.47 pkgsrc/sysutils/fam/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/fam/Makefile 2023/09/02 15:26:58 1.46
+++ pkgsrc/sysutils/fam/Makefile 2023/09/06 10:50:28 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.46 2023/09/02 15:26:58 vins Exp $ 1# $NetBSD: Makefile,v 1.47 2023/09/06 10:50:28 vins Exp $
2 2
3DISTNAME= fam-2.7.0 3DISTNAME= fam-2.7.0
4PKGREVISION= 9 4PKGREVISION= 9
5CATEGORIES= sysutils devel 5CATEGORIES= sysutils devel
6#MASTER_SITES= ftp://oss.sgi.com/projects/fam/download/stable/ 6#MASTER_SITES= ftp://oss.sgi.com/projects/fam/download/stable/
7MASTER_SITES+= ${MASTER_SITE_GENTOO:=distfiles/} 7MASTER_SITES+= ${MASTER_SITE_GENTOO:=distfiles/}
8 8
9CONFLICTS+= gamin-[0-9]* 9CONFLICTS+= gamin-[0-9]*
10 10
11MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
12#HOMEPAGE= http://oss.sgi.com/projects/fam/ 12#HOMEPAGE= http://oss.sgi.com/projects/fam/
13COMMENT= File Alteration Monitor 13COMMENT= File Alteration Monitor
14LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 # fam and libfam 14LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 # fam and libfam
@@ -41,27 +41,26 @@ PKG_SUPPORTED_OPTIONS= kqueue @@ -41,27 +41,26 @@ PKG_SUPPORTED_OPTIONS= kqueue
41.if !empty(PKG_OPTIONS:Mkqueue) && \ 41.if !empty(PKG_OPTIONS:Mkqueue) && \
42 (${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD") 42 (${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD")
43CPPFLAGS+= -DHAVE_KQUEUE 43CPPFLAGS+= -DHAVE_KQUEUE
44 44
45SUBST_CLASSES+= kqueue 45SUBST_CLASSES+= kqueue
46SUBST_MESSAGE.kqueue= Enabling kqueue monitoring. 46SUBST_MESSAGE.kqueue= Enabling kqueue monitoring.
47SUBST_STAGE.kqueue= pre-configure 47SUBST_STAGE.kqueue= pre-configure
48SUBST_FILES.kqueue= src/Makefile.in 48SUBST_FILES.kqueue= src/Makefile.in
49SUBST_SED.kqueue= -e 's,@MONITOR_FUNCS@,IMonKQueue,g' 49SUBST_SED.kqueue= -e 's,@MONITOR_FUNCS@,IMonKQueue,g'
50SUBST_SED.kqueue+= -e 's,@LIBS@,@LIBS@ -lpthread,g' 50SUBST_SED.kqueue+= -e 's,@LIBS@,@LIBS@ -lpthread,g'
51 51
52MESSAGE_SRC= ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.kqueue 52MESSAGE_SRC= ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.kqueue
53 53
54.include "../../mk/pthread.buildlink3.mk" 
55.endif 54.endif
56 55
57.if ${OPSYS} == "Linux" 56.if ${OPSYS} == "Linux"
58# glibc lacks RPC support.  57# glibc lacks RPC support.
59.include "../../devel/libtirpc/buildlink3.mk" 58.include "../../devel/libtirpc/buildlink3.mk"
60.endif 59.endif
61 60
62CPPFLAGS.Darwin+= -DNDEBUG 61CPPFLAGS.Darwin+= -DNDEBUG
63LDFLAGS.SunOS+= -lsocket -lnsl 62LDFLAGS.SunOS+= -lsocket -lnsl
64 63
65SUBST_CLASSES.SunOS+= sunfix 64SUBST_CLASSES.SunOS+= sunfix
66SUBST_MESSAGE.sunfix= Fixing ${OPSYS} namespace collision. 65SUBST_MESSAGE.sunfix= Fixing ${OPSYS} namespace collision.
67SUBST_STAGE.sunfix= pre-configure 66SUBST_STAGE.sunfix= pre-configure
@@ -85,14 +84,16 @@ SUBST_SED.dirent+= -e 's/struct direct/s @@ -85,14 +84,16 @@ SUBST_SED.dirent+= -e 's/struct direct/s
85# type 'unsigned long' to 'rpcprog_t' (aka 'unsigned int') 84# type 'unsigned long' to 'rpcprog_t' (aka 'unsigned int')
86.if !empty(PKGSRC_COMPILER:Mclang) 85.if !empty(PKGSRC_COMPILER:Mclang)
87CXXFLAGS.SunOS+= -Wno-c++11-narrowing 86CXXFLAGS.SunOS+= -Wno-c++11-narrowing
88.endif 87.endif
89 88
90.if !empty(PKGSRC_COMPILER:Msunpro) 89.if !empty(PKGSRC_COMPILER:Msunpro)
91BUILDLINK_TRANSFORM+= rm:-lstdc++ 90BUILDLINK_TRANSFORM+= rm:-lstdc++
92.endif 91.endif
93 92
94post-extract: 93post-extract:
95 ${CP} ${FILESDIR}/IMonKQueue.c++ ${WRKSRC}/src 94 ${CP} ${FILESDIR}/IMonKQueue.c++ ${WRKSRC}/src
96 ${CP} ${FILESDIR}/imon-compat.h ${WRKSRC}/src 95 ${CP} ${FILESDIR}/imon-compat.h ${WRKSRC}/src
97 96
 97.include "../../mk/pthread.buildlink3.mk"
 98.include "../../mk/krb5.buildlink3.mk"
98.include "../../mk/bsd.pkg.mk" 99.include "../../mk/bsd.pkg.mk"