Ports: Add port for SDL2_net
This commit is contained in:
parent
f589acaac9
commit
dd35bd158e
Notes:
sideshowbarker
2024-07-18 12:11:00 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/dd35bd158e6 Pull-request: https://github.com/SerenityOS/serenity/pull/8083 Reviewed-by: https://github.com/gmta
5 changed files with 50 additions and 0 deletions
|
@ -123,6 +123,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`SDL2_gfx`](SDL2_gfx/) | SDL2\_gfx (Graphics primitives add-on for SDL2) | 1.0.4 | https://sourceforge.net/projects/sdl2gfx/ |
|
||||
| [`SDL2_image`](SDL2_image/) | SDL2\_image (Image loading add-on for SDL2) | 2.0.5 | https://www.libsdl.org/projects/SDL_image/ |
|
||||
| [`SDL2_mixer`](SDL2_mixer/) | SDL2\_mixer (audio mixer add-on for SDL2) | 2.0.4 | https://www.libsdl.org/projects/SDL_mixer/ |
|
||||
| [`SDL2_net`](SDL2_net/) | SDL2\_net (network add-on for SDL2) | 2.0.1 | https://www.libsdl.org/projects/SDL_net/ |
|
||||
| [`SDL2_ttf`](SDL2_ttf/) | SDL2\_ttf (TrueType Font add-on for SDL2) | 2.0.15 | https://www.libsdl.org/projects/SDL_ttf/ |
|
||||
| [`sed`](sed/) | GNU sed | 4.2.1 | https://www.gnu.org/software/sed/ |
|
||||
| [`sl`](sl/) | Steam Locomotive (SL) | | https://github.com/mtoyoda/sl |
|
||||
|
|
12
Ports/SDL2_net/package.sh
Executable file
12
Ports/SDL2_net/package.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=SDL2_net
|
||||
version=2.0.1
|
||||
useconfigure=true
|
||||
configopts=--with-sdl-prefix="${SERENITY_INSTALL_ROOT}/usr/local"
|
||||
files="https://www.libsdl.org/projects/SDL_net/release/SDL2_net-${version}.tar.gz SDL2_net-${version}.tar.gz 15ce8a7e5a23dafe8177c8df6e6c79b6749a03fff1e8196742d3571657609d21"
|
||||
auth_type=sha256
|
||||
depends="SDL2"
|
||||
|
||||
post_install() {
|
||||
run ${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libSDL2_net.so -Wl,-soname,libSDL2_net.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libSDL2_net.a -Wl,--no-whole-archive
|
||||
}
|
12
Ports/SDL2_net/patches/configure.patch
Normal file
12
Ports/SDL2_net/patches/configure.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Naur SDL2_net-2.0.1/config.sub SDL2_net-2.0.1.serenity/config.sub
|
||||
--- SDL2_net-2.0.1/config.sub 2016-01-03 08:57:09.000000000 +0100
|
||||
+++ SDL2_net-2.0.1.serenity/config.sub 2021-06-16 10:40:58.771380293 +0200
|
||||
@@ -1364,7 +1364,7 @@
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* \
|
14
Ports/SDL2_net/patches/ifconf.patch
Normal file
14
Ports/SDL2_net/patches/ifconf.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
diff -Naur SDL2_net-2.0.1/SDLnet.c SDL2_net-2.0.1.serenity/SDLnet.c
|
||||
--- SDL2_net-2.0.1/SDLnet.c 2016-01-03 08:57:09.000000000 +0100
|
||||
+++ SDL2_net-2.0.1.serenity/SDLnet.c 2021-06-16 10:48:32.073734588 +0200
|
||||
@@ -184,6 +184,10 @@
|
||||
return inet_ntoa(in);
|
||||
}
|
||||
|
||||
+#ifdef __serenity__
|
||||
+#undef SIOCGIFCONF
|
||||
+#endif
|
||||
+
|
||||
int SDLNet_GetLocalAddresses(IPaddress *addresses, int maxcount)
|
||||
{
|
||||
int count = 0;
|
11
Ports/SDL2_net/patches/select.patch
Normal file
11
Ports/SDL2_net/patches/select.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff -Naur SDL2_net-2.0.1/SDLnetsys.h SDL2_net-2.0.1.serenity/SDLnetsys.h
|
||||
--- SDL2_net-2.0.1/SDLnetsys.h 2021-06-16 10:42:24.609750625 +0200
|
||||
+++ SDL2_net-2.0.1.serenity/SDLnetsys.h 2016-01-03 08:57:09.000000000 +0100
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <iphlpapi.h>
|
||||
#else /* UNIX */
|
||||
#include <sys/types.h>
|
||||
+#include <sys/select.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/socket.h>
|
||||
#endif
|
Loading…
Add table
Reference in a new issue