Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=ryuotesting9.git;a=commitdiff;h=559e1f88fcddf80c72ee08f6404ad5a2eda85254

commit 559e1f88fcddf80c72ee08f6404ad5a2eda85254
Author: James Buren <[email protected]>
Date:   Tue Jan 1 08:35:00 2013 -0600

smc-1.9-9-x86_64
* rebuild with boost

diff --git a/source/games-extra/smc/FrugalBuild 
b/source/games-extra/smc/FrugalBuild
index 47d37d4..911df07 100644
--- a/source/games-extra/smc/FrugalBuild
+++ b/source/games-extra/smc/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=smc
pkgver=1.9
-pkgrel=8
+pkgrel=9
pkgdesc="Secret Maryo Chronicles"
_F_sourceforge_ext=".tar.bz2"
_F_sourceforge_dirname="smclone"
@@ -11,14 +11,16 @@ _F_sourceforge_realname="Secret Maryo Chronicles"
Finclude sourceforge
url="http://www.secretmaryo.org/";
up2date="lynx -dump 
http://sourceforge.net/projects/smclone/files/Secret%20Maryo%20Chronicles/| 
grep 'http.*smclone/.*Secret%20Maryo%20Chronicles.*/$'|sed 's|.*/\(.*\)/|\1|;q' 
"
-depends=('sdlimage' 'sdl_ttf' 'sdl_gfx>=2.0.19' 'sdl_mixer' 'cegui>=0.7.7' 
'libboost>=1.49.0' 'freeglut' 'sdl' 'libglu')
+depends=('sdlimage' 'sdl_ttf' 'sdl_gfx>=2.0.19' 'sdl_mixer' 'cegui>=0.7.7-3' 
'freeglut' 'sdl' 'libglu')
rodepends=('smc-music')
-makedepends=('boost')
+makedepends=('boost>=1.50.0')
groups=('games-extra')
archs=('i686' 'x86_64')
-source=($source smc-for-cegui-v0-7.diff)
+source=(${source[@]} smc-for-cegui-v0-7.diff boost1.patch boost2.patch)
sha1sums=('9a4ec12c64378d804848357bf143755a98d14baa' \
-          'db09e10fe82525ab7e6c561748c6e44eff921834')
+          'db09e10fe82525ab7e6c561748c6e44eff921834' \
+          'b3167cfd0a78e79bee91ffac2d277b86013c7aed' \
+          '717ce366ad7c257d8a1d324180fceb5664aaf1ac')

_F_desktop_name="Secret Maryo Chronicles"
_F_desktop_icon="/usr/share/smc/icon/window_32.png"
@@ -26,15 +28,14 @@ _F_desktop_categories="Game;ArcadeGame;KidsGame;"

build() {
Fcd
-       # to remove when smc will be compatible with cegui-0.7.x
Fpatch smc-for-cegui-v0-7.diff
-       # fix for boost-1.46
-       export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=2"
+       Fpatch boost1.patch
+       patch -Np1 --binary < ../boost2.patch || Fdie
./autogen.sh || Fdie
LIBS+="-lX11 -lboost_system" ./configure --prefix=/usr || Fdie
make || Fdie
Fmakeinstall
-       Fdesktop2
+       Fdesktop2
}

