blob: fa0f85f88bbb39ae8159ec76b4e74025676308b9 (
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg
MY_PN="OrcaSlicer"
DESCRIPTION="G-code generator for 3D printers (Bambu, Prusa, Voron, Creality)"
HOMEPAGE="https://github.com/OrcaSlicer/OrcaSlicer"
SRC_URI="
amd64? ( https://github.com/OrcaSlicer/OrcaSlicer/releases/download/v${PV}/${MY_PN}_Linux_AppImage_Ubuntu2404_V${PV}.AppImage -> ${P}-amd64.AppImage )
arm64? ( https://github.com/OrcaSlicer/OrcaSlicer/releases/download/v${PV}/${MY_PN}_Linux_AppImage_Ubuntu2404_aarch64_V${PV}.AppImage -> ${P}-arm64.AppImage )
"
S="${WORKDIR}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
RESTRICT="mirror strip bindist"
# AppImage bundles most dependencies, but we need basic system libs.
# The bundled wxWidgets assumes X11 (xvimagesink), so gst-plugins-base
# must have the X USE flag. libmspack is needed for .3mf unpacking,
# and gst-plugins-openh264 for Bambu camera feeds.
RDEPEND="
app-accessibility/at-spi2-core
app-arch/bzip2
app-crypt/libsecret
dev-libs/expat
dev-libs/glib:2
dev-libs/libmspack
dev-libs/wayland
media-fonts/nanum
media-libs/fontconfig
media-libs/gst-plugins-base:1.0[X]
media-libs/gst-plugins-good:1.0
media-libs/gstreamer:1.0
media-libs/harfbuzz
media-libs/libglvnd
media-libs/mesa
media-libs/tiff
media-plugins/gst-plugins-openh264:1.0
net-libs/libsoup:3.0
net-libs/webkit-gtk:4.1
sys-apps/dbus
virtual/glu
virtual/zlib
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:3
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXext
x11-libs/libxcb
x11-libs/libxkbcommon
x11-libs/pango
"
BDEPEND="dev-util/patchelf"
QA_PREBUILT="*"
src_unpack() {
local appimage="${P}-${ARCH}.AppImage"
cp "${DISTDIR}/${appimage}" "${WORKDIR}/" || die
chmod +x "${WORKDIR}/${appimage}" || die
"${WORKDIR}/${appimage}" --appimage-extract || die "Failed to extract AppImage"
mv squashfs-root "${MY_PN}" || die
}
src_install() {
# Fix RUNPATH security issue
patchelf --set-rpath '$ORIGIN' "${S}/${MY_PN}/bin/orca-slicer" || die
# Ubuntu ships bzip2 with SONAME libbz2.so.1.0; Gentoo uses libbz2.so.1.
# Rewrite NEEDED entries so qa-unresolved-soname-deps is satisfied and the
# binary stays linkable after Gentoo drops the libbz2.so.1.0 compat symlink.
local f
while IFS= read -r -d '' f; do
[[ -L ${f} ]] && continue
patchelf --print-needed "${f}" 2>/dev/null | grep -qxF 'libbz2.so.1.0' || continue
patchelf --replace-needed libbz2.so.1.0 libbz2.so.1 "${f}" || die
done < <(find "${S}/${MY_PN}" -type f -print0)
# Install application files
insinto /opt/${PN}
doins -r "${MY_PN}"/*
# Make binaries executable
fperms +x /opt/${PN}/AppRun
fperms +x /opt/${PN}/bin/orca-slicer
fperms +x /opt/${PN}/libexec/orca-slicer-env
# Find and make all .so files executable
find "${ED}/opt/${PN}" -name "*.so*" -exec chmod +x {} \;
# Create symlink to launcher
dosym ../../opt/${PN}/AppRun /usr/bin/orca-slicer
# Install desktop file and icon
newicon "${S}/${MY_PN}/OrcaSlicer.png" orca-slicer.png
make_desktop_entry "orca-slicer %F" "OrcaSlicer" "orca-slicer" "Graphics;3DGraphics;Engineering;" \
"MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;"
}
pkg_postinst() {
xdg_pkg_postinst
elog "OrcaSlicer has been installed to /opt/${PN}"
elog "You can start it by running 'orca-slicer' from the command line"
elog "or by selecting it from your application menu."
elog ""
elog "Wayland support is automatically detected and enabled when needed."
}
|