- Belatedly update MVDSV and QWDtools to version 0.32

- Explicitly deduce endianness instead of patching sources
- Do not build bundled PCRE code, use the one from ports
- ASM option is 32-bit only and implies OPTIMIZED_CFLAGS
- Unfortunately, upstream had removed BSD Kqueue support
- Actualize WWW line in the port descriptions while here
This commit is contained in:
Alexey Dokuchaev 2020-03-19 07:53:06 +00:00
parent 1bcd25df90
commit 885a045ee4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528698
8 changed files with 49 additions and 71 deletions

View file

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME?= mvdsv
PORTVERSION= 0.30
DISTVERSIONPREFIX= v
PORTVERSION= 0.32
PORTEPOCH= 2
CATEGORIES?= games
@ -12,6 +11,12 @@ COMMENT?= Enhanced QuakeWorld server with multi-view demos capability
LICENSE= GPLv2
.if ${PORTNAME} == mvdsv
LIB_DEPENDS= libcurl.so:ftp/curl \
libpcre.so:devel/pcre
USES= localbase:ldflags
.endif
USE_GITHUB= yes
GH_ACCOUNT= deurk
@ -23,23 +28,13 @@ PLIST_FILES= bin/${PORTNAME}
OPTIONS_DEFINE= OPTIMIZED_CFLAGS
OPTIONS_DEFINE_i386= ASM
OPTIONS_DEFINE_amd64= ASM
OPTIONS_DEFAULT_i386= ASM
OPTIONS_DEFAULT_amd64= ASM
ASM_IMPLIES= OPTIMIZED_CFLAGS
.if ${PORTNAME} == mvdsv
OPTIONS_DEFINE+= KQUEUE
OPTIONS_DEFAULT+= KQUEUE
.endif
KQUEUE_DESC= Kqueue support
KQUEUE_MAKE_ARGS_OFF= -DNOKQUEUE
ASM_MAKE_ARGS_OFF= -DWITHOUT_X86_ASM
OPTIMIZED_CFLAGS_MAKE_ARGS= -DWITH_OPTIMIZED_CFLAGS
post-patch:
@${REINPLACE_CMD} -e 's,^inline ,,' ${WRKSRC}/src/sv_sys_unix.c
@${REINPLACE_CMD} -e '/#include/s,/source,/src,' \
${WRKSRC}/tools/qwdtools/source/defs.h

View file

@ -1,2 +1,3 @@
SHA256 (deurk-mvdsv-v0.30_GH0.tar.gz) = 6ebcca9b9807f72eda090ee618587e4b7b6d0f51447f59aec86eae4d4e218486
SIZE (deurk-mvdsv-v0.30_GH0.tar.gz) = 664943
TIMESTAMP = 1584600585
SHA256 (deurk-mvdsv-0.32_GH0.tar.gz) = bee408166984bcd6422d15dca677fedd1d44da1d3f7b18e1244f4a8e2dd1d3c8
SIZE (deurk-mvdsv-0.32_GH0.tar.gz) = 710497

View file

@ -1,35 +1,41 @@
--- build/make/Makefile.BSD.orig 2011-10-06 07:24:17 UTC
--- build/make/Makefile.BSD.orig 2018-06-30 09:20:48 UTC
+++ build/make/Makefile.BSD
@@ -17,17 +17,15 @@ SV_DIR = ../../src
@@ -17,12 +17,11 @@ SV_DIR = ../../src
# for gcc its like: make mvdsv FORCE32BITFLAGS=-m32
# configure script add FORCE32BITFLAGS=-m32
-DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 ${FORCE32BITFLAGS}
.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly")
DO_CFLAGS += -DKQUEUE
.endif
-DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DSERVERONLY -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
+BYTE_ORDER!= ${CC} -x c -dM -E /usr/include/machine/endian.h | sed -n 's,\#define _BYTE_ORDER \(.*\),_\1__,p'
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -funsigned-char -DWWW_INTEGRATION -DSERVERONLY -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
-WITH_OPTIMIZED_CFLAGS = YES
-
USE_ASM=-Did386
.if defined(WITH_OPTIMIZED_CFLAGS)
-DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
+DO_CFLAGS += -ffast-math -funroll-loops
. if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
ASM=${USE_ASM}
DO_CFLAGS += ${ASM}
@@ -94,7 +92,7 @@ SV_OBJS = \
${SV_DIR}/pcre/get.o \
${SV_DIR}/pcre/pcre.o
USE_ASM=-Did386
DO_CFLAGS += ${USE_ASM}
@@ -35,7 +34,7 @@ STRIP_FLAGS = --strip-unneeded
.endif
STRIP_FLAGS += --remove-section=.comment
-.if ${USE_ASM} == ${ASM}
+.if defined(ASM) && ${USE_ASM} == ${ASM}
SV_ASM_OBJS = \
${SV_DIR}/bothtoolsa.o \
${SV_DIR}/math.o
@@ -105,10 +103,10 @@ SV_ASM_OBJS = \
-LDFLAGS = -lm
+LDFLAGS += -lm -lpthread -lpcre -lcurl
#############################################################################
# SERVER
@@ -90,9 +89,6 @@ SV_OBJS = \
${SV_DIR}/world.o \
${SV_DIR}/zone.o \
\
- ${SV_DIR}/pcre/get.o \
- ${SV_DIR}/pcre/pcre.o \
-\
${SV_DIR}/central.o
.ifdef USE_ASM
@@ -106,10 +102,10 @@ SV_ASM_OBJS = \
#############################################################################
.c.o:

