summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhirui Dai2023-09-28 13:51:39 -0700
committerZhirui Dai2023-09-28 13:51:39 -0700
commit18558a42c1823a57d53ca53725eaf01481931ae6 (patch)
treeed80662fb6ffdd52843e873be088579b7affea5c
parentc1f5391704ccb7866fc972536affacb3adc2f6ce (diff)
downloadaur-18558a42c1823a57d53ca53725eaf01481931ae6.tar.gz
fix compiling with gpu13
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD32
-rw-r--r--cxx_standard.patch62
-rw-r--r--gnu13.patch26
4 files changed, 117 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index afed6f7b480e..0579a8c740ad 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = fcl-git
pkgdesc = Flexible Collision Library. Git version.
- pkgver = 20131028
+ pkgver = r860.3f3d98a3
pkgrel = 1
url = https://github.com/flexible-collision-library
arch = i686
@@ -8,13 +8,17 @@ pkgbase = fcl-git
license = BSD
makedepends = cmake
depends = boost
- depends = libccd
+ depends = libccd-git
optdepends = octomap: collision detection with octrees
optdepends = tinyxml: support for global penetration depth test
optdepends = flann: support for fast approximate nearest neighbor searches
provides = fcl
- source = fcl::git://github.com/flexible-collision-library/fcl.git#branch=master
- md5sums = SKIP
+ conflicts = fcl
+ source = fcl::git+https://github.com/flexible-collision-library/fcl.git#branch=master
+ source = cxx_standard.patch
+ source = gnu13.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = fcl-git
-
diff --git a/PKGBUILD b/PKGBUILD
index cac545b527ac..ad4eceb65803 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,37 +2,45 @@
pkgdesc="Flexible Collision Library. Git version."
url='https://github.com/flexible-collision-library'
pkgname=fcl-git
-pkgver=20131028
+pkgver=r860.3f3d98a3
arch=('i686' 'x86_64')
pkgrel=1
license=('BSD')
makedepends=('cmake')
-depends=('boost' 'libccd')
+depends=('boost' 'libccd-git')
optdepends=('octomap: collision detection with octrees'
'tinyxml: support for global penetration depth test'
'flann: support for fast approximate nearest neighbor searches')
_dir=fcl
-source=("$_dir"::'git://github.com/flexible-collision-library/fcl.git'#branch=master)
-md5sums=('SKIP')
+source=(
+ "$_dir"::'git+https://github.com/flexible-collision-library/fcl.git'#branch=master
+ cxx_standard.patch
+ gnu13.patch
+)
+sha256sums=('SKIP' 'SKIP' 'SKIP')
provides=('fcl')
conficts=('fcl')
pkgver() {
- date +%Y%m%d
+ cd "${srcdir}/${_dir}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${srcdir}/${_dir}"
+ patch -p1 -i "${srcdir}/cxx_standard.patch"
+ patch -p1 -i "${srcdir}/gnu13.patch"
}
build() {
[ -d ${srcdir}/build ] || mkdir ${srcdir}/build
cd ${srcdir}/build
- cmake ${srcdir}/${_dir} -DCMAKE_INSTALL_PREFIX=/usr
- make
+ cmake ${srcdir}/${_dir} -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTING=OFF
+ make -j`nproc`
}
-#check() {
-# cd "${srcdir}/build/test"
-# make test
-#}
-
package() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}/" install
diff --git a/cxx_standard.patch b/cxx_standard.patch
new file mode 100644
index 000000000000..41d058df74e8
--- /dev/null
+++ b/cxx_standard.patch
@@ -0,0 +1,62 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1eb48c2..b934ced 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -342,7 +342,7 @@ add_subdirectory(include/fcl)
+
+ set(PKG_DESC "Flexible Collision Library")
+
+-set(CMAKE_CXX_STANDARD 14)
++set(CMAKE_CXX_STANDARD 17)
+
+ configure_file(fcl.pc.in fcl.pc @ONLY)
+
+diff --git a/CMakeModules/CompilerSettings.cmake b/CMakeModules/CompilerSettings.cmake
+index 96b9e1f..645ca38 100644
+--- a/CMakeModules/CompilerSettings.cmake
++++ b/CMakeModules/CompilerSettings.cmake
+@@ -33,7 +33,7 @@
+
+ # GCC
+ if(CMAKE_COMPILER_IS_GNUCXX)
+- add_definitions(-std=c++11 -W -Wall -Wextra -Wpedantic)
++ add_definitions(-W -Wall -Wextra -Wpedantic)
+ if(FCL_TREAT_WARNINGS_AS_ERRORS)
+ add_definitions(-Werror)
+ endif()
+@@ -41,7 +41,7 @@ endif()
+
+ # Clang
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+- add_definitions(-std=c++11 -W -Wall -Wextra)
++ add_definitions(-W -Wall -Wextra)
+ if(FCL_TREAT_WARNINGS_AS_ERRORS)
+ add_definitions(-Werror)
+ endif()
+@@ -53,7 +53,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
+ message(FATAL_ERROR "AppleClang version must be at least 6.1!")
+ endif()
+- add_definitions(-std=c++11 -W -Wall -Wextra)
++ add_definitions(-W -Wall -Wextra)
+ if(FCL_TREAT_WARNINGS_AS_ERRORS)
+ add_definitions(-Werror)
+ endif()
+@@ -77,7 +77,7 @@ else()
+ set(IS_ICPC 0)
+ endif()
+ if(IS_ICPC)
+- add_definitions(-std=c++11 -wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196)
++ add_definitions(-wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196)
+ set(CMAKE_AR "xiar" CACHE STRING "Intel archiver" FORCE)
+ set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "Default compile flags" FORCE)
+ set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG"
+@@ -97,7 +97,7 @@ else()
+ set(IS_XLC 0)
+ endif()
+ if(IS_XLC)
+- add_definitions(-std=c++11 -qpic -q64 -qmaxmem=-1)
++ add_definitions(-qpic -q64 -qmaxmem=-1)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -q64")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -q64")
+ endif()
diff --git a/gnu13.patch b/gnu13.patch
new file mode 100644
index 000000000000..a5bdad7de163
--- /dev/null
+++ b/gnu13.patch
@@ -0,0 +1,26 @@
+diff --git a/include/fcl/geometry/shape/convex-inl.h b/include/fcl/geometry/shape/convex-inl.h
+index ef3dc75..812d5a5 100644
+--- a/include/fcl/geometry/shape/convex-inl.h
++++ b/include/fcl/geometry/shape/convex-inl.h
+@@ -44,7 +44,7 @@
+ #include <set>
+ #include <sstream>
+ #include <utility>
+-
++#include <cassert>
+ #include "fcl/geometry/shape/convex.h"
+ #include "fcl/geometry/shape/representation.h"
+
+diff --git a/include/fcl/math/motion/taylor_model/taylor_model-inl.h b/include/fcl/math/motion/taylor_model/taylor_model-inl.h
+index 861f72d..e7885ca 100644
+--- a/include/fcl/math/motion/taylor_model/taylor_model-inl.h
++++ b/include/fcl/math/motion/taylor_model/taylor_model-inl.h
+@@ -40,7 +40,7 @@
+
+ #ifndef FCL_CCD_TAYLOR_MODEL_INL_H
+ #define FCL_CCD_TAYLOR_MODEL_INL_H
+-
++#include <cassert>
+ #include "fcl/math/motion/taylor_model/taylor_model.h"
+
+ namespace fcl