summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/cacti-spine/Makefile13
-rw-r--r--net/cacti-spine/distinfo3
-rw-r--r--net/cacti-spine/patches/patch-spine.h16
3 files changed, 27 insertions, 5 deletions
diff --git a/net/cacti-spine/Makefile b/net/cacti-spine/Makefile
index d1464a15eea..382a447a714 100644
--- a/net/cacti-spine/Makefile
+++ b/net/cacti-spine/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2016/06/02 09:44:13 hauke Exp $
+# $NetBSD: Makefile,v 1.6 2016/06/02 16:00:02 hauke Exp $
#
DISTNAME= cacti-spine-0.8.8h
-#PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.cacti.net/downloads/spine/
@@ -17,8 +17,8 @@ USE_LANGUAGES= c
USE_LIBTOOL= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
-CONFIGURE_ARGS= --with-snmp=${BUILDLINK_PREFIX.net-snmp}
+CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
+CONFIGURE_ARGS+= --with-snmp=${BUILDLINK_PREFIX.net-snmp}
DOCDIR= share/doc/cacti-spine
EXAMPLES_DIR= examples
@@ -26,6 +26,11 @@ EGDIR= ${PREFIX}/${DOCDIR}/${EXAMPLES_DIR}
CONF_FILES= ${EGDIR}/spine.conf.dist ${PKG_SYSCONFDIR}/spine.conf
INSTALLATION_DIRS= ${DOCDIR}
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= pre-configure
+SUBST_FILES.paths= ${WRKSRC}/spine.h
+SUBST_SED.paths= -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR:Q}|g'
+
INSTALL_MAKE_FLAGS+= configdir=${EGDIR}
post-install:
diff --git a/net/cacti-spine/distinfo b/net/cacti-spine/distinfo
index 4ab52659f2e..30d63b17d37 100644
--- a/net/cacti-spine/distinfo
+++ b/net/cacti-spine/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.4 2016/06/02 09:44:13 hauke Exp $
+$NetBSD: distinfo,v 1.5 2016/06/02 16:00:02 hauke Exp $
SHA1 (cacti-spine-0.8.8h.tar.gz) = b10f8f20545f1a9460a44d92bb545457220eead1
RMD160 (cacti-spine-0.8.8h.tar.gz) = 5c90c6b777fb9fcc4089e17af40194f4f1e1aa4b
SHA512 (cacti-spine-0.8.8h.tar.gz) = 6a7147ab645be44de0d330c7801e569705817da10bf6cedba82c712e1701ada8aa8924a6b3b063ea680e6af24f815d6767e8773ad7b8da212abfa082b4211bd4
Size (cacti-spine-0.8.8h.tar.gz) = 804951 bytes
+SHA1 (patch-spine.h) = c43d8a46f9c5ea3fb3cc2b1df2f6f4cc29b802e3
diff --git a/net/cacti-spine/patches/patch-spine.h b/net/cacti-spine/patches/patch-spine.h
new file mode 100644
index 00000000000..4ce7c99e0b0
--- /dev/null
+++ b/net/cacti-spine/patches/patch-spine.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-spine.h,v 1.1 2016/06/02 16:00:02 hauke Exp $
+
+Despite the autoconf --sysconfdir, spine uses a hardcoded path to
+look for its config file. Patch that for pkgsrc.
+
+--- spine.h.orig 2016-05-08 18:57:41.000000000 +0000
++++ spine.h
+@@ -136,7 +136,7 @@
+
+ /* locations to search for the config file */
+ #define CONFIG_PATHS 4
+-#define CONFIG_PATH_1 ""
++#define CONFIG_PATH_1 "@PKG_SYSCONFDIR@/"
+ #define CONFIG_PATH_2 "/etc/"
+ #define CONFIG_PATH_3 "/etc/cacti/"
+ #define CONFIG_PATH_4 "../etc/"