Thursday, July 31, 2025

Re: new(ish) devel/sdl3

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 yaydn@protonmail.com wrote:

På fredag 1. august 2025 kl. 01:44, <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

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

Re: Fcitx5 crashes in KDE Plasma on OpenBSD -current

Thanks for your response.

Yes, I have the system-wide messagebus service enabled and running:

# rcctl check messagebus
messagebus(ok)

As for session D-Bus, I start KDE from `.xsession` using the setup from `/usr/local/share/doc/pkg-readmes/README-plasma`. Here's the relevant part:

export XDG_RUNTIME_DIR=/tmp/run/$(id -u)
if [ ! -d $XDG_RUNTIME_DIR ]; then
    mkdir -m 700 -p $XDG_RUNTIME_DIR
fi

if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then
    eval `dbus-launch --sh-syntax --exit-with-x11`
fi

/usr/local/bin/ck-launch-session /usr/local/bin/startplasma-x11

Droid niu <lionux79@gmail.com> 于 2025年7月30日周三 13:51写道:
Thanks for your response.

Yes, I have the system-wide messagebus service enabled and running:

# rcctl check messagebus
messagebus(ok)

As for session D-Bus, I start KDE from `.xsession` using the setup from `/usr/local/share/doc/pkg-readmes/README-plasma`. Here's the relevant part:

export XDG_RUNTIME_DIR=/tmp/run/$(id -u)
if [ ! -d $XDG_RUNTIME_DIR ]; then
    mkdir -m 700 -p $XDG_RUNTIME_DIR
fi

if [ -x /usr/local/bin/dbus-launch -a -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then
    eval `dbus-launch --sh-syntax --exit-with-x11`
fi

/usr/local/bin/ck-launch-session /usr/local/bin/startplasma-x11

Rafael Sadowski <rafael@sizeofvoid.org> 于 2025年7月30日周三 02:26写道:
On Tue Jul 29, 2025 at 08:08:42PM +0800, Droid niu wrote:
> Hi,
>
> I'm currently using OpenBSD -current (amd64) with KDE Plasma installed via
> packages. When trying to use fcitx5 as an input method framework, it fails
> to work properly in KDE, and crashes shortly after launching.
>
>
> Here's the output when I start fcitx5 manually:
>
> ---
>
> fcitx5
>
> I2025-07-29 18:45:30.974558 xcbconnection.cpp:189] Connecting to X11
> display, display name::0.


> I2025-07-29 18:45:31.132227 dbusmodule.cpp:790] Service name change:
> org.fcitx.Fcitx5 :1.104
> E2025-07-29 18:45:31.132498 portalsettingmonitor.cpp:115] DBus call error:
> org.freedesktop.DBus.Error.ServiceUnknown The name
> org.freedesktop.portal.Desktop was not provided by any .service files
>
> dbus[23920]: arguments to dbus_connection_dispatch() were incorrect,
> assertion "connection != NULL" failed
> Abort trap (core dumped)
>
> ---
>
> fcitx5 seems to work fine in `cwm` or minimal X11 sessions, but not in KDE.
> The same environment variables (`XMODIFIERS`, `GTK_IM_MODULE`,
> `QT_IM_MODULE`) are properly set.
>
> This seems related to the lack of `xdg-desktop-portal` or some integration
> issue in KDE. Should I install anything else to make fcitx5 work on KDE
> under OpenBSD? Or is this a known issue?
>
> Thanks for maintaining the KDE and fcitx ports. Let me know if I can help
> provide further logs or testing.
>
> Regards,
> niu

For me it starts without issues:

fcitx5
I2025-07-29 20:21:03.622540 instance.cpp:1385] Override Enabled Addons: {}
I2025-07-29 20:21:03.622908 instance.cpp:1386] Override Disabled Addons: {}
I2025-07-29 20:21:03.630687 xcbconnection.cpp:189] Connecting to X11 display, display name::0.
I2025-07-29 20:21:03.631660 addonmanager.cpp:205] Loaded addon xcb
I2025-07-29 20:21:03.633498 addonmanager.cpp:205] Loaded addon quickphrase
I2025-07-29 20:21:03.639298 addonmanager.cpp:205] Loaded addon keyboard
I2025-07-29 20:21:03.639710 addonmanager.cpp:205] Loaded addon imselector
I2025-07-29 20:21:03.640785 addonmanager.cpp:205] Loaded addon clipboard
I2025-07-29 20:21:03.645802 addonmanager.cpp:205] Loaded addon dbus
I2025-07-29 20:21:03.646409 addonmanager.cpp:205] Loaded addon unicode
I2025-07-29 20:21:03.648677 addonmanager.cpp:205] Loaded addon ibusfrontend
I2025-07-29 20:21:03.649716 addonmanager.cpp:205] Loaded addon dbusfrontend
I2025-07-29 20:21:03.652153 addonmanager.cpp:205] Loaded addon fcitx4frontend
I2025-07-29 20:21:03.653556 addonmanager.cpp:205] Loaded addon xim
I2025-07-29 20:21:03.700214 inputmethodmanager.cpp:209] Found 617 input method(s) in addon keyboard
I2025-07-29 20:21:03.700452 inputmethodmanager.cpp:132] No valid input method group in configuration. Building a default one
I2025-07-29 20:21:03.701073 instance.cpp:379] Items in Group 1: [InputMethodGroupItem(keyboard-de,layout=)]
I2025-07-29 20:21:03.701290 instance.cpp:379] Items in Group 2: [InputMethodGroupItem(keyboard-gb,layout=)]
I2025-07-29 20:21:03.701333 instance.cpp:384] Generated groups: [Group 1, Group 2]
I2025-07-29 20:21:03.727220 addonmanager.cpp:205] Loaded addon kimpanel
I2025-07-29 20:21:03.727842 addonmanager.cpp:205] Loaded addon virtualkeyboard
I2025-07-29 20:21:03.768459 classicui.cpp:64] Created classicui for x11 display::0
I2025-07-29 20:21:03.768559 addonmanager.cpp:205] Loaded addon classicui
I2025-07-29 20:21:03.769350 addonmanager.cpp:205] Loaded addon notificationitem
I2025-07-29 20:21:03.770206 addonmanager.cpp:205] Loaded addon notifications
I2025-07-29 20:21:03.770721 dbusmodule.cpp:790] Service name change: org.fcitx.Fcitx5  :1.93
I2025-07-29 20:21:03.770880 kimpanel.cpp:116] Kimpanel new owner:
I2025-07-29 20:21:03.770998 virtualkeyboard.cpp:216] VirtualKeyboard new owner:
E2025-07-29 20:21:03.771097 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.DBus.Error.ServiceUnknown The name org.freedesktop.portal.Desktop was not provided by any .service files


Do you have running a systemwide (rcctl start messagebus) dbus
and a session one?