Index: games/assaultcube/Makefile =================================================================== --- games/assaultcube/Makefile (revision 378632) +++ games/assaultcube/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= assaultcube PORTVERSION= 1.2.0.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= games MASTER_SITES= SF/actiongame/AssaultCube%20Version%20${PORTVERSION} DISTNAME= AssaultCube_v${PORTVERSION} @@ -24,17 +24,14 @@ LICENSE_PERMS_CUBE= dist-mirror dist-sell pkg-mirr LICENSE_PERMS_OTHER= dist-mirror pkg-mirror auto-accept USES= gmake openal:al tar:bzip2 -GNU_CONFIGURE= yes -ALL_TARGET= libenet +ALL_TARGET= # empty WRKSRC= ${WRKDIR}/AssaultCube_v${PORTVERSION} -CONFIGURE_ARGS= --enable-shared=no --enable-static=yes -CONFIGURE_WRKSRC= ${WRKSRC}/source/enet BUILD_WRKSRC= ${WRKSRC}/source/src PORTDATA= config packages scripts PORTDOCS= * -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS PORT_ENET OPTIONS_MULTI= BUILD OPTIONS_MULTI_BUILD= CLIENT DEDICATED MASTER OPTIONS_DEFAULT= CLIENT DEDICATED @@ -41,6 +38,11 @@ OPTIONS_DEFAULT= CLIENT DEDICATED CLIENT_DESC= Build client DEDICATED_DESC= Build dedicated server MASTER_DESC= Build master server +PORT_ENET_DESC= Use libenet from net/enet over bundled 1.3.6 +PORT_ENET_LIB_DEPENDS= libenet.so:${PORTSDIR}/net/enet +PORT_ENET_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-patch-source_enet_unix.c +PORT_ALL_TARGET_OFF= libenet +PORT_ENET_CONFIGURE_OFF= --enable-shared=no --enable-static=yes .include @@ -70,6 +72,22 @@ SUB_FILES+= ${PORTNAME}_master ACUBE_BIN+= master .endif +.if ${PORT_OPTIONS:MPORT_ENET} +EXTRACT_AFTER_ARGS+= --exclude enet +.else +GNU_CONFIGURE= yes +CONFIGURE_WRKSRC= ${WRKSRC}/source/enet +.endif + +post-patch: +.if ${PORT_OPTIONS:MPORT_ENET} + ${REINPLACE_CMD} -i .port_enet.bak \ + -e 's/libenet //' \ + -e 's,-I../enet/include,,' \ + -e 's,-L../enet/.libs,,' \ + ${BUILD_WRKSRC}/Makefile +.endif + pre-install: .SILENT # Current STAGEDIR doesn't create empty directories for package, # in case of dynamically generated TMPPLIST, where these directories exist Index: games/assaultcube/files/extra-patch-source_enet_unix.c =================================================================== --- games/assaultcube/files/extra-patch-source_enet_unix.c (revision 0) +++ games/assaultcube/files/extra-patch-source_enet_unix.c (working copy) @@ -0,0 +1,20 @@ +--- source/enet/unix.c.orig 2013-10-22 18:57:22 UTC ++++ source/enet/unix.c +@@ -97,7 +97,7 @@ enet_address_set_host (ENetAddress * add + char buffer [2048]; + int errnum; + +-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); + #else + hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum); +@@ -150,7 +150,7 @@ enet_address_get_host (const ENetAddress + + in.s_addr = address -> host; + +-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); + #else + hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum); Property changes on: games/assaultcube/files/extra-patch-source_enet_unix.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property