Bug 46201 - New port: php-gtk
Summary: New port: php-gtk
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Edwin Groothuis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-11 23:20 UTC by Thierry Thomas
Modified: 2003-04-02 00:07 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas 2002-12-11 23:20:01 UTC
 
 Great! I had planned to port this application.
 
 Here are some patches to the original submitted PR.
 They upgrade to v. 0.5.2, force the build of self contained
 extensions, install examples (all tested and working), fix some
 typos in the code, USE_GNOMENG, and add a BUILD_DEP towards phpize.
 
 I have also added knobs to build gdkpixbuf and gtkhtml extensions (not
 scintilla). They build OK, but I have been unable to test them => they
 are not installed.
 
 Added files:
 - files/patch-ext_combobutton_combobutton.defs
 - files/patch-ext_gtkhtml_config.m4
 - files/patch-ext_gtkhtml_gtkhtml.defs
 - files/patch-ext_gtkhtml_gtkhtml.overrides
 
 =-=-=-=-= Patch begins here =-=-=-=
 
 diff -urN x11-toolkits/php-gtk.orig/Makefile x11-toolkits/php-gtk/Makefile
 --- x11-toolkits/php-gtk.orig/Makefile	Sat Oct  5 11:36:51 2002
 +++ x11-toolkits/php-gtk/Makefile	Wed Dec 11 23:07:04 2002
 @@ -6,37 +6,86 @@
  #
  
  PORTNAME=	php-gtk
 -PORTVERSION= 	0.5.1
 +PORTVERSION=	0.5.2
  CATEGORIES=	x11-toolkits
  MASTER_SITES=	http://gtk.php.net/distributions/ \
 -	http://document-root.de/mirror/php-gtk/
 +		http://document-root.de/mirror/php-gtk/
  
  MAINTAINER=	kiesel@schlund.de
  
  # 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/autoconf213
 +		automake14:${PORTSDIR}/devel/automake14 \
 +		autoconf:${PORTSDIR}/devel/autoconf213 \
 +		${LOCALBASE}/bin/phpize:${PORTSDIR}/www/mod_php4
  RUN_DEPENDS=	php:${PORTSDIR}/lang/php4
  
  # Don't call autoconf directly, ./buildconf does this
  GNU_CONFIGURE=	yes
  USE_AUTOCONF=	no
  USE_LIBTOOL=	no
 -USE_GTK=	yes
 +USE_GNOMENG=	yes
 +USE_GNOME=	gtk12
 +# Fix environment for self contained extensions
 +ENVSCE=		-DHAVE_PHP_GTK=1 -DCOMPILE_DL_PHP_GTK=1	\
 +		-DHAVE_PIEMENU=1	\
 +		-DHAVE_SCROLLPANE=1	\
 +		-DHAVE_SPANED=1		\
 +		-DHAVE_SQPANE=1		\
 +		-DHAVE_COMBOBUTTON=1
 +.if !defined(WITHOUT_LIBGLADE)
 +USE_GNOME+=	libglade
 +ENVSCE+=	-DHAVE_LIBGLADE
 +.else
 +CONFIGURE_ARGS+=	--disable-libglade
 +.endif
 +.if !defined(WITHOUT_GDK_PIXBUF)
 +USE_GNOME+=	gdkpixbuf
 +CONFIGURE_ARGS+=	--enable-gdkpixbuf=shared
 +ENVSCE+=	-DHAVE_GDKPIXBUF=1 -DPHP_GTK_COMPILE_DL_GDKPIXBUF=1
 +.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
 +.endif
 +CONFIGURE_ENV=  CPPFLAGS="${ENVSCE}"
 +
 +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
 +
 +pre-everything::
 +	@${ECHO_MSG} '*********************************************************'
 +	@${ECHO_MSG} '* By default php-gtk is built with several Gnome deps.  *'
 +	@${ECHO_MSG} '* If you do not need them, you may define:              *'
 +	@${ECHO_MSG} '*                                                       *'
 +	@${ECHO_MSG} '*    - WITHOUT_LIBGLADE                                 *'
 +	@${ECHO_MSG} '*    - WITHOUT_GDK_PIXBUF                               *'
 +	@${ECHO_MSG} '*    - WITHOUT_GTKHTML                                  *'
 +	@${ECHO_MSG} '*                                                       *'
 +	@${ECHO_MSG} '*********************************************************'
  
 -post-patch:
 +post-patch-script:
 +	@${ECHO_MSG} "===>  Building configuration files for ${PKGNAME}"
  	(cd ${WRKSRC} && ./buildconf)
  
  do-install:
  	@$(MKDIR) -p ${PREFIX}/lib/php/extensions/
  	@${INSTALL_PROGRAM} ${WRKSRC}/modules/php_gtk.so ${PREFIX}/lib/php/extensions/php_gtk.so
 -	@${STRIP_CMD} ${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}
 +.for FILE in ${EXAMPLES}
 +	@${INSTALL_DATA} ${WRKSRC}/test/${FILE} ${EXAMPLESDIR}
 +.endfor
 +	@${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}."
 +.endif
  	@${ECHO} ""
  	@${CAT} ${MASTERDIR}/pkg-message
  	@${ECHO} ""
 diff -urN x11-toolkits/php-gtk.orig/distinfo x11-toolkits/php-gtk/distinfo
 --- x11-toolkits/php-gtk.orig/distinfo	Thu Oct  3 14:56:59 2002
 +++ x11-toolkits/php-gtk/distinfo	Sun Dec  8 17:46:44 2002
 @@ -1 +1 @@
 -MD5 (php-gtk-0.5.1.tar.gz) = 9dbd6b2307aae690ebf99be88c42ec9b
 +MD5 (php-gtk-0.5.2.tar.gz) = 91e18da45272b5b084e90201f95dfefa
 diff -urN x11-toolkits/php-gtk.orig/files/patch-ext_combobutton_combobutton.defs x11-toolkits/php-gtk/files/patch-ext_combobutton_combobutton.defs
 --- x11-toolkits/php-gtk.orig/files/patch-ext_combobutton_combobutton.defs	Thu Jan  1 01:00:00 1970
 +++ x11-toolkits/php-gtk/files/patch-ext_combobutton_combobutton.defs	Tue Dec 10 22:53:50 2002
 @@ -0,0 +1,10 @@
 +--- ext/combobutton/combobutton.defs.orig	Mon Sep 23 04:28:29 2002
 ++++ ext/combobutton/combobutton.defs	Tue Dec 10 22:53:10 2002
 +@@ -1,6 +1,6 @@
 + ;; -*- scheme -*-
 + ; object definitions ...
 +-(object Combonutton
 ++(object ComboButton
 +   (in-module Gtk)
 +   (parent Button (Gtk))
 +   (c-name GtkCombobutton)
 diff -urN x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_config.m4 x11-toolkits/php-gtk/files/patch-ext_gtkhtml_config.m4
 --- x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_config.m4	Thu Jan  1 01:00:00 1970
 +++ x11-toolkits/php-gtk/files/patch-ext_gtkhtml_config.m4	Sat Dec  7 21:20:42 2002
 @@ -0,0 +1,11 @@
 +--- 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 -urN x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_gtkhtml.defs x11-toolkits/php-gtk/files/patch-ext_gtkhtml_gtkhtml.defs
 --- x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_gtkhtml.defs	Thu Jan  1 01:00:00 1970
 +++ x11-toolkits/php-gtk/files/patch-ext_gtkhtml_gtkhtml.defs	Sat Dec  7 22:33:14 2002
 @@ -0,0 +1,19 @@
 +--- 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 -urN x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_gtkhtml.overrides x11-toolkits/php-gtk/files/patch-ext_gtkhtml_gtkhtml.overrides
 --- x11-toolkits/php-gtk.orig/files/patch-ext_gtkhtml_gtkhtml.overrides	Thu Jan  1 01:00:00 1970
 +++ x11-toolkits/php-gtk/files/patch-ext_gtkhtml_gtkhtml.overrides	Sun Dec  8 18:11:23 2002
 @@ -0,0 +1,12 @@
 +--- 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 -urN x11-toolkits/php-gtk.orig/pkg-plist x11-toolkits/php-gtk/pkg-plist
 --- x11-toolkits/php-gtk.orig/pkg-plist	Thu Oct  3 15:17:09 2002
 +++ x11-toolkits/php-gtk/pkg-plist	Sun Dec  8 21:29:29 2002
 @@ -1,3 +1,17 @@
  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%%
  @dirrm etc/php.gtk
 
 =-=-=-=-= Patch ends here =-=-=-=
 -- 
 Th. Thomas.
Comment 1 Thierry Thomas 2002-12-28 21:00:44 UTC
Le 12/12/2002 à 00:06:00 +0100, Thierry Thomas <thierry@pompo.net> écrivait :
> 
> >Number:         46201
> >Category:       ports
> >Synopsis:       New port: php-gtk

Oops! this is misfiled: I did not want to open a new PR, it was supposed
to be a follow-up to PR ports/43711.

Regards,
-- 
Th. Thomas.
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-01 03:24:34 UTC
State Changed
From-To: open->feedback

It fails to build for me on a -current system: 
===>  Building for php-gtk-0.5.2 
/bin/sh /local0/scratch/edwin/ports/NEW/php-gtk/work/php-gtk-0.5.2/libtool --mod[..] 
/local0/scratch/edwin/ports/NEW/php-gtk/work/php-gtk-0.5.2/./ext/gtk+/php_gtk+.c  -fPIC -DPIC -o ./ext/gtk+/php_gtk+.lo 
cc: unrecognized option `-prefer-pic' 
In file included from /local0/scratch/edwin/ports/NEW/php-gtk/work/php-gtk-0.5.2/main/php_gtk.h:90, 
from /local0/scratch/edwin/ports/NEW/php-gtk/work/php-gtk-0.5.2/ext/gtk+/php_gtk+.c:23: 
/local0/scratch/edwin/ports/NEW/php-gtk/work/php-gtk-0.5.2/ext/gtk+/php_gtk+.h:94:21: gen_gtk.h: No such file or directory 
*** Error code 1 


help! 


Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-01 03:24:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->edwin

Will help the submitter with it.
Comment 4 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-02 00:06:45 UTC
State Changed
From-To: feedback->closed

Commited, thanks!