diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2010-11-18 05:16:28 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2010-11-18 05:16:28 +0000 |
commit | e2d600932facc0c97ba644755dbf8b05afbad204 (patch) | |
tree | d0675f7ca219ffe70ade525df4ea2a60ecead552 /games/vdrift | |
parent | c5f11c8f4f8cc674ae78109ee2201e0b9a7fdc1a (diff) | |
download | ports-e2d600932facc0c97ba644755dbf8b05afbad204.tar.gz ports-e2d600932facc0c97ba644755dbf8b05afbad204.zip |
Notes
Diffstat (limited to 'games/vdrift')
-rw-r--r-- | games/vdrift/Makefile | 22 | ||||
-rw-r--r-- | games/vdrift/distinfo | 5 | ||||
-rw-r--r-- | games/vdrift/files/patch-SConstruct | 68 | ||||
-rw-r--r-- | games/vdrift/files/patch-include_numprocessors.h | 20 | ||||
-rw-r--r-- | games/vdrift/files/patch-src_SConscript | 52 |
5 files changed, 58 insertions, 109 deletions
diff --git a/games/vdrift/Makefile b/games/vdrift/Makefile index ac1939bf77dc..46b150349880 100644 --- a/games/vdrift/Makefile +++ b/games/vdrift/Makefile @@ -6,19 +6,20 @@ # PORTNAME= vdrift -PORTVERSION= 20090215 -PORTREVISION= 7 +PORTVERSION= 20100630 CATEGORIES= games -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-2009-02-15 -DISTNAME= ${PORTNAME}-2009-02-15 +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${DATE_VERSION} +DISTNAME= ${PORTNAME}-${DATE_VERSION}-src DIST_SUBDIR= ${PORTNAME} MAINTAINER= acm@FreeBSD.org COMMENT= Open source driving simulation BUILD_DEPENDS= scons:${PORTSDIR}/devel/scons \ - ${LOCALBASE}/lib/libbulletcollision.a:${PORTSDIR}/devel/bullet -LIB_DEPENDS= vorbis.4:${PORTSDIR}/audio/libvorbis + ${LOCALBASE}/lib/libBulletCollision.a:${PORTSDIR}/devel/bullet \ + ${LOCALBASE}/include/asio.hpp::${PORTSDIR}/net/asio +LIB_DEPENDS= vorbis.4:${PORTSDIR}/audio/libvorbis \ + boost_thread.4:${PORTSDIR}/devel/boost-libs RUN_DEPENDS= ${LOCALBASE}/share/${PORTNAME}/settings/VDrift.config:${PORTSDIR}/games/vdrift-data USE_BZIP2= yes @@ -31,6 +32,8 @@ SCONS_ARGS= prefix=${PREFIX} \ use_binreloc=0 WRKSRC= ${WRKDIR}/${DISTNAME} +DATE_VERSION= 2010-06-30 + SUB_FILES= pkg-message OPTIONS= DEBUG "Additional debug information" off \ @@ -57,9 +60,10 @@ BROKEN= Does not compile on sparc64 .endif post-patch: - @${REINPLACE_CMD} -e 's|-O2||g' ${WRKSRC}/SConstruct - @${REINPLACE_CMD} -e 's|^os.system.*||g' ${WRKSRC}/src/SConscript - @${REINPLACE_CMD} -e 's|GLvoid|void|g' ${WRKSRC}/src/main.cpp + @${REINPLACE_CMD} -e 's,(__APPLE__),(__APPLE__) || defined(__FreeBSD__),g' \ + ${WRKSRC}/include/quickmp.h + @${REINPLACE_CMD} -e 's|GEN_clamped|btClamped|g' \ + ${WRKSRC}/bullet/BulletDynamics/Dynamics/btRigidBody.cpp do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} scons ${SCONS_ARGS} diff --git a/games/vdrift/distinfo b/games/vdrift/distinfo index 9aa73295a568..479da91ceaef 100644 --- a/games/vdrift/distinfo +++ b/games/vdrift/distinfo @@ -1,3 +1,2 @@ -MD5 (vdrift/vdrift-2009-02-15.tar.bz2) = 4e93137388e9f49e059dbeec6b39f0fe -SHA256 (vdrift/vdrift-2009-02-15.tar.bz2) = 1f8b189e23b49e6d4de78f915e3179bd7efb7361e47d653498625395a0b21e7e -SIZE (vdrift/vdrift-2009-02-15.tar.bz2) = 358035 +SHA256 (vdrift/vdrift-2010-06-30-src.tar.bz2) = ae88a79fb236c150a431b2389fb5c02aeeef832b0dd47ea896cc82ced4f117bf +SIZE (vdrift/vdrift-2010-06-30-src.tar.bz2) = 737604 diff --git a/games/vdrift/files/patch-SConstruct b/games/vdrift/files/patch-SConstruct index 579a9a318a70..8e137c0b3dfb 100644 --- a/games/vdrift/files/patch-SConstruct +++ b/games/vdrift/files/patch-SConstruct @@ -1,65 +1,29 @@ ---- SConstruct 2009-05-13 00:13:10.000000000 -0500 -+++ SConstruct 2009-05-13 00:14:44.000000000 -0500 -@@ -6,26 +6,26 @@ - # Build Options # - #---------------# - --opts = Options('vdrift.conf', ARGUMENTS) -+opts = Variables('vdrift.conf', ARGUMENTS) - opts.Add('destdir', 'Staging area to install VDrift to. Useful for packagers. ', '') - opts.Add('localedir', 'Path suffix were vdrift locales (.mo files) will be installed', "share/locale") - opts.Add('arch', 'Target architecture to compile vdrift for (x86, 686, p4, axp, a64, prescott, nocona, core2)', 'x86') --opts.Add(BoolOption('minimal', 'Only install minimal data (3 cars and 2 tracks)', 0)) --opts.Add(BoolOption('cache', 'Cache options in vdrift.conf', 1)) --opts.Add(BoolOption('release', 'Turn off debug option during build', 0)) --opts.Add(BoolOption('use_gcc_32', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) --opts.Add(BoolOption('use_gcc_33', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) --opts.Add(BoolOption('use_gcc_34', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) --opts.Add(BoolOption('use_apbuild', 'Set this to 1 if you want to compile with apgcc to create an autopackage', 0)) --opts.Add(BoolOption('use_binreloc', 'Set this to 1 if you want to compile with Binary Relocation support', 1)) --opts.Add(BoolOption('os_cc', 'Set this to 1 if you want to use the operating system\'s C compiler environment variable.', 0)) --opts.Add(BoolOption('os_cxx', 'Set this to 1 if you want to use the operating system\'s C++ compiler environment variable.', 0)) --opts.Add(BoolOption('os_cxxflags', 'Set this to 1 if you want to use the operating system\'s C++ compiler flags environment variable.', 0)) --opts.Add(BoolOption('NLS', 'Set this to 1 to turn on i18n support', 0)) --opts.Add(BoolOption('use_distcc', 'Set this to 1 to enable distributed compilacion', 0)) --opts.Add(BoolOption('force_feedback', 'Enable force-feedback support', 0)) --opts.Add(BoolOption('profiling', 'Turn on profiling output', 0)) --opts.Add(BoolOption('efficiency', 'Turn on compile-time efficiency warnings', 0)) -+opts.Add(BoolVariable('minimal', 'Only install minimal data (3 cars and 2 tracks)', 0)) -+opts.Add(BoolVariable('cache', 'Cache options in vdrift.conf', 1)) -+opts.Add(BoolVariable('release', 'Turn off debug option during build', 0)) -+opts.Add(BoolVariable('use_gcc_32', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) -+opts.Add(BoolVariable('use_gcc_33', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) -+opts.Add(BoolVariable('use_gcc_34', 'Set this to 1 if the game runs fine but the cars bounce around (gcc4 bug).', 0)) -+opts.Add(BoolVariable('use_apbuild', 'Set this to 1 if you want to compile with apgcc to create an autopackage', 0)) -+opts.Add(BoolVariable('use_binreloc', 'Set this to 1 if you want to compile with Binary Relocation support', 1)) -+opts.Add(BoolVariable('os_cc', 'Set this to 1 if you want to use the operating system\'s C compiler environment variable.', 0)) -+opts.Add(BoolVariable('os_cxx', 'Set this to 1 if you want to use the operating system\'s C++ compiler environment variable.', 0)) -+opts.Add(BoolVariable('os_cxxflags', 'Set this to 1 if you want to use the operating system\'s C++ compiler flags environment variable.', 0)) -+opts.Add(BoolVariable('NLS', 'Set this to 1 to turn on i18n support', 0)) -+opts.Add(BoolVariable('use_distcc', 'Set this to 1 to enable distributed compilacion', 0)) -+opts.Add(BoolVariable('force_feedback', 'Enable force-feedback support', 0)) -+opts.Add(BoolVariable('profiling', 'Turn on profiling output', 0)) -+opts.Add(BoolVariable('efficiency', 'Turn on compile-time efficiency warnings', 0)) - - - #--------------------------# +--- SConstruct.orig 2010-11-14 16:45:13.000000000 -0500 ++++ SConstruct 2010-11-14 16:46:49.000000000 -0500 @@ -43,7 +43,7 @@ #---------------# # FreeBSD build # #---------------# --if (sys.platform == 'freebsd5') or (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8'): +-if (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8'): +if (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8') or (sys.platform == 'freebsd9'): if 'LOCALBASE' in os.environ: LOCALBASE = os.environ['LOCALBASE'] else: -@@ -387,7 +387,8 @@ +@@ -53,7 +53,7 @@ + LIBPATH = ['.', '#lib', LOCALBASE + '/lib'], + LINKFLAGS = ['-pthread','-lintl'], + options = opts) +- check_headers = ['GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/glew.h'] ++ check_headers = ['asio.hpp', 'boost/bind.hpp', 'GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h', 'GL/glew.h'] + if 'CC' in os.environ: + env.Replace(CC = os.environ['CC']) + else: +@@ -396,7 +396,7 @@ version = strftime("%Y-%m-%d") if env['release']: # release build, debugging off, optimizations on -- env.Append(CCFLAGS = ['-O1', '-pipe']) -+ if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9'): -+ env.Append(CCFLAGS = ['-O1', '-pipe']) +- if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'win32') and (sys.platform != 'cygwin'): ++ if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9') and (sys.platform != 'win32') and (sys.platform != 'cygwin'): + env.Append(CCFLAGS = ['-O1', '-pipe']) # version is current build date #version = strftime("%Y-%m-%d") - else: diff --git a/games/vdrift/files/patch-include_numprocessors.h b/games/vdrift/files/patch-include_numprocessors.h deleted file mode 100644 index fc3b6da50eb4..000000000000 --- a/games/vdrift/files/patch-include_numprocessors.h +++ /dev/null @@ -1,20 +0,0 @@ ---- include/numprocessors.h 2009-05-12 21:45:28.000000000 -0500 -+++ include/numprocessors.h 2009-05-12 21:46:26.000000000 -0500 -@@ -9,7 +9,7 @@ - #define QMP_USE_WINDOWS_THREADS - #include <windows.h> - #include <process.h> --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__FreeBSD__) - #include <pthread.h> - - // Required to get number of processors on OS X using sysctlbyname. -@@ -29,7 +29,7 @@ - SYSTEM_INFO systemInfo; - GetSystemInfo(&systemInfo); - return (unsigned int)systemInfo.dwNumberOfProcessors; --#elif defined (__APPLE__) -+#elif defined (__APPLE__) || defined (__FreeBSD__) - int numProcessors = 0; - size_t size = sizeof(numProcessors); - int returnCode = sysctlbyname("hw.ncpu", &numProcessors, &size, NULL, 0); diff --git a/games/vdrift/files/patch-src_SConscript b/games/vdrift/files/patch-src_SConscript index 26a5d2b1e59b..418cb283cf2a 100644 --- a/games/vdrift/files/patch-src_SConscript +++ b/games/vdrift/files/patch-src_SConscript @@ -1,38 +1,40 @@ ---- src/SConscript 2009-05-12 21:55:12.000000000 -0500 -+++ src/SConscript 2009-05-12 21:56:45.000000000 -0500 -@@ -11,8 +11,9 @@ +--- src/SConscript 2010-06-25 12:47:56.000000000 -0500 ++++ src/SConscript 2010-11-14 17:36:10.000000000 -0500 +@@ -11,9 +11,8 @@ #vamosobjs = SConscript('vamos/SConscript', exports=['env', 'src_dir']) #guiobjs = SConscript('gui/SConscript', exports=['env', 'src_dir']) --def addbulletpath( val ): -- return "../bullet-2.73/src/"+val -+if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9'): -+ def addbulletpath( val ): -+ return "../bullet-2.73/src/"+val +-if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8'): +- def addbulletpath( val ): +- return "#bullet/"+val ++def addbulletpath( val ): ++ return "#bullet/"+val #---------# # Sources # -@@ -164,9 +165,10 @@ - BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp - BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp""") +@@ -219,8 +218,7 @@ + LinearMath/btQuickprof.cpp + LinearMath/btSerializer.cpp""") --bullet_src = map(addbulletpath, bullet_src) - --src.extend(bullet_src) -+if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8') and (sys.platform != 'freebsd9'): -+ bullet_src = map(addbulletpath, bullet_src) -+ src.extend(bullet_src) +-if (sys.platform != 'freebsd6') and (sys.platform != 'freebsd7') and (sys.platform != 'freebsd8'): +- bullet_src = map(addbulletpath, bullet_src) ++bullet_src = map(addbulletpath, bullet_src) #------------------------# # Copy Build Environment # -@@ -181,6 +183,10 @@ +@@ -235,9 +233,12 @@ vdrift_install = None - common_libs = ['SDL_image', 'SDL_net', 'SDL_gfx', 'vorbisfile'] + common_libs = ['SDL_image', 'SDL_gfx', 'vorbisfile', 'vdriftbullet'] +-if (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8'): +- common_libs.append('libbulletcollision') +- common_libs.append('libbulletmath') +if (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8') or (sys.platform == 'freebsd9'): -+ common_libs.append('libbulletcollision') -+ common_libs.append('libbulletmath') -+ - #check to see how bullet was built - #if ( FindFile('libLinearMath.a', '#bullet-2.73/src/LinearMath') == None): - # common_libs.append('libbulletcollision') ++ common_libs.append('libLinearMath') ++ common_libs.append('libBulletCollision') ++ local_env.ParseConfig('sdl-config --cflags --libs') ++ local_env.Append(LIBPATH = ['/usr/X11R6/lib']) ++ libs_link = ['GLU', 'GLEW', 'pthread', common_libs] + elif ( 'darwin' == sys.platform ): + vdrift_install = "${PRODUCT_NAME}.app" + pkgbase = "%s/Contents" % vdrift_install |