- Fix build on STABLE & CURRENT
PR: 145271 Submitted by: Rusty Nejdl <rnejdl@ringofsaturn.com>
This commit is contained in:
parent
9b62a85259
commit
89df60b4c0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=252243
3 changed files with 72 additions and 0 deletions
|
@ -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
|
||||
|
|
38
games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp
Normal file
38
games/vegastrike/files/extra-patch-src-cmd-basecomputer.cpp
Normal file
|
@ -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));
|
||||
}
|
29
games/vegastrike/files/extra-patch-src-vsfilesystem.cpp
Normal file
29
games/vegastrike/files/extra-patch-src-vsfilesystem.cpp
Normal file
|
@ -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)
|
Loading…
Reference in a new issue