summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Rehfeld2021-05-03 15:21:35 +0200
committerHauke Rehfeld2021-05-03 15:21:35 +0200
commit1735bf7515b9253dbdb981ddfcf7b74d792a1987 (patch)
treef5f2e18d57adaa821521c2242a61690f55a0efc4
parent176d20d3a7f00400e2f759e97689a9fa689d319d (diff)
downloadaur-1735bf7515b9253dbdb981ddfcf7b74d792a1987.tar.gz
initial
-rw-r--r--.SRCINFO35
-rw-r--r--PKGBUILD164
-rw-r--r--disable_third_party.patch23
-rw-r--r--mitigate_compile_errors.patch12
4 files changed, 165 insertions, 69 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1dee23a0e426..c262e15959ca 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,32 @@
pkgbase = python-pymesh-git
- pkgdesc = Geometry Processing Library for Python
- pkgver = 20170324
+ pkgver = r2064.384ba882
pkgrel = 1
- url = https://github.com/qnzhou/PyMesh
arch = i686
arch = x86_64
- license = MPL
+ license = GPL
makedepends = git
- makedepends = swig
- depends = python-scipy
- depends = eigen
- depends = cgal
- depends = sparsehash
- depends = suitesparse
- options = !emptydirs
- source = git+https://github.com/qnzhou/PyMesh.git#branch=master
+ makedepends = cmake
+ makedepends = python
+ makedepends = python-scipy
+ makedepends = python-nose
+ makedepends = python-numpy
+ makedepends = cork-git
+ makedepends = cgal
+ makedepends = eigen
+ makedepends = triangle
+ makedepends = qhull
+ makedepends = draco
+ makedepends = tbb
+ makedepends = mmg
+ makedepends = nlohmann-json
+ provides = python-pymesh
+ conflicts = python-pymesh
+ source = python-pymesh::git+https://github.com/PyMesh/PyMesh.git
+ source = disable_third_party.patch
+ source = mitigate_compile_errors.patch
md5sums = SKIP
+ md5sums = c3f33b2c3795218e8811ceb18776c672
+ md5sums = fe3c9982fd5bd89b55642d969f82976d
pkgname = python-pymesh-git
diff --git a/PKGBUILD b/PKGBUILD
index 03597cb19d4b..ed69aaa0801d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,76 +1,126 @@
-# Maintainer: Lucas H. Gabrielli <heitzmann@gmail.com>
+# Maintainer: Hauke Rehfeld <hauke@haukerehfeld.de>
pkgname=python-pymesh-git
-pkgdesc='Geometry Processing Library for Python'
-pkgver=20170324
+pkgver=r2064.384ba882
pkgrel=1
+epoch=
+pkgdesc=""
arch=('i686' 'x86_64')
-url='https://github.com/qnzhou/PyMesh'
-license=('MPL')
-depends=('python-scipy' 'eigen' 'cgal' 'sparsehash' 'suitesparse')
-makedepends=('git' 'swig')
-options=(!emptydirs)
-source=('git+https://github.com/qnzhou/PyMesh.git#branch=master')
-md5sums=('SKIP')
+url=""
+license=('GPL')
+groups=()
+depends=()
+# FIXME: cork-git doesn't seem to provide cork
+makedepends=('git' 'cmake' 'python' 'python-scipy' 'python-nose' 'python-numpy'
+ 'cork-git' 'cgal' "eigen"
+ #"tetgen" # complicated
+ "triangle" "qhull" "draco" "tbb" "mmg" "nlohmann-json" )
+checkdepends=()
+optdepends=()
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+source=("${pkgname%-git}::git+https://github.com/PyMesh/PyMesh.git"
+ "disable_third_party.patch"
+ "mitigate_compile_errors.patch"
+# "third_party/Clipper::git+https://github.com/PyMesh/Clipper.git"
+# "third_party/TetWild::git+https://github.com/PyMesh/TetWild.git"
+# "third_party/WindingNumber::git+https://github.com/PyMesh/WindingNumber.git"
+# "third_party/carve::git+https://github.com/PyMesh/carve.git"
+# "third_party/cgal::git+https://github.com/PyMesh/cgal.git"
+# "third_party/cork::git+https://github.com/PyMesh/cork.git"
+# "third_party/draco::git+https://github.com/PyMesh/draco.git"
+# "third_party/eigen::git+https://github.com/PyMesh/eigen.git"
+# "third_party/fmt::git+https://github.com/fmtlib/fmt.git"
+# "third_party/geogram::git+https://github.com/PyMesh/geogram.git"
+# "third_party/jigsaw::git+https://github.com/PyMesh/jigsaw.git"
+# "third_party/json::git+https://github.com/nlohmann/json.git"
+# "third_party/libigl::git+https://github.com/PyMesh/libigl.git"
+# "third_party/mmg::git+https://github.com/PyMesh/mmg.git"
+# "third_party/pybind11::git+https://github.com/PyMesh/pybind11.git"
+# "third_party/qhull::git+https://github.com/PyMesh/qhull.git"
+# "third_party/quartet::git+https://github.com/PyMesh/quartet.git"
+# "third_party/spdlog::git+https://github.com/gabime/spdlog.git"
+# "third_party/tbb::git+https://github.com/PyMesh/tbb.git"
+# "third_party/tetgen::git+https://github.com/PyMesh/tetgen.git"
+# "third_party/triangle::git+https://github.com/PyMesh/triangle.git"
+)
+md5sums=('SKIP'
+ 'c3f33b2c3795218e8811ceb18776c672'
+ 'fe3c9982fd5bd89b55642d969f82976d')
+
+
+
+
+noextract=()
pkgver() {
- cd PyMesh
- git log --format="%cd" --date=short -1 | sed 's/-//g'
+ cd "$srcdir/${pkgname%-git}"
+ # Git, no tags available
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
- cd PyMesh
- git submodule init
- git submodule update
+ cd "$srcdir/${pkgname%-git}"
+ git apply "$SRCDEST/disable_third_party.patch"
+ git apply "$SRCDEST/mitigate_compile_errors.patch"
+
+ cd third_party
+ _submodules="clipper"
+ # for submodule in $_submodules
+ # do
+ # submodule_dir="$srcdir/${pkgname%-git}/third_party/$submodule"
+ # git submodule init "$submodule_dir"
+ # git submodule update "$submodule_dir"
+ # done
+ # git config submodule.third_party/Clipper.url $SRCDEST/Clipper
+ # git config submodule.third_party/TetWild.url $SRCDEST/TetWild
+ # git config submodule.third_party/WindingNumber.url $SRCDEST/WindingNumber
+ # git config submodule.third_party/carve.url $SRCDEST/carve
+ # git config submodule.third_party/cgal.url $SRCDEST/cgal
+ # git config submodule.third_party/cork.url $SRCDEST/cork
+ # git config submodule.third_party/draco.url $SRCDEST/draco
+ # git config submodule.third_party/eigen.url $SRCDEST/eigen
+ # git config submodule.third_party/fmt.url $SRCDEST/fmt
+ # git config submodule.third_party/geogram.url $SRCDEST/geogram
+ # git config submodule.third_party/jigsaw.url $SRCDEST/jigsaw
+ # git config submodule.third_party/json.url $SRCDEST/json
+ # git config submodule.third_party/libigl.url $SRCDEST/libigl
+ # git config submodule.third_party/mmg.url $SRCDEST/mmg
+ # git config submodule.third_party/pybind11.url $SRCDEST/pybind11
+ # git config submodule.third_party/qhull.url $SRCDEST/qhull
+ # git config submodule.third_party/quartet.url $SRCDEST/quartet
+ # git config submodule.third_party/spdlog.url $SRCDEST/spdlog
+ # git config submodule.third_party/tbb.url $SRCDEST/tbb
+ # git config submodule.third_party/tetgen.url $SRCDEST/tetgen
+ # git config submodule.third_party/triangle.url $SRCDEST/triangle
+ # git submodule update
- sed -i '57,59d' Settings.cmake
- echo 'SET(CMAKE_INSTALL_RPATH "/usr/lib/python3.6/site-packages/pymesh/lib;/usr/lib/python3.6/site-packages/pymesh/third_party/lib")' >> Settings.cmake
-
- sed -i '63s/cmake \.\./cmake .. -DCMAKE_INTALL_PREFIX=\/usr/' setup.py
}
build() {
- #export PYMESH_PATH="${srcdir}/PyMesh"
- export CGAL_DIR='/usr/lib64/CGAL'
-
- cd PyMesh
-
- cd third_party
- [ -d build ] && rm -rf build
- mkdir build
- cd build
-
- cmake .. \
- -DCMAKE_CXX_FLAGS='-w' \
- -DCMAKE_C_FLAGS='-w'
-
- make
- make install
- #DESTDIR="${pkgdir}"
+ cd "$srcdir/${pkgname%-git}"
+ #cd third_party
+ #./build.py clipper
- cd ../..
- [ -d build ] && rm -rf build
- mkdir build
- cd build
+ # mmg and cork failed to compile
+ #cmake -B "$srcdir/build" -S "$srcdir/${pkgname%-git}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DPYMESH_USE_CORK=Off -DPYMESH_USE_MMG=Off #-Wno-dev
+ #make -C "$srcdir/build"
+ #cmake --build "$srcdir/build" --config Release -- -j12
- cmake .. \
- -DCMAKE_INSTALL_PREFIX="/usr" \
- -DCMAKE_CXX_FLAGS='-w -fno-lto' \
- -DCMAKE_C_FLAGS='-w -fno-lto'
+ python setup.py build
+}
- make
- #make src_tests
- #make tools
- #make tools_tests
+check() {
+ echo test
}
package() {
- export CGAL_DIR='/usr/lib64/CGAL'
-
- cd PyMesh
- python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
-
- # Instlall module only, no scripts
- rm -rf "${pkgdir}/usr/bin"
+ cd "$srcdir/${pkgname%-git}"
+ #make -C "$srcdir/build" DESTDIR="$pkgdir/" install
+ #cmake --build "$srcdir/build" --target install -DDESTDIR="$pkdir/"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
-
-# vim: shiftwidth=2 softtabstop=2 tabstop=2 noexpandtab
diff --git a/disable_third_party.patch b/disable_third_party.patch
new file mode 100644
index 000000000000..2ddfeec5149c
--- /dev/null
+++ b/disable_third_party.patch
@@ -0,0 +1,23 @@
+diff --git a/setup.py b/setup.py
+index 9be0468e..c731206a 100755
+--- a/setup.py
++++ b/setup.py
+@@ -51,18 +51,6 @@ class cmake_build(build):
+ Config and build third party dependencies.
+ """
+ commands = [
+- "third_party/build.py cgal",
+- "third_party/build.py eigen",
+- "third_party/build.py triangle",
+- "third_party/build.py tetgen",
+- "third_party/build.py clipper",
+- "third_party/build.py qhull",
+- "third_party/build.py cork",
+- #"third_party/build.py carve",
+- "third_party/build.py draco",
+- "third_party/build.py tbb",
+- "third_party/build.py mmg",
+- "third_party/build.py json",
+ ];
+ for c in commands:
+ check_call(c.split())
diff --git a/mitigate_compile_errors.patch b/mitigate_compile_errors.patch
new file mode 100644
index 000000000000..c0a254e55fde
--- /dev/null
+++ b/mitigate_compile_errors.patch
@@ -0,0 +1,12 @@
+diff --git a/setup.py b/setup.py
+index 9be0468e..dab4b624 100755
+--- a/setup.py
++++ b/setup.py
+@@ -74,6 +74,7 @@ class cmake_build(build):
+ python_version = "{v[0]}.{v[1]}".format(v=platform.python_version_tuple())
+ self._build(
+ "build_{}".format(python_version),
++ " -DPYMESH_USE_CORK=Off -DPYMESH_USE_MMG=Off" +
+ " -DPythonLibsNew_FIND_VERSION={}".format(python_version),
+ False,
+ )