summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gläßle2016-05-17 20:48:21 +0200
committerThomas Gläßle2016-05-17 20:52:50 +0200
commit8e61617ecdb81c6b2f0ade4124d192740e3c3fa4 (patch)
tree55c15d4c42b58e1d01fa055467f0556df9e36992
parentb342bae139ac5badc671a0af9ad712a5eb22899a (diff)
downloadaur-8e61617ecdb81c6b2f0ade4124d192740e3c3fa4.tar.gz
Fix problem with Fortran 6.X.X
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD17
-rw-r--r--setupGNU.cmake.patch11
3 files changed, 26 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ee2dfd2af1f..b29e45b04b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue Jan 19 17:44:11 UTC 2016
+# Tue May 17 18:52:31 UTC 2016
pkgbase = madx-dev
pkgdesc = Accelerator Optics simulation code, latest development release
pkgver = 5.02.08
- 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.02.08/madx-src.tgz
+ source = setupGNU.cmake.patch
md5sums = eeb4242faf8ffeb1d195899e6362d4d4
+ md5sums = b0d47db22fb4b24ff5b30d58f3d35b6f
pkgname = madx-dev
diff --git a/PKGBUILD b/PKGBUILD
index 427d6768574..c3a7f8f44c1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=madx-dev
pkgver=5.02.08
-pkgrel=1
+pkgrel=2
pkgdesc="Accelerator Optics simulation code, latest development release"
url="http://cern.ch/mad"
license=("custom")
@@ -16,14 +16,19 @@ arch=('x86_64')
tarball=madx-src.tgz
sources=madx-${pkgver}
-source=("http://madx.web.cern.ch/madx/releases/${pkgver}/${tarball}")
-md5sums=('eeb4242faf8ffeb1d195899e6362d4d4')
+source=("http://madx.web.cern.ch/madx/releases/${pkgver}/${tarball}"
+ setupGNU.cmake.patch)
+md5sums=('eeb4242faf8ffeb1d195899e6362d4d4'
+ 'b0d47db22fb4b24ff5b30d58f3d35b6f')
prepare() {
- mkdir build
- cd build
-
+ cd ${srcdir}/${sources}
find . -name '._*' -print0 | xargs -0 -r rm
+ patch -p0 <../setupGNU.cmake.patch
+ cd ..
+
+ mkdir -p build
+ cd build
cmake \
-DCMAKE_C_COMPILER=gcc \
diff --git a/setupGNU.cmake.patch b/setupGNU.cmake.patch
new file mode 100644
index 00000000000..7715673e249
--- /dev/null
+++ b/setupGNU.cmake.patch
@@ -0,0 +1,11 @@
+--- cmake/compilers/setupGNU.cmake 2013-10-14 19:19:25.000000000 +0200
++++ cmake/compilers/setupGNU.cmake.new 2016-05-17 20:26:30.998737834 +0200
+@@ -9,7 +9,7 @@
+ # General:
+ set(CMAKE_Fortran_FLAGS " -fno-range-check -fno-f2c -cpp ") # remove -g -O2 from main list
+ execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --version OUTPUT_VARIABLE CMAKE_Fortran_COMPILER_VERSION)
+- string(REGEX MATCH "[3-5].[0-9].[0-9]" CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION})
++ string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" CMAKE_Fortran_COMPILER_VERSION ${CMAKE_Fortran_COMPILER_VERSION})
+ if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER 4.3.9)
+ add_definitions(-D_GFORTRAN)
+ endif()