On Mon, Mar 02, 2026 at 10:57:05AM +0000, Stuart Henderson wrote:
> On 2026/03/01 22:20, Renato Aguiar wrote:
> > I'm OK with that. We also have the option to, instead, remove debug info
> > completely.
> >
> > This is what I got with the attached diff changing the build type.
Note that you added -DCMAKE_BUILD_TYPE=RelWithDebInfo in your 2.7.4
update diff, most other ports don't set it. :)
> oh, I missed the setting in Makefile, I was looking in the cmake files
> in the distribution :)
>
> Then, I think the combination of the two diffs would probably be best,
> which will build with symbols on archs which provide debug packages,
> and without symbols otherwise.
Agreed.
> > Before:
> >
> > 256M /usr/ports/packages/amd64/ftp/prusaslicer-2.9.4.tgz
> > 875M /usr/local/bin/prusa-slicer
> >
> > After:
> >
> > 76.9M /usr/ports/packages/amd64/ftp/prusaslicer-2.9.4p0.tgz
> > 43.0M /usr/local/bin/prusa-slicer
>
> This is essentially the same as produced by my earlier diff, with a
> debug-prusaslicer package that has the difference.
>
> $ ls -lh fake-amd64/usr/local/bin/{,.debug}
> fake-amd64/usr/local/bin/:
> total 87488
> lrwxr-xr-x 1 _pbuild _pbuild 12B Mar 2 10:51 prusa-gcodeviewer ->
> prusa-slicer
> -rwxr-xr-x 1 _pbuild _pbuild 42.7M Mar 2 10:53 prusa-slicer
>
> fake-amd64/usr/local/bin/.debug:
> total 1662656
> -rwxr-xr-x 1 _pbuild _pbuild 812M Mar 2 10:53 prusa-slicer.dbg
>
> ok?
cmake.port.mk already provides sane defaults for CMAKE_BUILD_TYPE so
you could (and probably should) stop explicitely setting
-DCMAKE_BUILD_TYPE=Release.
Anyway, ok jca@
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/cad/prusaslicer/Makefile,v
> diff -u -p -r1.28 Makefile
> --- Makefile 15 Feb 2026 00:20:27 -0000 1.28
> +++ Makefile 2 Mar 2026 10:53:56 -0000
> @@ -3,6 +3,7 @@ ONLY_FOR_ARCHS = ${LP64_ARCHS}
> DPB_PROPERTIES = parallel
>
> V = 2.9.4
> +REVISION = 0
> PKGNAME = prusaslicer-${V}
>
> GH_ACCOUNT = prusa3d
> @@ -38,6 +39,7 @@ WANTLIB += wx_gtk3u_webview-3.2 z z3
> FIX_CRLF_FILES = src/slic3r/GUI/GLCanvas3D.cpp
>
> COMPILER = base-clang ports-gcc
> +DEBUG_PACKAGES = ${BUILD_PACKAGES}
>
> MODULES = devel/cmake \
> x11/gnome
> @@ -71,7 +73,7 @@ LIB_DEPENDS = cad/opencascade \
> x11/wxWidgets \
> x11/wxWidgets,-webview
>
> -CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE=RelWithDebInfo \
> +CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE=Release \
> -DCMAKE_MODULE_PATH=${PREFIX}/lib/cmake/OpenVDB \
> -DSLIC3R_FHS=1 \
> -DSLIC3R_GTK=3 \
>
--
jca