Skip to content

Commit

Permalink
Add ports: php7-dom, php7-simplexml, php7-xml, php7-xmlreader, php7-x…
Browse files Browse the repository at this point in the history
…mlwriter
  • Loading branch information
Girt committed Jan 7, 2016
1 parent 3ef48f0 commit 36b5639
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 0 deletions.
10 changes: 10 additions & 0 deletions textproc/php7-dom/Makefile
@@ -0,0 +1,10 @@
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD: head/textproc/php7-dom/Makefile 367268 2014-09-04 14:24:25Z ale $

CATEGORIES= textproc

MASTERDIR= ${.CURDIR}/../../lang/php7

PKGNAMESUFFIX= -dom

.include "${MASTERDIR}/Makefile"
10 changes: 10 additions & 0 deletions textproc/php7-simplexml/Makefile
@@ -0,0 +1,10 @@
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD: head/textproc/php7-simplexml/Makefile 367268 2014-09-04 14:24:25Z ale $

CATEGORIES= textproc

MASTERDIR= ${.CURDIR}/../../lang/php7

PKGNAMESUFFIX= -simplexml

.include "${MASTERDIR}/Makefile"
43 changes: 43 additions & 0 deletions textproc/php7-simplexml/files/patch-config.m4
@@ -0,0 +1,43 @@
--- config.m4.orig 2014-05-14 10:14:22.929420181 +0000
+++ config.m4 2014-05-14 10:15:36.967414693 +0000
@@ -4,6 +4,9 @@
PHP_ARG_ENABLE(simplexml, whether to enable SimpleXML support,
[ --disable-simplexml Disable SimpleXML support], yes)

+PHP_ARG_WITH(pcre-dir, pcre install prefix,
+[ --with-pcre-dir SimpleXML: pcre install prefix], no, no)
+
if test -z "$PHP_LIBXML_DIR"; then
PHP_ARG_WITH(libxml-dir, libxml2 install dir,
[ --with-libxml-dir=DIR SimpleXML: libxml2 install prefix], no, no)
@@ -11,6 +14,30 @@

if test "$PHP_SIMPLEXML" != "no"; then

+ dnl This is PECL build, check if bundled PCRE library is used
+ old_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=$INCLUDES
+ AC_EGREP_CPP(yes,[
+#include <main/php_config.h>
+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+ ],[
+ PHP_PCRE_REGEX=yes
+ ],[
+ AC_EGREP_CPP(yes,[
+#include <main/php_config.h>
+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+ ],[
+ PHP_PCRE_REGEX=pecl
+ PHP_ADD_INCLUDE($PHP_PCRE_DIR/include)
+ ],[
+ PHP_PCRE_REGEX=no
+ ])
+ ])
+
if test "$PHP_LIBXML" = "no"; then
AC_MSG_ERROR([SimpleXML extension requires LIBXML extension, add --enable-libxml])
fi
10 changes: 10 additions & 0 deletions textproc/php7-xml/Makefile
@@ -0,0 +1,10 @@
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD: head/textproc/php7-xml/Makefile 367268 2014-09-04 14:24:25Z ale $

CATEGORIES= textproc

MASTERDIR= ${.CURDIR}/../../lang/php7

PKGNAMESUFFIX= -xml

.include "${MASTERDIR}/Makefile"
13 changes: 13 additions & 0 deletions textproc/php7-xml/files/patch-compat.c
@@ -0,0 +1,13 @@
--- compat.c.orig Tue Jul 20 10:55:02 2004
+++ compat.c Tue Jul 20 10:55:55 2004
@@ -16,6 +16,10 @@
+----------------------------------------------------------------------+
*/

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "php.h"
#if defined(HAVE_LIBXML) && defined(HAVE_XML) && !defined(HAVE_LIBEXPAT)
#include "expat_compat.h"
10 changes: 10 additions & 0 deletions textproc/php7-xmlreader/Makefile
@@ -0,0 +1,10 @@
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD: head/textproc/php7-xmlreader/Makefile 367268 2014-09-04 14:24:25Z ale $

CATEGORIES= textproc

MASTERDIR= ${.CURDIR}/../../lang/php7

PKGNAMESUFFIX= -xmlreader

.include "${MASTERDIR}/Makefile"
10 changes: 10 additions & 0 deletions textproc/php7-xmlwriter/Makefile
@@ -0,0 +1,10 @@
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD: head/textproc/php7-xmlwriter/Makefile 367268 2014-09-04 14:24:25Z ale $

CATEGORIES= textproc

MASTERDIR= ${.CURDIR}/../../lang/php7

PKGNAMESUFFIX= -xmlwriter

.include "${MASTERDIR}/Makefile"

0 comments on commit 36b5639

Please sign in to comment.