add OCCT Patch to build with system freetype; patch localizations script

This commit is contained in:
lod 2025-03-25 23:15:45 +01:00
parent 163d7ebd48
commit db4f210098
2 changed files with 18 additions and 11 deletions

View file

@ -17,6 +17,7 @@ pkgbase = orca-slicer
depends = dbus
depends = expat
depends = fontconfig
depends = freetype2
depends = gcc-libs
depends = gdk-pixbuf2
depends = glib2
@ -39,6 +40,8 @@ pkgbase = orca-slicer
options = !debug
options = !emptydirs
source = orca-slicer::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v2.3.0
source = https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch
b2sums = 543653c5769e2f022877608c14bad64ea05dbc30d41a58dc1a82eaca6615c0183f7573ced790a263b8509f6a4abdfa6b259ae0701a2468e10c15eb40d1926555
b2sums = cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408
pkgname = orca-slicer

View file

@ -6,24 +6,27 @@ pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, C
arch=('x86_64')
url="https://github.com/SoftFever/OrcaSlicer"
license=('AGPL-3.0-only')
depends=('cairo' 'dbus' 'expat' 'fontconfig' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc'
depends=('cairo' 'dbus' 'expat' 'fontconfig' 'freetype2' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc'
'gst-plugins-base-libs' 'gstreamer' 'gtk3' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo'
'libspnav' 'libtiff' 'libx11' 'pango' 'python' 'wayland' 'webkit2gtk-4.1' 'zlib')
makedepends=('cmake' 'extra-cmake-modules' 'git' 'glew' 'm4' 'ninja' 'pkgconf' 'wayland-protocols')
options=('!debug' '!emptydirs')
provides=("orca-slicer")
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v$pkgver")
b2sums=('543653c5769e2f022877608c14bad64ea05dbc30d41a58dc1a82eaca6615c0183f7573ced790a263b8509f6a4abdfa6b259ae0701a2468e10c15eb40d1926555')
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v$pkgver"
"https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch")
b2sums=('543653c5769e2f022877608c14bad64ea05dbc30d41a58dc1a82eaca6615c0183f7573ced790a263b8509f6a4abdfa6b259ae0701a2468e10c15eb40d1926555'
'cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408')
prepare() {
cd $pkgname
# C++20 disallows the use of the Point<T> syntax in the constructor
sed -i 's/explicit Point<T>(/explicit Point(/' src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h
sed -i 's/explicit Point<T>(/explicit Point(/' $pkgname/src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h
# abuse FLATPAK IF statement to build against some system libs
sed -i 's/if(FLATPAK)/if(true)/' deps/CMakeLists.txt
# System Freetype has some breaking changes
sed -i 's/find_package(Freetype)/# find_package(Freetype)/' deps/CMakeLists.txt
sed -i 's|https://www.mpfr.org/mpfr-current/mpfr-4.2.1.tar.bz2|https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.bz2|' deps/MPFR/MPFR.cmake
sed -i 's/if(FLATPAK)/if(true)/' $pkgname/deps/CMakeLists.txt
# cherry pick an OCCT commit to make it build with system freetype
cat 7236e83dcc1e7284e66dc61e612154617ef715d6.patch >> $pkgname/deps/OCCT/0001-OCCT-fix.patch
# Fix xgettext: case-sensitive mismatches
sed -i 's|src/slic3r/GUI/AMSMappingPopup.cpp|src/slic3r/GUI/AmsMappingPopup.cpp|g' $pkgname/localization/i18n/list.txt
sed -i 's|https://www.mpfr.org/mpfr-current/mpfr-4.2.1.tar.bz2|https://www.mpfr.org/mpfr-4.2.1/mpfr-4.2.1.tar.bz2|' $pkgname/deps/MPFR/MPFR.cmake
}
build() {
@ -50,7 +53,8 @@ build() {
-DSLIC3R_GTK=3
ninja -C build
./run_gettext.sh
# add localizations
./run_gettext.sh --full
}
package() {