diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2015-11-28 21:37:47 +0800 |
---|---|---|
committer | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2015-11-28 21:37:47 +0800 |
commit | d26a9eea37dcc02c525ff005bd8850638eea46ab (patch) | |
tree | d487cf834c1585047cc4d9ef1d366881994c14df /audio | |
parent | 61b9d91d6cddb15a8099d12b43b57bd1e8f81ac1 (diff) | |
download | freebsd-ports-gnome-d26a9eea37dcc02c525ff005bd8850638eea46ab.tar.gz freebsd-ports-gnome-d26a9eea37dcc02c525ff005bd8850638eea46ab.tar.zst freebsd-ports-gnome-d26a9eea37dcc02c525ff005bd8850638eea46ab.zip |
Add upstream patch to fix the build with clang + ALSA option.
Extend the compiler check so that the code is built with -std=c99, which is
required by the ALSA headers. Bump PORTREVISION because this also changes
the build flags for GCC users.
PR: 204858
MFH: 2015Q4
Diffstat (limited to 'audio')
-rw-r--r-- | audio/libkcompactdisc/Makefile | 1 | ||||
-rw-r--r-- | audio/libkcompactdisc/files/patch-git_d6927712 | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/audio/libkcompactdisc/Makefile b/audio/libkcompactdisc/Makefile index a48debfecfd6..e31147b972e3 100644 --- a/audio/libkcompactdisc/Makefile +++ b/audio/libkcompactdisc/Makefile @@ -3,6 +3,7 @@ PORTNAME= libkcompactdisc PORTVERSION= ${KDE4_VERSION} +PORTREVISION= 1 CATEGORIES= audio kde MASTER_SITES= KDE/${KDE4_BRANCH}/${PORTVERSION}/src DIST_SUBDIR= KDE/${PORTVERSION} diff --git a/audio/libkcompactdisc/files/patch-git_d6927712 b/audio/libkcompactdisc/files/patch-git_d6927712 new file mode 100644 index 000000000000..e906498dca88 --- /dev/null +++ b/audio/libkcompactdisc/files/patch-git_d6927712 @@ -0,0 +1,33 @@ +Makes the port build with clang when the ALSA option is on. + +commit d69277128afb60999e420c533e826b0061fc40eb +Author: Raphael Kubo da Costa <rakuco@FreeBSD.org> +Date: Sat Nov 28 14:27:45 2015 +0100 + + Extend -std=c99 compiler flag to clang. + + The ALSA headers use features such as the `inline' keyword that require + C99 support. Commit e36c628 ("Fix compilation: ALSA no longer compiles + with -std=c90") started passing it to the compiler when GCC is used. + + We now do the same for clang with a better comment, and also append the + flag to the existing CMAKE_C_FLAGS, otherwise we lose several other + options which are set by FindKDE4Internal.cmake. + +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -7,9 +7,12 @@ include(MacroLibrary) + add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) + + ## Compiler flags +-if(CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_C_FLAGS "-std=c99") ## ALSA no longer compiles with -std=c90, see https://bugzilla.novell.com/show_bug.cgi?id=817077 ++if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") ++ # ALSA does not build with the default -std=iso9899:1990 from FindKDE4Internal.cmake. ++ # See https://bugzilla.novell.com/show_bug.cgi?id=817077 for more information. ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") + endif() ++ + find_package(Alsa) + alsa_configure_file(${CMAKE_CURRENT_BINARY_DIR}/config-alsa.h) + |