Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-office/mozilla-sunbird: ChangeLog mozilla-sunbird-0.7.ebuild
Date: Fri, 26 Oct 2007 19:04:15
Message-Id: E1IlTyF-0007CD-Jk@stork.gentoo.org
1 armin76 07/10/26 18:31:47
2
3 Modified: ChangeLog
4 Added: mozilla-sunbird-0.7.ebuild
5 Log:
6 Version bump, bug 195040
7 (Portage version: 2.1.3.9)
8
9 Revision Changes Path
10 1.18 app-office/mozilla-sunbird/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/mozilla-sunbird/ChangeLog?rev=1.18&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/mozilla-sunbird/ChangeLog?rev=1.18&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/mozilla-sunbird/ChangeLog?r1=1.17&r2=1.18
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/ChangeLog,v
19 retrieving revision 1.17
20 retrieving revision 1.18
21 diff -u -r1.17 -r1.18
22 --- ChangeLog 31 Aug 2007 11:37:43 -0000 1.17
23 +++ ChangeLog 26 Oct 2007 18:31:47 -0000 1.18
24 @@ -1,6 +1,12 @@
25 # ChangeLog for app-office/mozilla-sunbird
26 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/ChangeLog,v 1.17 2007/08/31 11:37:43 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/ChangeLog,v 1.18 2007/10/26 18:31:47 armin76 Exp $
29 +
30 +*mozilla-sunbird-0.7 (26 Oct 2007)
31 +
32 + 26 Oct 2007; Raúl Porcel <armin76@g.o>
33 + +mozilla-sunbird-0.7.ebuild:
34 + Version bump, bug 195040
35
36 31 Aug 2007; Raúl Porcel <armin76@g.o> mozilla-sunbird-0.5.ebuild:
37 Fix MAKEOPTS, bug #190755
38
39
40
41 1.1 app-office/mozilla-sunbird/mozilla-sunbird-0.7.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/mozilla-sunbird/mozilla-sunbird-0.7.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-office/mozilla-sunbird/mozilla-sunbird-0.7.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mozilla-sunbird-0.7.ebuild
47 ===================================================================
48 # Copyright 1999-2007 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-office/mozilla-sunbird/mozilla-sunbird-0.7.ebuild,v 1.1 2007/10/26 18:31:47 armin76 Exp $
51
52 WANT_AUTOCONF="2.1"
53
54 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
55
56 PATCH="${PN}-0.5-patches-0.1"
57 LANGS="ca cs da de es-AR es-ES eu fr ga-IE hu it ka lt mk nb-NO nl pa-IN pl pt-BR pt-PT ru sk sl sv-SE tr zh-CN"
58 NOSHORTLANGS="es-AR pt-BR zh-TW"
59
60 MY_PN="${PN/mozilla-}"
61 MY_P="${MY_PN}-${PV}"
62 DESCRIPTION="The Mozilla Sunbird Calendar"
63 HOMEPAGE="http://www.mozilla.org/projects/calendar/sunbird.html"
64 IUSE="bindist"
65 SRC_URI="mirror://gentoo/${MY_P}-source.tar.bz2
66 mirror://gentoo/${PATCH}.tar.bz2"
67
68 # These are in
69 #
70 # http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/${PV}/langpacks/
71 #
72 # for i in $LANGS $SHORTLANGS; do wget $i.xpi -O ${P}-$i.xpi; done
73 for X in ${LANGS} ; do
74 SRC_URI="${SRC_URI}
75 linguas_${X/-/_}? ( http://dev.gentooexperimental.org/~armin76/dist/${P/-bin}-xpi/${P/-bin/}-${X}.xpi )"
76 IUSE="${IUSE} linguas_${X/-/_}"
77 # english is handled internally
78 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
79 SRC_URI="${SRC_URI}
80 linguas_${X%%-*}? ( http://dev.gentooexperimental.org/~armin76/dist/${P/-bin}-xpi/${P/-bin/}-${X}.xpi )"
81 IUSE="${IUSE} linguas_${X%%-*}"
82 fi
83 done
84
85 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
86 SLOT="0"
87 LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
88
89 RDEPEND=">=www-client/mozilla-launcher-1.55
90 >=dev-libs/nss-3.11.5"
91
92 S="${WORKDIR}/mozilla"
93
94 # Needed by src_compile() and src_install().
95 # Would do in pkg_setup but that loses the export attribute, they
96 # become pure shell variables.
97 export MOZ_CO_PROJECT=calendar
98 export BUILD_OFFICIAL=1
99 export MOZILLA_OFFICIAL=1
100
101 linguas() {
102 local LANG SLANG
103 for LANG in ${LINGUAS}; do
104 if has ${LANG} en en_US; then
105 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
106 continue
107 elif has ${LANG} ${LANGS//-/_}; then
108 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
109 continue
110 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
111 for X in ${LANGS}; do
112 if [[ "${X}" == "${LANG}-"* ]] && \
113 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
114 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
115 continue 2
116 fi
117 done
118 fi
119 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
120 done
121 }
122
123 pkg_setup(){
124 if ! built_with_use x11-libs/cairo X; then
125 eerror "Cairo is not built with X useflag."
126 eerror "Please add 'X' to your USE flags, and re-emerge cairo."
127 die "Cairo needs X"
128 fi
129
130 if ! use bindist; then
131 elog "You are enabling official branding. You may not redistribute this build"
132 elog "to any users on your network or the internet. Doing so puts yourself into"
133 elog "a legal problem with mozilla foundation"
134 fi
135
136 use moznopango && warn_mozilla_launcher_stub
137 }
138
139 src_unpack() {
140 unpack ${A%bz2*}bz2
141
142 linguas
143 for X in ${linguas}; do
144 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
145 done
146 if [[ ${linguas} != "" ]]; then
147 elog "Selected language packs (first will be default): ${linguas}"
148 fi
149
150 # Apply our patches
151 cd "${S}" || die "cd failed"
152 EPATCH_SUFFIX="patch" \
153 EPATCH_FORCE="yes" \
154 epatch "${WORKDIR}"/patch
155
156 eautoreconf
157 }
158
159 src_compile() {
160 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
161
162 ####################################
163 #
164 # mozconfig, CFLAGS and CXXFLAGS setup
165 #
166 ####################################
167
168 mozconfig_init
169 mozconfig_config
170
171 mozconfig_annotate '' --enable-application=calendar
172 mozconfig_annotate '' --enable-extensions=default
173 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
174 mozconfig_annotate '' --with-system-nss
175 mozconfig_annotate '' --with-system-nspr
176
177 if ! use bindist; then
178 mozconfig_annotate '' --enable-official-branding
179 fi
180
181 # Finalize and report settings
182 mozconfig_final
183
184 # hardened GCC uses -fstack-protector-all by default, which breaks us
185 gcc-specs-ssp && append-flags -fno-stack-protector-all
186 replace-flags -fstack-protector-all -fstack-protector
187
188 ####################################
189 #
190 # Configure and build
191 #
192 ####################################
193
194 CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \
195 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
196 econf || die
197
198 # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior
199 # to econf, but the quotes cause configure to fail.
200 sed -i -e \
201 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \
202 ${S}/config/autoconf.mk \
203 ${S}/nsprpub/config/autoconf.mk \
204 ${S}/xpfe/global/buildconfig.html
205
206 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
207 # requirements while compiling
208 edit_makefiles
209
210 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
211 emake ${jobs} || die
212 }
213
214 pkg_preinst() {
215 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
216
217 einfo "Removing old installs though some really ugly code. It potentially"
218 einfo "eliminates any problems during the install, however suggestions to"
219 einfo "replace this are highly welcome. Send comments and suggestions to"
220 einfo "mozilla@g.o."
221 rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}"
222 }
223
224 src_install() {
225 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
226
227 # Most of the installation happens here
228 dodir "${MOZILLA_FIVE_HOME}"
229 cp -RL "${S}/dist/bin/"* "${D}${MOZILLA_FIVE_HOME}" || die "Copy of files failed"
230 touch "${D}${MOZILLA_FIVE_HOME}"/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
231 touch "${D}${MOZILLA_FIVE_HOME}"/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
232
233
234 linguas
235 for X in ${linguas}; do
236 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
237 done
238
239 local LANG=${linguas%% *}
240 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
241 einfo "Setting default locale to ${LANG}"
242 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
243 "${MOZILLA_FIVE_HOME}"/defaults/pref/sunbird.js \
244 "${MOZILLA_FIVE_HOME}"/defaults/pref/sunbird-l10n.js || \
245 die "sed failed to change locale"
246 fi
247
248 # Create /usr/bin/sunbird
249 install_mozilla_launcher_stub sunbird "${MOZILLA_FIVE_HOME}"
250
251 # Install icon and .desktop for menu entry
252 if ! use bindist; then
253 doicon "${FILESDIR}"/icon/${PN}-icon.png
254 domenu "${FILESDIR}"/icon/${PN}.desktop
255 else
256 doicon "${FILESDIR}"/icon/${PN}-unbranded-icon.png
257 newmenu "${FILESDIR}"/icon/${PN}-unbranded.desktop \
258 ${PN}.desktop
259
260 fi
261 }
262
263 pkg_postinst() {
264 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
265
266 # This should be called in the postinst and postrm of all the
267 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
268 # thunderbird-bin ebuilds.
269 update_mozilla_launcher_symlinks
270 }
271
272 pkg_postrm() {
273 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
274
275 update_mozilla_launcher_symlinks
276 }
277
278
279
280 --
281 gentoo-commits@g.o mailing list