summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www-plugins/weave/ChangeLog9
-rw-r--r--www-plugins/weave/files/weave-1.1-pkgconfig.patch192
-rw-r--r--www-plugins/weave/weave-1.1.ebuild106
3 files changed, 306 insertions, 1 deletions
diff --git a/www-plugins/weave/ChangeLog b/www-plugins/weave/ChangeLog
index 42a809ddc1a1..18d3afb543dc 100644
--- a/www-plugins/weave/ChangeLog
+++ b/www-plugins/weave/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-plugins/weave
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-plugins/weave/ChangeLog,v 1.2 2010/01/01 18:04:08 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-plugins/weave/ChangeLog,v 1.3 2010/03/14 17:49:59 volkmar Exp $
+
+*weave-1.1 (14 Mar 2010)
+
+ 14 Mar 2010; Mounir Lamouri <volkmar@gentoo.org> +weave-1.1.ebuild,
+ +files/weave-1.1-pkgconfig.patch:
+ Version bump to 1.1. Fix bug 297214.
+ Thanks to Ferdinand Kuhl <fcool@coolys.de>.
01 Jan 2010; Tomáš Chvátal <scarabeus@gentoo.org>
weave-1.0_beta2.ebuild:
diff --git a/www-plugins/weave/files/weave-1.1-pkgconfig.patch b/www-plugins/weave/files/weave-1.1-pkgconfig.patch
new file mode 100644
index 000000000000..1580dfda0fc7
--- /dev/null
+++ b/www-plugins/weave/files/weave-1.1-pkgconfig.patch
@@ -0,0 +1,192 @@
+diff -r adb27ed2f421 crypto/Makefile
+--- a/crypto/Makefile Fri Aug 21 17:32:41 2009 -0700
++++ b/crypto/Makefile Mon Aug 24 00:09:43 2009 +0200
+@@ -39,12 +39,23 @@
+ stage_dir=../dist/stage
+
+ sdkdir ?= ${MOZSDKDIR}
++
++# If blank, try to use pkg-config
++# To add a path to pkg-config search path, use PKG_CONFIG_PATH
++# (see man pkg-config)
++ifeq ($(sdkdir),)
++ sdkdir = $(shell pkg-config --variable sdkdir libxul)
++endif
++
+ ifeq ($(sdkdir),)
+ $(warning No 'sdkdir' variable given)
+ $(warning It should point to the location of the Gecko SDK)
+ $(warning For example: "make sdkdir=/foo/bar/baz")
+ $(warning Or set the MOZSDKDIR environment variable to point to it)
++ $(warning Or fix your xulrunner pkg-config files)
+ $(error)
++else
++ $(info Using Mozilla SDKDIR as: ${sdkdir})
+ endif
+
+ all: build
+diff -r adb27ed2f421 crypto/src/Makefile
+--- a/crypto/src/Makefile Fri Aug 21 17:32:41 2009 -0700
++++ b/crypto/src/Makefile Mon Aug 24 00:09:43 2009 +0200
+@@ -37,9 +37,17 @@
+ #
+ # ***** END LICENSE BLOCK *****
+
++# Define some custom pkg-config functions
++pkg-config-var = $(shell pkg-config --variable $(1) $(2))
++pkg-config-I = $(shell pkg-config --cflags-only-I $(1) $(2))
++pkg-config-l = $(patsubst -l%,%,$(shell pkg-config --libs-only-l $(1)))
++pkg-config-L = $(patsubst -L%,%,$(shell pkg-config --libs-only-L $(1)))
++
++# Actually use pkg-config?
++pkgconfig = "no"
++
+ # OS detection
+
+-xpidl = $(sdkdir)/bin/xpidl
+ link = link
+
+ sys := $(shell uname -s)
+@@ -48,7 +56,6 @@
+ ifeq ($(wince), 1)
+ os = WINNT
+ cxx = $(sdkdir)/sdk/bin/arm-wince-gcc
+- xpidl = $(sdkdir)/host/bin/host_xpidl
+ link = $(sdkdir)/sdk/bin/arm-wince-link
+ so = dll
+ else
+@@ -165,13 +172,24 @@
+ destdir = ..
+ platformdir = $(destdir)/platform/$(platform)
+
++# If blank, try to use pkg-config
++# To add a path to pkg-config search path, use PKG_CONFIG_PATH
++# (see man pkg-config)
++ifeq ($(sdkdir),)
++ pkgconfig="yes"
++ sdkdir = $(call pkg-config-var,sdkdir,libxul)
++endif
++
+ # FIXME: we don't actually require this for e.g. clean
+ ifeq ($(sdkdir),)
+ $(warning No 'sdkdir' variable given)
+ $(warning It should point to the location of the Gecko SDK)
+ $(warning For example: "make sdkdir=/foo/bar/baz")
+ $(warning Or set the MOZSDKDIR environment variable to point to it)
++ $(warning Or fix your xulrunner pkg-config files)
+ $(error )
++else
++ $(info Using Mozilla SDKDIR as: ${sdkdir})
+ endif
+
+ idl_headers = $(idl:.idl=.h)
+@@ -179,30 +197,75 @@
+ cpp_objects = $(cpp_sources:.cpp=.o)
+ so_target = $(target:=.$(so))
+
+-headers = -I$(sdkdir)/include \
+- -I$(sdkdir)/include/system_wrappers \
+- -I$(sdkdir)/include/nss \
+- -I$(sdkdir)/include/xpcom \
+- -I$(sdkdir)/include/string \
+- -I$(sdkdir)/include/pipnss \
+- -I$(sdkdir)/include/nspr \
+- -I$(sdkdir)/sdk/include
++xpidl = $(sdkdir)/bin/xpidl
++ifeq ($(wince), 1)
++ xpidl = $(sdkdir)/host/bin/host_xpidl
++endif
++
++ifeq ($(pkgconfig),"yes")
++ # Include dirs
++ nss_includes = $(call pkg-config-I,nss)
++ nspr_includes = $(call pkg-config-I,nspr)
++ libxul_includes = $(call pkg-config-I,libxul)
++
++ # Library dirs
++ nss_libdirs = $(call pkg-config-L,nss)
++ nspr_libdirs = $(call pkg-config-L,nspr)
++ libxul_libdirs = $(call pkg-config-L,libxul)
++
++ # Libs
++ nss_libs = $(call pkg-config-l,nss)
++ nspr_libs = $(call pkg-config-l,nspr)
++ libxul_libs = $(call pkg-config-l,libxul)
++
++ idl_dir = $(call pkg-config-var,idldir,libxul)
++
++# Fallback to Hard-coded
++else
++ # Include dirs
++ nss_includes = -I$(sdkdir)/include/nss
++ nspr_includes = -I$(sdkdir)/include/nspr
++ libxul_includes = -I$(sdkdir)/include \
++ -I$(sdkdir)/include/system_wrappers \
++ -I$(sdkdir)/include/xpcom \
++ -I$(sdkdir)/include/string \
++ -I$(sdkdir)/include/pipnss \
++ -I$(sdkdir)/sdk/include
++
++ # Library dirs
++ libxul_libdirs = $(sdkdir)/lib $(sdkdir)/bin
++ nss_libdirs = $(libxul_libdirs)
++ nspr_libdirs = $(libxul_libdirs)
++
++ # Libs
++ nss_libs = ssl3 smime3 nss3 nssutil3
++ nspr_libs = nspr4 plds4 plc4
++ libxul_libs = xpcomglue_s
++ ifeq ($(wince),1)
++ libxul_libs = $(libxul_libs) xpcom
++ else
++ libxul_libs = $(libxul_libs) xpcomglue
++ endif
++
++ ifeq ($(os), linux)
++ libxul_libs = $(libxul_libs) xpcom_core
++ endif
++
++ idl_dir = $(sdkdir)/idl
++endif
++
++headers = $(nss_includes) \
++ $(nspr_includes) \
++ $(libxul_includes)
+
+ # libraries
+-libdirs := $(sdkdir)/lib $(sdkdir)/bin
+-ifeq ($(wince),1)
+-libs := xpcomglue_s xpcom nspr4 \
+- crmf smime3 ssl3 nss3 nssutil3 \
+- plds4 plc4
+-else
+-libs := xpcomglue xpcomglue_s nspr4 \
+- crmf smime3 ssl3 nss3 nssutil3 \
+- plds4 plc4
+-endif
++libdirs = $(nss_libdirs) \
++ $(nspr_libdirs) \
++ $(libxul_libdirs)
+
+-ifeq ($(os), Linux)
+- libs := xpcom_core $(libs)
+-endif
++libs = $(nss_libs) \
++ $(nspr_libs) \
++ $(libxul_libs)
+
+ # compiler and Linker Flags
+
+@@ -328,10 +391,10 @@
+
+ # rules to build the c headers and .xpt from idl
+ $(idl_headers): $(idl)
+- $(xpidl) -m header -I$(sdkdir)/idl $(@:.h=.idl)
++ $(xpidl) -m header -I$(idl_dir) $(@:.h=.idl)
+
+ $(idl_typelib): $(idl)
+- $(xpidl) -m typelib -I$(sdkdir)/idl $(@:.xpt=.idl)
++ $(xpidl) -m typelib -I$(idl_dir) $(@:.xpt=.idl)
+
+ # build and link rules
+ ifeq ($(os), Darwin)
diff --git a/www-plugins/weave/weave-1.1.ebuild b/www-plugins/weave/weave-1.1.ebuild
new file mode 100644
index 000000000000..c797b1bd9953
--- /dev/null
+++ b/www-plugins/weave/weave-1.1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-plugins/weave/weave-1.1.ebuild,v 1.1 2010/03/14 17:49:59 volkmar Exp $
+
+EAPI="2"
+
+inherit eutils mozextension multilib
+
+DESCRIPTION="Synchronize your bookmarks, history, tabs and passwords with Firefox"
+HOMEPAGE="https://mozillalabs.com/weave/"
+SRC_URI="http://hg.mozilla.org/labs/${PN}/archive/${PV}.tar.bz2
+ -> ${P}.tar.bz2"
+
+LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="|| (
+ >=www-client/mozilla-firefox-3.5
+ >=www-client/firefox-bin-3.5
+ >=www-client/seamonkey-2.0_alpha3
+ >=www-client/seamonkey-bin-2.0_alpha3
+ )
+ >=net-libs/xulrunner-1.9.1
+ >=dev-libs/nss-3.12
+ >=dev-libs/nspr-4.7.1"
+DEPEND="${RDEPEND}"
+
+RESTRICT="test"
+
+# NOTES:
+# fennec is also listed in install.rdf but not in-tree
+
+# TODO:
+# tests are failing because they are not using pkgconfig
+# parallel compilation isssues
+# server ebuild: https://wiki.mozilla.org/Labs/Weave/0.5/Setup/Storage
+
+src_prepare() {
+ # remove compiled files
+ rm -rf crypto/platform/* || die "rm -rf never dies"
+
+ # upstream bug 504022
+ if has_version '>=net-libs/xulrunner-1.9.2'; then
+ epatch "${FILESDIR}"/${P}-pkgconfig.patch
+ else
+ epatch "${FILESDIR}"/${PN}-0.5.1-pkgconfig.patch
+ fi
+}
+
+src_compile() {
+ export WEAVE_BUILDID=${PV}
+
+ emake -j1 rebuild_crypto=1 build || die "emake failed"
+}
+
+#src_test() {
+# emake -j1 test || die "emake test"
+#}
+
+src_install() {
+ local MOZILLA_FIVE_HOME xpiname
+
+ emake release_build=1 xpi || die "emake xpi failed"
+
+ mozillas=""
+ xpiname="${P}-rel"
+ xpi_unpack "${S}/dist/xpi/${xpiname}.xpi"
+
+ # FIXME: Hard-coded MOZILLA_FIVE_HOME dirs
+ if has_version '>=www-client/mozilla-firefox-3.5'; then
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox"
+ xpi_install "${WORKDIR}/${xpiname}"
+ mozillas="$(best_version www-client/mozilla-firefox) ${mozillas}"
+ fi
+ if has_version '>=www-client/firefox-bin-3.5'; then
+ MOZILLA_FIVE_HOME="/opt/firefox"
+ xpi_install "${WORKDIR}/${xpiname}"
+ mozillas="$(best_version www-client/firefox-bin) ${mozillas}"
+ fi
+ if has_version '>=www-client/seamonkey-2.0_alpha3'; then
+ MOZILLA_FIVE_HOME="/usr/$(get_libdir)/seamonkey"
+ xpi_install "${WORKDIR}/${xpiname}"
+ mozillas="$(best_version www-client/seamonkey) ${mozillas}"
+ fi
+ if has_version '>=www-client/seamonkey-bin-2.0_alpha3'; then
+ MOZILLA_FIVE_HOME="/opt/seamonkey"
+ xpi_install "${WORKDIR}/${xpiname}"
+ mozillas="$(best_version www-client/seamonkey-bin) ${mozillas}"
+ fi
+}
+
+pkg_postinst() {
+ elog "Weave has been installed for the following packages:"
+ for i in ${mozillas}; do
+ elog " $i"
+ done
+ elog
+ elog "After installing other mozilla ebuilds, if you want to use weave with them,"
+ elog "reinstall www-plugins/weave"
+
+ echo ""
+ elog "If weave from https://addons.mozilla.org/en-US/firefox/addon/10868 is working"
+ elog "please, use it instead of that ebuild."
+}