freebsd-ports/math/freemat/files/patch-CMakeLists.txt
Greg Larkin d3f4123373 - Added new patches to support building under gcc 4.5 due to impending
default gcc version change when USE_FORTRAN=yes. Patches included from
  http://bugs.gentoo.org/show_bug.cgi?id=318045. [1]

- Renamed and conditionalized some patches to support tgammaf function
  on OSVERSION < 800023.  Previously, it was included even when present
  in the system math library.  Also fixed name-mangling problem in the
  patches.  Declarations were wrapped in 'extern "C"', but the
  definitions were not, causing a linker error.

- Added a patch to CMakeLists.txt to prevent cmake from changing rpath
  during the installation phase.  That caused libstdc++ from /usr/lib
  to be used instead of the one supplied with gcc 4.5.

Requested by:	gerald [1]
2010-09-24 14:58:14 +00:00

41 lines
1.5 KiB
Text

--- CMakeLists.txt.orig 2009-10-09 02:24:39.000000000 -0400
+++ CMakeLists.txt 2010-09-23 15:07:03.000000000 -0400
@@ -15,6 +15,20 @@
PROJECT(FreeMat CXX C )
+# skip the full RPATH for the build tree
+SET(CMAKE_SKIP_BUILD_RPATH TRUE)
+
+# when building, use the install RPATH already
+# (so it doesn't need to relink when installing)
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+
+# the RPATH to be used when installing
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+
+# add the automatically determined parts of the RPATH
+# which point to directories outside the build tree to the install RPATH
+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+#
SET(CPACK_PACKAGE_VERSION_MAJOR "4")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
@@ -217,7 +231,7 @@
INCLUDE_DIRECTORIES(${PORTAUDIO_SYS_INCLUDE_DIR})
SET (PORTAUDIO_LIBRARY ${PORTAUDIO_SYS_LIBRARY})
ENDIF (FORCE_BUNDLED_PORTAUDIO OR NOT SYSTEM_PORTAUDIO_AVAILABLE)
-ADD_DEFINITIONS( -DHAVE_PORTAUDIO19)
+ADD_DEFINITIONS( -DHAVE_PORTAUDIO18)
SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} ${PORTAUDIO_LIBRARY})
IF (APPLE)
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
@@ -245,7 +259,7 @@
######################################################################
# LLVM Support
######################################################################
-OPTION(USE_LLVM "Build with LLVM support?" ON)
+OPTION(USE_LLVM "Build with LLVM support?" OFF)
IF( USE_LLVM )
set(LLVM_FOUND FALSE)