1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Lukas1818 <aur@lukas1818.de>
8 pkgdesc='G-code generator for 3D printers'
10 url=https://github.com/supermerill/SuperSlicer
40 _tag=76856c584987547eb37ceb1140a891991b491dc0
41 _wxcommit=489f6118256853cf5b299d595868641938566cdb
43 git+https://github.com/supermerill/SuperSlicer.git#tag=${_tag}
44 git+https://github.com/slic3r/slic3r-profiles.git
45 https://github.com/prusa3d/wxWidgets/archive/${_wxcommit}/wxWidgets-${_wxcommit}.tar.gz
46 superslicer-cereal.patch
47 superslicer-openexr3.patch
48 superslicer-boost1.79.patch
49 superslicer-wxgtk3-wayland.patch
53 '05c1d81b8dd005b4a5db935e32facc4aefd27696458ff41caef50b93bf2ac12da441e534b1f9d99383bfba6db23c0e4a8b53cf567c245f11478379cf769a5a1b'
54 'a652af374ca4cdd2b1db87bac9a1a6263a3c0df954c8afa4fddea3041659b159412fe3ab850d804a27dcb4b3ca8d64de511ef11769d353d7d2a0f7021dc38e99'
55 'd351d05190977e55047504d13ab4172c7eaf7fb2077a61a448dd29a8a27084ee4b13284143102b7ea3dff0edc8b20675dff0014e9f26cd5f448e50c04a1d6779'
56 '45ff3ab349a92b072eed57a511aead233e4356fcc9ab9382902af9702aee22f73c9a9f07a58420ca20c7c2cd41e81637f1d0114033c2fdb7f597cbcb484fa8ff'
57 '6b8abda2bfee9294bd5cd97380403680d6b2c6187af178e5eb4be2665280d1ff0d66036525b485e64d38d1d464756388fd4b53c6277d691079f51e6ee0c12372')
62 git config --global protocol.file.allow always
63 git submodule init resources/profiles
64 git config submodule.resources/profiles.url ../slic3r-profiles
65 git submodule update resources/profiles
67 patch -Np1 -i ../superslicer-cereal.patch
68 patch -Np1 -i ../superslicer-openexr3.patch
69 patch -Np1 -i ../superslicer-boost1.79.patch
70 patch -Np1 -i ../superslicer-wxgtk3-wayland.patch
79 cmake -B deps -S wxWidgets-${_wxcommit} \
80 -DCMAKE_INSTALL_PREFIX="${srcdir}"/deps/destdir/usr/local \
81 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
82 -DBUILD_SHARED_LIBS=OFF \
83 -DwxBUILD_TOOLKIT=gtk3 \
84 -DwxUSE_MEDIACTRL=OFF \
85 -DwxUSE_DETECT_SM=OFF \
87 -DwxUSE_UNICODE_UTF8=ON \
91 -DwxUSE_REGEX=builtin \
100 cmake -S SuperSlicer -B build -G Ninja \
101 -DCMAKE_BUILD_TYPE=None \
102 -DCMAKE_INSTALL_PREFIX=/usr \
103 -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects -DBOOST_FILESYSTEM_DEPRECATED" \
104 -DCMAKE_PREFIX_PATH="${srcdir}"/deps/destdir/usr/local \
105 -DOpenGL_GL_PREFERENCE=GLVND \
107 -DSLIC3R_BUILD_TESTS=OFF \
110 -DSLIC3R_STATIC=OFF \
111 -DwxWidgets_USE_STATIC=ON
116 DESTDIR="${pkgdir}" cmake --install build
117 test ! -h "${pkgdir}/usr/share/SuperSlicer/resources" || rm "${pkgdir}/usr/share/SuperSlicer/resources"
118 rm -r "${pkgdir}"/usr/lib/udev # Provided by slicer-udev