/[gentoo-x86]/www-client/seamonkey/seamonkey-2.0_beta2.ebuild
Gentoo

Contents of /www-client/seamonkey/seamonkey-2.0_beta2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Oct 12 03:01:03 2009 UTC (5 years ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
new seamonkey-2.x release, re-enable enigmail support
(Portage version: 2.1.7/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/seamonkey/seamonkey-2.0_beta2.ebuild,v 1.2 2009/09/28 03:56:21 anarchy Exp $
4
5 EAPI="2"
6 WANT_AUTOCONF="2.1"
7
8 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib fdo-mime autotools mozextension
9
10 PATCH="${PN}-2.0-patches-0.1"
11
12 LANGS="be ca de en-US es-AR es-ES fr gl hu lt nb-NO pl pt-PT ru sk tr"
13 NOSHORTLANGS="es-AR"
14
15 MY_PV="${PV/_beta/b}"
16 MY_P="${PN}-${MY_PV}"
17
18 DESCRIPTION="Seamonkey Web Browser"
19 HOMEPAGE="http://www.seamonkey-project.org"
20
21 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
22 SLOT="0"
23 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
24 IUSE="java ldap mozdevelop moznocompose moznoirc moznomail moznoroaming sqlite restrict-javascript"
25
26 REL_URI="http://releases.mozilla.org/pub/mozilla.org/${PN}/releases"
27 SRC_URI="${REL_URI}/${MY_PV}/source/${MY_P}.source.tar.bz2
28 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
29
30 for X in ${LANGS} ; do
31 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
32 SRC_URI="${SRC_URI}
33 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
34 fi
35 IUSE="${IUSE} linguas_${X/-/_}"
36 # english is handled internally
37 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
38 if [ "${X}" != "en-US" ]; then
39 SRC_URI="${SRC_URI}
40 linguas_${X%%-*}? ( ${REL_URI}/${MY_PV}/langpack/${MY_P}.${X}.langpack.xpi -> ${MY_P}-${X}.xpi )"
41 fi
42 IUSE="${IUSE} linguas_${X%%-*}"
43 fi
44 done
45
46 RDEPEND="java? ( virtual/jre )
47 >=sys-devel/binutils-2.16.1
48 >=dev-libs/nss-3.12.2
49 >=dev-libs/nspr-4.8
50 media-libs/alsa-lib
51 sqlite? ( >=dev-db/sqlite-3.6.7 )
52 >=app-text/hunspell-1.2
53 x11-libs/cairo[X]
54 x11-libs/pango[X]"
55
56 DEPEND="${RDEPEND}
57 dev-util/pkgconfig
58 java? ( >=dev-java/java-config-0.2.0 )"
59
60 PDEPEND="restrict-javascript? ( >=www-plugins/noscript-1.9.6.6 )"
61
62 S="${WORKDIR}/comm-central"
63
64 # Needed by src_compile() and src_install().
65 # Would do in pkg_setup but that loses the export attribute,
66 # they become pure shell variables.
67 export BUILD_OFFICIAL=1
68 export MOZILLA_OFFICIAL=1
69
70 linguas() {
71 local LANG SLANG
72 for LANG in ${LINGUAS}; do
73 if has ${LANG} en en_US; then
74 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
75 continue
76 elif has ${LANG} ${LANGS//-/_}; then
77 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
78 continue
79 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
80 for X in ${LANGS}; do
81 if [[ "${X}" == "${LANG}-"* ]] && \
82 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
83 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
84 continue 2
85 fi
86 done
87 fi
88 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
89 done
90 }
91
92 src_unpack() {
93 unpack ${A}
94
95 linguas
96 for X in ${linguas}; do
97 # FIXME: Add support for unpacking xpis to portage
98 [[ ${X} != "en" ]] && xpi_unpack "${MY_P}-${X}.xpi"
99 done
100 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
101 einfo "Selected language packs (first will be default): ${linguas}"
102 fi
103 }
104
105 pkg_setup() {
106 if use sqlite ; then
107 einfo
108 elog "You are enabling system sqlite. Do not file a bug with gentoo if you have"
109 elog "issues that arise from enabling system sqlite. All bugs will be concidered"
110 elog "invalid. All patches are welcomed to fix any issues that might be found with"
111 elog "system sqlite. If you are starting with a fresh profile you can enable sqlite"
112 elog "without any major issues."
113 epause 10
114 fi
115 }
116
117 src_prepare() {
118 # Apply our patches
119 EPATCH_SUFFIX="patch" \
120 EPATCH_FORCE="yes" \
121 epatch "${WORKDIR}"
122
123 eautoreconf
124 }
125
126 src_configure() {
127 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
128 MEXTENSIONS="default"
129
130 ####################################
131 #
132 # mozconfig, CFLAGS and CXXFLAGS setup
133 #
134 ####################################
135
136 mozconfig_init
137 mozconfig_config
138
139 # It doesn't compile on alpha without this LDFLAGS
140 use alpha && append-ldflags "-Wl,--no-relax"
141
142 if use moznoirc ; then
143 MEXTENSIONS="${MEXTENSIONS},-irc"
144 fi
145 if use moznoroaming ; then
146 MEXTENSIONS="${MEXTENSIONS},-sroaming"
147 fi
148
149 if ! use gnome ; then
150 MEXTENSIONS="${MEXTENSIONS},-gnomevfs"
151 fi
152
153 if use moznomail ; then
154 mozconfig_annotate '+moznomail' --disable-mailnews
155 fi
156
157 if use moznocompose ; then
158 if use moznoirc && use moznomail ; then
159 mozconfig_annotate '+moznocompose' --disable-composer
160 fi
161 fi
162
163 if use sqlite ; then
164 mozconfig_annotate 'sqlite' --enable-system-sqlite
165 else
166 mozconfig_annotate '-sqlite' --enable-system-sqlite
167 fi
168
169 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
170 mozconfig_annotate '' --enable-application=suite
171 mozconfig_annotate 'broken' --disable-mochitest
172 mozconfig_annotate 'broken' --disable-crashreporter
173 mozconfig_annotate '' --enable-system-hunspell
174 mozconfig_annotate '' --enable-system-sqlite
175 mozconfig_annotate '' --enable-image-encoder=all
176 mozconfig_annotate '' --enable-canvas
177 mozconfig_annotate '' --with-system-nspr
178 mozconfig_annotate '' --with-system-nss
179 mozconfig_annotate '' --enable-system-lcms
180 mozconfig_annotate '' --enable-oji --enable-mathml
181 mozconfig_annotate 'places' --enable-storage --enable-places --enable-places_bookmarks
182 mozconfig_annotate '' --disable-installer
183 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
184
185 mozconfig_use_enable ldap
186 mozconfig_use_enable ldap ldap-experimental
187
188 # Finalize and report settings
189 mozconfig_final
190
191 if [[ $(gcc-major-version) -lt 4 ]]; then
192 append-cxxflags -fno-stack-protector
193 fi
194
195 ####################################
196 #
197 # Configure and build
198 #
199 ####################################
200
201 # Work around breakage in makeopts with --no-print-directory
202 MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
203
204 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
205 }
206
207 src_compile() {
208 # Should the build use multiprocessing? Not enabled by default, as it tends to break.
209 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
210 emake ${jobs} || die
211 }
212
213 src_install() {
214 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
215
216 emake DESTDIR="${D}" install || die "emake install failed"
217
218 linguas
219 for X in ${linguas}; do
220 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${MY_P}-${X}"
221 done
222
223 local LANG=${linguas%% *}
224 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
225 elog "Setting default locale to ${LANG}"
226 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
227 ${MOZILLA_FIVE_HOME}/defaults/pref/suite-l10n.js || \
228 die "sed failed to change locale"
229 fi
230
231 # Install icon and .desktop for menu entry
232 newicon "${S}"/suite/branding/content/icon64.png seamonkey.png
233 domenu "${FILESDIR}"/icon/seamonkey.desktop
234
235 # Add vendor
236 echo "pref(\"general.useragent.vendor\",\"Gentoo\");" \
237 >> "${D}"${MOZILLA_FIVE_HOME}/defaults/pref/vendor.js
238
239 # Plugins dir
240 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins || die "failed to remove existing plugins dir"
241 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins
242 }
243
244 pkg_postinst() {
245 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
246
247 # Update mimedb for the new .desktop file
248 fdo-mime_desktop_database_update
249 }

  ViewVC Help
Powered by ViewVC 1.1.20