1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 inherit desktop wrapper xdg
11 DESCRIPTION
="Bambu Studio is a cutting-edge, feature-rich slicing software"
12 HOMEPAGE
="https://bambulab.com"
15 https://github.com/bambulab/${MY_PN}/releases/download/v${PV}/Bambu_Studio_linux_fedora-v${PV}.AppImage \
25 >=media-libs/glm-0.9.9.1
29 net-libs/webkit-gtk:4.1/0
30 >=sci-libs/opencascade-7.3.0:0=
32 >=x11-libs/cairo-1.8.8:=
34 >=x11-libs/pixman-0.30
35 x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
48 cp "${DISTDIR}/${P}.AppImage" "${S}"/ || die
50 chmod +x
"${S}/${P}.AppImage" || die
51 "${S}/${P}.AppImage" --appimage-extract || die
52 rm "${S}/${P}.AppImage" || die
57 rm -r squashfs-root
/{*.
{AppImage
,desktop
},.DirIcon
,usr
} || die
58 patchelf
--replace-needed libwebkit2gtk-4.0.so
.37 libwebkit2gtk-4.1.so
.0 \
59 "${S}"/squashfs-root
/bin
/bambu-studio || die
60 patchelf
--replace-needed libjavascriptcoregtk-4.0.so
.18 libjavascriptcoregtk-4.1.so
.0 \
61 "${S}"/squashfs-root
/bin
/bambu-studio || die
62 patchelf
--remove-needed libsoup-2.4.so
.1 \
63 "${S}"/squashfs-root
/bin
/bambu-studio || die
64 patchelf
--set-rpath '$ORIGIN' \
65 "${S}"/squashfs-root
/bin
/bambu-studio || die
67 doins
-r "${S}"/squashfs-root
/*
68 fperms
+x
"/opt/${PN}/AppRun" "/opt/${PN}/bin/bambu-studio"
69 doicon
-s 192 "${S}"/squashfs-root
/BambuStudio.png
70 domenu
"${FILESDIR}/bambu-studio.desktop"
71 make_wrapper bambu-studio
"/opt/${PN}/AppRun"