Date: 10 Jul 2003 21:47:10 -0000 From: Alex Kiesel <kiesel@schlund.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/54341: [maintainer-update] x11-toolkits/php-gtk: several fixes Message-ID: <20030710214710.82490.qmail@alex.i.schlund.de> Resent-Message-ID: <200307102150.h6ALo5ij057111@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 54341 >Category: ports >Synopsis: [maintainer-update] x11-toolkits/php-gtk: several fixes >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Jul 10 14:50:04 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Alex Kiesel >Release: FreeBSD 4.8-RELEASE i386 >Organization: >Environment: System: FreeBSD alex.i.schlund.de 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Fri Apr 11 16:29:20 CEST 2003 root@alex.i.schlund.de:/usr/obj/usr/src/sys/KNORKE i386 >Description: This ports brings php-gtk nearer to the PHP ports-infrastructure. It includes: * updated documentation * support for scintilla * build one shared library instead of many * fix bento build error >How-To-Repeat: >Fix: * apply this cumulative patch * add the two attached files to the files-directory --- php-gtk.diff begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- Makefile 26 Jun 2003 22:58:32 -0000 1.6 +++ Makefile 10 Jul 2003 21:37:17 -0000 @@ -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 @@ 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 @@ .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 @@ @${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 @@ @${CAT} ${MASTERDIR}/pkg-message @${ECHO} "" -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: pkg-message =================================================================== RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/pkg-message,v retrieving revision 1.1 diff -u -r1.1 pkg-message --- pkg-message 1 Apr 2003 23:06:02 -0000 1.1 +++ pkg-message 10 Jul 2003 21:37:17 -0000 @@ -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. Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/pkg-plist,v retrieving revision 1.2 diff -u -r1.2 pkg-plist --- pkg-plist 17 Jun 2003 16:19:04 -0000 1.2 +++ pkg-plist 10 Jul 2003 21:37:17 -0000 @@ -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 Index: scripts/memlim.php =================================================================== RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/scripts/memlim.php,v retrieving revision 1.1 diff -u -r1.1 memlim.php --- scripts/memlim.php 18 Jun 2003 07:43:01 -0000 1.1 +++ scripts/memlim.php 10 Jul 2003 21:37:17 -0000 @@ -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); ?> --- php-gtk.diff ends here --- --- patch-ext_scintilla-config.m4 begins here --- --- 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 --- patch-ext_scintilla-config.m4 ends here --- --- patch-generator_generator.php begins here --- --- 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"; --- patch-generator_generator.php ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030710214710.82490.qmail>