svn commit: r347650 - in head/games/warsow: . files
Rene Ladan
rene at FreeBSD.org
Sun Mar 9 15:13:15 UTC 2014
Author: rene
Date: Sun Mar 9 15:13:14 2014
New Revision: 347650
URL: http://svnweb.freebsd.org/changeset/ports/347650
QAT: https://qat.redports.org/buildarchive/r347650/
Log:
games/warsow: un-expire and update to 1.0.3
- Update master sites
- Add stage support
- Use new LIB_DEPENDS syntax
- Convert to USES (zip:infozip could be added)
- Add CIN option for Cinematics playback module
- Add desktop entry
- Disable "pure" check for library files
- Fix build with clang
- Overhaul character encoding patching
- Fix runtime crash in option submenu
- rene: depend on Xrandr
- rene: depend on libtheora for CIN
- rene: convert patch with dos2unix
- rene: mark jobs unsafe
PR: ports/185652
Submitted by: Sender Ghost <lightside at gmx.com>
Approved by: maintainer timeout (danfe, 2 months + expiration time)
Added:
head/games/warsow/files/patch-release_basewsw_ui_porkui_template.rml (contents, props changed)
head/games/warsow/files/patch-ui_as_asbind.h (contents, props changed)
Deleted:
head/games/warsow/files/keysym2ucs.c
head/games/warsow/files/keysym2ucs.h
head/games/warsow/files/patch-unix-unix_input.c
Modified:
head/games/warsow/Makefile
head/games/warsow/distinfo
head/games/warsow/files/patch-Makefile
Modified: head/games/warsow/Makefile
==============================================================================
--- head/games/warsow/Makefile Sun Mar 9 15:02:31 2014 (r347649)
+++ head/games/warsow/Makefile Sun Mar 9 15:13:14 2014 (r347650)
@@ -2,10 +2,10 @@
# $FreeBSD$
PORTNAME= warsow
-PORTVERSION= 0.6.2
-PORTREVISION= 4
+PORTVERSION= 1.0.3
CATEGORIES= games
-MASTER_SITES= http://www.zcdn.org/dl/
+MASTER_SITES= SF/warsow.mirror/Warsow%201.02 \
+ http://www.warsow.net:1337/~warsow/${PORTVERSION:R}${PORTVERSION:E}/
DISTNAME= ${PORTNAME}_${PORTVERSION:R}${PORTVERSION:E}_sdk
DIST_SUBDIR= ${PORTNAME}
@@ -14,17 +14,16 @@ COMMENT= Futuristic, fast-paced first pe
LICENSE= GPLv2
-DEPRECATED= depends on expired games/warsow-data
-EXPIRATION_DATE=2014-01-22
-
-LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl
-RUN_DEPENDS= ${DATADIR}/basewsw/data0_06.pk3:${PORTSDIR}/games/warsow-data
+LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
+RUN_DEPENDS= ${DATADIR}/basewsw/data0_10.pk3:${PORTSDIR}/games/warsow-data
ONLY_FOR_ARCHS= i386 amd64
-USE_GMAKE= yes
-USE_ZIP= yes
+MAKE_JOBS_UNSAFE=yes
+
+USES= dos2unix gmake
+DOS2UNIX_FILES= ui/as/asbind.h
-WRKSRC= ${WRKDIR}/source
+WRKSRC= ${WRKDIR}/${DISTNAME}/source
ALL_TARGET= game angelwrap
RELEASEDIR= ${WRKSRC}/release
AS_SDK_DIR= ${WRKSRC}/../libsrcs/angelscript/angelSVN/sdk
@@ -33,33 +32,41 @@ PLIST_FILES= %%DATADIR%%/basewsw/game_${
%%DATADIR%%/libs/angelwrap_${ARCH}.so
PLIST_DIRS= %%DATADIR%%/libs
-OPTIONS_DEFINE= CLIENT SERVER QF OPENAL IRC TV_SRV
-OPTIONS_DEFAULT= CLIENT SERVER QF OPENAL IRC TV_SRV
+OPTIONS_DEFINE= CLIENT SERVER QF OPENAL IRC CIN TV_SRV
+OPTIONS_DEFAULT= CLIENT SERVER QF OPENAL IRC CIN TV_SRV
CLIENT_DESC= Build game client
SERVER_DESC= Build dedicated server
QF_DESC= Build Qf sound module
OPENAL_DESC= Build OpenAL sound module
IRC_DESC= Build IRC client module
+CIN_DESC= Build Cinematics playback module
TV_SRV_DESC= Build Warsow TV server
-# USES needs to be before bsd.port.pre.mk
-OPENAL_USES= openal:al
-
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT}
-LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libpng15.so:${PORTSDIR}/graphics/png \
+ libfreetype.so:${PORTSDIR}/print/freetype2
+PATCH_DEPENDS= ${DATADIR}/basewsw/ui_porkui.pk3:${PORTSDIR}/games/warsow-data
USE_GL= gl
USE_SDL= sdl
-USE_XORG= xinerama xxf86dga
+USE_XORG= xinerama xxf86dga xrandr
ALL_TARGET+= cgame ui client
PLIST_FILES+= bin/warsow %%DATADIR%%/basewsw/cgame_${ARCH}.so \
- %%DATADIR%%/basewsw/ui_${ARCH}.so
+ %%DATADIR%%/basewsw/ui_${ARCH}.so \
+ %%DATADIR%%/basewsw/ui/porkui/template.rml \
+ share/pixmaps/warsow128x128.xpm
+PLIST_DIRS+= %%DATADIR%%/basewsw/ui \
+ %%DATADIR%%/basewsw/ui/porkui
+
+DESKTOP_ENTRIES="Warsow" "${COMMENT}" \
+ "${PREFIX}/share/pixmaps/warsow128x128.xpm" "${PORTNAME}" \
+ "Game;" false
. if ${PORT_OPTIONS:MQF} || ${PORT_OPTIONS:MOPENAL}
-LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS+= libvorbisfile.so:${PORTSDIR}/audio/libvorbis
. endif
. if ${PORT_OPTIONS:MQF}
@@ -69,6 +76,7 @@ PLIST_FILES+= %%DATADIR%%/libs/snd_qf_${
. endif
. if ${PORT_OPTIONS:MOPENAL}
+USES+= openal:al
ALL_TARGET+= openal
PLIST_FILES+= %%DATADIR%%/libs/snd_openal_${ARCH}.so
. endif
@@ -77,6 +85,12 @@ PLIST_FILES+= %%DATADIR%%/libs/snd_opena
ALL_TARGET+= irc
PLIST_FILES+= %%DATADIR%%/libs/irc_${ARCH}.so
. endif
+
+. if ${PORT_OPTIONS:MCIN}
+ALL_TARGET+= cin
+PLIST_FILES+= %%DATADIR%%/libs/cin_${ARCH}.so
+BUILD_DEPENDS+= ${LOCALBASE}/include/theora/theoradec.h:${PORTSDIR}/multimedia/libtheora
+. endif
.endif
.if ${PORT_OPTIONS:MSERVER}
@@ -89,39 +103,45 @@ ALL_TARGET+= tv_server
PLIST_FILES+= bin/wswtv_server
.endif
-post-extract:
- ${CP} ${FILESDIR}/keysym2ucs.* ${WRKSRC}/unix
+pre-patch: .SILENT
+.if ${PORT_OPTIONS:MCLIENT}
+ ${MKDIR} ${RELEASEDIR}/basewsw
+ ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DATADIR}/basewsw/ui_porkui.pk3 --include="ui/porkui/template.rml" -C ${RELEASEDIR}/basewsw ${EXTRACT_AFTER_ARGS}
+.endif
post-patch: .SILENT
-# Unmute build and link commands, respect CFLAGS, fix hardcoded make(1)
+# Unmute build and link commands, respect CFLAGS
${REINPLACE_CMD} -e 's|@$$(DO_CC|$$(DO_CC| ; /> Linking $$@/d ; \
- s|-O2 -fno-strict-aliasing -ffast-math -funroll-loops || ; \
- s|make -C|$$(MAKE) -C|' ${WRKSRC}/Makefile
+ s|-O2 -fno-strict-aliasing -ffast-math -funroll-loops ||; \
+ s| -msse2||' \
+ ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's|-g ||' \
${AS_SDK_DIR}/angelscript/projects/gnuc/makefile
-# Search directory provided by warsow-data port instead of current (doing
-# so allows us not to install any wrapper scripts)
- ${REINPLACE_CMD} -e 's|path", "\.|&:${DATADIR}|' \
- ${WRKSRC}/qcommon/files.c
# Adjust architecture names, get rid of ``freebsd_'' prefix
${REINPLACE_CMD} -e 's/x86_64/amd64/ ; s/freebsd_//' \
${WRKSRC}/gameshared/q_arch.h
-# Resolve name collision with jpeg-8
- ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_&|' \
- ${WRKSRC}/ref_gl/r_image.c
-# Add missing #include's
- ${REINPLACE_CMD} -e '24s|^|#include <sys/socket.h>|' \
- ${WRKSRC}/qcommon/net.c
- ${REINPLACE_CMD} -e '19s|^|#include <stdint.h>|' \
- ${WRKSRC}/unix/unix_xpm.c
-# Fix AngelScript build on 64-bit arches
- ${REINPLACE_CMD} -e '/GetCurrentThreadId/!s|asDWORD|pthread_t| ; \
- s|(asDWORD)||' ${AS_SDK_DIR}/angelscript/source/as_thread.*
+# Search directory provided by warsow-data port instead of current (doing
+# so allows us not to install any wrapper scripts)
+ ${REINPLACE_CMD} -e 's|path", "\.|path", "${DATADIR}|' \
+ ${WRKSRC}/qcommon/files.c
+# Disable pure check for library files, because they are built and placed to
+# ${DATADIR} base path instead of pack file(s)
+ ${REINPLACE_CMD} -e 's|pure \&\& !FS_IsPureFile|0 \&\& !FS_IsPureFile|' \
+ ${WRKSRC}/qcommon/library.c
+# Fix issue with utf8 characters for console and
+# return checks for delete character (ASCII code 127) from 0.62 version
+ ${REINPLACE_CMD} -e '/x11display.ic = 0;/d; \
+ s|Key_CharEvent( key, wc );|if ( wc != 127 ) Key_CharEvent( key, wc );|' \
+ ${WRKSRC}/unix/unix_input.c
do-install:
.for b in ${PLIST_FILES:Mbin/*:T}
- ${INSTALL_PROGRAM} ${RELEASEDIR}/${b}.${ARCH} ${PREFIX}/bin/${b}
+ ${INSTALL_PROGRAM} ${RELEASEDIR}/${b}.${ARCH} ${STAGEDIR}${PREFIX}/bin/${b}
.endfor
- cd ${RELEASEDIR} && ${COPYTREE_SHARE} "basewsw libs" ${DATADIR}
+ cd ${RELEASEDIR} && ${COPYTREE_SHARE} "basewsw libs" ${STAGEDIR}${DATADIR}
+.if ${PORT_OPTIONS:MCLIENT}
+ ${INSTALL_DATA} ${WRKSRC}/unix/warsow128x128.xpm \
+ ${STAGEDIR}${PREFIX}/share/pixmaps
+.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Modified: head/games/warsow/distinfo
==============================================================================
--- head/games/warsow/distinfo Sun Mar 9 15:02:31 2014 (r347649)
+++ head/games/warsow/distinfo Sun Mar 9 15:13:14 2014 (r347650)
@@ -1,2 +1,2 @@
-SHA256 (warsow/warsow_0.62_sdk.zip) = e1a86c355307539b8f427a76fc54e7279f39567a9eb570accd8ad74f4bf96159
-SIZE (warsow/warsow_0.62_sdk.zip) = 36600605
+SHA256 (warsow/warsow_1.03_sdk.tar.gz) = 98cd7aa25707f9baf97a8e1feb78e1874b6b5dd95af759bf5edda10bc62ed97c
+SIZE (warsow/warsow_1.03_sdk.tar.gz) = 63908911
Modified: head/games/warsow/files/patch-Makefile
==============================================================================
--- head/games/warsow/files/patch-Makefile Sun Mar 9 15:02:31 2014 (r347649)
+++ head/games/warsow/files/patch-Makefile Sun Mar 9 15:13:14 2014 (r347650)
@@ -1,11 +1,13 @@
---- Makefile.orig
-+++ Makefile
-@@ -48,20 +48,12 @@
+--- Makefile.orig 2012-12-02 21:36:10.000000000 +0400
++++ Makefile 2014-02-06 06:54:02.000000000 +0400
+@@ -50,21 +50,13 @@
else
CC?=gcc
CXX?=g++
-LD=gcc
+-LXX?=g++
+LD=$(CC)
++LXX?=$(CXX)
AR=ar
RANLIB=ranlib
@@ -22,7 +24,21 @@
SHARED_LIBRARY_EXTENSION=so
endif
-@@ -252,12 +244,9 @@
+@@ -210,10 +202,11 @@
+ CFLAGS_TV_SERVER=-DDEDICATED_ONLY -DTV_SERVER_ONLY -DC_ONLY -DTV_MODULE_HARD_LINKED
+
+ LDFLAGS_COMMON=$(LDFLAGS)
+-LXXFLAGS_COMMON=$(LDFLAGS) -lstdc++ -lsupc++
++LXXFLAGS_COMMON=$(LDFLAGS)#-lstdc++ -lsupc++ # disabled for Clang
+
+ ifeq ($(OS),FreeBSD)
+-LDFLAGS_COMMON+= -L/usr/local/lib -lm -pthread
++LDFLAGS_COMMON+= -L$(LOCALBASE)/lib -lm -pthread
++LXXFLAGS_COMMON+= -L$(LOCALBASE)/lib
+ else
+ LDFLAGS_COMMON+= -L/usr/local/lib -ldl -lm -O1 -Wl,--as-needed
+ endif
+@@ -298,12 +291,9 @@
######################################################################################################
# Helper functions
######################################################################################################
@@ -38,12 +54,3 @@
DO_CC_CLIENT=$(DO_CC) $(CFLAGS_CLIENT)
DO_CC_DED=$(DO_CC) $(CFLAGS_DED)
-@@ -289,7 +278,7 @@
- ifeq ($(OS),Darwin)
- CFILES_CLIENT += $(wildcard mac/*.c)
- else
--CFILES_CLIENT += unix/unix_input.c unix/unix_glw.c unix/unix_qgl.c unix_xpm.c
-+CFILES_CLIENT += unix/unix_input.c unix/unix_glw.c unix/unix_qgl.c unix/unix_xpm.c unix/keysym2ucs.c
- endif
- CFILES_CLIENT += unix/unix_fs.c unix/unix_lib.c unix/unix_net.c unix/unix_sys.c unix/unix_vid.c
- endif
Added: head/games/warsow/files/patch-release_basewsw_ui_porkui_template.rml
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/warsow/files/patch-release_basewsw_ui_porkui_template.rml Sun Mar 9 15:13:14 2014 (r347650)
@@ -0,0 +1,37 @@
+--- release/basewsw/ui/porkui/template.rml.orig 2012-07-19 18:39:24.000000000 +0400
++++ release/basewsw/ui/porkui/template.rml 2014-02-06 07:52:43.000000000 +0400
+@@ -135,32 +135,9 @@
+ }
+ }
+
+- String menuloc;
+- void animOpenMenu( String menu ) // This function automatically animates the content away and opens a new menu after that.
++ void animOpenMenu( String menu ) // Don't animate on FreeBSD, as the program will crash for some reason...
+ {
+- if( menu.length() <= 0 )
+- return;
+-
+- URL currentURL( window.document.URL );
+- String currentDocFilename = currentURL.getFileName() + '.' + currentURL.getFileExtension();
+- if( currentDocFilename == menu ) {
+- // FIXME: not sure this works correct in all cases of valid input URL
+- return;
+- }
+-
+- menuloc = menu;
+-
+- Element @body = @window.document.body;
+- Element @content = @body.getElementById( "leftside" );
+- if( @content == null )
+- return;
+-
+- MoveAnimation anim( content, ANIMATION_DURATION_FAST, ANIM_ORIGIN, ANIM_LEFT, EASE_IN, animOpenMenuCallback );
+- }
+-
+- void animOpenMenuCallback()
+- {
+- window.location = menuloc;
++ window.location = menu;
+ }
+
+ void quitGame( Element @self, Event @ev )
Added: head/games/warsow/files/patch-ui_as_asbind.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/warsow/files/patch-ui_as_asbind.h Sun Mar 9 15:13:14 2014 (r347650)
@@ -0,0 +1,78 @@
+--- ui/as/asbind.h.orig 2012-07-21 13:38:20.000000000 +0400
++++ ui/as/asbind.h 2014-02-06 06:32:49.000000000 +0400
+@@ -268,7 +268,7 @@
+ }
+
+ // throw ?
+- template<typename T> const char * typestr() { ctassert<false>(); return "ERROR"; }
++ template<typename T> const char * typestr();
+
+ template<> inline const char *typestr<signed int>() { return "int"; }
+ template<> inline const char *typestr<unsigned int>() { return "uint"; }
+@@ -436,13 +436,7 @@
+ // function string
+
+ template<typename R>
+-struct FunctionStringProxy {
+- std::string operator()( const char *s )
+- {
+- ctassert<false>();
+- throw Exception( std::string("FunctionStringProxy base called with " ) + s );
+- }
+-};
++struct FunctionStringProxy;
+
+ template<typename R>
+ struct FunctionStringProxy<R (*)()> {
+@@ -539,13 +533,7 @@
+
+ // method string
+
+-template<typename T> struct MethodStringProxy {
+- std::string operator()( const char *s )
+- {
+- ctassert<false>();
+- throw Exception( std::string( "MethodStringProxy: base class called in " ) + s );
+- }
+-};
++template<typename T> struct MethodStringProxy;
+
+ //==
+
+@@ -902,17 +890,8 @@
+ // functor object to call script-function
+
+ // first define structs to get/set arguments (struct to partial-specialize)
+-template<typename T> struct SetArg {
+- void operator()( asIScriptContext *ctx, int idx, T &t ) {
+- ctassert<false>();
+- }
+-};
+-template<typename T> struct GetArg {
+- T operator()() {
+- ctassert<false>();
+- return T();
+- }
+-};
++template<typename T> struct SetArg;
++template<typename T> struct GetArg;
+
+ template<> struct SetArg<signed int> {
+ void operator()( asIScriptContext *ctx, int idx, signed int &t ) { ctx->SetArgDWord( idx, t ); }
+@@ -1042,15 +1021,7 @@
+ //=================
+
+ template<typename R>
+-struct FunctionPtr : FunctionPtrBase {
+- FunctionPtr( asIScriptFunction *fptr=NULL ) : FunctionPtrBase( fptr ) {}
+- R operator()( void )
+- {
+- ctassert<false>();
+- throw std::runtime_error( "FunctionPtr baseclass called!" );
+- return R();
+- }
+-};
++struct FunctionPtr;
+
+ //==
+
More information about the svn-ports-head
mailing list