blob: 92438125566fcd2f171e9f0fa84568246d0d3524 (
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
|
# $NetBSD: Makefile.common,v 1.2 2004/01/04 05:06:19 grant Exp $
#
DISTNAME= # see Makefile.${OPSYS}.${ARCH}
PKGNAME= ${MOZILLA}${MOZ_EXTRA}-bin-${MOZ_VER}
WRKSRC= ${WRKDIR}/${MOZILLA}
CATEGORIES= www
.if ${MOZILLA} == "MozillaFirebird"
MOZILLA_SHORT= firebird
.else
MOZILLA_SHORT= ${MOZILLA}
.endif
MASTER_SITES?= http://ftp.mozilla.org/pub/${MOZILLA_SHORT}/releases/${MOZ_VER}/${MOZ_CONTRIB} \
ftp://ftp.mozilla.org/pub/${MOZILLA_SHORT}/releases/${MOZ_VER}/${MOZ_CONTRIB} \
http://public.planetmirror.com.au/pub/${MOZILLA_SHORT}/releases/${MOZ_VER}/${MOZ_CONTRIB} \
ftp://public.planetmirror.com.au/pub/${MOZILLA_SHORT}/releases/${MOZ_VER}/${MOZ_CONTRIB}
MAINTAINER= grant@NetBSD.org
HOMEPAGE?= http://www.mozilla.org/
NO_CONFIGURE= # defined
FILESDIR= ${.CURDIR}/../../www/mozilla-bin/files
USE_PKGINSTALL= YES
.include "../../mk/bsd.prefs.mk"
# everything specific to your OS/Arch goes into it's 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
# suffix gtk2 builds with -gtk2
MOZ_EXTRA= # empty
.if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
MOZ_EXTRA?= -gtk2
.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}
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
# non-linux builds are "unofficial" and in contrib/
MOZ_CONTRIB= # empty
. if defined(MOZ_PLATFORM) && ${MOZ_PLATFORM} != "linux"
MOZ_CONTRIB= contrib/
. endif
# Linux builds on NetBSD
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
. include "../../emulators/suse_linux/Makefile.application"
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
CONFLICTS+= suse_libc5-[0-9]*
# NetBSD native builds are built with gtk-1.2.10nb5.
. elif ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "netbsd"
DEPENDS+= gtk+>=1.2.10nb5:../../x11/gtk
# 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
. else
# gtk2 builds.
. if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
DEPENDS+= gtk+>=2.2:../../x11/gtk2
. else
# default to at least gtk-1.2.
DEPENDS+= gtk+>=1.2:../../x11/gtk
. endif
. endif
.endif # defined(MOZ_PLATFORM)
# we don't want libnullplugin.
post-extract:
@${RM} -f ${WRKSRC}/plugins/libnullplugin.so
do-build:
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mozilla.sh > ${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
@${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
@${ECHO} bin/${MOZILLA}-${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}
.include "../../mk/bsd.pkg.mk"
|