ports/53343: [Maintainer update] x11-toolkits/php-gtk: fix PHP dependency, fix pkg-plist, fix install

Alex Kiesel kiesel at schlund.de
Sun Jun 15 12:00:33 UTC 2003


>Number:         53343
>Category:       ports
>Synopsis:       [Maintainer update] x11-toolkits/php-gtk: fix PHP dependency, fix pkg-plist, fix install
>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:   Sun Jun 15 05:00:31 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 at alex.i.schlund.de:/usr/obj/usr/src/sys/KNORKE i386


	
>Description:
    Bento reported errors building php-gtk, this is a fix for them. 
    The patch fixes the dependencies, corrects the plist.
    Additionally, if building gtkhtml etc. they now also actually get installed.

>How-To-Repeat:
	cd /usr/ports/x11-toolkits/php-gtk && make install
>Fix:
    Apply the following patch and add memlim.php to the scripts-directory of the port.

--- php-gtk.diff begins here ---
? scripts
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	20 Apr 2003 19:54:05 -0000	1.3
+++ Makefile	15 Jun 2003 11:40:28 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	php-gtk
 PORTVERSION=	0.5.2
+PORTREVISION= 	1
 CATEGORIES=	x11-toolkits
 MASTER_SITES=	http://gtk.php.net/distributions/ \
 		http://document-root.de/mirror/php-gtk/
@@ -20,8 +21,8 @@
 		automake14:${PORTSDIR}/devel/automake14 \
 		autoconf:${PORTSDIR}/devel/autoconf \
 		autoconf213:${PORTSDIR}/devel/autoconf213 \
-		phpize:${PORTSDIR}/www/mod_php4
-RUN_DEPENDS=	php:${PORTSDIR}/www/mod_php4
+		phpize:${PORTSDIR}/lang/php4-cli
+RUN_DEPENDS=	php:${PORTSDIR}/lang/php4-cli
 
 # Don't call autoconf directly, ./buildconf does this
 GNU_CONFIGURE=	yes
@@ -36,6 +37,7 @@
 		-DHAVE_SPANED=1		\
 		-DHAVE_SQPANE=1		\
 		-DHAVE_COMBOBUTTON=1
+
 .if !defined(WITHOUT_LIBGLADE)
 USE_GNOME+=	libglade
 ENVSCE+=	-DHAVE_LIBGLADE
@@ -46,11 +48,17 @@
 USE_GNOME+=	gdkpixbuf
 CONFIGURE_ARGS+=	--enable-gdkpixbuf=shared
 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
+PLIST_SUB+=     GTKHTML=""
+.else
+PLIST_SUB+=	GTKHTML="@comment "
 .endif
 CONFIGURE_ENV=  CPPFLAGS="${ENVSCE}"
 
@@ -75,19 +83,13 @@
 	@${ECHO_MSG} '*********************************************************'
 
 pre-configure:
+	@php ${SCRIPTDIR}/memlim.php
 	@${ECHO_MSG} "===>  Building configuration files for ${PKGNAME}"
 	@(cd ${WRKSRC} && ./buildconf)
 .for FILE in ${PIC2FIX}
 	@${REINPLACE_CMD} -e "s|-prefer-pic|${CFLAGS}|g" ${WRKSRC}/${FILE}
 .endfor
 
-do-install:
-	@$(MKDIR) -p ${PREFIX}/lib/php/extensions/
-	@${INSTALL_PROGRAM} ${WRKSRC}/modules/php_gtk.so ${PREFIX}/lib/php/extensions/php_gtk.so
-# TODO: php_gtk_gdkpixbuf.so and php_gtk_gtkhtml.so are not installed
-	@${MKDIR} ${PREFIX}/etc/php.gtk
-	@${INSTALL_DATA} ${FILESDIR}/php.ini-dist ${PREFIX}/etc/php.gtk
-
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${EXAMPLESDIR}
@@ -96,6 +98,8 @@
 .endfor
 	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
 .endif
+	@${MKDIR} ${PREFIX}/etc/php.gtk
+	@${INSTALL_DATA} ${FILESDIR}/php.ini-dist ${PREFIX}/etc/php.gtk
 	@${ECHO} ""
 	@${CAT} ${MASTERDIR}/pkg-message
 	@${ECHO} ""
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist	1 Apr 2003 23:06:02 -0000	1.1
+++ pkg-plist	15 Jun 2003 11:40:28 -0000
@@ -1,17 +1,19 @@
 etc/php.gtk/php.ini-dist
-lib/php/extensions/php_gtk.so
-%%PORTDOCS%%%%EXAMPLESDIR%%/combobutton.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/fileselection.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/gtk.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/hello.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/list.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/piemenu.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/scribble.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/scrollpane.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/spaned.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/sqpane.php
-%%PORTDOCS%%%%EXAMPLESDIR%%/testgtkrc
-%%PORTDOCS%%%%EXAMPLESDIR%%/testgtkrc2
-%%PORTDOCS%%%%EXAMPLESDIR%%/window.xpm
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%GDKPIXBUF%%lib/php/20020429/gdkpixbuf.so
+%%GTKHTML%%lib/php/20020429/gtkhtml.so
+lib/php/20020429/php_gtk.so
+share/examples/php-gtk/combobutton.php
+share/examples/php-gtk/fileselection.php
+share/examples/php-gtk/gtk.php
+share/examples/php-gtk/hello.php
+share/examples/php-gtk/list.php
+share/examples/php-gtk/piemenu.php
+share/examples/php-gtk/scribble.php
+share/examples/php-gtk/scrollpane.php
+share/examples/php-gtk/spaned.php
+share/examples/php-gtk/sqpane.php
+share/examples/php-gtk/testgtkrc
+share/examples/php-gtk/testgtkrc2
+share/examples/php-gtk/window.xpm
+ at dirrm share/examples/php-gtk
 @dirrm etc/php.gtk
Index: files/php.ini-dist
===================================================================
RCS file: /home/ncvs/ports/x11-toolkits/php-gtk/files/php.ini-dist,v
retrieving revision 1.1
diff -u -r1.1 php.ini-dist
--- files/php.ini-dist	1 Apr 2003 23:06:03 -0000	1.1
+++ files/php.ini-dist	15 Jun 2003 11:40:30 -0000
@@ -265,7 +265,7 @@
 ; You should do your best to write your scripts so that they do not require
 ; register_globals to be on;  Using form variables as globals can easily lead
 ; to possible security problems, if the code is not very well thought of.
-register_globals = On
+; register_globals = On
 
 ; This directive tells PHP whether to declare the argv&argc variables (that
 ; would contain the GET information).  If you don't use these variables, you
@@ -321,7 +321,7 @@
 user_dir =
 
 ; Directory in which the loadable extensions (modules) reside.
-extension_dir = /usr/local/lib/php/extensions
+extension_dir = /usr/local/lib/php/20020429
 
 ; Whether or not to enable the dl() function.  The dl() function does NOT work
 ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
--- php-gtk.diff ends here ---

--- memlim.php begins here ---
<?php
  /**
   * This script checks for the memory limit in php. If set too low
   * some .c-files cannot be created but contain a PHP error message.
   * 
   */

  if (((int)ini_get ('memory_limit')) < 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 "--->  PHP: memory_limit is sufficient (",ini_get ('memory_limit'),")\n";
  exit(0);
  
?>
--- memlim.php ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list