diff options
author | truckman <truckman@FreeBSD.org> | 2015-09-10 08:33:08 +0800 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2015-09-10 08:33:08 +0800 |
commit | fb0459760f2162fb7d06c9551771e8371e4fe3c2 (patch) | |
tree | 2104db558d3c656cc64985b920d29e8bec6142cc /editors | |
parent | 3583ce5fdcfe2a09989b89b27963031fa120fcdd (diff) | |
download | freebsd-ports-gnome-fb0459760f2162fb7d06c9551771e8371e4fe3c2.tar.gz freebsd-ports-gnome-fb0459760f2162fb7d06c9551771e8371e4fe3c2.tar.zst freebsd-ports-gnome-fb0459760f2162fb7d06c9551771e8371e4fe3c2.zip |
Unbreak wrapper script so that if a particular application is
specified but without specifying a document, that application is
started instead of presenting the user with the generic startup
window and requiring him to pick the document type (running
openoffice-*-scalc should open to a new spreadsheet, etc.)
Building with clang 3.7 is reported to have the same failure mode
as clang 3.6, so use the same optimization tweak as a workaround.
Various cleanups to do-install:
* The paths ${PREFIX}/${INSTALLATION_BASEDIR} and
${PREFIX}/${INSTALLATION_BASEDIR}/${AOODIR}, and
${PREFIX}/${INSTALLATION_BASEDIR}/${AOODIR}/share/xdg are
frequently used, so create a few variables to hold those paths
instead of repeating the same, long sequence in a number of places
* Tweak openoffice-wrapper to take advantage of the previous change
* Use INSTALLS_ICONS=yes instead of manually adding the @exec and
@unexec entries to the plist
* Edit bootstraprc only once with ${REINPLACE_CMD} instead of
running it twice to edit the same line
* Remove bootstraprc.bak so that it does not get installed
* With the advent of staging, it is not necessary to remove
${STAGEDIR}${DESKTOPDIR}/${EXECBASE}
* Simplify code for installing icons
Rename remaining OOO* variables to AOO*.
Delete unused definition of ${SUBST}.
Delete fbsd:nokeywords property and add svn:keywords to
files/openoffice-wrapper.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/openoffice-4/Makefile | 100 | ||||
-rw-r--r-- | editors/openoffice-4/files/openoffice-wrapper | 6 |
2 files changed, 53 insertions, 53 deletions
diff --git a/editors/openoffice-4/Makefile b/editors/openoffice-4/Makefile index d91e3a07c5cb..a129736feeba 100644 --- a/editors/openoffice-4/Makefile +++ b/editors/openoffice-4/Makefile @@ -3,7 +3,7 @@ PORTNAME= apache-openoffice PORTVERSION= ${AOOVERSION} -PORTREVISION= 12 +PORTREVISION= 13 CATEGORIES= editors java MASTER_SITES= APACHE/openoffice/${PORTVERSION}/source \ http://tools.openoffice.org/unowinreg_prebuild/680/:unoreg \ @@ -14,9 +14,9 @@ PKGNAMEPREFIX= ${LANG_PKGNAME}- .if defined(LANG_SUFFIX) PKGNAMESUFFIX= -${LANG_SUFFIX} .endif -DISTFILES= ${OOOSRC} unowinreg.dll:unoreg ${EXTSRC}:extsrc +DISTFILES= ${AOOSRC} unowinreg.dll:unoreg ${EXTSRC}:extsrc DIST_SUBDIR= openoffice -EXTRACT_ONLY= ${OOOSRC} +EXTRACT_ONLY= ${AOOSRC} MAINTAINER= office@FreeBSD.org #de facto maintainer is truckman@FreeBSD.org @@ -104,11 +104,13 @@ EXTSRC= ApacheOpenOffice.ext_sources.${AOOVERSION1}.x.x.20150707.tar.gz AOOVERSION= ${AOOVERSION1}.${AOOVERSION2}.${AOOVERSION3} AOOXXX= ${AOOVERSION1}${AOOVERSION2}${AOOVERSION3} AOOSUFFIX= ${PORTVERSION} -OOOSRC= apache-openoffice-${AOOVERSION}-r${SVNREVISION}-src${EXTRACT_SUFX} +AOOSRC= apache-openoffice-${AOOVERSION}-r${SVNREVISION}-src${EXTRACT_SUFX} -OOODIR= openoffice${AOOVERSION1} AOOUDIR= .openoffice.org\/${AOOVERSION1} INSTALLATION_BASEDIR?= openoffice-${AOOSUFFIX} +PRINSTALLATION_BASEDIR= ${PREFIX}/${INSTALLATION_BASEDIR} +OOPATH= ${PRINSTALLATION_BASEDIR}/openoffice${AOOVERSION1} +XDGDIR= ${OOPATH}/share/xdg EXECBASE?= openoffice-${AOOSUFFIX} ONLY_FOR_ARCHS= i386 amd64 @@ -125,6 +127,7 @@ USE_XORG= ice x11 xau xaw xcomposite xcursor xdamage xext xfixes xi \ USES= autoreconf:autoconf bison compiler cpe desktop-file-utils \ gettext-runtime gmake iconv jpeg perl5 pkgconfig python \ tar:bzip2 +INSTALLS_ICONS= yes WITHOUT_CPU_CFLAGS= true CPE_PRODUCT= ${PORTNAME:S|apache-||} CPE_VENDOR= apache @@ -159,7 +162,6 @@ MMEDIA_USE= GSTREAMER=yes CPPFLAGS+= -I${LOCALBASE}/include .else USE_GCC= yes -SUBST= "s/-fexceptions/& -fno-enforce-eh-specs/;s/-DHAVE_STL_INCLUDE_PATH/-DBOOST_TR1_DISABLE_INCLUDE_NEXT -DBOOST_TR1_GCC_INCLUDE_PATH=c++/" .endif .if ${ARCH} == amd64 @@ -176,14 +178,14 @@ LOCALIZED_LANG?= en-US .if ${PORT_OPTIONS:MCCACHE} || defined(WITH_CCACHE) BUILD_DEPENDS+= ccache:${PORTSDIR}/devel/ccache CCACHE_PREFIX= ccache -OOOCC= ${CCACHE_PREFIX} ${CC} -OOOCXX= ${CCACHE_PREFIX} ${CXX} +AOOCC= ${CCACHE_PREFIX} ${CC} +AOOCXX= ${CCACHE_PREFIX} ${CXX} .else -OOOCC= ${CC} -OOOCXX= ${CXX} +AOOCC= ${CC} +AOOCXX= ${CXX} .endif -CONFIGURE_ENV+= CC="${OOOCC}" CXX="${OOOCXX}" \ +CONFIGURE_ENV+= CC="${AOOCC}" CXX="${AOOCXX}" \ PATH=${WRKSRC}/solenv/bin:$$PATH GNU_CONFIGURE= yes @@ -252,10 +254,10 @@ CONFIGURE_ARGS+= \ --with-system-xrender \ --with-system-zlib -#OOOEXTENSIONS+= minimizer/presentation-minimizer.oxt -#OOOEXTENSIONS+= presenter/presenter-screen.oxt -#OOOEXTENSIONS+= pdfimport/pdfimport.oxt -OOOEXTENSIONS+= swext/wiki-publisher.oxt +#AOOEXTENSIONS+= minimizer/presentation-minimizer.oxt +#AOOEXTENSIONS+= presenter/presenter-screen.oxt +#AOOEXTENSIONS+= pdfimport/pdfimport.oxt +AOOEXTENSIONS+= swext/wiki-publisher.oxt ICONS= ${WRKSRC}/sysui/desktop/icons @@ -324,7 +326,7 @@ post-patch: ${REINPLACE_CMD} -e "s/ := -Os/ := -Os -fno-devirtualize -fno-devirtualize-speculatively/" ${WRKSRC}/solenv/gbuild/platform/freebsd.mk; \ ${REINPLACE_CMD} -e "s/=-Os /=-Os -fno-devirtualize -fno-devirtualize-speculatively /" ${WRKSRC}/solenv/inc/unxfbsdi.mk; \ fi -.elif ${ARCH} == i386 && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} == 36 +.elif ${ARCH} == i386 && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 36 # autodoc and uno (bridgetest) core dump when built with with -Os # on i386, affects file.cxx and bridgetest.cxx # Using -O2 optimiztion works, and -Os is essentially -O2 with out @@ -384,23 +386,21 @@ do-install: ${ECHO_CMD} "extracting $$i" ; \ cd ${WRKDIR}/tmp ; ${TAR} xfz ${WRKSRC}/instsetoo_native/unxfbsd?.pro/Apache_OpenOffice/archive/install/${LOCALIZED_LANG}/$$i ; \ done - ${MKDIR} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR} - cd ${WRKDIR}/tmp/*/ ; ${TAR} cf - -C . . | ${TAR} xf - -C ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR} - ${REINPLACE_CMD} -e 's/^UserInstallation.*$$/USERINSTALLATION/' ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/bootstraprc - ${REINPLACE_CMD} -e 's/USERINSTALLATION/UserInstallation=$$SYSUSERCONFIG\/${AOOUDIR}/' ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/bootstraprc - ${MKDIR} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/extensions/ - cd ${WRKSRC}/solver/${AOOXXX}/unxfbsd?.pro/bin/ ; ${INSTALL_DATA} ${OOOEXTENSIONS} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/extensions/ - ${FIND} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program -type f \( -name '*.so*' -or -name '*.bin' \) -print0 | ${XARGS} -0 -n1 ${STRIP_CMD} + ${MKDIR} ${STAGEDIR}${PRINSTALLATION_BASEDIR} + cd ${WRKDIR}/tmp/*/ ; ${TAR} cf - -C . . | ${TAR} xf - -C ${STAGEDIR}${PRINSTALLATION_BASEDIR} + ${REINPLACE_CMD} -e '/^UserInstallation/s/=.*/=$$SYSUSERCONFIG\/${AOOUDIR}/' ${STAGEDIR}${OOPATH}/program/bootstraprc + ${RM} ${STAGEDIR}${OOPATH}/program/bootstraprc.bak + ${MKDIR} ${STAGEDIR}${PRINSTALLATION_BASEDIR}/extensions/ + cd ${WRKSRC}/solver/${AOOXXX}/unxfbsd?.pro/bin/ ; ${INSTALL_DATA} ${AOOEXTENSIONS} ${STAGEDIR}${PRINSTALLATION_BASEDIR}/extensions/ + ${FIND} ${STAGEDIR}${OOPATH}/program -type f \( -name '*.so*' -or -name '*.bin' \) -print0 | ${XARGS} -0 -n1 ${STRIP_CMD} for prog in crashrep pagein uri-encode javaldx regmerge regview; do \ - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/program/$${prog}; \ + ${STRIP_CMD} ${STAGEDIR}${OOPATH}/program/$${prog}; \ done - ${FIND} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR} -type d -exec ${CHMOD} 755 {} \; + ${FIND} ${STAGEDIR}${PRINSTALLATION_BASEDIR} -type d -exec ${CHMOD} 755 {} \; @${ECHO_MSG} "===> Add wrapper scripts"; ${CP} ${FILESDIR}/openoffice-wrapper ${WRKDIR}/ - ${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \ - -e 's#%%SVNREVISION%%#${SVNREVISION}#g' \ - -e 's#%%OOODIR%%#${OOODIR}#g' \ - -e 's#%%INSTALLATION_BASEDIR%%#${INSTALLATION_BASEDIR}#g' \ + ${REINPLACE_CMD} -e 's#%%OOPATH%%#${OOPATH}#g' \ + -e 's#%%EXECBASE%%#${EXECBASE}#g' \ ${WRKDIR}/openoffice-wrapper ${INSTALL_SCRIPT} ${WRKDIR}/openoffice-wrapper \ ${STAGEDIR}${PREFIX}/bin/${EXECBASE} @@ -419,38 +419,38 @@ do-install: for app in base calc draw impress math writer; do \ ${REINPLACE_CMD} -e "s/^Exec.*/Exec=${EXECBASE} -$${app} %U/" \ -e "s/^Icon.*/Icon=${EXECBASE}-$${app}.png/" \ - ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/share/xdg/$${app}.desktop ; \ + ${STAGEDIR}${XDGDIR}/$${app}.desktop ; \ done ${REINPLACE_CMD} -e "s/^Exec.*/Exec=${EXECBASE}-spadmin %U/" \ -e "s/^Icon.*/Icon=${EXECBASE}-printeradmin.png/" \ - ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/share/xdg/printeradmin.desktop + ${STAGEDIR}${XDGDIR}/printeradmin.desktop ${REINPLACE_CMD} -e "s/^Exec.*/Exec=${EXECBASE} -quickstart -nologo -nodefault/" \ - ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/share/xdg/startcenter.desktop - ${RM} ${STAGEDIR}${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/share/xdg/*.desktop.bak - ${RM} -f ${STAGEDIR}${DESKTOPDIR}/${EXECBASE} + ${STAGEDIR}${XDGDIR}/startcenter.desktop + ${RM} ${STAGEDIR}${XDGDIR}/*.desktop.bak ${MKDIR} ${STAGEDIR}${DESKTOPDIR} - ${LN} -sf ${PREFIX}/${INSTALLATION_BASEDIR}/${OOODIR}/share/xdg \ - ${STAGEDIR}${DESKTOPDIR}/${EXECBASE} + ${LN} -sf ${XDGDIR} ${STAGEDIR}${DESKTOPDIR}/${EXECBASE} ${ECHO_CMD} "share/applications/${EXECBASE}" >> ${TMPPLIST} - for dir in `ls ${ICONS}/hicolor | ${GREP} -v CVS`; do \ + cd ${ICONS} ; for dir in hicolor/*/apps ; do \ + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/$${dir} ; \ for app in base calc draw impress math printeradmin writer; do \ - if [ -r ${ICONS}/hicolor/$${dir}/apps/$${app}.png ]; then \ - ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${dir}/apps/ ; \ - ${INSTALL_DATA} ${ICONS}/hicolor/$${dir}/apps/$${app}.png \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${dir}/apps/${EXECBASE}-$${app}.png ; \ - ${ECHO_CMD} "share/icons/hicolor/$${dir}/apps/${EXECBASE}-$${app}.png" >> ${TMPPLIST} ; \ + icon_src=$${dir}/$${app}.png; \ + icon_dst=share/icons/$${dir}/${EXECBASE}-$${app}.png; \ + if [ -r $${icon_src} ]; then \ + ${INSTALL_DATA} $${icon_src} \ + ${STAGEDIR}${PREFIX}/$${icon_dst} ; \ + ${ECHO_CMD} "$${icon_dst}" >> ${TMPPLIST} ; \ fi \ done ; \ - for iconfile in `cd ${ICONS}/hicolor/$${dir}/mimetypes; ls *.png`; do \ - ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${dir}/mimetypes/ ; \ - ${INSTALL_DATA} ${ICONS}/hicolor/$${dir}/mimetypes/$${iconfile} \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${dir}/mimetypes/ ; \ - ${ECHO_CMD} "share/icons/hicolor/$${dir}/mimetypes/$${iconfile}" >> ${TMPPLIST} ; \ + done + cd ${ICONS} ; for dir in hicolor/*/mimetypes ; do \ + ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/$${dir} ; \ + for iconfile in `cd $${dir}; ls *.png`; do \ + icon_dst=share/icons/$${dir}/$${iconfile} ; \ + ${INSTALL_DATA} $${dir}/$${iconfile} \ + ${STAGEDIR}${PREFIX}/$${icon_dst}; \ + ${ECHO_CMD} "$${icon_dst}" >> ${TMPPLIST} ; \ done ; \ done - ${ECHO_CMD} "@unexec ${RM} %D/share/icons/hicolor/icon-theme.cache 2>/dev/null || ${TRUE}" >> ${TMPPLIST} - ${ECHO_CMD} "@exec ${PREFIX}/bin/gtk-update-icon-cache -q -f %D/share/icons/hicolor 2>/dev/null || ${TRUE}" >> ${TMPPLIST} - ${ECHO_CMD} "@unexec ${PREFIX}/bin/gtk-update-icon-cache -q -f %D/share/icons/hicolor 2>/dev/null || ${TRUE}" >> ${TMPPLIST} .include <${FILESDIR}/Makefile.others> diff --git a/editors/openoffice-4/files/openoffice-wrapper b/editors/openoffice-4/files/openoffice-wrapper index 70bf6241f18b..6af286a38b8d 100644 --- a/editors/openoffice-4/files/openoffice-wrapper +++ b/editors/openoffice-4/files/openoffice-wrapper @@ -1,9 +1,9 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/editors/openoffice-3/files/openoffice-wrapper,v 1.17 2012-05-09 03:48:16 maho Exp $ +# $FreeBSD$ -oopath=%%PREFIX%%/%%INSTALLATION_BASEDIR%%/%%OOODIR%% -program=`echo $0 | sed -e 's|.*-%%OOOVERSION%%-||'` +oopath=%%OOPATH%% +program=`echo $0 | sed -e 's|.*%%EXECBASE%%-||'` case $program in $0) |