Index | Thread | Search

From:
yaydn@protonmail.com
Subject:
Re: new(ish) devel/sdl3
To:
"op@omarpolo.com" <op@omarpolo.com>
Cc:
"thfr@openbsd.org" <thfr@openbsd.org>, "ports@openbsd.org" <ports@openbsd.org>
Date:
Fri, 01 Aug 2025 00:07:16 +0000

Download raw body.

Thread




Sendt med Proton Mail sikker e-post.

På fredag 1. august 2025 kl. 01:46, yaydn@protonmail.com <yaydn@protonmail.com> skrev:

> På torsdag 31. juli 2025 kl. 19:18, Omar Polo
> op@omarpolo.com skrev:
>
> > Stuart Henderson stu@spacehopper.org wrote:
> >
> > > On 2025/07/31 17:46, Omar Polo wrote:
> > >
> > > > Hello,
> > > >
> > > > This is thfr' devel/sdl3 port but with the version bumped.
> > > >
> > > > I need it for updating games/taisei. I can testify that it works :)
> > >
> > > I think it's ok to import this, but be prepared to deal with any SDL 2
> > > ports which might start picking it up. I think I've disabled that in
> > > something before but there may be others.
> > >
> > > Ideally test with a 'mini bulk' with this already installed and
> > > run port-lib-depends-check first, though I appreciate there a quite a
> > > lot of ports, it might at least be worth doing a sample (perhaps the
> > > more recently updated ones?).
> > >
> > > I usually construct a list from grep [...] ports-INDEX | cut -d\| -f2,
> > > edit then point SUBDIRLIST at it, e.g. something along these lines
> > >
> > > cd /usr/ports
> > > SUBDIRLIST=/path/to/list make prepare FETCH_PACKAGES=
> > > SUBDIRLIST=/path/to/list make package REPORT_PROBLEM=/usr/bin/true
> > > SUBDIRLIST=/path/to/list make port-lib-depends-check REPORT_PROBLEM=/usr/bin/true
> > >
> > > (setting REPORT_PROBLEM like this stops it from killing the build at
> > > the first error)
> >
> > oh, thank you for the tip! i'll try to make a list later and run a mini
> > bulk tonight. let's see how it goes :)
>
>
>
> I built this successfully on current/amd64.
>
> May I inquire if there is any technical reason for explicitly disabling
> wayland?
>
> Upstream has wayland and x11 enabled, so maybe this is to lower
> dependencies? Can we have subpackages if that is the case?
>
> I know some only use X11, others wayland only, and the general mix of
> these and maybe arcan.
>
> I suppose this could be done in a couple ways. Here is a non-exhaustive
> list.
>
> Case 1)
> There is some reason for x11 only and no subpackages.
>
> Case 2)
> The main package with only X11 and a subpackage -wayland.
>
> Case 3)
> The main package with both wayland and X11 and a subpackage -x11only.
>
>
>
> Example of Makefile with wayland not explicitly disabled and a x11only
> flavor:
>

COMMENT =	cross-platform multimedia library

V =			3.2.18
DISTNAME =		SDL3-${V}
PKGNAME =		${DISTNAME:L}

SHARED_LIBS +=  SDL3                      0.0 # 3.2.18

CATEGORIES =		devel
HOMEPAGE =		https://libsdl.org/
MAINTAINER =		Thomas Frohwein <thfr@openbsd.org>

# zlib
PERMIT_PACKAGE =	Yes

WANTLIB += X11 Xcursor Xext Xfixes Xi Xrandr Xrender Xss iconv m pthread
WANTLIB += sndio wayland-client wayland-cursor xkbcommon

SITES =			https://github.com/libsdl-org/SDL/releases/download/release-${V}/

FLAVORS =		x11only
FLAVOR ?=

MODULES =		devel/cmake
MODCMAKE_LDFLAGS =	-L${LOCALBASE}/lib -L${X11BASE}/lib -liconv

WANTLIB += X11 Xcursor Xext Xfixes Xi Xrandr Xrender Xss iconv m pthread

CONFIGURE_ARGS =	-DSDL_ALSA=OFF \
			-DSDL_DBUS=OFF \
			-DSDL_HIDAPI=OFF \
			-DSDL_INSTALL=ON \
			-DSDL_JACK=OFF \
			-DSDL_LIBUDEV=OFF \
			-DSDL_PIPEWIRE=OFF \
			-DSDL_PULSEAUDIO=OFF \
			-DSDL_SNDIO_SHARED=OFF \
			-DSDL_TESTS=ON \
			-DSDL_VULKAN=ON \
			-DSDL_WAYLAND_SHARED=OFF \
			-DSDL_X11_SHARED=OFF

.if ${FLAVOR:Mx11only}
FULLPKGNAME=   sdl3-x11only-${V}

WANTLIB += sndio

LIB_DEPENDS =		converters/libiconv

CONFIGURE_ARGS +=	-DSDL_WAYLAND=OFF \

.else
WANTLIB += sndio wayland-client wayland-cursor xkbcommon

BUILD_DEPENDS =		wayland/libinput-openbsd \
			wayland/wayland-protocols

LIB_DEPENDS =		converters/libiconv \
			wayland/wayland \
			x11/xkbcommon
.endif

CFLAGS +=		-I${LOCALBASE}/include -I${X11BASE}/include

.include <bsd.port.mk>

--

This might read better and I messed up the versioning on the flavor
previously. Sorry.


>
> Thank you for your time.
>
> --
> Happy porting and well wishes