Hello ports@!

I'm trying to add an `ssh` flavor to net/zabbix, which would compile
support for SSH items into zabbix-server. As far as I can tell, the
normal Makefile for net/zabbix doesn't build in support by default.

At the bottom of this message is what I tried so far, although it
doesn't work. When I run `FLAVOR="mysql ssh" doas make build`, the
output from Zabbix's configure script doesn't indicate that libssh was
included. (Yes, I've added keepenv to my doas.conf.)

So, that leaves me with two questions:
1. Can anyone point me in the right direction? What am I doing wrong
that's causing it to misbehave?
2. Is this something that other people are interested in, and would
therefore warrant inclusion into the ports tree?

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/zabbix/Makefile,v
retrieving revision 1.122
diff -u -p -r1.122 Makefile
--- Makefile    7 Jul 2016 18:47:32 -0000       1.122
+++ Makefile    21 Sep 2017 17:58:23 -0000
@@ -29,7 +29,7 @@ MODPHP_BUILDDEP =     No

 MULTI_PACKAGES =       -main -web
 PSEUDO_FLAVORS =       no_server
-FLAVORS =              mysql pgsql sqlite3
+FLAVORS =              mysql pgsql sqlite3 ssh

 SUBST_VARS +=          PREFIX-web ZABBIX_WEB MAJV

@@ -77,7 +77,7 @@ FLAVOR =              sqlite3
 #if non-backend-related flavors are added, add them to
 #the following line as ":L:Nflavor1:Nflavor2" so that
 #they don't trigger a "Conflicting flavors" error.
-BACKEND =              ${FLAVOR}
+BACKEND =              ${FLAVOR:L:Nssh}
 .if ${BACKEND} == "mysql"
 MULTI_PACKAGES += -server
 LIB_DEPENDS-server +=  databases/mariadb,-main
@@ -97,6 +97,13 @@ CONFIGURE_ARGS += --disable-server \
                --disable-proxy
 .else
 ERRORS +=              "Fatal: Conflicting flavors: ${FLAVOR}";
+.endif
+
+# Include libssh if the ssh flavor is requested
+.if ${FLAVOR:L:Mssh}
+LIB_DEPENDS-server += security/libssh
+WANTLIB-server += libssh
+CONFIGURE_ARGS += --with-ssh
 .endif

 pre-configure:


───────────────────────────────
William Leuschner
wel2...@rit.edu

Reply via email to