| @@ -1,100 +1,98 @@ | | | @@ -1,100 +1,98 @@ |
1 | # $NetBSD: Makefile,v 1.45 2023/08/30 17:56:20 vins Exp $ | | 1 | # $NetBSD: Makefile,v 1.46 2023/09/02 15:26:58 vins Exp $ |
2 | | | 2 | |
3 | DISTNAME= fam-2.7.0 | | 3 | DISTNAME= fam-2.7.0 |
4 | PKGREVISION= 9 | | 4 | PKGREVISION= 9 |
5 | CATEGORIES= sysutils devel | | 5 | CATEGORIES= sysutils devel |
6 | #MASTER_SITES= ftp://oss.sgi.com/projects/fam/download/stable/ | | 6 | #MASTER_SITES= ftp://oss.sgi.com/projects/fam/download/stable/ |
7 | MASTER_SITES+= ${MASTER_SITE_GENTOO:=distfiles/} | | 7 | MASTER_SITES+= ${MASTER_SITE_GENTOO:=distfiles/} |
8 | | | 8 | |
9 | CONFLICTS+= gamin-[0-9]* | | 9 | CONFLICTS+= gamin-[0-9]* |
10 | | | 10 | |
11 | MAINTAINER= pkgsrc-users@NetBSD.org | | 11 | MAINTAINER= pkgsrc-users@NetBSD.org |
12 | #HOMEPAGE= http://oss.sgi.com/projects/fam/ | | 12 | #HOMEPAGE= http://oss.sgi.com/projects/fam/ |
13 | COMMENT= File Alteration Monitor | | 13 | COMMENT= File Alteration Monitor |
14 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 # fam and libfam | | 14 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 # fam and libfam |
15 | | | 15 | |
16 | # fam is bundled with IRIX | | 16 | # fam is bundled with IRIX |
17 | NOT_FOR_PLATFORM= IRIX-*-* | | 17 | NOT_FOR_PLATFORM= IRIX-*-* |
18 | | | 18 | |
19 | USE_TOOLS+= gmake | | 19 | USE_TOOLS+= gmake |
20 | USE_LIBTOOL= YES | | 20 | USE_LIBTOOL= YES |
21 | GNU_CONFIGURE= YES | | 21 | GNU_CONFIGURE= YES |
22 | USE_LANGUAGES= c c++ | | 22 | USE_LANGUAGES= c c++ |
23 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} | | 23 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q} |
24 | | | 24 | |
25 | EGDIR= ${PREFIX}/share/examples/fam | | 25 | EGDIR= ${PREFIX}/share/examples/fam |
26 | CONF_FILES= ${EGDIR}/fam.conf ${PKG_SYSCONFDIR}/fam.conf | | 26 | CONF_FILES= ${EGDIR}/fam.conf ${PKG_SYSCONFDIR}/fam.conf |
27 | | | 27 | |
28 | RCD_SCRIPTS= famd | | 28 | RCD_SCRIPTS= famd |
29 | | | 29 | |
30 | SUBST_CLASSES+= paths | | 30 | SUBST_CLASSES+= paths |
31 | SUBST_MESSAGE.paths= Fixing hardcoded paths. | | 31 | SUBST_MESSAGE.paths= Fixing hardcoded paths. |
32 | SUBST_STAGE.paths= pre-configure | | 32 | SUBST_STAGE.paths= pre-configure |
33 | SUBST_FILES.paths= man/famd.conf.5 man/famd.8 | | 33 | SUBST_FILES.paths= man/famd.conf.5 man/famd.8 |
34 | SUBST_SED.paths= -e 's,/usr/local/etc/,${PKG_SYSCONFDIR}/,g' | | 34 | SUBST_SED.paths= -e 's,/usr/local/etc/,${PKG_SYSCONFDIR}/,g' |
35 | | | 35 | |
36 | PKG_OPTIONS_VAR= PKG_OPTIONS.fam | | 36 | PKG_OPTIONS_VAR= PKG_OPTIONS.fam |
37 | PKG_SUPPORTED_OPTIONS= kqueue | | 37 | PKG_SUPPORTED_OPTIONS= kqueue |
38 | | | 38 | |
39 | .include "../../mk/bsd.options.mk" | | 39 | .include "../../mk/bsd.options.mk" |
40 | | | 40 | |
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") |
43 | CPPFLAGS+= -DHAVE_KQUEUE | | 43 | CPPFLAGS+= -DHAVE_KQUEUE |
44 | | | 44 | |
45 | SUBST_CLASSES+= kqueue | | 45 | SUBST_CLASSES+= kqueue |
46 | SUBST_MESSAGE.kqueue= Enabling kqueue monitoring. | | 46 | SUBST_MESSAGE.kqueue= Enabling kqueue monitoring. |
47 | SUBST_STAGE.kqueue= pre-configure | | 47 | SUBST_STAGE.kqueue= pre-configure |
48 | SUBST_FILES.kqueue= src/Makefile.in | | 48 | SUBST_FILES.kqueue= src/Makefile.in |
49 | SUBST_SED.kqueue= -e 's,@MONITOR_FUNCS@,IMonKQueue,g' | | 49 | SUBST_SED.kqueue= -e 's,@MONITOR_FUNCS@,IMonKQueue,g' |
50 | SUBST_SED.kqueue+= -e 's,@LIBS@,@LIBS@ -lpthread,g' | | 50 | SUBST_SED.kqueue+= -e 's,@LIBS@,@LIBS@ -lpthread,g' |
51 | | | 51 | |
52 | MESSAGE_SRC= ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.kqueue | | 52 | MESSAGE_SRC= ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.kqueue |
53 | | | 53 | |
54 | .include "../../mk/pthread.buildlink3.mk" | | 54 | .include "../../mk/pthread.buildlink3.mk" |
55 | .endif | | 55 | .endif |
56 | | | 56 | |
57 | .if ${OPSYS} == "Linux" | | 57 | .if ${OPSYS} == "Linux" |
58 | CPPFLAGS+= -I${PREFIX}/include/tirpc | | 58 | # glibc lacks RPC support. |
59 | MAKEFLAGS+= LDFLAGS="${LDFLAGS} -ltirpc" | | | |
60 | | | | |
61 | .include "../../devel/libtirpc/buildlink3.mk" | | 59 | .include "../../devel/libtirpc/buildlink3.mk" |
62 | .endif | | 60 | .endif |
63 | | | 61 | |
64 | CPPFLAGS.Darwin+= -DNDEBUG | | 62 | CPPFLAGS.Darwin+= -DNDEBUG |
65 | LDFLAGS.SunOS+= -lsocket -lnsl | | 63 | LDFLAGS.SunOS+= -lsocket -lnsl |
66 | | | 64 | |
67 | SUBST_CLASSES.SunOS+= sunfix | | 65 | SUBST_CLASSES.SunOS+= sunfix |
68 | SUBST_MESSAGE.sunfix= Fixing ${OPSYS} namespace collision. | | 66 | SUBST_MESSAGE.sunfix= Fixing ${OPSYS} namespace collision. |
69 | SUBST_STAGE.sunfix= pre-configure | | 67 | SUBST_STAGE.sunfix= pre-configure |
70 | SUBST_FILES.sunfix+= lib/Client.c++ | | 68 | SUBST_FILES.sunfix+= lib/Client.c++ |
71 | SUBST_FILES.sunfix+= src/ClientConnection.c++ src/ClientConnection.h | | 69 | SUBST_FILES.sunfix+= src/ClientConnection.c++ src/ClientConnection.h |
72 | SUBST_FILES.sunfix+= src/LocalClient.c++ src/LocalClient.h | | 70 | SUBST_FILES.sunfix+= src/LocalClient.c++ src/LocalClient.h |
73 | SUBST_FILES.sunfix+= src/Listener.c++ | | 71 | SUBST_FILES.sunfix+= src/Listener.c++ |
74 | SUBST_FILES.sunfix+= src/TCP_Client.h | | 72 | SUBST_FILES.sunfix+= src/TCP_Client.h |
75 | SUBST_SED.sunfix= -e 's/sun\([^_]\)/sa_un\1/g' | | 73 | SUBST_SED.sunfix= -e 's/sun\([^_]\)/sa_un\1/g' |
76 | | | 74 | |
77 | SUBST_CLASSES.SunOS+= dirent | | 75 | SUBST_CLASSES.SunOS+= dirent |
78 | SUBST_MESSAGE.dirent= Fixing old sys/dir.h usage. | | 76 | SUBST_MESSAGE.dirent= Fixing old sys/dir.h usage. |
79 | SUBST_STAGE.dirent= pre-configure | | 77 | SUBST_STAGE.dirent= pre-configure |
80 | SUBST_FILES.dirent+= src/Directory.c++ | | 78 | SUBST_FILES.dirent+= src/Directory.c++ |
81 | SUBST_FILES.dirent+= src/DirectoryScanner.c++ src/DirectoryScanner.h | | 79 | SUBST_FILES.dirent+= src/DirectoryScanner.c++ src/DirectoryScanner.h |
82 | SUBST_SED.dirent= -e 's,sys/dir.h,dirent.h,g' | | 80 | SUBST_SED.dirent= -e 's,sys/dir.h,dirent.h,g' |
83 | SUBST_SED.dirent+= -e 's/struct direct/struct dirent/g' | | 81 | SUBST_SED.dirent+= -e 's/struct direct/struct dirent/g' |
84 | | | 82 | |
85 | .include "../../mk/compiler.mk" | | 83 | .include "../../mk/compiler.mk" |
86 | | | 84 | |
87 | # type 'unsigned long' to 'rpcprog_t' (aka 'unsigned int') | | 85 | # type 'unsigned long' to 'rpcprog_t' (aka 'unsigned int') |
88 | .if !empty(PKGSRC_COMPILER:Mclang) | | 86 | .if !empty(PKGSRC_COMPILER:Mclang) |
89 | CXXFLAGS.SunOS+= -Wno-c++11-narrowing | | 87 | CXXFLAGS.SunOS+= -Wno-c++11-narrowing |
90 | .endif | | 88 | .endif |
91 | | | 89 | |
92 | .if !empty(PKGSRC_COMPILER:Msunpro) | | 90 | .if !empty(PKGSRC_COMPILER:Msunpro) |
93 | BUILDLINK_TRANSFORM+= rm:-lstdc++ | | 91 | BUILDLINK_TRANSFORM+= rm:-lstdc++ |
94 | .endif | | 92 | .endif |
95 | | | 93 | |
96 | post-extract: | | 94 | post-extract: |
97 | ${CP} ${FILESDIR}/IMonKQueue.c++ ${WRKSRC}/src | | 95 | ${CP} ${FILESDIR}/IMonKQueue.c++ ${WRKSRC}/src |
98 | ${CP} ${FILESDIR}/imon-compat.h ${WRKSRC}/src | | 96 | ${CP} ${FILESDIR}/imon-compat.h ${WRKSRC}/src |
99 | | | 97 | |
100 | .include "../../mk/bsd.pkg.mk" | | 98 | .include "../../mk/bsd.pkg.mk" |