209.6. sdl2-net-2.4.0
Portable TCP and UDP sockets for SDL2 programs
2.4.0-1 · Zlib · 0.1 SBU · 78.2 KiB, 12 files · 42_graphics, 95 of 189 · ports/core/game-libs/sdl2-net
Homepage: https://github.com/libsdl-org/SDL_net
Why it is in KDOS. The comment above the 9 ports from sdl2-image to sdl3-ttf in script/phases/42_graphics/packages.d/game-libs.txt:
The SDL satellites for SDL 2 and SDL 3. There is no
sdl2-config: a build that asks for it is givenpkg-config sdl2, and an SDL 2 program runs on SDL 3 through sdl2-compat.
Depends on: cmake, ninja, pkgconf, sdl2-compat.
Required by (3): chocolate-doom, crispy-doom, dosbox-x.
Sources: sdl2-net-2.4.0.tar.gz (8.3 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install sdl2-net'
build.sh:
mkdir -p build && cd build
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DSDL2NET_SAMPLES=OFF
ninja
DESTDIR=$PKG ninja install
Libraries: libSDL2_net-2.0.so, libSDL2_net.so.
Directories: /usr/lib/cmake/SDL2_net, /usr/share/licenses/SDL2_net, /usr/share/licenses/sdl2-net.