# optimization OK
diff --git a/source/games-extra/smc/boost1.patch 
b/source/games-extra/smc/boost1.patch
new file mode 100644
index 0000000..a842391
--- /dev/null
+++ b/source/games-extra/smc/boost1.patch
@@ -0,0 +1,67 @@
+--- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 12:11:18.000000000 
+0200
++++ smc-1.9.new/src/core/filesystem/filesystem.cpp     2011-02-10 
13:00:42.310260022 +0100
+@@ -64,7 +64,7 @@
+
+ bool Dir_Exists( const std::string &dir )
+ {
+-      return fs::exists( fs::path( dir, fs::native ) );
++      return fs::exists( fs::path( dir ) );
+
+       /*struct stat file_info;
+
+@@ -89,7 +89,7 @@
+
+ bool Create_Directory( const std::string &dir )
+ {
+-      return fs::create_directory( fs::path( dir, fs::native ) );
++      return fs::create_directory( fs::path( dir ) );
+ }
+
+ size_t Get_File_Size( const std::string &filename )
+@@ -130,7 +130,7 @@
+ {
+       vector<std::string> valid_files;
+
+-      fs::path full_path( dir, fs::native );
++      fs::path full_path( dir );
+       fs::directory_iterator end_iter;
+
+       // load all available objects
+@@ -142,32 +142,32 @@
+                       if( fs::is_directory( *dir_itr ) )
+                       {
+                               // ignore hidden directories
+-                              if( dir_itr->path().leaf().find( "." ) == 0 )
++                              if( dir_itr->path().filename().native().find( 
"." ) == 0 )
+                               {
+                                       continue;
+                               }
+
+                               if( with_directories )
+                               {
+-                                      valid_files.push_back( dir + "/" + 
dir_itr->path().leaf() );
++                                      valid_files.push_back( 
dir_itr->path().native() );
+                               }
+
+                               // load all items from the sub-directory
+                               if( search_in_sub_directories )
+                               {
+-                                      vector<std::string> new_valid_files = 
Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, 
with_directories );
++                                      vector<std::string> new_valid_files = 
Get_Directory_Files( dir_itr->path().native(), file_type, with_directories );
+                                       valid_files.insert( valid_files.end(), 
new_valid_files.begin(), new_valid_files.end() );
+                               }
+                       }
+                       // valid file
+-                      else if( file_type.empty() || 
dir_itr->path().leaf().rfind( file_type ) != std::string::npos )
++                      else if( file_type.empty() || 
dir_itr->path().filename().native().rfind( file_type ) != std::string::npos )
+                       {
+-                              valid_files.push_back( dir + "/" + 
dir_itr->path().leaf() );
++                              valid_files.push_back( dir_itr->path().native() 
);
+                       }
+               }
+               catch( const std::exception &ex )
+               {
+-                      printf( "%s %s\n", dir_itr->path().leaf().c_str(), 
ex.what() );
++                      printf( "%s %s\n", dir_itr->path().filename().c_str(), 
ex.what() );
+               }
+       }
diff --git a/source/games-extra/smc/boost2.patch 
b/source/games-extra/smc/boost2.patch
new file mode 100644
index 0000000..70c0e06
--- /dev/null
+++ b/source/games-extra/smc/boost2.patch
@@ -0,0 +1,51 @@
+--- smc-1.9/src/overworld/world_manager.cpp    2009-08-16 18:44:52.000000000 
+0200
++++ smc-1.9.new/src/overworld/world_manager.cpp        2011-02-10 
13:04:19.029260001 +0100
+@@ -111,14 +111,14 @@
+ void cOverworld_Manager :: Load_Dir( const std::string &dir, bool user_dir /* 
= 0 */ )
+ {
+       // set world directory
+-      fs::path full_path( dir, fs::native );
++      fs::path full_path( dir );
+       fs::directory_iterator end_iter;
+
+       for( fs::directory_iterator dir_itr( full_path ); dir_itr != end_iter; 
++dir_itr )
+       {
+               try
+               {
+-                      std::string current_dir = dir_itr->path().leaf();
++                      std::string current_dir = 
dir_itr->path().filename().native();
+
+                       // only directories with an existing description
+                       if( fs::is_directory( *dir_itr ) && File_Exists( dir + 
"/" + current_dir + "/description.xml" ) )
+@@ -145,7 +145,7 @@
+               }
+               catch( const std::exception &ex )
+               {
+-                      printf( "%s %s\n", dir_itr->path().leaf().c_str(), 
ex.what() );
++                      printf( "%s %s\n", dir_itr->path().filename().c_str(), 
ex.what() );
+               }
+       }
+ }
+Only in smc-1.9.new/src: utilities.o
+Only in smc-1.9.new/src: vector.o
+diff -ur smc-1.9/src/video/video.cpp smc-1.9.new/src/video/video.cpp
+--- smc-1.9/src/video/video.cpp        2011-02-10 13:06:45.880260001 +0100
++++ smc-1.9.new/src/video/video.cpp    2011-02-10 13:06:25.319259961 +0100
+@@ -735,7 +735,7 @@
+               {
+                       try
+                       {
+-                              fs::remove_all( fs::path( m_imgcache_dir, 
fs::native ) );
++                              fs::remove_all( fs::path( m_imgcache_dir ) );
+                       }
+                       // could happen if a file is locked or we have no write 
rights
+                       catch( const std::exception &ex )
+@@ -757,7 +757,7 @@
+       // no cache available
+       if( !Dir_Exists( imgcache_dir_active ) )
+       {
+-              fs::create_directories( fs::path( imgcache_dir_active + "/" 
GAME_PIXMAPS_DIR, fs::native ) );
++              fs::create_directories( fs::path( imgcache_dir_active + "/" 
GAME_PIXMAPS_DIR ) );
+       }
+       // cache available
+       else
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to