remove gtkmozembed support -- it is not used by any gnome app in pkgsrc,

and it depends on xulrunner192
bump PKGREV
This commit is contained in:
drochner 2012-01-18 19:34:19 +00:00
parent 1b3832cd6d
commit ac0ddac2bf
6 changed files with 5 additions and 269 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.48 2012/01/13 10:55:50 obache Exp $
# $NetBSD: Makefile,v 1.49 2012/01/18 19:34:19 drochner Exp $
#
DISTNAME= gnome-python-extras-2.25.3
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/gnome-python/gnome2/}
PKGREVISION= 5
PKGREVISION= 6
CATEGORIES= x11 python
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-python-extras/2.25/}
EXTRACT_SUFX= .tar.bz2
@ -23,28 +23,18 @@ USE_LIBTOOL= YES
PKGCONFIG_OVERRIDE+= gnome-python-extras-2.0.pc.in
GNU_CONFIGURE= YES
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
USE_TOOLS+= pkg-config gmake autoconf automake
USE_TOOLS+= pkg-config gmake
USE_LANGUAGES= c c++
CONFIGURE_ARGS+= --with-gtkmozembed=xulrunner-1.9
CONFIGURE_ARGS+= --enable-docs
PYTHON_VERSIONS_ACCEPTED= 27 26 25
pre-configure:
${RM} -f ${WRKSRC}/gtkmozembed/gtkmozembedmodule.c
${RUN}cd ${WRKSRC};aclocal;autoheader;automake;autoconf
# for libtool happy
BUILDLINK_FNAME_TRANSFORM.xulrunner+= -e 's|/libxpcomglue.a|/libxpcomglue_pic.a|g'
BUILDLINK_TRANSFORM+= l:xpcomglue:xpcomglue_pic
.include "../../lang/python/extension.mk"
.include "../../lang/python/application.mk"
.include "../../www/libgtkhtml/buildlink3.mk"
.include "../../devel/libgnomeui/buildlink3.mk"
.include "../../devel/libbonoboui/buildlink3.mk"
.include "../../devel/xulrunner192/buildlink3.mk"
.include "../../textproc/gtkspell/buildlink3.mk"
# newer gdl versions are incompatible
#.include "../../devel/gdl/buildlink3.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.9 2011/03/16 06:51:11 obache Exp $
@comment $NetBSD: PLIST,v 1.10 2012/01/18 19:34:19 drochner Exp $
lib/pkgconfig/gnome-python-extras-2.0.pc
${PYSITELIB}/gtk-2.0/egg/__init__.py
${PYSITELIB}/gtk-2.0/egg/__init__.pyc
@ -6,14 +6,7 @@ ${PYSITELIB}/gtk-2.0/egg/__init__.pyo
${PYSITELIB}/gtk-2.0/egg/recent.la
${PYSITELIB}/gtk-2.0/egg/trayicon.la
${PYSITELIB}/gtk-2.0/gtkhtml2.la
${PYSITELIB}/gtk-2.0/gtkmozembed.la
${PYSITELIB}/gtk-2.0/gtkspell.la
share/gtk-doc/html/pygtkmozembed/class-gtkmozembed.html
share/gtk-doc/html/pygtkmozembed/gtkmozembed-class-reference.html
share/gtk-doc/html/pygtkmozembed/index.html
share/gtk-doc/html/pygtkmozembed/index.sgml
share/gtk-doc/html/pygtkmozembed/pygtkmozembed.devhelp
share/gtk-doc/html/pygtkmozembed/style.css
share/gtk-doc/html/pygtkspell/class-gtkspell.html
share/gtk-doc/html/pygtkspell/gtkspell-class-reference.html
share/gtk-doc/html/pygtkspell/index.html
@ -21,5 +14,4 @@ share/gtk-doc/html/pygtkspell/index.sgml
share/gtk-doc/html/pygtkspell/pygtkspell.devhelp
share/gtk-doc/html/pygtkspell/style.css
share/pygtk/2.0/defs/gtkhtml2.defs
share/pygtk/2.0/defs/gtkmozembed.defs
share/pygtk/2.0/defs/trayicon.defs

View file

