diff options
author | acm <acm@FreeBSD.org> | 2006-09-02 22:33:15 +0800 |
---|---|---|
committer | acm <acm@FreeBSD.org> | 2006-09-02 22:33:15 +0800 |
commit | 32bdb6013cdf7e29f0260bf19e6be26a6d8f7b82 (patch) | |
tree | 8e1c4db668d871a83161a0f4157a3f0fb67e9f12 /games | |
parent | 8628caa8a1f9817c9d3f4b91f7d35f6aecbc2880 (diff) | |
download | freebsd-ports-gnome-32bdb6013cdf7e29f0260bf19e6be26a6d8f7b82.tar.gz freebsd-ports-gnome-32bdb6013cdf7e29f0260bf19e6be26a6d8f7b82.tar.zst freebsd-ports-gnome-32bdb6013cdf7e29f0260bf19e6be26a6d8f7b82.zip |
- Update to 0.1.2
- Remove USE_X_PREFIX
- Remove obsolete patch files
- Move pkg-message to files directory
Approved by: garga (mentor)
Diffstat (limited to 'games')
-rw-r--r-- | games/marsnomercy/Makefile | 20 | ||||
-rw-r--r-- | games/marsnomercy/distinfo | 6 | ||||
-rw-r--r-- | games/marsnomercy/files/patch-SConstruct | 70 | ||||
-rw-r--r-- | games/marsnomercy/files/patch-src-graphic_Screen.cpp | 36 | ||||
-rw-r--r-- | games/marsnomercy/files/patch-src_mars.cpp | 48 | ||||
-rw-r--r-- | games/marsnomercy/files/pkg-message.in (renamed from games/marsnomercy/pkg-message) | 7 |
6 files changed, 75 insertions, 112 deletions
diff --git a/games/marsnomercy/Makefile b/games/marsnomercy/Makefile index a1b0634287bd..26eba0dd9258 100644 --- a/games/marsnomercy/Makefile +++ b/games/marsnomercy/Makefile @@ -6,7 +6,7 @@ # PORTNAME= marsnomercy -PORTVERSION= 0.1.1 +PORTVERSION= 0.1.2 CATEGORIES= games MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= mars @@ -17,16 +17,18 @@ COMMENT= A turn-based strategy game setting on Mars BUILD_DEPENDS= scons:${PORTSDIR}/devel/scons -USE_X_PREFIX= yes +USE_GL= yes USE_SDL= sdl image ttf MAKE_ENV= CC="${CC}" CXX="${CXX}" + PLIST= ${WRKDIR}/pkg-plist PLIST_FILES= bin/mars-nomercy libexec/mars PLIST_DIRS= %%DATADIR%% +SUB_FILES= mars-nomercy pkg-message WRKSRC= ${WRKDIR}/mars-${PORTVERSION} -SUB_FILES= mars-nomercy -OPTIONS= DEBUG "With additional debug information" off +OPTIONS= DEBUG "With additional debug information" off \ + OPENGL "Install binary with opengl support" off .include <bsd.port.pre.mk> @@ -35,9 +37,9 @@ IGNORE= does not build on FreeBSD 4.x .endif .if defined(WITH_DEBUG) -SCONS_ARGS= debug=1 +SCONS_ARGS+= debug=1 .else -SCONS_ARGS= debug=0 +SCONS_ARGS+= debug=0 .endif do-build: @@ -55,7 +57,11 @@ do-install: ${FIND} * -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \ ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \; @${INSTALL_SCRIPT} ${WRKDIR}/mars-nomercy ${PREFIX}/bin - @${INSTALL_PROGRAM} ${WRKSRC}/mars ${PREFIX}/libexec +.if defined(WITH_OPENGL) + @${INSTALL_PROGRAM} ${WRKSRC}/mars_gl ${PREFIX}/libexec/mars +.else + @${INSTALL_PROGRAM} ${WRKSRC}/mars_sdl ${PREFIX}/libexec/mars +.endif post-install: @${CAT} ${PKGMESSAGE} diff --git a/games/marsnomercy/distinfo b/games/marsnomercy/distinfo index 7705aa3eeecc..0f23051d30ce 100644 --- a/games/marsnomercy/distinfo +++ b/games/marsnomercy/distinfo @@ -1,3 +1,3 @@ -MD5 (mars-0.1.1-src.tar.gz) = a5b70e679588775a936ebbf4b83236a6 -SHA256 (mars-0.1.1-src.tar.gz) = 9a68b6a419721ca80fb7963867647a7da10991b15e5647b27d728cea2c9aa489 -SIZE (mars-0.1.1-src.tar.gz) = 2497824 +MD5 (mars-0.1.2-src.tar.gz) = 08a4d5d5f20afaf47052ffe4d117f5e8 +SHA256 (mars-0.1.2-src.tar.gz) = aca1dd81e3e6bfffa2d1c0c78c49215be914120c18ea9fc1c31a13aac62442e3 +SIZE (mars-0.1.2-src.tar.gz) = 2450854 diff --git a/games/marsnomercy/files/patch-SConstruct b/games/marsnomercy/files/patch-SConstruct index e9e3b77f6348..e2581d1bd8b6 100644 --- a/games/marsnomercy/files/patch-SConstruct +++ b/games/marsnomercy/files/patch-SConstruct @@ -1,18 +1,19 @@ ---- SConstruct Mon Mar 6 16:56:17 2006 -+++ SConstruct Tue Mar 21 02:12:54 2006 -@@ -1,3 +1,6 @@ +--- SConstruct Mon Jul 24 18:19:52 2006 ++++ SConstruct Fri Sep 1 18:41:23 2006 +@@ -1,3 +1,5 @@ +import os +import sys -+ # create build environment and options env = Environment() opts = Options() -@@ -38,12 +41,14 @@ +@@ -40,12 +42,19 @@ # PLATFORM posix or pure cygwin else: -- -+ SDL_CONFIG = os.environ['SDL_CONFIG'] ++ # Section used for FreeBSD port ++ LOCALBASE = os.environ['LOCALBASE'] ++ X11BASE = os.environ['X11BASE'] ++ SDL_CONFIG = os.environ['SDL_CONFIG'] # determine compiler and linker flags for SDL - env.ParseConfig('sdl-config --cflags') - env.ParseConfig('sdl-config --libs') @@ -20,18 +21,55 @@ + env.ParseConfig(SDL_CONFIG + ' --libs') # add additional compiler flags - env.Append(CCFLAGS = ['-O2']) -+ env.Replace(CC = os.environ['CC']) -+ env.Replace(CXX = os.environ['CXX']) -+ env.Replace(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`') - # add additional libraries to link against - env.Append(LIBS = ['SDL_image', 'SDL_ttf']) +- ++ env.Replace(CC = os.environ['CC']) ++ env.Replace(CXX = os.environ['CXX']) ++ env.Replace(CPPPATH = [X11BASE + '/include',LOCALBASE+ '/include']) ++ env.Replace(LIBPATH = [X11BASE + '/lib',LOCALBASE+ '/lib']) ++ env.Append(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`') + + # generate help for options + Help(opts.GenerateHelpText(env)) +@@ -53,7 +62,7 @@ + + # build for debug + if int(env['debug']): +- env.Append(CCFLAGS = ['-g', '-O0']) ++ env.Append(CXXFLAGS = ['-g', '-O0']) + # of course no stripping if debug + env['strip'] = 0 + +@@ -63,20 +72,20 @@ + + # print all warnings + if int(env['warnings']): +- env.Append(CCFLAGS = ['-Wall']) ++ env.Append(CXXFLAGS = ['-Wall']) -@@ -71,7 +76,7 @@ + + # check for libraries and headers (if not cleaning) if not env.GetOption('clean'): print ":: Checking for libs" conf = Configure(env) -- if not conf.CheckLibWithHeader('libSDL', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'): -+ if not conf.CheckLibWithHeader('libSDL-1.1', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'): +- if not conf.CheckLibWithHeader('libSDL', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);', autoadd = 0): ++ if not conf.CheckLibWithHeader('libSDL-1.1', 'SDL11/SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);', autoadd = 0): print 'Did not find libSDL, exiting!' Exit(1) - if not conf.CheckLibWithHeader('libSDL_image', 'SDL_image.h', 'c', 'IMG_GetError();'): +- if not conf.CheckLibWithHeader('libSDL_image', 'SDL_image.h', 'c', 'IMG_GetError();'): ++ if not conf.CheckLibWithHeader('libSDL_image', 'SDL11/SDL_image.h', 'c', 'IMG_GetError();'): + print 'Did not find libSDL_image, exiting!' + Exit(1) +- if not conf.CheckLibWithHeader('libSDL_ttf', 'SDL_ttf.h', 'c', 'TTF_Init();'): ++ if not conf.CheckLibWithHeader('libSDL_ttf', 'SDL11/SDL_ttf.h', 'c', 'TTF_Init();'): + print 'Did not find libSDL_ttf, exiting!' + Exit(1) + if int(env['with_opengl']): +@@ -85,7 +94,7 @@ + print 'Try "scons with_opengl=no"' + Exit(1) + else: +- env.Append(CCFLAGS = ['-DWITH_OPENGL']) ++ env.Append(CXXFLAGS = ['-DWITH_OPENGL']) + env = conf.Finish() + + diff --git a/games/marsnomercy/files/patch-src-graphic_Screen.cpp b/games/marsnomercy/files/patch-src-graphic_Screen.cpp deleted file mode 100644 index e3a787d69ff5..000000000000 --- a/games/marsnomercy/files/patch-src-graphic_Screen.cpp +++ /dev/null @@ -1,36 +0,0 @@ ---- src/graphic/Screen.cpp Mon Mar 6 16:56:16 2006 -+++ src/graphic/Screen.cpp Mon Mar 20 10:38:14 2006 -@@ -17,7 +17,16 @@ - - // Setting screen mode - a_surface = SDL_SetVideoMode(a_rectangle->w, a_rectangle->h, 0, a_flags); -- -+ -+ if(!a_surface) -+ { -+ cout << "Video mode supported" << endl; -+ cout << "* 1024x768" << endl; -+ cout << "* 800x600" << endl; -+ cout << "Try: mars-nomercy <width> <height>" << endl; -+ exit(0); -+ } -+ - a_backup = NULL; - } - -@@ -38,6 +47,15 @@ - if(w != a_rectangle->w || h != a_rectangle->h) - { - a_surface = SDL_SetVideoMode(w, h, 0, a_flags); -+ -+ if(!a_surface) -+ { -+ cout << "Video mode supported" << endl; -+ cout << "* 1024x768" << endl; -+ cout << "* 800x600" << endl; -+ cout << "Try: mars-nomercy <width> <height>" << endl; -+ exit(0); -+ } - - // Setting screen dimensions - a_rectangle->w = w; diff --git a/games/marsnomercy/files/patch-src_mars.cpp b/games/marsnomercy/files/patch-src_mars.cpp deleted file mode 100644 index c422006c7239..000000000000 --- a/games/marsnomercy/files/patch-src_mars.cpp +++ /dev/null @@ -1,48 +0,0 @@ ---- src/mars.cpp Mon Mar 6 17:45:01 2006 -+++ src/mars.cpp Mon Mar 20 10:33:25 2006 -@@ -96,6 +96,21 @@ - - int main(int argc, char **argv) - { -+int r_w = 0; -+int r_h = 0; -+ -+ switch(argc) -+ { -+ case 1:r_w = 1024; -+ r_h = 768; -+ break; -+ case 3:r_w = atoi(argv[1]); -+ r_h = atoi(argv[2]); -+ break; -+ default: cout << "Use: mars-nomercy or mars-nomercy <width> <height>" <<endl; -+ exit(0); -+ } -+ - // the system video is initialized - SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER); - // init SDL_ttf -@@ -103,9 +118,9 @@ - - // when exit, execute SDL_Quit to restore everything - atexit(SDL_Quit); -- -- Dimension screen_dim = { RIS2_W, RIS2_H }; -- -+ -+ Dimension screen_dim = { r_w, r_h }; -+ - // init screen - screen = new Screen(screen_dim.w, screen_dim.h, SDL_SWSURFACE|SDL_FULLSCREEN); - -@@ -116,8 +131,8 @@ - Options opt; - - // default res is 1024 x 768 -- opt.ris.w = RIS2_W; -- opt.ris.h = RIS2_H; -+ opt.ris.w = r_w; -+ opt.ris.h = r_h; - - // start menu - menu(opt); diff --git a/games/marsnomercy/pkg-message b/games/marsnomercy/files/pkg-message.in index ca5a44a0b8d1..9d056510e85a 100644 --- a/games/marsnomercy/pkg-message +++ b/games/marsnomercy/files/pkg-message.in @@ -1,9 +1,12 @@ ############################################################################### -1) Run mars: +1) I renamed this port to marsnomercy (Mars Land of No Mercy), because exist a + port using mars name (cad/mars). + +2) Run mars: # mars-nomercy -2) Enjoy it ;) +3) Enjoy it ;) ############################################################################### |