Magellan Linux

Contents of /smage/trunk/extras/mozilla-firefox-gtk2/mozilla-firefox-gtk2-2.0.0.16-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sun Jan 11 00:48:53 2009 UTC (15 years, 4 months ago) by niro
File size: 8967 byte(s)
-import alx-0.9.0
1 # $Header: /alx-cvs/smage-eglibc/mozilla-firefox-gtk2/mozilla-firefox-gtk2-2.0.0.16-r1.smage2,v 1.5 2008/09/27 10:15:59 niro Exp $
2
3 PNAME="mozilla-firefox-gtk2"
4 PVER="2.0.0.16"
5 PBUILD="r1"
6
7 PCATEGORIE="net-www"
8 STATE="unstable"
9
10 DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser."
11 HOMEPAGE="http://www.mozilla.org/products/firefox/"
12
13 DEPEND=">= x11-libs/libXrender-0.9
14 >= x11-libs/libXt-1
15 >= x11-libs/libXmu-1
16 >= x11-libs/libXft-2
17 >= media-libs/libjpeg-6b
18 >= media-libs/libpng-1.2.24
19 >= dev-libs/expat-2
20 >= sys-libs/zlib-1.2.3
21 >= media-libs/fontconfig-2.5
22 >= dev-libs/libidl-0.8.10
23 >= x11-libs/gtk2+-standalone-2.12"
24 # >= app-arch/zip-2.3
25
26 SDEPEND=">= dev-util/pkgconfig-0.23
27 >= sys-dev/autoconf-4
28 >= sys-dev/automake-3"
29 # >= sys-apps/sed-4"
30
31 SRCFILE="firefox-${PVER}-source.tar.bz2"
32 SRCDIR="${BUILDDIR}/mozilla"
33
34 sminclude mozilla mtools alx
35
36 SRC_URI=(
37 ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PVER}/source/${SRCFILE}
38 mirror://${PNAME/-gtk2/}/${SRCFILE}
39 mirror://${PNAME/-gtk2/}/menu/firefox.png
40 mirror://${PNAME/-gtk2/}/menu/firefox.desktop
41 mirror://${PNAME/-gtk2/}/mozilla-firefox-1.5.0-embed-typeaheadfind.patch
42 mirror://${PNAME/-gtk2/}/mozilla-firefox-1.5.0.11-pkgconfig.patch
43 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.5-libdeps.patch
44 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.5-asneeded.patch
45 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.5-respect-host-variable.patch
46 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.5-rpath-3.patch
47 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.5-pango-cursor.patch
48 mirror://${PNAME/-gtk2/}/mozilla-firefox-2.0.0.9-language.patch
49 )
50
51 export MOZ_PHOENIX=1
52
53 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
54 export MOZILLA_CLIENT=1
55 export BUILD_OPT=1
56 export NO_STATIC_LIB=1
57 export USE_PTHREADS=1
58
59 # now strip optimization from CFLAGS so it doesn't end up in the
60 # compile string
61 export CFLAGS="${CFLAGS/-O*/}"
62 export CXXFLAGS="${CFLAGS}"
63
64 # needed to build without warnings on gcc-3
65 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
66
67 src_prepare()
68 {
69 munpack ${SRCFILE} || die
70 cd ${SRCDIR}
71
72 # patches, patches, patches
73
74 # fix linking issues against pango
75 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
76 mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die
77
78 # use as-needed with newer binutils
79 # https://bugzilla.mozilla.org/show_bug.cgi?id=311236
80 mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die
81
82 # fixes typeahead and gtk fixes for embeded firefox browsers
83 mpatch mozilla-firefox-1.5.0-embed-typeaheadfind.patch || die
84
85 # fix pkgconfig pathes
86 mpatch mozilla-firefox-1.5.0.11-pkgconfig.patch || die
87
88 # fix some compile issues on multilib systems
89 mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die
90 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
91
92 # fix pango-cursor issues
93 mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die
94
95 # enable variable languages via environment vars
96 mpatch mozilla-firefox-2.0.0.9-language.patch || die
97
98 # branding the source with our tags
99 sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die
100
101 export WANT_AUTOCONF="2.1"
102 autoconf || die
103 }
104
105 src_compile()
106 {
107 cd ${SRCDIR}
108
109 # setup .mozconfig
110 cp browser/config/mozconfig .mozconfig || die
111
112 # where shall the files go ?
113 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
114
115 # set optimization level based on CFLAGS
116 if [[ ${ARCH} = x86_64 ]]
117 then
118 # opts may cause segfaults on 64bit arches
119 mozconf_add --enable-optimize=-O1
120 export CFLAGS="${CFLAGS} -fPIC"
121 export CXXFLAGS="${CXXFLAGS} -fPIC"
122 else
123 mozconf_add --enable-optimize=-O2
124 fi
125
126 # enable compat mode for plugins build with gcc2
127 mozconf_add --enable-old-abi-compat-wrappers
128
129 # we don't need the installer
130 mozconf_add --disable-installer
131
132 # issue all warnings demanded by strict ANSI C
133 mozconf_add --disable-pedantic
134
135 # enable crypto support (Personal Security Manager)
136 mozconf_add --enable-crypto
137
138 # want system jpeg, pngm, zlib
139 mozconf_add --with-system-jpeg
140 mozconf_add --with-system-png
141 mozconf_add --with-system-zlib
142 # but not nspr and nss
143 mozconf_add --without-system-nspr
144 mozconf_add --without-system-nss
145
146 # enable gtk2 as default
147 mozconf_add --enable-default-toolkit=gtk2
148
149 # no ipv6 support
150 mozconf_add --disable-ipv6
151
152 # no xinerama
153 mozconf_add --disable-xinerama
154
155 # no xprint ?
156 mozconf_add --disable-xprint
157
158 # no freetype2 xft and co
159 mozconf_add --disable-freetype2
160 mozconf_add --enable-xft
161 mozconf_add --enable-pango
162 mozconf_add --enable-system-cairo
163
164 # enable all image encoders
165 mozconf_add --enable-image-encoder=all
166
167 # disable debug build && enable stripping
168 mozconf_add --disable-debug
169 mozconf_add --disable-tests
170 mozconf_add --enable-reorder
171 mozconf_add --enable-strip
172 mozconf_add --enable-strip-libs
173
174 if [[ ${ARCH} = i*86 ]]
175 then
176 # optimze build for x86
177 mozconf_add --enable-elf-dynstr-gc
178 fi
179
180 # both needed to build galeon
181 mozconf_add --enable-oji
182 mozconf_add --enable-mathml
183
184 # enable default extensions and typeaheadfind
185 mozconf_add --enable-extensions=default,typeaheadfind
186
187 # gnome support (needs gnome-vfs)
188 mozconf_add --disable-gnomevfs
189 mozconf_add --enable-extension=-gnomevfs
190
191 # resolve multiple --enable-extensions down to one
192 rebuild_extension_list
193
194 # now run configure
195 #ac_cv_visibility_pragma=no mconfigure || die
196 mconfigure || die
197
198 # removes extraneous CFLAGS
199 # to reduce RAM requirements while compiling
200 mozilla_remove_cflags || die
201
202 mmake || die
203 }
204
205 src_install()
206 {
207 cd ${SRCDIR}
208
209 # needed directories
210 minstalldir /etc/env.d || die
211 minstalldir /usr/bin || die
212 minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die
213 minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die
214 minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die
215 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
216 minstalldir /usr/$(mlibdir)/pkgconfig || die
217 minstalldir /usr/share/applications || die
218
219 # install binaries
220 cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \
221 ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die
222
223 # fix permissions
224 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
225
226 # bins
227 mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die
228
229 # environment
230 # mozilla-1.7* uses already the env var mozilla_five_home
231 # firefox does not need this, the env var is only to compile
232 # mozilla-based sources
233 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
234 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
235
236 # not on alx
237 # # necessary includes and idl files to build against firefox
238 # cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die
239 # cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die
240 # # symlink to a missing header
241 # mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \
242 # /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die
243 # # pkgconfig files
244 # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die
245
246 # install icons
247 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \
248 /usr/$(mlibdir)/mozilla-firefox/icons || die
249 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \
250 /usr/$(mlibdir)/mozilla-firefox/icons || die
251
252 # menu entries
253 minstallpixmap firefox.png || die
254 minstallfile -s firefox.desktop /usr/share/applications || die
255
256 # now move all plugins to /usr/lib/nsbrowser/plugins
257 # and symlink them (we need a defined location for the plugins of all browsers)
258 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \
259 ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
260 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
261 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
262 }
263
264 preinstall()
265 {
266 if [[ -n $(magequery -n mozilla) ]]
267 then
268 echo
269 echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files"
270 echo "and both packages cannot coexist anymore."
271 echo "net-www/mozilla has no official support from mozilla.com"
272 echo "and will not included in future releases of magellan-linux."
273 echo
274 die "Please uninstall net-www/mozilla first!"
275 fi
276 }
277
278 postinstall()
279 {
280 # update environment; needed for REGXPCOM
281 env-rebuild
282 source ${MROOT}/etc/profile
283
284 # firefoxs mozilla_five_home
285 export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox"
286
287 # register firefox
288 echo "Registering Components and Chrome..."
289
290 HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom
291 # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome
292
293 # fix permissions of component registry
294 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
295
296 # fix directory permissions
297 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
298
299 # fix permissions on chrome files
300 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
301 }

Properties

Name Value
svn:keywords Id