48420a5ebd
PR: ports/116639 Submitted by: aDe
273 lines
11 KiB
Makefile
273 lines
11 KiB
Makefile
# New ports collection makefile for: OpenOffice.org
|
|
# Date created: 28 Februar 2002
|
|
# Whom: Martin Blapp
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= openoffice.org
|
|
PORTVERSION= 1.0.3
|
|
PORTREVISION= 9
|
|
CATEGORIES+= editors java
|
|
MASTER_SITES+= http://openoffice.lunarshells.com/sources/:moz,ru,src,help \
|
|
ftp://ooopackages.good-day.net/pub/OpenOffice.org/sources/1.0.3/:moz,ru,src,help \
|
|
${MASTER_SITE_LOCAL:S/$/:moz/} \
|
|
ftp://ftp.cs.man.ac.uk/pub/toby/gpc/:gpc \
|
|
${MASTER_SITE_MOZILLA:S/$/:mozsrc/} \
|
|
ftp://ooopackages.good-day.net/pub/OpenOffice.org/sources/1.0.3/:help \
|
|
http://openoffice.lunarshells.com/sources/helpcontent/:help \
|
|
${MASTER_SITE_LOCAL:S/$/:ru/}
|
|
MASTER_SITE_SUBDIR+= maho/openoffice.org/:moz,ru \
|
|
mozilla/releases/mozilla${MOZILLA_VERSION}/src/:mozsrc
|
|
DISTFILES+= OOo_${RELEASE_NR}_source.tar.gz:src patch-translation-ru-1.0.3.bz2:ru
|
|
.if defined(WITH_GPC)
|
|
DISTFILES+= gpc231.tar.Z:gpc
|
|
.endif
|
|
EXTRACT_ONLY= OOo_${RELEASE_NR}_source.tar.gz
|
|
|
|
MAINTAINER= openoffice@FreeBSD.org
|
|
COMMENT?= Integrated wordprocessor/dbase/spreadsheet/drawing/chart/browser
|
|
|
|
MOZILLA_PROJECT= cws_srx645_mozooo.20040203.tar.gz
|
|
MOZILLA_VERSION= 1.0
|
|
MOZILLA_SOURCE= mozilla-source-${MOZILLA_VERSION}.tar.gz
|
|
DISTFILES+= ${MOZILLA_PROJECT}:moz ${MOZILLA_SOURCE}:mozsrc
|
|
USE_GNOME= orbit
|
|
USE_XLIB= yes
|
|
USE_PERL5= yes
|
|
USE_BISON= yes
|
|
USE_GMAKE= yes
|
|
USE_JAVA= yes
|
|
JAVA_VENDOR= bsdjava
|
|
JAVA_VERSION= 1.3
|
|
JAVA_BUILD= jdk
|
|
NO_LATEST_LINK= yes
|
|
WITHOUT_CPU_CFLAGS= true
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
.include <bsd.port.pre.mk>
|
|
.include <${FILESDIR}/Makefile.localized>
|
|
|
|
LANG_EXT?= 01
|
|
LANG_CONFIGURE_ARG?= ENUS
|
|
L10NHELP?= helpcontent_01_unix.tgz
|
|
|
|
DISTFILES+= ${L10NHELP}:help
|
|
.if defined(ALL_LOCALIZED_LANGS)
|
|
DISTFILES+= helpcontent_07_unix.tgz:help \
|
|
helpcontent_30_unix.tgz:help helpcontent_33_unix.tgz:help \
|
|
helpcontent_34_unix.tgz:help helpcontent_35_unix.tgz:help \
|
|
helpcontent_39_unix.tgz:help helpcontent_42_unix.tgz:help \
|
|
helpcontent_46_unix.tgz:help helpcontent_49_unix.tgz:help \
|
|
helpcontent_81_unix.tgz:help helpcontent_82_unix.tgz:help \
|
|
helpcontent_86_unix.tgz:help helpcontent_88_unix.tgz:help
|
|
L10NHELPS= helpcontent_01_unix.tgz helpcontent_07_unix.tgz \
|
|
helpcontent_30_unix.tgz helpcontent_33_unix.tgz \
|
|
helpcontent_34_unix.tgz helpcontent_35_unix.tgz \
|
|
helpcontent_39_unix.tgz helpcontent_42_unix.tgz \
|
|
helpcontent_46_unix.tgz helpcontent_49_unix.tgz \
|
|
helpcontent_81_unix.tgz helpcontent_82_unix.tgz \
|
|
helpcontent_86_unix.tgz helpcontent_88_unix.tgz
|
|
.endif
|
|
|
|
CODELINE= 641
|
|
RELEASE_NR= 1.0.3
|
|
INSTALLATION_BASEDIR= OpenOffice.org${RELEASE_NR}
|
|
EXECBASE= openoffice.org-${RELEASE_NR}
|
|
DIST_SUBDIR= openoffice.org1.0
|
|
SIMPLEOSVER= ${OSREL:C/\.//g}
|
|
PACKAGE_BASENAME= OOo_${RELEASE_NR}_${OPSYS}${SIMPLEOSVER}Intel
|
|
DICT_DIR= ${PREFIX}/${INSTALLATION_BASEDIR}/share/dict/ooo/
|
|
|
|
# FIXME (Somehow INDEX build fails)
|
|
.if defined(LANG_PKGNAME)
|
|
PKGNAMEPREFIX= ${LANG_PKGNAME}-
|
|
.endif
|
|
.if defined(LANG_SUFFIX)
|
|
PKGNAMESUFFIX?= -${LANG_SUFFIX}
|
|
.endif
|
|
|
|
# This port might build with gcc 2.95.2+
|
|
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 \
|
|
imake:${X_IMAKE_PORT} \
|
|
gcp:${PORTSDIR}/sysutils/coreutils \
|
|
Xvfb:${X_VFBSERVER_PORT} \
|
|
${X11BASE}/lib/X11/fonts/misc/cursor.pcf.gz:${X_FONTS_MISC_PORT}
|
|
GNU_CONFIGURE= yes
|
|
USE_AUTOTOOLS= autoconf:261
|
|
WRKSRC= ${WRKDIR}/oo_${PORTVERSION}_src
|
|
CONFIGURE_WRKSRC= ${WRKSRC}/config_office
|
|
TCSH?= /bin/tcsh
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
MAKE_ENV+= DISPLAY="localhost:1001"
|
|
CONFIGURE_ENV= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
|
|
PTHREAD_LIBS=${PTHREAD_LIBS}
|
|
CONFIGURE_ARGS+= --with-jdk-home="${JAVA_HOME}" \
|
|
--with-os-version=${OSVERSION}
|
|
.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
|
|
#XXX not yet: fix for gnome/kde wrapper
|
|
@#${REINPLACE_CMD} -e 's|"Exec", "\\"\<progpath\>/program/|"Exec", "\\"${PREFIX}/bin/openoffice.org-|' ${WRKSRC}/sysui/oounix/office/kde2/kdeint
|
|
@#${REINPLACE_CMD} -e 's|"Exec", "<progpath>/program/|"Exec", "${PREFIX}/bin/openoffice.org-|' ${WRKSRC}/sysui/oounix/office/gnome/gnomeint
|
|
@cd ${WRKDIR} ; ${CAT} ${DISTDIR}/${DIST_SUBDIR}/patch-translation-ru-1.0.3.bz2 | ${BZIP2_CMD} | ${PATCH}
|
|
.if defined(WITH_GPC)
|
|
@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/
|
|
.endif
|
|
.if !defined(WITH_GPC)
|
|
@cd ${WRKSRC} ; ${PATCH} -p0 < ${FILESDIR}/gpc-libart-patch
|
|
.endif
|
|
@${CHMOD} +x ${WRKSRC}/solenv/bin/zipdep.pl
|
|
|
|
@${MKDIR} ${WRKDIR}/L10NHELP
|
|
@cd ${WRKDIR}/L10NHELP ; \
|
|
${CAT} ${DISTDIR}/${DIST_SUBDIR}/${L10NHELP} | ${GZIP_CMD} -d | ${TAR} xf -
|
|
.if defined(ALL_LOCALIZED_LANGS)
|
|
@cd ${WRKDIR}/L10NHELP ; \
|
|
for helpfile in ${L10NHELPS}; do \
|
|
${CAT} ${DISTDIR}/${DIST_SUBDIR}/$$helpfile | ${GZIP_CMD} -d | ${TAR} xf - ; \
|
|
done
|
|
.endif
|
|
@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
|
|
|
|
post-patch:
|
|
#patch for SDK
|
|
@${REINPLACE_CMD} 's|%%GNUTR%%|${LOCALBASE}/bin/gtr|g' ${WRKSRC}/odk/util/makefile.pmk
|
|
@${REINPLACE_CMD} 's|%%GNUCOPY%%|${LOCALBASE}/bin/gcp|g' ${WRKSRC}/solenv/inc/unitools.mk
|
|
@${REINPLACE_CMD} -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g' \
|
|
-e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
|
|
${WRKSRC}/product/settings/settings.mk
|
|
do-build:
|
|
@cd ${WRKSRC} ; ./bootstrap
|
|
@cd ${WRKSRC}/moz ; ${SETENV} "BUILD_MOZAB=TRUE" ${TCSH} -c 'source ../FreeBSDEnv.Set ; build.pl ; dmake zip' ; ${CP} unxfbsd.pro/zipped/FREEBSD*.zip ../moz/zipped
|
|
@${MKDIR} ${WRKSRC}/solver/${CODELINE}/unxfbsd.pro/pck
|
|
@${CP} ${WRKDIR}/L10NHELP/*.zip ${WRKSRC}/solver/${CODELINE}/unxfbsd.pro/pck
|
|
.if exists(${WRKDIR}/.Xvfb.pid)
|
|
@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
|
|
@${RM} -f ${WRKDIR}/.Xvfb.pid
|
|
.endif
|
|
${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid
|
|
@sleep 5
|
|
@cd ${WRKSRC} ; ${SETENV} "LC_ALL=C" "LANG=C" ${TCSH} -c 'source FreeBSDEnv.Set ; ${BUILD}'
|
|
@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
|
|
@${RM} -f ${WRKDIR}/.Xvfb.pid
|
|
|
|
do-install:
|
|
.if exists(${WRKDIR}/.Xvfb.pid)
|
|
@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
|
|
@${RM} -f ${WRKDIR}/.Xvfb.pid
|
|
.endif
|
|
@${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid
|
|
@sleep 5
|
|
@${SETENV} "LC_ALL=C" "LANG=C" ${TCSH} -c "cd ${WRKSRC}/instsetoo/*.pro/${LANG_EXT}/normal ; ./install --prefix=${PREFIX}"
|
|
@-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
|
|
@${RM} -f ${WRKDIR}/.Xvfb.pid
|
|
#XXX temporary hack (contains space in dir name)
|
|
@${RM} -rf ${PREFIX}/${INSTALLATION_BASEDIR}/share/kde/net/applnk
|
|
|
|
install-user:
|
|
@${PREFIX}/${INSTALLATION_BASEDIR}/program/setup
|
|
|
|
post-install:
|
|
@${ECHO_MSG} "===> Add wrapper scripts";
|
|
@${CP} ${FILESDIR}/openoffice.org-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.org-wrapper
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/openoffice.org-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}/../${PACKAGE_BASENAME}_install_${LANG_PKGNAME}${PKG_SUFX}
|
|
.else
|
|
@${MV} ${PKGFILE} ${WRKDIR}/../${PACKAGE_BASENAME}_install${PKG_SUFX}
|
|
.endif
|
|
|
|
sdk:
|
|
@${ECHO_MSG} "===> Make SDK of OpenOffice.org"
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd odk/source/bean/native/unix ; dmake ; deliver.pl'
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd odk/source/bean/com/sun/star/beans ; dmake ; deliver.pl'
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd netbeans_integration ; build.pl ; deliver.pl'
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd odk/source/OOSupport ; dmake ; deliver.pl'
|
|
@${MKDIR} ${WRKSRC}/odk/unxfbsd.pro/bin/OpenOffice.org1.0.2SDK/freebsd/lib
|
|
@${TOUCH} ${WRKSRC}/odk/unxfbsd.pro/misc/deltree.txt
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd odk/pack/copying ; dmake ; deliver.pl'
|
|
@cd ${WRKSRC} ; ${TCSH} -c 'source FreeBSDEnv.Set ; cd odk/util ; dmake ; deliver.pl'
|
|
#somehow SDK's version is 1.0.2 and not 1.0.3
|
|
${MV} ${WRKSRC}/odk/unxfbsd.pro/bin/OpenOffice.org1.0.2SDK.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>
|