diff options
author | bartus | 2020-07-05 16:02:33 +0200 |
---|---|---|
committer | bartus | 2020-07-20 14:07:55 +0200 |
commit | 417262785339abd501d8e5ffa3a6c69f300409a7 (patch) | |
tree | db6f0db405f4d9e929647b2aa2a7b139af2114d8 | |
parent | 6ff4e1a75270c65cd52a279659d6aa618ecedfff (diff) | |
download | aur-417262785339abd501d8e5ffa3a6c69f300409a7.tar.gz |
Fix llvm10 build.
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | llvm10.0.0.patch | 76 |
3 files changed, 106 insertions, 20 deletions
@@ -1,6 +1,6 @@ pkgbase = seexpr pkgdesc = An embeddable expression evaluation engine - pkgver = 3.0.0 + pkgver = 3.0.1 pkgrel = 1 url = https://www.disneyanimation.com/technology/seexpr.html arch = i686 @@ -23,8 +23,10 @@ pkgbase = seexpr optdepends = boost-libs: Python bindings provides = seexpr conflicts = seexpr - source = git+https://github.com/wdas/SeExpr.git#tag=v3.0.0 - md5sums = SKIP + source = git+https://github.com/wdas/SeExpr.git#tag=v3.0.1 + source = llvm10.0.0.patch + sha256sums = SKIP + sha256sums = e93da9176d30da97461825e8b9970f20a68aa652f032ea1d8a16076884ff20cb pkgname = seexpr @@ -1,7 +1,8 @@ # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> + +_fragment="#tag=v3.0.1" pkgname=('seexpr' 'seexpr-doc') -_fragment="#tag=v3.0.0" -pkgver=3.0.0 +pkgver=${_fragment###tag=v} pkgrel=1 pkgdesc="An embeddable expression evaluation engine" arch=('i686' 'x86_64') @@ -13,30 +14,38 @@ optdepends+=('boost-libs: Python bindings') makedepends=('boost' 'llvm' 'python-pyqt5' 'doxygen' 'libpng' 'cmake' 'git' 'sip' 'python-sip' 'gtest') provides=("${pkgname}") conflicts=("${pkgname}") -source=("git+https://github.com/wdas/SeExpr.git${_fragment}") -md5sums=('SKIP') +source=("git+https://github.com/wdas/SeExpr.git${_fragment}" + "llvm10.0.0.patch") +sha256sums=('SKIP' + 'e93da9176d30da97461825e8b9970f20a68aa652f032ea1d8a16076884ff20cb') + +prepare() { + git -C SeExpr apply -v ${srcdir}/llvm10.0.0.patch +} build() { - cd "$srcdir/SeExpr" - mkdir -p build - cd build - cmake -DCMAKE_INSTALL_PREFIX='/usr' -DCMAKE_INSTALL_LIBDIR='/usr/lib' -DPYQT_SIP_DIR='/usr/share/sip/PyQt5' -DENABLE_SLOW_TESTS=ON .. - make + cmake \ + -DCMAKE_INSTALL_PREFIX='/usr' \ + -DCMAKE_INSTALL_LIBDIR='/usr/lib' \ + -DUSE_PYTHON=OFF \ + -DENABLE_SLOW_TESTS=ON \ + -DGTEST_DIR=/usr \ + -S SeExpr \ + -B build + make -C build } check() { - cd "$srcdir/SeExpr/build" - make test + make -C build test } package_seexpr() { - cd "$srcdir/SeExpr/build" - make DESTDIR="$pkgdir/" install + make -C build DESTDIR="$pkgdir/" install # remove doc mkdir -p ${pkgdir}/../tmp/usr/share/ mv ${pkgdir}/usr/share/doc ${pkgdir}/../tmp/usr/share/ # Copy custom Apache license - install -D -m644 "../LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 "SeExpr/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_seexpr-doc() { @@ -47,8 +56,7 @@ package_seexpr-doc() { provides=() conflicts=() - cd ${srcdir}/SeExpr/build - mkdir -p ${pkgdir}/usr/share/ + install -dm644 ${pkgdir}/usr/share mv ${pkgdir}/../tmp/usr/share/doc ${pkgdir}/usr/share/ - install -D -m644 "../LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 "SeExpr/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/llvm10.0.0.patch b/llvm10.0.0.patch new file mode 100644 index 000000000000..1947e694206f --- /dev/null +++ b/llvm10.0.0.patch @@ -0,0 +1,76 @@ +From 6faaea4559ffb4c376243fcac74aefb3b00b6ec6 Mon Sep 17 00:00:00 2001 +From: bartus <szczepaniak.bartek+github@gmail.com> +Date: Sun, 19 Jul 2020 18:10:40 +0200 +Subject: [PATCH 1/2] Switch to c++14 for llvm10 compatibility. + +--- + CMakeLists.txt | 2 +- + src/SeExpr2/UI/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index acaec29..7081c9d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,7 +174,7 @@ else() + add_definitions(-Wall -Wextra -Wno-unused-parameter) + add_definitions(-pthread) + +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -std=c++11") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -g -std=c++14") + if (ENABLE_SSE4) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") + endif() +diff --git a/src/SeExpr2/UI/CMakeLists.txt b/src/SeExpr2/UI/CMakeLists.txt +index 678aafc..0cb3372 100644 +--- a/src/SeExpr2/UI/CMakeLists.txt ++++ b/src/SeExpr2/UI/CMakeLists.txt +@@ -166,7 +166,7 @@ if (Qt5_FOUND OR QT4_FOUND) + + set(CMAKE_INSTALL_PYTHON "${PYTHON_SITE}/SeExpr2" ) + +- set(CMAKE_CXX_FLAGS "-std=c++11") ++ set(CMAKE_CXX_FLAGS "-std=c++14") + include_directories(${SIP_INCLUDE_DIR} + ${PYQT_SIP_DIR} + ${PYTHON_INCLUDE_DIR}) +-- +2.27.0 + + +From 023af0cc68f0314b24a94ca06a6dae58ce94cc53 Mon Sep 17 00:00:00 2001 +From: bartus <szczepaniak.bartek+github@gmail.com> +Date: Sun, 19 Jul 2020 18:12:30 +0200 +Subject: [PATCH 2/2] Revert "Noise: revert to explicit conversions for clang + compatibility" + +This reverts commit 6d8479583a8072856e0e98b5fcf178b33e58d9c1. +--- + src/SeExpr2/Noise.cpp | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/src/SeExpr2/Noise.cpp b/src/SeExpr2/Noise.cpp +index 17c7c5d..88722b9 100644 +--- a/src/SeExpr2/Noise.cpp ++++ b/src/SeExpr2/Noise.cpp +@@ -28,14 +28,10 @@ namespace { + namespace SeExpr2 { + + #ifdef __SSE4_1__ +-inline double floorSSE(double val) +-{ +- return _mm_cvtsd_f64(_mm_floor_sd(_mm_set_sd(0.0), _mm_set_sd(val))); +-} ++inline double floorSSE(double val) { return _mm_floor_sd(_mm_set_sd(0.0), _mm_set_sd(val))[0]; } + +-inline double roundSSE(double val) +-{ +- return _mm_cvtsd_f64(_mm_round_sd(_mm_set_sd(0.0), _mm_set_sd(val), _MM_FROUND_TO_NEAREST_INT)); ++inline double roundSSE(double val) { ++ return _mm_round_sd(_mm_set_sd(0.0), _mm_set_sd(val), _MM_FROUND_TO_NEAREST_INT)[0]; + } + #else + #define floorSSE floor +-- +2.27.0 + |