From 1c76142bb4a44400b6e554508883cb85f63f89f8 Mon Sep 17 00:00:00 2001 From: Anant Narayanan Date: Tue, 20 Feb 2007 16:40:24 +0000 Subject: [PATCH] Initial ebuild for PHP-GTK2, closes bug #149670 Package-Manager: portage-2.1.2-r10 --- dev-php5/php-gtk/ChangeLog | 10 +++ dev-php5/php-gtk/Manifest | 20 +++++ .../php-gtk/files/digest-php-gtk-2.0.0_alpha | 3 + dev-php5/php-gtk/files/gtkmozembed.patch | 29 ++++++ dev-php5/php-gtk/metadata.xml | 13 +++ dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild | 88 +++++++++++++++++++ 6 files changed, 163 insertions(+) create mode 100644 dev-php5/php-gtk/ChangeLog create mode 100644 dev-php5/php-gtk/Manifest create mode 100644 dev-php5/php-gtk/files/digest-php-gtk-2.0.0_alpha create mode 100644 dev-php5/php-gtk/files/gtkmozembed.patch create mode 100644 dev-php5/php-gtk/metadata.xml create mode 100644 dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild diff --git a/dev-php5/php-gtk/ChangeLog b/dev-php5/php-gtk/ChangeLog new file mode 100644 index 000000000000..58574e64a869 --- /dev/null +++ b/dev-php5/php-gtk/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for dev-php5/php-gtk +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php5/php-gtk/ChangeLog,v 1.1 2007/02/20 16:40:23 anant Exp $ + +*php-gtk-2.0.0_alpha (20 Feb 2007) + + 20 Feb 2007; +files/gtkmozembed.patch, +metadata.xml, + +php-gtk-2.0.0_alpha.ebuild: + Initial ebuild, closes bug #149670 + diff --git a/dev-php5/php-gtk/Manifest b/dev-php5/php-gtk/Manifest new file mode 100644 index 000000000000..f089a55cdbe9 --- /dev/null +++ b/dev-php5/php-gtk/Manifest @@ -0,0 +1,20 @@ +AUX gtkmozembed.patch 1449 RMD160 6b24ffe5c7b9ca8d044161593c97b42d9fffb414 SHA1 54f6683e09f80871d5162b9471c53a5bc5caa223 SHA256 690a9f40fcca0606626ac4057c0564bbad158b9a709c692332f4247c660fedf0 +MD5 5959d6cdf2c414896f654c23f3e5e7ca files/gtkmozembed.patch 1449 +RMD160 6b24ffe5c7b9ca8d044161593c97b42d9fffb414 files/gtkmozembed.patch 1449 +SHA256 690a9f40fcca0606626ac4057c0564bbad158b9a709c692332f4247c660fedf0 files/gtkmozembed.patch 1449 +DIST php-gtk-2.0.0alpha.tar.gz 725543 RMD160 f3414718eebcda652b8c6d0c4be5c805779530d7 SHA1 f24e7822c3345167f334cb87edc9494112a14a98 SHA256 003b9e0863b59014690770865d441cf59269fed7776305d002933d1d749971c0 +EBUILD php-gtk-2.0.0_alpha.ebuild 2197 RMD160 0b7686093e259e2ebfbbe81186608a403b935a88 SHA1 350d1abb061ebaff38fd618a0ae788d85d25e309 SHA256 9b77bbefa8f0c346f318da5e1503355947d651ad94889bff67c225bc9ca51d56 +MD5 d89e817c535315782031c732a6ae41d4 php-gtk-2.0.0_alpha.ebuild 2197 +RMD160 0b7686093e259e2ebfbbe81186608a403b935a88 php-gtk-2.0.0_alpha.ebuild 2197 +SHA256 9b77bbefa8f0c346f318da5e1503355947d651ad94889bff67c225bc9ca51d56 php-gtk-2.0.0_alpha.ebuild 2197 +MISC ChangeLog 384 RMD160 8a5f87e08a88e5f294855502afebcbea25d1d214 SHA1 ae8bf6e3420dccd7dcb2f886512164539a235d91 SHA256 e60a17ff02324d488376443c4b4e269913c05a5d9efe94fe801f92df5be8d755 +MD5 2d38e35407a96e0e0fad817f10723d24 ChangeLog 384 +RMD160 8a5f87e08a88e5f294855502afebcbea25d1d214 ChangeLog 384 +SHA256 e60a17ff02324d488376443c4b4e269913c05a5d9efe94fe801f92df5be8d755 ChangeLog 384 +MISC metadata.xml 405 RMD160 acee3270373b0fa234b1231d34487f109885c083 SHA1 4fc53604200511ec9e1e8b43928176e80fce82a1 SHA256 18e24b16b180676ae3445a64d4ff936da5b2d7df7eb36d45c352df033dc9a197 +MD5 ff22ec75ee671ec520e263f8c60fe0c2 metadata.xml 405 +RMD160 acee3270373b0fa234b1231d34487f109885c083 metadata.xml 405 +SHA256 18e24b16b180676ae3445a64d4ff936da5b2d7df7eb36d45c352df033dc9a197 metadata.xml 405 +MD5 a2d4e4a3c04d762209cf6c4d78cec7e2 files/digest-php-gtk-2.0.0_alpha 256 +RMD160 b75781cabe7ed04eda0713189e95f831b1ebf7eb files/digest-php-gtk-2.0.0_alpha 256 +SHA256 67c63c2360fcf140b9dac338f2b7165fabfe6c28109bd5ed6007f41cefc27c0f files/digest-php-gtk-2.0.0_alpha 256 diff --git a/dev-php5/php-gtk/files/digest-php-gtk-2.0.0_alpha b/dev-php5/php-gtk/files/digest-php-gtk-2.0.0_alpha new file mode 100644 index 000000000000..4128927204bd --- /dev/null +++ b/dev-php5/php-gtk/files/digest-php-gtk-2.0.0_alpha @@ -0,0 +1,3 @@ +MD5 f2621750f1dec322d3fe3670cb62b926 php-gtk-2.0.0alpha.tar.gz 725543 +RMD160 f3414718eebcda652b8c6d0c4be5c805779530d7 php-gtk-2.0.0alpha.tar.gz 725543 +SHA256 003b9e0863b59014690770865d441cf59269fed7776305d002933d1d749971c0 php-gtk-2.0.0alpha.tar.gz 725543 diff --git a/dev-php5/php-gtk/files/gtkmozembed.patch b/dev-php5/php-gtk/files/gtkmozembed.patch new file mode 100644 index 000000000000..cb5892bb2011 --- /dev/null +++ b/dev-php5/php-gtk/files/gtkmozembed.patch @@ -0,0 +1,29 @@ +--- ../php-gtk/ext/mozembed/config.m4 2006-03-08 01:03:41.000000000 +0530 ++++ ext/mozembed/config.m4 2006-10-01 21:42:04.000000000 +0530 +@@ -1,16 +1,22 @@ + dnl $Id: gtkmozembed.patch,v 1.1 2007/02/20 16:40:23 anant Exp $ + dnl config.m4 for mozembed module + +-define(mozembed_required_version, 1.7.0) ++define(firefox_required_version, 1.5.0) ++define(mozilla_required_version, 1.7.0) + + PHP_GTK_ARG_ENABLE(mozembed,for GtkMozEmbed support, +-[ --enable-mozembed Enable GtkMozEmbed support],no) ++[ --enable-mozembed Enable GtkMozEmbed support],no) + ++dnl first check for firefox, then mozilla + if test "$PHP_GTK_MOZEMBED" != "no"; then +- PKG_CHECK_MODULES(MOZEMBED, [mozilla-gtkmozembed >= mozembed_required_version], ++ PKG_CHECK_MODULES(MOZEMBED, [firefox-gtkmozembed >= firefox_required_version], + have_mozembed=yes, have_mozembed=no) + if test "$have_mozembed" != "yes"; then +- AC_MSG_RESULT([Unable to locate mozembed version mozembed_required_version or higher: not building]) ++ PKG_CHECK_MODULES(MOZEMBED, [mozilla-gtkmozembed >= mozilla_required_version], ++ have_mozembed=yes, have_mozembed=no) ++ fi ++ if test "$have_mozembed" != "yes"; then ++ AC_MSG_RESULT([Unable to locate firefox-gtkmozembed version firefox_required_version or mozilla-gtkmozembed version mozilla_required_version or higher: not building]) + else + AC_DEFINE(HAVE_MOZEMBED, 1, [mozembed support]) + PHP_EVAL_INCLINE($MOZEMBED_CFLAGS) diff --git a/dev-php5/php-gtk/metadata.xml b/dev-php5/php-gtk/metadata.xml new file mode 100644 index 000000000000..38a7a57d2a4c --- /dev/null +++ b/dev-php5/php-gtk/metadata.xml @@ -0,0 +1,13 @@ + + + + php + + anant@gentoo.org + Anant Narayanan + + + This PHP5 extension wraps the Gtk+ 2 library thereby + providing the ability to write GUI applications in PHP. + + diff --git a/dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild b/dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild new file mode 100644 index 000000000000..52d0a7d5e96b --- /dev/null +++ b/dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php5/php-gtk/php-gtk-2.0.0_alpha.ebuild,v 1.1 2007/02/20 16:40:23 anant Exp $ + +PHP_EXT_NAME="php_gtk2" +inherit php-ext-source-r1 + +DESCRIPTION="PHP 5 bindings for the Gtk+ 2 library" +HOMEPAGE="http://gtk.php.net/" +SRC_URI="http://gtk.php.net/distributions/${PN}-${PV/_alpha/}alpha.tar.gz" + +LICENSE="PHP" +SLOT="2" +KEYWORDS="~x86" +IUSE="debug mozembed nolibglade sourceview" + +S="${WORKDIR}/${PN}-${PV/_alpha/}alpha" + +RDEPEND=">=dev-lang/php-5.1.2 + >=x11-libs/gtk+-2.6.0 + >=dev-libs/glib-2.6.0 + >=x11-libs/pango-1.8.0 + >=dev-libs/atk-1.6.0 + !nolibglade? ( >=gnome-base/libglade-2.5.0 ) + mozembed? ( || ( >=www-client/mozilla-1.7.0 >=www-client/mozilla-firefox-1.5.0 ) ) + sourceview? ( >=x11-libs/gtksourceview-1.6.0 )" +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.9" + +pkg_setup() { + require_php_cli + if use debug; then + require_php_with_use cli pcre debug + else + if has_debug; then + # PHP has debug enabled, but PHP-GTK doesn't + eerror "Please enable the debug USE flag!" + die + fi + require_php_with_use cli pcre + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + # Allow building against firefox + epatch "${FILESDIR}/gtkmozembed.patch" +} + +src_compile() { + # Can't use php-ext-source-r1_src_compile + # because PHP-GTK 2 uses buildconf and not autoconf + ./buildconf + + if use nolibglade; then + GLCONF=" --disable-libglade" + else + GLCONF="" + fi + + econf \ + $(use_enable debug ) \ + $(use_enable mozembed ) \ + $(use_enable sourceview) \ + $GLCONF \ + || die "Configure failed!" + + emake || die "Compilation failed!" +} + +src_install() { + # Can't use php-ext-source-r1_src_install + # because it looks for {ext}-default.so, + # that too in the wrong location + insinto "${EXT_DIR}" + newins "${S}/modules/${PHP_EXT_NAME}.so" "${PHP_EXT_NAME}.so" + + dodoc-php AUTHORS ChangeLog INSTALL NEWS README README.KNOWN-ISSUES TODO2 +} + +pkg_postinst() { + ewarn "Portage has not enabled this extension automatically!" + ewarn "You must add the line: 'extension=php_gtk2.so' in the" + ewarn "appropriate ini file, usually found in:" + ewarn "/etc/php/cli-php/php.ini" + epause +} -- 2.26.2