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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
|
# New ports collection makefile for: OpenOffice.org
# Date created: 28 February 2002
# Whom: Martin Blapp
#
# $FreeBSD$
#
PORTNAME= openoffice
PORTVERSION= 1.1.4
CATEGORIES+= editors
MASTER_SITES+= ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/openoffice/&,} \
${MASTER_SITE_LOCAL:S,%SUBDIR%,maho/openoffice.org/&,}:moz \
${MASTER_SITE_MOZILLA:S,%SUBDIR%,mozilla/releases/mozilla1.0/src/&,}:mozsrc \
ftp://sunsite.cnlab-switch.ch/mirror/OpenOffice/%SUBDIR%/ \
ftp://ftp.kddlabs.co.jp/office/openoffice/%SUBDIR%/ \
ftp://ftp.tu-chemnitz.de/pub/openoffice/%SUBDIR%/ \
http://ftp.stardiv.de/pub/OpenOffice.org/%SUBDIR%/ \
http://ftp.gwdg.de/pub/misc/openoffice/%SUBDIR%/ \
ftp://ftp.cs.man.ac.uk/pub/toby/gpc/:gpc \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/openoffice/contrib/helpcontent/&,}:help \
ftp://ftp.kddlabs.co.jp/office/openoffice/contrib/helpcontent/:help \
ftp://sunsite.cnlab-switch.ch/mirror/OpenOffice/contrib/helpcontent/:help \
http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/helpcontent/:help
MASTER_SITE_SUBDIR= stable/${PORTVERSION}
DISTFILES+= OOo_${PORTVERSION}_source.tar.gz gpc231.tar.Z:gpc
EXTRACT_ONLY= OOo_${PORTVERSION}_source.tar.gz
MAINTAINER= openoffice@FreeBSD.org
COMMENT?= Integrated wordprocessor/dbase/spreadheet/drawing/chart/browser
USE_GNOME= gtk20
MOZILLA_PROJECT= cws_srx645_mozooo.20040203.tar.gz
MOZILLA_SOURCE= mozilla-source-1.0.tar.gz
.if !defined(WITHOUT_MOZILLA)
DISTFILES+= ${MOZILLA_PROJECT}:moz ${MOZILLA_SOURCE}:mozsrc
USE_GNOME+= orbit gtk12
.endif
USE_PERL5= yes
USE_BISON= yes
USE_GMAKE= yes
USE_REINPLACE= yes
.if !defined(WITHOUT_JAVA)
USE_JAVA= yes
JAVA_VERSION= 1.4+
JAVA_BUILD= jdk
.endif
.include <bsd.port.pre.mk>
.include <${FILESDIR}/Makefile.localized>
.if (${OSVERSION} < 503001 && ${OSVERSION} >= 500000) || (${OSVERSION} < 492000)
BROKEN= "rtld depends on _end symbol. type make -DBROKEN to see how to upgrade your rtld"
.endif
LANG_EXT?= 01
LANG_CONFIGURE_ARG?= ENUS
.if defined(L10NHELP)
DISTFILES+= ${L10NHELP}:help
.endif
.if defined(ALL_LOCALIZED_LANGS)
DISTFILES+= helpcontent_31_unix.tgz:help helpcontent_33_unix.tgz:help \
helpcontent_34_unix.tgz:help helpcontent_39_unix.tgz:help \
helpcontent_46_unix.tgz:help helpcontent_49_unix.tgz:help \
helpcontent_55_unix.tgz:help \
helpcontent_81_unix.tgz:help helpcontent_82_unix.tgz:help \
helpcontent_86_unix.tgz:help helpcontent_88_unix.tgz:help \
helpcontent_90_unix.tgz:help
L10NHELPS= helpcontent_31_unix.tgz helpcontent_33_unix.tgz \
helpcontent_34_unix.tgz helpcontent_39_unix.tgz \
helpcontent_46_unix.tgz helpcontent_49_unix.tgz \
helpcontent_55_unix.tgz \
helpcontent_81_unix.tgz helpcontent_82_unix.tgz \
helpcontent_86_unix.tgz helpcontent_88_unix.tgz \
helpcontent_90_unix.tgz
.endif
CODELINE= 645
RELEASE_NR= ${PORTVERSION}
INSTALLATION_BASEDIR= OpenOffice.org${RELEASE_NR}
EXECBASE= openoffice.org-${RELEASE_NR}
DIST_SUBDIR= openoffice1.1
SIMPLEOSVER!= ${UNAME} -r | ${SED} -e 's/\.//g' | ${SED} -e 's/-.*//'
PACKAGE_BASENAME= OOo_${PORTVERSION}_${OPSYS}${SIMPLEOSVER}Intel
# FIXME (Somehow INDEX build fails)
.if defined(LANG_PKGNAME)
PKGNAMEPREFIX= ${LANG_PKGNAME}-
.endif
.if defined(LANG_SUFFIX)
PKGNAMESUFFIX?= -${LANG_SUFFIX}
.endif
BUILD_DEPENDS+= gcc32:${PORTSDIR}/lang/gcc32
# FIXME (correctly add ccache before gcc and g++)
.if defined(WITH_CCACHE)
BUILD_DEPENDS+= ccache:${PORTSDIR}/devel/ccache
CC= ccache gcc32
CXX= ccache g++32
.else
CC= gcc32
CXX= g++32
.endif
BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
unzip:${PORTSDIR}/archivers/unzip \
gcp:${PORTSDIR}/sysutils/coreutils \
xmkmf:${X_IMAKE_PORT} \
${X11BASE}/lib/libXft.so:${PORTSDIR}/x11-fonts/libXft
.if !defined(DISPLAY)
BUILD_DEPENDS+= Xvfb:${X_VFBSERVER_PORT}
.endif
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
mng.1:${PORTSDIR}/graphics/libmng \
freetype.9:${PORTSDIR}/print/freetype2
.if defined(WITHOUT_JAVA)
LIB_DEPENDS= xslt.2:${PORTSDIR}/textproc/libxslt
.else
BUILD_DEPENDS+= ${ANT}:${PORTSDIR}/devel/apache-ant
.endif
GNU_CONFIGURE= yes
USE_AUTOCONF_VER= 259
WRKDIR= ${WRKDIRPREFIX}${.CURDIR}/work
WRKSRC= ${WRKDIR}
CONFIGURE_WRKSRC= ${WRKSRC}/config_office
ANT?= ${LOCALBASE}/bin/ant
TCSH?= /bin/tcsh
ZIP?= ${PREFIX}/bin/zip
UNZIP?= ${PREFIX}/bin/unzip
PKGMESSAGE= ${WRKDIR}/pkg-message
NUMOFPROCESSES?= 8
.if !defined(DISPLAY)
DISPLAYHACK=localhost:1001
.endif
CONFIGURE_ARGS+= --with-gnu-cp=${LOCALBASE}/bin/gcp
.include <${FILESDIR}/Makefile.knobs>
pre-everything::
# really tweak, extremely useful when you build all localized language versions
# needed after when you build with ALL_LOCALIZED_LANGS.
.if defined(TWEAK_L10N)
@${RM} -f ${WRKDIR}/.PLIST*
@${RM} -f ${WRKDIR}/.install_done.*
@${RM} -f ${WRKDIR}/.package_done.*
@${RM} -f ${WRKDIR}/.extract_done.*
@${RM} -f ${WRKDIR}/.patch_done.*
@${RM} -f ${WRKDIR}/.configure_done.*
@${RM} -f ${WRKDIR}/.build_done.*
@${TOUCH} ${EXTRACT_COOKIE}
@${TOUCH} ${PATCH_COOKIE}
@${TOUCH} ${CONFIGURE_COOKIE}
@${TOUCH} ${BUILD_COOKIE}
.endif
post-extract:
.if defined(WITH_TTF_BYTECODE_ENABLED)
@cd ${WRKSRC} ; ${PATCH} < ${FILESDIR}/optpatch-freetype
.endif
@cd ${WRKDIR} ; ${CAT} ${DISTDIR}/${DIST_SUBDIR}/gpc231.tar.Z | ${TAR} xfz -
@${CP} ${WRKDIR}/gpc231/gpc.c ${WRKSRC}/external/gpc/
@${CP} ${WRKDIR}/gpc231/gpc.h ${WRKSRC}/external/gpc/
.if defined(L10NHELP)
@${ECHO_MSG} "===> Extracting L10NHELP sub project"
@${MKDIR} ${WRKDIR}/L10NHELP
@cd ${WRKDIR}/L10NHELP ; \
${CAT} ${DISTDIR}/${DIST_SUBDIR}/${L10NHELP} | ${GZIP_CMD} -d | ${TAR} xf -
.endif
.if defined(ALL_LOCALIZED_LANGS)
@${ECHO_MSG} "===> Extracting All available L10NHELPs"
@${MKDIR} ${WRKDIR}/L10NHELP
@cd ${WRKDIR}/L10NHELP ; \
for helpfile in ${L10NHELPS}; do \
${CAT} ${DISTDIR}/${DIST_SUBDIR}/$$helpfile | ${GZIP_CMD} -d | ${TAR} xf - ; \
done
.endif
.if !defined(WITHOUT_MOZILLA)
@cd ${WRKSRC} ; ${MV} moz moz.old ; ${TAR} xfz ${DISTDIR}/${DIST_SUBDIR}/${MOZILLA_PROJECT} ; ${PATCH} < ${FILESDIR}/moz-patch
@${MKDIR} ${WRKSRC}/moz/download
@${CP} ${DISTDIR}/${DIST_SUBDIR}/${MOZILLA_SOURCE} ${WRKSRC}/moz/download
@cd ${WRKSRC} ; ${MV} moz moz.runtime ; ${MV} moz.old moz
.endif
post-patch:
@${REINPLACE_CMD} -e 's+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+g;' ${WRKSRC}/odk/settings/settings.mk
@${REINPLACE_CMD} -e 's+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+g' ${WRKSRC}/odk/settings/settings.mk
do-build:
@cd ${WRKSRC} ; ./bootstrap
.if !defined(WITHOUT_MOZILLA)
@cd ${WRKSRC}/moz.runtime ; ${SETENV} "BUILD_MOZAB=TRUE" ${TCSH} -c 'source ../FreeBSDEnv.Set ; build.pl ; dmake zip' ; ${CP} unxfbsd.pro/zipped/FREEBSD*.zip ../moz/zipped
.endif
.if defined(L10NHELP) || defined(ALL_LOCALIZED_LANGS)
@${MKDIR} ${WRKSRC}/solver/${CODELINE}/unxfbsd.pro/pck
@${CP} ${WRKDIR}/L10NHELP/*.zip ${WRKSRC}/solver/${CODELINE}/unxfbsd.pro/pck
.endif
.if !defined(DISPLAY)
#
# This is a UGLY hack to not have to specify a X-Display.
#
${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid
@sleep 5
@cd ${WRKSRC} ; DISPLAY=${DISPLAYHACK} ; ${TCSH} -c 'source FreeBSDEnv.Set ; dmake -P${NUMOFPROCESSES}'
@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
@${RM} -f ${WRKDIR}/.Xvfb.pid
.else
@cd ${WRKSRC} ; DISPLAY=${DISPLAY} ; ${TCSH} -c 'source FreeBSDEnv.Set ; dmake -P${NUMOFPROCESSES}'
.endif
do-install:
@cd ${WRKSRC}/instsetoo/*.pro/${LANG_EXT}/normal/ ; ./install --prefix=${PREFIX}
install-user:
@${PREFIX}/${INSTALLATION_BASEDIR}/program/setup
post-install:
@${ECHO_MSG} "===> Add wrapper scripts";
@${CP} ${FILESDIR}/openoffice-wrapper ${WRKDIR}/
@${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \
-e 's#%%RELEASE_NR%%#${RELEASE_NR}#g' \
-e 's#%%INSTALLATION_BASEDIR%%#${INSTALLATION_BASEDIR}#g' \
${WRKDIR}/openoffice-wrapper
@${INSTALL_SCRIPT} ${WRKDIR}/openoffice-wrapper \
${PREFIX}/bin/${EXECBASE}
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/openoffice.org
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-sagenda
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-scalc
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-sdraw
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-setup
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-sfax
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-smath
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-simpress
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-spadmin
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-sweb
@${LN} -fs ${PREFIX}/bin/${EXECBASE} ${PREFIX}/bin/${EXECBASE}-swriter
@${PRINTF} "bin/openoffice.org\n" > ${TMPPLIST}
@cd ${PREFIX} ; ${FIND} -s bin -type f | ${GREP} ${EXECBASE} > ${TMPPLIST}
@cd ${PREFIX} ; ${FIND} -s bin -type l | ${GREP} ${EXECBASE} >> ${TMPPLIST}
@cd ${PREFIX} ; ${FIND} -s ${INSTALLATION_BASEDIR} -type f >> ${TMPPLIST}
@cd ${PREFIX} ; ${FIND} -s ${INSTALLATION_BASEDIR} -type l >> ${TMPPLIST}
@cd ${PREFIX} ; ${FIND} -s ${INSTALLATION_BASEDIR} -type d > ${WRKDIR}/dir.tmp
@${SORT} -r ${WRKDIR}/dir.tmp | ${XARGS} -n 1 ${ECHO_CMD} @dirrm >> ${TMPPLIST}
@${CP} ${FILESDIR}/pkg-message.in ${PKGMESSAGE}
@${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \
-e 's#%%INSTALLATION_BASEDIR%%#${INSTALLATION_BASEDIR}#g' \
-e 's#%%EXECBASE%%#${EXECBASE}#g' \
-e 's#%%MILESTONE%%#${MILESTONE}#g' \
-e 's#%%RELEASE_NR%%#${RELEASE_NR}#g' \
${PKGMESSAGE}
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
package-rename:
@${ECHO_MSG} "===> Rename package for OOo mirror upload";
.if defined(LANG_SUFFIX)
@${MV} ${PKGFILE} \
${WRKDIR}/../OOo_${PORTVERSION}_${OPSYS}${SIMPLEOSVER}Intel_install_${LANG_PKGNAME}-${LANG_SUFFIX}${PKG_SUFX}
.elif defined(LANG_PKGNAME)
@${MV} ${PKGFILE} \
${WRKDIR}/../OOo_${PORTVERSION}_${OPSYS}${SIMPLEOSVER}Intel_install_${LANG_PKGNAME}${PKG_SUFX}
.else
@${MV} ${PKGFILE} \
${WRKDIR}/../OOo_${PORTVERSION}_${OPSYS}${SIMPLEOSVER}Intel_install${PKG_SUFX}
.endif
sdk:
@${ECHO_MSG} "===> Make SDK of OpenOffice.org"
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd sdk_oo ; build.pl ; deliver.pl'
@${MV} ${WRKSRC}/solver/${CODELINE}/unxfbsd.pro/bin/OpenOffice.org${RELEASE_NR}_SDK.tar.gz ${WRKDIR}/../${PACKAGE_BASENAME}_sdk.tar.gz
solver:
@${ECHO_MSG} "===> Make Solver of OpenOffice.org"
@cd ${WRKSRC} ; ${TAR} cfz ${WRKDIR}/../${PACKAGE_BASENAME}_solver.tar.gz solver
.include <bsd.port.post.mk>
|