freebsd-ports/x11/kdelibs4/Makefile
Raphael Kubo da Costa 39ced03cc1 Update the Qt4 ports to 4.8.7.
According to upstream, this is the last planned Qt4 release.
A list of changes since 4.8.6 can be found here:
<http://download.qt.io/official_releases/qt/4.8/4.8.7/changes-4.8.7>

Porting notes and changes:
- Remove several patches that have been upstreamed.
- Make Uses/qmake.mk pass the contents of LIBS to the qmake environment. [1]
- Repurpose devel/qt4/files/extrapatch-src-corelib-global-qglobal.h now the
  original patch is part of the release (curiously enough, the original
  patch was never actually used, as the ?= assignment in r362837 after
  r362770 was never possible).

  This works around the way compiler support for C++11 features is detected
  in Qt 4.8.7: while it originally only uses the compiler to determine if
  something is supported or not, the initializer lists feature also depends
  on the C++ standard library being used. It's a problem in FreeBSD 9.x,
  where USES=compiler:c++0x or USES=compiler:c++11-lang means we will use
  clang to build a port but use libstdc++ from base (GCC 4.2). The latter
  obviously does not support initializer lists, and the build fails because
  Qt tries to include headers that do not exist (<initializer_list>).

  Since detecting libstdc++'s version is not trivial (we need to include a
  non-lightweight header like cstdio and then check for __GLIBCXX__), we
  just enable Q_COMPILER_INITIALIZER_LISTS support only when libc++ is used
  (there should be no reason for someone to be using clang with GCC 4.8's
  libstdc++, for example).

  x11/kdelibs4's FindQt4.cmake had to include a backported change from the
  upstream FindQt4.cmake in CMake itself to use a C++ compiler to detect
  flags like Q_WS_X11, otherwise the inclusion of <ciso646> in qglobal.h
  makes the build fail.

This patch contains changes by me, makc@ and alonso@.

PR:             202552 [1]
PR:             202808 [exp-run]
Submitted by:	pawel@ [1]
2015-09-16 08:55:04 +00:00

106 lines
4 KiB
Makefile

