1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-0.9.6.ebuild,v 1.4 2001/11/23 04:45:07 azarah Exp $
S=${WORKDIR}/mozilla
DESCRIPTION="The Mozilla web browser"
SRC_URI="ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla${PV}/src/${PN}-source-${PV}.tar.bz2"
HOMEPAGE="http://www.mozilla.org"
PROVIDE="virtual/x11-web-browser"
RDEPEND=">=gnome-base/ORBit-0.5.10-r1
>=dev-libs/glib-1.2.10
>=x11-libs/gtk+-1.2.10-r4
>=media-libs/jpeg-6b
>=media-libs/libpng-1.0.9
app-arch/zip
app-arch/unzip
mozqt? ( x11-libs/qt-x11 )"
DEPEND="${RDEPEND}
sys-devel/perl"
# needed by src_compile() and src_install()
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
src_compile() {
chown -R root.root *
if [ "`use mozqt`" ] ; then
myconf="--with-qt --enable-toolkit=qt --without-gtk"
else
myconf="--with-gtk --enable-toolkit=gtk"
fi
if [ -z "$DEBUG" ] ; then
myconf="${myconf} --enable-strip-libs"
fi
# If this dont build with mozirc in USE, then you are on your own
# Dont enable venkman, etc, without use flags, as build fails
# with them sometimes (same as with irc) ...
if [ "`use mozirc`" ] ; then
myconf="${myconf} --with-extensions=default,irc"
else
myconf="${myconf} --with-extensions=default"
fi
export BUILD_MODULES=all
./configure --host=${CHOST} \
--prefix=/usr/lib/mozilla \
--disable-tests \
--disable-debug \
--disable-dtd-debug \
--disable-pedantic \
--enable-xsl \
--enable-crypto \
--enable-detect-webshell-leaks \
--with-java-supplement \
--with-extensions=default \
--enable-optimize=-O3 \
--with-default-mozilla-five-home=/usr/lib/mozilla \
${myconf} || die
make depend || die
make || die
}
src_install() {
dodir /usr/lib/mozilla/include
cd ${S}/dist/include
cp -LfR * ${D}/usr/lib/mozilla/include
# rm ${D}/usr/lib/mozilla/include/*.h
# cd ${S}/include
# cp -f *.h ${D}/usr/lib/mozilla/include
# cp -f nspr/*.h ${D}/usr/lib/mozilla/include/nspr
# cp -f nspr/obsolete/*.h ${D}/usr/lib/mozilla/include/nspr/obsolete
# cp -f nspr/private/*.h ${D}/usr/lib/mozilla/include/nspr/private
# cp -f nspr/md/*.cfg ${D}/usr/lib/mozilla/include/nspr/md
cd ${S}/xpinstall/packager
make || die
dodir /usr/lib
tar xzf ${S}/dist/mozilla-`uname -m`-pc-linux-gnu.tar.gz \
-C ${D}/usr/lib
# mv ${D}/usr/lib/package ${D}/usr/lib/mozilla
exeinto /usr/bin
doexe ${FILESDIR}/mozilla
insinto /etc/env.d
doins ${FILESDIR}/10mozilla
dodoc LEGAL LICENSE README/mozilla/README*
# Take care of non root execution
# (seems the problem is that not all files are readible by the user)
chmod -R g+r,o+r ${D}/usr/lib/mozilla
# Install icon and .desktop for menu entry
if [ "`use gnome`" ] ; then
insinto /usr/share/pixmaps
doins ${S}/build/package/rpm/SOURCES/mozilla-icon.png
insinto /usr/share/gnome/apps/Internet
doins ${S}/build/package/rpm/SOURCES/mozilla.desktop
fi
# Fix to get it removed at unmerge
touch ${D}/usr/lib/mozilla/component.reg
}
pkg_postinst () {
# Take care of component registration
export MOZILLA_FIVE_HOME="/usr/lib/mozilla"
# Needed to update the run time bindings for REGXPCOM
# (do not remove next line!)
env-update
# Register components, setup Chrome .rdf files and fix file permissions
/usr/lib/mozilla/regxpcom
chmod g+r,o+r /usr/lib/mozilla/component.reg
/usr/lib/mozilla/regchrome
find /usr/lib/mozilla -type d -perm 0700 -exec chmod 755 {} \; || :
echo
echo "*****************************************************************"
echo "* NB: Please unmerge old versions prior to 0.9.5 as the header *"
echo "* layout in /usr/lib/mozilla/include have changed and will *"
echo "* result in compile errors when compiling programs that need *"
echo "* mozilla headers and libs (galeon, nautilus, ...) *"
echo "*****************************************************************"
echo
}
|