php7: add SNMP module to bundle 4485/head
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 17 Jun 2017 01:51:11 +0000 (19:51 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 17 Jun 2017 01:53:53 +0000 (19:53 -0600)
Add native support for SNMP manager functions, so scripts don't
have to call system("snmpget -v2c ...") etc.  Cuts down on fork/exec
pairs and simplifies issues with parsing intermediate output.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
lang/php7/Makefile

index f7bdd66ef8da5a102bcc7570344634e501aa6b1e..d4a50ac38266b66a23904677215722d47dc99426 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
 PKG_VERSION:=7.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
 
@@ -37,7 +37,7 @@ PHP7_MODULES = \
        mbstring mcrypt mysqli \
        opcache openssl \
        pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \
-       session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \
+       session shmop simplexml snmp soap sockets sqlite3 sysvmsg sysvsem sysvshm \
        tokenizer \
        xml xmlreader xmlwriter zip \
 
@@ -288,7 +288,7 @@ else
   CONFIGURE_ARGS+= --disable-opcache
 endif
 
-ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl),)
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl)$(CONFIG_PACKAGE_php7-mod-snmp),)
   CONFIGURE_ARGS+= \
        --with-openssl=shared,"$(STAGING_DIR)/usr" \
        --with-kerberos=no \
@@ -354,6 +354,12 @@ else
   CONFIGURE_ARGS+= --disable-simplexml
 endif
 
+ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-snmp),)
+  CONFIGURE_ARGS+= --with-snmp=shared,"$(STAGING_DIR)/usr"
+else
+  CONFIGURE_ARGS+= --without-snmp
+endif
+
 ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-soap),)
   CONFIGURE_ARGS+= --enable-soap=shared
 else
@@ -585,6 +591,7 @@ $(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash))
 $(eval $(call BuildModule,session,Session))
 $(eval $(call BuildModule,shmop,Shared Memory))
 $(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2))
+$(eval $(call BuildModule,snmp,SNMP,+PACKAGE_php7-mod-snmp:libnetsnmp +PACKAGE_php7-mod-snmp:libopenssl))
 $(eval $(call BuildModule,soap,SOAP,+@PHP7_LIBXML +PACKAGE_php7-mod-soap:libxml2))
 $(eval $(call BuildModule,sockets,Sockets))
 $(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php7-mod-sqlite3:libsqlite3))