freebsd-ports/multimedia/qt5-multimedia/Makefile
Raphael Kubo da Costa 3346021972 Update the Qt5 ports to 5.6.1.
This took longer than expected, but there are quite a few changes to the
existing ports and a few new ones.

General upstream changes:
- Starting with Qt 5.6.2, Qt will fail at configuration time if LibreSSL is
  being used. According to the discussion here:
  https://codereview.qt-project.org/#/c/154800/
  The Qt project is not opposed to LibreSSL, but does not want to mix
  support for it into the OpenSSL backend code, especially as they move
  towards supporting OpenSSL 1.1.
  People interested in LibreSSL support are welcome to submit a separate
  backend upstream, but are expected to maintain it. We (kde@) are not
  opposed to carrying some patches authored by others in the future, as long
  as they are not huge and destabilizing.
- When Qt detects the compiler supports C++11, it will pass -std=gnu++11 by
  default (this is an upstream change). You can add "CONFIG -= c++11" to
  your .pro. Qt 5.7 will require C++11.
- www/webkit-qt5: The QtWebKit module is deprecated upstream, and is shipped
  separately as a community release tarball. kde@ does not have an ETA for a
  qt5-webengine port, as it requires a huge effort (and number of patches)
  similar to maintaining www/chromium itself.
- x11-toolkits/qt5-declarative has been deprecated upstream. The last
  release is 5.5.1.

Relevant changes:
- devel/qmake5: The freebsd-clang mkspec has become the default mkspec on
  FreeBSD, replacing the outdated freebsd-g++ one that was moved to
  unsupported/ (it still works though).
- devel/qt5-qdoc: qdoc was moved to qttools upstream, but its data files are
  still in qtbase. The data files are now in the qt5-qdoc-data port.
- misc/qt5-doc: Clean up and stop requiring a compiler and fumbling with
  mkspecs. Instead of running the `configure' script, which requires a
  compiler and adjustments to the mkspecs files and also ends up building a
  new qmake binary, we now leverage USES=qmake to generate all the Makefiles
  from the top-level qt.pro. Getting this to work requires some tricks,
  though, and qt.conf.in has a longer explanation of what's being done.
  Switch to USES=gmake to be able to drop MAKE_JOBS_UNSAFE=yes.

New ports:
- comms/qt5-serialbus
- devel/qt5-qdoc-data
- x11-toolkits/qt5-quickcontrols2

Big thanks to Adriaan de Groot (groot@kde.org), tcberner@ and Loise Nolden
(nolden@kde.org) for the huge amount of work they put into this
patch. Loise in particular also sent quite a few changes upstream that were
essential for this update to work.

PR:		211916
2016-09-17 09:46:54 +00:00

78 lines
1.7 KiB
Makefile

# $FreeBSD$
PORTNAME= multimedia
DISTVERSION= ${QT5_VERSION}
CATEGORIES= multimedia
PKGNAMEPREFIX= qt5-
MAINTAINER= kde@FreeBSD.org
COMMENT= Qt audio, video, radio and camera support module
USE_GL= yes
USE_QT5= core gui network opengl qml quick widgets \
buildtools_build
QT_DIST= ${PORTNAME}
USE_XORG= x11 xext xv
USES= pkgconfig qmake
USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL}
QT_DEFINES= XVIDEO
QT_CONFIG= xlib
OPTIONS_DEFINE= AUDIOPLUGIN GSTREAMER OPENAL
OPTIONS_DEFAULT= GSTREAMER
OPTIONS_RADIO= AUDIOPLUGIN
OPTIONS_RADIO_AUDIOPLUGIN= ALSA PULSEAUDIO
OPTIONS_SUB= yes
AUDIOPLUGIN_DESC= Audio plugins to build
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
GSTREAMER_BUILD_DEPENDS=${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
GSTREAMER_EXTRA_PATCHES_OFF= ${FILESDIR}/extrapatch-no-gstreamer
GSTREAMER_USE= GSTREAMER1=bad
OPENAL_USES= openal
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MALSA}
QT_DEFINES+= ALSA
QT_CONFIG+= alsa
.else
TBR_DEPENDS+= alsa
QT_DEFINES+= -ALSA
QT_CONFIG+= -alsa
.endif
.if ${PORT_OPTIONS:MGSTREAMER}
QT_DEFINES+= GSTREAMER
QT_CONFIG+= gstreamer-1.0
.else
TBR_DEPENDS+= gstreamer
QT_DEFINES+= -GSTREAMER
QT_CONFIG+= -gstreamer-1.0
.endif
.if ! ${PORT_OPTIONS:MOPENAL}
TBR_DEPENDS+= openal
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
QT_DEFINES+= PULSEAUDIO
QT_CONFIG+= pulseaudio
.else
TBR_DEPENDS+= pulseaudio
QT_DEFINES+= -PULSEAUDIO
QT_CONFIG+= -pulseaudio
.endif
post-patch:
.for d in ${TBR_DEPENDS}
@${REINPLACE_CMD} -e '/${d}/ d' \
${WRKSRC}/qtmultimedia.pro
.endfor
@${REINPLACE_CMD} -e 's|<linux/types.h>|<sys/types.h>|' \
${WRKSRC}/src/plugins/v4l/radio/v4lradiocontrol.h
.include <bsd.port.mk>