diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-09-03 04:45:17 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-09-03 04:45:17 +0000 |
commit | 9e1fa332c6fac0fd9dce31022f0e10cad442b1ff (patch) | |
tree | 4db205e1e8d26f0bdb5479099f860e7603492b0b /editors/libreoffice | |
parent | 9a31f3b915235bdf6d31137cb7f86b5ce2b556bf (diff) | |
download | ports-9e1fa332c6fac0fd9dce31022f0e10cad442b1ff.tar.gz ports-9e1fa332c6fac0fd9dce31022f0e10cad442b1ff.zip |
- Properly update icon caches when GTK2 and/or GTK3 option is set.
- Fix build when CUPS option is not set.
- Simplify and tidy up PLIST auto-generation.
- Reduce Clang 3.6 warnings.
Notes
Notes:
svn path=/head/; revision=395931
Diffstat (limited to 'editors/libreoffice')
-rw-r--r-- | editors/libreoffice/Makefile | 62 | ||||
-rw-r--r-- | editors/libreoffice/Makefile.common | 20 | ||||
-rw-r--r-- | editors/libreoffice/files/patch-solenv_gbuild_platform_unxgcc.mk | 7 |
3 files changed, 52 insertions, 37 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile index 806a17e67de1..d732de5fd27c 100644 --- a/editors/libreoffice/Makefile +++ b/editors/libreoffice/Makefile @@ -2,7 +2,7 @@ .include "${.CURDIR}/Makefile.common" -PORTREVISION= 0 +PORTREVISION= 1 COMMENT= Full integrated office productivity suite @@ -79,7 +79,6 @@ CONFLICTS_INSTALL= libreoffice4-4.* DIST_SUBDIR= libreoffice INSTALL_TARGET= distro-pack-install -POST_PLIST= post-plist WRKSRC= ${WRKDIR}/${PORTNAME}-${LOVERSION} GNU_CONFIGURE= yes @@ -107,8 +106,6 @@ VERBOSE_DESC= Increase build verbosity WEBDAV_DESC= Enable webdav protocol CUPS_CONFIGURE_ENABLE= cups -CUPS_CPPFLAGS= -I${LOCALBASE}/include -CUPS_LDFLAGS= -L${LOCALBASE}/lib CUPS_LIB_DEPENDS= libcups.so:${PORTSDIR}/print/cups-client GNOME_CONFIGURE_ENABLE= dbus gconf lockdown @@ -116,15 +113,19 @@ GNOME_IMPLIES= GTK2 GNOME_LIB_DEPENDS= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib GNOME_USE= GNOME=gconf2 +GTK_USE_GNOME= gtk-update-icon-cache +GTK_USES= desktop-file-utils +GTK_VARS= POST_PLIST=add-plist-gnome + GTK2_CONFIGURE_ENABLE= gtk -GTK2_USE= GNOME=gtk20 -GTK2_USES= desktop-file-utils -GTK2_VARS= INSTALLS_ICONS=yes +GTK2_USE= GNOME=gtk20,${GTK_USE_GNOME} +GTK2_USES= ${GTK_USES} +GTK2_VARS= ${GTK_VARS} GTK3_CONFIGURE_ENABLE= gtk3 -GTK3_USE= GNOME=gtk30 -GTK3_USES= desktop-file-utils -GTK2_VARS= INSTALLS_ICONS=yes +GTK3_USE= GNOME=gtk30,${GTK_USE_GNOME} +GTK3_USES= ${GTK_USES} +GTK3_VARS= ${GTK_VARS} JAVA_BUILD= yes JAVA_BUILD_DEPENDS= ant:${PORTSDIR}/devel/apache-ant \ @@ -190,6 +191,8 @@ WEBDAV_CONFIGURE_ENABLE= neon WEBDAV_LIB_DEPENDS= libneon.so:${PORTSDIR}/www/neon ACLOCAL_ARGS= -I "${WRKSRC}/m4" +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib COLLADA_MODS= COLLADABaseUtils COLLADAFramework \ COLLADASaxFrameworkLoader GeneratedSaxParser @@ -293,6 +296,7 @@ CONFIGURE_ENV= DMAKE=${LOCALBASE}/bin/dmake \ PYTHON_CFLAGS="`${PYTHON_VERSION}-config --cflags`" \ PYTHON_LIBS="`${PYTHON_VERSION}-config --libs`" +MAKE_ENV+= CXXFLAGS_WARN="${CXXFLAGS_WARN}" MAKE_ENV+= GNUSED=${LOCALBASE}/bin/gsed MAKE_ENV+= LANG=C LC_ALL=C @@ -309,6 +313,17 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex CONFIGURE_ENV+= FLEX=${LOCALBASE}/bin/flex .endif +.if ${COMPILER_TYPE} == "clang" +CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unknown-pragmas \ + -Wno-unused-function -Wno-unused-parameter +.if${COMPILER_VERSION} >= 36 +CXXFLAGS_WARN+= -Wno-inconsistent-missing-override \ + -Wno-unused-local-typedefs +.endif +.else +CXXFLAGS_WARN= -Wshadow -Woverloaded-virtual +.endif + pre-configure: @${TOUCH} ${WRKSRC}/autogen.lastrun @@ -316,24 +331,27 @@ post-configure: @${TOUCH} ${WRKSRC}/src.downloaded post-install: - @${RM} -f ${PLISTD} ${PLISTF} - @cd ${STAGEDIR}${PREFIX} && ${FIND} -d lib/libreoffice -type d \ - -empty -exec ${ECHO_CMD} "@dir {}" \; > ${PLISTD} - @cd ${STAGEDIR}${PREFIX} && ${FIND} -H -s bin etc lib man \ - \( -type f -o -type l \) -print > ${PLISTF} + @cd ${STAGEDIR}${PREFIX} && \ + ${FIND} -s lib/libreoffice -type d -empty \ + -exec ${ECHO_CMD} "@dir {}" \; >> ${TMPPLIST} + @cd ${STAGEDIR}${PREFIX} && \ + ${FIND} -s bin etc lib man -not -type d >> ${TMPPLIST} .for subdir in application-registry applications icons mime mime-info mimelnk - @cd ${STAGEDIR}${PREFIX} && ${FIND} -H -s share/${subdir} \ - \( -type f -o -type l \) -print >> ${PLISTF} + @cd ${STAGEDIR}${PREFIX} && \ + ${FIND} -s share/${subdir} -not -type d >> ${TMPPLIST} .endfor post-install-SDK-on: .for subdir in include share share/doc share/idl - @cd ${STAGEDIR}${PREFIX} && ${FIND} -H -s ${subdir}/libreoffice \ - \( -type f -o -type l \) -print >> ${PLISTF} + @cd ${STAGEDIR}${PREFIX} && \ + ${FIND} -s ${subdir}/libreoffice -not -type d >> ${TMPPLIST} .endfor -post-plist: - @${SORT} -u ${PLISTF} >> ${TMPPLIST} - @${SORT} -u ${PLISTD} >> ${TMPPLIST} +add-plist-gnome: +.for subdir in gnome hicolor locolor + @${ECHO_CMD} "@rmtry share/icons/${subdir}/icon-theme.cache" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST} +.endfor .include <bsd.port.post.mk> diff --git a/editors/libreoffice/Makefile.common b/editors/libreoffice/Makefile.common index d183113d718c..235eb8f29ee1 100644 --- a/editors/libreoffice/Makefile.common +++ b/editors/libreoffice/Makefile.common @@ -19,10 +19,6 @@ MASTER_SITES?= http://download.documentfoundation.org/libreoffice/${MASTER_SITE_ ONLY_FOR_ARCHS= i386 amd64 -# for dynamic plist generation -PLISTD?= ${WRKDIR}/plist_dirs -PLISTF?= ${WRKDIR}/plist_files - .if defined(LO_I18N) NO_ARCH= yes NO_BUILD= yes @@ -51,20 +47,20 @@ EXTRACT_AFTER_ARGS= --exclude '${PORTNAME}*-dict-*.deb' \ --strip-components 1 post-extract: - @${MKDIR} ${WRKSRC}; \ + @${MKDIR} ${WRKSRC} for deb in ${WRKDIR}/DEBS/*.deb ; do \ ${TAR} xfO $${deb} data.tar.gz | ${TAR} -C ${WRKSRC} -xf - ; \ - done ; \ + done do-install: - @${RM} -f ${PLISTF} - cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; ${FIND} * \( -type f -o -type l \) -exec ${ECHO_CMD} "lib/${PORTNAME}/{} " \; >> ${PLISTF} - - ${SORT} ${PLISTF} >> ${TMPPLIST} - - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME} cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; \ ${PAX} -rw . ${STAGEDIR}${PREFIX}/lib/${PORTNAME} + +post-install: + @cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} && \ + ${FIND} -s * -not -type d \ + -exec ${ECHO_CMD} "lib/${PORTNAME}/{} " \; >> ${TMPPLIST} .else MASTER_SITES+= http://dev-www.libreoffice.org/src/:src \ http://dev-www.libreoffice.org/extern/:ext diff --git a/editors/libreoffice/files/patch-solenv_gbuild_platform_unxgcc.mk b/editors/libreoffice/files/patch-solenv_gbuild_platform_unxgcc.mk index a47e94776e40..2823af75646e 100644 --- a/editors/libreoffice/files/patch-solenv_gbuild_platform_unxgcc.mk +++ b/editors/libreoffice/files/patch-solenv_gbuild_platform_unxgcc.mk @@ -1,11 +1,12 @@ --- solenv/gbuild/platform/unxgcc.mk.orig 2015-08-22 06:41:35 UTC +++ solenv/gbuild/platform/unxgcc.mk -@@ -41,7 +41,7 @@ gb_CFLAGS := \ +@@ -41,8 +41,7 @@ gb_CFLAGS := \ gb_CXXFLAGS := \ $(gb_CXXFLAGS_COMMON) \ -fPIC \ - -Wshadow \ -+ -Wno-unused-parameter \ - -Woverloaded-virtual \ +- -Woverloaded-virtual \ ++ $(CXXFLAGS_WARN) \ $(CXXFLAGS_CXX11) \ + |