diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | cmake_fix_gc.patch | 64 |
3 files changed, 74 insertions, 5 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri Apr 28 09:50:50 UTC 2017 +# Wed May 24 09:23:04 UTC 2017 pkgbase = madx-dev pkgdesc = Accelerator Optics simulation code, latest development release pkgver = 5.03.04 - pkgrel = 1 + pkgrel = 2 url = http://cern.ch/mad arch = x86_64 license = custom @@ -14,7 +14,9 @@ pkgbase = madx-dev provides = madx conflicts = madx-svn source = http://madx.web.cern.ch/madx/releases/5.03.04/madx-src.tgz + source = cmake_fix_gc.patch md5sums = efd9df109045cb7937621ec647d86ec0 + md5sums = 9edea53d6653e16dc1dbf8853f3d8fe5 pkgname = madx-dev @@ -2,7 +2,7 @@ pkgname=madx-dev pkgver=5.03.04 -pkgrel=1 +pkgrel=2 pkgdesc="Accelerator Optics simulation code, latest development release" url="http://cern.ch/mad" license=("custom") @@ -15,12 +15,15 @@ arch=('x86_64') tarball=madx-src.tgz extract=madx-${pkgver} -source=("http://madx.web.cern.ch/madx/releases/${pkgver}/${tarball}") -md5sums=('efd9df109045cb7937621ec647d86ec0') +source=("http://madx.web.cern.ch/madx/releases/${pkgver}/${tarball}" + cmake_fix_gc.patch) +md5sums=('efd9df109045cb7937621ec647d86ec0' + '9edea53d6653e16dc1dbf8853f3d8fe5') prepare() { cd ${srcdir}/${extract} find . -name '._*' -print0 | xargs -0 -r rm + patch -p1 < ${srcdir}/cmake_fix_gc.patch mkdir -p ${srcdir}/build cd ${srcdir}/build diff --git a/cmake_fix_gc.patch b/cmake_fix_gc.patch new file mode 100644 index 000000000000..aae8d42e562d --- /dev/null +++ b/cmake_fix_gc.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a74201..56064a4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,8 @@ include(setupOptions) + # We add libraries before setting up compilers because + # some of our options are incompatible with e.g. GC + if(USE_GC) +- add_subdirectory(libs/gc/gc) ++ set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++ add_subdirectory(libs/gc/gc-7.2f) + endif() + + # +diff --git a/cmake/ndifftests.cmake b/cmake/ndifftests.cmake +index 4d04afc..b0e2344 100644 +--- a/cmake/ndifftests.cmake ++++ b/cmake/ndifftests.cmake +@@ -74,11 +74,6 @@ ndiff_test(test-thick-quad 0) + ndiff_test(test-thick-quad-2 0) + ndiff_test(test-thick-quad-3 0) + +-if(USE_GC) +- ndiff_test(test-memory 1) +- set_tests_properties(test-memory_LONG PROPERTIES TIMEOUT 60) +-endif() +- + ndiff_test(test-survey-2 0) + + ndiff_test(test-cororbit 1) +@@ -150,6 +145,7 @@ ndiff_test(test-table 0) + ndiff_test(test-line 0) + + ndiff_test(test-memory 1) ++# set_tests_properties(test-memory_LONG PROPERTIES TIMEOUT 60) + ndiff_test(test-beam 0) + set_tests_properties(test-beam PROPERTIES WILL_FAIL 1) + +diff --git a/cmake/setupOptions.cmake b/cmake/setupOptions.cmake +index b27ff09..743cf3e 100644 +--- a/cmake/setupOptions.cmake ++++ b/cmake/setupOptions.cmake +@@ -68,7 +68,7 @@ if(MADX_NTPSA) + add_definitions("-D_NTPSA") + endif() + +-option(USE_GC "Use Garbage Collector" OFF) ++option(USE_GC "Use Garbage Collector" ON) + if(USE_GC) + add_definitions("-D_USEGC") + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b98b4fc..2cf346a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -109,7 +109,7 @@ target_link_libraries(madx ${CMAKE_THREAD_LIBS_INIT} ${STDCPP_LIBS}) + + # Garbage collector: + if(USE_GC) +- include_directories(${CMAKE_SOURCE_DIR}/libs/gc/gc/include) ++ include_directories(${CMAKE_SOURCE_DIR}/libs/gc/gc-7.2f/include) + endif() + + # Defining specific stuff for packaging: |