freebsd-ports/devel/kdevelop-pg-qt/files/patch-git_f32988db..5209a043
Raphael Kubo da Costa fcb5176bc8 - Support staging. [1]
- Fix a crash while building devel/kdevelop-php on FreeBSD 10 and HEAD by
  replacing USE_GCC=yes with USES=compiler:c++11-lib and importing some
  upstream commits related to improving clang support.

  Curiously enough, we did not have problems building this port with clang
  before per se. However, forcing GCC even on systems that use libc++ by
  default was causing crashes at runtime (ie. the ones that happened while
  building devel/kdevelop-php), probably due to STL mismatch issues.

  On the other hand, simply using USES=compiler:c++11-lib is not enough, as
  GCC only allows the use of the <unordered_set> header in C++11 mode, so
  the upstream patches are also needed.

  Bump PORTREVISION due to the change in the build dependencies.

Submitted by:	Schaich Alonso <alonsoschaich@fastmail.fm> [1]
2013-11-06 12:40:11 +00:00

31 lines
1 KiB
Text

commit f32988dbaefcad34ab7966676058629e73c438fd
Author: Milian Wolff <mail@milianw.de>
Date: Sun Aug 4 21:37:01 2013 +0200
Fix compile with clang, also enable exceptions there.
commit 5209a0439006c1ceac6e25fe583a8f1e068af0b8
Author: Sven Brauch <svenbrauch@googlemail.com>
Date: Sun Sep 8 01:24:00 2013 +0200
-std=c++11 -> -std=c++0x to fix build on build.kde.org
still builds with gcc 4.8
diff --git a/kdev-pg/CMakeLists.txt b/kdev-pg/CMakeLists.txt
index 7022121..57eb03b 100644
--- kdev-pg/CMakeLists.txt
+++ kdev-pg/CMakeLists.txt
@@ -4,9 +4,9 @@ PROJECT(kdevpg)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
REMOVE_DEFINITIONS(-DQT_NO_STL)
ADD_DEFINITIONS(-DQT_STL)
-if(CMAKE_COMPILER_IS_GNUCC)
- add_definitions(-fexceptions)
-endif(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
+ add_definitions(-fexceptions -std=c++0x)
+endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
QT4_ADD_RESOURCES(kdevpg_rcc_srcs ../unidata.qrc)