2018-10-18 01:03:07 +02:00
|
|
|
# Maintainer: Grey Christoforo <first name at last name dot net>
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
pkgname=freecad-git
|
2022-05-17 23:00:34 +02:00
|
|
|
pkgver=0.20.0.28901.ga5ff515804
|
2020-11-20 19:14:12 +01:00
|
|
|
pkgrel=1
|
2015-06-30 09:40:28 +02:00
|
|
|
pkgdesc='A general purpose 3D CAD modeler - git checkout'
|
2019-03-15 20:13:11 +01:00
|
|
|
arch=('x86_64')
|
|
|
|
url='https://www.freecadweb.org/'
|
2015-06-30 09:40:28 +02:00
|
|
|
license=('LGPL')
|
2020-11-21 14:03:21 +01:00
|
|
|
depends=(
|
|
|
|
boost-libs
|
|
|
|
glew
|
|
|
|
jsoncpp
|
|
|
|
med
|
|
|
|
netcdf
|
|
|
|
opencascade
|
|
|
|
openmpi
|
2022-03-22 18:01:18 +01:00
|
|
|
pyside2
|
2020-11-21 14:03:21 +01:00
|
|
|
pyside2-tools
|
2020-12-18 11:06:41 +01:00
|
|
|
python-yaml
|
2020-11-21 14:03:21 +01:00
|
|
|
python-matplotlib
|
|
|
|
python-pivy
|
2020-12-20 18:25:30 +01:00
|
|
|
python-ply
|
2020-11-21 14:03:21 +01:00
|
|
|
qt5-svg
|
|
|
|
qt5-tools
|
|
|
|
qt5-webkit
|
2022-04-11 12:07:50 +02:00
|
|
|
qt5-webengine
|
2022-05-17 23:00:34 +02:00
|
|
|
qt5-webchannel
|
2020-11-21 14:03:21 +01:00
|
|
|
qt5-x11extras
|
|
|
|
qt5-xmlpatterns
|
2021-12-19 20:19:10 +01:00
|
|
|
qt5-base
|
2020-11-21 14:03:21 +01:00
|
|
|
shared-mime-info
|
|
|
|
xerces-c
|
2021-05-03 17:09:40 +02:00
|
|
|
vtk
|
2020-11-21 14:03:21 +01:00
|
|
|
)
|
|
|
|
makedepends=(
|
|
|
|
boost
|
|
|
|
cmake
|
|
|
|
coin
|
|
|
|
eigen
|
|
|
|
gcc-fortran
|
|
|
|
git
|
|
|
|
ninja
|
|
|
|
python-shiboken2
|
|
|
|
shiboken2
|
|
|
|
swig
|
|
|
|
)
|
2022-02-13 13:17:02 +01:00
|
|
|
checkdepends=(
|
|
|
|
fmt
|
|
|
|
pugixml
|
|
|
|
)
|
2021-01-09 12:56:40 +01:00
|
|
|
optdepends=(
|
|
|
|
'povray: ray tracing support'
|
2021-01-09 13:07:37 +01:00
|
|
|
'luxcorerender: ray tracing support'
|
2021-01-09 12:56:40 +01:00
|
|
|
'libspnav: 3d mouse support'
|
2021-05-09 17:39:15 +02:00
|
|
|
'openscad: OpenSCAD support'
|
2022-03-22 18:01:18 +01:00
|
|
|
'graphviz: dependency graph support'
|
|
|
|
'python-markdown: markdown support in addon manager'
|
|
|
|
'python-gitpython: support downloading addons with git'
|
2021-01-09 12:56:40 +01:00
|
|
|
)
|
2015-06-30 09:40:28 +02:00
|
|
|
provides=('freecad')
|
2019-12-27 20:27:04 +01:00
|
|
|
conflicts=('freecad' 'freecad-appimage' 'freecad-appimage-git')
|
2019-12-31 14:48:34 +01:00
|
|
|
source=("git+https://github.com/FreeCAD/FreeCAD.git")
|
2019-08-22 20:36:39 +02:00
|
|
|
md5sums=('SKIP')
|
2015-06-30 09:40:28 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2020-11-20 19:14:12 +01:00
|
|
|
cd FreeCAD
|
2021-10-05 08:45:27 +02:00
|
|
|
read -d$'/n' -r major minor patch < <(grep -Po "set\(PACKAGE_VERSION_(MAJOR|MINOR|PATCH) \"\K[0-9]*" CMakeLists.txt) || true
|
2022-03-22 18:01:18 +01:00
|
|
|
count=$((24266 + $(git rev-list --count d29fd7d..HEAD) ))
|
2021-10-05 08:45:27 +02:00
|
|
|
hash=$(git rev-parse --short HEAD)
|
2022-03-22 18:01:18 +01:00
|
|
|
printf "%d.%d.%d.%d.g%s" "$major" "$minor" "$patch" "$count" "$hash"
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
prepare() {
|
2020-12-05 12:34:05 +01:00
|
|
|
cd FreeCAD
|
2020-12-20 18:25:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd FreeCAD
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2021-05-09 15:07:41 +02:00
|
|
|
cmake -Wno-dev -G Ninja -B build_dir -S . \
|
2021-10-24 13:27:37 +02:00
|
|
|
-D BUILD_ENABLE_CXX_STD=C++17 \
|
2021-04-04 20:57:30 +02:00
|
|
|
-D BUILD_FEM=ON \
|
2021-11-14 23:15:53 +01:00
|
|
|
-D BUILD_FEM_NETGEN=OFF \
|
2021-04-04 20:57:30 +02:00
|
|
|
-D BUILD_MESH=ON \
|
2021-11-14 23:15:53 +01:00
|
|
|
-D BUILD_FLAT_MESH=ON \
|
2021-05-03 17:09:40 +02:00
|
|
|
-D BUILD_MESH_PART=ON \
|
|
|
|
-D BUILD_SHIP=ON \
|
2021-05-09 15:07:41 +02:00
|
|
|
-D BUILD_COMPLETE=ON \
|
2022-03-22 18:01:18 +01:00
|
|
|
-D BUILD_JTREADER=OFF \
|
2021-05-03 17:09:40 +02:00
|
|
|
-D BUILD_PLOT=ON \
|
2022-04-24 18:39:21 +02:00
|
|
|
-D BUILD_CLOUD=OFF \
|
2022-05-17 22:59:09 +02:00
|
|
|
-D BUILD_DESIGNER_PLUGIN=ON \
|
2021-01-16 14:17:40 +01:00
|
|
|
-D CMAKE_BUILD_TYPE=None \
|
2020-12-05 12:34:05 +01:00
|
|
|
-D CMAKE_C_FLAGS="${CFLAGS} -fPIC -w" \
|
|
|
|
-D CMAKE_CXX_FLAGS="${CXXFLAGS} -fPIC -w" \
|
2020-11-20 17:55:21 +01:00
|
|
|
-D FREECAD_USE_EXTERNAL_PIVY=ON \
|
|
|
|
-D FREECAD_USE_OCC_VARIANT="Official Version" \
|
|
|
|
-D FREECAD_USE_QT_FILEDIALOG=ON \
|
|
|
|
-D PYTHON_EXECUTABLE=/usr/bin/python \
|
2021-05-09 15:07:41 +02:00
|
|
|
-D INSTALL_TO_SITEPACKAGES=ON \
|
2022-05-17 23:00:34 +02:00
|
|
|
-D CMAKE_INSTALL_PREFIX='/usr/lib/freecad' \
|
|
|
|
-D CMAKE_INSTALL_BINDIR='/usr/lib/freecad/bin' \
|
|
|
|
-D CMAKE_INSTALL_LIBDIR='/usr/lib/freecad/lib' \
|
|
|
|
-D CMAKE_INSTALL_DATADIR='/usr/share/freecad' \
|
|
|
|
-D CMAKE_INSTALL_DATAROOTDIR='/usr/share' \
|
|
|
|
-D CMAKE_INSTALL_DOCDIR='/usr/share/doc/freecad'
|
2020-12-05 12:34:05 +01:00
|
|
|
|
2021-01-16 14:17:40 +01:00
|
|
|
cmake --build build_dir
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2020-12-17 15:44:44 +01:00
|
|
|
check() {
|
2022-05-17 23:00:34 +02:00
|
|
|
cd FreeCAD/build_dir
|
2021-11-14 18:29:38 +01:00
|
|
|
LD_LIBRARY_PATH=lib bin/FreeCADCmd --console --run-test 0
|
2020-12-17 15:44:44 +01:00
|
|
|
}
|
|
|
|
|
2015-06-30 09:40:28 +02:00
|
|
|
package() {
|
2020-12-05 12:34:05 +01:00
|
|
|
cd FreeCAD
|
2021-06-30 14:41:49 +02:00
|
|
|
DESTDIR="${pkgdir}" cmake --install build_dir
|
2022-05-17 23:00:34 +02:00
|
|
|
|
2021-05-07 11:01:31 +02:00
|
|
|
# links for bin
|
2022-05-17 23:00:34 +02:00
|
|
|
mkdir -p "${pkgdir}"/usr/bin
|
|
|
|
FILES="${pkgdir}"/usr/lib/freecad/bin/*
|
2021-05-07 11:01:31 +02:00
|
|
|
for f in $FILES
|
|
|
|
do
|
2022-05-17 23:00:34 +02:00
|
|
|
ln -s '../lib/freecad/bin/'$(basename $f) "${pkgdir}"/usr/bin/$(basename $f)
|
2021-05-07 11:01:31 +02:00
|
|
|
done
|
2021-01-08 21:24:29 +01:00
|
|
|
|
2022-05-17 23:00:34 +02:00
|
|
|
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICENSE
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|