diff options
author | Nirbheek Chauhan <nirbheek@gentoo.org> | 2009-07-14 09:42:48 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@gentoo.org> | 2009-07-14 09:42:48 +0000 |
commit | ccb43e3c0b8d20ef18608dde1c9b9a22ab411681 (patch) | |
tree | 3c9ed6f00cc031c685bf3253ec435b8855a13b44 /www-plugins/mozilla-weave | |
parent | Remove _one_ eutils from inherit, because it's there _two_ times. (diff) | |
download | gentoo-2-ccb43e3c0b8d20ef18608dde1c9b9a22ab411681.tar.gz gentoo-2-ccb43e3c0b8d20ef18608dde1c9b9a22ab411681.tar.bz2 gentoo-2-ccb43e3c0b8d20ef18608dde1c9b9a22ab411681.zip |
Bump to 0.5_pre1 -- keyword-less because it's a pre-release
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'www-plugins/mozilla-weave')
-rw-r--r-- | www-plugins/mozilla-weave/ChangeLog | 8 | ||||
-rw-r--r-- | www-plugins/mozilla-weave/files/mozilla-weave-use-pkgconfig.patch | 179 | ||||
-rw-r--r-- | www-plugins/mozilla-weave/mozilla-weave-0.5_pre1.ebuild | 111 |
3 files changed, 297 insertions, 1 deletions
diff --git a/www-plugins/mozilla-weave/ChangeLog b/www-plugins/mozilla-weave/ChangeLog index a464fb21ecc4..f2ff5222e93a 100644 --- a/www-plugins/mozilla-weave/ChangeLog +++ b/www-plugins/mozilla-weave/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-plugins/mozilla-weave # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/mozilla-weave/ChangeLog,v 1.9 2009/07/13 08:25:17 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/mozilla-weave/ChangeLog,v 1.10 2009/07/14 09:42:48 nirbheek Exp $ + +*mozilla-weave-0.5_pre1 (14 Jul 2009) + + 14 Jul 2009; Nirbheek Chauhan <nirbheek@gentoo.org> + +mozilla-weave-0.5_pre1.ebuild, +files/mozilla-weave-use-pkgconfig.patch: + Bump to 0.5_pre1 -- keyword-less because it's a pre-release 13 Jul 2009; Nirbheek Chauhan <nirbheek@gentoo.org> mozilla-weave-0.4.0.ebuild: diff --git a/www-plugins/mozilla-weave/files/mozilla-weave-use-pkgconfig.patch b/www-plugins/mozilla-weave/files/mozilla-weave-use-pkgconfig.patch new file mode 100644 index 000000000000..27928b52a05d --- /dev/null +++ b/www-plugins/mozilla-weave/files/mozilla-weave-use-pkgconfig.patch @@ -0,0 +1,179 @@ +Fix hard-coded paths in Makefiles. Use pkg-config if available instead + +bmo: 504022 + +Nirbheek Chauhan <nirbheek@gentoo.org> +--- +--- a/Makefile ++++ b/Makefile +@@ -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-unstable) ++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 +--- a/src/Makefile ++++ b/src/Makefile +@@ -37,6 +37,15 @@ + # + # ***** 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 + + sys := $(shell uname -s) +@@ -133,7 +142,7 @@ + cpp_objects = $(cpp_sources:.cpp=.o) + endif + +-# source and path configurations ++# Source and path configurations + idl = IWeaveCrypto.idl + cpp_sources = WeaveCrypto.cpp WeaveCryptoModule.cpp + +@@ -141,7 +150,15 @@ + destdir = .. + platformdir = $(destdir)/platform/$(platform) + +-xpidl = $(sdkdir)/bin/xpidl ++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),) ++ pkgconfig="yes" ++ sdkdir = $(call pkg-config-var,sdkdir,libxul-unstable) ++endif + + # FIXME: we don't actually require this for e.g. clean + ifeq ($(sdkdir),) +@@ -149,32 +161,73 @@ + $(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 + ++xpidl = $(sdkdir)/bin/xpidl + idl_headers = $(idl:.idl=.h) + idl_typelib = $(idl:.idl=.xpt) + 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 ++ifeq ($(pkgconfig),"yes") ++ # Include dirs ++ nss_includes = $(call pkg-config-I,mozilla-nss) ++ nspr_includes = $(call pkg-config-I,mozilla-nspr) ++ libxul_includes = $(call pkg-config-I,libxul-unstable) ++ ++ # Library dirs ++ nss_libdirs = $(call pkg-config-L,mozilla-nss) ++ nspr_libdirs = $(call pkg-config-L,mozilla-nspr) ++ libxul_libdirs = $(call pkg-config-L,libxul-unstable) ++ ++ # Libs ++ nss_libs = $(call pkg-config-l,mozilla-nss) ++ nspr_libs = $(call pkg-config-l,mozilla-nspr) ++ libxul_libs = $(call pkg-config-l,libxul-unstable) ++ ++ idl_dir = $(call pkg-config-var,idldir,libxul-unstable)/unstable ++ ++# 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 xpcom ++ ++ idl_dir = $(sdkdir)/idl ++endif ++ ++headers = $(nss_includes) \ ++ $(nspr_includes) \ ++ $(libxul_includes) + + # libraries +-libdirs := $(sdkdir)/lib $(sdkdir)/bin +-libs := xpcomglue_s xpcom nspr4 \ +- crmf smime3 ssl3 nss3 nssutil3 \ +- plds4 plc4 +- +-ifeq ($(os), linux) +- libs := xpcom_core $(libs) +-endif ++libdirs = $(nss_libdirs) \ ++ $(nspr_libdirs) \ ++ $(libxul_libdirs) ++ ++libs = $(nss_libs) \ ++ $(nspr_libs) \ ++ $(libxul_libs) + + # compiler and Linker Flags + +@@ -277,10 +340,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/mozilla-weave/mozilla-weave-0.5_pre1.ebuild b/www-plugins/mozilla-weave/mozilla-weave-0.5_pre1.ebuild new file mode 100644 index 000000000000..05674a8d452f --- /dev/null +++ b/www-plugins/mozilla-weave/mozilla-weave-0.5_pre1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/mozilla-weave/mozilla-weave-0.5_pre1.ebuild,v 1.1 2009/07/14 09:42:48 nirbheek Exp $ + +EAPI="2" + +inherit mozextension multilib + +MY_PN="weave" +MY_PV="${PV/_/}" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Mozilla Labs prototype for online services into Firefox" +HOMEPAGE="http://labs.mozilla.com/projects/weave/" +SRC_URI="http://hg.mozilla.org/labs/${MY_PN}/archive/${MY_PV}.tar.gz + -> ${P}.tar.gz" + +LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" +SLOT="0" +#KEYWORDS="~amd64 ~ppc ~x86" +KEYWORDS="" +IUSE="" + +RDEPEND="|| ( + >=www-client/mozilla-firefox-3.5 + >=www-client/mozilla-firefox-bin-3.5 + >=www-client/seamonkey-bin-2.0_alpha3 + >=www-client/seamonkey-2.0_alpha3 + >=mail-client/mozilla-thunderbird-bin-3.0_beta2 + >=mail-client/mozilla-thunderbird-3.0_beta2 + ) + >=net-libs/xulrunner-1.9.1 + >=dev-libs/nss-3.12 + >=dev-libs/nspr-4.7.1" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +# XXX: fennec is also listed in install.rdf but not in-tree + +src_prepare() { + # Fix hard-coded paths in the Makefiles + epatch "${FILESDIR}/${PN}-use-pkgconfig.patch" + + # remove compiled files + rm -rf platform/* +} + +src_compile() { + if has_version '=net-libs/xulrunner-1.9.0*'; then + export XULRUNNER_BIN="${ROOT}/usr/bin/xulrunner-1.9" + elif has_version '=net-libs/xulrunner-1.9.1*'; then + export XULRUNNER_BIN="${ROOT}/usr/bin/xulrunner-1.9.1" + fi + export WEAVE_BUILDID=${PV} + + emake release_build=1 xpi || die "emake failed" +} + +src_install() { + local MOZILLA_FIVE_HOME xpiname + + mozillas="" + xpiname="${MY_P}-rel" + xpi_unpack "${S}/${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/mozilla-firefox-bin-3.5'; then + MOZILLA_FIVE_HOME="/opt/firefox" + xpi_install "${WORKDIR}/${xpiname}" + mozillas="$(best_version www-client/mozilla-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 + if has_version '>=mail-client/mozilla-thunderbird-3.0_beta2'; then + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-thunderbird" + xpi_install "${WORKDIR}/${xpiname}" + mozillas="$(best_version mail-client/mozilla-thunderbird) ${mozillas}" + fi + if has_version '>=mail-client/mozilla-thunderbird-bin-3.0_beta2'; then + MOZILLA_FIVE_HOME="/opt/thunderbird" + xpi_install "${WORKDIR}/${xpiname}" + mozillas="$(best_version mail-client/mozilla-thunderbird-bin) ${mozillas}" + fi +} + +pkg_postinst() { + elog "To use Weave, you have to get an account at https://services.mozilla.com/" + elog "Otherwise, you can setup your own server, see:" + elog "https://wiki.mozilla.org/Labs/Weave/0.3/Setup/Server" + elog + elog "Weave has been installed for the following packages:" + for i in ${mozillas}; do + elog " $i" + done + elog "After installing other mozilla ebuilds, if you want to use weave with them," + elog "reinstall www-plugins/mozilla-weave" +} |