aboutsummaryrefslogtreecommitdiff
path: root/games/netradiant
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2013-09-06 12:29:56 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2013-09-06 12:29:56 +0000
commitc11cbd22fc22ddd9c6820701b27ddaa519c4f717 (patch)
tree007715d08ad11ae065977494f68f463063a5a731 /games/netradiant
parent7a0f4abe2be429be794564fa0ba30727d6458ef0 (diff)
downloadports-c11cbd22fc22ddd9c6820701b27ddaa519c4f717.tar.gz
ports-c11cbd22fc22ddd9c6820701b27ddaa519c4f717.zip
Notes
Diffstat (limited to 'games/netradiant')
-rw-r--r--games/netradiant/Makefile52
-rw-r--r--games/netradiant/distinfo2
-rw-r--r--games/netradiant/files/netradiant.in5
-rw-r--r--games/netradiant/files/patch-Makefile63
-rw-r--r--games/netradiant/files/patch-libs-math-vector.h31
-rw-r--r--games/netradiant/pkg-descr21
-rw-r--r--games/netradiant/pkg-plist194
7 files changed, 368 insertions, 0 deletions
diff --git a/games/netradiant/Makefile b/games/netradiant/Makefile
new file mode 100644
index 000000000000..fc7bb6650224
--- /dev/null
+++ b/games/netradiant/Makefile
@@ -0,0 +1,52 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= netradiant
+PORTVERSION= 20130630
+CATEGORIES= games cad
+MASTER_SITES= http://ingar.satgnu.net/gtkradiant/files/ \
+ http://freebsd.nsu.ru/distfiles/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Fork of the well-known GtkRadiant 1.5 FPS games map editor
+
+LIB_DEPENDS= libgtkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext \
+ libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libwebp.so:${PORTSDIR}/graphics/webp
+
+USES= gmake pkgconfig
+USE_BZIP2= yes
+USE_GL= gl
+USE_GNOME= gtk20 libxml2
+MAKE_ENV= BUILD=release DOWNLOAD_GAMEPACKS=no LIBS_DL="" \
+ RADIANT_ABOUTMSG="For ${OPSYS} ${OSREL} (${ARCH})"
+
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+SUB_FILES= ${PORTNAME}
+SUB_LIST= ARCH=${ARCH}
+
+post-patch:
+# Add missing checks for __FreeBSD__
+ @${FIND} ${WRKSRC}/tools -name '*.[ch]' | ${XARGS} ${REINPLACE_CMD} \
+ -e 's/__linux__/__${OPSYS}__ ) || defined ( &/'
+# Fix the build against Clang
+ @${REINPLACE_CMD} -e '/#include "generic\/reference\.h"/x ; 288G' \
+ ${WRKSRC}/libs/scenelib.h
+ @${REINPLACE_CMD} -e '/#include "generic\/referencecounted\.h/ { \
+ x ; s/^/#include "scenelib.h"/ ; G ; }' \
+ ${WRKSRC}/plugins/mapq3/parse.h
+
+do-install:
+# Fix permissions of some files (drop bogus execute bit)
+ @${FIND} ${WRKSRC}/install/osirion.game -type f | ${XARGS} ${CHMOD} a-x
+ @${CHMOD} a-x ${WRKSRC}/install/games/osirion.game
+# Remove extra copy of GNU GPL
+ @${RM} ${WRKSRC}/install/GPL.txt
+ @${MKDIR} ${DATADIR}
+ ${CP} -a ${WRKSRC}/install/* ${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/games/netradiant/distinfo b/games/netradiant/distinfo
new file mode 100644
index 000000000000..2f71c9784c3a
--- /dev/null
+++ b/games/netradiant/distinfo
@@ -0,0 +1,2 @@
+SHA256 (netradiant-20130630-src.tar.bz2) = 798877df6d5aeb9c9f18dc15d91d31d0c08f18bc1baf1aa2b4d959afd89ef2be
+SIZE (netradiant-20130630-src.tar.bz2) = 2639725
diff --git a/games/netradiant/files/netradiant.in b/games/netradiant/files/netradiant.in
new file mode 100644
index 000000000000..09f7ccefa2f8
--- /dev/null
+++ b/games/netradiant/files/netradiant.in
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd %%DATADIR%% || exit 1
+
+exec ./radiant.%%ARCH%% "$@"
diff --git a/games/netradiant/files/patch-Makefile b/games/netradiant/files/patch-Makefile
new file mode 100644
index 000000000000..8f5051c36066
--- /dev/null
+++ b/games/netradiant/files/patch-Makefile
@@ -0,0 +1,63 @@
+--- Makefile.orig 2013-06-30 22:04:34.000000000 +0800
++++ Makefile 2013-09-06 16:56:05.000000000 +0800
+@@ -153,7 +153,7 @@
+ else
+
+ ifeq ($(BUILD),release)
+-ifeq ($(findstring $(CFLAGS),-O),)
++ifeq ($(findstring -O,$(CFLAGS)),)
+ CFLAGS_COMMON += -O3
+ # only add -O3 if no -O flag is in $(CFLAGS)
+ # to allow overriding the optimizations
+@@ -170,10 +170,10 @@
+
+ INSTALLDIR_BASE := $(INSTALLDIR)
+
+-ifeq ($(OS),Linux)
++ifneq ($(filter $(OS),Linux FreeBSD),)
+ CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS
+ CFLAGS_COMMON += -fPIC
+- LDFLAGS_DLL = -fPIC -ldl
++ LDFLAGS_DLL = -fPIC
+ LIBS_COMMON = -lpthread
+ EXE ?= $(shell uname -m)
+ A = a
+@@ -291,15 +291,15 @@
+ checkbinary sed "$(SED)"; \
+ checkbinary findutils "$(FIND)"; \
+ checkbinary diff "$(DIFF)"; \
+- checkbinary gcc "$(CC)"; \
+- checkbinary g++ "$(CXX)"; \
++ checkbinary c\ compiler "$(CC)"; \
++ checkbinary c++\ compiler "$(CXX)"; \
+ checkbinary binutils "$(RANLIB)"; \
+ checkbinary binutils "$(AR)"; \
+ checkbinary pkg-config "$(PKGCONFIG)"; \
+ checkbinary unzip "$(UNZIPPER)"; \
+- checkbinary git-core "$(GIT)"; \
+- checkbinary subversion "$(SVN)"; \
+- checkbinary wget "$(WGET)"; \
++# checkbinary git-core "$(GIT)"; \
++# checkbinary subversion "$(SVN)"; \
++# checkbinary wget "$(WGET)"; \
+ [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \
+ [ -n "$(LDD)" ] && checkbinary libc6 "$(LDD)"; \
+ [ -n "$(OTOOL)" ] && checkbinary xcode "$(OTOOL)"; \
+@@ -437,7 +437,7 @@
+ %.$(EXE):
+ file=$@; $(MKDIR) $${file%/*}
+ $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@
+- [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
++ [ -z "$(LDD)" ] || [ -z "`$(LDD) $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
+
+ %.$(A):
+ $(AR) rc $@ $^
+@@ -446,7 +446,7 @@
+ %.$(DLL):
+ file=$@; $(MKDIR) $${file%/*}
+ $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LDFLAGS_DLL) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -shared -o $@
+- [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
++ [ -z "$(LDD)" ] || [ -z "`$(LDD) $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; }
+
+ %.rc: %.ico
+ $(ECHO) '1 ICON "$<"' > $@
diff --git a/games/netradiant/files/patch-libs-math-vector.h b/games/netradiant/files/patch-libs-math-vector.h
new file mode 100644
index 000000000000..23f0dc1a97c7
--- /dev/null
+++ b/games/netradiant/files/patch-libs-math-vector.h
@@ -0,0 +1,31 @@
+--- libs/math/vector.h.orig 2013-06-30 22:04:34.000000000 +0800
++++ libs/math/vector.h 2013-09-06 20:03:32.000000000 +0800
+@@ -45,27 +45,14 @@
+ return static_cast<__int64>( f + 0.5 );
+ }
+
+-#elif defined( __FreeBSD__ )
++#else // lrint is part of ISO C99
+
+-inline long lrint( double f ){
+- return static_cast<long>( f + 0.5 );
+-}
+-
+-inline long long llrint( double f ){
+- return static_cast<long long>( f + 0.5 );
+-}
+-
+-#elif defined( __GNUC__ )
+-
+-// lrint is part of ISO C99
+ #define _ISOC9X_SOURCE 1
+ #define _ISOC99_SOURCE 1
+
+ #define __USE_ISOC9X 1
+ #define __USE_ISOC99 1
+
+-#else
+-#error "unsupported platform"
+ #endif
+
+ #include <cmath>
diff --git a/games/netradiant/pkg-descr b/games/netradiant/pkg-descr
new file mode 100644
index 000000000000..f763cb91dae2
--- /dev/null
+++ b/games/netradiant/pkg-descr
@@ -0,0 +1,21 @@
+NetRadiant is a fork of the well-known map editor for Quake 3 based games,
+GtkRadiant 1.5. The focus is put on stabilizing and bugfixing the included
+map compiler, q3map2, so it can become a reliable tool for map authors.
+
+Fixes include:
+
+ - Better decompiling by q3map2 (texcoords no longer get lost)
+ - Fixed 3D display in the Windows XP software renderer
+ - Fixed deluxemapping when a surface is lit from both sides
+ - Fixed some buffer overruns
+ - Fixed the "expand selection to whole entities" feature
+ - Fixed the origin of mirrored eclassmodel entities
+ - Key bindings no longer disappear when using an international
+ keyboard layout
+ - Plane snapping fixed (no more fall-through holes in imported
+ model terrain)
+ - Various other map compiler fixes
+
+Original, classic GtkRadiant 1.5 is available as `games/gtkradiant' port.
+
+WWW: http://ingar.satgnu.net/gtkradiant/
diff --git a/games/netradiant/pkg-plist b/games/netradiant/pkg-plist
new file mode 100644
index 000000000000..935313ec0d98
--- /dev/null
+++ b/games/netradiant/pkg-plist
@@ -0,0 +1,194 @@
+bin/netradiant
+%%DATADIR%%/RADIANT_MAJOR
+%%DATADIR%%/RADIANT_MINOR
+%%DATADIR%%/README.txt
+%%DATADIR%%/bitmaps/black.png
+%%DATADIR%%/bitmaps/brush_flipx.png
+%%DATADIR%%/bitmaps/brush_flipy.png
+%%DATADIR%%/bitmaps/brush_flipz.png
+%%DATADIR%%/bitmaps/brush_rotatex.png
+%%DATADIR%%/bitmaps/brush_rotatey.png
+%%DATADIR%%/bitmaps/brush_rotatez.png
+%%DATADIR%%/bitmaps/cap_bevel.png
+%%DATADIR%%/bitmaps/cap_curve.png
+%%DATADIR%%/bitmaps/cap_cylinder.png
+%%DATADIR%%/bitmaps/cap_endcap.png
+%%DATADIR%%/bitmaps/cap_ibevel.png
+%%DATADIR%%/bitmaps/cap_iendcap.png
+%%DATADIR%%/bitmaps/console.png
+%%DATADIR%%/bitmaps/dontselectcurve.png
+%%DATADIR%%/bitmaps/dontselectmodel.png
+%%DATADIR%%/bitmaps/ellipsis.png
+%%DATADIR%%/bitmaps/entities.png
+%%DATADIR%%/bitmaps/file_open.png
+%%DATADIR%%/bitmaps/file_save.png
+%%DATADIR%%/bitmaps/icon.png
+%%DATADIR%%/bitmaps/lightinspector.png
+%%DATADIR%%/bitmaps/logo.png
+%%DATADIR%%/bitmaps/modify_edges.png
+%%DATADIR%%/bitmaps/modify_faces.png
+%%DATADIR%%/bitmaps/modify_vertices.png
+%%DATADIR%%/bitmaps/noFalloff.png
+%%DATADIR%%/bitmaps/notex.png
+%%DATADIR%%/bitmaps/patch_bend.png
+%%DATADIR%%/bitmaps/patch_drilldown.png
+%%DATADIR%%/bitmaps/patch_insdel.png
+%%DATADIR%%/bitmaps/patch_showboundingbox.png
+%%DATADIR%%/bitmaps/patch_weld.png
+%%DATADIR%%/bitmaps/patch_wireframe.png
+%%DATADIR%%/bitmaps/popup_selection.png
+%%DATADIR%%/bitmaps/redo.png
+%%DATADIR%%/bitmaps/refresh_models.png
+%%DATADIR%%/bitmaps/scalelockx.png
+%%DATADIR%%/bitmaps/scalelocky.png
+%%DATADIR%%/bitmaps/scalelockz.png
+%%DATADIR%%/bitmaps/select_mouseresize.png
+%%DATADIR%%/bitmaps/select_mouserotate.png
+%%DATADIR%%/bitmaps/select_mousescale.png
+%%DATADIR%%/bitmaps/select_mousetranslate.png
+%%DATADIR%%/bitmaps/selection_csgmerge.png
+%%DATADIR%%/bitmaps/selection_csgsubtract.png
+%%DATADIR%%/bitmaps/selection_makehollow.png
+%%DATADIR%%/bitmaps/selection_selectcompletetall.png
+%%DATADIR%%/bitmaps/selection_selectinside.png
+%%DATADIR%%/bitmaps/selection_selectpartialtall.png
+%%DATADIR%%/bitmaps/selection_selecttouching.png
+%%DATADIR%%/bitmaps/shadernotex.png
+%%DATADIR%%/bitmaps/show_entities.png
+%%DATADIR%%/bitmaps/splash.png
+%%DATADIR%%/bitmaps/texture_browser.png
+%%DATADIR%%/bitmaps/texture_lock.png
+%%DATADIR%%/bitmaps/textures_popup.png
+%%DATADIR%%/bitmaps/undo.png
+%%DATADIR%%/bitmaps/view_cameratoggle.png
+%%DATADIR%%/bitmaps/view_cameraupdate.png
+%%DATADIR%%/bitmaps/view_change.png
+%%DATADIR%%/bitmaps/view_clipper.png
+%%DATADIR%%/bitmaps/view_cubicclipping.png
+%%DATADIR%%/bitmaps/view_entity.png
+%%DATADIR%%/bitmaps/white.png
+%%DATADIR%%/bitmaps/window1.png
+%%DATADIR%%/bitmaps/window2.png
+%%DATADIR%%/bitmaps/window3.png
+%%DATADIR%%/bitmaps/window4.png
+%%DATADIR%%/darkplaces.game/default_build_menu.xml
+%%DATADIR%%/darkplaces.game/game.xlink
+%%DATADIR%%/darkplaces.game/id1/default_shaderlist.txt
+%%DATADIR%%/darkplaces.game/id1/entities.ent
+%%DATADIR%%/docs/index.html
+%%DATADIR%%/games/darkplaces.game
+%%DATADIR%%/games/nexuiz.game
+%%DATADIR%%/games/osirion.game
+%%DATADIR%%/games/q1.game
+%%DATADIR%%/games/warsow.game
+%%DATADIR%%/games/xonotic.game
+%%DATADIR%%/gl/lighting_DBS_XY_Z_arbfp1.cg
+%%DATADIR%%/gl/lighting_DBS_XY_Z_arbvp1.cg
+%%DATADIR%%/gl/lighting_DBS_omni_fp.glp
+%%DATADIR%%/gl/lighting_DBS_omni_fp.glsl
+%%DATADIR%%/gl/lighting_DBS_omni_vp.glp
+%%DATADIR%%/gl/lighting_DBS_omni_vp.glsl
+%%DATADIR%%/gl/utils.cg
+%%DATADIR%%/gl/zfill_arbfp1.cg
+%%DATADIR%%/gl/zfill_arbvp1.cg
+%%DATADIR%%/gl/zfill_fp.glp
+%%DATADIR%%/gl/zfill_fp.glsl
+%%DATADIR%%/gl/zfill_vp.glp
+%%DATADIR%%/gl/zfill_vp.glsl
+%%DATADIR%%/global.xlink
+%%DATADIR%%/heretic2/h2data.i386
+%%DATADIR%%/modules/archivepak.so
+%%DATADIR%%/modules/archivewad.so
+%%DATADIR%%/modules/archivezip.so
+%%DATADIR%%/modules/entity.so
+%%DATADIR%%/modules/image.so
+%%DATADIR%%/modules/imagehl.so
+%%DATADIR%%/modules/imagepng.so
+%%DATADIR%%/modules/imageq2.so
+%%DATADIR%%/modules/imagewebp.so
+%%DATADIR%%/modules/mapq3.so
+%%DATADIR%%/modules/mapxml.so
+%%DATADIR%%/modules/md3model.so
+%%DATADIR%%/modules/model.so
+%%DATADIR%%/modules/shaders.so
+%%DATADIR%%/modules/vfspk3.so
+%%DATADIR%%/nexuiz.game/data/default_shaderlist.txt
+%%DATADIR%%/nexuiz.game/data/entities.def
+%%DATADIR%%/nexuiz.game/data/turrets.def
+%%DATADIR%%/nexuiz.game/default_build_menu.xml
+%%DATADIR%%/nexuiz.game/game.xlink
+%%DATADIR%%/osirion.game/base/entities.def
+%%DATADIR%%/osirion.game/default_build_menu.xml
+%%DATADIR%%/osirion.game/game.xlink
+%%DATADIR%%/plugins/bitmaps/bobtoolz_caulk.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_cleanup.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_dropent.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_merge.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_poly.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_split.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_splitcol.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_splitrow.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_trainpathplot.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_treeplanter.png
+%%DATADIR%%/plugins/bitmaps/bobtoolz_turnedge.png
+%%DATADIR%%/plugins/bitmaps/ufoai_actorclip.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level1.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level2.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level3.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level4.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level5.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level6.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level7.png
+%%DATADIR%%/plugins/bitmaps/ufoai_level8.png
+%%DATADIR%%/plugins/bitmaps/ufoai_nodraw.png
+%%DATADIR%%/plugins/bitmaps/ufoai_stepon.png
+%%DATADIR%%/plugins/bitmaps/ufoai_weaponclip.png
+%%DATADIR%%/plugins/bobtoolz.so
+%%DATADIR%%/plugins/brushexport.so
+%%DATADIR%%/plugins/bt/bt-el1.txt
+%%DATADIR%%/plugins/bt/bt-el2.txt
+%%DATADIR%%/plugins/bt/door-tex-trim.txt
+%%DATADIR%%/plugins/bt/door-tex.txt
+%%DATADIR%%/plugins/bt/tp_ent.txt
+%%DATADIR%%/plugins/prtview.so
+%%DATADIR%%/plugins/shaderplug.so
+%%DATADIR%%/plugins/sunplug.so
+%%DATADIR%%/plugins/ufoaiplug.so
+%%DATADIR%%/q1.game/default_build_menu.xml
+%%DATADIR%%/q1.game/id1/entities.ent
+%%DATADIR%%/q2map.i386
+%%DATADIR%%/q3data.i386
+%%DATADIR%%/q3data.qdt
+%%DATADIR%%/q3map2.i386
+%%DATADIR%%/qdata3.i386
+%%DATADIR%%/radiant.i386
+%%DATADIR%%/warsow.game/basewsw/default_shaderlist.txt
+%%DATADIR%%/warsow.game/basewsw/entities.def
+%%DATADIR%%/warsow.game/default_build_menu.xml
+%%DATADIR%%/warsow.game/game.xlink
+%%DATADIR%%/xonotic.game/data/default_shaderlist.txt
+%%DATADIR%%/xonotic.game/data/entities.ent
+%%DATADIR%%/xonotic.game/default_build_menu.xml
+%%DATADIR%%/xonotic.game/game.xlink
+@dirrm %%DATADIR%%/xonotic.game/data
+@dirrm %%DATADIR%%/xonotic.game
+@dirrm %%DATADIR%%/warsow.game/basewsw
+@dirrm %%DATADIR%%/warsow.game
+@dirrm %%DATADIR%%/q1.game/id1
+@dirrm %%DATADIR%%/q1.game
+@dirrm %%DATADIR%%/plugins/bt
+@dirrm %%DATADIR%%/plugins/bitmaps
+@dirrm %%DATADIR%%/plugins
+@dirrm %%DATADIR%%/osirion.game/base
+@dirrm %%DATADIR%%/osirion.game
+@dirrm %%DATADIR%%/nexuiz.game/data
+@dirrm %%DATADIR%%/nexuiz.game
+@dirrm %%DATADIR%%/modules
+@dirrm %%DATADIR%%/heretic2
+@dirrm %%DATADIR%%/gl
+@dirrm %%DATADIR%%/games
+@dirrm %%DATADIR%%/docs
+@dirrm %%DATADIR%%/darkplaces.game/id1
+@dirrm %%DATADIR%%/darkplaces.game
+@dirrm %%DATADIR%%/bitmaps
+@dirrm %%DATADIR%%