blob: 2c6882aa882ee10b17b1d3c30812197a419b1af6 (
plain)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
# $NetBSD: Makefile.common,v 1.28 2005/06/17 03:50:41 jlam Exp $
DISTNAME= # see Makefile.${OPSYS}.${ARCH}
PKGNAME= ${MOZILLA}${MOZ_EXTRA}-bin-${MOZ_VER}
CATEGORIES= www
MAINTAINER= grant@NetBSD.org
HOMEPAGE?= http://www.mozilla.org/
WRKSRC?= ${WRKDIR}/${MOZILLA}
NO_CONFIGURE= # defined
USE_LANGUAGES= # empty
FILESDIR= ${.CURDIR}/../../www/mozilla-bin/files
MOZILLA_SCRIPT?= ${FILESDIR}/mozilla.sh
USE_PKGINSTALL= YES
.include "../../mk/bsd.prefs.mk"
# everything specific to your OS/Arch goes into its own Makefile
# group together i386, i486, i586 and i686 (for Linux)
ARCH=${MACHINE_ARCH:C/i[3-6]86/i386/g}
.if exists(${.CURDIR}/Makefile.${OPSYS}.${ARCH})
. include "${.CURDIR}/Makefile.${OPSYS}.${ARCH}"
.endif
.if ${MOZILLA} == "mozilla"
MOZILLA_SHORT= ${MOZILLA}
MOZ_DIR= mozilla${MOZ_VER}
.else
MOZILLA_SHORT= ${MOZILLA}
MOZ_DIR= ${MOZ_VER}
.endif
.if !defined(MASTER_SITES)
_MASTER_SITES+= http://ftp.mozilla.org/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
_MASTER_SITES+= ftp://ftp.mozilla.org/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
_MASTER_SITES+= http://public.planetmirror.com.au/pub/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
_MASTER_SITES+= ftp://public.planetmirror.com.au/pub/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
_MASTER_SITES+= ftp://ftp.tuwien.ac.at/infosys/browsers/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
_MASTER_SITES+= ftp://ftp.fu-berlin.de/unix/network/www/${MOZILLA_SHORT}/releases/${MOZ_DIR}/
. for _site_ in ${_MASTER_SITES}
MASTER_SITES+= ${_site_}
MASTER_SITES+= ${_site_}contrib/
. endfor
.endif
MOZILLA_LIB= ${PREFIX}/lib/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
FILES_SUBST+= MOZILLA=${MOZILLA}
FILES_SUBST+= MOZ_EXTRA=${MOZ_EXTRA}
FILES_SUBST+= MOZ_PLATFORM=${MOZ_PLATFORM}
MESSAGE_SUBST+= PKGBASE=${PKGBASE}
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
# protect against MOZ_PLATFORM being undefined so we don't bomb, but
# instead use the result of ONLY_FOR_PLATFORM.
.if defined(MOZ_PLATFORM)
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
MESSAGE_SRC+= ${.CURDIR}/../../www/mozilla-bin/MESSAGE.compat_linux
. endif
# Linux builds on NetBSD
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
. include "../../emulators/suse_linux/Makefile.application"
. elif ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "netbsd"
# we need libstdc++.so.4 on -current.
. if !exists(/usr/lib/libstdc++.so.4)
DEPENDS+= compat16>=1.6.0:../../emulators/compat16
_COMPAT16_LIBSTDCXX= YES
. endif
. endif
# GTK2 builds.
. if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "netbsd"
DEPENDS+= gtk2+>=2.4:../../x11/gtk2
. elif ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
DEPENDS+= suse_x11>=9.1:../../emulators/${SUSE_DIR_PREFIX}_x11
DEPENDS+= suse_gtk2>=9.1:../../emulators/suse91_gtk2
DEPENDS+= suse_locale>=9.1:../../emulators/suse91_locale
. else
DEPENDS+= gtk2+>=2.2:../../x11/gtk2
. endif
. elif ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
DEPENDS+= suse_compat>=7.3:../../emulators/${SUSE_DIR_PREFIX}_compat
DEPENDS+= suse_x11>=7.3:../../emulators/${SUSE_DIR_PREFIX}_x11
DEPENDS+= suse_gtk>=7.3:../../emulators/${SUSE_DIR_PREFIX}_gtk
. else
# default to at least gtk-1.2.
DEPENDS+= gtk+>=1.2:../../x11/gtk
. endif
.endif # defined(MOZ_PLATFORM)
INSTALLATION_DIRS= bin
# we don't want libnullplugin.
post-extract:
@${RM} -f ${WRKSRC}/plugins/libnullplugin.so
do-build:
post-build:
@${SED} ${FILES_SUBST_SED} ${MOZILLA_SCRIPT} > ${WRKDIR}/${MOZILLA}.sh
do-install:
${INSTALL_DATA_DIR} ${MOZILLA_LIB}
cd ${WRKSRC} && ${PAX} -rw -pm . ${MOZILLA_LIB}
${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA}.sh ${PREFIX}/bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
@${FIND} ${MOZILLA_LIB} -type f -print \
| ${XARGS} ${CHMOD} a+r
@${FIND} ${MOZILLA_LIB} \( -type f -o -perm -u+x \) -print \
| ${XARGS} ${CHMOD} a+rx
@${FIND} ${MOZILLA_LIB} -type d -print \
| ${XARGS} ${CHMOD} a+rx
# builds typically want exactly 'libgtk-1.2.so.0', etc. symlink them
# into the mozilla directory.
post-install:
.if ${OPSYS} != "NetBSD"
. if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
@cd ${MOZILLA_LIB} && \
${LN} -s ${PREFIX}/lib/libatk-1.0.*so* .; \
${LN} -s ${X11PREFIX}/lib/libgdk-x11-2.0.*so* .; \
${LN} -s ${PREFIX}/lib/libgdk_pixbuf-2.0.*so* .; \
${LN} -s ${PREFIX}/lib/libglib-2.0.*so* .; \
${LN} -s ${PREFIX}/lib/libgmodule-2.0.*so* .; \
${LN} -s ${PREFIX}/lib/libgobject-2.0.*so* .; \
${LN} -s ${X11PREFIX}/lib/libgtk-x11-2.0.*so* .; \
${LN} -s ${PREFIX}/lib/libpango-1.0.*so* .; \
${LN} -s ${PREFIX}/lib/libpangox-1.0.*so* .; \
${LN} -s ${PREFIX}/lib/libpangoxft-1.0.*so* .; \
\
${LN} -s libatk-1.0.so libatk-1.0.so.0; \
${LN} -s libgdk-x11-2.0.so libgdk-x11-2.0.so.0; \
${LN} -s libgdk_pixbuf-2.0.so libgdk_pixbuf-2.0.so.0; \
${LN} -s libglib-2.0.so libglib-2.0.so.0; \
${LN} -s libgmodule-2.0.so libgmodule-2.0.so.0; \
${LN} -s libgobject-2.0.so libgobject-2.0.so.0; \
${LN} -s libgtk-x11-2.0.so libgtk-x11-2.0.so.0; \
${LN} -s libpango-1.0.so libpango-1.0.so.0; \
${LN} -s libpangox-1.0.so libpangox-1.0.so.0; \
${LN} -s libpangoxft-1.0.so libpangoxft-1.0.so.0
. else
@cd ${MOZILLA_LIB} && \
${LN} -s ${PREFIX}/lib/libglib.*so* .; \
${LN} -s ${PREFIX}/lib/libgmodule.*so* .; \
${LN} -s ${X11PREFIX}/lib/libgdk.*so* .; \
${LN} -s ${X11PREFIX}/lib/libgtk.*so* .; \
${LN} -s libgtk.so libgtk-1.2.so.0; \
${LN} -s libgdk.so libgdk-1.2.so.0; \
${LN} -s libglib.so libglib-1.2.so.0; \
${LN} -s libgmodule.so libgmodule-1.2.so.0
. endif
.endif
.if defined(_COMPAT16_LIBSTDCXX) && ${_COMPAT16_LIBSTDCXX} == "YES"
@cd ${MOZILLA_LIB} && \
${LN} -s ${PREFIX}/emul/netbsd16/usr/lib/libstdc++.so* .
.endif
@${INSTALL_DATA_DIR} ${PREFIX}/lib/mozilla-linux/plugins
@${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
@${ECHO} bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM} >> ${PLIST_SRC}
@${FIND} ${MOZILLA_LIB} \( -type f -o -type l \) -print \
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
>> ${PLIST_SRC}
@${FIND} ${MOZILLA_LIB} -type d -print \
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
>> ${PLIST_SRC}
@${ECHO} @exec ${MKDIR} %D/lib/mozilla-linux/plugins >> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"
|