summaryrefslogtreecommitdiff
path: root/www/mozilla/Makefile.common
blob: ffb87868cf10805183683f8caf59d6e31f22ea58 (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
# $NetBSD: Makefile.common,v 1.11 2003/03/14 19:38:02 jlam Exp $

MOZ_DIST_VER?=	${MOZ_VER}
DISTNAME?=	mozilla-source-${MOZ_DIST_VER}
PKGNAME=	${MOZILLA}-${MOZ_VER}
MASTER_SITES?=	${MASTER_SITE_MOZILLA:=mozilla${MOZ_DIST_VER}/src/}
CATEGORIES=	www

MAINTAINER=	taya@netbsd.org
HOMEPAGE?=	http://www.mozilla.org/

WRKSRC=		${WRKDIR}/mozilla
FILESDIR=	"../../www/mozilla/files"

BUILD_DEPENDS+=	zip>=2.3:../../archivers/zip

USE_BUILDLINK2=	yes
USE_PERL5=	build
USE_GMAKE=	yes
USE_X11BASE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS+= --disable-tests \
		--disable-debug \
		--with-system-jpeg=${BUILDLINK_PREFIX.jpeg} \
		--with-system-png=${BUILDLINK_PREFIX.png} \
		--enable-mathml \
		--enable-crypto

SHAREMODE?=	644
ALL_TARGET=	# empty

AUTOCONF_REQD= 2.13

UNLIMIT_RESOURCES=	datasize memorysize stacksize

.include	"../../graphics/freetype2/buildlink2.mk"
.include	"../../graphics/gdk-pixbuf/buildlink2.mk"
.include	"../../graphics/jpeg/buildlink2.mk"
.include	"../../graphics/png/buildlink2.mk"
.include	"../../net/ORBit/buildlink2.mk"
.include	"../../x11/gtk/buildlink2.mk"

# NetBSD-*-m68k builds, but "regchrome" dumps core.
NOT_FOR_PLATFORM=	NetBSD-1.4.*-* NetBSD-*-m68k

MOZ_LIBDIR=	${PREFIX}/lib/${MOZILLA}
MAKE_ENV+=	LIBRUNPATH=${MOZ_LIBDIR}
CONFIGURE_ENV+=	LIBRUNPATH=${MOZ_LIBDIR}
LDFLAGS+=	-Wl,${RPATH_FLAG}${MOZ_LIBDIR}

.ifdef BUILD_SVG
MAKE_ENV+=		MOZ_INTERNAL_LIBART_LGPL=1
CONFIGURE_ENV+=		MOZ_INTERNAL_LIBART_LGPL=1
CONFIGURE_ARGS+=	--enable-svg
.endif

# avoid creating a .mozilla directory in the users home
# directory
SCRIPTS_ENV+=	HOME="${WRKDIR}"

PLIST_SUBST+=	MOZILLA=${MOZILLA}
PLIST_SUBST+=	MOZILLA_BIN=${MOZILLA_BIN}
.if ${OBJECT_FMT} == "ELF"
SO_SUFFIX=	so
.else
SO_SUFFIX=	so.1.0
.endif
PLIST_SUBST+=	SO_SUFFIX=${SO_SUFFIX}

SCRIPTS_ENV+=	OBJECT_FMT=${OBJECT_FMT:Q}
SCRIPTS_ENV+=	PLIST_SRC=${PLIST_SRC:Q}
SCRIPTS_ENV+=	SED=${SED:Q}
SCRIPTS_ENV+=	RM=${RM:Q}
SCRIPTS_ENV+=	EGREP=${EGREP:Q}
SCRIPTS_ENV+=	CHOWN=${CHOWN:Q}
SCRIPTS_ENV+=	CHGRP=${CHGRP:Q}
SCRIPTS_ENV+=	CHMOD=${CHMOD:Q}
SCRIPTS_ENV+=	BINOWN=${BINOWN:Q}
SCRIPTS_ENV+=	BINGRP=${BINGRP:Q}
SCRIPTS_ENV+=	BINMODE=${BINMODE:Q}
SCRIPTS_ENV+=	SETENV=${SETENV:Q}
SCRIPTS_ENV+=   MOZILLA=${MOZILLA:Q}
SCRIPTS_ENV+=   MOZILLA_BIN=${MOZILLA_BIN:Q}
SCRIPTS_ENV+=	SO_SUFFIX=${SO_SUFFIX:Q}

PTHREAD_OPTS+=	native optional

COPTS?=			-O2
CONFIGURE_ARGS+=	--enable-optimize=${COPTS:Q}

XPTCFILES+=	xptcinvoke_asm_sparc64_netbsd.s xptcstubs_asm_sparc64_netbsd.s
XPTCFILES+=	xptcinvoke_sparc64_netbsd.cpp xptcstubs_sparc64_netbsd.cpp

post-extract:
.for F in ${XPTCFILES}
	${CP} ${FILESDIR}/${F} ${WRKSRC}/xpcom/reflect/xptcall/src/md/unix/${F}
.endfor

pre-configure:
	cd ${WRKSRC} && ${AUTOCONF}
	cd ${WRKSRC}/nsprpub && ${AUTOCONF}

post-build:
	${ECHO} skin,install,select,classic/1.0 >> ${WRKSRC}/dist/bin/chrome/installed-chrome.txt
	${ECHO} locale,install,select,en-US >> ${WRKSRC}/dist/bin/chrome/installed-chrome.txt

do-install:
	${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/moz-install

.include "../../mk/pthread.buildlink2.mk"

.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "none")
CONFIGURE_ARGS+= --without-pthreads
.else
CONFIGURE_ARGS+= --with-pthreads
.endif

.if ${MOZILLA_USE_XFT} == "YES"
CONFIGURE_ARGS+=	--enable-xft
# pkgconfig defaults to a "build" dependancy, which is what we want.
.include "../../devel/pkgconfig/buildlink2.mk"
.include "../../fonts/Xft2/buildlink2.mk"
.endif

.include "../../mk/autoconf.mk"
.include "../../mk/bsd.pkg.mk"