PKGBUILDs/extra/freecad/PKGBUILD

101 lines
4.4 KiB
Bash
Raw Normal View History

2022-02-02 04:53:59 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: loqs <bugs-archlinux@entropy-collector.net>
# Contributor: Gabriel Souza Franco <gabrielfrancosouza@gmail.com>
# Contributor: Florian Pritz
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jordi De Groof <jordi.degroof@gmail.com>
# Contributor: mickele
# Contributor: manwithgrenade
# Contributor: bricem13
# Contributor: gborzi
2022-07-30 00:09:37 +00:00
# Contributor: Adrian Insaurralde
2022-02-02 04:53:59 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2022-07-30 00:09:37 +00:00
# - remove makedepends on ospray
2022-02-02 04:53:59 +00:00
buildarch=8
highmem=1
pkgname=freecad
2023-11-23 04:42:34 +00:00
pkgver=0.21.2
2024-04-30 00:08:16 +00:00
pkgrel=19
2022-07-30 00:09:37 +00:00
pkgdesc='Feature based parametric 3D CAD modeler'
2022-02-02 04:53:59 +00:00
arch=(x86_64)
url='https://freecadweb.org/'
license=(LGPL)
2022-11-01 00:21:24 +00:00
depends=(boost-libs coin fmt glew jsoncpp libspnav med-openmpi netcdf
2024-04-04 18:52:30 +00:00
opencascade openmpi pugixml pyside6 python-gitpython
2022-11-01 00:21:24 +00:00
python-markdown python-matplotlib python-pip python-pivy python-ply
2024-04-04 18:52:30 +00:00
python-yaml qt6-svg qt6-tools qt6-webengine
xerces-c verdict)
2022-11-01 00:21:24 +00:00
makedepends=(boost cgns cmake eigen git libharu liblas ninja openvdb openvr
2024-04-05 18:14:43 +00:00
pdal postgresql-libs python-mpi4py
2024-04-04 18:52:30 +00:00
shiboken6 swig utf8cpp nlohmann-json)
2022-08-30 12:40:47 +00:00
optdepends=('graphviz: dependency graph support'
2022-11-01 00:21:24 +00:00
'openscad: OpenSCAD support')
2023-11-23 04:42:34 +00:00
source=("git+https://github.com/$pkgname/$pkgname#tag=$pkgver"
2024-04-04 18:52:30 +00:00
freecad-vtk9.3.patch
2024-04-05 18:14:43 +00:00
pyside6.patch
2024-04-09 18:27:45 +00:00
62c3836c.patch
2024-04-27 15:25:37 +00:00
https://github.com/FreeCAD/FreeCAD/commit/6043c904.patch
2024-04-30 00:08:16 +00:00
https://github.com/FreeCAD/FreeCAD/commit/ac9a88c2.patch
fixups-with-qt6-enums.patch)
2024-04-09 18:27:45 +00:00
b2sums=('b20da85de907a41b14581583f9d69cab8fe79b1bdd50c24fc299c649ef0bfd7723c0b23aebc68ca5bbdee2da22c959004c7b595e19b542b1ec06a7275c0f5ea7'
2024-04-04 18:52:30 +00:00
'f0b5a4648eb4befabb2339bae4e42044e436aa50ad1c2a25b243c965272a217b2c1c69c34d0d20bd01c573008de10f733b74857ffecac502b8558a7095e305e5'
2024-04-27 15:25:37 +00:00
'eceb2d1b580fafaeec35de31fb3f4ec947ad32afe96734aa86d338364c97bbe5218506627957063c35ea2f360b7f7f916c9b7a1c0ef674c35d1f7972c070210e'
2024-04-09 18:27:45 +00:00
'eb474708c3611293cfe3dfc287418b606f7735f6eb306f44f7394cd7e65256daddcee35984211982f25064e7ec81cc038d4eeb8d34af7399058ecfb6e8e99e9f'
2024-04-27 15:25:37 +00:00
'de4b98c4b488045f9810dce124c271d6f4f629922e026f2d4f1efd6c9060b92309db41f8e0f6ebe5e7a27399911ac908cc8935c2501214326dbb1c4b739d46cc'
2024-04-30 00:08:16 +00:00
'02284db1b17dc88d0522eb3a726076b9f1ded740fdab1a185e48534c3606c77e51a12690b02bf5e0d9d1f72d1d8389ba84a54cba274200e69b6b10a431bbfdfe'
'9cb72c3df3f1c8e49b4242b1e05f51c68e6df98891a0c485488433bb9eef1e814fe712761b62ef09cb37551643819a48cbf704df2121bf33401e410a05dce722')
2023-11-20 13:59:12 +00:00
prepare() {
patch -d freecad -Np1 -i "$srcdir"/freecad-vtk9.3.patch
2024-04-05 18:14:43 +00:00
patch -d freecad -Np1 -i ../62c3836c.patch # Fix Qt6 issues in addons manager
2024-04-04 18:52:30 +00:00
patch -d freecad -Np1 -i ../pyside6.patch
2024-04-27 15:25:37 +00:00
patch -d freecad -Np1 -i ../ac9a88c2.patch # Fix more pyside6 issues
2024-04-09 18:27:45 +00:00
patch -d freecad -Np1 -i ../6043c904.patch # Fix build with Python 3.12
2024-04-30 00:08:16 +00:00
patch -d freecad -Np1 -i ../fixups-with-qt6-enums.patch # Discard int conversions in WBs Python sources
2024-04-09 18:27:45 +00:00
sed -e 's|Shiboken::Module::getTypes(requiredModule)|reinterpret_cast<PyTypeObject **>(Shiboken::Module::getTypes(requiredModule))|' \
-i freecad/src/Gui/PythonWrapper.cpp # Fix build with PySide 6.7
2023-11-20 13:59:12 +00:00
}
2022-02-02 04:53:59 +00:00
build() {
cmake \
-B build \
2022-07-30 00:09:37 +00:00
-D BUILD_ENABLE_CXX_STD=C++17 \
-D BUILD_FLAT_MESH=ON \
2024-04-04 18:52:30 +00:00
-D FREECAD_QT_VERSION=6 \
2022-02-02 04:53:59 +00:00
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
-D CMAKE_CXX_FLAGS="$CXXFLAGS -fPIC -w" \
2022-07-30 00:09:37 +00:00
-D CMAKE_INSTALL_BINDIR=/usr/lib/freecad/bin \
2022-02-02 04:53:59 +00:00
-D CMAKE_INSTALL_DATADIR=/usr/share/freecad \
2022-07-30 00:09:37 +00:00
-D CMAKE_INSTALL_DATAROOTDIR=/usr/share \
2022-02-02 04:53:59 +00:00
-D CMAKE_INSTALL_DOCDIR=/usr/share/freecad/doc \
2022-07-30 00:09:37 +00:00
-D CMAKE_INSTALL_LIBDIR=/usr/lib/freecad/lib \
2022-02-02 04:53:59 +00:00
-D CMAKE_INSTALL_PREFIX=/usr/lib/freecad \
-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 \
2022-07-30 00:09:37 +00:00
-D INSTALL_TO_SITEPACKAGES=ON \
2022-02-02 04:53:59 +00:00
-G Ninja \
2022-09-13 13:01:08 +00:00
-S $pkgname \
-W no-dev
2022-02-02 04:53:59 +00:00
ninja -C build
}
package() {
DESTDIR="$pkgdir" ninja -C build install
2022-11-01 00:21:24 +00:00
2023-12-09 15:18:44 +00:00
# tools
install -Dm755 $pkgname/src/Tools/{$pkgname-thumbnailer,fcinfo} -t "$pkgdir/usr/bin/"
2022-11-01 00:21:24 +00:00
2022-08-31 12:38:19 +00:00
# symlinks
2022-02-02 04:53:59 +00:00
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"
}