move cmake prep from prepare() to build(), add python-ply dep

This commit is contained in:
Greyson Christoforo 2020-12-20 17:25:30 +00:00
parent 58a7afc460
commit 49357d4dff
2 changed files with 12 additions and 11 deletions

View file

@ -1,6 +1,6 @@
pkgbase = freecad-git pkgbase = freecad-git
pkgdesc = A general purpose 3D CAD modeler - git checkout pkgdesc = A general purpose 3D CAD modeler - git checkout
pkgver = 0.19_pre.r4724.g6c6f5e7fbf pkgver = 0.19_pre.r4809.gefa6346e5f
pkgrel = 1 pkgrel = 1
epoch = 0 epoch = 0
url = https://www.freecadweb.org/ url = https://www.freecadweb.org/
@ -29,6 +29,7 @@ pkgbase = freecad-git
depends = pyside2-tools depends = pyside2-tools
depends = python-matplotlib depends = python-matplotlib
depends = python-pivy depends = python-pivy
depends = python-ply
depends = python-pyside2 depends = python-pyside2
depends = qt5-svg depends = qt5-svg
depends = qt5-tools depends = qt5-tools

View file

@ -2,7 +2,7 @@
# Maintainer: Sebastiaan Lokhorst <sebastiaanlokhorst@gmail.com> # Maintainer: Sebastiaan Lokhorst <sebastiaanlokhorst@gmail.com>
pkgname=freecad-git pkgname=freecad-git
pkgver=0.19_pre.r4724.g6c6f5e7fbf pkgver=0.19_pre.r4809.gefa6346e5f
pkgrel=1 pkgrel=1
epoch=0 epoch=0
pkgdesc='A general purpose 3D CAD modeler - git checkout' pkgdesc='A general purpose 3D CAD modeler - git checkout'
@ -21,6 +21,7 @@ openmpi
pyside2-tools pyside2-tools
python-matplotlib python-matplotlib
python-pivy python-pivy
python-ply
python-pyside2 python-pyside2
qt5-svg qt5-svg
qt5-tools qt5-tools
@ -58,9 +59,11 @@ prepare() {
cd FreeCAD cd FreeCAD
# patch out a build error # patch out a build error
#curl -L "https://github.com/FreeCAD/FreeCAD/pull/2842/commits/095984fce44931a4c8e2ace269d45a62640fbfb4.patch" | patch -p1 #curl -L "https://github.com/FreeCAD/FreeCAD/pull/2842/commits/095984fce44931a4c8e2ace269d45a62640fbfb4.patch" | patch -p1
}
build() {
cd FreeCAD
mkdir -p build
cd build
cmake -Wno-dev .. \ cmake -Wno-dev .. \
-D BUILD_ENABLE_CXX_STD=C++14 \ -D BUILD_ENABLE_CXX_STD=C++14 \
-D BUILD_QT5=ON \ -D BUILD_QT5=ON \
@ -74,22 +77,19 @@ prepare() {
-D FREECAD_USE_OCC_VARIANT="Official Version" \ -D FREECAD_USE_OCC_VARIANT="Official Version" \
-D FREECAD_USE_QT_FILEDIALOG=ON \ -D FREECAD_USE_QT_FILEDIALOG=ON \
-D PYTHON_EXECUTABLE=/usr/bin/python \ -D PYTHON_EXECUTABLE=/usr/bin/python \
-G Ninja -G Ninja -B "${srcdir}/build" -S .
}
build() { ninja -C "${srcdir}/build"
cd FreeCAD
ninja -C build
} }
check() { check() {
cd FreeCAD cd FreeCAD
./build/bin/FreeCAD --console --run-test 0 "${srcdir}/build/bin/FreeCAD" --console --run-test 0
} }
package() { package() {
cd FreeCAD cd FreeCAD
DESTDIR="${pkgdir}" ninja -C build install DESTDIR="${pkgdir}" ninja -C "${srcdir}/build" install
# Create desktop shortcut # Create desktop shortcut
gendesk -f -n --pkgname "${pkgname}" --pkgdesc "${pkgdesc}" --name FreeCAD \ gendesk -f -n --pkgname "${pkgname}" --pkgdesc "${pkgdesc}" --name FreeCAD \