Things need to be simpler with libraries, flavours are a problem there. If
you have people using ones of two versions of a library, when they write
pets for things depending on that library, they'll end up with wrong WANTLIB.
--
Sent from a phone, apologies for poor formatting.
On 1 August 2025 01:33:59 [email protected] wrote:
På fredag 1. august 2025 kl. 01:44, <[email protected]> skrev:
På torsdag 31. juli 2025 kl. 19:18, Omar Polo
[email protected] skrev:
> Stuart Henderson [email protected] 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 <[email protected]>
# zlib
PERMIT_PACKAGE = Yes
WANTLIB += X11 Xcursor Xext Xfixes Xi Xrandr Xrender Xss iconv m pthread
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>
--
I had an erronious extra WANTLIB line.
Something like this, again apologizes, I am a novice. I am sorry if I
missed something obvious and for the noise.
--
I think this could be done more elegantly, but I am a novice at cvs.
Thank you for your time.
--
Happy porting and well wishes