diff options
author | nork <nork@FreeBSD.org> | 2003-07-11 10:13:18 +0800 |
---|---|---|
committer | nork <nork@FreeBSD.org> | 2003-07-11 10:13:18 +0800 |
commit | 320ef4fd99a090c66d3505e3195d19d690bfc15f (patch) | |
tree | 587e77001a4b68ae068d08d187914257d4c9b5a9 /x11-toolkits/php-gtk | |
parent | 7ced2f5ab1b99ba6b7464917c4b8ffdc7b5c36a8 (diff) | |
download | freebsd-ports-gnome-320ef4fd99a090c66d3505e3195d19d690bfc15f.tar.gz freebsd-ports-gnome-320ef4fd99a090c66d3505e3195d19d690bfc15f.tar.zst freebsd-ports-gnome-320ef4fd99a090c66d3505e3195d19d690bfc15f.zip |
o Updated documentation
o Support for scintilla
o Build one shared library instead of many
o Fix bento build error
o Bump PORTREVISION acordingly
PR: ports/54341
Submitted by: Alex Kiesel <kiesel@schlund.de> (maintainer)
Diffstat (limited to 'x11-toolkits/php-gtk')
-rw-r--r-- | x11-toolkits/php-gtk/Makefile | 31 | ||||
-rw-r--r-- | x11-toolkits/php-gtk/files/patch-ext_scintilla-config.m4 | 16 | ||||
-rw-r--r-- | x11-toolkits/php-gtk/files/patch-generator_generator.php | 14 | ||||
-rw-r--r-- | x11-toolkits/php-gtk/pkg-message | 5 | ||||
-rw-r--r-- | x11-toolkits/php-gtk/pkg-plist | 4 | ||||
-rw-r--r-- | x11-toolkits/php-gtk/scripts/memlim.php | 9 |
6 files changed, 62 insertions, 17 deletions
diff --git a/x11-toolkits/php-gtk/Makefile b/x11-toolkits/php-gtk/Makefile index 12b53f9954cf..8c540ec0adb4 100644 --- a/x11-toolkits/php-gtk/Makefile +++ b/x11-toolkits/php-gtk/Makefile @@ -7,7 +7,7 @@ PORTNAME= php-gtk PORTVERSION= 0.5.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= http://gtk.php.net/distributions/ \ http://document-root.de/mirror/php-gtk/ @@ -15,24 +15,28 @@ MASTER_SITES= http://gtk.php.net/distributions/ \ MAINTAINER= kiesel@schlund.de COMMENT= An extension to use gtk in PHP-applications +.include <bsd.port.pre.mk> +.include "${.CURDIR}/../../lang/php4/bsd.php.mk" + # Port does only build with automake-1.4 and # automake-1.5 installed - what a mess BUILD_DEPENDS= automake:${PORTSDIR}/devel/automake \ automake14:${PORTSDIR}/devel/automake14 \ autoconf:${PORTSDIR}/devel/autoconf \ autoconf213:${PORTSDIR}/devel/autoconf213 \ - phpize:${PORTSDIR}/lang/php4-cli \ php:${PORTSDIR}/lang/php4-cli -RUN_DEPENDS= php:${PORTSDIR}/lang/php4-cli # Don't call autoconf directly, ./buildconf does this GNU_CONFIGURE= yes USE_LIBTOOL= yes LIBTOOLFILES= # none +WANT_PHP_CLI= yes +USE_PHPIZE= yes USE_AUTOCONF= no USE_GMAKE= yes USE_PERL5_BUILD=yes USE_GNOME= gtk12 + # Fix environment for self contained extensions ENVSCE= -DHAVE_PHP_GTK=1 -DCOMPILE_DL_PHP_GTK=1 \ -DHAVE_PIEMENU=1 \ @@ -47,22 +51,34 @@ ENVSCE+= -DHAVE_LIBGLADE .else CONFIGURE_ARGS+= --disable-libglade .endif + +.if !defined(WITHOUT_SCINTILLA) +BUILD_DEPENDS+= ${X11BASE}/include/scintilla/gtkscintilla.h:${PORTSDIR}/x11-toolkits/gtkscintilla +LIB_DEPENDS+= gtkscintilla.0:${PORTSDIR}/x11-toolkits/gtkscintilla +ENVSCE+= -DHAVE_SCINTILLA=1 # -DPHP_GTK_COMPILE_DL_SCINTILLA=1 +CONFIGURE_ARGS+= --enable-scintilla +.endif + .if !defined(WITHOUT_GDK_PIXBUF) USE_GNOME+= gdkpixbuf -CONFIGURE_ARGS+= --enable-gdkpixbuf=shared +CONFIGURE_ARGS+= --enable-gdkpixbuf ENVSCE+= -DHAVE_GDKPIXBUF=1 -DPHP_GTK_COMPILE_DL_GDKPIXBUF=1 PLIST_SUB+= GDKPIXBUF="" .else PLIST_SUB+= GDKPIXBUF="@comment " .endif + .if !defined(WITHOUT_GTKHTML) USE_GNOME+= gtkhtml -CONFIGURE_ARGS+= --enable-gtkhtml=shared -ENVSCE+= -DHAVE_HTML=1 -DPHP_GTK_COMPILE_DL_GTKHTML=1 -DGTKHTML_HAVE_GCONF=1 -I${X11BASE}/include/gal-1.0 +CONFIGURE_ARGS+= --enable-gtkhtml +ENVSCE+= -DHAVE_HTML=1 -I${X11BASE}/include/gal-1.0 # -DPHP_GTK_COMPILE_DL_GTKHTML=1 -DGTKHTML_HAVE_GCONF=1 -I${X11BASE}/include/gal-1.0 PLIST_SUB+= GTKHTML="" .else PLIST_SUB+= GTKHTML="@comment " .endif + +PLIST_SUB+= PHPEXTDIR="${PHP_EXT_DIR}" + CONFIGURE_ENV= CPPFLAGS="${ENVSCE}" USE_REINPLACE= yes @@ -82,6 +98,7 @@ pre-everything:: @${ECHO_MSG} '* - WITHOUT_LIBGLADE *' @${ECHO_MSG} '* - WITHOUT_GDK_PIXBUF *' @${ECHO_MSG} '* - WITHOUT_GTKHTML *' + @${ECHO_MSG} '* - WITHOUT_SCINTILLA *' @${ECHO_MSG} '* *' @${ECHO_MSG} '*********************************************************' @@ -107,4 +124,4 @@ post-install: @${CAT} ${MASTERDIR}/pkg-message @${ECHO} "" -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/x11-toolkits/php-gtk/files/patch-ext_scintilla-config.m4 b/x11-toolkits/php-gtk/files/patch-ext_scintilla-config.m4 new file mode 100644 index 000000000000..48fcbb8e4951 --- /dev/null +++ b/x11-toolkits/php-gtk/files/patch-ext_scintilla-config.m4 @@ -0,0 +1,16 @@ +--- ext/scintilla/config.m4.orig Thu Jul 10 23:05:44 2003 ++++ ext/scintilla/config.m4 Thu Jul 10 23:05:52 2003 +@@ -6,10 +6,10 @@ + --enable-scintilla Enable Scintilla support]) + + if test "$PHP_GTK_SCINTILLA" != "no"; then +- for x in /usr /usr/local; do +- if test -f $x/include/gtkscintilla.h; then ++ for x in /usr/include /usr/local/include /usr/X11R6/include/scintilla; do ++ if test -f $x/gtkscintilla.h; then + SCINTILLA_DIR=$x +- SCINTILLA_INCDIR=$x/include ++ SCINTILLA_INCDIR=$x + fi + done + diff --git a/x11-toolkits/php-gtk/files/patch-generator_generator.php b/x11-toolkits/php-gtk/files/patch-generator_generator.php new file mode 100644 index 000000000000..151403caab2b --- /dev/null +++ b/x11-toolkits/php-gtk/files/patch-generator_generator.php @@ -0,0 +1,14 @@ +--- generator/generator.php.orig Thu Apr 11 04:19:49 2002 ++++ generator/generator.php Thu Jul 10 23:08:48 2003 +@@ -27,6 +27,11 @@ + * + */ + ++$memlim= ini_get ('memory_limit'); ++if (!empty ($memlim) && 32 < (int)$memlim) { ++ ini_set ('memory_limit', '64M'); ++} ++ + set_time_limit(300); + + require "Getopt.php"; diff --git a/x11-toolkits/php-gtk/pkg-message b/x11-toolkits/php-gtk/pkg-message index a8c729ad6cb0..8d06011e8c96 100644 --- a/x11-toolkits/php-gtk/pkg-message +++ b/x11-toolkits/php-gtk/pkg-message @@ -1,8 +1,7 @@ The port has now been installed. Be sure to adjust the config-file in e.g. /usr/local/etc/php.gtk/php.ini. -I have created a sample configuration file named php.ini-dist which -should be a rough guide. +Eventually, you must set the correct 'extension_dir'-path in php.ini. For convenience put something like -"alias gtkphp='php -q -c /usr/local/etc/php.gtk/'" +"alias gtkphp='php -c /usr/local/etc/php.gtk/'" in your .profile. diff --git a/x11-toolkits/php-gtk/pkg-plist b/x11-toolkits/php-gtk/pkg-plist index dbd98a8715be..002c9280a427 100644 --- a/x11-toolkits/php-gtk/pkg-plist +++ b/x11-toolkits/php-gtk/pkg-plist @@ -1,7 +1,5 @@ etc/php.gtk/php.ini-dist -%%GDKPIXBUF%%lib/php/20020429/gdkpixbuf.so -%%GTKHTML%%lib/php/20020429/gtkhtml.so -lib/php/20020429/php_gtk.so +%%PHPEXTDIR%%/php_gtk.so share/examples/php-gtk/combobutton.php share/examples/php-gtk/fileselection.php share/examples/php-gtk/gtk.php diff --git a/x11-toolkits/php-gtk/scripts/memlim.php b/x11-toolkits/php-gtk/scripts/memlim.php index 657a0e58fd19..6b04a123b547 100644 --- a/x11-toolkits/php-gtk/scripts/memlim.php +++ b/x11-toolkits/php-gtk/scripts/memlim.php @@ -5,16 +5,17 @@ * */ - if (((int)ini_get ('memory_limit')) < 10) { + $memlim= (int)ini_get ('memory_limit'); + if (!empty ($memlim) && $memlim < 10) { echo "---> PHP not properly configured!\n"; echo " You do not have permitted enough memory for PHP. Please update\n"; echo " the memory_limit resource limit in your php.ini.\n\n"; echo " Recommended is 16M (or more) though 10M seem to work, too.\n"; - echo " Current setting: ",ini_get('memory_limit'),"\n\n"; - exit (-1); + echo " Current setting: ",$memlim,"\n\n"; + exit (0); } - echo "---> PHP: memory_limit is sufficient (",ini_get ('memory_limit'),")\n"; + echo "---> PHP: memory_limit is sufficient (",$memlim,")\n"; exit(0); ?> |