# Created by: arved@FreeBSD.org
# $FreeBSD$
PORTNAME= kdelibs
PORTVERSION= ${KDE4_VERSION}
PORTREVISION= 1
CATEGORIES= x11 kde
MASTER_SITES= KDE/${KDE4_BRANCH}/${PORTVERSION}/src
DIST_SUBDIR= KDE/${PORTVERSION}
MAINTAINER= kde@FreeBSD.org
COMMENT= Base set of libraries needed by KDE programs
LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR \
libjasper.so:${PORTSDIR}/graphics/jasper \
libpcre.so:${PORTSDIR}/devel/pcre \
libavahi-core.so:${PORTSDIR}/net/avahi-app \
libenchant.so:${PORTSDIR}/textproc/enchant \
libgif.so:${PORTSDIR}/graphics/giflib \
libpng.so:${PORTSDIR}/graphics/png \
libhal.so:${PORTSDIR}/sysutils/hal \
libqca.so:${PORTSDIR}/devel/qca \
libHUpnp.so:${PORTSDIR}/net/hupnp \
libpolkit-qt-core-1.so:${PORTSDIR}/sysutils/polkit-qt \
libdbusmenu-qt.so:${PORTSDIR}/devel/libdbusmenu-qt \
libgrantlee_gui.so:${PORTSDIR}/devel/grantlee
BUILD_DEPENDS= docbook-xml>0:${PORTSDIR}/textproc/docbook-xml \
${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
RUN_DEPENDS= ${LOCALBASE}/share/icons/hicolor/index.theme:${PORTSDIR}/misc/hicolor-icon-theme \
xauth:${PORTSDIR}/x11/xauth \
docbook-xml>0:${PORTSDIR}/textproc/docbook-xml \
${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
USE_GNOME= libxml2 libxslt
USE_KDE4= kdeprefix oxygen \
attica automoc4 ontologies soprano strigi
USES= cmake:outsource fam gettext jpeg perl5 shared-mime-info shebangfix tar:xz
USE_OPENSSL= yes
USE_QT4= corelib dbus declarative designer_build gui \
network opengl phonon qt3support \
qtestlib script sql svg webkit xml \
moc_build qmake_build rcc_build uic_build \
imageformats_run qdbusviewer_run
USE_XORG= sm x11 xcursor xext xfixes xft xpm xrender xtst
USE_LDCONFIG= yes
MAKE_ENV= XDG_CONFIG_HOME=/dev/null
CMAKE_ARGS+= -DWITH_ACL:BOOL=Off \
-DWITH_FAM:BOOL=On \
-DWITH_ASPELL:BOOL=Off \
-DWITH_HSPELL:BOOL=Off \
-DWITH_UDev:BOOL=Off \
-DHUPNP_ENABLED:BOOL=On \
-DKDE_DISTRIBUTION_TEXT:STRING="${OPSYS}" \
-DKDE_DEFAULT_HOME:STRING=".kde4"
SHEBANG_FILES= kdecore/kconfig_compiler/checkkcfg.pl \
kdeui/preparetips \
khtml/bindings/scripts/generate-bindings.pl \
kio/misc/fileshareset \
kio/useragent.pl \
kio/proxytype.pl \
kioslave/http/kcookiejar/kcookiescfg.pl
post-patch:
${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
${PATCH_WRKSRC}/kde3support/kdeui/k3sconfig.cpp \
${PATCH_WRKSRC}/kdecore/network/k3socks.cpp \
${PATCH_WRKSRC}/kdecore/kernel/kstandarddirs.cpp \
${PATCH_WRKSRC}/kdeui/dialogs/kcupsoptionswidget_p.cpp \
${PATCH_WRKSRC}/kdeui/kernel/start-session-bus.sh \
${PATCH_WRKSRC}/kio/kssl/kopenssl.cpp \
${PATCH_WRKSRC}/kio/kio/ksambashare.cpp \
${PATCH_WRKSRC}/kjsembed/qtonly/FindQJSInternal.cmake
# Fix rgb named colors database path.
${REINPLACE_CMD} -e 's|/usr/X11R6|${LOCALBASE}|g' \
${PATCH_WRKSRC}/kdeui/colors/kcolordialog.cpp
pre-configure:
${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
-e 's|/usr/X11R6|${LOCALBASE}|g' \
${PATCH_WRKSRC}/cmake/modules/*.cmake \
${PATCH_WRKSRC}/ConfigureChecks.cmake \
${PATCH_WRKSRC}/doc/api/doxygen.sh
${REINPLACE_CMD} -e 's|/usr/include|${LOCALBASE}/include|g' \
${PATCH_WRKSRC}/cmake/modules/FindDNSSD.cmake
${REINPLACE_CMD} -e 's|soprano/cmake|cmake/Modules|g' \
${PATCH_WRKSRC}/cmake/modules/FindSoprano.cmake
# FindBerkeleyDB.cmake should be rewritten to support multiple version
# provided by ports, instead of hardcoding one of them
# ${REINPLACE_CMD} -e 's|/usr/local/include/db4|${BDB_INCLUDE_DIR}|' \
# -e 's|NAMES db|NAMES ${BDB_LIB_NAME} ${LOCALBASE}/lib|' \
# ${PATCH_WRKSRC}/cmake/modules/FindBerkeleyDB.cmake
# When XSync (xext) is found, xscreensaver is just used as a fallback,
# then we can disable it.
${REINPLACE_CMD} -e '/macro_bool_to_01/ s|^.*X11_Xscreensaver.*$$|set(HAVE_XSCREENSAVER 0)|' \
${PATCH_WRKSRC}/CMakeLists.txt
post-install:
# workaround for non-standard mime files and directories
${MKDIR} ${STAGEDIR}/${PREFIX}/share/mime/all \
${STAGEDIR}/${PREFIX}/share/mime/uri
.include <bsd.port.mk>