SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

26
devel/sdl-net/Makefile Normal file
View file

@ -0,0 +1,26 @@
COMMENT= SDL cross-platform networking library
V= 1.2.8
DISTNAME= SDL_net-${V}
PKGNAME= sdl-net-${V}
REVISION= 4
CATEGORIES= devel net
MASTER_SITES= https://www.libsdl.org/projects/SDL_net/release/ \
http://distcache.freebsd.org/ports-distfiles/
SHARED_LIBS= SDL_net 2.0
HOMEPAGE= https://www.libsdl.org/projects/SDL_net/
# Zlib
PERMIT_PACKAGE= Yes
WANTLIB= SDL iconv m pthread sndio usbhid
LIB_DEPENDS= devel/sdl
SEPARATE_BUILD= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+=--disable-gui
.include <bsd.port.mk>

2
devel/sdl-net/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (SDL_net-1.2.8.tar.gz) = X0p6i7iE95PCeKw/NxO+QZgMXu3M7P8CYEETR3FPrLQ=
SIZE (SDL_net-1.2.8.tar.gz) = 360958

View file

@ -0,0 +1,15 @@
--- Makefile.in.orig Sun Jan 15 11:20:10 2012
+++ Makefile.in Sat Mar 17 12:35:37 2012
@@ -293,12 +293,10 @@ EXTRA_DIST = \
@USE_VERSION_RC_FALSE@libSDL_net_la_LDFLAGS = \
@USE_VERSION_RC_FALSE@ -no-undefined \
-@USE_VERSION_RC_FALSE@ -release $(LT_RELEASE) \
@USE_VERSION_RC_FALSE@ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
@USE_VERSION_RC_TRUE@libSDL_net_la_LDFLAGS = \
@USE_VERSION_RC_TRUE@ -no-undefined \
-@USE_VERSION_RC_TRUE@ -release $(LT_RELEASE) \
@USE_VERSION_RC_TRUE@ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -Wl,version.o
@USE_VERSION_RC_FALSE@libSDL_net_la_LIBADD = @INETLIB@

View file

@ -0,0 +1,95 @@
- Fix alignment issues on strict alignment architectures.
- Don't unnecessarily byte-swap on big endian hosts.
--- SDL_net.h.orig Fri Jun 1 02:19:40 2012
+++ SDL_net.h Fri Jun 1 02:31:05 2012
@@ -354,7 +354,7 @@ extern no_parse_DECLSPEC char * SDLCALL SDLNet_GetErro
/* Inline macro functions to read/write network data */
/* Warning, some systems have data access alignment restrictions */
-#if defined(sparc) || defined(mips)
+#if defined(__STRICT_ALIGNMENT)
#define SDL_DATA_ALIGNED 1
#endif
#ifndef SDL_DATA_ALIGNED
@@ -366,7 +366,6 @@ extern no_parse_DECLSPEC char * SDLCALL SDLNet_GetErro
#define SDLNet_Write16(value, areap) \
(*SDL_reinterpret_cast(Uint16 *, areap) = SDL_SwapBE16(value))
#else
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define SDLNet_Write16(value, areap) \
do \
{ \
@@ -374,15 +373,6 @@ do \
area[0] = (value >> 8) & 0xFF; \
area[1] = value & 0xFF; \
} while ( 0 )
-#else
-#define SDLNet_Write16(value, areap) \
-do \
-{ \
- Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \
- area[1] = (value >> 8) & 0xFF; \
- area[0] = value & 0xFF; \
-} while ( 0 )
-#endif
#endif /* !SDL_DATA_ALIGNED */
/* Write a 32 bit value to network packet buffer */
@@ -390,7 +380,6 @@ do \
#define SDLNet_Write32(value, areap) \
*SDL_reinterpret_cast(Uint32 *, areap) = SDL_SwapBE32(value);
#else
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define SDLNet_Write32(value, areap) \
do \
{ \
@@ -400,17 +389,6 @@ do \
area[2] = (value >> 8) & 0xFF; \
area[3] = value & 0xFF; \
} while ( 0 )
-#else
-#define SDLNet_Write32(value, areap) \
-do \
-{ \
- Uint8 *area = SDL_reinterpret_cast(Uint8 *, areap); \
- area[3] = (value >> 24) & 0xFF; \
- area[2] = (value >> 16) & 0xFF; \
- area[1] = (value >> 8) & 0xFF; \
- area[0] = value & 0xFF; \
-} while ( 0 )
-#endif
#endif /* !SDL_DATA_ALIGNED */
/* Read a 16 bit value from network packet buffer */
@@ -418,13 +396,8 @@ do \
#define SDLNet_Read16(areap) \
(SDL_SwapBE16(*SDL_reinterpret_cast(Uint16 *, areap)))
#else
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define SDLNet_Read16(areap) \
(((SDL_reinterpret_cast(Uint8 *, areap))[0] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[1] << 0)
-#else
-#define SDLNet_Read16(areap) \
- (((SDL_reinterpret_cast(Uint8 *, areap))[1] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[0] << 0)
-#endif
#endif /* !SDL_DATA_ALIGNED */
/* Read a 32 bit value from network packet buffer */
@@ -432,15 +405,9 @@ do \
#define SDLNet_Read32(areap) \
(SDL_SwapBE32(*SDL_reinterpret_cast(Uint32 *, areap)))
#else
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define SDLNet_Read32(areap) \
(((SDL_reinterpret_cast(Uint8 *, areap))[0] << 24) | ((SDL_reinterpret_cast(Uint8 *, areap))[1] << 16) | \
((SDL_reinterpret_cast(Uint8 *, areap))[2] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[3] << 0)
-#else
-#define SDLNet_Read32(areap) \
- (((SDL_reinterpret_cast(Uint8 *, areap))[3] << 24) | ((SDL_reinterpret_cast(Uint8 *, areap))[2] << 16) | \
- ((SDL_reinterpret_cast(Uint8 *, areap))[1] << 8) | (SDL_reinterpret_cast(Uint8 *, areap))[0] << 0)
-#endif
#endif /* !SDL_DATA_ALIGNED */
/* Ends C function definitions when using C++ */

1
devel/sdl-net/pkg/DESCR Normal file
View file

@ -0,0 +1 @@
SDL_net is a simple cross-platform networking library.

6
devel/sdl-net/pkg/PLIST Normal file
View file

@ -0,0 +1,6 @@
include/SDL/
include/SDL/SDL_net.h
lib/libSDL_net.a
lib/libSDL_net.la
@lib lib/libSDL_net.so.${LIBSDL_net_VERSION}
lib/pkgconfig/SDL_net.pc