[74271] trunk/dports/gnome/galeon

devans at macports.org devans at macports.org
Thu Dec 9 18:21:29 PST 2010


Revision: 74271
          http://trac.macports.org/changeset/74271
Author:   devans at macports.org
Date:     2010-12-09 18:21:23 -0800 (Thu, 09 Dec 2010)
Log Message:
-----------
galeon: 
  * update dependencies
  * patch and configure to build using xulrunner 1.9.2
  * 32 bit only due to xulrunner
  * simplify post-destroot and post-activate processing

Modified Paths:
--------------
    trunk/dports/gnome/galeon/Portfile

Added Paths:
-----------
    trunk/dports/gnome/galeon/files/patch-configure.diff
    trunk/dports/gnome/galeon/files/patch-mozilla-EphyXULAppInfo.cpp.diff
    trunk/dports/gnome/galeon/files/patch-mozilla-EventContext.cpp.diff
    trunk/dports/gnome/galeon/files/patch-mozilla-MozRegisterComponents.cpp.diff
    trunk/dports/gnome/galeon/files/patch-mozilla-ProgressListener.cpp.diff
    trunk/dports/gnome/galeon/files/patch-mozilla-ProtocolService.cpp.diff

Modified: trunk/dports/gnome/galeon/Portfile
===================================================================
--- trunk/dports/gnome/galeon/Portfile	2010-12-10 02:04:15 UTC (rev 74270)
+++ trunk/dports/gnome/galeon/Portfile	2010-12-10 02:21:23 UTC (rev 74271)
@@ -5,6 +5,7 @@
 
 name		galeon
 version		2.0.7
+revision        1
 description	A GNOME web browser.
 long_description        Galeon is a GNOME Web browser based on gecko (the \
 			mozilla rendering engine). It's fast, it has a \
@@ -19,16 +20,41 @@
 			sha1 14ccb53a7b3f398eb3ac3f7ca6aeb63348689a62 \
 			rmd160 a443dfc11447a006d21d9e7852c616b41492a6f6
 
-depends_lib     port:gnome-session port:libiconv port:firefox-x11
+depends_build   port:pkgconfig \
+                port:intltool
 
+depends_lib     port:libgnomeui \
+                port:libglade2 \
+                port:gnome-vfs \
+                port:gnome-desktop \
+                port:xulrunner
+
+supported_archs i386 ppc
+
+patchfiles      patch-configure.diff \
+                patch-mozilla-EventContext.cpp.diff \
+                patch-mozilla-ProgressListener.cpp.diff \
+                patch-mozilla-MozRegisterComponents.cpp.diff \
+                patch-mozilla-EphyXULAppInfo.cpp.diff \
+                patch-mozilla-ProtocolService.cpp.diff
+
+pre-configure {
+	set component_cflags "[ exec ${prefix}/bin/pkg-config --cflags libxul-embedding ]"
+        if { ![ file exists ${prefix}/lib/pkgconfig/mozilla-nspr.pc ] } {
+           set component_cflags "${component_cflags} -I${prefix}/include/nspr"
+        }
+        set component_libs [ exec ${prefix}/bin/pkg-config --libs libxul-embedding ]
+        configure.env-append MOZILLA_COMPONENT_CFLAGS="${component_cflags}" \
+                             MOZILLA_COMPONENT_LIBS="${component_libs}" \
+                             XPCOM_COMPONENT_CFLAGS="${component_cflags}" \
+                             XPCOM_COMPONENT_LIBS="${component_libs}"
+}
+
 configure.args \
 		--mandir=${prefix}/share/man \
 		--enable-nautilus-view=no \
-		--with-mozilla=firefox
+                --with-mozilla=libxul-embedding
 
-set storagedir  ${prefix}/etc/macports/gconf
-set storagefile $storagedir/${name}
-
 post-destroot {
 	# make a da script happen
 	file copy ${destroot}${prefix}/bin/galeon ${destroot}${prefix}/bin/galeon-bin
@@ -36,39 +62,11 @@
 	
 	# use da ${prefix} Luke ...
     reinplace "s|/opt/local|${prefix}|g" ${destroot}${prefix}/bin/galeon
-
-	# schema installation procedure from #14729 (pending gnome portgroup)
-    # Find all .schemas file in the destroot
-	fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
-		if { [ file isfile $schema ] } {
-			lappend schemafiles $schema
-		}
-	}
-
-    # And put them in etc/macports/gconf/$name
-	if { [ llength $schemafiles ] > 0 } {
-		file mkdir ${destroot}${storagedir}
-		set fh [open ${destroot}${storagefile} w]
-		foreach file $schemafiles {
-			puts $fh [exec basename $file]
-		}
-		close $fh
-	}
 }
 
 post-activate {
-	if { [file exists ${storagefile} ] } {
-		set fh [open ${storagefile} r]
-		while { ! [eof $fh] } {
-			lappend schemafiles [gets $fh]
-		}
-		close $fh
-	}
-
-	set schemastring [join $schemafiles " "]
-
-    system "cd ${prefix}/etc/gconf/schemas && \
-         GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` ${prefix}/bin/gconftool-2 --makefile-install-rule $schemastring"
+    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
+        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
 }
 
 livecheck.url           http://sourceforge.net/projects/${name}/files/

