blob: f68c42a4eb89f9d1202d9e146443c0ac8fca98ec (
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
|
# $NetBSD: Makefile,v 1.16 2008/12/22 15:00:01 joerg Exp $
MOZILLA= firefox3 # allow coexisting with firefox2
COMMENT= Lightweight gecko-based web browser
PKG_DESTDIR_SUPPORT= user-destdir
MOZILLA_USE_GTK2= # yes
MOZILLA_USE_XFT= YES
INSTALLATION_DIRS= lib/pkgconfig share/applications share/pixmaps
CHECK_PORTABILITY_SKIP= security/nss/tests/libpkix/libpkix.sh
BUILDLINK_API_DEPENDS.cairo+= cairo>=1.6.4
PYTHON_FOR_BUILD_ONLY= yes
.include "../../lang/python/application.mk"
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
# Pull in standard firefox build framework, and override some things below
.include "../../www/firefox/Makefile-firefox.common"
MAINTAINER= tnn@NetBSD.org
MOZ_VER= 3.0.5
PKGREVISION= 2
XPTCFILES:= ${XPTCFILES:C,^,../../firefox3/files/,}
DESCR_SRC= ${.CURDIR}/../../www/firefox/DESCR
DISTINFO_FILE= ${.CURDIR}/../../www/firefox3/distinfo
PATCHDIR= ${.CURDIR}/../../www/firefox3/patches
post-extract: copy-pkgconfig
.PHONY: copy-pkgconfig
copy-pkgconfig:
cp ${.CURDIR}/../../www/firefox3/files/*.pc ${WRKSRC:Q}/build/unix
SUBST_CLASSES+= fix-pc
SUBST_STAGE.fix-pc= pre-configure
SUBST_MESSAGE.fix-pc= Substituting prefix in pkg-config files.
SUBST_FILES.fix-pc+= build/unix/*.pc
SUBST_SED.fix-pc= -e 's,@PREFIX@,${PREFIX},g'
# Need this to be able to reuse existing firefox pkgsrc infrastructure
pre-configure: create-dummy-c-sdk
.PHONY: create-dummy-c-sdk
create-dummy-c-sdk:
mkdir -p ${WRKSRC:Q}/directory/c-sdk
touch ${WRKSRC:Q}/directory/c-sdk/configure.in
# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
pre-configure: ye-olde-rm-hack
.PHONY: ye-olde-rm-hack
ye-olde-rm-hack:
printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
${WRAPPER_DIR}/bin/rm
chmod +x ${WRAPPER_DIR}/bin/rm
# Link browser.xpt
post-build: stage-package
.PHONY: stage-package
stage-package:
cd ${WRKSRC}/browser/installer && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} stage-package
cp ${WRKSRC}/dist/firefox/components/browser.xpt \
${WRKSRC}/dist/bin/components/browser.xpt
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
PLIST_SUBST+= JEMALLOC=
SCRIPTS_ENV+= JEMALLOC=
post-install: install-libjemalloc install-desktop
.PHONY: install-libjemalloc
install-libjemalloc:
${INSTALL_LIB} ${WRKSRC}/dist/lib/libjemalloc.${SO_SUFFIX} \
${DESTDIR}${PREFIX}/lib/${MOZILLA}/libjemalloc.${SO_SUFFIX}
.else
post-install: install-desktop
PLIST_SUBST+= JEMALLOC="@comment "
SCRIPTS_ENV+= JEMALLOC="@comment "
.endif
.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
MOZILLA_NAME= Firefox 3
MOZILLA_ICON= ${WRKSRC}/other-licenses/branding/firefox/default48.png
.else
MOZILLA_NAME= Minefield 3
MOZILLA_ICON= ${WRKSRC}/browser/branding/unofficial/default48.png
.endif
install-desktop:
${SED} \
-e 's|@MOZILLA@|${MOZILLA}|g' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
-e 's|@FIREFOX_ICON@|${MOZILLA}.png|g' \
<${.CURDIR}/../../www/firefox3/files/${MOZILLA}.desktop.in \
>${WRKDIR}/${MOZILLA}.desktop
${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop \
${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
${INSTALL_DATA} ${MOZILLA_ICON} \
${DESTDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png
INSTALLATION_DIRS+= lib/${MOZILLA}/modules
# Can't use system PNG because it doesn't have APNG support?
CONFIGURE_ARGS+= --without-system-png
# Override www/firefox's idea of toolkit
CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
# Is dbus support useful for anything?
CONFIGURE_ARGS+= --disable-dbus
# Avoids needing curl on Linux
CONFIGURE_ARGS+= --disable-crashreporter
CONFIGURE_ARGS+= --enable-system-sqlite
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
|