1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

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)
This commit is contained in:
Norikatsu Shigemura 2003-07-11 02:13:18 +00:00
parent f33957c10e
commit 52cba93eb2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84628
12 changed files with 124 additions and 34 deletions

View File

@ -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>

View File

@ -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

View File

@ -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";

View File

@ -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.

View File

@ -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

View File

@ -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);
?>

View File

@ -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>

View File

@ -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

View File

@ -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";

View File

@ -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.

View File

@ -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

View File

@ -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);
?>