1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/editors/openoffice.org-vcltesttool/Makefile

285 lines
10 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: OpenOffice.org
# Date created: 28 February 2002
# Whom: Martin Blapp
#
# $FreeBSD$
#
PORTNAME?= openoffice.org
PORTVERSION?= 2.0.${SNAPDATE}
CATEGORIES+= editors java
2006-02-11 23:09:16 +00:00
MASTER_SITES+= ${MASTER_SITE_RINGSERVER:S,%SUBDIR%,misc/openoffice/developer/680_m${MILESTONE}/&,} \
http://openoffice.lunarshells.com/sources/ \
http://ooopackages.good-day.net/pub/OpenOffice.org/sources/ \
ftp://ftp.cs.man.ac.uk/pub/toby/gpc/:gpc \
${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:antbin,} \
${MASTER_SITE_MOZILLA:S/$/:mozsrc/}
2005-11-04 23:06:27 +00:00
MASTER_SITE_SUBDIR+= mozilla/releases/mozilla${MOZILLA_VERSION}/source/:mozsrc
2006-05-10 22:06:58 +00:00
#DISTFILES+= OOo_SRC680_m${MILESTONE}_source${EXTRACT_SUFX}
DISTFILES+= OOo_2.0.${MILESTONE}_src${EXTRACT_SUFX}
.if defined(WITH_GPC)
DISTFILES+= gpc231.tar.Z:gpc
.endif
.if defined(WITH_GNUGCJ)
DISTFILES+= ${ANT_DISTFILE}:antbin
.endif
2006-05-10 22:06:58 +00:00
#EXTRACT_ONLY= OOo_SRC680_m${MILESTONE}_source${EXTRACT_SUFX}
EXTRACT_ONLY+= OOo_2.0.${MILESTONE}_src${EXTRACT_SUFX}
MAINTAINER= openoffice@FreeBSD.org
COMMENT?= Integrated wordprocessor/dbase/spreadsheet/drawing/chart/browser(developer version)
NO_LATEST_LINK= yes
2005-04-19 10:08:06 +00:00
USE_GNOME= gtk20 gnomevfs2
MOZILLA_VERSION= 1.7.5
2005-05-22 21:04:01 +00:00
MOZILLA_SOURCE= mozilla-source-${MOZILLA_VERSION}.tar.gz
.if !defined(WITHOUT_MOZILLA)
DISTFILES+= ${MOZILLA_SOURCE}:mozsrc
USE_GNOME+= libidl
.endif
.if defined(WITH_KDE)
USE_KDELIBS_VER= 3
.endif
USE_XLIB= yes
USE_GMAKE= yes
USE_PERL5= yes
2006-05-10 22:06:58 +00:00
#USE_BZIP2= yes
WITHOUT_CPU_CFLAGS= true
2005-09-02 03:19:47 +00:00
ONLY_FOR_ARCHS= i386
.if !defined(WITH_GNUGCJ)
USE_JAVA= yes
2006-04-15 02:45:17 +00:00
JAVA_VERSION= 1.4+
JAVA_BUILD= jdk
JAVA_VENDOR= freebsd bsdjava
.endif
.include <bsd.port.pre.mk>
.include <${FILESDIR}/Makefile.localized>
.if ${PERL_LEVEL} < 500600
IGNORE= install lang/perl5.8 then try again
.endif
CODELINE= 680
RELEASE_NR= 2.0
2006-05-13 21:56:26 +00:00
MILESTONE?= 169
2005-12-23 03:06:18 +00:00
OOOTAG?= SRC680_m${MILESTONE}
2006-05-13 21:56:26 +00:00
SNAPDATE= 20060512
2005-12-23 03:06:18 +00:00
INSTALLATION_BASEDIR?= openoffice.org-${OOOTAG}
EXECBASE?= openoffice.org-${OOOTAG}
2005-01-20 11:33:35 +00:00
DIST_SUBDIR= openoffice.org2.0
SIMPLEOSVER= ${OSREL:C/\.//g}
2005-12-23 03:06:18 +00:00
PACKAGE_BASENAME= OOo_${OOOTAG}_${OPSYS}${SIMPLEOSVER}Intel
LOCALIZED_LANG?= en-US
# FIXME (Somehow INDEX build fails)
.if defined(LANG_PKGNAME)
PKGNAMEPREFIX= ${LANG_PKGNAME}-
.endif
.if defined(LANG_SUFFIX)
PKGNAMESUFFIX?= -${LANG_SUFFIX}
.endif
.if defined(WITH_GNUGCJ)
#this wired part must be rewritten
GCCVER=4.1.1
BUILD_DEPENDS+= ${PREFIX}/lib/gcc/${MACHINE_ARCH}-portbld-freebsd${OSREL}/${GCCVER}/lib-gnu-java-awt-peer-gtk.so:${PORTSDIR}/lang/gcc41-withgcjawt
BUILD_DEPENDS+= gjdoc:${PORTSDIR}/java/gjdoc
RUN_DEPENDS+= ${PREFIX}/lib/gcc/${MACHINE_ARCH}-portbld-freebsd${OSREL}/${GCCVER}/lib-gnu-java-awt-peer-gtk.so:${PORTSDIR}/lang/gcc41-withgcjawt
.else
BUILD_DEPENDS+= gcc-ooo:${PORTSDIR}/lang/gcc-ooo
.endif
# FIXME (correctly add ccache before gcc and g++)
.if defined(WITH_CCACHE)
BUILD_DEPENDS+= ccache:${PORTSDIR}/devel/ccache
.if defined(WITH_GNUGCJ)
2006-03-15 06:25:45 +00:00
CC= ccache gcc41
CXX= ccache g++41
.else
CC= ccache gcc-ooo
CXX= ccache g++-ooo
.endif #WITH_GNUGCJ
.endif #WITH_CCACHE
.if !defined(WITH_CCACHE)
.if defined(WITH_GNUGCJ)
2006-03-15 06:25:45 +00:00
CC= gcc41
CXX= g++41
.else
CC= gcc-ooo
CXX= g++-ooo
.endif #WITH_GNUGCJ
.endif #!WITH_CCACHE
BUILD_DEPENDS+= zip:${PORTSDIR}/archivers/zip \
unzip:${PORTSDIR}/archivers/unzip \
gcp:${PORTSDIR}/sysutils/coreutils \
gpatch:${PORTSDIR}/devel/patch \
${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \
bison2:${PORTSDIR}/devel/bison2 \
imake:${X_IMAKE_PORT}
.if !defined(WITH_GNUGCJ)
BUILD_DEPENDS+= ant:${PORTSDIR}/devel/apache-ant
2005-07-26 21:58:38 +00:00
.else
LIB_DEPENDS+= xslt.2:${PORTSDIR}/textproc/libxslt
LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
.endif
.if defined(WITH_GNUGCJ)
ANT_DISTFILE= apache-ant-${ANT_VERSION}-bin.tar.bz2
ANT_VERSION= 1.6.5
.endif
.if !defined(WITH_GPC)
LIB_DEPENDS= art_lgpl_2:${PORTSDIR}/graphics/libart_lgpl2
.endif
2002-02-28 23:36:03 +00:00
GNU_CONFIGURE= yes
2006-05-10 22:06:58 +00:00
WRKSRC?= ${WRKDIR}/SRC680_m${MILESTONE}
CONFIGURE_WRKSRC= ${WRKSRC}/config_office
2005-05-15 03:51:47 +00:00
TCSH?= /bin/tcsh
PKGMESSAGE= ${WRKDIR}/pkg-message
NUMOFPROCESSES?= 1
.if defined(WITH_GNUGCJ)
CONFIGURE_ENV+= PATH="${WRKDIR}/gnugcj/bin:${PATH}"
.endif
2006-03-19 20:57:34 +00:00
CONFIGURE_ARGS+= --with-gnu-cp=${LOCALBASE}/bin/gcp --with-gnu-patch=${LOCALBASE}/bin/gpatch --with-epm=internal --enable-crashdump=yes --enable-symbols=SMALL --with-system-freetype
2006-03-15 06:25:45 +00:00
#workarounds
CONFIGURE_ARGS+= --with-system-xrender-headers=yes #i62713#
.if (${OSVERSION} <= 492000)
EXTRA_PATCHES+= ${FILESDIR}/fbsd4-workaroundpatch
.endif
.if defined(WITH_GNUGCJ)
2006-04-19 23:41:15 +00:00
EXTRA_PATCHES+= ${FILESDIR}/cws-maho1.diff ${FILESDIR}/gcj-fbsdworkaround
.endif
#.if defined(WITH_TTF_BYTECODE_ENABLED)
#EXTRA_PATCHES+= ${FILESDIR}/optpatch-freetype
#.endif
ICONS= ${WRKSRC}/sysui/desktop/icons
.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
2002-02-28 23:36:03 +00:00
post-extract:
.if defined(WITH_GNUGCJ)
@cd ${WRKDIR} ; ${CAT} ${DISTDIR}/${DIST_SUBDIR}/${ANT_DISTFILE} | ${BZIP2_CMD} -d | ${TAR} xf -
@${RM} -Rf ${WRKDIR}/gnugcj
@${MKDIR} ${WRKDIR}/gnugcj/bin
@${LN} -s ${LOCALBASE}/bin/gcj41 ${WRKDIR}/gnugcj/bin/gcj
@${LN} -s ${LOCALBASE}/bin/gij41 ${WRKDIR}/gnugcj/bin/gij
@${LN} -s ${LOCALBASE}/bin/gjdoc ${WRKDIR}/gnugcj/bin/javadoc # #iXXXXX# xmerge doesn't support gjdoc
@${LN} -s ${LOCALBASE}/bin/fastjar41 ${WRKDIR}/gnugcj/bin/fastjar
@${LN} -s ${LOCALBASE}/bin/gcj-dbtool41 ${WRKDIR}/gnugcj/bin/gcj-dbtool
2005-09-05 20:43:06 +00:00
.endif
.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(WITHOUT_MOZILLA)
@${CP} ${DISTDIR}/${DIST_SUBDIR}/${MOZILLA_SOURCE} ${WRKSRC}/moz/download
.endif
2002-02-28 23:36:03 +00:00
do-build:
@cd ${WRKSRC} ; ./bootstrap
# PR:84786 #i53289#
2005-05-15 03:51:47 +00:00
.if (${NUMOFPROCESSES}>1)
@cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C" ${TCSH} -c "source FreeBSDEnv.Set ; cd instsetoo_native ; build.pl -P${NUMOFPROCESSES} --all"
2005-05-15 03:51:47 +00:00
.else
@cd ${WRKSRC} ; ${SETENV} "LANG=C" "LC_ALL=C" ${TCSH} -c "source FreeBSDEnv.Set ; dmake"
.endif
2002-02-28 23:36:03 +00:00
do-install:
2005-10-17 09:41:59 +00:00
@cd ${WRKSRC}/instsetoo_native/unxfbsd.pro/OpenOffice/bsd/install/${LOCALIZED_LANG}/freebsd-*/ ; ${LS} *.tgz > ${WRKDIR}/INSTALLFILES
@${RM} -Rf ${WRKDIR}/tmp
@${MKDIR} ${WRKDIR}/tmp
@for i in `${CAT} ${WRKDIR}/INSTALLFILES`; do \
2005-10-17 09:41:59 +00:00
${CP} ${WRKSRC}/instsetoo_native/unxfbsd.pro/OpenOffice/bsd/install/${LOCALIZED_LANG}/freebsd-*/$$i ${WRKDIR}/tmp ; \
cd ${WRKDIR}/tmp ; ${TAR} xfz ${WRKDIR}/tmp/$$i ; \
done
@${MKDIR} ${PREFIX}/${INSTALLATION_BASEDIR}
@cd ${WRKDIR}/tmp/opt/openoffice* ; ${TAR} cf - -C . . | ${TAR} xf - -C ${PREFIX}/${INSTALLATION_BASEDIR}
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' \
2005-12-23 03:06:18 +00:00
-e 's#%%OOOTAG%%#${OOOTAG}#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}-sbase
@${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}-setofficelang
@${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}-swriter
2005-01-24 00:03:28 +00:00
@${PRINTF} "bin/openoffice.org\n" > ${TMPPLIST}
@${REINPLACE_CMD} -e 's#${RELEASE_NR}#${OOOVERSION}#g' \
-e '/^Exec/s/printeradmin/spadmin/' \
${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg/*.desktop
@${RM} ${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg/*.desktop.bak
.if defined(WITH_KDE)
@ln -sf ${PREFIX}/${INSTALLATION_BASEDIR}/share/xdg \
${PREFIX}/share/applnk/${EXECBASE}
@${PRINTF} "share/applnk/${EXECBASE}\n" >> ${TMPPLIST}
@for dir in `ls ${ICONS}/hicolor | grep -v CVS`; do \
for app in base calc draw impress math printeradmin writer; do \
if [ -r ${ICONS}/hicolor/$${dir}/apps/$${app}.png ]; then \
${CP} ${ICONS}/hicolor/$${dir}/apps/$${app}.png \
${PREFIX}/share/icons/hicolor/$${dir}/apps/openofficeorg-20-$${app}.png ; \
${PRINTF} "share/icons/hicolor/$${dir}/apps/openofficeorg-20-$${app}.png\n" >> ${TMPPLIST} ; \
fi \
done ; \
for file in `cd ${ICONS}/hicolor/$${dir}/mimetypes; ls *.png`; do \
${CP} ${ICONS}/hicolor/$${dir}/mimetypes/$${file} \
${PREFIX}/share/icons/hicolor/$${dir}/mimetypes/ ; \
${PRINTF} "share/icons/hiclor/$${dir}/mimetypes/$${file}\n" >> ${TMPPLIST} ; \
done ; \
done
2006-05-10 22:06:58 +00:00
.endif
2005-01-20 11:33:35 +00:00
@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' \
2005-12-23 03:06:18 +00:00
-e 's#%%OOOTAG%%#${OOOTAG}#g' \
-e 's#%%RELEASE_NR%%#${RELEASE_NR}#g' \
${PKGMESSAGE}
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
2005-07-02 11:26:09 +00:00
.include <${FILESDIR}/Makefile.others>
.include <bsd.port.post.mk>