FreeBSD Bugzilla – Attachment 125342 Details for
Bug 168957
Update port games/vegastrike to 0.5.1.r1 and fix png
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 16.62 KB, created by
rnejdl
on 2012-06-11 19:10:11 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
rnejdl
Created:
2012-06-11 19:10:11 UTC
Size:
16.62 KB
patch
obsolete
>diff -ruN vegastrike/Makefile vegastrike.new/Makefile >--- vegastrike/Makefile 2012-06-01 07:34:16.000000000 -0500 >+++ vegastrike.new/Makefile 2012-06-11 12:38:37.000000000 -0500 >@@ -6,11 +6,10 @@ > # > > PORTNAME= vegastrike >-PORTVERSION= 0.5.0 >-PORTREVISION= 17 >+PORTVERSION= 0.5.1.r1 > CATEGORIES= games >-MASTER_SITES= SF/${PORTNAME}/OldFiles >-DISTNAME= vegastrike-source-${PORTVERSION} >+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/0.5.1/ >+DISTNAME= vegastrike-src-${PORTVERSION} > > MAINTAINER= amdmi3@FreeBSD.org > COMMENT= Opensource 3D space simulator >@@ -30,7 +29,7 @@ > USE_GNOME= gtk20 > CPPFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib >-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} >+WRKSRC= ${WRKDIR}/${PORTNAME}-src-${PORTVERSION} > MAKE_JOBS_SAFE= yes > > # cegui and ffmpeg are not used yet >@@ -56,11 +55,6 @@ > 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 -ruN vegastrike/distinfo vegastrike.new/distinfo >--- vegastrike/distinfo 2011-07-04 16:28:59.000000000 -0500 >+++ vegastrike.new/distinfo 2012-06-11 10:21:43.000000000 -0500 >@@ -1,2 +1,2 @@ >-SHA256 (vegastrike-source-0.5.0.tar.bz2) = e4fe2aeeece103d87ae11ca8b27e48b72cc7ed8a0c1bed44e7131afd644fde72 >-SIZE (vegastrike-source-0.5.0.tar.bz2) = 9093178 >+SHA256 (vegastrike-src-0.5.1.r1.tar.bz2) = 5ef8bc4906746183f3b13fe7054fa37dee7672cf5749d1044ea511a85d2af125 >+SIZE (vegastrike-src-0.5.1.r1.tar.bz2) = 10875771 >diff -ruN vegastrike/files/extra-patch-src-cmd-basecomputer.cpp vegastrike.new/files/extra-patch-src-cmd-basecomputer.cpp >--- vegastrike/files/extra-patch-src-cmd-basecomputer.cpp 2010-04-05 09:44:54.000000000 -0500 >+++ vegastrike.new/files/extra-patch-src-cmd-basecomputer.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,38 +0,0 @@ >---- 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 -ruN vegastrike/files/extra-patch-src-vsfilesystem.cpp vegastrike.new/files/extra-patch-src-vsfilesystem.cpp >--- vegastrike/files/extra-patch-src-vsfilesystem.cpp 2010-04-05 09:44:54.000000000 -0500 >+++ vegastrike.new/files/extra-patch-src-vsfilesystem.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,29 +0,0 @@ >---- 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) >diff -ruN vegastrike/files/patch-objconv-basemaker-base_maker_texture.cpp vegastrike.new/files/patch-objconv-basemaker-base_maker_texture.cpp >--- vegastrike/files/patch-objconv-basemaker-base_maker_texture.cpp 2010-03-31 23:59:04.000000000 -0500 >+++ vegastrike.new/files/patch-objconv-basemaker-base_maker_texture.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,20 +0,0 @@ >---- objconv/basemaker/base_maker_texture.cpp.orig 2008-04-24 14:12:53.000000000 +0200 >-+++ objconv/basemaker/base_maker_texture.cpp 2010-04-01 06:40:29.000000000 +0200 >-@@ -73,7 +73,7 @@ >- png_set_palette_to_rgb(png_ptr); >- >- if (ctype == PNG_COLOR_TYPE_GRAY && data->bpp < 8) >-- png_set_gray_1_2_4_to_8(png_ptr); >-+ png_set_expand_gray_1_2_4_to_8(png_ptr); >- >- png_set_expand (png_ptr); >- png_read_update_info (png_ptr,info_ptr); >-@@ -211,7 +211,7 @@ >- unsigned char sig[8]; >- fread(sig, sizeof(char), 8, fp); >- fseek(fp,0,SEEK_SET); >-- if (png_check_sig(sig, 8)) { >-+ if (!png_sig_cmp(sig, 0, 8)) { >- return FORMAT_PNG; >- } >- } >diff -ruN vegastrike/files/patch-setup-src-c-setup.cpp vegastrike.new/files/patch-setup-src-c-setup.cpp >--- vegastrike/files/patch-setup-src-c-setup.cpp 2008-05-24 13:40:32.000000000 -0500 >+++ vegastrike.new/files/patch-setup-src-c-setup.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,173 +0,0 @@ >---- setup/src/c/setup.cpp.orig 2008-04-24 16:16:49.000000000 +0400 >-+++ setup/src/c/setup.cpp 2008-05-08 16:55:40.000000000 +0400 >-@@ -25,6 +25,7 @@ >- #include <stdio.h> >- #include <unistd.h> >- #include <pwd.h> >-+#include <sys/stat.h> >- #include <sys/types.h> >- >- #endif >-@@ -33,6 +34,57 @@ >- using std::string; >- using std::vector; >- char origpath[65536]; >-+ >-+static void changeToProgramDirectory(char *argv0) { >-+ int ret = -1; /* Should it use argv[0] directly? */ >-+ char *program = argv0; >-+#ifndef _WIN32 >-+ char buf[65536]; >-+ { >-+ char linkname[128]; /* /proc/<pid>/exe */ >-+ linkname[0]='\0'; >-+ pid_t pid; >-+ >-+ /* Get our PID and build the name of the link in /proc */ >-+ pid = getpid(); >-+ >-+ sprintf(linkname, "/proc/%d/exe", pid); >-+ ret = readlink(linkname, buf, 65535); >-+ if (ret <= 0) { >-+ sprintf(linkname, "/proc/%d/file", pid); >-+ ret = readlink(linkname, buf, 65535); >-+ } >-+ if (ret <= 0) { >-+ ret = readlink(program, buf, 65535); >-+ } >-+ if (ret > 0) { >-+ buf[ret]='\0'; >-+ /* Ensure proper NUL termination */ >-+ program = buf; >-+ } >-+ } >-+#endif >-+ >-+ char *parentdir; >-+ int pathlen=strlen(program); >-+ parentdir=new char[pathlen+1]; >-+ char *c; >-+ strncpy ( parentdir, program, pathlen+1 ); >-+ c = (char*) parentdir; >-+ while (*c != '\0') /* go to end */ >-+ c++; >-+ >-+ while ((*c != '/')&&(*c != '\\')&&c>parentdir) /* back up to parent */ >-+ c--; >-+ >-+ *c = '\0'; /* cut off last part (binary name) */ >-+ if (strlen (parentdir)>0) { >-+ chdir (parentdir);/* chdir to the binary app's parent */ >-+ } >-+ delete []parentdir; >-+} >-+ >-+ >- #if defined(_WINDOWS)&&defined(_WIN32) >- typedef char FileNameCharType [65536]; >- int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShowCmd) { >-@@ -44,20 +96,21 @@ >- #else >- int main(int argc, char *argv[]) { >- #endif >--#if 1 >--//def _WIN32 >-+ >-+ if (argc>1) { >-+ if (strcmp(argv[1], "--target")==0 && argc>2) { >-+ chdir(argv[2]); >-+ } else { >-+ fprintf(stderr,"Usage: vssetup [--target DATADIR]\n"); >-+ return 1; >-+ } >-+ } >- getcwd (origpath,65535); >- origpath[65535]=0; >-- int i; >-- for (i=strlen(argv[0]);argv[0][i]!='\\'&&argv[0][i]!='/'&&i>=0;i--) { >-- } >-- argv[0][i+1]='\0'; >-- if (i>=0) { >-- chdir(argv[0]); >-- } >--#endif >- >-- { >-+ changeToProgramDirectory(argv[0]); >-+ >-+ { >- vector<string> data_paths; >- #ifdef DATA_DIR >- data_paths.push_back( DATA_DIR); >-@@ -69,6 +122,7 @@ >- data_paths.push_back( string(origpath)+"/data4.x"); >- data_paths.push_back( string(origpath)+"/data"); >- data_paths.push_back( string(origpath)+"/../data"); >-+ data_paths.push_back( string(origpath)+"/../Resources"); >- getcwd (origpath,65535); >- origpath[65535]=0; >- data_paths.push_back( "."); >-@@ -79,6 +133,8 @@ >- data_paths.push_back( "../../data"); >- data_paths.push_back( "../Resources"); >- data_paths.push_back( "../Resources/data"); >-+ data_paths.push_back( "../Resources/data4.x"); >-+/* >- data_paths.push_back( "/usr/share/local/vegastrike/data"); >- data_paths.push_back( "/usr/local/share/vegastrike/data"); >- data_paths.push_back( "/usr/local/vegastrike/data"); >-@@ -86,7 +142,6 @@ >- data_paths.push_back( "/usr/local/games/vegastrike/data"); >- data_paths.push_back( "/usr/games/vegastrike/data"); >- data_paths.push_back( "/opt/share/vegastrike/data"); >-- data_paths.push_back( "../Resources/data4.x"); >- data_paths.push_back( "/usr/share/local/vegastrike/data4.x"); >- data_paths.push_back( "/usr/local/share/vegastrike/data4.x"); >- data_paths.push_back( "/usr/local/vegastrike/data4.x"); >-@@ -94,7 +149,7 @@ >- data_paths.push_back( "/usr/local/games/vegastrike/data4.x"); >- data_paths.push_back( "/usr/games/vegastrike/data4.x"); >- data_paths.push_back( "/opt/share/vegastrike/data4.x"); >-- >-+*/ >- // Win32 data should be "." >- char tmppath[16384]; >- for( vector<string>::iterator vsit=data_paths.begin(); vsit!=data_paths.end(); vsit++) >-@@ -118,8 +173,8 @@ >- #ifndef _WIN32 >- struct passwd *pwent; >- pwent = getpwuid (getuid()); >-- string HOMESUBDIR=".vegastrike"; >- >-+ string HOMESUBDIR; >- FILE *version=fopen("Version.txt","r"); >- if (!version) >- version=fopen("../Version.txt","r"); >-@@ -135,13 +190,23 @@ >- if (hsd.length()) { >- HOMESUBDIR=hsd; >- //fprintf (STD_OUT,"Using %s as the home directory\n",hsd.c_str()); >-- } >-+ } >-+ } >-+ if (HOMESUBDIR.empty()) { >-+ fprintf(stderr,"Error: Failed to find Version.txt anywhere.\n"); >-+ return 1; >- } >- chdir (pwent->pw_dir); >-- chdir (HOMESUBDIR.c_str()); >-+ >-+ mkdir(HOMESUBDIR.c_str() >-+#ifndef _WIN32 >-+ , 0755 >- #endif >--#ifdef GTK >--#endif //GTK >-+ ); >-+ >-+#endif >-+ chdir (HOMESUBDIR.c_str()); >-+ >- Start(&argc,&argv); >- #if defined(_WINDOWS)&&defined(_WIN32) >- delete []argv0; >diff -ruN vegastrike/files/patch-setup-src-include-file.cpp vegastrike.new/files/patch-setup-src-include-file.cpp >--- vegastrike/files/patch-setup-src-include-file.cpp 2008-05-24 13:40:32.000000000 -0500 >+++ vegastrike.new/files/patch-setup-src-include-file.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,71 +0,0 @@ >---- setup/src/include/file.cpp.orig 2008-04-24 16:16:50.000000000 +0400 >-+++ setup/src/include/file.cpp 2008-05-09 04:41:07.000000000 +0400 >-@@ -15,6 +15,8 @@ >- * * >- **************************************************************************/ >- #include <string> >-+#include <sys/stat.h> >-+ >- using std::string; >- #include "file.h" >- extern char origpath[65536]; >-@@ -98,6 +100,17 @@ >- string mangle_config (string config) { >- return string(origpath)+string("/")+config; >- } >-+ >-+bool useGameConfig(void) { >-+ struct stat st1,st2; >-+ if (stat(CONFIG.config_file, &st1)==0 && stat(mangle_config(CONFIG.config_file).c_str(), &st2)==0) { >-+ if (st2.st_mtime > st1.st_mtime) { >-+ return true; >-+ } >-+ } >-+ return false; >-+} >-+ >- void LoadConfig(void) { >- FILE *fp; >- char line[MAX_READ+1]; >-@@ -108,8 +121,7 @@ >- G_CURRENT = &GROUPS; >- C_CURRENT = &CATS; >- >-- >-- if ((fp = fopen(CONFIG.config_file, "r")) == NULL) { >-+ if (useGameConfig() || (fp = fopen(CONFIG.config_file, "r")) == NULL) { >- origconfig=true; >- if ((fp = fopen(mangle_config(CONFIG.config_file).c_str(), "r")) == NULL) { >- fprintf (stderr, "Unable to read from %s\n", CONFIG_FILE ); >-@@ -185,7 +197,8 @@ >- char *p, *parm, *n_parm, *start_write, *end_write; >- int commenting = 0; // 0 if scanning, 1 if adding comments, 2 if removing comments >- int skip; >-- if ((rp = fopen(CONFIG.config_file, "r")) == NULL) { >-+ >-+ if (useGameConfig() || (rp = fopen(CONFIG.config_file, "r")) == NULL) { >- if ((rp = fopen(mangle_config(CONFIG.config_file).c_str(), "r")) == NULL) { >- fprintf (stderr, "Unable to read from %s\n", CONFIG_FILE ); >- exit(-1); >-@@ -288,11 +301,20 @@ >- } >- } >- string tmp1 = CONFIG.config_file; >-+/* >- if(origconfig) { >- tmp1 = mangle_config (CONFIG.config_file); >- } >-+*/ >- if ((wp = fopen(tmp1.c_str(), "w")) == NULL) { >-- fprintf (stderr, "Unable to write to %s\n", CONFIG.config_file ); >-+ tmp1 = mangle_config (CONFIG.config_file); >-+ if ((wp = fopen(tmp1.c_str(), "w")) == NULL) { >-+ tmp1 = CONFIG.config_file; >-+ if ((wp = fopen(tmp1.c_str(), "w")) == NULL) { >-+ fprintf (stderr, "Unable to write to %s\n", CONFIG.config_file ); >-+ exit(1); >-+ } >-+ } >- } >- while ((p = fgets(line, MAX_READ, rp)) != NULL) { >- fprintf(wp, line); >diff -ruN vegastrike/files/patch-src-cmd-ai-docking.cpp vegastrike.new/files/patch-src-cmd-ai-docking.cpp >--- vegastrike/files/patch-src-cmd-ai-docking.cpp 2008-05-24 13:40:32.000000000 -0500 >+++ vegastrike.new/files/patch-src-cmd-ai-docking.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,9 +0,0 @@ >---- src/cmd/ai/docking.cpp.orig 2008-04-24 16:12:16.000000000 +0400 >-+++ src/cmd/ai/docking.cpp 2008-05-05 23:55:37.000000000 +0400 >-@@ -1,5 +1,5 @@ >--#include <string> >- #include "python/python_compile.h" >-+#include <string> >- #include "docking.h" >- #include "xml_support.h" >- #include "config_xml.h" >diff -ruN vegastrike/files/patch-src-cmd-collide2-opcodetypes.h vegastrike.new/files/patch-src-cmd-collide2-opcodetypes.h >--- vegastrike/files/patch-src-cmd-collide2-opcodetypes.h 2008-05-24 13:40:32.000000000 -0500 >+++ vegastrike.new/files/patch-src-cmd-collide2-opcodetypes.h 1969-12-31 18:00:00.000000000 -0600 >@@ -1,18 +0,0 @@ >---- src/cmd/collide2/opcodetypes.h.orig 2008-04-24 16:12:20.000000000 +0400 >-+++ src/cmd/collide2/opcodetypes.h 2008-05-05 23:57:08.000000000 +0400 >-@@ -198,13 +198,13 @@ >- #include <wctype.h> >- #endif >- #if !defined(CS_HAVE_WCHAR_T) && !defined(_WCHAR_T_DEFINED) >--typedef uint16 wchar_t; >-+//typedef uint16 wchar_t; >- #define _WCHAR_T_DEFINED >- #define CS_WCHAR_T_SIZE 2 >- #endif >- #if !defined(CS_HAVE_WINT_T) && !defined(_WCTYPE_T_DEFINED) && \ >- !defined(_WINT_T) >--typedef wchar_t wint_t; >-+//typedef wchar_t wint_t; >- #define _WCTYPE_T_DEFINED >- #define _WINT_T >- #endif >diff -ruN vegastrike/files/patch-src-gfx-vsimage.cpp vegastrike.new/files/patch-src-gfx-vsimage.cpp >--- vegastrike/files/patch-src-gfx-vsimage.cpp 2010-03-31 23:59:04.000000000 -0500 >+++ vegastrike.new/files/patch-src-gfx-vsimage.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,20 +0,0 @@ >---- src/gfx/vsimage.cpp.orig 2008-04-24 14:12:37.000000000 +0200 >-+++ src/gfx/vsimage.cpp 2010-03-31 16:39:55.000000000 +0200 >-@@ -147,7 +147,7 @@ >- unsigned char sig[8]; >- file->Begin(); >- file->Read(sig, 8); >-- if (!png_check_sig(sig, 8)) >-+ if (png_sig_cmp(sig, 0, 8)) >- ret = BadFormat; >- >- return ret; >-@@ -349,7 +349,7 @@ >- png_set_palette_to_rgb(png_ptr); >- >- if (this->img_color_type == PNG_COLOR_TYPE_GRAY && this->img_depth < 8) >-- png_set_gray_1_2_4_to_8(png_ptr); >-+ png_set_expand_gray_1_2_4_to_8(png_ptr); >- >- png_set_expand (png_ptr); >- png_read_update_info (png_ptr,info_ptr); >diff -ruN vegastrike/files/patch-src-python-universe_util_export.cpp vegastrike.new/files/patch-src-python-universe_util_export.cpp >--- vegastrike/files/patch-src-python-universe_util_export.cpp 2008-05-24 13:40:32.000000000 -0500 >+++ vegastrike.new/files/patch-src-python-universe_util_export.cpp 1969-12-31 18:00:00.000000000 -0600 >@@ -1,26 +0,0 @@ >---- src/python/universe_util_export.cpp.orig 2008-04-24 16:11:53.000000000 +0400 >-+++ src/python/universe_util_export.cpp 2008-05-05 23:56:04.000000000 +0400 >-@@ -3,17 +3,18 @@ >- /* ToDo: Fix so Boost 1.28 is supported */ >- #if BOOST_VERSION != 102800 >- >--#include "cmd/container.h" >--#include <string> >--#include "init.h" >--#include "gfx/vec.h" >--#include "cmd/unit_generic.h" >- #include "python_class.h" >- #if BOOST_VERSION != 102800 >- #include <boost/python.hpp> >- #else >- #include <boost/python/objects.hpp> >- #endif >-+ >-+#include "cmd/container.h" >-+#include <string> >-+#include "init.h" >-+#include "gfx/vec.h" >-+#include "cmd/unit_generic.h" >- #include "universe_util.h" >- #include "cmd/unit_util.h" >- #include "faction_generic.h" >--- vegastrike-0.5.1.r1.diff ends here ---
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 168957
:
125341
| 125342