summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2019-06-01 21:33:02 -0400
committerAndrew Sun2019-06-01 21:33:02 -0400
commit8c72454f61e385a3eb37861a9e3fba9e1a29c15b (patch)
tree45c5a9b88f7413c01e8d88e8cf12cb7508664157
parent739e1ae49c0b68faf86fd61d72f3fd8ca5fc1ed8 (diff)
downloadaur-8c72454f61e385a3eb37861a9e3fba9e1a29c15b.tar.gz
sfcgal: update to 1.3.6
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD48
-rw-r--r--cgal-4.14.patch40
3 files changed, 78 insertions, 24 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b6b8801801ab..0788df6dcc97 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,11 @@
-# Generated by mksrcinfo v8
-# Wed Apr 6 08:19:55 UTC 2016
pkgbase = sfcgal
pkgdesc = Wrapper around the CGAL library that intents to implement 2D and 3D operations on OGC standards models
- pkgver = 1.3.0
+ pkgver = 1.3.6
pkgrel = 1
- url = http://oslandia.github.io/SFCGAL/index.html
+ url = https://oslandia.github.io/SFCGAL/index.html
arch = i686
arch = x86_64
- license = GPL
+ license = GPL2
makedepends = cmake
depends = cgal>=4.1
depends = boost
@@ -15,8 +13,10 @@ pkgbase = sfcgal
depends = mpfr
depends = openscenegraph
provides = sfcgal
- source = https://github.com/Oslandia/SFCGAL/archive/v1.3.0.tar.gz
- sha256sums = 7ed35439fc197e73790f4c3d1c1750acdc3044968769239b2185a7a845845df3
+ source = sfcgal-1.3.6.tar.gz::https://github.com/Oslandia/SFCGAL/archive/v1.3.6.tar.gz
+ source = cgal-4.14.patch
+ sha256sums = 5840192eb4a1a4e500f65eedfebacd4bc4b9192c696ea51d719732dc2c75530a
+ sha256sums = 64b7c850fc7ed576e5a13c69ce5e8352ef63d800c4dcea23c77883ca9231d6ed
pkgname = sfcgal
diff --git a/PKGBUILD b/PKGBUILD
index 2b3decb30593..9087134829e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,44 @@
-# Maintainer: Hannes Graeuler < hgraeule [at] uos [dot] de >
+# Maintainer: Andrew Sun <adsun701@gmail.com>
+# Contributor: Hannes Graeuler < hgraeule [at] uos [dot] de >
+
pkgname=sfcgal
-pkgver=1.3.0
+pkgver=1.3.6
pkgrel=1
pkgdesc="Wrapper around the CGAL library that intents to implement 2D and 3D operations on OGC standards models"
-arch=(i686 x86_64)
-url="http://oslandia.github.io/SFCGAL/index.html"
-license=('GPL')
-groups=()
+arch=('i686' 'x86_64')
+url="https://oslandia.github.io/SFCGAL/index.html"
+license=('GPL2')
provides=('sfcgal')
depends=('cgal>=4.1' 'boost' 'gmp' 'mpfr' 'openscenegraph')
makedepends=('cmake')
-source=("https://github.com/Oslandia/SFCGAL/archive/v$pkgver.tar.gz")
-sha256sums=('7ed35439fc197e73790f4c3d1c1750acdc3044968769239b2185a7a845845df3')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/Oslandia/SFCGAL/archive/v${pkgver}.tar.gz"
+ "cgal-4.14.patch")
+sha256sums=('5840192eb4a1a4e500f65eedfebacd4bc4b9192c696ea51d719732dc2c75530a'
+ '64b7c850fc7ed576e5a13c69ce5e8352ef63d800c4dcea23c77883ca9231d6ed')
+
+prepare() {
+ cd ${srcdir}/SFCGAL-${pkgver}
+ # Fix for use with cgal version 4.14
+ # See https://github.com/Oslandia/SFCGAL/pull/189
+ patch -Np1 -i ${srcdir}/cgal-4.14.patch
+}
build() {
- cd $srcdir/SFCGAL-$pkgver
+ cd ${srcdir}/SFCGAL-${pkgver}
+ mkdir -p build && cd build
cmake -Wno-dev \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DCMAKE_INSTALL_LIBDIR=/usr/lib \
- -DSFCGAL_BUILD_VIEWER=1 \
- -DSFCGAL_BUILD_EXAMPLES=1 \
- -DSFCGAL_BUILD_TEST=1 .
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DSFCGAL_BUILD_EXAMPLES=0 \
+ -DSFCGAL_BUILD_TESTS=0 \
+ ..
make
}
+
package() {
- cd $srcdir/SFCGAL-$pkgver
- make DESTDIR=$pkgdir install
- rm -rf $pkgdir/usr/include/CGAL
+ cd ${srcdir}/SFCGAL-${pkgver}/build
+ make DESTDIR=${pkgdir} install
+ # Remove conflict with cgal package
+ rm -rf ${pkgdir}/usr/include/CGAL
}
diff --git a/cgal-4.14.patch b/cgal-4.14.patch
new file mode 100644
index 000000000000..6792b4e27ab5
--- /dev/null
+++ b/cgal-4.14.patch
@@ -0,0 +1,40 @@
+diff -Naur SFCGAL-1.3.6.orig/CGAL_patches/CGAL/internal/corefinement/intersection_triangle_segment_3.h SFCGAL-1.3.6/CGAL_patches/CGAL/internal/corefinement/intersection_triangle_segment_3.h
+--- SFCGAL-1.3.6.orig/CGAL_patches/CGAL/internal/corefinement/intersection_triangle_segment_3.h 2019-06-01 21:08:45.368050324 -0400
++++ SFCGAL-1.3.6/CGAL_patches/CGAL/internal/corefinement/intersection_triangle_segment_3.h 2019-06-01 21:11:10.212568302 -0400
+@@ -27,7 +27,11 @@
+
+ //TODO rename this file when doing proper integration
+ #include <CGAL/internal/corefinement/Polyhedron_constness_types.h>
++#if CGAL_VERSION_NR < 1041401000 // version 4.14
+ #include <CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h>
++#else
++#include <CGAL/Intersections_3/Segment_3_Triangle_3.h>
++#endif
+ namespace CGAL{
+ namespace internal_IOP{
+
+@@ -153,7 +157,11 @@
+ // the segment is coplanar with the triangle's supporting plane
+ // we test whether the segment intersects the triangle in the common
+ // supporting plane
++#if CGAL_VERSION_NR < 1041401000 // version 4.14
+ if ( ::CGAL::internal::do_intersect_coplanar(a,b,c,p,q,Kernel()) )
++#else
++ if ( ::CGAL::Intersections::internal::do_intersect_coplanar(a,b,c,p,q,Kernel()) )
++#endif
+ return Intersection_result(COPLNR,Intersection_info(),true,true);
+ return Intersection_result(EMPTY,Intersection_info(),true,true);
+
+diff -Naur SFCGAL-1.3.6.orig/src/config.h.cmake SFCGAL-1.3.6/src/config.h.cmake
+--- SFCGAL-1.3.6.orig/src/config.h.cmake 2019-06-01 21:08:45.374717045 -0400
++++ SFCGAL-1.3.6/src/config.h.cmake 2019-06-01 21:12:08.333040552 -0400
+@@ -20,6 +20,9 @@
+ #ifndef _SFCGAL_CONFIG_H_
+ #define _SFCGAL_CONFIG_H_
+
++#define CGAL_DO_NOT_USE_BOOST_MP 1
++#define CGAL_DO_NOT_USE_GMPXX 1
++
+ #include <SFCGAL/export.h>
+
+ /**