freebsd-ports/misc/qt5-doc/Makefile
Kurt Jaeger 97b7725f31 New port: misc/qt5-doc
This port builds and installs the Qt5 API documentation for use
with IDEs such as qtcreator or kdevelop in qch file format and HTML
file format.

Limitations: The port is made for Qt 5.5.1 and excludes the
documentation for qtwebkit, qtwebkit-examples and qtwebengine. The
reasons are, webkit is deprecated and should not be used for further
development, it will not be part of the Qt 5.6.x sources by default
and only provided on FreeBSD for backwards compatibility with ports.
API documentation may be later added to the qt5-webkit port (as
well for qtwebkit-examples). The qtwebengine hasn't been ported to
FreeBSD yet, so no documenation can be generated either.

The build process uses the full qt source tarball and uses configure
with the respective platform (freebsd-g++ or freebsd-clang). During
configure, the qmake tool is compiled that generates the Makefiles
for doc creation. While the qt5-qmake could also be used, it currently
generates the documentation without the correct links and replaces
them with text, which makes the API documentation useless with
respect to the workflow. The compiling of qmake has been accepted
for now as a minor drawback of the port.

PR:		209861
Submitted by:	Ralf Nolden <nolden@kde.org> (kde)
2016-05-31 18:02:42 +00:00

69 lines
2 KiB
Makefile

# Created by: Ralf Nolden <nolden@kde.org>
# $FreeBSD$
PORTNAME= doc
DISTVERSION= ${QT5_VERSION}
CATEGORIES= misc
MASTER_SITES= QT/${QT5_BRANCH}/qt/${QT5_VERSION:R}/${QT5_VERSION}/${QT5_SUBDIR}
PKGNAMEPREFIX= qt5-
DISTNAME= qt-everywhere-opensource-src-${QT5_VERSION}
DIST_SUBDIR= KDE/Qt/${QT5_VERSION}
MAINTAINER= kde@FreeBSD.org
COMMENT= Qt 5 documentation
NO_ARCH= yes
USE_QT5= help_build qdoc_build sql_build sql-sqlite3_build \
buildtools_build qmake_build
USES= compiler:c++11-lib python:build tar:xz
HAS_CONFIGURE= yes
CONFIGURE_OUTSOURCE= yes
QT_NONSTANDARD= yes
CONFIGURE_ARGS= -opensource -confirm-license -developer-build -nomake tests
.include <bsd.port.pre.mk>
# If we are on a system without gcc make qmake use the internal freebsd-clang
# mkspec.
.if ${COMPILER_TYPE:Mclang}
CONFIGURE_ARGS+= -platform unsupported/freebsd-clang
.endif
EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/qtwebkit,:S,^,--exclude ,} \
${DISTNAME:S,$,/qtwebkit-examples,:S,^,--exclude ,} \
${DISTNAME:S,$,/qtwebengine,:S,^,--exclude ,}
DOCSDIR= ${PREFIX}/share/doc/qt5
MAKE_JOBS_UNSAFE= YES
ALL_TARGET= docs
DESCR= ${.CURDIR:H:H}/devel/qt5/pkg-descr
post-extract:
${MKDIR} ${BUILD_WRKSRC}/qtbase/bin
${LN} -sf ${MOC} ${BUILD_WRKSRC}/qtbase/bin/moc
${LN} -sf ${UIC} ${BUILD_WRKSRC}/qtbase/bin/uic
${LN} -sf ${RCC} ${BUILD_WRKSRC}/qtbase/bin/rcc
${LN} -sf ${QT_BINDIR}/qdoc ${BUILD_WRKSRC}/qtbase/bin/qdoc
${LN} -sf ${QT_BINDIR}/qhelpgenerator ${BUILD_WRKSRC}/qtbase/bin/qhelpgenerator
post-patch:
# qtdeclarative.pro wants to run python, replace that with PYTHON_CMD
${REINPLACE_CMD} '/py_out/s#python#${PYTHON_CMD}#g' \
${WRKSRC}/qtdeclarative/qtdeclarative.pro
# Make mkspecs/freebsd-g++ use the correct gcc for the build.
.if ${COMPILER_TYPE:Mgcc}
${REINPLACE_CMD} -e 's#gcc#${CC}#g' \
-e 's#g++#${CXX}#g' \
${PATCH_WRKSRC}/qtbase/mkspecs/common/g++-base.conf
.endif
do-install:
${MKDIR} ${STAGEDIR}${DOCSDIR} && \
cd ${BUILD_WRKSRC}/qtbase/doc && \
${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk>