aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-08-02 19:28:30 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-08-02 21:18:13 +0000
commitf83a6b9b6256ee9e5b14a69cc47f865fb6f500dc (patch)
tree5c04ca85928c42c340ab5547f96e5c5fb270db06
parent11254016eedc9bcbe80e36f05137f1e6ea341fd1 (diff)
downloadports-f83a6b9b6256ee9e5b14a69cc47f865fb6f500dc.tar.gz
ports-f83a6b9b6256ee9e5b14a69cc47f865fb6f500dc.zip
sysutils/ganglia-monitor-core: Fix build with llvm16
- Utilize OPTIONSNG where possible Approved by: portmgr (blanket) Sponsored by: The FreeBSD Foundation
-rw-r--r--sysutils/ganglia-monitor-core/Makefile55
1 files changed, 27 insertions, 28 deletions
diff --git a/sysutils/ganglia-monitor-core/Makefile b/sysutils/ganglia-monitor-core/Makefile
index 0b5d18181e61..79f99de0d52a 100644
--- a/sysutils/ganglia-monitor-core/Makefile
+++ b/sysutils/ganglia-monitor-core/Makefile
@@ -20,46 +20,45 @@ LIB_DEPENDS= libapr-1.so:devel/apr1 \
libpcre.so:devel/pcre \
libexpat.so:textproc/expat2
-USES= libtool pkgconfig
+USES= libtool localbase:ldflags pkgconfig
+USE_LDCONFIG= yes
+USE_RC_SUBR= gmond
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-setuid=ganglia --enable-setgid=ganglia \
--disable-python
CONFIGURE_ENV= GANGLIA_ACK_SYSCONFDIR=1
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+
+INSTALL_TARGET= install-strip
+
+SUB_FILES+= pkg-message
USERS= ganglia
GROUPS= ganglia
-OPTIONS_DEFINE= GMETAD
-OPTIONS_DEFAULT= GMETAD
-GMETAD_DESC= include gmetad
-
PLIST_SUB+= PORTVERSION=${PORTVERSION}
-SUB_FILES+= pkg-message
+OPTIONS_DEFINE= GMETAD
+OPTIONS_DEFAULT= GMETAD
+OPTIONS_SUB= yes
-INSTALL_TARGET= install-strip
+GMETAD_DESC= include gmetad
-USE_RC_SUBR= gmond
+GMETAD_LIB_DEPENDS= librrd.so:databases/rrdtool
+GMETAD_CONFIGURE_ON= --with-gmetad
+GMETAD_SUB_LIST= GMETAD=""
+GMETAD_SUB_LIST_OFF= GMETAD="\#"
.include <bsd.port.options.mk>
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+CFLAGS+= -Wno-error=incompatible-function-pointer-types
+.endif
+
.if ${PORT_OPTIONS:MGMETAD}
USE_RC_SUBR+= gmetad
-
-LIB_DEPENDS+= librrd.so:databases/rrdtool
-CONFIGURE_ARGS+= --with-gmetad
-PLIST_SUB+= GMETAD=""
-SUB_LIST+= GMETAD=""
-.else
-PLIST_SUB+= GMETAD="@comment "
-SUB_LIST+= GMETAD="\#"
.endif
-USE_LDCONFIG= yes
-
CONF_DIR= ${PREFIX}/etc
MODULES= modcpu.so \
@@ -91,14 +90,6 @@ post-build:
post-install:
${INSTALL_DATA} ${WRKDIR}/gmond.conf \
${STAGEDIR}${PREFIX}/etc/gmond.conf.sample
-.if ${PORT_OPTIONS:MGMETAD}
- ${INSTALL_SCRIPT} ${FILESDIR}/gmetasnap.sh \
- ${STAGEDIR}${PREFIX}/sbin/gmetasnap
- ${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf \
- ${STAGEDIR}${PREFIX}/etc/gmetad.conf.sample
- ${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 \
- ${STAGEDIR}${MANPREFIX}/man/man1
-.endif
${INSTALL_MAN} \
${WRKSRC}/mans/gmetric.1 \
${WRKSRC}/mans/gmond.1 \
@@ -109,4 +100,12 @@ post-install:
${MKDIR} ${STAGEDIR}/var/db/ganglia/rrds
@${CHMOD} -R a+rX ${STAGEDIR}/var/db/ganglia
+post-install-GMETAD-on:
+ ${INSTALL_SCRIPT} ${FILESDIR}/gmetasnap.sh \
+ ${STAGEDIR}${PREFIX}/sbin/gmetasnap
+ ${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf \
+ ${STAGEDIR}${PREFIX}/etc/gmetad.conf.sample
+ ${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 \
+ ${STAGEDIR}${MANPREFIX}/man/man1
+
.include <bsd.port.mk>