From owner-svn-ports-all@freebsd.org Sun Nov 29 19:27:45 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E885A3A74A; Sun, 29 Nov 2015 19:27:45 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 357361A99; Sun, 29 Nov 2015 19:27:45 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATJRi4F000973; Sun, 29 Nov 2015 19:27:44 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATJRi6T000971; Sun, 29 Nov 2015 19:27:44 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201511291927.tATJRi6T000971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sun, 29 Nov 2015 19:27:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r402617 - in branches/2015Q4/audio/libkcompactdisc: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 19:27:45 -0000 Author: rakuco Date: Sun Nov 29 19:27:43 2015 New Revision: 402617 URL: https://svnweb.freebsd.org/changeset/ports/402617 Log: MFH: r402530 r402545 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 Fix the ALSA=OFF build after r402530. Both extrapatch-no_alsa and patch-git_d6927712 touch the same region of CMakeLists.txt, and the latter was failing to apply when the ALSA option was disabled. Fix it by keeping patch-git_d6927712 (which fixes the CFLAGS values regardless of the value of the ALSA option) and replacing extrapatch-no_alsa with some post-patch/post-configure changes that achieve the same end result. PR: 204858 Approved by: ports-secteam (feld) Added: branches/2015Q4/audio/libkcompactdisc/files/patch-git_d6927712 - copied unchanged from r402530, head/audio/libkcompactdisc/files/patch-git_d6927712 Deleted: branches/2015Q4/audio/libkcompactdisc/files/extrapatch-no_alsa Modified: branches/2015Q4/audio/libkcompactdisc/Makefile Directory Properties: branches/2015Q4/ (props changed) Modified: branches/2015Q4/audio/libkcompactdisc/Makefile ============================================================================== --- branches/2015Q4/audio/libkcompactdisc/Makefile Sun Nov 29 19:12:03 2015 (r402616) +++ branches/2015Q4/audio/libkcompactdisc/Makefile Sun Nov 29 19:27:43 2015 (r402617) @@ -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} @@ -18,6 +19,12 @@ USE_LDCONFIG= yes OPTIONS_DEFINE= ALSA ALSA_LIB_DEPENDS= libasound.so:${PORTSDIR}/audio/alsa-lib -ALSA_EXTRA_PATCHES_OFF= ${FILESDIR}/extrapatch-no_alsa + +post-patch-ALSA-off: + ${REINPLACE_CMD} -e '/find_package(Alsa)/d' \ + -e '/alsa_configure_file/d' ${WRKSRC}/CMakeLists.txt + +post-configure-ALSA-off: + ${TOUCH} ${CONFIGURE_WRKSRC}/config-alsa.h .include Copied: branches/2015Q4/audio/libkcompactdisc/files/patch-git_d6927712 (from r402530, head/audio/libkcompactdisc/files/patch-git_d6927712) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2015Q4/audio/libkcompactdisc/files/patch-git_d6927712 Sun Nov 29 19:27:43 2015 (r402617, copy of r402530, head/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 +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) +