aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/php-gtk2/Makefile
diff options
context:
space:
mode:
authorkmoore <kmoore@FreeBSD.org>2010-02-23 02:28:31 +0800
committerkmoore <kmoore@FreeBSD.org>2010-02-23 02:28:31 +0800
commit51e38fb4cc074a5b18482b50f1649bb920ecb116 (patch)
treea36e48516a37284d9324dba67478690d57064c4c /x11-toolkits/php-gtk2/Makefile
parent8e83ac9dc96213578d5d58523861eca9736aeb39 (diff)
downloadfreebsd-ports-gnome-51e38fb4cc074a5b18482b50f1649bb920ecb116.tar.gz
freebsd-ports-gnome-51e38fb4cc074a5b18482b50f1649bb920ecb116.tar.zst
freebsd-ports-gnome-51e38fb4cc074a5b18482b50f1649bb920ecb116.zip
New port -- An extension to use gtk2 in PHP-applications
Approved by: miwi (mentor) Feature safe: yes
Diffstat (limited to 'x11-toolkits/php-gtk2/Makefile')
-rw-r--r--x11-toolkits/php-gtk2/Makefile65
1 files changed, 29 insertions, 36 deletions
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>