aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/gtkradiant/Makefile62
-rw-r--r--games/gtkradiant/distinfo6
-rw-r--r--games/gtkradiant/files/extra-patch-libs__bytestreamutils.h11
-rw-r--r--games/gtkradiant/files/extra-patch-libs__math__vector.h11
-rw-r--r--games/gtkradiant/files/gtkradiant.in5
-rw-r--r--games/gtkradiant/files/patch-SConstruct66
-rw-r--r--games/gtkradiant/files/patch-contrib__bobtoolz__misc.cpp11
-rw-r--r--games/gtkradiant/files/patch-install.py11
-rw-r--r--games/gtkradiant/files/patch-libs__l_net__l_net.c12
-rw-r--r--games/gtkradiant/files/patch-makeversion.py11
-rw-r--r--games/gtkradiant/files/patch-radiant__commands.cpp11
-rw-r--r--games/gtkradiant/files/patch-radiant__mainframe.cpp20
-rw-r--r--games/gtkradiant/files/patch-radiant__qe3.cpp11
-rw-r--r--games/gtkradiant/files/patch-radiant__qgl.cpp11
-rw-r--r--games/gtkradiant/files/patch-radiant__url.cpp11
-rw-r--r--games/gtkradiant/files/patch-radiant__watchbsp.cpp11
-rw-r--r--games/gtkradiant/files/patch-tools__quake2__common__threads.c15
-rw-r--r--games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__common__threads.c24
-rw-r--r--games/gtkradiant/files/patch-tools__quake3__common__threads.c24
-rw-r--r--games/gtkradiant/pkg-descr17
-rw-r--r--games/gtkradiant/pkg-plist219
22 files changed, 581 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index bdf5e24097f0..a26c047848f6 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -265,6 +265,7 @@
SUBDIR += gtkballs
SUBDIR += gtklife
SUBDIR += gtkpool
+ SUBDIR += gtkradiant
SUBDIR += gtktetcolor
SUBDIR += gturing
SUBDIR += gtypist
diff --git a/games/gtkradiant/Makefile b/games/gtkradiant/Makefile
new file mode 100644
index 000000000000..c458b278c578
--- /dev/null
+++ b/games/gtkradiant/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: gtkradiant
+# Date created: 9 May 2006
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= gtkradiant
+PORTVERSION= 1.5.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_IDSOFTWARE:S|$|source/:id|} \
+ http://www.bsd-geek.de/FreeBSD/distfiles/:fb
+DISTNAME= GtkRadiant-GPL
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:id \
+ ${PORTNAME}_gamepacks${EXTRACT_SUFX}:fb
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= Level design program developed by id Software and Loki Software
+
+BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/libsvn/__init__.py:${PORTSDIR}/devel/subversion-python \
+ scons:${PORTSDIR}/devel/scons
+LIB_DEPENDS= gtkglext-x11-1.0.2:${PORTSDIR}/x11-toolkits/gtkglext \
+ mhash.2:${PORTSDIR}/security/mhash \
+ png.5:${PORTSDIR}/graphics/png
+
+WRKSRC= ${WRKDIR}/GPL/GtkRadiant
+
+USE_ZIP= yes
+USE_GCC= 3.4+
+USE_GNOME= gtk20 libxml2
+USE_PYTHON_BUILD= yes
+
+SUB_FILES= ${PORTNAME}
+
+DATADIR= ${PREFIX}/lib/${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libs__bytestreamutils.h \
+ ${FILESDIR}/extra-patch-libs__math__vector.h
+.endif
+
+post-patch:
+.for f in CC CXX CFLAGS LOCALBASE PTHREAD_CFLAGS PTHREAD_LIBS X11BASE
+ @${REINPLACE_CMD} -i '' -e 's|%%${f}%%|${${f}}|g' ${WRKSRC}/SConstruct
+.endfor
+ @${REINPLACE_CMD} -e 's/-ldl//' ${WRKSRC}/SConscript
+ @${GREP} -Rl 'defined[[:blank:]]*([[:blank:]]*__linux__[[:blank:]]*) || defined[[:blank:]]*([[:blank:]]*__APPLE__[[:blank:]]*)' ${WRKSRC} | \
+ ${XARGS} ${REINPLACE_CMD} -e \
+ 's/\(defined[[:blank:]]*([[:blank:]]*__linux__[[:blank:]]*) || defined[[:blank:]]*([[:blank:]]*__APPLE__[[:blank:]]*)\)/\1 || defined (__FreeBSD__)/'
+
+do-build:
+ cd ${WRKSRC} && scons && ${PYTHON_CMD} install.py
+ ${CP} -R ${WRKDIR}/${PORTNAME}_gamepacks/* ${WRKSRC}/install
+
+do-install:
+ ${MKDIR} ${DATADIR}
+ ${CP} -R ${WRKSRC}/install/* ${DATADIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
+
+.include <bsd.port.post.mk>
diff --git a/games/gtkradiant/distinfo b/games/gtkradiant/distinfo
new file mode 100644
index 000000000000..0d58a8dc5781
--- /dev/null
+++ b/games/gtkradiant/distinfo
@@ -0,0 +1,6 @@
+MD5 (GtkRadiant-GPL.zip) = fa29a5a5bdd261dbe6577b566f58d9c0
+SHA256 (GtkRadiant-GPL.zip) = 9c5490e340aa60687ca64a16b059712a4d151caeeaed3258b0f5ea1ca965e86c
+SIZE (GtkRadiant-GPL.zip) = 5466094
+MD5 (gtkradiant_gamepacks.zip) = 8a2b5a89c4f817e0277d3940c6b8e59e
+SHA256 (gtkradiant_gamepacks.zip) = a8634a8c6a0c879bd03035f17bd72fd79591f9e248c9a4b6f0fd4ebdb2e4a9b3
+SIZE (gtkradiant_gamepacks.zip) = 501706
diff --git a/games/gtkradiant/files/extra-patch-libs__bytestreamutils.h b/games/gtkradiant/files/extra-patch-libs__bytestreamutils.h
new file mode 100644
index 000000000000..b5e7a288a1d2
--- /dev/null
+++ b/games/gtkradiant/files/extra-patch-libs__bytestreamutils.h
@@ -0,0 +1,11 @@
+--- libs/bytestreamutils.h.orig Fri Feb 10 19:01:20 2006
++++ libs/bytestreamutils.h Tue Feb 21 12:32:25 2006
+@@ -39,7 +39,7 @@
+ #define __USE_ISOC9X 1
+ #define __USE_ISOC99 1
+
+-#include <stdint.h>
++#include <inttypes.h>
+
+ #endif
+
diff --git a/games/gtkradiant/files/extra-patch-libs__math__vector.h b/games/gtkradiant/files/extra-patch-libs__math__vector.h
new file mode 100644
index 000000000000..dcbe7898948d
--- /dev/null
+++ b/games/gtkradiant/files/extra-patch-libs__math__vector.h
@@ -0,0 +1,11 @@
+--- ./libs/math/vector.h.orig Fri Feb 10 19:01:20 2006
++++ ./libs/math/vector.h Tue Feb 21 12:29:34 2006
+@@ -25,7 +25,7 @@
+ /// \file
+ /// \brief Vector data types and related operations.
+
+-#if 0
++#if 1
+
+ #define lrint(dbl) ((int)((dbl) + 0.5))
+ #define lrintf(flt) ((int)((flt) + 0.5))
diff --git a/games/gtkradiant/files/gtkradiant.in b/games/gtkradiant/files/gtkradiant.in
new file mode 100644
index 000000000000..7bf14a84eb4d
--- /dev/null
+++ b/games/gtkradiant/files/gtkradiant.in
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd %%DATADIR%% || exit 1
+
+exec ./radiant.x86 "$@"
diff --git a/games/gtkradiant/files/patch-SConstruct b/games/gtkradiant/files/patch-SConstruct
new file mode 100644
index 000000000000..ace60750ecd9
--- /dev/null
+++ b/games/gtkradiant/files/patch-SConstruct
@@ -0,0 +1,66 @@
+--- SConstruct.orig Fri Feb 10 19:01:20 2006
++++ SConstruct Tue Feb 21 12:46:47 2006
+@@ -3,7 +3,6 @@
+
+ import commands, re, sys, os, pickle, string, popen2
+ from makeversion import radiant_makeversion, get_version
+-from osx_setup import do_osx_setup
+
+ # to access some internal stuff
+ import SCons
+@@ -85,10 +84,10 @@
+
+ # default settings -------------------------------
+
+-CC='gcc'
+-CXX='g++'
++CC='%%CC%%'
++CXX='%%CXX%%'
+ JOBS='1'
+-BUILD='debug'
++BUILD='release'
+ INSTALL='#install'
+ SETUP='0'
+ g_build_root = 'build'
+@@ -172,9 +171,9 @@
+ # common flags
+ warningFlags = '-W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter '
+ warningFlagsCXX = '-Wno-non-virtual-dtor -Wreorder ' # -Wold-style-cast
+-CCFLAGS = '' + warningFlags
+-CXXFLAGS = '-pipe -DQ_NO_STLPORT ' + warningFlags + warningFlagsCXX
+-CPPPATH = []
++CCFLAGS = '%%CFLAGS%% '
++CXXFLAGS = '%%CFLAGS%% -pipe -DQ_NO_STLPORT '
++CPPPATH = ['%%LOCALBASE%%/include', '%%X11BASE%%/include']
+ if (BUILD == 'debug'):
+ CXXFLAGS += '-g -D_DEBUG '
+ CCFLAGS += '-g -D_DEBUG '
+@@ -190,7 +189,7 @@
+ print 'Unknown build configuration ' + BUILD
+ sys.exit( 0 )
+
+-LINKFLAGS = ''
++LINKFLAGS = '-L%%LOCALBASE%%/lib -L%%X11BASE%%/lib '
+ if ( OS == 'Linux' ):
+
+ # static
+@@ -270,7 +269,9 @@
+ if ( OS == 'Darwin' ):
+ self['LINKFLAGS'] += '-lpthread -Wl,-stack_size,0x400000 '
+ else:
+- self['LINKFLAGS'] += '-lpthread '
++ self['CCFLAGS'] += '%%PTHREAD_CFLAGS%% '
++ self['CXXFLAGS'] += '%%PTHREAD_CFLAGS%% '
++ self['LINKFLAGS'] += '%%PTHREAD_LIBS%% '
+
+ def CheckLDD(self, target, source, env):
+ file = target[0]
+@@ -278,7 +279,7 @@
+ print('ERROR: CheckLDD: target %s not found\n' % target[0])
+ Exit(1)
+ # not using os.popen3 as I want to check the return code
+- ldd = popen2.Popen3('`which ldd` -r %s' % target[0], 1)
++ ldd = popen2.Popen3('`which ldd` %s' % target[0], 1)
+ stdout_lines = ldd.fromchild.readlines()
+ stderr_lines = ldd.childerr.readlines()
+ ldd_ret = ldd.wait()
diff --git a/games/gtkradiant/files/patch-contrib__bobtoolz__misc.cpp b/games/gtkradiant/files/patch-contrib__bobtoolz__misc.cpp
new file mode 100644
index 000000000000..5cd23bea7e86
--- /dev/null
+++ b/games/gtkradiant/files/patch-contrib__bobtoolz__misc.cpp
@@ -0,0 +1,11 @@
+--- ./contrib/bobtoolz/misc.cpp.orig Thu Mar 16 16:09:46 2006
++++ ./contrib/bobtoolz/misc.cpp Thu Mar 16 16:37:50 2006
+@@ -33,7 +33,7 @@
+
+ #include "funchandlers.h"
+
+-#ifdef __linux__
++#if defined (__linux__) || defined(__FreeBSD__)
+ #include <sys/types.h>
+ #include <unistd.h>
+ #endif
diff --git a/games/gtkradiant/files/patch-install.py b/games/gtkradiant/files/patch-install.py
new file mode 100644
index 000000000000..322b9f18e4b2
--- /dev/null
+++ b/games/gtkradiant/files/patch-install.py
@@ -0,0 +1,11 @@
+--- ./install.py.orig Sun Feb 12 16:47:01 2006
++++ ./install.py Thu Mar 16 16:09:46 2006
+@@ -98,8 +98,6 @@
+ ]
+
+ # copy games
+-for game in games:
+- copyGame(gamesRoot, game, installRoot)
+
+ # copy win32 dlls
+ gtk2Root = os.path.normpath(os.path.join(thisDir, "../gtk2-2.4"))
diff --git a/games/gtkradiant/files/patch-libs__l_net__l_net.c b/games/gtkradiant/files/patch-libs__l_net__l_net.c
new file mode 100644
index 000000000000..7c22b10b8db3
--- /dev/null
+++ b/games/gtkradiant/files/patch-libs__l_net__l_net.c
@@ -0,0 +1,12 @@
+--- ./libs/l_net/l_net.c.orig Fri Feb 10 19:01:20 2006
++++ ./libs/l_net/l_net.c Thu Mar 16 16:37:04 2006
+@@ -84,8 +84,7 @@
+ {
+ #ifdef WIN32
+ return stricmp(addr1->ip, addr2->ip);
+-#endif
+-#ifdef __linux__
++#else
+ return strcasecmp(addr1->ip, addr2->ip);
+ #endif
+ } //end of the function Net_AddressCompare
diff --git a/games/gtkradiant/files/patch-makeversion.py b/games/gtkradiant/files/patch-makeversion.py
new file mode 100644
index 000000000000..5bdd9924315b
--- /dev/null
+++ b/games/gtkradiant/files/patch-makeversion.py
@@ -0,0 +1,11 @@
+--- ./makeversion.py.orig Sun Feb 12 16:47:01 2006
++++ ./makeversion.py Thu Mar 16 16:09:46 2006
+@@ -82,7 +82,7 @@
+ line = f.readline()
+ f.close()
+ else:
+- line = "Custom build based on revision " + str(svn.getRevision(os.getcwd()))
++ line = "Custom build based on revision 1.0"
+ # optional additional message
+ if ( not append_about is None ):
+ line += append_about
diff --git a/games/gtkradiant/files/patch-radiant__commands.cpp b/games/gtkradiant/files/patch-radiant__commands.cpp
new file mode 100644
index 000000000000..1c9409422a22
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__commands.cpp
@@ -0,0 +1,11 @@
+--- ./radiant/commands.cpp.orig Fri Feb 10 19:01:20 2006
++++ ./radiant/commands.cpp Thu Mar 16 16:09:46 2006
+@@ -128,7 +128,7 @@
+ #include <gdk/gdkkeysyms.h>
+ #include <ctype.h>
+
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ #define __toascii(c) ((c) & 0x7f)
+ #endif
+
diff --git a/games/gtkradiant/files/patch-radiant__mainframe.cpp b/games/gtkradiant/files/patch-radiant__mainframe.cpp
new file mode 100644
index 000000000000..5034d348ea31
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__mainframe.cpp
@@ -0,0 +1,20 @@
+--- ./radiant/mainframe.cpp.orig Thu Mar 16 16:09:46 2006
++++ ./radiant/mainframe.cpp Thu Mar 16 16:09:46 2006
+@@ -510,7 +510,7 @@
+ const char* const c_library_extension =
+ #if defined(WIN32)
+ "dll"
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ "so"
+ #elif defined (__APPLE__)
+ "dylib"
+@@ -3479,7 +3479,7 @@
+ const char* ENGINEPATH_ATTRIBUTE =
+ #if defined(WIN32)
+ "enginepath_win32"
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ "enginepath_linux"
+ #elif defined(__APPLE__)
+ "enginepath_macos"
diff --git a/games/gtkradiant/files/patch-radiant__qe3.cpp b/games/gtkradiant/files/patch-radiant__qe3.cpp
new file mode 100644
index 000000000000..563b61a1f8fb
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__qe3.cpp
@@ -0,0 +1,11 @@
+--- ./radiant/qe3.cpp.orig Thu Mar 16 16:09:46 2006
++++ ./radiant/qe3.cpp Thu Mar 16 16:09:46 2006
+@@ -172,7 +172,7 @@
+
+
+ const char* const EXECUTABLE_TYPE =
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__)
+ "x86"
+ #elif defined(__APPLE__)
+ "ppc"
diff --git a/games/gtkradiant/files/patch-radiant__qgl.cpp b/games/gtkradiant/files/patch-radiant__qgl.cpp
new file mode 100644
index 000000000000..811d942f44c6
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__qgl.cpp
@@ -0,0 +1,11 @@
+--- ./radiant/qgl.cpp.orig Thu Mar 16 16:09:46 2006
++++ ./radiant/qgl.cpp Thu Mar 16 16:09:46 2006
+@@ -654,7 +654,7 @@
+ qglXWaitX = glXWaitX;
+ qglXUseXFont = glXUseXFont;
+ // qglXGetProcAddressARB = glXGetProcAddressARB; // Utah-GLX fix
+- qglXGetProcAddressARB = (glXGetProcAddressARBProc)dlsym(NULL, "glXGetProcAddressARB");
++ qglXGetProcAddressARB = (glXGetProcAddressARBProc)dlsym(RTLD_DEFAULT, "glXGetProcAddressARB");
+ #endif
+
+ #if defined (__linux__) || defined (__APPLE__) || defined (__FreeBSD__)
diff --git a/games/gtkradiant/files/patch-radiant__url.cpp b/games/gtkradiant/files/patch-radiant__url.cpp
new file mode 100644
index 000000000000..c93618ba028d
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__url.cpp
@@ -0,0 +1,11 @@
+--- ./radiant/url.cpp.orig Fri Feb 10 19:01:20 2006
++++ ./radiant/url.cpp Thu Mar 16 16:09:46 2006
+@@ -33,7 +33,7 @@
+ }
+ #endif
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ #include <stdlib.h>
+ bool open_url(const char* url)
+ {
diff --git a/games/gtkradiant/files/patch-radiant__watchbsp.cpp b/games/gtkradiant/files/patch-radiant__watchbsp.cpp
new file mode 100644
index 000000000000..58f1ed153198
--- /dev/null
+++ b/games/gtkradiant/files/patch-radiant__watchbsp.cpp
@@ -0,0 +1,11 @@
+--- ./radiant/watchbsp.cpp.orig Thu Mar 16 16:09:46 2006
++++ ./radiant/watchbsp.cpp Thu Mar 16 16:09:46 2006
+@@ -614,7 +614,7 @@
+ #if defined(WIN32)
+ #define ENGINE_ATTRIBUTE "engine_win32"
+ #define MP_ENGINE_ATTRIBUTE "mp_engine_win32"
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__)
+ #define ENGINE_ATTRIBUTE "engine_linux"
+ #define MP_ENGINE_ATTRIBUTE "mp_engine_linux"
+ #elif defined(__APPLE__)
diff --git a/games/gtkradiant/files/patch-tools__quake2__common__threads.c b/games/gtkradiant/files/patch-tools__quake2__common__threads.c
new file mode 100644
index 000000000000..d5e7323d9012
--- /dev/null
+++ b/games/gtkradiant/files/patch-tools__quake2__common__threads.c
@@ -0,0 +1,15 @@
+--- ./tools/quake2/common/threads.c.orig Thu Mar 16 16:09:46 2006
++++ ./tools/quake2/common/threads.c Thu Mar 16 16:21:27 2006
+@@ -542,11 +542,7 @@
+
+ if(pthread_mutexattr_init(&mattrib) != 0)
+ Error("pthread_mutexattr_init failed");
+-#if __GLIBC_MINOR__ == 1
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_FAST_NP) != 0)
+-#else
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ADAPTIVE_NP) != 0)
+-#endif
++ if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_NORMAL) != 0)
+ Error ("pthread_mutexattr_settype failed");
+ recursive_mutex_init(mattrib);
+
diff --git a/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__common__threads.c b/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__common__threads.c
new file mode 100644
index 000000000000..c02e6cf896e4
--- /dev/null
+++ b/games/gtkradiant/files/patch-tools__quake2__qdata_heretic2__common__threads.c
@@ -0,0 +1,24 @@
+--- ./tools/quake2/qdata_heretic2/common/threads.c.orig Fri Feb 10 19:01:20 2006
++++ ./tools/quake2/qdata_heretic2/common/threads.c Thu Mar 16 16:35:19 2006
+@@ -415,7 +415,7 @@
+ =======================================================================
+ */
+
+-#ifdef __linux__
++#if defined (__linux__) || defined (__APPLE__) || defined (__FreeBSD__)
+ #define USED
+
+ int numthreads = 4;
+@@ -540,11 +540,7 @@
+
+ if(pthread_mutexattr_init(&mattrib) != 0)
+ Error("pthread_mutexattr_init failed");
+-#if __GLIBC_MINOR__ == 1
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_FAST_NP) != 0)
+-#else
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ADAPTIVE_NP) != 0)
+-#endif
++ if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_NORMAL) != 0)
+ Error ("pthread_mutexattr_settype failed");
+ recursive_mutex_init(mattrib);
+
diff --git a/games/gtkradiant/files/patch-tools__quake3__common__threads.c b/games/gtkradiant/files/patch-tools__quake3__common__threads.c
new file mode 100644
index 000000000000..976ccba4e1d3
--- /dev/null
+++ b/games/gtkradiant/files/patch-tools__quake3__common__threads.c
@@ -0,0 +1,24 @@
+--- ./tools/quake3/common/threads.c.orig Fri Feb 10 19:01:20 2006
++++ ./tools/quake3/common/threads.c Thu Mar 16 16:36:04 2006
+@@ -415,7 +415,7 @@
+ =======================================================================
+ */
+
+-#ifdef __linux__
++#if defined (__linux__) || defined (__APPLE__) || defined (__FreeBSD__)
+ #define USED
+
+ int numthreads = 4;
+@@ -540,11 +540,7 @@
+
+ if(pthread_mutexattr_init(&mattrib) != 0)
+ Error("pthread_mutexattr_init failed");
+-#if __GLIBC_MINOR__ == 1
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_FAST_NP) != 0)
+-#else
+- if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_ADAPTIVE_NP) != 0)
+-#endif
++ if (pthread_mutexattr_settype(&mattrib, PTHREAD_MUTEX_NORMAL) != 0)
+ Error ("pthread_mutexattr_settype failed");
+ recursive_mutex_init(mattrib);
+
diff --git a/games/gtkradiant/pkg-descr b/games/gtkradiant/pkg-descr
new file mode 100644
index 000000000000..ca4391e611de
--- /dev/null
+++ b/games/gtkradiant/pkg-descr
@@ -0,0 +1,17 @@
+GtkRadiant is a level design program developed by id Software and Loki
+Software. It is used to create maps for a number of computer games.
+
+GtkRadiant originated as Q3Radiant, the Quake III Arena level design tool,
+which was a Windows-only application. Two major things are different in
+GtkRadiant: it is based on the GTK+ toolkit, so it also works in Linux and Mac
+OS X, and it's also game engine-independent, with functionality for new games
+added as game packs.
+
+GtkRadiant is an Open Source application. Source code is publicly available
+from id Software's Subversion repository and new additions to the code are
+covered under open source licenses. The core Q3Radiant code, however, was
+originally under id Software's proprietary license. The license for both the
+editor and toolset (notably Q3Map2, the BSP compiler) was changed in February
+2006, and publicly released under the GPL on February 17.
+
+WWW: http://www.qeradiant.com/
diff --git a/games/gtkradiant/pkg-plist b/games/gtkradiant/pkg-plist
new file mode 100644
index 000000000000..30cde7ff801c
--- /dev/null
+++ b/games/gtkradiant/pkg-plist
@@ -0,0 +1,219 @@
+bin/gtkradiant
+%%DATADIR%%/RADIANT_MAJOR
+%%DATADIR%%/RADIANT_MINOR
+%%DATADIR%%/bitmaps/black.bmp
+%%DATADIR%%/bitmaps/brush_flipx.bmp
+%%DATADIR%%/bitmaps/brush_flipy.bmp
+%%DATADIR%%/bitmaps/brush_flipz.bmp
+%%DATADIR%%/bitmaps/brush_rotatex.bmp
+%%DATADIR%%/bitmaps/brush_rotatey.bmp
+%%DATADIR%%/bitmaps/brush_rotatez.bmp
+%%DATADIR%%/bitmaps/cap_bevel.bmp
+%%DATADIR%%/bitmaps/cap_cylinder.bmp
+%%DATADIR%%/bitmaps/cap_endcap.bmp
+%%DATADIR%%/bitmaps/cap_ibevel.bmp
+%%DATADIR%%/bitmaps/cap_iendcap.bmp
+%%DATADIR%%/bitmaps/curve_cap.bmp
+%%DATADIR%%/bitmaps/dontselectcurve.bmp
+%%DATADIR%%/bitmaps/dontselectmodel.bmp
+%%DATADIR%%/bitmaps/ellipsis.bmp
+%%DATADIR%%/bitmaps/file_open.bmp
+%%DATADIR%%/bitmaps/file_save.bmp
+%%DATADIR%%/bitmaps/icon.bmp
+%%DATADIR%%/bitmaps/logo.bmp
+%%DATADIR%%/bitmaps/modify_edges.bmp
+%%DATADIR%%/bitmaps/modify_faces.bmp
+%%DATADIR%%/bitmaps/modify_vertices.bmp
+%%DATADIR%%/bitmaps/noFalloff.bmp
+%%DATADIR%%/bitmaps/notex.bmp
+%%DATADIR%%/bitmaps/patch_bend.bmp
+%%DATADIR%%/bitmaps/patch_drilldown.bmp
+%%DATADIR%%/bitmaps/patch_insdel.bmp
+%%DATADIR%%/bitmaps/patch_showboundingbox.bmp
+%%DATADIR%%/bitmaps/patch_weld.bmp
+%%DATADIR%%/bitmaps/patch_wireframe.bmp
+%%DATADIR%%/bitmaps/popup_selection.bmp
+%%DATADIR%%/bitmaps/scalelockx.bmp
+%%DATADIR%%/bitmaps/scalelocky.bmp
+%%DATADIR%%/bitmaps/scalelockz.bmp
+%%DATADIR%%/bitmaps/select_mouseresize.bmp
+%%DATADIR%%/bitmaps/select_mouserotate.bmp
+%%DATADIR%%/bitmaps/select_mousescale.bmp
+%%DATADIR%%/bitmaps/select_mousetranslate.bmp
+%%DATADIR%%/bitmaps/selection_csgmerge.bmp
+%%DATADIR%%/bitmaps/selection_csgsubtract.bmp
+%%DATADIR%%/bitmaps/selection_makehollow.bmp
+%%DATADIR%%/bitmaps/selection_selectcompletetall.bmp
+%%DATADIR%%/bitmaps/selection_selectinside.bmp
+%%DATADIR%%/bitmaps/selection_selectpartialtall.bmp
+%%DATADIR%%/bitmaps/selection_selecttouching.bmp
+%%DATADIR%%/bitmaps/shadernotex.bmp
+%%DATADIR%%/bitmaps/show_entities.bmp
+%%DATADIR%%/bitmaps/splash.bmp
+%%DATADIR%%/bitmaps/texture_lock.bmp
+%%DATADIR%%/bitmaps/textures_popup.bmp
+%%DATADIR%%/bitmaps/view_cameratoggle.bmp
+%%DATADIR%%/bitmaps/view_cameraupdate.bmp
+%%DATADIR%%/bitmaps/view_change.bmp
+%%DATADIR%%/bitmaps/view_clipper.bmp
+%%DATADIR%%/bitmaps/view_cubicclipping.bmp
+%%DATADIR%%/bitmaps/view_entity.bmp
+%%DATADIR%%/bitmaps/white.bmp
+%%DATADIR%%/bitmaps/window1.bmp
+%%DATADIR%%/bitmaps/window2.bmp
+%%DATADIR%%/bitmaps/window3.bmp
+%%DATADIR%%/bitmaps/window4.bmp
+%%DATADIR%%/doom3.game/base/default_shaderlist.txt
+%%DATADIR%%/doom3.game/default_build_menu.xml
+%%DATADIR%%/et.game/bitmaps/splash.bmp
+%%DATADIR%%/et.game/default_build_menu.txt
+%%DATADIR%%/et.game/default_build_menu.xml
+%%DATADIR%%/et.game/etmain/default_shaderlist.txt
+%%DATADIR%%/et.game/etmain/et_entities.def
+%%DATADIR%%/et.game/etmain/et_entities.ent
+%%DATADIR%%/et.game/game.xlink
+%%DATADIR%%/games/doom3.game
+%%DATADIR%%/games/et.game
+%%DATADIR%%/games/heretic2.game
+%%DATADIR%%/games/hl.game
+%%DATADIR%%/games/hlcs.game
+%%DATADIR%%/games/ja.game
+%%DATADIR%%/games/jabp.game
+%%DATADIR%%/games/jk2.game
+%%DATADIR%%/games/q1.game
+%%DATADIR%%/games/q2.game
+%%DATADIR%%/games/q3.game
+%%DATADIR%%/games/q3bp.game
+%%DATADIR%%/games/q4.game
+%%DATADIR%%/games/sof2.game
+%%DATADIR%%/games/stvef.game
+%%DATADIR%%/games/wolf.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/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.game/base/entities.def
+%%DATADIR%%/heretic2.game/default_build_menu.xml
+%%DATADIR%%/heretic2.game/game.xlink
+%%DATADIR%%/heretic2/h2data
+%%DATADIR%%/hl.game/cstrike/halflife-cs.fgd
+%%DATADIR%%/hl.game/default_build_menu.xml
+%%DATADIR%%/hl.game/valve/default_shaderlist.txt
+%%DATADIR%%/hl.game/valve/halflife.fgd
+%%DATADIR%%/ja.game/base/default_shaderlist.txt
+%%DATADIR%%/ja.game/base/mp_entities.def
+%%DATADIR%%/ja.game/base/sp_entities.def
+%%DATADIR%%/ja.game/default_build_menu.xml
+%%DATADIR%%/ja.game/game.xlink
+%%DATADIR%%/jk2.game/BehavEd.bhc
+%%DATADIR%%/jk2.game/ChangeLog.txt
+%%DATADIR%%/jk2.game/base/default_shaderlist.txt
+%%DATADIR%%/jk2.game/base/mp_entities.def
+%%DATADIR%%/jk2.game/base/sp_entities.def
+%%DATADIR%%/jk2.game/default_build_menu.xml
+%%DATADIR%%/jk2.game/game.xlink
+%%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/mapq3.so
+%%DATADIR%%/modules/mapxml.so
+%%DATADIR%%/modules/md3model.so
+%%DATADIR%%/modules/model.so
+%%DATADIR%%/modules/shaders.so
+%%DATADIR%%/modules/vfspk3.so
+%%DATADIR%%/q1.game/default_build_menu.xml
+%%DATADIR%%/q1.game/id1/entities.ent
+%%DATADIR%%/q2.game/baseq2/entities.def
+%%DATADIR%%/q2.game/default_build_menu.xml
+%%DATADIR%%/q2.game/game.xlink
+%%DATADIR%%/q2map
+%%DATADIR%%/q3.game/baseq3/default_shaderlist.txt
+%%DATADIR%%/q3.game/baseq3/entities.def
+%%DATADIR%%/q3.game/baseq3/entities.ent
+%%DATADIR%%/q3.game/default_build_menu.xml
+%%DATADIR%%/q3.game/game.xlink
+%%DATADIR%%/q3.game/missionpack/default_shaderlist.txt
+%%DATADIR%%/q3.game/missionpack/entities-ta.def
+%%DATADIR%%/q3.game/missionpack/entities-ta.ent
+%%DATADIR%%/q3bp.game/baseq3/default_shaderlist.txt
+%%DATADIR%%/q3bp.game/default_build_menu.xml
+%%DATADIR%%/q3bp.game/game.xlink
+%%DATADIR%%/q3data.qdt
+%%DATADIR%%/q3data.x86
+%%DATADIR%%/q3map2.x86
+%%DATADIR%%/q4.game/default_build_menu.xml
+%%DATADIR%%/q4.game/q4base/default_shaderlist.txt
+%%DATADIR%%/qdata3
+%%DATADIR%%/radiant.x86
+%%DATADIR%%/sof2.game/BehavEd.bhc
+%%DATADIR%%/sof2.game/ChangeLog.txt
+%%DATADIR%%/sof2.game/base/default_shaderlist.txt
+%%DATADIR%%/sof2.game/base/mp_entities.def
+%%DATADIR%%/sof2.game/base/sp_entities.def
+%%DATADIR%%/sof2.game/default_build_menu.xml
+%%DATADIR%%/sof2.game/game.xlink
+%%DATADIR%%/stvef.game/baseEF/default_shaderlist.txt
+%%DATADIR%%/stvef.game/baseEF/hm_entities.def
+%%DATADIR%%/stvef.game/baseEF/mp_entities.def
+%%DATADIR%%/stvef.game/baseEF/sp_entities.def
+%%DATADIR%%/stvef.game/default_build_menu.xml
+%%DATADIR%%/stvef.game/game.xlink
+%%DATADIR%%/wolf.game/default_build_menu.xml
+%%DATADIR%%/wolf.game/game.xlink
+%%DATADIR%%/wolf.game/main/default_shaderlist.txt
+%%DATADIR%%/wolf.game/main/wolf_entities.def
+%%DATADIR%%/wolf.game/main/wolf_entities.ent
+@dirrm %%DATADIR%%/wolf.game/main
+@dirrm %%DATADIR%%/wolf.game
+@dirrm %%DATADIR%%/stvef.game/baseEF
+@dirrm %%DATADIR%%/stvef.game
+@dirrm %%DATADIR%%/sof2.game/base
+@dirrm %%DATADIR%%/sof2.game
+@dirrm %%DATADIR%%/q4.game/q4base
+@dirrm %%DATADIR%%/q4.game
+@dirrm %%DATADIR%%/q3bp.game/baseq3
+@dirrm %%DATADIR%%/q3bp.game
+@dirrm %%DATADIR%%/q3.game/missionpack
+@dirrm %%DATADIR%%/q3.game/baseq3
+@dirrm %%DATADIR%%/q3.game
+@dirrm %%DATADIR%%/q2.game/baseq2
+@dirrm %%DATADIR%%/q2.game
+@dirrm %%DATADIR%%/q1.game/id1
+@dirrm %%DATADIR%%/q1.game
+@dirrm %%DATADIR%%/plugins
+@dirrm %%DATADIR%%/modules
+@dirrm %%DATADIR%%/jk2.game/base
+@dirrm %%DATADIR%%/jk2.game
+@dirrm %%DATADIR%%/jabp.game
+@dirrm %%DATADIR%%/ja.game/base
+@dirrm %%DATADIR%%/ja.game
+@dirrm %%DATADIR%%/hlcs.game
+@dirrm %%DATADIR%%/hl.game/valve
+@dirrm %%DATADIR%%/hl.game/cstrike
+@dirrm %%DATADIR%%/hl.game
+@dirrm %%DATADIR%%/heretic2.game/base
+@dirrm %%DATADIR%%/heretic2.game
+@dirrm %%DATADIR%%/heretic2
+@dirrm %%DATADIR%%/gl
+@dirrm %%DATADIR%%/games
+@dirrm %%DATADIR%%/et.game/etmain
+@dirrm %%DATADIR%%/et.game/bitmaps
+@dirrm %%DATADIR%%/et.game
+@dirrm %%DATADIR%%/doom3.game/base
+@dirrm %%DATADIR%%/doom3.game
+@dirrm %%DATADIR%%/bitmaps
+@dirrm %%DATADIR%%