diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2010-04-05 22:44:54 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2010-04-05 22:44:54 +0800 |
commit | e755e00cbcb718d0698e26e41253632d48c6d579 (patch) | |
tree | 7e9905f512a1f9a3c54a5819bb198d7288ebfafa | |
parent | aadeae1bcb77377eb05c6323cc33cad453ac2aeb (diff) | |
download | freebsd-ports-gnome-e755e00cbcb718d0698e26e41253632d48c6d579.tar.gz freebsd-ports-gnome-e755e00cbcb718d0698e26e41253632d48c6d579.tar.zst freebsd-ports-gnome-e755e00cbcb718d0698e26e41253632d48c6d579.zip |
- Fix build on STABLE & CURRENT
PR: 145271
Submitted by: Rusty Nejdl <rnejdl@ringofsaturn.com>
-rw-r--r-- | games/vegastrike/Makefile | 5 | ||||
-rw-r--r-- | games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp | 38 | ||||
-rw-r--r-- | games/vegastrike/files/extra-patch-src-vsfilesystem.cpp | 29 |
3 files changed, 72 insertions, 0 deletions
diff --git a/games/vegastrike/Makefile b/games/vegastrike/Makefile index caab4db89b55..90e840e6de96 100644 --- a/games/vegastrike/Makefile +++ b/games/vegastrike/Makefile @@ -56,6 +56,11 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libOgreMain.so:${PORTSDIR}/graphics/ogre3d RUN_DEPENDS+= ${LOCALBASE}/lib/libOgreMain.so:${PORTSDIR}/graphics/ogre3d .endif +.if (${OSVERSION} >= 800501 && ${OSVERSION} < 900000) || ${OSVERSION} >= 900006 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-cmd-basecomputer.cpp \ + ${FILESDIR}/extra-patch-src-vsfilesystem.cpp +.endif + post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g; \ s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/configure diff --git a/games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp b/games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp new file mode 100644 index 000000000000..9f690be05f01 --- /dev/null +++ b/games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp @@ -0,0 +1,38 @@ +--- src/cmd/basecomputer.cpp.orig 2008-04-24 16:12:27.000000000 +0400 ++++ src/cmd/basecomputer.cpp 2010-04-03 08:25:45.000000000 +0400 +@@ -3099,7 +3099,7 @@ + // Make the title right. + recalcTitle(); + } +-#if defined (__FreeBSD__) || defined(__APPLE__) ++#if defined(__APPLE__) + static int nodirs( struct dirent * entry) + #else + static int nodirs( const struct dirent * entry) +@@ -3128,14 +3128,12 @@ + return 0; + } + +-static int datesort ( const void *v1, const void *v2 ) { +- const struct dirent *d1=*(const struct dirent**)v1; +- const struct dirent *d2=*(const struct dirent**)v2; ++static int datesort ( const struct dirent **d1, const struct dirent **d2 ) { + struct stat s1, s2; +- std::string tmp=VSFileSystem::homedir+"/save/"+d1->d_name; ++ std::string tmp=VSFileSystem::homedir+"/save/"+(*d1)->d_name; + if (stat(tmp.c_str(), &s1)) + return 0; +- tmp=VSFileSystem::homedir+"/save/"+d2->d_name; ++ tmp=VSFileSystem::homedir+"/save/"+(*d2)->d_name; + if (stat(tmp.c_str(), &s2)) + return 0; + +@@ -3160,7 +3158,7 @@ + const int playerNum=UnitUtil::isPlayerStarship(playerUnit); + struct dirent ** dirlist; + std::string savedir = VSFileSystem::homedir+"/save/"; +- int ret = scandir (savedir.c_str(),&dirlist,nodirs,(scancompare)&datesort); ++ int ret = scandir (savedir.c_str(),&dirlist,nodirs,datesort); + while( ret-->0) { + picker->addCell(new SimplePickerCell(dirlist[ret]->d_name)); + } diff --git a/games/vegastrike/files/extra-patch-src-vsfilesystem.cpp b/games/vegastrike/files/extra-patch-src-vsfilesystem.cpp new file mode 100644 index 000000000000..574ee6de75cc --- /dev/null +++ b/games/vegastrike/files/extra-patch-src-vsfilesystem.cpp @@ -0,0 +1,29 @@ +--- src/vsfilesystem.cpp.orig 2008-04-24 16:12:39.000000000 +0400 ++++ src/vsfilesystem.cpp 2010-04-04 05:19:55.000000000 +0400 +@@ -77,7 +77,7 @@ + + string selectcurrentdir; + +-#if defined (__FreeBSD__) || defined(__APPLE__) ++#if defined(__APPLE__) + int selectdirs( struct dirent * entry) + #else + int selectdirs( const struct dirent * entry) +@@ -106,7 +106,7 @@ + return 0; + } + +-#if defined (__FreeBSD__) || defined(__APPLE__) ++#if defined(__APPLE__) + int selectpk3s( struct dirent * entry) + #else + int selectpk3s( const struct dirent * entry) +@@ -118,7 +118,7 @@ + return 0; + } + +-#if defined (__FreeBSD__) || defined(__APPLE__) ++#if defined(__APPLE__) + int selectbigpk3s( struct dirent * entry) + #else + int selectbigpk3s( const struct dirent * entry) |