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

Contents of /www-client/mozilla-firefox/mozilla-firefox-2.0_beta2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sat Oct 7 17:44:09 2006 UTC (14 years, 1 month ago) by genstef
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
version bump, clean up old
(Portage version: 2.1.2_pre2-r5)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-2.0_beta2.ebuild,v 1.3 2006/09/28 02:15:02 weeve Exp $
4
5 inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime mozextension autotools
6
7 PVER="1.3"
8 LANGS="af ar bg ca cs da de el en-GB es-AR es-ES eu fi fr gu-IN hu it ja
9 ko lt mk mn nb-NO nl nso pa-IN pl ru sk sl sv-SE tr xh zh-CN zh-TW zu"
10 SHORTLANGS="fy-NL pt-PT nn-NO"
11 MY_PV=${PV/_beta/b}
12
13 DESCRIPTION="Firefox Web Browser"
14 HOMEPAGE="http://www.mozilla.org/projects/firefox/"
15
16 KEYWORDS="~alpha ~amd64 ~sparc ~x86"
17 SLOT="0"
18 LICENSE="MPL-1.1 NPL-1.1"
19 IUSE="java mozdevelop"
20
21 MOZ_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}"
22 SRC_URI="${MOZ_URI}/source/firefox-${MY_PV}-source.tar.bz2
23 http://gentooexperimental.org/~genstef/dist/${P}-patches-${PVER}.tar.bz2"
24
25 # These are in
26 #
27 # http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${MY_PV}/linux-i686/xpi/
28 #
29 # for i in $LANGS $SHORTLANGS; do wget $i.xpi -O ${P}-$i.xpi; done
30 for X in ${LANGS} ; do
31 SRC_URI="${SRC_URI}
32 linguas_${X/-/_}? ( http://gentooexperimental.org/~genstef/dist/${P}-xpi/${P}-${X}.xpi )"
33 IUSE="${IUSE} linguas_${X/-/_}"
34 done
35 for X in ${SHORTLANGS} ; do
36 SRC_URI="${SRC_URI}
37 linguas_${X%%-*}? ( http://gentooexperimental.org/~genstef/dist/${P}-xpi/${P}-${X}.xpi )"
38 IUSE="${IUSE} linguas_${X%%-*}"
39 done
40
41 RDEPEND="java? ( virtual/jre )
42 >=www-client/mozilla-launcher-1.39
43 >=sys-devel/binutils-2.16.1
44 >=dev-libs/nss-3.11.1-r1
45 >=dev-libs/nspr-4.6.1
46 ~sys-devel/autoconf-2.13"
47
48 DEPEND="${RDEPEND}
49 java? ( >=dev-java/java-config-0.2.0 )"
50
51 S="${WORKDIR}/mozilla"
52
53 linguas() {
54 local LANG SLANG
55 for LANG in ${LINGUAS}; do
56 if hasq ${LANG} en en_US; then
57 hasq en ${linguas} || linguas="${linguas:+"${linguas} "}en"
58 continue
59 elif hasq ${LANG} ${LANGS//-/_}; then
60 hasq ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
61 continue
62 else
63 for SLANG in ${SHORTLANGS}; do
64 if [[ ${LANG} == "${SLANG%%-*}" ]]; then
65 hasq ${SLANG} ${linguas} || linguas="${linguas:+"${linguas} "}${SLANG}"
66 continue 2
67 fi
68 done
69 fi
70 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
71 done
72 }
73
74 src_unpack() {
75 unpack ${A%bz2*}bz2
76
77 linguas
78 for X in ${linguas}; do
79 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
80 done
81
82 cd "${S}"
83
84 # Apply our patches
85 EPATCH_FORCE="yes" epatch "${WORKDIR}"/patch
86
87 # Fix a compilation issue using the 32-bit userland with 64-bit kernel on
88 # PowerPC, because with that configuration, it detects a ppc64 system.
89 # -- hansmi, 2005-11-13
90 if use ppc && [[ "${PROFILE_ARCH}" == ppc64 ]]; then
91 sed -i -e "s#OS_TEST=\`uname -m\`\$#OS_TEST=${ARCH}#" \
92 "${S}"/configure
93 sed -i -e "s#OS_TEST :=.*uname -m.*\$#OS_TEST:=${ARCH}#" \
94 "${S}"/security/coreconf/arch.mk
95 fi
96
97 WANT_AUTOCONF="2.1" eautoreconf
98 }
99
100 src_compile() {
101 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
102
103 mozconfig_init
104 mozconfig_config
105
106 mozconfig_annotate '' --enable-application=browser
107 mozconfig_annotate '' --enable-extensions=default,typeaheadfind
108 mozconfig_annotate '' --enable-image-encoder=all
109 mozconfig_annotate '' --enable-canvas
110 mozconfig_annotate '' --with-system-nspr
111 mozconfig_annotate '' --with-system-nss
112 mozconfig_annotate '' --enable-official-branding
113
114 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
115 # regardless of java setting.
116 mozconfig_annotate '' --enable-oji --enable-mathml
117
118 # Other ff-specific settings
119 mozconfig_use_enable mozdevelop jsd
120 mozconfig_use_enable mozdevelop xpctools
121 mozconfig_use_extension mozdevelop venkman
122 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
123
124 # Add build variables
125 mozconfig_build_opts
126
127 # Finalize and report settings
128 mozconfig_final
129
130 # -fstack-protector breaks us
131 gcc-specs-ssp && append-flags -fno-stack-protector-all
132 filter-flags -fstack-protector -fstack-protector-all
133
134 # Don't know a reason for that so commented out /peper
135 #append-flags -freorder-blocks -fno-reorder-functions
136
137 # Configure and build
138
139 CPPFLAGS="${CPPFLAGS} -DGENTOO_NSPLUGINS_DIR=\\\"/usr/$(get_libdir)/nsplugins\\\""
140 CPPFLAGS="${CPPFLAGS} -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/$(get_libdir)/nsbrowser/plugins\\\""
141 export CPPFLAGS
142 tc-export CC CXX LD
143 econf || die
144
145 # This removes extraneous CFLAGS from the Makefiles to reduce RAM
146 # requirements while compiling
147 edit_makefiles
148
149 emake || die
150 }
151
152 pkg_preinst() {
153 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
154
155 einfo "Removing old install to eliminate any problems during install."
156 rm -rf "${ROOT}"/"${MOZILLA_FIVE_HOME}"
157 }
158
159 src_install() {
160 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
161
162 # Most of the installation happens here
163 dodir "${MOZILLA_FIVE_HOME}"
164 cp -RL "${S}"/dist/bin/* "${D}"/"${MOZILLA_FIVE_HOME}"/ || die "cp failed"
165
166 linguas
167 for X in ${linguas}; do
168 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
169 done
170
171 local LANG=${linguas%% *}
172 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
173 einfo "Setting default locale to ${LANG}"
174 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
175 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox.js \
176 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox-l10n.js || \
177 die "sed failed to change locale"
178 fi
179
180 # Create /usr/bin/firefox
181 install_mozilla_launcher_stub firefox "${MOZILLA_FIVE_HOME}"
182
183 # Install icon and .desktop for menu entry
184 doicon "${FILESDIR}"/icon/firefox-icon.png
185 newmenu "${FILESDIR}"/icon/mozillafirefox-1.5.desktop \
186 mozillafirefox-2.0.desktop
187
188 # Fix icons to look the same everywhere
189 insinto "${MOZILLA_FIVE_HOME}"/icons
190 doins "${S}"/dist/branding/mozicon16.xpm
191 doins "${S}"/dist/branding/mozicon50.xpm
192
193
194 # Install files necessary for applications to build against firefox
195 einfo "Installing includes and idl files..."
196 dodir "${MOZILLA_FIVE_HOME}"/idl "${MOZILLA_FIVE_HOME}"/include
197 cp -LfR "${S}"/dist/include/* "${D}"/"${MOZILLA_FIVE_HOME}"/include/ || \
198 die "cp failed"
199 cp -LfR "${S}"/dist/idl/* "${D}"/"${MOZILLA_FIVE_HOME}"/idl || \
200 die "cp failed"
201
202 # Dirty hack to get some applications using this header running
203 dosym "${MOZILLA_FIVE_HOME}"/include/necko/nsIURI.h \
204 "${MOZILLA_FIVE_HOME}"/include/nsIURI.h
205
206 # Install pkgconfig files
207 insinto /usr/"$(get_libdir)"/pkgconfig
208 doins "${S}"/build/unix/*.pc
209
210 insinto "${MOZILLA_FIVE_HOME}"/greprefs
211 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
212 insinto "${MOZILLA_FIVE_HOME}"/defaults/pref
213 newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js
214 }
215
216 pkg_postinst() {
217 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
218
219 # This should be called in the postinst and postrm of all the
220 # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and
221 # thunderbird-bin ebuilds.
222 update_mozilla_launcher_symlinks
223
224 # Update mimedb for the new .desktop file
225 fdo-mime_desktop_database_update
226
227 elog "Please remember to rebuild any packages that you have built"
228 elog "against firefox. Some packages might be broken by the upgrade; if this"
229 elog "is the case, please search at http://bugs.gentoo.org and open a new bug"
230 elog "if one does not exist. Before filing any bugs, please move or remove ~/.mozilla"
231 elog "and test with a clean profile directory."
232 }
233
234 pkg_postrm() {
235 declare MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
236
237 update_mozilla_launcher_symlinks
238 }

  ViewVC Help
Powered by ViewVC 1.1.20