x11-terms/ghostty: add missing depend dev-libs/oniguruma
[gentoo-zh.git] / media-gfx / bambustudio-bin / bambustudio-bin-01.10.01.50.ebuild
blob360c76e7f79becafb0c40af9ec9b59c073cb1a8b
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 MY_PN="BambuStudio"
7 WX_GTK_VER="3.0-gtk3"
9 inherit desktop wrapper xdg
11 DESCRIPTION="Bambu Studio is a cutting-edge, feature-rich slicing software"
12 HOMEPAGE="https://bambulab.com"
14 SRC_URI="
15 https://github.com/bambulab/${MY_PN}/releases/download/v${PV}/Bambu_Studio_linux_fedora-v${PV}.AppImage \
16 -> ${P}.AppImage
19 LICENSE="AGPL-3"
20 SLOT="0"
21 KEYWORDS="~amd64"
22 RDEPEND="
23 media-gfx/openvdb
24 media-libs/glew:0=
25 >=media-libs/glm-0.9.9.1
26 media-libs/gstreamer
27 media-libs/mesa[X(+)]
28 net-libs/libsoup:3.0=
29 net-libs/webkit-gtk:4.1/0
30 >=sci-libs/opencascade-7.3.0:0=
31 virtual/glu
32 >=x11-libs/cairo-1.8.8:=
33 x11-libs/libxkbcommon
34 >=x11-libs/pixman-0.30
35 x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
36 sys-libs/zlib
38 DEPEND="${RDEPEND}"
39 BDEPEND="
40 dev-util/patchelf
43 QA_PREBUILT="*"
44 RESTRICT="strip"
46 src_unpack() {
47 mkdir "${S}" || die
48 cp "${DISTDIR}/${P}.AppImage" "${S}"/ || die
49 pushd "${S}" || die
50 chmod +x "${S}/${P}.AppImage" || die
51 "${S}/${P}.AppImage" --appimage-extract || die
52 rm "${S}/${P}.AppImage" || die
53 popd || die
56 src_install() {
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
66 insinto /opt/"${PN}"
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"