summaryrefslogtreecommitdiff
path: root/misc/openoffice/Makefile
blob: e98acc08700321c98200cb8313721be60c9a8f1d (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
# $NetBSD: Makefile,v 1.58 2005/01/06 16:27:06 wiz Exp $

DISTNAME=		openoffice-1.1.4
CATEGORIES=		misc
MASTER_SITES=		${MASTER_SITE_OPENOFFICE:=stable/1.1.4/}
DISTFILES=		OOo_1.1.4_source.tar.gz
DISTFILES+=		gpc231.tar.Z
DISTFILES+=		ooo_addons_114.tar.bz2
SITES_gpc231.tar.Z= 	ftp://ftp.cs.man.ac.uk/pub/toby/gpc/
SITES_ooo_addons_114.tar.bz2=http://www.fs.tum.de/~mrauch/OpenOffice/download/\
			ftp://ftp.NetBSD.org/pub/NetBSD/misc/mrauch/
DIST_SUBDIR=		${PKGNAME_NOREV}

MAINTAINER=		mrauch@NetBSD.org
HOMEPAGE=		http://www.openoffice.org/
COMMENT=		Integrated office productivity suite

BUILD_DEPENDS+=		bison-[0-9]*:../../devel/bison
BUILD_DEPENDS+=		{standalone-tcsh,tcsh}-[0-9]*:../../shells/tcsh
BUILD_DEPENDS+=		zip-[0-9]*:../../archivers/zip
BUILD_DEPENDS+=		unzip-[0-9]*:../../archivers/unzip

WRKSRC=			${WRKDIR}/config_office
USE_BUILDLINK3=		yes
GCC_REQD=		3.0
USE_LANGUAGES+=		c c++

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

USE_X11=		# defined
USE_GNU_TOOLS+=		make
USE_PERL5=		build
PTHREAD_OPTS+=		require
PTHREAD_AUTO_VARS=	yes

CONFLICTS+=		staroffice-[0-9]*
CONFLICTS+=		openoffice-linux-[0-9]*

ONLY_FOR_PLATFORM=	NetBSD-1.6Z[G-Z]*-i386 NetBSD-[2-9]*-i386

GNU_CONFIGURE=		yes
CONFIGURE_ARGS+= 	--enable-mozilla --disable-java
CONFIGURE_ARGS+= 	--with-lang="AFRIK","ARAB","BASQUE","CHINSIM","CHINTRAD","CZECH","DAN","DTCH","ENUS","ESTONIAN","FINN","FREN","GAL","GREEK","HEBREW","HUNG","ITAL","JAPN","KOREAN","LITHUANIAN","NORBOK","NORNYN","NSOTHO","POL","PORT","PORTBR","RUSS","SLOVAK","SLOVENIAN","SPAN","SWED","TURK","WELSH","ZULU"
CONFIGURE_ARGS+=	--with-dict=ALL

TEMP?=			${WRKSRC}
UNLIMIT_RESOURCES+=	datasize

PLIST_SRC+=		PLIST.common
PLIST_SUBST+=		OPENOFFICE_DLLSUFFIX=${OPENOFFICE_DLLSUFFIX}
PLIST_SUBST+=		OPENOFFICE_VERSION=${OPENOFFICE_VERSION}
.if exists(${PKGDIR}/PLIST.${OPSYS})
PLIST_SRC+=             ${PKGDIR}/PLIST.${OPSYS}
. endif
MESSAGE_SUBST+=		OPENOFFICE_VERSION=${OPENOFFICE_VERSION}

OPENOFFICE_VERSION=	OpenOffice.org1.1.4

post-extract:
# bring the two files from GPC into place
	${CP} ${WRKDIR}/gpc231/gpc.c ${WRKSRC}/../external/gpc/
	${CP} ${WRKDIR}/gpc231/gpc.h ${WRKSRC}/../external/gpc/
# bring the NetBSD mozilla zip files into place
	${CP} ${WRKDIR}/moz/*.zip ${WRKSRC}/../moz/zipped/
	${CP} ${WRKDIR}/openintro_pkgsrc.bmp 				\
		${WRKSRC}/../offmgr/res/openintro.bmp
# bring the localized helpcontent into place
	${MKDIR} ${WRKSRC}/../helpcontent/${OPENOFFICE_OUTPATH}.pro/bin
	-${CP} ${WRKDIR}/*.zip ${WRKSRC}/../helpcontent/${OPENOFFICE_OUTPATH}.pro/bin/

do-build:
	${_ULIMIT_CMD} tcsh -c "setenv PTHREAD_DIAGASSERT Ael && cd ${WRKSRC}/.. && ./bootstrap && source ${OPENOFFICE_SETFILE}Env.Set && dmake"

post-build:
	@${ECHO_MSG} "Please ignore the warning above that the project gtk"
	@${ECHO_MSG} "could not be found. Your build completed successfully."

pre-install:
	${CP} ${WRKSRC}/../instsetoo/${OPENOFFICE_OUTPATH}.pro/${OPENOFFICE_LANGCODE}/normal/setup.ins 	\
		${WRKSRC}/../instsetoo/${OPENOFFICE_OUTPATH}.pro/${OPENOFFICE_LANGCODE}/normal/setup.ins.orig
	${SED}  -e "s|/usr/bin/soffice|${PREFIX}/bin/soffice.orig|g"	\
		-e "s|/usr/lib||g"					\
		<${WRKSRC}/../instsetoo/${OPENOFFICE_OUTPATH}.pro/${OPENOFFICE_LANGCODE}/normal/setup.ins.orig\
		>${WRKSRC}/../instsetoo/${OPENOFFICE_OUTPATH}.pro/${OPENOFFICE_LANGCODE}/normal/setup.ins

do-install:
	${SH} -c "cd ${WRKSRC}/../instsetoo/${OPENOFFICE_OUTPATH}.pro/${OPENOFFICE_LANGCODE}/normal; ./install --prefix=${PREFIX}"
	${TOUCH} ${PREFIX}/${OPENOFFICE_VERSION}/help/${OPENOFFICE_HELPCODE}/common.tree
	${TOUCH} ${PREFIX}/${OPENOFFICE_VERSION}/help/${OPENOFFICE_HELPCODE}/schart.tree
	${TOUCH} ${PREFIX}/${OPENOFFICE_VERSION}/help/${OPENOFFICE_HELPCODE}/sdraw.tree
	${RM} -f ${PREFIX}/bin/soffice.orig
	${SED}	-e "s|@@PREFIX@@|${PREFIX}|g"				\
		-e "s|@@OPENOFFICE_VERSION@@|${OPENOFFICE_VERSION}|g"	\
		< ${FILESDIR}/soffice > ${PREFIX}/bin/soffice
	${CHMOD} +x ${PREFIX}/bin/soffice
.for i in scalc sdraw simpress swriter
	${LN} -sf ${PREFIX}/${OPENOFFICE_VERSION}/program/$i ${PREFIX}/bin/$i
.endfor

# 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(Makefile.${OPSYS}.${ARCH})
.  include "Makefile.${OPSYS}.${ARCH}"
.endif

# everything related to i18n is in a separate file
.include "Makefile.i18n"

PLIST_SRC+=		PLIST.common_end

.include "../../mk/compiler.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../lang/perl5/buildlink3.mk"
.include "../../textproc/libxslt/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"