[packages/mozilla-addon-gnome-keyring] - upstream fixes for firefox 27+ - rel 3
baggins
baggins at pld-linux.org
Sun Mar 23 19:11:25 CET 2014
commit 0d5a4ddc64a18bb1ce7a2b7e5d74365bd164fa2a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 23 19:11:02 2014 +0100
- upstream fixes for firefox 27+
- rel 3
mozilla-addon-gnome-keyring.spec | 4 +-
xulrunner-27.patch | 129 +++++++++++++++++++++++++++++++++++++++
2 files changed, 132 insertions(+), 1 deletion(-)
---
diff --git a/mozilla-addon-gnome-keyring.spec b/mozilla-addon-gnome-keyring.spec
index 8f2dfac..9400f9b 100644
--- a/mozilla-addon-gnome-keyring.spec
+++ b/mozilla-addon-gnome-keyring.spec
@@ -2,11 +2,12 @@
Summary: Extension that enables Gnome Keyring integration
Name: mozilla-addon-%{extension}
Version: 0.6.9
-Release: 2
+Release: 3
License: MPL v1.1 or GPL v2+ or LGPL v2.1+
Group: X11/Applications/Networking
Source0: https://github.com/infinity0/mozilla-gnome-keyring/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: eedd226a6f866ae3091ca79b3bdeabad
+Patch0: xulrunner-27.patch
URL: https://github.com/infinity0/mozilla-gnome-keyring/
BuildRequires: libgnome-keyring-devel >= 3.4.0
BuildRequires: libstdc++-devel
@@ -40,6 +41,7 @@ password after Firefox or Thunderbird has been started.
%prep
%setup -qn mozilla-gnome-keyring-%{version}
+%patch0 -p1
%{__sed} -i -e '/^CXXFLAGS/ s/$/ $(OPTFLAGS)/' Makefile
diff --git a/xulrunner-27.patch b/xulrunner-27.patch
new file mode 100644
index 0000000..cf95fab
--- /dev/null
+++ b/xulrunner-27.patch
@@ -0,0 +1,129 @@
+From b637542e490b98b94ddc2dce6919970703f46932 Mon Sep 17 00:00:00 2001
+From: Ximin Luo <infinity0 at pwned.gg>
+Date: Sun, 23 Mar 2014 03:07:41 +0000
+Subject: [PATCH] add some more conditional compilation stuff to make things
+ work for firefox 27+
+
+---
+ GnomeKeyring.cpp | 8 ++++++++
+ Makefile | 4 +++-
+ config.sh | 30 +++++++++++++++++++++---------
+ xpcom_abi.cpp | 4 ++++
+ 4 files changed, 36 insertions(+), 10 deletions(-)
+
+diff --git a/GnomeKeyring.cpp b/GnomeKeyring.cpp
+index ac089ed..92711c8 100644
+--- a/GnomeKeyring.cpp
++++ b/GnomeKeyring.cpp
+@@ -37,6 +37,10 @@
+ *
+ * ***** END LICENSE BLOCK ***** */
+
++#if HAVE_MOZ_BUG_956507
++#include "mozilla/Char16.h"
++#endif
++
+ #include "GnomeKeyring.h"
+ #include "nsMemory.h"
+ #include "nsILoginInfo.h"
+@@ -614,8 +618,12 @@ NS_IMETHODIMP GnomeKeyring::Init()
+ return ret;
+ }
+
++#if HAVE_NSILMS_INITWITHFILE_2
+ NS_IMETHODIMP GnomeKeyring::InitWithFile(nsIFile *aInputFile,
+ nsIFile *aOutputFile)
++#else
++NS_IMETHODIMP GnomeKeyring::InitWithFile(nsIFile *aInputFile)
++#endif
+ {
+ // TODO
+ return Init();
+diff --git a/Makefile b/Makefile
+index cecfce7..5c52024 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,6 +62,8 @@ else
+ endif
+
+ SHELL_EXPORT := $(foreach v,CXX XUL_CFLAGS XUL_LDFLAGS XPCOM_ABI_FLAGS GNOME_CFLAGS GNOME_LDFLAGS CXXFLAGS LDFLAGS,$(v)="$($(v))")
++CXX_MACRO_EXPORT := $(foreach v,HAVE_NSILMS_GETISLOGGEDIN HAVE_NSILMS_INITWITHFILE_2 HAVE_MOZ_BUG_956507 HAVE_MOZGLUE,-D$(v)="$($(v))")
++
+ config.vars: config.sh GnomeKeyring.h xpcom_abi.cpp Makefile
+ $(SHELL_EXPORT) sh $^ > $@
+
+@@ -97,7 +99,7 @@ xpi/chrome/skin/hicolor/seahorse.svg: seahorse.svg
+ cp -a $< $@
+
+ $(TARGET): GnomeKeyring.cpp GnomeKeyring.h
+- $(CXX) $< -o $@ -shared -DHAVE_NSILMS_GETISLOGGEDIN=$(HAVE_NSILMS_GETISLOGGEDIN) \
++ $(CXX) $< -o $@ -shared $(CXX_MACRO_EXPORT) \
+ $(XUL_CFLAGS) $(XUL_LDFLAGS) $(GNOME_CFLAGS) $(GNOME_LDFLAGS) $(CXXFLAGS) $(LDFLAGS)
+ chmod +x $@
+
+diff --git a/config.sh b/config.sh
+index bf50a68..4b32da2 100755
+--- a/config.sh
++++ b/config.sh
+@@ -13,8 +13,20 @@ XUL_VERSION=$(echo '#include "mozilla-config.h"'|
+ XUL_VER_MIN=$(echo $XUL_VERSION | sed -r -e 's/([^.]+\.[^.]+).*/\1/g')
+ XUL_VER_MAX=$(echo $XUL_VERSION | sed -rn -e 's/([^.]+).*/\1.*/gp')
+
+-HAVE_NSILMS_GETISLOGGEDIN=$({ echo '#include "'"$SRC_GNOME_KEYRING_H"'"'; echo 'NS_IMETHODIMP GnomeKeyring::GetIsLoggedIn(bool *aIsLoggedIn) { return NS_OK; }'; } |
+- $CXX $XUL_CFLAGS $GNOME_CFLAGS $CXXFLAGS -x c++ -w -c -o /dev/null - && echo 1 || echo 0)
++HAVE_NSILMS_GETISLOGGEDIN=$({ cat <<EOF; } | $CXX $XUL_CFLAGS $GNOME_CFLAGS $CXXFLAGS -x c++ -w -c -o /dev/null - 2>/dev/null && echo 1 || echo 0)
++#include "$SRC_GNOME_KEYRING_H"
++NS_IMETHODIMP GnomeKeyring::GetIsLoggedIn(bool *aIsLoggedIn) { return NS_OK; }
++EOF
++
++HAVE_NSILMS_INITWITHFILE_2=$({ cat <<EOF; } | $CXX $XUL_CFLAGS $GNOME_CFLAGS $CXXFLAGS -x c++ -w -c -o /dev/null - 2>/dev/null && echo 1 || echo 0)
++#include "$SRC_GNOME_KEYRING_H"
++NS_IMETHODIMP GnomeKeyring::InitWithFile(nsIFile *aInputFile, nsIFile *aOutputFile) { return NS_OK; }
++EOF
++
++HAVE_MOZ_BUG_956507=$({ cat <<EOF; } | $CXX $XUL_CFLAGS $GNOME_CFLAGS $CXXFLAGS -x c++ -w -c -o /dev/null - 2>/dev/null && echo 0 || echo 1)
++#include <nspr/prtypes.h>
++#include "mozilla/Char16.h"
++EOF
+
+ HAVE_MOZGLUE=$($CXX $XUL_CFLAGS $XUL_LDFLAGS $XPCOM_ABI_FLAGS $CXXFLAGS $LDFLAGS -lmozglue -shared -o /dev/null && echo 1 || echo 0)
+
+@@ -22,13 +34,13 @@ if [ $HAVE_MOZGLUE = 1 ]; then
+ XPCOM_ABI_FLAGS="$XPCOM_ABI_FLAGS -Wl,-whole-archive -lmozglue -Wl,-no-whole-archive"
+ fi
+ DST_XPCOM_ABI="$(dirname $0)/xpcom_abi"
+-$CXX $SRC_XPCOM_ABI_CPP -o "$DST_XPCOM_ABI" $XUL_CFLAGS $XUL_LDFLAGS $XPCOM_ABI_FLAGS $CXXFLAGS $LDFLAGS
++$CXX $SRC_XPCOM_ABI_CPP -DHAVE_MOZ_BUG_956507="$HAVE_MOZ_BUG_956507" -o "$DST_XPCOM_ABI" \
++ $XUL_CFLAGS $XUL_LDFLAGS $XPCOM_ABI_FLAGS $CXXFLAGS $LDFLAGS
+ PLATFORM="$("$DST_XPCOM_ABI")"
+
+-echo export XUL_VERSION="$XUL_VERSION"
+-echo export XUL_VER_MIN="$XUL_VER_MIN"
+-echo export XUL_VER_MAX="$XUL_VER_MAX"
+-echo export HAVE_NSILMS_GETISLOGGEDIN="$HAVE_NSILMS_GETISLOGGEDIN"
+-echo export HAVE_MOZGLUE="$HAVE_MOZGLUE"
+-echo export PLATFORM="$PLATFORM"
++for var in XUL_VERSION XUL_VER_MIN XUL_VER_MAX PLATFORM \
++ HAVE_NSILMS_GETISLOGGEDIN HAVE_NSILMS_INITWITHFILE_2 HAVE_MOZ_BUG_956507 HAVE_MOZGLUE; do
++ eval val=\$$var
++ echo export $var=$val
++done;
+ echo export HAVE_CONFIG_VARS=1
+diff --git a/xpcom_abi.cpp b/xpcom_abi.cpp
+index c6d0202..bf8d91b 100644
+--- a/xpcom_abi.cpp
++++ b/xpcom_abi.cpp
+@@ -1,6 +1,10 @@
+ #include <stdio.h>
+ #include <stdint.h>
+
++#if HAVE_MOZ_BUG_956507
++#include "mozilla/Char16.h"
++#endif
++
+ #include "nsIXULRuntime.h"
+ #include "nsServiceManagerUtils.h"
+ #include "nsStringAPI.h"
+--
+1.8.5.5
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mozilla-addon-gnome-keyring.git/commitdiff/0d5a4ddc64a18bb1ce7a2b7e5d74365bd164fa2a
More information about the pld-cvs-commit
mailing list