Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php56 php56: add default-off php-embed option to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3425ffc701db
branches:  trunk
changeset: 436384:3425ffc701db
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Aug 01 09:52:51 2020 +0000

description:
php56: add default-off php-embed option to install embed SAPI

Requested by Sergey Osokin in PR 55508.

While here, split off option handling into options.mk.

diffstat:

 lang/php56/Makefile.php |  57 +--------------------------------------
 lang/php56/PLIST        |   4 ++-
 lang/php56/options.mk   |  70 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+), 56 deletions(-)

diffs (163 lines):

diff -r 978c699542c0 -r 3425ffc701db lang/php56/Makefile.php
--- a/lang/php56/Makefile.php   Sat Aug 01 09:00:31 2020 +0000
+++ b/lang/php56/Makefile.php   Sat Aug 01 09:52:51 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.7 2019/03/31 20:48:18 wiz Exp $
+# $NetBSD: Makefile.php,v 1.8 2020/08/01 09:52:51 wiz Exp $
 # used by lang/php56/Makefile
 # used by www/ap-php/Makefile
 # used by www/php-fpm/Makefile
@@ -42,60 +42,7 @@
 CONFIGURE_ARGS+=       --with-libxml-dir=${PREFIX}
 .include "../../textproc/libxml2/buildlink3.mk"
 
-PKG_OPTIONS_VAR=       PKG_OPTIONS.${PHP_PKG_PREFIX}
-PKG_SUPPORTED_OPTIONS+=        inet6 ssl maintainer-zts readline disable-filter-url
-PKG_SUGGESTED_OPTIONS+=        inet6 ssl
-
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
-PKG_SUPPORTED_OPTIONS+=        dtrace
-.endif
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6)
-CONFIGURE_ARGS+=       --enable-ipv6
-.else
-CONFIGURE_ARGS+=       --disable-ipv6
-.endif
-
-.if !empty(PKG_OPTIONS:Mssl)
-.  include "../../security/openssl/buildlink3.mk"
-.  if ${OPSYS} == "SunOS"
-CONFIGURE_ARGS+=       --with-openssl=yes
-LIBS.SunOS+=           -lcrypto
-.  else
-CONFIGURE_ARGS+=       --with-openssl=${BUILDLINK_PREFIX.openssl}
-.  endif
-PATCH_SITES+=          http://zettasystem.com/
-PATCHFILES+=           PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch
-PATCH_DIST_STRIP=      -p1
-.else
-CONFIGURE_ARGS+=       --without-openssl
-.endif
-
-.if !empty(PKG_OPTIONS:Mmaintainer-zts)
-CONFIGURE_ARGS+=       --enable-maintainer-zts
-.endif
-
-.if !empty(PKG_OPTIONS:Mreadline)
-USE_GNU_READLINE=      yes
-.include "../../devel/readline/buildlink3.mk"
-CONFIGURE_ARGS+=       --with-readline=${BUILDLINK_PREFIX.readline}
-.else
-CONFIGURE_ARGS+=       --without-readline
-.endif
-
-.if !empty(PKG_OPTIONS:Mdtrace)
-PLIST.dtrace=          yes
-CONFIGURE_ARGS+=       --enable-dtrace
-
-# See https://bugs.php.net/bug.php?id=61268
-INSTALL_MAKE_FLAGS+=   -r
-.endif
-
-.if !empty(PKG_OPTIONS:Mdisable-filter-url)
-CFLAGS+=               -DDISABLE_FILTER_URL
-.endif
+.include "options.mk"
 
 DL_AUTO_VARS=          yes
 .include "../../mk/dlopen.buildlink3.mk"
diff -r 978c699542c0 -r 3425ffc701db lang/php56/PLIST
--- a/lang/php56/PLIST  Sat Aug 01 09:00:31 2020 +0000
+++ b/lang/php56/PLIST  Sat Aug 01 09:52:51 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2017/04/05 12:28:59 fhajny Exp $
+@comment $NetBSD: PLIST,v 1.4 2020/08/01 09:52:51 wiz Exp $
 bin/phar
 bin/phar.phar
 bin/php
@@ -241,6 +241,8 @@
 include/php/main/win32_internal_function_disabled.h
 include/php/main/win95nt.h
 include/php/sapi/cli/cli.h
+${PLIST.embed}include/php/sapi/embed/php_embed.h
+${PLIST.embed}lib/libphp5.so
 lib/php/build/Makefile.global
 lib/php/build/acinclude.m4
 lib/php/build/config.guess
diff -r 978c699542c0 -r 3425ffc701db lang/php56/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php56/options.mk     Sat Aug 01 09:52:51 2020 +0000
@@ -0,0 +1,70 @@
+# $NetBSD: options.mk,v 1.1 2020/08/01 09:52:51 wiz Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.${PHP_PKG_PREFIX}
+PKG_SUPPORTED_OPTIONS+=        inet6 ssl maintainer-zts readline disable-filter-url php-embed
+PKG_SUGGESTED_OPTIONS+=        inet6 ssl
+
+.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+=        dtrace
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --enable-ipv6
+.else
+CONFIGURE_ARGS+=       --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+.  include "../../security/openssl/buildlink3.mk"
+.  if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+=       --with-openssl=yes
+LIBS.SunOS+=           -lcrypto
+.  else
+CONFIGURE_ARGS+=       --with-openssl=${BUILDLINK_PREFIX.openssl}
+.  endif
+PATCH_SITES+=          http://zettasystem.com/
+PATCHFILES+=           PHP-5.6.31-OpenSSL-1.1.0-compatibility-20170801.patch
+PATCH_DIST_STRIP=      -p1
+.else
+CONFIGURE_ARGS+=       --without-openssl
+.endif
+
+.if !empty(PKG_OPTIONS:Mmaintainer-zts)
+CONFIGURE_ARGS+=       --enable-maintainer-zts
+.endif
+
+.if !empty(PKG_OPTIONS:Mreadline)
+USE_GNU_READLINE=      yes
+.include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-readline=${BUILDLINK_PREFIX.readline}
+.else
+CONFIGURE_ARGS+=       --without-readline
+.endif
+
+.if !empty(PKG_OPTIONS:Mdtrace)
+PLIST.dtrace=          yes
+CONFIGURE_ARGS+=       --enable-dtrace
+
+# See https://bugs.php.net/bug.php?id=61268
+INSTALL_MAKE_FLAGS+=   -r
+.endif
+
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+=               -DDISABLE_FILTER_URL
+.endif
+
+PLIST_VARS+=   embed
+
+.if !empty(PKG_OPTIONS:Mphp-embed)
+CONFIGURE_ARGS+=       --enable-embed
+INSTALLATION_DIRS+=    include/php/sapi/embed
+PLIST.embed=           yes
+
+.PHONY: post-install-embed
+post-install: post-install-embed
+post-install-embed:
+       ${INSTALL_DATA} ${WRKSRC}/sapi/embed/php_embed.h ${DESTDIR}${PREFIX}/include/php/sapi/embed/
+       ${INSTALL_LIB} ${WRKSRC}/libs/libphp5.so ${DESTDIR}${PREFIX}/lib/
+.endif



Home | Main Index | Thread Index | Old Index