aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
committermiwi <miwi@FreeBSD.org>2008-05-28 06:12:09 +0800
commitc486a60f04933c8227640b8faca0f931afbe32ef (patch)
tree827b6cdb889eaa1ccc00ca4598ae40dee1a42a50 /games
parent888eabb1977d6504355090d942963975c8d755ed (diff)
downloadfreebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.gz
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.tar.zst
freebsd-ports-gnome-c486a60f04933c8227640b8faca0f931afbe32ef.zip
- Add common code to support for cmake based ports.
- Update devel/cmake to 2.6.0 (also fix ports/123092) - Use the new CMAKE build framework in all ports using cmake Approved by: portmgr (pav)
Diffstat (limited to 'games')
-rw-r--r--games/blinkensisters/Makefile15
-rw-r--r--games/ksudoku/Makefile14
-rw-r--r--games/memonix/Makefile16
-rw-r--r--games/openastromenace/Makefile88
-rw-r--r--games/openastromenace/files/patch-AstroMenaceSource-Main.cpp39
-rw-r--r--games/openastromenace/files/patch-CMakeLists.txt26
-rw-r--r--games/openastromenace/pkg-plist3
-rw-r--r--games/vavoom/Makefile8
8 files changed, 98 insertions, 111 deletions
diff --git a/games/blinkensisters/Makefile b/games/blinkensisters/Makefile
index e2ea8a2a5fde..7b71af2bd5de 100644
--- a/games/blinkensisters/Makefile
+++ b/games/blinkensisters/Makefile
@@ -15,18 +15,12 @@ DISTNAME= LostPixels-${PORTVERSION}-source
MAINTAINER= amdmi3@amdmi3.ru
COMMENT= Parallax-style 2D scrolling platform game
-BUILD_DEPENDS= ${CMAKE}:${PORTSDIR}/devel/cmake
-
-CMAKE?= ${LOCALBASE}/bin/cmake
-
USE_SDL= sdl image ttf
WRKSRC= ${WRKDIR}//blinkensisters/lostpixels/game/software
+USE_CMAKE= yes
-CMAKE_DEFS= -DCMAKE_C_COMPILER:STRING="${CC}" \
- -DCMAKE_C_FLAGS:STRING="${CFLAGS} -I${LOCALBASE}/include" \
- -DCMAKE_CXX_COMPILER:STRING="${CXX}" \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS} -I${LOCALBASE}/include" \
- -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}
+CFLAGS+= -I${LOCALBASE}/include
+CXXFLAGS+= -I${LOCALBASE}/include
OPTIONS= SOUND "Build with souns support" on \
NETWORK "Build with network support" on
@@ -52,7 +46,4 @@ post-patch:
s|share/doc/blinkensisters|${DOCSDIR:S,${PREFIX}/,,}|' \
${WRKSRC}/CMakeLists.txt
-do-configure:
- cd ${WRKSRC} && ${CMAKE} . ${CMAKE_DEFS}
-
.include <bsd.port.post.mk>
diff --git a/games/ksudoku/Makefile b/games/ksudoku/Makefile
index 47d4271e8ff2..feabf986127e 100644
--- a/games/ksudoku/Makefile
+++ b/games/ksudoku/Makefile
@@ -14,20 +14,10 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= freebsd@chillt.de
COMMENT= A Sudoku generator and solver for KDE
-BUILD_DEPENDS= cmake:${PORTSDIR}/devel/cmake
-
-CMAKE_ARGS= -DCMAKE_C_COMPILER:STRING="${CC}" \
- -DCMAKE_CXX_COMPILER:STRING="${CXX}" \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS} ${PTHREAD_CFLAGS}" \
- -DCMAKE_EXE_LINKER_FLAGS:STRING="${PTHREAD_LIBS}" \
- -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX}
-
USE_KDELIBS_VER=3
USE_GMAKE= yes
USE_GL= yes
-
-do-configure:
- @cd ${WRKSRC} && \
- ${LOCALBASE}/bin/cmake ${CMAKE_ARGS}
+USE_CMAKE= yes
+CMAKE_USE_PTHREAD= yes
.include <bsd.port.mk>
diff --git a/games/memonix/Makefile b/games/memonix/Makefile
index 1cbc9bc33aa4..9cf8f9e179d5 100644
--- a/games/memonix/Makefile
+++ b/games/memonix/Makefile
@@ -18,22 +18,11 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= amdmi3@amdmi3.ru
COMMENT= Brain teasers, puzzle and memory games for kids in one pack
-BUILD_DEPENDS= ${CMAKE}:${PORTSDIR}/devel/cmake
-
-CMAKE?= ${LOCALBASE}/bin/cmake
-
+USE_CMAKE= yes
USE_ZIP= yes
USE_SDL= sdl mixer image
USE_GL= yes
-CMAKE_DEFS= -DCMAKE_EXE_LINKER_FLAGS:STRING="${LINKERFLAGS} ${PTHREAD_LIBS}" \
- -DCMAKE_THREAD_LIBS:STRING="${PTHREAD_LIBS}"\
- -DCMAKE_USE_PTHREADS:BOOL=ON \
- -DCMAKE_C_COMPILER:STRING="${CC}" \
- -DCMAKE_CXX_COMPILER:STRING="${CXX}" \
- -DCMAKE_C_FLAGS:STRING="${CFLAGS} ${PTHREAD_CFLAGS}" \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS} ${PTHREAD_CFLAGS}"
-
WRKSRC= ${WRKDIR}/MemonixSourceCode
PLIST_FILES= bin/Memonix %%DATADIR%%/gamedata.vfs
@@ -46,9 +35,6 @@ post-patch:
@${REINPLACE_CMD} -e '/strcpy(ProgrammDir,/ s|\./|${DATADIR}/|' \
${WRKSRC}/src/Main.cpp
-do-configure:
- cd ${WRKSRC} && ${CMAKE} . ${CMAKE_DEFS}
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Memonix ${PREFIX}/bin
${MKDIR} ${DATADIR}
diff --git a/games/openastromenace/Makefile b/games/openastromenace/Makefile
index a19724631726..0df35bad34ae 100644
--- a/games/openastromenace/Makefile
+++ b/games/openastromenace/Makefile
@@ -7,90 +7,54 @@
PORTNAME= openastromenace
PORTVERSION= 1.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= games
MASTER_SITES= SF
+DISTFILES= oamenace-src-${PORTVERSION}${EXTRACT_SUFX} \
+ oamenace-data-${PORTVERSION}${EXTRACT_SUFX} \
+ oamenace-lang-${LANGPACK}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= proler@gmail.com
COMMENT= Hardcore 3D space shooter with spaceship upgrade possibilities
+LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis \
+ jpeg:${PORTSDIR}/graphics/jpeg \
+ openal:${PORTSDIR}/audio/openal \
+ alut:${PORTSDIR}/audio/freealut
+
USE_BZIP2= yes
-USE_GL= yes
+USE_GL= gl glu
WANT_SDL= yes
USE_SDL= sdl
+USE_CMAKE= yes
-CMAKE_ARGS= -DCMAKE_BUILD_TYPE:STRING=Release \
- -DCMAKE_C_COMPILER:STRING='${CC}' \
- -DCMAKE_CXX_COMPILER:STRING=${CXX} \
- -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
- -DCMAKE_INSTALL_PREFIX=${PREFIX}
-
-SUB_FILES= pkg-message
-
-BUILD_DEPENDS+= ${LOCALBASE}/bin/cmake:${PORTSDIR}/devel/cmake \
-
-LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis \
- jpeg:${PORTSDIR}/graphics/jpeg \
- openal:${PORTSDIR}/audio/openal \
- alut:${PORTSDIR}/audio/freealut \
-
-OPTIONS= SRC "build src" on \
- DATA "install data file" on \
- EN " en lang" on \
- DE " de lang " on \
- RU " ru lang " on \
+OPTIONS= EN "English language pack" on \
+ DE "German language pack" off \
+ RU "Russian language pack" off
.include <bsd.port.pre.mk>
-.undef DISTFILES
-.if defined(WITH_SRC)
-DISTFILES+=oamenace-src-${PORTVERSION}.tar.bz2
+.if !defined(WITHOUT_EN)
+LANGPACK= en
+.elif defined(WITH_DE)
+LANGPACK= de
+.elif defined(WITH_RU)
+LANGPACK= ru
.else
-NO_BUILD= yes
-.endif
-.if defined(WITH_DATA)
-DISTFILES+=oamenace-data-${PORTVERSION}.tar.bz2
-.endif
-.if defined(WITH_EN)
-DISTFILES+=oamenace-lang-en-${PORTVERSION}.tar.bz2
-.endif
-.if defined(WITH_DE)
-DISTFILES+=oamenace-lang-de-${PORTVERSION}.tar.bz2
-.endif
-.if defined(WITH_RU)
-DISTFILES+=oamenace-lang-ru-${PORTVERSION}.tar.bz2
+IGNORE= cannot be build without/with multiple language packs. Please rerun 'make config' and select single language pack
.endif
-do-configure:
-.if defined(WITH_SRC)
- @(cd ${WRKSRC}; \
- ${LOCALBASE}/bin/cmake ${CMAKE_ARGS} ${PATCH_WRKSRC})
-.endif
+post-patch:
+ ${REINPLACE_CMD} -e 's|/usr/local/share/openastromenace|${DATADIR}|' \
+ ${WRKSRC}/AstroMenaceSource/Main.cpp
do-install:
-.if defined(WITH_SRC)
${INSTALL_PROGRAM} ${WRKSRC}/AstroMenace ${PREFIX}/bin
-.endif
${MKDIR} ${DATADIR}
-.if defined(WITH_DATA)
${INSTALL_DATA} ${WRKDIR}/gamedata.vfs ${DATADIR}/
${MKDIR} ${DATADIR}/DATA/SCRIPT
${INSTALL_DATA} ${WRKDIR}/DATA/SCRIPT/* ${DATADIR}/DATA/SCRIPT
-.endif
-.if defined(WITH_EN)
- ${INSTALL_DATA} ${WRKDIR}/gamelang_en.vfs ${DATADIR}/
- ${LN} -sf ${DATADIR}/gamelang_en.vfs ${DATADIR}/gamelang.vfs
-.endif
-.if defined(WITH_DE)
- ${INSTALL_DATA} ${WRKDIR}/gamelang_de.vfs ${DATADIR}/
- ${LN} -sf ${DATADIR}/gamelang_de.vfs ${DATADIR}/gamelang.vfs
-.endif
-.if defined(WITH_RU)
- ${INSTALL_DATA} ${WRKDIR}/gamelang_ru.vfs ${DATADIR}/
- ${LN} -sf ${DATADIR}/gamelang_ru.vfs ${DATADIR}/gamelang.vfs
-.endif
-
-post-install:
- @${CAT} ${PKGMESSAGE}
+ ${INSTALL_DATA} ${WRKDIR}/gamelang_${LANGPACK}.vfs \
+ ${DATADIR}/gamelang.vfs
.include <bsd.port.post.mk>
diff --git a/games/openastromenace/files/patch-AstroMenaceSource-Main.cpp b/games/openastromenace/files/patch-AstroMenaceSource-Main.cpp
new file mode 100644
index 000000000000..694ff12fa93f
--- /dev/null
+++ b/games/openastromenace/files/patch-AstroMenaceSource-Main.cpp
@@ -0,0 +1,39 @@
+--- AstroMenaceSource/Main.cpp.orig 2007-09-23 00:51:32.000000000 +0400
++++ AstroMenaceSource/Main.cpp 2008-05-19 04:59:05.387115362 +0400
+@@ -312,35 +312,7 @@
+ const char* key = "HOME";
+ const char* homeval = getenv(key);
+
+- bool dirpresent = false;
+- for (int i=1; i<argc; i++)
+- {
+- if (!strncmp(argv[i], "--dir=", sizeof("--dir")))
+- {
+- dirpresent = true;
+- // если передали относительный путь в папку пользователя с тильдой
+- if (argv[i][6] != '~')
+- strncpy(ProgrammDir, argv[i]+strlen("--dir="), strlen(argv[i])-strlen("--dir=")+1);
+- else
+- {
+- strcpy(ProgrammDir, homeval);// -1, это тильда... а в кол-ве нет, т.к. /0 там должен остаться
+- strncat(ProgrammDir, argv[i]+strlen("--dir=")+1, strlen(argv[i])-strlen("--dir="));
+- }
+- // если в конце нет слеша - ставим его
+- if (ProgrammDir[strlen(ProgrammDir)-1] != '/')
+- strncat(ProgrammDir, "/", strlen("/"));
+-
+- }
+- }
+- if (!dirpresent)
+- {
+- strcpy(ProgrammDir, argv[0]);
+- char* s = strrchr(ProgrammDir,'/');
+- if (s) s[0]=0x0;
+- const char *Fi = "/";
+- strcat( ProgrammDir, Fi );
+- }
+-
++ strcpy(ProgrammDir, "/usr/local/share/openastromenace/");
+
+ strcpy(ScreenshotDir, homeval);
+ strcat(ScreenshotDir, "/Desktop/AstroMenaceScreenshot");
diff --git a/games/openastromenace/files/patch-CMakeLists.txt b/games/openastromenace/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..581b17f0bc30
--- /dev/null
+++ b/games/openastromenace/files/patch-CMakeLists.txt
@@ -0,0 +1,26 @@
+--- CMakeLists.txt.orig 2007-09-23 00:51:32.000000000 +0400
++++ CMakeLists.txt 2008-05-19 04:24:59.253802609 +0400
+@@ -12,6 +12,8 @@
+ # into current directory and run ./AstroMenace
+ #
+
++CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
++
+ # project name
+ PROJECT(AstroMenace)
+
+@@ -34,9 +36,12 @@
+ FILE(GLOB_RECURSE astromenace_SRCS AstroMenaceSource/*.cpp)
+
+ # targets
+-ADD_DEFINITIONS(`${SDL_CONFIG} --cflags` -g -Wall)
++EXEC_PROGRAM(${SDL_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE SDL_CFLAGS)
++EXEC_PROGRAM(${SDL_CONFIG} ARGS "--libs" OUTPUT_VARIABLE SDL_LIBS)
++
++ADD_DEFINITIONS(${SDL_CFLAGS})
+ ADD_EXECUTABLE(AstroMenace ${astromenace_SRCS})
+-TARGET_LINK_LIBRARIES(AstroMenace `${SDL_CONFIG} --libs` ${OPENGL_gl_LIBRARY} ${OPENAL_LIBRARY} ${JPEG_LIBRARY} ${GLU_LIBRARY} -lalut -lvorbis -lvorbisfile)
++TARGET_LINK_LIBRARIES(AstroMenace ${SDL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENAL_LIBRARY} ${JPEG_LIBRARY} ${GLU_LIBRARY} -lalut -lvorbis -lvorbisfile)
+ IF(CYGWIN)
+ TARGET_LINK_LIBRARIES(AstroMenace -lGL.dll -lGLU.dll -lglfw -lX11.dll)
+ # ADD_DEFINITIONS(-mno-cygwin)
diff --git a/games/openastromenace/pkg-plist b/games/openastromenace/pkg-plist
index 5eb89039b384..79c47d860958 100644
--- a/games/openastromenace/pkg-plist
+++ b/games/openastromenace/pkg-plist
@@ -24,9 +24,6 @@ bin/AstroMenace
%%DATADIR%%/DATA/SCRIPT/my_aimode_7.xml
%%DATADIR%%/gamedata.vfs
%%DATADIR%%/gamelang.vfs
-%%DATADIR%%/gamelang_de.vfs
-%%DATADIR%%/gamelang_en.vfs
-%%DATADIR%%/gamelang_ru.vfs
@dirrm %%DATADIR%%/DATA/SCRIPT
@dirrm %%DATADIR%%/DATA
@dirrm %%DATADIR%%
diff --git a/games/vavoom/Makefile b/games/vavoom/Makefile
index 114d869802c9..9b331790b2ec 100644
--- a/games/vavoom/Makefile
+++ b/games/vavoom/Makefile
@@ -13,14 +13,11 @@ MASTER_SITES= SF
MAINTAINER= alepulver@FreeBSD.org
COMMENT= Doom, Doom II, Heretic, Hexen and Strife source port
-BUILD_DEPENDS= cmake:${PORTSDIR}/devel/cmake
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png
USE_BZIP2= yes
-CMAKE_ARGS= -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
- -DCMAKE_C_COMPILER:STRING="${CC}" \
- -DCMAKE_CXX_COMPILER:STRING="${CXX}"
+USE_CMAKE= yes
OPTIONS= ALLEGRO "Use Allegro for hardware API" off \
FLAC "Enable FLAC support" off \
@@ -129,9 +126,6 @@ post-patch:
@${REINPLACE_CMD} -e 's|$$\* $${IWADDIR}|-iwaddir ${DMDIR} $$*|' \
${WRKSRC}/source/CMakeLists.txt
-pre-build:
- @cd ${WRKSRC} && cmake ${CMAKE_ARGS} .
-
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}