On Fri, Oct 19 2018, Solene Rapenne <[email protected]> wrote:
> Tom Murphy <[email protected]> wrote:
>> On Thu, Oct 04, 2018 at 12:11:01PM +0200, Solene Rapenne wrote:
>> > Small introduction for people reading ports@.
>> > 
>> > mvdsv is a quake world game server. It has some features like allowing to
>> > record games from every player point of view. That can be played again in a
>> > quake client like ezquake.
>> > 
>> > ok solene@
>> 
>> Thanks Solene and Stuart for their help! Attached is a new tarball using
>> GH_TAGNAME and the correct DISTFILES settings.
>> 
>> -Tom
>
> up
>
> looks fine to me

The build system is not very portable. The configure script hardcodes
a bunch of arch-dependent logic which breaks on eg. sparc64:

  ../../src/pr_exec.c:1: error: -m32 is not supported by this configuration

Also, Makefile.BSD contains:

--8<--
. if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
 USE_ASM=-Did386
 DO_CFLAGS               +=      ${USE_ASM}
 . endif
-->8--

It would be good to check that the port builds on i386 with assembly
enabled.  Or you could wait for bulk build reports.  ;)

Using devel/meson could be a nicer alternative to Makefile.BSD, which
looks a bit outdated (no curl support for example).  Else, we could pass
arguments to the CONFIGURE_SCRIPT to fix its behavior.

Another concern: I think this has already been pointed out by fcambus@,
qwprogs.dat should have a versioned file name, should it be updated some
day.

Here's an updated tarball, Makefile diff below to ease review.  With
those changes, ok jca@ to import

Attachment: mvdsv.2.tgz
Description: Binary data

--- Makefile.orig       Thu Oct  4 22:03:40 2018
+++ Makefile    Fri Nov 23 13:14:26 2018
@@ -13,6 +13,7 @@ HOMEPAGE =    https://sourceforge.net/projects/mvdsv/
 MAINTAINER =   Tom Murphy <[email protected]>
 
 QWP_COMMIT =   0023db327bc1db00068284b70e1db45857aeee35
+QWP_VERSION =  20120131
 MASTER_SITES0 = 
https://raw.githubusercontent.com/id-Software/Quake/${QWP_COMMIT}/QW/progs/
 
 # GPLv2+
@@ -21,15 +22,24 @@ PERMIT_PACKAGE_CDROM =      Yes
 WANTLIB +=     c curl m pthread
 
 DISTFILES =    mvdsv-{}${GH_TAGNAME}.tar.gz \
-               qwprogs.dat:0
+               qwprogs-${QWP_VERSION}{qwprogs}.dat:0
 EXTRACT_ONLY = mvdsv-${GH_TAGNAME}.tar.gz
 
 LIB_DEPENDS =  net/curl
 
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mlp64}
+BITS =         64
+.else
+BITS =         32
+.endif
+
 CONFIGURE_STYLE =      simple
+CONFIGURE_ARGS =       OpenBSD ${BITS}
 
 MAKE_FLAGS =   CC="${CC}" CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
-               LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -lcurl -lm"
+               LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -lcurl -lm" \
+               FORCE32BITFLAGS=""
 
 NO_TEST =      Yes
 
@@ -41,6 +51,7 @@ do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/mvdsv ${PREFIX}/bin
        ${INSTALL_DATA_DIR} ${SAMPLES_DIR}
        ${INSTALL_DATA} ${FILESDIR}/server.cfg ${SAMPLES_DIR}
-       ${INSTALL_DATA} ${DISTDIR}/qwprogs.dat ${SAMPLES_DIR}
+       ${INSTALL_DATA} ${DISTDIR}/qwprogs-${QWP_VERSION}.dat \
+           ${SAMPLES_DIR}/qwprogs.dat
 
 .include <bsd.port.mk>


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to