summaryrefslogtreecommitdiff
path: root/misc/openoffice3/options.mk
blob: 2f614f47b83a255e9900e7ab2d04c35ff772b3d9 (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
# $NetBSD: options.mk,v 1.6 2008/10/20 14:26:22 hira Exp $

PKG_OPTIONS_VAR=		PKG_OPTIONS.openoffice3
PKG_SUPPORTED_OPTIONS=		cups gnome gtk2 java kde ooo-external-libwpd
PKG_OPTIONS_OPTIONAL_GROUPS=	browser
PKG_OPTIONS_GROUP.browser=	firefox firefox3 seamonkey
# The list from completelangiso in solenv/inc/postset.mk.
OO_SUPPORTED_LANGUAGES=		af ar as-IN be-BY bg br bn bn-BD bn-IN bs ca \
				cs cy da de dz el en-GB en-US en-ZA eo es et \
				eu fa fi fr ga gl gu-IN he hi-IN hr hu it ja \
				ka km kn ko ku lo lt lv mk ms ml-IN mr-IN ne \
				nb nl nn nr ns oc or-IN pa-IN pl pt pt-BR ru \
				rw sk sl sh sr ss st sv sw sw-TZ te-IN ti-ER \
				ta-IN th tn tr ts tg ur-IN uk uz ve vi xh    \
				zh-CN zh-TW zu
.for l in ${OO_SUPPORTED_LANGUAGES}
PKG_SUPPORTED_OPTIONS+=		lang-${l}
.endfor
PKG_SUGGESTED_OPTIONS=		firefox gtk2 lang-en-US
PKG_OPTIONS_LEGACY_OPTS+=	gnome-vfs:gnome

.include "../../mk/bsd.options.mk"
.include "../../mk/bsd.prefs.mk"

.for l in ${PKG_OPTIONS:Mlang-*}
OO_LANGS+=	${l:S/^lang-//1}
.endfor
OO_LANGS?=	en-US

.if !empty(PKG_OPTIONS:Mfirefox)
CONFIGURE_ARGS+=	--with-system-mozilla=firefox
.include "../../www/firefox/buildlink3.mk"
.elif !empty(PKG_OPTIONS:Mfirefox3)
CONFIGURE_ARGS+=	--with-system-mozilla=firefox3
.include "../../www/firefox3/buildlink3.mk"
.elif !empty(PKG_OPTIONS:Mseamonkey)
CONFIGURE_ARGS+=	--with-system-mozilla=seamonkey
.include "../../www/seamonkey/buildlink3.mk"
# The following browsers do not install *.pc files.
#.elif !empty(PKG_OPTIONS:Mfirefox-gtk1)
#CONFIGURE_ARGS+=	--with-system-mozilla=firefox
#.include "../../www/firefox-gtk1/buildlink3.mk"
#.elif !empty(PKG_OPTIONS:Mseamonkey-gtk1)
#CONFIGURE_ARGS+=	--with-system-mozilla=seamonkey
#.include "../../www/seamonkey-gtk1/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-mozilla
.endif

.if !empty(PKG_OPTIONS:Mooo-external-libwpd)
CONFIGURE_ARGS+=	--with-system-libwpd
.include "../../converters/libwpd/buildlink3.mk"
.endif

.if !empty(PKG_OPTIONS:Mcups)
CONFIGURE_ARGS+=	--enable-cups
.include "../../print/cups/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-cups
.endif

.if !empty(PKG_OPTIONS:Mgnome)
CONFIGURE_ARGS+=	--enable-gnome-vfs --enable-evolution2
.include "../../devel/GConf/buildlink3.mk"
.include "../../devel/libbonobo/buildlink3.mk"
.include "../../sysutils/gnome-vfs/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-gnome-vfs --disable-evolution2
.endif

PLIST_VARS+=		gtk2
.if !empty(PKG_OPTIONS:Mgtk2)
PLIST.gtk2=		yes
CONFIGURE_ARGS+=	--enable-gtk
.include "../../x11/gtk2/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-gtk
.endif

.if !empty(PKG_OPTIONS:Mjava)
USE_JAVA2=		yes
DEPENDS+=		apache-ant>=1.7.0:../../devel/apache-ant
CONFIGURE_ARGS+=	--with-java --disable-mediawiki

# -rpath are missing from wip/jdk15.
JAVA_LIB_ROOT=	${PKG_JAVA_HOME}/jre/lib/${MACHINE_ARCH}
LIB.jawt=	-L${JAVA_LIB_ROOT} ${COMPILER_RPATH_FLAG}${JAVA_LIB_ROOT}
LIB.mawt=	${COMPILER_RPATH_FLAG}${JAVA_LIB_ROOT}/xawt

CONFIGURE_ENV+=	LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JAVA_LIB_ROOT}:${JAVA_LIB_ROOT}/xawt"

# XXX: devel/apache-ant doesn't setup ${PREFIX}/bin/java.
CONFIGURE_ENV+=		JAVACMD="${PKG_JAVA_HOME}/bin/java"
MAKE_ENV+=		JAVACMD="${PKG_JAVA_HOME}/bin/java"

# XXX
LIB.awtlib=	-L${JAVA_LIB_ROOT} ${COMPILER_RPATH_FLAG}${JAVA_LIB_ROOT}

.include "../../mk/java-env.mk"
.include "../../mk/java-vm.mk"
.else
CONFIGURE_ARGS+=	--without-java
PKG_JAVA_HOME=
LIB.jawt=
LIB.mawt=
LIB.awtlib=
.endif

SUBST_CLASSES+=		java
SUBST_STAGE.java=	post-patch
SUBST_MESSAGE.java=	Adding JAVA_HOME
SUBST_FILES.java=	desktop/scripts/soffice.sh
SUBST_SED.java+=	-e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g'
SUBST_SED.lib+=		-e 's|@LIB_jawt@|${LIB.jawt}|g'
SUBST_SED.lib+=		-e 's|@LIB_mawt@|${LIB.mawt}|g'
SUBST_SED.lib+=		-e 's|@LIB_awtlib@|${LIB.awtlib}|g'

.if !empty(PKG_OPTIONS:Mkde)
CONFIGURE_ENV+=		KDEDIR=${BUILDLINK_PREFIX.kdelibs:Q}
CONFIGURE_ARGS+=	--enable-kde --enable-kdeab
.include "../../x11/kdelibs3/buildlink3.mk"
.else
CONFIGURE_ARGS+=	--disable-kde --disable-kdeab
.endif