blob: a80c0cd689a00d6be0d8443c7761570d976d1c17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Maintainer: Alexander Jacocks <alexander@redhat.com>
pkgname="bambustudio"
pkgver=1.3.0.12
pkgrel=1
pkgdesc="PC Software for BambuLab's 3D printers"
arch=('x86_64')
url="https://github.com/bambulab/BambuStudio"
license=('AGPLv3')
depends=('mesa' 'glu' 'cairo' 'gtk3' 'libsoup' 'webkit2gtk' 'gstreamer' 'openvdb' 'wayland' 'wayland-protocols' 'libxkbcommon' 'harmonyos-sans-git')
makedepends=('cmake' 'extra-cmake-modules' 'git' 'm4' 'pkgconf')
provides=("BambuStudio")
conflicts=("BambuStudio")
source=(
"https://github.com/bambulab/BambuStudio/archive/refs/tags/v${pkgver}.tar.gz"
'BambuStudio.cpp.patch'
'CMakeLists.txt.patch'
'bambu-studio.sh'
)
sha512sums=('09b7f84a2bb670e2645711850d7ea33a7e09855cfb180aae88208247142217ce222df1773a42fffc876f66b3a7468a33ad99786727f32692827e8025ffeb8af0'
'419e7ffb8044531a1c78cd191a96c11f719b439afce674f7e31d1d2e0dc57ecc03cea27ab4ad5ee6522606630fd59ac1745b9a1b787db14893561a4495806117'
'8682e3b11271ae09587298f4737b987a589db05e049c3f4699951d710c6263e6016ee2287b050143336b9b24d70d206a1d7c5396bf74a5ccf092af6e1491ff54'
'e3cb1b072754ae6443fa136fffa263761b5e4e3da5dca1e91b7c4d577daaf01afa0affde04f1355fc404fcd336852db4ce8dc57938833f864346a0b17c12d6d6')
prepare() {
# link up directory
ln -sf BambuStudio-${pkgver} BambuStudio
# fix broken udev install reference
patch -p0 < "$srcdir/CMakeLists.txt.patch"
}
build() {
# deps
cd "$srcdir/BambuStudio/deps"
for dir in build deps; do
test -d $dir || mkdir $dir
done
cd build
if [ ! -f $srcdir/.deps_done ]; then
cmake ../ -DDESTDIR="$srcdir/dep_linux" -DCMAKE_BUILD_TYPE=Release -DDEP_WX_GTK3=1
{ test "$(nproc)" -gt 1 && make -j"$(nproc)" ;} || make
fi
touch $srcdir/.deps_done
# bins
cd "$srcdir/BambuStudio"
for dir in build install_dir; do
test -d $dir || mkdir $dir
done
cd build
cmake .. -DSLIC3R_FHS=1 -DSLIC3R_STATIC=ON -DSLIC3R_GTK=3 -DBBL_RELEASE_TO_PUBLIC=1 -DCMAKE_PREFIX_PATH="$srcdir/dep_linux/usr/local" -DCMAKE_INSTALL_PREFIX="$srcdir/install_dir" -DCMAKE_BUILD_TYPE=Release
{ test "$(nproc)" -gt 1 && cmake --build . --target install --config Release -j"$(nproc)" ;} || cmake --build . --target install --config Release
}
package() {
echo "Entering directory $srcdir/install_dir/bin."
install -d "$pkgdir/usr/bin"
cd "$srcdir/install_dir/bin"
install "bambu-studio" "$pkgdir/usr/bin/bambu-studio-bin"
install "$srcdir/bambu-studio.sh" "$pkgdir/usr/bin/bambu-studio"
echo "Entering directory $srcdir/BambuStudio/install_dir."
cd "$srcdir/install_dir"
find share -type f -exec install -D {} "$pkgdir/usr/{}" \;
echo "Entering directory $srcdir/BambuStudio/doc."
cd "$srcdir/BambuStudio/doc"
install -D -t "$pkgdir/usr/share/doc/$pkgname" *.md
}
|