Bug 149670 - New package: dev-php5/php-gtk-2.0.0_alpha
Bug#: 149670 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: CLOSED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: anant@gentoo.org Reported By: anant@gentoo.org
Component: Ebuilds
URL: 
Summary: New package: dev-php5/php-gtk-2.0.0_alpha
Keywords:  
Status Whiteboard: 
Opened: 2006-09-30 16:42 0000
Description:   Opened: 2006-09-30 16:42 0000
Hi!

Here's an ebuild for the alpha release of PHP-GTK 2. PHP-GTK 2 is the Gtk+2
binding for PHP.

It should most probably go into dev-php/php-gtk, even though it requires PHP
5.1.2 upwards to run.

I ran several tests with this ebuild on my x86 system, with all possible
combinations of USE flags; all of them were successful.

Cheers,
Anant

------- Comment #1 From Anant Narayanan (RETIRED) 2006-09-30 16:44:04 0000 -------
Created an attachment (id=98485) [details]
php-gtk-2.0.0.ebuild (New package)

------- Comment #2 From Sebastian Bergmann (RETIRED) 2006-10-01 00:58:33 0000 -------
I tried the ebuild and it works, however:

  1. We should not automatically enable this extension (ie. add it to the
     configuration file for PHP CLI. Running PHP CLI with php-gtk loaded as
     root causes the PHP interpreter to die on startup.

  2. I am not comfortable with the mozilla dependency. It should be possible
     to build this package against Mozilla Firefox.

  3. I am not sure we need all the USE flags.

------- Comment #3 From Jakub Moc (RETIRED) 2006-10-01 01:00:39 0000 -------
(In reply to comment #2)
>   2. I am not comfortable with the mozilla dependency. It should be possible
>      to build this package against Mozilla Firefox.

+1, mozilla is not acceptable. firefox and seamonkey is the way to go,
optimally it should compile against both of them. Mozilla needs to be removed
from portage.

------- Comment #4 From Anant Narayanan (RETIRED) 2006-10-01 11:11:37 0000 -------
>   1. We should not automatically enable this extension (ie. add it to the
>      configuration file for PHP CLI. Running PHP CLI with php-gtk loaded as
>      root causes the PHP interpreter to die on startup.

Agreed. ebuild modified accordingly.

>   2. I am not comfortable with the mozilla dependency. It should be possible
>      to build this package against Mozilla Firefox.

Done, also pushed upstream.

>   3. I am not sure we need all the USE flags.

Which ones? nolibglade is required because libglade is built by default, but
sometimes you may not want libglade support.  sourceview and mozembed add
support for the GtkSourceView and GtkMozEmbed widgets. (BTW, I've already left
out the scintilla USE flag even though it's included in the release, since we
haven't decided to include it or not in the final PHP-GTK 2 release yet)

------- Comment #5 From Anant Narayanan (RETIRED) 2006-10-01 11:14:48 0000 -------
Created an attachment (id=98535) [details]
php-gtk-2.0.0.ebuild (New package - Modified as per comments)

------- Comment #6 From Anant Narayanan (RETIRED) 2006-10-01 11:15:28 0000 -------
Created an attachment (id=98536) [details]
Patch to allow building mozembed against Firefox

------- Comment #7 From Matthew Schultz 2006-11-10 07:40:04 0000 -------
Created an attachment (id=101606) [details]
New ebuild with extra options

I added ~amd64 to the ebuild and changed the dependency to seamonkey.  Mozilla
is old and isn't secure so it shouldn't even be a dependency anymore.  Also
note, that if you have the pecl-apd extension enabled for php-cli, it will not
emerge.  You need to disable the extension temporarily by commenting it out in
/etc/php/cli-php5/ext/apd.ini. I've e-mailed upstream about this problem so I
hope they will fix it.  If someone wants to build a patch for the ebuild, be my
guest.  The problem line is in the configure file and is this:

PHP_SAPI=`$PHP --version | sed -n 's/.*(\(...\)).*/\1/p'`

When APD is enabled, it will output:

cli
APD

When APD is disabled, it will output:

cli

It obviously doesn't like the second line.

------- Comment #8 From Matthew Schultz 2006-11-10 07:43:48 0000 -------
I forgot to mention that it emerged fine on amd64 arch and seems to be working
ok.

------- Comment #9 From Anant Narayanan (RETIRED) 2006-11-10 07:57:44 0000 -------
Hi Matthew,

Some comments:

- Why the dependency on seamonkey? Upstream doesn't even support it yet...

- The ebuild fetches php-gtk-2.0.0alpha which doesn't have firefox support yet
(its only in CVS), commenting the epatch isn't right!

- The pecl-apd bug is new. Although we haven't recieved any bug report yet at
upstream, we'll look into it.

Thanks!

------- Comment #10 From Matthew Schultz 2006-11-10 08:04:06 0000 -------
Created an attachment (id=101607) [details]
Ebuild update

Sorry, when I couldn't get it to emerge with APD, I commented out the patch to
test but forgot to reenable it since it doesn't have problems with that.  It
still shouldn't even depend on mozilla.  If it worked with mozilla, why
wouldn't it with seamonkey?  seamonkey is basically just mozilla 1.8.

------- Comment #11 From Matthew Schultz 2006-11-10 08:18:34 0000 -------
As far as I can tell, Seamonkey supports gtk2:

http://www.mozilla.org/projects/seamonkey/releases/seamonkey1.0.6/installation.html

------- Comment #12 From Anant Narayanan (RETIRED) 2006-11-10 08:21:39 0000 -------
> As far as I can tell, Seamonkey supports gtk2:

Seamonkey has a gtkmozembed component but unfortunately the soname of the
library is different for firefox, seamonkey and mozilla.

Do a `pkg-config --list-all | grep mozembed' and you'll see what I mean.

We need to add seamonkey support specifically to PHP-GTK 2, which I haven't
done yet; but will in the near future. In any case the php-gtk2alpha tarball
doesn't have either firefox or seamonkey support in it.

------- Comment #13 From Jory A. Pratt 2006-11-10 08:30:09 0000 -------
(In reply to comment #11)
> As far as I can tell, Seamonkey supports gtk2:
> 
> http://www.mozilla.org/projects/seamonkey/releases/seamonkey1.0.6/installation.html
> 

of course seamonkey supports gtk2 is is designed around firefox-1.5.x ... the
only similiarity between it and mozilla is the gecko-sdk engine is 1.8. This
does not belong in tree until a better understanding of mozilla products is
reached by all parties.

------- Comment #14 From Matthew Schultz 2006-11-10 08:34:05 0000 -------
The ebuild also needs to be modified to enable the extension by setting up the
php_gtk2.ini file.  If I get some more free time, I'll see if I can get that to
work.

------- Comment #15 From Matthew Schultz 2006-11-10 08:35:20 0000 -------
I'd say forget about the mozembed support until later just so it can get into
portage now.  It's annoying to have to emerge php4 just to use pptpconfig.

------- Comment #16 From Anant Narayanan (RETIRED) 2006-11-10 08:44:42 0000 -------
> The ebuild also needs to be modified to enable the extension by setting up the
> php_gtk2.ini file.  If I get some more free time, I'll see if I can get that to
> work.

Please read the entire history of a bug before adding to it!

I had included support for enabling the extension automatically in my first
ebuild, but removed it because of Sebastian's perfectly reasonable comment.

------- Comment #17 From Anant Narayanan (RETIRED) 2006-11-10 08:46:31 0000 -------
> I'd say forget about the mozembed support until later just so it can get into
> portage now.  It's annoying to have to emerge php4 just to use pptpconfig.

FYI, pptpconfig will NOT work out-of-the-box with PHP-GTK 2. It needs to be
ported. 

------- Comment #18 From Matthew Schultz 2006-11-10 08:58:21 0000 -------
(In reply to comment #16)
> > The ebuild also needs to be modified to enable the extension by setting up the
> > php_gtk2.ini file.  If I get some more free time, I'll see if I can get that to
> > work.
> 
> Please read the entire history of a bug before adding to it!
> 
> I had included support for enabling the extension automatically in my first
> ebuild, but removed it because of Sebastian's perfectly reasonable comment.
> 

Sorry.  I read it and I don't know what he's talking about.  My cli works just
fine on cli.  I ran a few tests and it doesn't choke on anything.  I even ran
php-gtk code without issue.  ????


> FYI, pptpconfig will NOT work out-of-the-box with PHP-GTK 2. It needs to be
> ported.

Yup I e-mailed upstream about this.  I'm going to see if I can get to work by
modding it myself.   

------- Comment #19 From Matthew Schultz 2006-11-10 08:59:42 0000 -------
Blah, sorry, php5 works just fine on cli with php-gtk enabled.

------- Comment #20 From Anant Narayanan (RETIRED) 2006-11-10 09:07:07 0000 -------
> Blah, sorry, php5 works just fine on cli with php-gtk enabled.

NOT if you don't have an X server running. Please do a little research before
making conclusive statements. 

------- Comment #21 From Kfir Ozer 2007-01-20 10:05:47 0000 -------
i need to remove !nolibglade? for the ebuild to properly digest.

------- Comment #22 From Anant Narayanan (RETIRED) 2007-02-20 20:34:10 0000 -------
http://packages.gentoo.org/ebuilds/?php-gtk-2.0.0_alpha

------- Comment #23 From Matthew Schultz 2007-02-20 20:41:10 0000 -------
What about an AMD64 keyword?

------- Comment #24 From Anant Narayanan (RETIRED) 2007-02-20 20:51:59 0000 -------
(In reply to comment #23)
> What about an AMD64 keyword?

Will be addressed by the AMD64 arch team, see bug #167793