2018-10-18 01:03:07 +02:00
|
|
|
# Maintainer: Grey Christoforo <first name at last name dot net>
|
2022-08-31 15:21:43 +02:00
|
|
|
# Maintainer: Adrian Insaurralde <adrianinsaval at gmail dot com>
|
2015-06-30 09:40:28 +02:00
|
|
|
|
2019-12-27 20:27:04 +01:00
|
|
|
pkgname=freecad-git
|
2024-04-23 17:38:21 +02:00
|
|
|
pkgver=0.22.0.36999.ged77603af9
|
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')
|
2022-06-14 00:41:49 +02:00
|
|
|
url='https://www.freecad.org/'
|
2015-06-30 09:40:28 +02:00
|
|
|
license=('LGPL')
|
2020-11-21 14:03:21 +01:00
|
|
|
depends=(
|
|
|
|
boost-libs
|
2024-04-23 17:38:21 +02:00
|
|
|
coin
|
2023-03-09 03:27:24 +01:00
|
|
|
fmt
|
2020-11-21 14:03:21 +01:00
|
|
|
glew
|
|
|
|
jsoncpp
|
|
|
|
med
|
|
|
|
netcdf
|
|
|
|
opencascade
|
|
|
|
openmpi
|
2024-04-23 17:38:21 +02:00
|
|
|
pyside6
|
|
|
|
pyside6-tools
|
2020-12-18 11:06:41 +01:00
|
|
|
python-yaml
|
2020-11-21 14:03:21 +01:00
|
|
|
python-matplotlib
|
2022-11-17 23:29:27 +01:00
|
|
|
python-packaging
|
2020-11-21 14:03:21 +01:00
|
|
|
python-pivy
|
2020-12-20 18:25:30 +01:00
|
|
|
python-ply
|
2024-04-23 17:38:21 +02:00
|
|
|
qt6-svg
|
|
|
|
qt6-tools
|
|
|
|
qt6-base
|
2020-11-21 14:03:21 +01:00
|
|
|
shared-mime-info
|
2021-05-03 17:09:40 +02:00
|
|
|
vtk
|
2023-03-09 03:58:43 +01:00
|
|
|
verdict
|
2023-10-03 03:09:22 +02:00
|
|
|
xerces-c
|
|
|
|
yaml-cpp
|
2020-11-21 14:03:21 +01:00
|
|
|
)
|
|
|
|
makedepends=(
|
|
|
|
boost
|
|
|
|
cmake
|
|
|
|
eigen
|
|
|
|
git
|
|
|
|
ninja
|
2023-10-03 03:09:22 +02:00
|
|
|
nlohmann-json
|
2024-04-23 17:38:21 +02:00
|
|
|
shiboken6
|
2020-11-21 14:03:21 +01:00
|
|
|
swig
|
|
|
|
)
|
2022-02-13 13:17:02 +01:00
|
|
|
checkdepends=(
|
|
|
|
pugixml
|
|
|
|
)
|
2021-01-09 12:56:40 +01:00
|
|
|
optdepends=(
|
2022-08-31 15:21:43 +02: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'
|
2022-08-31 15:21:43 +02:00
|
|
|
'python-pip: support installing python dependencies for addons'
|
|
|
|
'calculix-ccx: FEM solver backend'
|
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
|
2023-11-14 19:36:48 +01:00
|
|
|
git submodule update --init
|
2020-12-20 18:25:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2024-04-23 17:38:21 +02:00
|
|
|
cmake \
|
|
|
|
-B build \
|
2021-11-14 23:15:53 +01:00
|
|
|
-D BUILD_FLAT_MESH=ON \
|
2022-05-17 22:59:09 +02:00
|
|
|
-D BUILD_DESIGNER_PLUGIN=ON \
|
2024-04-23 17:38:21 +02:00
|
|
|
-D FREECAD_QT_VERSION=6 \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D CMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects -fPIC -w" \
|
|
|
|
-D CMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects -fPIC -w" \
|
|
|
|
-D CMAKE_INSTALL_DATADIR=/usr/share/freecad \
|
|
|
|
-D CMAKE_INSTALL_DATAROOTDIR=/usr/share \
|
|
|
|
-D CMAKE_INSTALL_DOCDIR=/usr/share/freecad/doc \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr/lib/freecad \
|
2020-11-20 17:55:21 +01:00
|
|
|
-D FREECAD_USE_EXTERNAL_PIVY=ON \
|
|
|
|
-D FREECAD_USE_QT_FILEDIALOG=ON \
|
2021-05-09 15:07:41 +02:00
|
|
|
-D INSTALL_TO_SITEPACKAGES=ON \
|
2024-04-23 17:38:21 +02:00
|
|
|
-D ENABLE_DEVELOPER_TESTS=OFF \
|
|
|
|
-G Ninja \
|
|
|
|
-S FreeCAD \
|
|
|
|
-W no-dev
|
|
|
|
ninja -C build
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|
|
|
|
|
2020-12-17 15:44:44 +01:00
|
|
|
check() {
|
2024-04-23 17:38:21 +02:00
|
|
|
cd build
|
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() {
|
2024-04-23 17:38:21 +02:00
|
|
|
DESTDIR="$pkgdir" ninja -C build install
|
2022-05-18 01:35:52 +02:00
|
|
|
|
2024-04-23 17:38:21 +02:00
|
|
|
# tools
|
|
|
|
install -Dm755 FreeCAD/src/Tools/{freecad-thumbnailer,fcinfo} -t "$pkgdir/usr/bin/"
|
2021-01-08 21:24:29 +01:00
|
|
|
|
2024-04-23 17:38:21 +02:00
|
|
|
# symlinks
|
|
|
|
install -d "$pkgdir/usr/bin"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/freecad"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCAD "$pkgdir/usr/bin/FreeCAD"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/freecadcmd"
|
|
|
|
ln -sf /usr/lib/freecad/bin/FreeCADCmd "$pkgdir/usr/bin/FreeCADCmd"
|
2015-06-30 09:40:28 +02:00
|
|
|
}
|