All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Duskett <aduskett@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/3] php: add SAPI API librari option
Date: Fri,  2 Feb 2018 09:06:00 -0500	[thread overview]
Message-ID: <20180202140601.21285-2-aduskett@gmail.com> (raw)
In-Reply-To: <20180202140601.21285-1-aduskett@gmail.com>

This option forces PHP to build libphp7.so. The size of the library is around
3.5MB, which is why this is a configuration option and not something that
is enabled or disabled automatically.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v2:
  - Changed BR2_PACKAGE_PHP_EMBED_SAPI to BR2_PACKAGE_PHP_ENABLE_EMBED to
    reflect the configure option name change in PHP 7.2.
  - Updated approximate library size from 4MB to 3.5MB.
  - Changed --embed-sapi to --enable-embed to reflect the configure option
    name change in PHP 7.2.
  - Added a check for static libs as the SAPI API library can be built either
    static or shared.
  - Updated wording in the help section of Config.in

 package/php/Config.in | 7 +++++++
 package/php/php.mk    | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/package/php/Config.in b/package/php/Config.in
index 0fb80063af..d327d08366 100644
--- a/package/php/Config.in
+++ b/package/php/Config.in
@@ -41,6 +41,13 @@ config BR2_PACKAGE_PHP_SAPI_FPM
 	help
 	  PHP-FPM (FastCGI Process Manager)
 
+config BR2_PACKAGE_PHP_ENABLE_EMBED
+	bool "SAPI API library"
+	help
+	  Enable building of embedded SAPI library. The name of the
+	  library on the target is libphp7.so and is approximately
+	  3.5MB in size.
+
 source "package/php/Config.ext"
 
 endif
diff --git a/package/php/php.mk b/package/php/php.mk
index 152ec7d780..511cdfa8cc 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -82,6 +82,14 @@ PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CLI),--enable-cli,--disable-cli)
 PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_CGI),--enable-cgi,--disable-cgi)
 PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_SAPI_FPM),--enable-fpm,--disable-fpm)
 
+ifeq ($(BR2_PACKAGE_PHP_ENABLE_EMBED),y)
+ifeq ($(BR2_STATIC_LIBS),)
+PHP_CONF_OPTS += --enable-embed=shared
+else
+PHP_CONF_OPTS += --enable-embed=static
+endif
+endif
+
 ifeq ($(BR2_PACKAGE_PHP_SAPI_APACHE),y)
 PHP_DEPENDENCIES += apache
 PHP_CONF_OPTS += --with-apxs2=$(STAGING_DIR)/usr/bin/apxs
-- 
2.14.3

  reply	other threads:[~2018-02-02 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 14:05 [Buildroot] [PATCH v2 1/3] uwsgi: new package Adam Duskett
2018-02-02 14:06 ` Adam Duskett [this message]
2018-02-02 14:06 ` [Buildroot] [PATCH v2 3/3] uwsgi: add plugin support Adam Duskett
2018-05-20 21:46 ` [Buildroot] [PATCH v2 1/3] uwsgi: new package Thomas Petazzoni
2018-05-20 21:50 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180202140601.21285-2-aduskett@gmail.com \
    --to=aduskett@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.