PKGBUILDs/extra/freecad/PKGBUILD

88 lines
3.1 KiB
Bash
Raw Normal View History

2022-02-02 04:53:59 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2024-09-25 17:54:04 +00:00
# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
2022-02-02 04:53:59 +00:00
# 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
2024-07-27 18:21:20 +00:00
# Contributor: Martin Rodriguez Reboredo
# Contributor: Jamin Collins
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
2024-11-16 16:11:42 +00:00
pkgver=1.0rc4 # https://gitlab.archlinux.org/archlinux/packaging/packages/freecad/-/issues/10#note_211023
2024-10-15 01:06:09 +00:00
pkgrel=3
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)
2024-11-16 16:11:42 +00:00
depends=(boost-libs coin fmt glew libspnav med-openmpi
opencascade openmpi pugixml pyside6 yaml-cpp
2022-11-01 00:21:24 +00:00
python-markdown python-matplotlib python-pip python-pivy python-ply
2024-11-16 16:11:42 +00:00
python-yaml qt6-svg qt6-tools verdict xerces-c)
2024-07-27 18:21:20 +00:00
makedepends=(boost cgns cmake eigen git libharu liblas ninja nlohmann-json
openvdb openvr pdal postgresql-libs python-mpi4py shiboken6
2024-09-12 17:56:20 +00:00
swig utf8cpp dos2unix microsoft-gsl)
2022-08-30 12:40:47 +00:00
optdepends=('graphviz: dependency graph support'
2024-09-18 00:49:16 +00:00
'opencamlib: CAM workbench support'
2022-11-01 00:21:24 +00:00
'openscad: OpenSCAD support')
2024-05-13 19:09:39 +00:00
options=(!lto)
2024-11-16 16:11:42 +00:00
source=("git+https://github.com/$pkgname/$pkgname#tag=$pkgver")
b2sums=('b635c36455bee5fcf75c94db51b4f0840de1cee0cf95f13a1f4f6410b514341a8f5aca02394c0ee94d02910f19d5f1b74fe0d886fd52f22fd4e38a445ca695da')
2023-11-20 13:59:12 +00:00
prepare() {
2024-09-02 19:25:50 +00:00
cd freecad
2024-09-12 17:56:20 +00:00
git submodule update --init --recursive
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_FLAT_MESH=ON \
2024-05-13 19:09:39 +00:00
-D BUILD_ENABLE_CXX_STD=C++17 \
2024-09-18 00:49:16 +00:00
-D BUILD_DESIGNER_PLUGIN=ON \
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 \
2024-05-13 19:09:39 +00:00
-D FREECAD_QT_VERSION=6 \
2022-07-30 00:09:37 +00:00
-D INSTALL_TO_SITEPACKAGES=ON \
2024-05-13 19:09:39 +00:00
-D PYTHON_EXECUTABLE=/usr/bin/python \
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"
}