rpms/Miro/devel Miro-xulrunner.patch,NONE,1.1 Miro.spec,1.13,1.14
Alex Lancaster (alexlan)
fedora-extras-commits at redhat.com
Sun Dec 23 08:02:57 UTC 2007
Author: alexlan
Update of /cvs/extras/rpms/Miro/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12268
Modified Files:
Miro.spec
Added Files:
Miro-xulrunner.patch
Log Message:
- Re-enable gecko-libs 1.9, as 1.8.1.10 has now gone away as a BR.
- Add first-cut patch from Martin Stransky from #393521 that attempts to
patch Miro to work against xulrunner. Likely incomplete.
Miro-xulrunner.patch:
--- NEW FILE Miro-xulrunner.patch ---
diff -up Miro-1.0/platform/gtk-x11/setup.py.xl Miro-1.0/platform/gtk-x11/setup.py
--- Miro-1.0/platform/gtk-x11/setup.py.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/setup.py 2007-12-03 12:27:11.000000000 +0100
@@ -168,7 +168,7 @@ def getCommandOutput(cmd, warnOnStderr =
(cmd, p.returncode))
return stdout
-def parsePkgConfig(command, components, options_dict = None):
+def parsePkgConfig(command, components, options_dict = None, pkg_config_options = None):
"""Helper function to parse compiler/linker arguments from
pkg-config/mozilla-config and update include_dirs, library_dirs, etc.
@@ -190,7 +190,11 @@ def parsePkgConfig(command, components,
'libraries' : [],
'extra_compile_args' : []
}
- commandLine = "%s --cflags --libs %s" % (command, components)
+ commandLine = []
+ if pkg_config_options is not None:
+ commandLine = "%s --cflags --libs %s %s" % (command, components, pkg_config_options)
+ else:
+ commandLine = "%s --cflags --libs %s" % (command, components)
output = getCommandOutput(commandLine).strip()
for comp in output.split():
prefix, rest = comp[:2], comp[2:]
@@ -250,21 +254,10 @@ def allInDir(directory, subdirs):
if not os.path.exists(os.path.join(directory, subdir)):
return False
return True
-xpcom_includes = parsePkgConfig("pkg-config", xpcom)
-mozIncludeBase = None
-for dir in xpcom_includes['include_dirs']:
- if allInDir(dir, ['dom', 'gfx', 'widget']):
- # we can be pretty confident that dir is the mozilla/firefox/xulrunner
- # base include directory
- mozIncludeBase = dir
- break
-if mozIncludeBase is None:
- raise ValueError("Can't find mozilla include base directory")
-for subdir in ['dom', 'gfx', 'widget', 'commandhandler', 'uriloader',
- 'webbrwsr', 'necko', 'windowwatcher']:
- path = os.path.join(mozIncludeBase, subdir)
- mozilla_browser_options['include_dirs'].append(path)
-
+for subdir in [ 'stable', 'dom', 'gfx', 'commandhandler', 'uriloader',
+ 'webbrwsr', 'necko', 'windowwatcher', 'widget', 'unstable' ]:
+ xpcom_includes = parsePkgConfig("pkg-config", xpcom, None, "--define-variable=includetype=%s" % subdir)
+ mozilla_browser_options['include_dirs'].append(xpcom_includes['include_dirs'][0])
nsI = True
for dir in mozilla_browser_options['include_dirs']:
diff -up Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.cc.xl Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.cc
--- Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.cc.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.cc 2007-12-03 12:27:11.000000000 +0100
@@ -17,13 +17,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define MOZILLA_INTERNAL_API
#include "XPCOMUtil.h"
#include <nsCOMPtr.h>
#include <nsIDOMEventTarget.h>
#include <nsIDOMElement.h>
#include <nsIDOMNode.h>
-#include <nsString.h>
+#include <nsStringAPI.h>
//////////////////////////////////////////////////////////////////////////////
// XPCOMUtil.cc
diff -up Miro-1.0/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc.xl Miro-1.0/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc
--- Miro-1.0/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/frontend_implementation/MozillaBrowserXPCOM.cc 2007-12-03 12:35:42.000000000 +0100
@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define MOZILLA_INTERNAL_API
#include "MozillaBrowserXPCOM.h"
#include "XPCOMUtil.h"
#include <gtkmozembed.h>
@@ -37,7 +36,9 @@
#include <nsIDOMWindow.h>
#include <nsIURIContentListener.h>
#include <nsIWebBrowser.h>
-#include <nsString.h>
+#include <nsStringAPI.h>
+#include <nsMemory.h>
+#include <nsCRTGlue.h>
#include <stdio.h>
//////////////////////////////////////////////////////////////////////////////
@@ -303,7 +304,7 @@ char* getContextMenu(void* domEvent)
nsString value;
result = element->GetAttribute(contextMenuString, value);
if(NS_FAILED(result)) return NULL;
- return ToNewCString(value);
+ return ToNewUTF8String(value);
}
void freeString(char* str)
diff -up Miro-1.0/platform/gtk-x11/frontend_implementation/HttpObserver.cc.xl Miro-1.0/platform/gtk-x11/frontend_implementation/HttpObserver.cc
--- Miro-1.0/platform/gtk-x11/frontend_implementation/HttpObserver.cc.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/frontend_implementation/HttpObserver.cc 2007-12-03 12:27:11.000000000 +0100
@@ -26,7 +26,6 @@
// NOTE: we could have code to register the class with XPCOM, but since we
// only construct it from inside miro, there's no need.
-#define MOZILLA_INTERNAL_API
#include "HttpObserver.h"
#include <nscore.h>
#include <nsCOMPtr.h>
@@ -38,7 +37,7 @@
#include <nsIHttpChannel.h>
#include <nsIObserver.h>
#include <nsIObserverService.h>
-#include <nsString.h>
+#include <nsStringAPI.h>
#include <locale.h>
class HttpObserver: public nsIObserver {
@@ -65,18 +64,17 @@ nsresult HttpObserver::Observe(nsISuppor
{
if(strcmp(topic, "http-on-modify-request") == 0) {
nsresult rv;
- nsDependentCString locale, currentLanguages;
- nsDependentCString language = nsDependentCString("");
+ nsDependentCString currentLanguages;
PRUint32 sep;
nsCOMPtr<nsIHttpChannel> channel(do_QueryInterface(subject, &rv));
if(NS_FAILED(rv)) return rv;
channel->GetRequestHeader(nsDependentCString("Accept-Language"), currentLanguages);
- locale = nsDependentCString(setlocale(LC_ALL, NULL));
+ const nsDependentCString locale = nsDependentCString(setlocale(LC_ALL, NULL));
sep = locale.FindChar('.');
- locale.Left(language, sep);
- language.ReplaceChar('_', '-');
- channel->SetRequestHeader(nsDependentCString("Accept-Language"),
- language, false);
+ //const nsDependentCString language = StringHead(locale,sep);
+ //language.ReplaceChar('_', '-');
+ //channel->SetRequestHeader(nsDependentCString("Accept-Language"),
+ // language, false);
channel->SetRequestHeader(nsDependentCString("Accept-Language"),
currentLanguages, true);
channel->SetRequestHeader(nsDependentCString("X-Miro"),
diff -up Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.h.xl Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.h
--- Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.h.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/frontend_implementation/XPCOMUtil.h 2007-12-03 12:27:11.000000000 +0100
@@ -21,7 +21,7 @@
#define XPCOM_UTIL_H
#include <nscore.h>
-#include <nsString.h>
+#include <nsStringAPI.h>
#include <nsIDOMEvent.h>
#include <nsIDOMElement.h>
diff -up Miro-1.0/platform/gtk-x11/frontend_implementation/DragAndDrop.cc.xl Miro-1.0/platform/gtk-x11/frontend_implementation/DragAndDrop.cc
--- Miro-1.0/platform/gtk-x11/frontend_implementation/DragAndDrop.cc.xl 2007-11-13 02:22:57.000000000 +0100
+++ Miro-1.0/platform/gtk-x11/frontend_implementation/DragAndDrop.cc 2007-12-03 12:27:11.000000000 +0100
@@ -17,13 +17,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define MOZILLA_INTERNAL_API
#include "DragAndDrop.h"
#include "XPCOMUtil.h"
#include <nsICommandManager.h>
#include <gtkmozembed.h>
#include <gtkmozembed_internal.h>
-#include <nsEscape.h>
#include <nsIDragService.h>
#include <nsIDragSession.h>
#include <nsIDOMEvent.h>
@@ -34,13 +32,15 @@
#include <nsILocalFile.h>
#include <nsIComponentRegistrar.h>
#include <nsIWebBrowser.h>
-#include <nsString.h>
+#include <nsStringAPI.h>
#include <nsIClipboardDragDropHooks.h>
#include <nsIDragSession.h>
#include <nsISupportsPrimitives.h>
#include <nsITransferable.h>
#include <nsISupportsArray.h>
#include <nsICollection.h>
+#include <nsComponentManagerUtils.h>
+#include <nsServiceManagerUtils.h>
#include <stdio.h>
#include <string.h>
@@ -444,12 +444,14 @@ public:
for(int i = 0; i < urlCount; i++) {
rv = extractDragData(kURLMime, data, i);
if(NS_FAILED(rv)) return rv;
+/*
utf8Data = NS_ConvertUTF16toUTF8(data);
NS_EscapeURL(PromiseFlatCString(utf8Data).get(),
utf8Data.Length(),
esc_Query | esc_Forced | esc_AlwaysCopy,
escapedData);
url.Append(escapedData);
+*/
url.Append("%0A"); // "\n"
}
gtk_moz_embed_load_url(this->embed,
Index: Miro.spec
===================================================================
RCS file: /cvs/extras/rpms/Miro/devel/Miro.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Miro.spec 4 Dec 2007 13:43:00 -0000 1.13
+++ Miro.spec 23 Dec 2007 08:02:20 -0000 1.14
@@ -1,16 +1,17 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define gecko_ver 1.8.1.10
+%define gecko_ver 1.9
Name: Miro
Version: 1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Miro - Internet TV Player
Group: Applications/Multimedia
License: GPLv2+
URL: http://www.getmiro.com/
Source0: http://ftp.osuosl.org/pub/pculture.org/miro/src/%{name}-%{version}.tar.gz
+Patch0: Miro-xulrunner.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel xine-lib-devel Pyrex
BuildRequires: boost-devel qt-devel pygtk2-devel libXcursor-devel libXv-devel
@@ -28,6 +29,7 @@
%prep
%setup -q -n %{name}-%{version}
+%patch0 -p1
%build
cd platform/gtk-x11 && CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -64,6 +66,11 @@
%changelog
+* Sun Dec 23 2007 Alex Lancaster <alexlan at fedoraproject.org> 1.0-3
+- Re-enable gecko-libs 1.9, as 1.8.1.10 has now gone away as a BR.
+- Add first-cut patch from Martin Stransky from #393521 that attempts to
+ patch Miro to work against xulrunner. Likely incomplete.
+
* Tue Dec 4 2007 Alex Lancaster <alexlan at fedoraproject.org> 1.0-2
- Back to building against 1.8.1.10 (firefox) until #393521 is fixed.
More information about the fedora-extras-commits
mailing list