From nobody@FreeBSD.org  Thu Jul 21 12:23:05 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D21FE1065676
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jul 2011 12:23:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C2B088FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jul 2011 12:23:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6LCN5tq008902
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Jul 2011 12:23:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p6LCN5Cr008895;
	Thu, 21 Jul 2011 12:23:05 GMT
	(envelope-from nobody)
Message-Id: <201107211223.p6LCN5Cr008895@red.freebsd.org>
Date: Thu, 21 Jul 2011 12:23:05 GMT
From: Peter Vereshagin <peter@vereshagin.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: lang/php5 sapi/embed extension library libphp5.so
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159084
>Category:       ports
>Synopsis:       lang/php5 sapi/embed extension library libphp5.so
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 21 12:30:08 UTC 2011
>Closed-Date:    Thu May 17 20:45:26 UTC 2012
>Last-Modified:  Thu May 17 20:45:26 UTC 2012
>Originator:     Peter Vereshagin
>Release:        releng_7 as of May, 2011
>Organization:
Private
>Environment:
FreeBSD teh.ost 7.4-STABLE FreeBSD 7.4-STABLE #10: Mon May  2 16:12:55 MSD 2011     peter@vereshagin.oirg:/CONF  i386
>Description:
I have an application (PHP.pm) that requires the sapi libphp5.so library to be
built and installed.

>How-To-Repeat:
# portinstall lang/php5
# perl -MCPAN -e 'install PHP'
>Fix:
I think that is possible with tthe patch supplied.
YMMV about -install target(s)

Patch attached with submission follows:

--- Makefile.old	2011-07-15 21:08:21.000000000 +0400
+++ Makefile	2011-07-15 20:49:01.000000000 +0400
@@ -48,7 +48,8 @@
 		MULTIBYTE "Enable zend multibyte support" off \
 		IPV6 "Enable ipv6 support" on \
 		MAILHEAD "Enable mail header patch" off \
-		LINKTHR "Link thread lib (for threaded extensions)" off
+		LINKTHR "Link thread lib (for threaded extensions)" off \
+		EMBED "Build library for embedding (experimental)" off 
 
 CONFLICTS=	php4-4* php5-pcre-* php5-spl-*
 
@@ -83,6 +84,14 @@
 CONFIGURE_ARGS+=--disable-cli
 .endif
 
+.if defined(WITH_EMBED)
+PHP_SAPI+=	embed
+CONFIGURE_ARGS+=--enable-embed=shared
+PLIST_SUB+=	EMBED=""
+.else
+PLIST_SUB+=	EMBED="@comment "
+.endif
+
 .if !defined(WITHOUT_CGI)
 PHP_SAPI+=	cgi
 PLIST_SUB+=	CGI=""
@@ -192,6 +201,9 @@
 .if defined(WITH_FPM)
 	@${CP} -n ${PREFIX}/etc/php-fpm.conf.default ${PREFIX}/etc/php-fpm.conf
 .endif
+.if defined(WITH_EMBED)
+	@(cd ${WRKSRC} && ${MAKE} install-sapi)
+.endif
 .if defined(WITH_APACHE)
 	@${CAT} ${PKGMESSAGE}
 .endif
--- pkg-plist.old	2011-07-15 20:45:38.000000000 +0400
+++ pkg-plist	2011-07-15 21:06:43.000000000 +0400
@@ -1,4 +1,5 @@
 %%CLI%%bin/php
+%%EMBED%%lib/libphp5.so
 %%CGI%%bin/php-cgi
 bin/php-config
 bin/phpize


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Jul 21 12:30:21 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159084 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Thu May 17 20:45:09 UTC 2012 
State-Changed-Why:  
Embed sapi has been added. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159084 
>Unformatted:
