diff options
-rw-r--r-- | x11-toolkits/Makefile | 1 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/Makefile | 65 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/distinfo | 6 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_config.m4 | 11 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.defs | 19 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.overrides | 12 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/files/patch-ext_scintilla-config.m4 | 16 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/files/pkg-message.in | 8 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/pkg-descr | 5 | ||||
-rw-r--r-- | x11-toolkits/php-gtk2/pkg-plist | 37 |
10 files changed, 67 insertions, 113 deletions
diff --git a/x11-toolkits/Makefile b/x11-toolkits/Makefile index 7ea39ef0c960..df89028d57d4 100644 --- a/x11-toolkits/Makefile +++ b/x11-toolkits/Makefile @@ -199,6 +199,7 @@ SUBDIR += paragui-devel SUBDIR += phat SUBDIR += php-gtk + SUBDIR += php-gtk2 SUBDIR += plib SUBDIR += py-Pmw SUBDIR += py-SciParam diff --git a/x11-toolkits/php-gtk2/Makefile b/x11-toolkits/php-gtk2/Makefile index b382363b7051..f4b741ea2460 100644 --- a/x11-toolkits/php-gtk2/Makefile +++ b/x11-toolkits/php-gtk2/Makefile @@ -1,39 +1,39 @@ -# ports collection makefile for: php-gtk -# Date created: 03 October 2002 -# Whom: Alex Kiesel <kiesel@schlund.de> +# ports collection makefile for: php-gtk2 +# Date created: 01 July 2009 +# Whom: Kris Moore <kmoore@FreeBSD.org> # # $FreeBSD$ # -PORTNAME= php-gtk -PORTVERSION= 1.0.2 -PORTREVISION= 10 +PORTNAME= php-gtk2 +PORTVERSION= 2.0.1 CATEGORIES= x11-toolkits MASTER_SITES= http://gtk.php.net/distributions/ \ http://document-root.de/mirror/php-gtk/ +DISTNAME= php-gtk-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org -COMMENT= An extension to use gtk in PHP-applications +MAINTAINER= kmoore@freebsd.org +COMMENT= An extension to use gtk2 in PHP-applications USE_AUTOTOOLS= automake:19:env autoconf:262 libtool:22:env -GNU_CONFIGURE= yes USE_PHP= pcre USE_PHP_BUILD= yes WANT_PHP_CLI= yes -IGNORE_WITH_PHP= 5 USE_GMAKE= yes USE_PERL5_BUILD=yes -USE_GNOME= gtk12 +USE_GNOME= gtk20 USE_LDCONFIG= yes -WRKSRC=${WRKDIR}/php_gtk-${PORTVERSION} +WRKSRC=${WRKDIR}/php-gtk-${PORTVERSION} PORTSCOUT= limit:^1\. -OPTIONS= LIBGLADE "GladeXML support in php-gtk" on \ - GDK_PIXBUF "Enable pixbuf support" on \ - GTKHTML "Enable Gtkhtml support" on +OPTIONS= LIBGLADE "GladeXML support in php-gtk2" on .include <bsd.port.pre.mk> +.if ${ARCH} == amd64 +CFLAGS+= -fPIC +.endif + # Fix environment for self contained extensions ENVSCE= -DHAVE_PHP_GTK=1 -DCOMPILE_DL_PHP_GTK=1 \ -DHAVE_PIEMENU=1 \ @@ -49,24 +49,6 @@ ENVSCE+= -DHAVE_LIBGLADE CONFIGURE_ARGS+= --disable-libglade .endif -.if !defined(WITHOUT_GDK_PIXBUF) -USE_GNOME+= gdkpixbuf -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 -ENVSCE+= -DHAVE_HTML=1 -I${LOCALBASE}/include/gal-1.0 # -DPHP_GTK_COMPILE_DL_GTKHTML=1 -DGTKHTML_HAVE_GCONF=1 -I${LOCALBASE}/include/gal-1.0 -PLIST_SUB+= GTKHTML="" -.else -PLIST_SUB+= GTKHTML="@comment " -.endif - PLIST_SUB+= PHPEXTDIR="${PHP_EXT_DIR}" CONFIGURE_ENV= CPPFLAGS="${ENVSCE}" @@ -79,21 +61,32 @@ EXAMPLES= combobutton.php fileselection.php gtk.php hello.php list.php \ piemenu.php scribble.php scrollpane.php spaned.php sqpane.php \ testgtkrc testgtkrc2 window.xpm +PKGMESSAGE= ${WRKDIR}/pkg-message + +post-build: + @${SED} "s|%%LOCALBASE%%|${LOCALBASE}|g" \ + ${FILESDIR}/pkg-message.in > ${PKGMESSAGE} + pre-configure: @${ECHO_MSG} "===> Building configuration files for ${PKGNAME}" - @(cd ${WRKSRC} && ${SETENV} ${SCRIPTS_ENV} PHP_AUTOCONF=${AUTOCONF} PHP_AUTOHEADER=${AUTOHEADER} ./buildconf) + @(cd ${WRKSRC} && ${SETENV} ${SCRIPTS_ENV} \ + PHP_AUTOCONF=${AUTOCONF} PHP_AUTOHEADER=${AUTOHEADER} ./buildconf) + @${REINPLACE_CMD} -e "s|/bin/sh|/bin/sh -x|" ${WRKSRC}/configure .for FILE in ${PIC2FIX} @${REINPLACE_CMD} -e "s|-prefer-pic|${CFLAGS}|g" ${WRKSRC}/${FILE} .endfor - @${REINPLACE_CMD} -e "s|/bin/sh|/bin/sh -x|" ${WRKSRC}/configure post-install: -.if !defined(NOPORTDOCS) +.if !defined(NOPORTEXAMPLES) @${MKDIR} ${EXAMPLESDIR} .for FILE in ${EXAMPLES} @${INSTALL_DATA} ${WRKSRC}/test/${FILE} ${EXAMPLESDIR} .endfor @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}." .endif + @${CAT} ${PKGMESSAGE} + @${MKDIR} ${PREFIX}/etc/php + @${ECHO_CMD} extension=php_gtk2.so \ + >> ${PREFIX}/etc/php/extensions.ini .include <bsd.port.post.mk> diff --git a/x11-toolkits/php-gtk2/distinfo b/x11-toolkits/php-gtk2/distinfo index 25070860a1a8..7a91b8b45182 100644 --- a/x11-toolkits/php-gtk2/distinfo +++ b/x11-toolkits/php-gtk2/distinfo @@ -1,3 +1,3 @@ -MD5 (php-gtk-1.0.2.tar.gz) = b11859c0778e40e53a14919a589db464 -SHA256 (php-gtk-1.0.2.tar.gz) = 50fd984534b7ba0f74d80f4d42f0ca0ac36e5d0e2eddf29ddc96c8aaae4aa607 -SIZE (php-gtk-1.0.2.tar.gz) = 304415 +MD5 (php-gtk-2.0.1.tar.gz) = d57ce885f32749320765e01c079e113b +SHA256 (php-gtk-2.0.1.tar.gz) = 996c79892f168e5f6b50ca2aaa1e925ec4ba4de8ad6d3b86dd2722ad4662cc0b +SIZE (php-gtk-2.0.1.tar.gz) = 1254316 diff --git a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_config.m4 b/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_config.m4 deleted file mode 100644 index d9e8d9c89f91..000000000000 --- a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_config.m4 +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/gtkhtml/config.m4.orig Thu Apr 11 04:19:46 2002 -+++ ext/gtkhtml/config.m4 Sat Dec 7 21:16:19 2002 -@@ -21,7 +21,7 @@ - AC_MSG_ERROR(unable to locate gnome-config) - else - HTML_CFLAGS=`$GNOME_CONFIG --cflags $module_args` -- if test "x$?" == "x1"; then -+ if test "x$?" = "x1"; then - AC_MSG_ERROR(gnome-config doesn't seem to have support for gtkhtml) - fi - HTML_LIBS=`$GNOME_CONFIG --libs $module_args` diff --git a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.defs b/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.defs deleted file mode 100644 index e77d5b4d6b46..000000000000 --- a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.defs +++ /dev/null @@ -1,19 +0,0 @@ ---- ext/gtkhtml/gtkhtml.defs.orig Mon Mar 4 09:36:38 2002 -+++ ext/gtkhtml/gtkhtml.defs Sat Dec 7 22:25:24 2002 -@@ -348,6 +348,7 @@ - (parameter (type-and-name GdkAtom selection)) - (parameter (type-and-name gint type)) - (parameter (type-and-name gint32 time)) -+ (parameter (type-and-name gboolean as_cite)) - ) - - ;; Loading -@@ -571,7 +572,7 @@ - (return-type none) - ) - (method paste -- (of-object HTML (Gtk)) -+ (of-object HTML (Gtk, 0)) - (c-name gtk_html_paste) - (return-type none) - ) diff --git a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.overrides b/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.overrides deleted file mode 100644 index f5ecfea3eef3..000000000000 --- a/x11-toolkits/php-gtk2/files/patch-ext_gtkhtml_gtkhtml.overrides +++ /dev/null @@ -1,12 +0,0 @@ ---- ext/gtkhtml/gtkhtml.overrides.orig Thu Sep 19 15:57:28 2002 -+++ ext/gtkhtml/gtkhtml.overrides Sun Dec 8 18:10:47 2002 -@@ -1068,7 +1068,8 @@ - widget = php_gtk_shift_to_iframe_parent (widget, &x, &y); - - engine = GTK_HTML (widget)->engine; -- if (GTK_HTML (widget)->button1_pressed && html_engine_get_editable (engine)) -+/* FIXME: button1_pressed has been removed? */ -+ if (html_engine_get_editable (engine)) - html_engine_jump_at (engine, - x + engine->x_offset, - y + engine->y_offset); diff --git a/x11-toolkits/php-gtk2/files/patch-ext_scintilla-config.m4 b/x11-toolkits/php-gtk2/files/patch-ext_scintilla-config.m4 deleted file mode 100644 index 4d2f78def30c..000000000000 --- a/x11-toolkits/php-gtk2/files/patch-ext_scintilla-config.m4 +++ /dev/null @@ -1,16 +0,0 @@ ---- 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/local/include/scintilla /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-gtk2/files/pkg-message.in b/x11-toolkits/php-gtk2/files/pkg-message.in new file mode 100644 index 000000000000..6f5bfb82669b --- /dev/null +++ b/x11-toolkits/php-gtk2/files/pkg-message.in @@ -0,0 +1,8 @@ +***************************************************************************** + +The following line has been added to your %%LOCALBASE%%/etc/php/extensions.ini +configuration file to automatically load the installed extension: + +extension=php_gtk2.so + +***************************************************************************** diff --git a/x11-toolkits/php-gtk2/pkg-descr b/x11-toolkits/php-gtk2/pkg-descr index 14f7c0d63481..27ed1e4d9c4f 100644 --- a/x11-toolkits/php-gtk2/pkg-descr +++ b/x11-toolkits/php-gtk2/pkg-descr @@ -2,6 +2,9 @@ PHP-GTK is a PHP extension that enables you to write client-side, cross-platform GUI applications. This is the first extension for PHP of its kind, and was written in part to prove that PHP is a capable general-purpose language that is suited to more than just the web -application environment. +application environment. WWW: http://gtk.php.net/ + +- Kris Moore +kmoore@FreeBSD.org diff --git a/x11-toolkits/php-gtk2/pkg-plist b/x11-toolkits/php-gtk2/pkg-plist index 7a04300b8233..e9600f4e4d40 100644 --- a/x11-toolkits/php-gtk2/pkg-plist +++ b/x11-toolkits/php-gtk2/pkg-plist @@ -1,15 +1,22 @@ -lib/php/%%PHPEXTDIR%%/php_gtk.so -%%EXAMPLESDIR%%/combobutton.php -%%EXAMPLESDIR%%/fileselection.php -%%EXAMPLESDIR%%/gtk.php -%%EXAMPLESDIR%%/hello.php -%%EXAMPLESDIR%%/list.php -%%EXAMPLESDIR%%/piemenu.php -%%EXAMPLESDIR%%/scribble.php -%%EXAMPLESDIR%%/scrollpane.php -%%EXAMPLESDIR%%/spaned.php -%%EXAMPLESDIR%%/sqpane.php -%%EXAMPLESDIR%%/testgtkrc -%%EXAMPLESDIR%%/testgtkrc2 -%%EXAMPLESDIR%%/window.xpm -@dirrm %%EXAMPLESDIR%% +lib/php/%%PHPEXTDIR%%/php_gtk2.so +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/combobutton.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fileselection.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gtk.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hello.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/list.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/piemenu.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scribble.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scrollpane.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/spaned.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sqpane.php +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/testgtkrc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/testgtkrc2 +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/window.xpm +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +@exec mkdir -p %D/etc/php +@exec echo extension=php_gtk2.so >> %D/etc/php/extensions.ini +@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig +@unexec grep -v extension=php_gtk2.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true +@unexec rm %D/etc/php/extensions.ini.orig 2>&1 >/dev/null || true +@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini +@dirrmtry %D/etc/php |