--- /dev/null
+# ChangeLog for app-office/mozilla-sunbird
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/ChangeLog,v 1.1 2007/02/15 21:09:16 armin76 Exp $
+
+*mozilla-sunbird-0.3 (15 Feb 2007)
+
+ 15 Feb 2007; Raúl Porcel <armin76@gentoo.org>
+ +files/mozilla-sunbird-0.3-add-missing-LDFLAGS.patch,
+ +files/icon/mozilla-sunbird.desktop, +files/icon/mozilla-sunbird-icon.png,
+ +files/icon/mozilla-sunbird-unbranded.desktop,
+ +files/icon/mozilla-sunbird-unbranded-icon.png, +metadata.xml,
+ +mozilla-sunbird-0.3.ebuild:
+ New ebuild, bug 114995
+
--- /dev/null
+AUX icon/mozilla-sunbird-icon.png 6418 RMD160 92df6105a3ba07f961d5a54000e772791f1d89ac SHA1 e4e23c74234d688040f6cdaff4ace7f71d69dce4 SHA256 792fa9c96e825a0ba5d9f837910386dcb819e215fcc18c00936718823dee076e
+MD5 fa424078d248f495300ecc507858beb2 files/icon/mozilla-sunbird-icon.png 6418
+RMD160 92df6105a3ba07f961d5a54000e772791f1d89ac files/icon/mozilla-sunbird-icon.png 6418
+SHA256 792fa9c96e825a0ba5d9f837910386dcb819e215fcc18c00936718823dee076e files/icon/mozilla-sunbird-icon.png 6418
+AUX icon/mozilla-sunbird-unbranded-icon.png 4862 RMD160 31c18ecb694c24476ea4b025554394c9161ca4a1 SHA1 c9e0f3d85934a18319ea16220940d0a6e8eed1c3 SHA256 1a732f3ccbbcd7288a2bca566e94af7dee554d419a7e8855a9d20b22b19f3a4e
+MD5 2d32893bbe2b52fcfbb8ea0b7434d25a files/icon/mozilla-sunbird-unbranded-icon.png 4862
+RMD160 31c18ecb694c24476ea4b025554394c9161ca4a1 files/icon/mozilla-sunbird-unbranded-icon.png 4862
+SHA256 1a732f3ccbbcd7288a2bca566e94af7dee554d419a7e8855a9d20b22b19f3a4e files/icon/mozilla-sunbird-unbranded-icon.png 4862
+AUX icon/mozilla-sunbird-unbranded.desktop 195 RMD160 0dd3224c503f0ccde8aec5f930d006750ceb12fe SHA1 ab1a6146cebb94c4a850ec6c08ed969d765131c7 SHA256 88c1b0852ce8943e98eb15a19d4308af4523af8043766f549dcf7a0edbfb9998
+MD5 7ed58d1c1de1c664ecad1c699946ea6e files/icon/mozilla-sunbird-unbranded.desktop 195
+RMD160 0dd3224c503f0ccde8aec5f930d006750ceb12fe files/icon/mozilla-sunbird-unbranded.desktop 195
+SHA256 88c1b0852ce8943e98eb15a19d4308af4523af8043766f549dcf7a0edbfb9998 files/icon/mozilla-sunbird-unbranded.desktop 195
+AUX icon/mozilla-sunbird.desktop 185 RMD160 1801880f5b591989f2f3969f130fcda2b484a9a7 SHA1 d33039dadab795988c36402674943a90677430f9 SHA256 976d28d8faa05ab43636a0188e9b7bdf00c91f1542ec62e12dd86bc3bf3c6133
+MD5 f3fedf0b7ee7f9f1676f61f99697fbcc files/icon/mozilla-sunbird.desktop 185
+RMD160 1801880f5b591989f2f3969f130fcda2b484a9a7 files/icon/mozilla-sunbird.desktop 185
+SHA256 976d28d8faa05ab43636a0188e9b7bdf00c91f1542ec62e12dd86bc3bf3c6133 files/icon/mozilla-sunbird.desktop 185
+AUX mozilla-sunbird-0.3-add-missing-LDFLAGS.patch 227 RMD160 d2faf0a4a29c5fc121453d02358e01e4f7e3f19c SHA1 164c5a53e7e5f8ed5d2cee2e5268598f8f08d1e9 SHA256 ffce4bfc913800bdf69385620f483f1e8e43c5874fad4283cc94a8ba322e983d
+MD5 72b8e672d18d07325219da2b4dd39ca2 files/mozilla-sunbird-0.3-add-missing-LDFLAGS.patch 227
+RMD160 d2faf0a4a29c5fc121453d02358e01e4f7e3f19c files/mozilla-sunbird-0.3-add-missing-LDFLAGS.patch 227
+SHA256 ffce4bfc913800bdf69385620f483f1e8e43c5874fad4283cc94a8ba322e983d files/mozilla-sunbird-0.3-add-missing-LDFLAGS.patch 227
+DIST sunbird-0.3.ca.langpack.xpi 97883 RMD160 98e885c1372fee985b1e55e36ecfc3b2c01bdf2f SHA1 d9cd83a271f9a0f91a0e37add6d52b141b3105db SHA256 7d5d73fcef567b2f769ed7120e7091f52f56e3ecb3463e23343c0a89c3b17f52
+DIST sunbird-0.3.cs.langpack.xpi 97889 RMD160 2eb2996c9510c3b5f03f3e92548ff216c46137ee SHA1 62b6c9e2c22f8bf3196f3e2bc44444c00335778b SHA256 b5e5d0c6af07071d010b306e41428edb8b16150e0f18fbfb1614e13de997cf29
+DIST sunbird-0.3.da.langpack.xpi 95119 RMD160 0eb13ab0de0b89bbe4a07bd35ec89cf588d7569a SHA1 c999890566480d10f31a141f3137f6ad3870b687 SHA256 26acad4c77b573b5c2692d8939f13727961ebb8511f452a8a07d7be76ab9eadf
+DIST sunbird-0.3.de.langpack.xpi 93260 RMD160 6b976266e3967fedbb37c96e12203f1d7c78391b SHA1 a287d5e760b1e90b715244d046645bf9cbfc4eb7 SHA256 435af787449d75360548057dc347a26c32bf44851e26be94d7a39de46b94cd70
+DIST sunbird-0.3.es-ES.langpack.xpi 87069 RMD160 394ada6cffefac7c66b9411a663b01909360f1d4 SHA1 9384ecc200f35b04854d2f649ef32c34869beca6 SHA256 48ceb9e50d5c5b2b3c257f30f051bb39ed82380b94fc3487a50b02cc9dd028b2
+DIST sunbird-0.3.eu.langpack.xpi 95169 RMD160 8065f8d3140d7149756baf5d03b6c8dcd205f396 SHA1 cb6a913fcde3df3aa2b2f8912f7d6a4ad5fe3d50 SHA256 a7c3e87675a0eb0293ca75e48cf55f9df00f9155cba26e0c32d5a0b766d7c5fc
+DIST sunbird-0.3.fr.langpack.xpi 101445 RMD160 b96e1d4bd64db5e0497e0660f0cbd74167df7627 SHA1 3702cd7c7c6ff0861cbead36289c9cc04f45a3c3 SHA256 653de0c15b141db8d46e5e523e0d92da1275ffa82ca2ed72f0656454e9e32e9d
+DIST sunbird-0.3.ga-IE.langpack.xpi 98905 RMD160 6218621e8fa6f0eca9b5115e9847d49a6727c30b SHA1 232dd3c51439a44dc05a12e4a64df66e447a6729 SHA256 029ec314c5816f796253368a1f3b719b5c906cf587c9414e6b6611b13e13da1d
+DIST sunbird-0.3.hu.langpack.xpi 101047 RMD160 3ee87b3e9b4016c4897d7a94916e6aa51eb67e4b SHA1 af5a4fdb0631ec8a416a67eafdff5fbcd7c3b969 SHA256 51cc5c5e38cc95a7dec29515d12c251af37b363f257a6f878038dc30fcfc76fc
+DIST sunbird-0.3.it.langpack.xpi 85971 RMD160 d223c5d832e5ecbeb7b56935df01a5dea7d3e6ad SHA1 b185eb10e4cec3629a3859be1a2151d0cda4520a SHA256 ce1496a37145f392447b2af33e67ac27c4b4a152e8029c2c6630a08bfb9802a5
+DIST sunbird-0.3.mn.langpack.xpi 101139 RMD160 1b7114c2c60357eb32d383e31d65eaddd307bc51 SHA1 1864db0926030d2decf208ae74daf8c3a27ffa84 SHA256 cae60d4e04160e92a07ff6adee1ffd2c0d7df749dc19c087c23e954e36a2be48
+DIST sunbird-0.3.nl.langpack.xpi 97633 RMD160 1dc231fe31d0cd2b2e6f36dcd666d09e89c5f331 SHA1 f74a32b2424fd5fbf49451b411b238b8f958a736 SHA256 37ac29cfa87b51deb60f690673c971ae9062058bbf2f5389d2b3779f9dc1f10e
+DIST sunbird-0.3.pl.langpack.xpi 100958 RMD160 ae4addc8d2bbc0bcab0ce6265366bca7a63b08aa SHA1 4ca5b70538c51977331624fab9745ad2bbccf803 SHA256 3b0bb0db42131fbff4f42d2e55d064146955584a1a0dd58fa3046cb2698e2453
+DIST sunbird-0.3.ru.langpack.xpi 106253 RMD160 1e439ba0b6d3e76eb77774eadcd5fd990606c744 SHA1 a6c421e97a08177492df4287986f13cd4500e896 SHA256 76b3576281f0f5d1137235643c4f5e1ecf5bea2cf210e6d292a9959655b6b38c
+DIST sunbird-0.3.sk.langpack.xpi 102314 RMD160 22cb902f9b92ba0749650f6167ec8405fea77c29 SHA1 c333bc6d547e23160189e2373fa2e4d0cbd3f946 SHA256 fa10d298c8b79f9d5c91627068af85dd560064c15935a37e158e6c383ae12514
+DIST sunbird-0.3.sl.langpack.xpi 97715 RMD160 3267c0911d4d5a18b7be12fba23c844862725b97 SHA1 9837bf43ae64c8763dd2614fb6444034b41942ec SHA256 15109263fbf40aab3913279b8a57955374428783a997aa9d2adc0c3005f841de
+DIST sunbird-0.3.source.tar.bz2 32564480 RMD160 a5b71c40be6e6739b9ad558dfac8d2b714709e3c SHA1 9c498789d428b1f6a5abcb5a690a6d977553dce5 SHA256 e359a61363971ef8a7ab33ebfc9c645a03ad32f71ebcc3b6f414737d22b40224
+EBUILD mozilla-sunbird-0.3.ebuild 5730 RMD160 f8687cbe6aba6d58ff0a5d4d2cc97abd103fe253 SHA1 c4b85081b7e7fb3aa93b7baaf70e2ae4929ccc86 SHA256 292ea13bba673fb7baf7b67db7e47b764476c8917ee402018e96b68c79dd41f4
+MD5 77be0e208a58bec7d4cbdf42d07249eb mozilla-sunbird-0.3.ebuild 5730
+RMD160 f8687cbe6aba6d58ff0a5d4d2cc97abd103fe253 mozilla-sunbird-0.3.ebuild 5730
+SHA256 292ea13bba673fb7baf7b67db7e47b764476c8917ee402018e96b68c79dd41f4 mozilla-sunbird-0.3.ebuild 5730
+MISC ChangeLog 615 RMD160 bcb1455796f65daae30d4bac77f5b213c4e9758e SHA1 3a13b9611b7cec52d6143636b6d9b79ca58566fd SHA256 2e46e38dbdbae33a96388060e540c6f81286279463b553e64bd087999655898e
+MD5 3fcccd854ee0d1d4b3d03abf77c9d3ee ChangeLog 615
+RMD160 bcb1455796f65daae30d4bac77f5b213c4e9758e ChangeLog 615
+SHA256 2e46e38dbdbae33a96388060e540c6f81286279463b553e64bd087999655898e ChangeLog 615
+MISC metadata.xml 160 RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 SHA1 5015c07af2083f20f9552d7fb11afb5ea69af345 SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b
+MD5 ce23390351fe8020387d93ee29e09a3d metadata.xml 160
+RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 metadata.xml 160
+SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b metadata.xml 160
+MD5 be85d7bb8ede7d2313fa2b99a5e167ee files/digest-mozilla-sunbird-0.3 4445
+RMD160 8527469f1c7a96ebd9712e046143f69e8c234741 files/digest-mozilla-sunbird-0.3 4445
+SHA256 30eee483f468145d960ac519dcb8dc19c91336be936d357739e0c2a9516c857b files/digest-mozilla-sunbird-0.3 4445
--- /dev/null
+MD5 f9529e6aebfa07646eaad8b7bc23be18 sunbird-0.3.ca.langpack.xpi 97883
+RMD160 98e885c1372fee985b1e55e36ecfc3b2c01bdf2f sunbird-0.3.ca.langpack.xpi 97883
+SHA256 7d5d73fcef567b2f769ed7120e7091f52f56e3ecb3463e23343c0a89c3b17f52 sunbird-0.3.ca.langpack.xpi 97883
+MD5 ab2901347296c98f9d68071769db77fa sunbird-0.3.cs.langpack.xpi 97889
+RMD160 2eb2996c9510c3b5f03f3e92548ff216c46137ee sunbird-0.3.cs.langpack.xpi 97889
+SHA256 b5e5d0c6af07071d010b306e41428edb8b16150e0f18fbfb1614e13de997cf29 sunbird-0.3.cs.langpack.xpi 97889
+MD5 ad91d8a3d1c6cf9b6cead6eb786095f2 sunbird-0.3.da.langpack.xpi 95119
+RMD160 0eb13ab0de0b89bbe4a07bd35ec89cf588d7569a sunbird-0.3.da.langpack.xpi 95119
+SHA256 26acad4c77b573b5c2692d8939f13727961ebb8511f452a8a07d7be76ab9eadf sunbird-0.3.da.langpack.xpi 95119
+MD5 006b5edd580364b652faef909b2d1953 sunbird-0.3.de.langpack.xpi 93260
+RMD160 6b976266e3967fedbb37c96e12203f1d7c78391b sunbird-0.3.de.langpack.xpi 93260
+SHA256 435af787449d75360548057dc347a26c32bf44851e26be94d7a39de46b94cd70 sunbird-0.3.de.langpack.xpi 93260
+MD5 4bd74b1aea23e89f36bb2d693f2c2727 sunbird-0.3.es-ES.langpack.xpi 87069
+RMD160 394ada6cffefac7c66b9411a663b01909360f1d4 sunbird-0.3.es-ES.langpack.xpi 87069
+SHA256 48ceb9e50d5c5b2b3c257f30f051bb39ed82380b94fc3487a50b02cc9dd028b2 sunbird-0.3.es-ES.langpack.xpi 87069
+MD5 a7452a8d88948a149b4157eb0b0c42ab sunbird-0.3.eu.langpack.xpi 95169
+RMD160 8065f8d3140d7149756baf5d03b6c8dcd205f396 sunbird-0.3.eu.langpack.xpi 95169
+SHA256 a7c3e87675a0eb0293ca75e48cf55f9df00f9155cba26e0c32d5a0b766d7c5fc sunbird-0.3.eu.langpack.xpi 95169
+MD5 52521dafb6075108baa9e36626c7c2fc sunbird-0.3.fr.langpack.xpi 101445
+RMD160 b96e1d4bd64db5e0497e0660f0cbd74167df7627 sunbird-0.3.fr.langpack.xpi 101445
+SHA256 653de0c15b141db8d46e5e523e0d92da1275ffa82ca2ed72f0656454e9e32e9d sunbird-0.3.fr.langpack.xpi 101445
+MD5 2380dc3eeeaa0893078f1e9f006805b8 sunbird-0.3.ga-IE.langpack.xpi 98905
+RMD160 6218621e8fa6f0eca9b5115e9847d49a6727c30b sunbird-0.3.ga-IE.langpack.xpi 98905
+SHA256 029ec314c5816f796253368a1f3b719b5c906cf587c9414e6b6611b13e13da1d sunbird-0.3.ga-IE.langpack.xpi 98905
+MD5 4be3ae2bc6003167378b8fd2d77d4536 sunbird-0.3.hu.langpack.xpi 101047
+RMD160 3ee87b3e9b4016c4897d7a94916e6aa51eb67e4b sunbird-0.3.hu.langpack.xpi 101047
+SHA256 51cc5c5e38cc95a7dec29515d12c251af37b363f257a6f878038dc30fcfc76fc sunbird-0.3.hu.langpack.xpi 101047
+MD5 134c3dfdb5f251c870a0a9edf5864e45 sunbird-0.3.it.langpack.xpi 85971
+RMD160 d223c5d832e5ecbeb7b56935df01a5dea7d3e6ad sunbird-0.3.it.langpack.xpi 85971
+SHA256 ce1496a37145f392447b2af33e67ac27c4b4a152e8029c2c6630a08bfb9802a5 sunbird-0.3.it.langpack.xpi 85971
+MD5 78061d31f490c81936765e607a0aef20 sunbird-0.3.mn.langpack.xpi 101139
+RMD160 1b7114c2c60357eb32d383e31d65eaddd307bc51 sunbird-0.3.mn.langpack.xpi 101139
+SHA256 cae60d4e04160e92a07ff6adee1ffd2c0d7df749dc19c087c23e954e36a2be48 sunbird-0.3.mn.langpack.xpi 101139
+MD5 4c466023d3a0139327d3d06bb1cd7fc6 sunbird-0.3.nl.langpack.xpi 97633
+RMD160 1dc231fe31d0cd2b2e6f36dcd666d09e89c5f331 sunbird-0.3.nl.langpack.xpi 97633
+SHA256 37ac29cfa87b51deb60f690673c971ae9062058bbf2f5389d2b3779f9dc1f10e sunbird-0.3.nl.langpack.xpi 97633
+MD5 af0939bc8f28ed9f20c5edf582249981 sunbird-0.3.pl.langpack.xpi 100958
+RMD160 ae4addc8d2bbc0bcab0ce6265366bca7a63b08aa sunbird-0.3.pl.langpack.xpi 100958
+SHA256 3b0bb0db42131fbff4f42d2e55d064146955584a1a0dd58fa3046cb2698e2453 sunbird-0.3.pl.langpack.xpi 100958
+MD5 fae16d5dd179f1610fdef63a3ca3587e sunbird-0.3.ru.langpack.xpi 106253
+RMD160 1e439ba0b6d3e76eb77774eadcd5fd990606c744 sunbird-0.3.ru.langpack.xpi 106253
+SHA256 76b3576281f0f5d1137235643c4f5e1ecf5bea2cf210e6d292a9959655b6b38c sunbird-0.3.ru.langpack.xpi 106253
+MD5 bd5418d082281a825cac1662226fc7d2 sunbird-0.3.sk.langpack.xpi 102314
+RMD160 22cb902f9b92ba0749650f6167ec8405fea77c29 sunbird-0.3.sk.langpack.xpi 102314
+SHA256 fa10d298c8b79f9d5c91627068af85dd560064c15935a37e158e6c383ae12514 sunbird-0.3.sk.langpack.xpi 102314
+MD5 651c1485fe7baa97c04537d95aa2db1e sunbird-0.3.sl.langpack.xpi 97715
+RMD160 3267c0911d4d5a18b7be12fba23c844862725b97 sunbird-0.3.sl.langpack.xpi 97715
+SHA256 15109263fbf40aab3913279b8a57955374428783a997aa9d2adc0c3005f841de sunbird-0.3.sl.langpack.xpi 97715
+MD5 5579069a44e382bb963e3bbf6897a366 sunbird-0.3.source.tar.bz2 32564480
+RMD160 a5b71c40be6e6739b9ad558dfac8d2b714709e3c sunbird-0.3.source.tar.bz2 32564480
+SHA256 e359a61363971ef8a7ab33ebfc9c645a03ad32f71ebcc3b6f414737d22b40224 sunbird-0.3.source.tar.bz2 32564480
--- /dev/null
+[Desktop Entry]
+Name=Mozilla Sunbird
+Comment=Mozilla Sunbird Calendar
+Exec=/usr/bin/sunbird
+Icon=mozilla-sunbird-unbranded-icon.png
+Terminal=false
+Type=Application
+Categories=Application;Office;
--- /dev/null
+[Desktop Entry]
+Name=Mozilla Sunbird
+Comment=Mozilla Sunbird Calendar
+Exec=/usr/bin/sunbird
+Icon=mozilla-sunbird-icon.png
+Terminal=false
+Type=Application
+Categories=Application;Office;
--- /dev/null
+--- layout/build/Makefile.in.orig 2007-02-12 20:42:13.000000000 +0100
++++ layout/build/Makefile.in 2007-02-12 20:49:48.000000000 +0100
+@@ -291,6 +291,7 @@
+ endif
+ endif
+
++LDFLAGS += -lX11 -lXrender
+
+ export:: $(BUILD_DATE)
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>mozilla</herd>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/mozilla-sunbird-0.3.ebuild,v 1.1 2007/02/15 21:09:16 armin76 Exp $
+
+WANT_AUTOCONF="2.1"
+
+inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
+
+LANGS="ca cs da de es-ES eu fr ga-IE hu it mn nl pl ru sk sl"
+
+MY_PN="${PN/mozilla-}"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="The Mozilla Sunbird Calendar"
+HOMEPAGE="http://www.mozilla.org/projects/calendar/sunbird.html"
+IUSE=""
+SRC_URI="http://releases.mozilla.org/pub/mozilla.org/calendar/${MY_PN}/releases/${PV}/source/${MY_P}.source.tar.bz2"
+
+# These are in
+#
+# http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/${PV}/langpacks/
+#
+# for i in $LANGS $SHORTLANGS; do wget $i.xpi -O ${P}-$i.xpi; done
+for X in ${LANGS} ; do
+ SRC_URI="${SRC_URI}
+ linguas_${X/-/_}? ( http://releases.mozilla.org/pub/mozilla.org/calendar/${MY_PN}/releases/${PV}/langpacks/${MY_PN}-${PV}.${X}.langpack.xpi )"
+ IUSE="${IUSE} linguas_${X/-/_}"
+ # english is handled internally
+done
+
+KEYWORDS="-* ~x86 ~amd64"
+SLOT="0"
+LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
+
+RDEPEND=">=www-client/mozilla-launcher-1.44
+ >=dev-libs/nss-3.10"
+
+S="${WORKDIR}/mozilla"
+
+linguas() {
+ local LANG SLANG
+ for LANG in ${LINGUAS}; do
+ if has ${LANG} en en_US; then
+ has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
+ continue
+ elif has ${LANG} ${LANGS//-/_}; then
+ has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
+ continue
+ elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
+ for X in ${LANGS}; do
+ if [[ "${X}" == "${LANG}-"* ]] && != *" ${X} "* ]]; then
+ has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
+ continue 2
+ fi
+ done
+ fi
+ ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
+ done
+ einfo "Selected language packs (first will be default): $linguas"
+}
+
+pkg_setup(){
+ if ! built_with_use x11-libs/cairo X; then
+ eerror "Cairo is not built with X useflag."
+ eerror "Please add 'X' to your USE flags, and re-emerge cairo."
+ die "Cairo needs X"
+ fi
+
+ use moznopango && warn_mozilla_launcher_stub
+}
+
+src_unpack() {
+ unpack ${A%bz2*}bz2
+
+ linguas
+ for X in ${linguas}; do
+ [[ ${X} != "en" ]] && xpi_unpack "${MY_PN}-${PV}.${X}.langpack.xpi"
+ done
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-add-missing-LDFLAGS.patch"
+
+ eautoreconf
+}
+
+src_compile() {
+ declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ ####################################
+ #
+ # mozconfig, CFLAGS and CXXFLAGS setup
+ #
+ ####################################
+
+ mozconfig_init
+ mozconfig_config
+
+ mozconfig_annotate '' --enable-application=calendar
+ mozconfig_annotate '' --enable-extensions=default
+ mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
+ mozconfig_annotate '' --with-system-nss
+ mozconfig_annotate '' --with-system-nspr
+
+ # Add build variables
+ mozconfig_build_opts
+
+ # Finalize and report settings
+ mozconfig_final
+
+ # hardened GCC uses -fstack-protector-all by default, which breaks us
+ gcc-specs-ssp && append-flags -fno-stack-protector-all
+ replace-flags -fstack-protector-all -fstack-protector
+
+ ####################################
+ #
+ # Configure and build
+ #
+ ####################################
+
+ CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ econf || die
+
+ # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
+ # to econf, but the quotes cause configure to fail.
+ sed -i -e \
+ 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
+ ${S}/config/autoconf.mk \
+ ${S}/nsprpub/config/autoconf.mk \
+ ${S}/xpfe/global/buildconfig.html
+
+ # This removes extraneous CFLAGS from the Makefiles to reduce RAM
+ # requirements while compiling
+ edit_makefiles
+
+ emake -j1 || die
+}
+
+pkg_preinst() {
+ declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ einfo "Removing old installs though some really ugly code. It potentially"
+ einfo "eliminates any problems during the install, however suggestions to"
+ einfo "replace this are highly welcome. Send comments and suggestions to"
+ einfo "mozilla@gentoo.org."
+ rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}"
+}
+
+src_install() {
+ declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ # Most of the installation happens here
+ dodir "${MOZILLA_FIVE_HOME}"
+ cp -RL "${S}/dist/bin/"* "${D}${MOZILLA_FIVE_HOME}" || die "Copy of files failed"
+
+ linguas
+ for X in ${linguas}; do
+ [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_PN}-${PV}.${X}.langpack"
+ done
+
+ local LANG=${linguas%% *}
+ if [[ -n ${LANG} && ${LANG} != "en" ]]; then
+ einfo "Setting default locale to ${LANG}"
+ dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
+ "${MOZILLA_FIVE_HOME}"/defaults/pref/sunbird.js \
+ "${MOZILLA_FIVE_HOME}"/defaults/pref/sunbird-l10n.js || \
+ die "sed failed to change locale"
+ fi
+
+ # Create /usr/bin/sunbird
+ install_mozilla_launcher_stub sunbird "${MOZILLA_FIVE_HOME}"
+
+ # Install icon and .desktop for menu entry
+ doicon "${FILESDIR}"/icon/${PN}-unbranded-icon.png
+ newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
+ ${PN}.desktop
+}
+
+pkg_postinst() {
+ declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ # This should be called in the postinst and postrm of all the
+ # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
+ # thunderbird-bin ebuilds.
+ update_mozilla_launcher_symlinks
+}
+
+pkg_postrm() {
+ declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
+
+ update_mozilla_launcher_symlinks
+}