Added: trunk/dports/gnome/galeon/files/patch-configure.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-configure.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,79 @@
+--- configure.orig	2008-09-26 20:16:12.000000000 -0700
++++ configure	2010-12-09 16:19:27.000000000 -0800
+@@ -1599,7 +1599,7 @@
+   --with-useragent-vendorsub[=User-Agent vendorSub]
+                           User-Agent header vendorSub part (default: release
+                           version)
+-  --with-mozilla[=libxul-embedding-unstable|seamonkey|firefox|xulrunner|thunderbird]
++  --with-mozilla[=libxul-embedding|libxul-embedding-unstable|seamonkey|firefox|xulrunner|thunderbird]
+                           Which gecko engine to use (default: autodetect)
+   --with-gconf-source=sourceaddress      Config database for installing schema files.
+   --with-gconf-schema-file-dir=dir        Directory for installing schema files.
+@@ -23380,7 +23380,7 @@
+ fi
+ 
+ 
+-GECKOS="libxul-embedding-unstable firefox mozilla-firefox seamonkey xulrunner thunderbird mozilla-thunderbird"
++GECKOS="libxul-embedding libxul-embedding-unstable firefox mozilla-firefox seamonkey xulrunner thunderbird mozilla-thunderbird"
+ gecko=$with_mozilla
+ autodetect=
+ 
+@@ -23408,6 +23408,7 @@
+ echo "${ECHO_T}$gecko$autodetect" >&6; }
+ 
+ case "$gecko" in
++libxul-embedding) min_version=1.9 flavour=toolkit ;;
+ libxul-embedding-unstable) min_version=1.9 flavour=toolkit ;;
+ seamonkey) min_version=2.0 flavour=toolkit ;;
+ *firefox) min_version=2.0 flavour=toolkit ;;
+@@ -23418,7 +23419,10 @@
+ MOZILLA=$gecko
+ 
+ 
+-if test $MOZILLA = libxul-embedding-unstable; then
++if test $MOZILLA = libxul-embedding; then
++    MOZILLA_XPCOM=$MOZILLA
++    MOZILLA_GTKMOZEMBED=$MOZILLA
++elif test $MOZILLA = libxul-embedding-unstable; then
+     MOZILLA_XPCOM=$MOZILLA
+     MOZILLA_GTKMOZEMBED=$MOZILLA
+ else
+@@ -23534,7 +23538,9 @@
+ fi
+ 
+ MOZILLA_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir $MOZILLA_XPCOM`"
+-if test $MOZILLA = libxul-embedding-unstable; then
++if test $MOZILLA = libxul-embedding; then
++    MOZILLA_INCLUDE_ROOT="$MOZILLA_INCLUDE_ROOT/`$PKG_CONFIG --variable=includetype $MOZILLA_XPCOM`"
++elif test $MOZILLA = libxul-embedding-unstable; then
+     MOZILLA_INCLUDE_ROOT="$MOZILLA_INCLUDE_ROOT/`$PKG_CONFIG --variable=includetype $MOZILLA_XPCOM`"
+ fi
+ 
+@@ -23790,12 +23796,12 @@
+ _SAVE_CPPFLAGS=$CPPFLAGS
+ _SAVE_LDFLAGS=$LDFLAGS
+ 
+-#CPPFLAGS="-I$MOZILLA_INCLUDE_ROOT $MOZILLA_COMPONENT_CFLAGS $GALEON_DEPENDENCY_CFLAGS"
+-#CXXFLAGS="$_SAVE_CXXFLAGS $AM_CXXFLAGS -I$MOZILLA_INCLUDE_ROOT $MOZILLA_COMPONENT_CFLAGS"
+-#LDFLAGS="$_SAVE_LDFLAGS $AM_LDFLAGS $MOZILLA_COMPONENT_LIBS"
+-CPPFLAGS="-I$MOZILLA_INCLUDE_ROOT `$PKG_CONFIG --cflags-only-I $MOZILLA-xpcom` $GALEON_DEPENDENCY_CFLAGS"
+-CXXFLAGS="$_SAVE_CXXFLAGS $AM_CXXFLAGS -I$MOZILLA_INCLUDE_ROOT `pkg-config --cflags $MOZILLA-xpcom`"
+-LDFLAGS="$_SAVE_LDFLAGS $AM_LDFLAGS `pkg-config --libs $MOZILLA-xpcom`"
++CPPFLAGS="-I$MOZILLA_INCLUDE_ROOT $MOZILLA_COMPONENT_CFLAGS $GALEON_DEPENDENCY_CFLAGS"
++CXXFLAGS="$_SAVE_CXXFLAGS $AM_CXXFLAGS -I$MOZILLA_INCLUDE_ROOT $MOZILLA_COMPONENT_CFLAGS"
++LDFLAGS="$_SAVE_LDFLAGS $AM_LDFLAGS $MOZILLA_COMPONENT_LIBS"
++#CPPFLAGS="-I$MOZILLA_INCLUDE_ROOT `$PKG_CONFIG --cflags-only-I $MOZILLA-xpcom` $GALEON_DEPENDENCY_CFLAGS"
++#CXXFLAGS="$_SAVE_CXXFLAGS $AM_CXXFLAGS -I$MOZILLA_INCLUDE_ROOT `pkg-config --cflags $MOZILLA-xpcom`"
++#LDFLAGS="$_SAVE_LDFLAGS $AM_LDFLAGS `pkg-config --libs $MOZILLA-xpcom`"
+ 
+ 
+ TEST_MOZILLA_INCLUDE_DIRS="widget mimetype docshell history dom necko string layout gfx content js exthandler pipnss uriloader caps xpconnect nkcache fastfind gtkembedmoz chrome"
+@@ -29151,7 +29157,7 @@
+ 
+ 
+ 
+-if test "$gecko" == "xulrunner" || test "$gecko" == "libxul-embedding-unstable"; then
++if test "$gecko" == "xulrunner" || test "$gecko" == "libxul-embedding" || test "$gecko" == "libxul-embedding-unstable"; then
+ 	echo ""
+ 	echo "Note that Galeon has a runtime dependency on the 'cookie' and 'permission'"
+ 	echo "mozilla extensions. These are not built as part of the default xulrunner"

Added: trunk/dports/gnome/galeon/files/patch-mozilla-EphyXULAppInfo.cpp.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-mozilla-EphyXULAppInfo.cpp.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-mozilla-EphyXULAppInfo.cpp.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,15 @@
+--- mozilla/EphyXULAppInfo.cpp.orig
++++ mozilla/EphyXULAppInfo.cpp
+@@ -128,3 +128,12 @@ EphyXULAppInfo::GetXPCOMABI(nsACString & aXPCOMABI)
+   aXPCOMABI.Assign (EPHY_HOST_CPU "-gcc3");
+   return NS_OK;
+ }
++
++/* readonly attribute AUTF8String WidgetToolkit; */
++NS_IMETHODIMP
++EphyXULAppInfo::GetWidgetToolkit(nsACString & aWidgetToolkit)
++{
++  aWidgetToolkit.Assign ("gtk");
++  return NS_OK;
++}
++

Added: trunk/dports/gnome/galeon/files/patch-mozilla-EventContext.cpp.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-mozilla-EventContext.cpp.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-mozilla-EventContext.cpp.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,40 @@
+--- mozilla/EventContext.cpp.orig	2008-07-18 07:41:08.000000000 +0300
++++ mozilla/EventContext.cpp		2009-01-06 23:17:32.000000000 +0200
+@@ -35,6 +35,7 @@
+ #include <nsIDOMXULDocument.h>
+ #include <nsIURI.h>
+ #include <nsIDOMNSEvent.h>
++#include <nsIDOMNSElement.h>
+ #include <nsIDOMNSHTMLElement.h>
+ #include <nsIDOMCharacterData.h>
+ #include <nsIDOMHTMLButtonElement.h>
+@@ -518,20 +519,21 @@
+ nsresult EventContext::GetTargetCoords (nsIDOMEventTarget *aTarget, PRInt32 *aX, PRInt32 *aY)
+ {
+ 	/* Calculate the node coordinates relative to the widget origin */
+-	nsCOMPtr<nsIDOMNSHTMLElement> elem = do_QueryInterface(aTarget);
++	nsCOMPtr<nsIDOMNSHTMLElement> nsHTMLElem (do_QueryInterface(aTarget));
+ 
+ 	PRInt32 x = 0, y = 0;
+-	while (elem)
++	while (nsHTMLElem)
+ 	{
+ 		PRInt32 val;
+-		elem->GetOffsetTop(&val);	y += val;
+-		elem->GetScrollTop(&val);	y -= val;
+-		elem->GetOffsetLeft(&val);	x += val;
+-		elem->GetScrollLeft(&val);	x -= val;
++		nsCOMPtr<nsIDOMNSElement> nsElem (do_QueryInterface(nsHTMLElem));   
++		nsHTMLElem->GetOffsetTop(&val);         y += val;
++		nsElem->GetScrollTop(&val);             y -= val;
++		nsHTMLElem->GetOffsetLeft(&val);        x += val;
++		nsElem->GetScrollLeft(&val);    x -= val;
+ 
+ 		nsCOMPtr<nsIDOMElement> parent;
+-		elem->GetOffsetParent(getter_AddRefs(parent));
+-		elem = do_QueryInterface(parent);
++		nsHTMLElem->GetOffsetParent (getter_AddRefs (parent));
++		nsHTMLElem = do_QueryInterface(parent);
+ 	}
+ 	*aX = x;
+ 	*aY = y;

Added: trunk/dports/gnome/galeon/files/patch-mozilla-MozRegisterComponents.cpp.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-mozilla-MozRegisterComponents.cpp.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-mozilla-MozRegisterComponents.cpp.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,10 @@
+--- mozilla/MozRegisterComponents.cpp.orig	2010-12-09 10:36:39.000000000 -0800
++++ mozilla/MozRegisterComponents.cpp	2010-12-09 10:37:20.000000000 -0800
+@@ -58,6 +58,7 @@
+ #include <nsIComponentManager.h>
+ #include <nsCOMPtr.h>
+ #include <nsXPCOM.h>
++#include <nsXPCOMCIDInternal.h>
+ #include <nsComponentManagerUtils.h>
+ #include <nsServiceManagerUtils.h>
+ #include <nsDocShellCID.h>

Added: trunk/dports/gnome/galeon/files/patch-mozilla-ProgressListener.cpp.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-mozilla-ProgressListener.cpp.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-mozilla-ProgressListener.cpp.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,17 @@
+--- mozilla/ProgressListener.cpp.orig
++++ mozilla/ProgressListener.cpp
+@@ -587,12 +587,12 @@
+ 	GulCString helperId(helperDesc);
+ 
+ 	// Format <usertime>:<helperapp id>
+-	char *colon = strchr (helperId.get(), ':');
++	const char *colon = strchr (helperId.get(), ':');
+ 	g_return_val_if_fail (colon, NS_ERROR_FAILURE);
+ 
+ 	const char *helperappid = colon+1;
+ 
+-	guint32 usertime = strtoul (helperId.get(), &colon, 0);
++	guint32 usertime = strtoul (helperId.get(), NULL, 0);
+ 	
+ 	GnomeVFSMimeApplication *helper = 
+ #ifdef HAVE_NEW_GNOME_VFS_MIME_API

Added: trunk/dports/gnome/galeon/files/patch-mozilla-ProtocolService.cpp.diff
===================================================================
--- trunk/dports/gnome/galeon/files/patch-mozilla-ProtocolService.cpp.diff	                        (rev 0)
+++ trunk/dports/gnome/galeon/files/patch-mozilla-ProtocolService.cpp.diff	2010-12-10 02:21:23 UTC (rev 74271)
@@ -0,0 +1,15 @@
+--- mozilla/ExternalProtocolService.cpp.orig
++++ mozilla/ExternalProtocolService.cpp
+@@ -185,3 +185,12 @@ NS_IMETHODIMP GExternalProtocolService::GetProtocolHandlerInfo(const nsACString
+ 	return NS_ERROR_NOT_IMPLEMENTED;
+ }
+ #endif
++
++NS_IMETHODIMP GExternalProtocolService::GetProtocolHandlerInfoFromOS(const nsACString & aProtocolScheme, PRBool*, nsIHandlerInfo**)
++{
++	return NS_ERROR_NOT_IMPLEMENTED;
++}
++NS_IMETHODIMP GExternalProtocolService::SetProtocolHandlerDefaults(nsIHandlerInfo*, int)
++{
++	return NS_ERROR_NOT_IMPLEMENTED;
++}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101209/1b76e659/attachment-0001.html>


More information about the macports-changes mailing list