View file

@ -1,27 +0,0 @@
--- src/bothdefs.h.orig 2011-10-06 07:24:17 UTC
+++ src/bothdefs.h
@@ -174,21 +174,21 @@ float FloatSwap (float f);
} /* extern "C" */
#endif
-#ifdef __BIG_ENDIAN__Q__
+#if _BYTE_ORDER == _BIG_ENDIAN
#define BigShort(x) (x)
#define BigLong(x) (x)
#define BigFloat(x) (x)
#define LittleShort(x) ShortSwap(x)
#define LittleLong(x) LongSwap(x)
#define LittleFloat(x) FloatSwap(x)
-#elif defined(__LITTLE_ENDIAN__Q__)
+#elif _BYTE_ORDER == _LITTLE_ENDIAN
#define BigShort(x) ShortSwap(x)
#define BigLong(x) LongSwap(x)
#define BigFloat(x) FloatSwap(x)
#define LittleShort(x) (x)
#define LittleLong(x) (x)
#define LittleFloat(x) (x)
-#elif defined(__PDP_ENDIAN__Q__)
+#elif _BYTE_ORDER == _PDP_ENDIAN
int LongSwapPDP2Big (int l);
int LongSwapPDP2Lit (int l);
float FloatSwapPDP2Big (float f);

View file

@ -1,6 +1,6 @@
--- tools/qwdtools/source/Makefile.BSD.orig 2011-10-06 07:24:17 UTC
--- tools/qwdtools/source/Makefile.BSD.orig 2020-03-18 18:17:05 UTC
+++ tools/qwdtools/source/Makefile.BSD
@@ -12,24 +12,18 @@
@@ -12,24 +12,19 @@
#
MAINDIR = ../../..
@ -13,14 +13,15 @@
# configure script add FORCE32BITFLAGS=-m32
-DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
-
+BYTE_ORDER!= ${CC} -x c -dM -E /usr/include/machine/endian.h | sed -n 's,\#define _BYTE_ORDER \(.*\),_\1__,p'
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -funsigned-char -DSERVERONLY -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS}
-.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly")
-DO_CFLAGS += -DKQUEUE
-.endif
-
-WITH_OPTIMIZED_CFLAGS = YES
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 ${FORCE32BITFLAGS}
-
USE_ASM=-Did386
.if defined(WITH_OPTIMIZED_CFLAGS)
-DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
@ -28,7 +29,7 @@
. if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
ASM=${USE_ASM}
DO_CFLAGS += ${ASM}
@@ -60,7 +54,7 @@ QWDTOOLS_OBJS = \
@@ -60,7 +55,7 @@ QWDTOOLS_OBJS = \
${QWDTOOLS_DIR}/sync.o \
${QWDTOOLS_DIR}/tools.o
@ -37,7 +38,7 @@
QWDTOOLS_ASM_OBJS = \
${SV_DIR}/bothtoolsa.o
.endif
@@ -70,10 +64,10 @@ QWDTOOLS_ASM_OBJS = \
@@ -70,10 +65,10 @@ QWDTOOLS_ASM_OBJS = \
#############################################################################
.c.o:

View file

@ -4,4 +4,4 @@ biggest step in QuakeWorld since Qizmo release. MVDSV is also the best
server to use with KTeams Pro deathmatch mod, and in fact is required
for the latter's full functionality.
WWW: http://mvdsv.qw-dev.net/
WWW: https://github.com/deurk/mvdsv

View file

@ -10,6 +10,8 @@ PKGMESSAGE= /nonexistent
BUILD_WRKSRC= ${WRKSRC}/tools/qwdtools/source
GH_PROJECT= mvdsv
CFLAGS+= -DQWE_VERSION=\\\"${PORTVERSION}\\\"
MASTERDIR= ${.CURDIR}/../mvdsv
.include "${MASTERDIR}/Makefile"

View file

@ -4,4 +4,4 @@ QuakeWorld demo files (in QWD format) to new-era multi-view format.
No QWZ format support yet, but one can always convert them to QWD
manually with Qizmo and run them through QWDtools after that.
WWW: http://mvdsv.qw-dev.net/
WWW: https://github.com/deurk/mvdsv