@ -1,8 +1,5 @@
$NetBSD: distinfo,v 1.9 2011/03/16 06:51:11 obache Exp $
$NetBSD: distinfo,v 1.10 2012/01/18 19:34:19 drochner Exp $
SHA1 (gnome-python-extras-2.25.3.tar.bz2) = e69e5288466c960ed6f985bb10c9969b21ed85a4
RMD160 (gnome-python-extras-2.25.3.tar.bz2) = e09bc0152512e2caa61626a7dc788d7336f24e46
Size (gnome-python-extras-2.25.3.tar.bz2) = 370489 bytes
SHA1 (patch-configure.ac) = 99dbd3acf78da883ff10cebd148bafcb6d6a9928
SHA1 (patch-gtkmozembed_Makefile.am) = d4c3d324c328bec48fd00e4e641f1a539b0628ce
SHA1 (patch-gtkmozembed_gtkmozembedmodule.cpp) = c870d91b64f222930efccf62c565d7f738081424

View file

@ -1,138 +0,0 @@
$NetBSD: patch-configure.ac,v 1.1 2011/03/16 06:51:13 obache Exp $
* Allow building with xulrunner 1.9
https://bugzilla.gnome.org/show_bug.cgi?id=532856
--- configure.ac.orig 2009-02-15 22:20:23.000000000 +0000
+++ configure.ac
@@ -19,6 +19,7 @@ m4_define(gtkhtml2_required_version,
m4_define(mozilla_required_version, 1.2b)
m4_define(firefox_required_version, 1.0)
m4_define(xulrunner_required_version, 1.8)
+m4_define(xulrunner19_required_version, 1.9)
m4_define(libgda_required_version, 3.99.11)
m4_define(gksu_required_version, 1.2.5)
m4_define(gksu2_required_version, 2.0.4)
@@ -81,6 +82,8 @@ AM_CONDITIONAL(OS_WIN32, test "$os_win32
AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
+AC_PROG_CXX
+m4_ifdef([LT_OUTPUT],[LT_OUTPUT])
dnl check for python
AM_PATH_PYTHON(2.3)
@@ -230,65 +233,88 @@ AM_CONDITIONAL(BUILD_EGG, $build_eggrece
dnl should we build the gtkmozembed module?
AC_ARG_BINDING([gtkmozembed], [ON], [gtkmozembed])
AC_ARG_WITH(gtkmozembed, AS_HELP_STRING(
- [--with-gtkmozembed=mozilla|firefox|xulrunner],
+ [--with-gtkmozembed=mozilla|firefox|xulrunner|xulrunner-1.9],
[package that provides libgtkmozembed]),
[mozpackage=$withval], [mozpackage=any])
if "$build_gtkmozembed"; then
if test $mozpackage = any ; then
+PKG_CHECK_MODULES(GTKMOZEMBED, [libxul-embedding >= xulrunner19_required_version
+ gtk+-2.0 >= gtk_required_version],
+ [build_gtkmozembed=true; mozpackage=xulrunner-1.9; mozpkgconfig=libxul-embedding],
+ [
PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed >= xulrunner_required_version
gtk+-2.0 >= gtk_required_version],
- [build_gtkmozembed=true; mozpackage=xulrunner],
+ [build_gtkmozembed=true; mozpackage=xulrunner; mozpkgconfig=$mozpackage-gtkmozembed],
[
PKG_CHECK_MODULES(GTKMOZEMBED, [firefox-gtkmozembed >= firefox_required_version
gtk+-2.0 >= gtk_required_version],
- [build_gtkmozembed=true; mozpackage=firefox],
+ [build_gtkmozembed=true; mozpackage=firefox; mozpkgconfig=$mozpackage-gtkmozembed],
[
PKG_CHECK_MODULES(GTKMOZEMBED, [mozilla-gtkmozembed >= mozilla_required_version
gtk+-2.0 >= gtk_required_version],
- [build_gtkmozembed=true; mozpackage=mozilla],
+ [build_gtkmozembed=true; mozpackage=mozilla; mozpkgconfig=$mozpackage-gtkmozembed],
build_gtkmozembed=false)
])
])
+ ])
else
+GTKMOZEMBED_CODEGEN_DEFINES=""
case $mozpackage in
- xulrunner) mozpackage_required_version=xulrunner_required_version ;;
- firefox) mozpackage_required_version=firefox_required_version ;;
- mozilla)
- mozpackage_required_version=mozilla_required_version
- AC_MSG_CHECKING([for extra gtkmozembed code generation flags])
- PKG_CHECK_MODULES(XUL19, mozilla-gtkmozembed >= 0.21 gtk+-2.0,
- GTKMOZEMBED_CODEGEN_DEFINES="-DHAVE_XUL19",
- GTKMOZEMBED_CODEGEN_DEFINES="")
- AC_MSG_RESULT([$GTKMOZEMBED_CODEGEN_DEFINES])
- ;;
- *) AC_MSG_ERROR([--with-gtkmozembed argument must be either 'mozilla', 'firefox', or 'xulrunner'])
+ xulrunner-1.9) mozpackage_required_version=xulrunner19_required_version ; mozpkgconfig=libxul-embedding ; GTKMOZEMBED_CODEGEN_DEFINES="-DHAVE_XUL19" ;;
+ xulrunner) mozpackage_required_version=xulrunner_required_version ; mozpkgconfig=$mozpackage-gtkmozembed ;;
+ firefox) mozpackage_required_version=firefox_required_version ; mozpkgconfig=$mozpackage-gtkmozembed ;;
+ mozilla) mozpackage_required_version=mozilla_required_version ; mozpkgconfig=$mozpackage-gtkmozembed ;;
+ *) AC_MSG_ERROR([--with-gtkmozembed argument must be either 'mozilla', 'firefox', 'xulrunner-1.9' or 'xulrunner'])
esac
AC_SUBST(GTKMOZEMBED_CODEGEN_DEFINES)
-PKG_CHECK_MODULES(GTKMOZEMBED, [$mozpackage-gtkmozembed >= $mozpackage_required_version,
- gtk+-2.0 >= gtk_required_version],
+PKG_CHECK_MODULES(GTKMOZEMBED, [$mozpkgconfig >= $mozpackage_required_version,
+ gtk+-2.0 >= gtk_required_version],
build_gtkmozembed=true,
build_gtkmozembed=false)
fi
AM_CONDITIONAL(BUILD_GTKMOZEMBED, $build_gtkmozembed)
-if test -n "$export_dynamic"; then
- GTKMOZEMBED_LIBS=`echo $GTKMOZEMBED_LIBS | sed -e "s/$export_dynamic//"`
-fi
-MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
-if test -z "$MOZILLA_HOME"; then
- MOZILLA_HOME="`$PKG_CONFIG --variable=sdkdir $mozpackage-gtkmozembed`/lib"
-fi
-AC_SUBST(MOZILLA_HOME)
+if test $mozpackage = xulrunner-1.9; then
+ GTKMOZEMBED_CFLAGS="$(pkg-config --cflags --define-variable=includetype=unstable libxul-embedding gtk+-2.0)"
+else
+ MOZILLA_HOME="`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
+ if test -z "$MOZILLA_HOME"; then
+ MOZILLA_HOME="`$PKG_CONFIG --variable=sdkdir $mozpackage-gtkmozembed`/lib"
+ fi
+ AC_SUBST(MOZILLA_HOME)
+fi # $mozpackage = xulrunner-1.9
fi # if build_gtkmozembed
AM_CONDITIONAL(BUILD_GTKMOZEMBED, $build_gtkmozembed)
+
+AC_LANG_PUSH(C++)
+_SAVE_CPPFLAGS=$CPPFLAGS
+_SAVE_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=$GTKMOZEMBED_CFLAGS
+CPPFLAGS=
+AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[[#ifndef XPCOM_GLUE
+#error "no xpcom glue"
+#endif]])],
+[have_xpcom_glue=yes], [have_xpcom_glue=yes]
+)
+CPPFLAGS=$_SAVE_CPPFLAGS
+CXXFLAGS=$_SAVE_CXXFLAGS
+AC_LANG_POP(C++)
+
+AM_CONDITIONAL(HAVE_XPCOM_GLUE, [test $have_xpcom_glue=yes])
+if test "$have_xpcom_glue" = "yes"; then
+ AC_DEFINE(HAVE_XPCOM_GLUE, 1,
+ [Define to 1 if libxpcomglue is being used.])
+fi
+
if test -n "$export_dynamic"; then
GTKMOZEMBED_LIBS=`echo $GTKMOZEMBED_LIBS | sed -e "s/$export_dynamic//"`
fi

View file

@ -1,25 +0,0 @@
$NetBSD: patch-gtkmozembed_Makefile.am,v 1.1 2011/03/16 06:51:13 obache Exp $
* Allow building with xulrunner 1.9
https://bugzilla.gnome.org/show_bug.cgi?id=532856
--- gtkmozembed/Makefile.am.orig 2008-12-12 01:06:29.000000000 +0000
+++ gtkmozembed/Makefile.am
@@ -13,9 +13,15 @@ pkgpyexecdir = $(pyexecdir)/gtk-2.0
pkgpyexec_LTLIBRARIES = gtkmozembed.la
gtkmozembed_la_LDFLAGS = -module -avoid-version \
-export-symbols-regex initgtkmozembed \
- -R$(MOZILLA_HOME) -L$(MOZILLA_HOME)
+ $(NULL)
+
+# only use rpath for non-glue builds
+if !HAVE_XPCOM_GLUE
+ gtkmozembed_la_LDFLAGS + = -R$(MOZILLA_HOME) -L$(MOZILLA_HOME)
+endif
+
gtkmozembed_la_LIBADD = $(GTKMOZEMBED_LIBS)
-gtkmozembed_la_SOURCES = gtkmozembedmodule.c
+gtkmozembed_la_SOURCES = gtkmozembedmodule.cpp
nodist_gtkmozembed_la_SOURCES = gtkmozembed.c
gtkmozembed.c: gtkmozembed.defs gtkmozembed.override
CLEANFILES = gtkmozembed.c

View file

@ -1,80 +0,0 @@
$NetBSD: patch-gtkmozembed_gtkmozembedmodule.cpp,v 1.1 2011/03/16 06:51:13 obache Exp $
* Allow building with xulrunner 1.9
https://bugzilla.gnome.org/show_bug.cgi?id=532856
--- gtkmozembed/gtkmozembedmodule.cpp.orig 2011-03-12 10:53:59.000000000 +0000
+++ gtkmozembed/gtkmozembedmodule.cpp
@@ -0,0 +1,72 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* include this first, before NO_IMPORT_PYGOBJECT is defined */
+#include <pygobject.h>
+#include <pygtk/pygtk.h>
+
+#ifdef XPCOM_GLUE
+#include "gtkmozembed_glue.cpp"
+#endif
+
+G_BEGIN_DECLS
+void initgtkmozembed(void);
+void pygtkmozembed_add_constants(PyObject *module, const gchar *strip_prefix);
+void pygtkmozembed_register_classes (PyObject *d);
+G_END_DECLS
+
+extern PyMethodDef pygtkmozembed_functions[];
+
+void
+initgtkmozembed(void)
+{
+ PyObject *m, *d;
+ int argc = 0;
+
+ init_pygobject ();
+
+#ifdef XPCOM_GLUE
+ static const GREVersionRange greVersion = {
+ "1.9b", PR_TRUE,
+ "1.9.*", PR_TRUE
+ };
+ char xpcomLocation[4096];
+ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096);
+ if (NS_FAILED(rv)) {
+ printf("GRE_GetGREPathWithProperties failed\n");
+ return;
+ }
+
+ // Startup the XPCOM Glue that links us up with XPCOM.
+ XPCOMGlueStartup(xpcomLocation);
+ if (NS_FAILED(rv)) {
+ printf("XPCOMGlueStartup failed\n");
+ return;
+ }
+
+ rv = GTKEmbedGlueStartup();
+ if (NS_FAILED(rv)) {printf("location: %s \n", xpcomLocation);
+ printf("GTKEmbedGlueStartup failed\n");
+ return;
+ }
+
+ //gtk_moz_embed_set_comp_path(xpcomLocation);
+
+ char *lastSlash = strrchr(xpcomLocation, '/');
+ if (lastSlash)
+ *lastSlash = '\0';
+
+ gtk_moz_embed_set_path(xpcomLocation);
+#endif
+
+ m = Py_InitModule ("gtkmozembed", pygtkmozembed_functions);
+ d = PyModule_GetDict (m);
+
+ pygtkmozembed_add_constants(m, "GTK_MOZ_EMBED_");
+ pygtkmozembed_register_classes (d);
+
+ if (PyErr_Occurred ()) {
+ Py_FatalError ("can't initialise module gtkmozembed");
+ }
+}