Here's the patch I applied to Ubuntu to get this package to build from smc git head.
=== modified file 'debian/changelog' --- debian/changelog 2011-09-18 22:03:34 +0000 +++ debian/changelog 2012-02-23 14:59:43 +0000 @@ -1,3 +1,19 @@ +smc (1.9+git20120222-0ubuntu1) precise; urgency=low + + * New upstream snapshot. Fixes FTBFS. (LP: #903126) + - debian/control: Add libboost-thread-dev to B-D + - debian/patches/01_configure.ac.patch: Search for boost_filesystem-mt + instead of boost_filesystem (as required by patch in previous Debian + version of the package). Also search for boost_system so that this + library gets added to the linker line. + - debian/patches: Remove as unnecessary 01_configure.patch, + 02_binutils-gold.patch, 03_smc_boost1.46.patch + - debian/rules: Add get-orig-source rule to check out smc from git. + Add post-patches rule to run autogen.sh after applying the + configure.ac patches. + + -- Barry Warsaw <ba...@ubuntu.com> Wed, 22 Feb 2012 17:14:50 -0500 + smc (1.9-4ubuntu1) oneiric; urgency=low * Update 02_binutils-gold.patch to properly use LDADD. Fixes FTBFS. === modified file 'debian/control' --- debian/control 2011-09-18 22:03:34 +0000 +++ debian/control 2012-02-22 23:01:11 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> XSBC-Original-Maintainer: Muammar El Khatib <muam...@debian.org> -Build-Depends: cdbs, debhelper (>= 6), autotools-dev, libcegui-mk2-dev (>= 0.6.2), libboost-filesystem-dev, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev, pkg-config, quilt (>= 0.40), ttf-dejavu +Build-Depends: cdbs, debhelper (>= 6), autotools-dev, libcegui-mk2-dev (>= 0.6.2), libboost-filesystem-dev, libboost-thread-dev, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev, pkg-config, quilt (>= 0.40), ttf-dejavu Standards-Version: 3.9.1 Homepage: http://www.secretmaryo.org === added file 'debian/patches/01_configure.ac.patch' --- debian/patches/01_configure.ac.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/01_configure.ac.patch 2012-02-23 14:43:19 +0000 @@ -0,0 +1,23 @@ +Author: Barry Warsaw <ba...@ubuntu.com> +Description: A patch to change configure.ac file to recognize libboost. +--- a/configure.ac ++++ b/configure.ac +@@ -19,13 +19,17 @@ + ### Check for libraries ### + + # Check for the Boost Filesystem library +-AC_CHECK_LIB([boost_filesystem], [main], , ++AC_CHECK_LIB([boost_filesystem-mt], [main], , + [AC_MSG_ERROR([Unable to find Boost Filesystem library])]) + + # Check for the Boost Thread library + AC_CHECK_LIB([boost_thread], [main], , + [AC_MSG_ERROR([Unable to find Boost Thread library])]) + ++# Check for the Boost System library ++AC_CHECK_LIB([boost_system], [main], , ++ [AC_MSG_ERROR([Unable to find Boost System library])]) ++ + # Check for the OpenGL and GLU library + case "${host}" in + *darwin*|*macosx*) === removed file 'debian/patches/01_configure.patch' --- debian/patches/01_configure.patch 2011-08-20 20:18:07 +0000 +++ debian/patches/01_configure.patch 1970-01-01 00:00:00 +0000 @@ -1,30 +0,0 @@ -Author: Joao Pinto <joao.pi...@getdeb.net> -Description: A patch to change configure file to make recognize libboost. ---- smc-1.9.orig/configure -+++ smc-1.9/configure -@@ -3377,13 +3377,13 @@ - # Check for the Boost Filesystem library - - --{ $as_echo "$as_me:$LINENO: checking for main in -lboost_filesystem" >&5 --$as_echo_n "checking for main in -lboost_filesystem... " >&6; } -+{ $as_echo "$as_me:$LINENO: checking for main in -lboost_filesystem-mt" >&5 -+$as_echo_n "checking for main in -lboost_filesystem-mt... " >&6; } - if test "${ac_cv_lib_boost_filesystem_main+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lboost_filesystem $LIBS" -+LIBS="-lboost_filesystem-mt $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -3441,7 +3441,7 @@ - #define HAVE_LIBBOOST_FILESYSTEM 1 - _ACEOF - -- LIBS="-lboost_filesystem $LIBS" -+ LIBS="-lboost_filesystem-mt $LIBS" - - else - { { $as_echo "$as_me:$LINENO: error: Unable to find Boost Filesystem library" >&5 === removed file 'debian/patches/02_binutils-gold.patch' --- debian/patches/02_binutils-gold.patch 2011-09-18 22:03:34 +0000 +++ debian/patches/02_binutils-gold.patch 1970-01-01 00:00:00 +0000 @@ -1,13 +0,0 @@ -Index: smc-1.9/src/Makefile.in -=================================================================== ---- smc-1.9.orig/src/Makefile.in 2011-09-18 22:02:04.000000000 -0400 -+++ smc-1.9/src/Makefile.in 2011-09-18 22:03:01.000000000 -0400 -@@ -78,7 +78,7 @@ - font.$(OBJEXT) gl_surface.$(OBJEXT) img_manager.$(OBJEXT) \ - img_settings.$(OBJEXT) renderer.$(OBJEXT) video.$(OBJEXT) - smc_OBJECTS = $(am_smc_OBJECTS) --smc_LDADD = $(LDADD) -+smc_LDADD = $(LDADD) -lX11 -lboost_system - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles === removed file 'debian/patches/03_smc_boost1.46.patch' --- debian/patches/03_smc_boost1.46.patch 2011-08-20 20:18:07 +0000 +++ debian/patches/03_smc_boost1.46.patch 1970-01-01 00:00:00 +0000 @@ -1,149 +0,0 @@ -diff -ruN smc-1.9/src/core/filesystem/filesystem.cpp smc-1.9.new//src/core/filesystem/filesystem.cpp ---- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 10:11:18.000000000 +0000 -+++ smc-1.9.new//src/core/filesystem/filesystem.cpp 2011-06-08 04:07:04.889984136 +0000 -@@ -64,7 +64,11 @@ - - bool Dir_Exists( const std::string &dir ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - return fs::exists( fs::path( dir, fs::native ) ); -+#else -+ return fs::exists( fs::path( dir.c_str() ) ); -+#endif - - /*struct stat file_info; - -@@ -89,7 +93,11 @@ - - bool Create_Directory( const std::string &dir ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - return fs::create_directory( fs::path( dir, fs::native ) ); -+#else -+ return fs::create_directory( fs::path( dir.c_str() ) ); -+#endif - } - - size_t Get_File_Size( const std::string &filename ) -@@ -130,7 +138,11 @@ - { - vector<std::string> valid_files; - -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::path full_path( dir, fs::native ); -+#else -+ fs::path full_path( dir.c_str() ); -+#endif - fs::directory_iterator end_iter; - - // load all available objects -@@ -142,32 +154,56 @@ - if( fs::is_directory( *dir_itr ) ) - { - // ignore hidden directories -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - if( dir_itr->path().leaf().find( "." ) == 0 ) -+#else -+ if( dir_itr->path().filename().string().find( "." ) == 0 ) -+#endif - { - continue; - } - - if( with_directories ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+#else -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); -+#endif - } - - // load all items from the sub-directory - if( search_in_sub_directories ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories ); -+#else -+ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename().string(), file_type, with_directories ); -+#endif - valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() ); - } - } - // valid file -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos ) -+#else -+ else if( file_type.empty() || dir_itr->path().filename().string().rfind( file_type ) != std::string::npos ) -+#endif - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+#else -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); -+#endif - } - } - catch( const std::exception &ex ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - printf( "%s %s\n", dir_itr->path().leaf().c_str(), ex.what() ); -+#else -+ printf( "%s %s\n", dir_itr->path().filename().string().c_str(), ex.what() ); -+#endif - } - } - -diff -ruN smc-1.9/src/overworld/world_manager.cpp smc-1.9.new//src/overworld/world_manager.cpp ---- smc-1.9/src/overworld/world_manager.cpp 2009-08-16 16:44:52.000000000 +0000 -+++ smc-1.9.new//src/overworld/world_manager.cpp 2011-06-08 13:51:15.159979826 +0000 -@@ -111,14 +111,22 @@ - void cOverworld_Manager :: Load_Dir( const std::string &dir, bool user_dir /* = 0 */ ) - { - // set world directory -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::path full_path( dir, fs::native ); -+#else -+ fs::path full_path( dir.c_str() ); -+#endif - fs::directory_iterator end_iter; - - for( fs::directory_iterator dir_itr( full_path ); dir_itr != end_iter; ++dir_itr ) - { - try - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - std::string current_dir = dir_itr->path().leaf(); -+#else -+ std::string current_dir = dir_itr->path().filename().string(); -+#endif - - // only directories with an existing description - if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) ) -diff -ruN smc-1.9/src/video/video.cpp smc-1.9.new//src/video/video.cpp ---- smc-1.9/src/video/video.cpp 2009-07-04 09:46:56.000000000 +0000 -+++ smc-1.9.new//src/video/video.cpp 2011-06-08 14:02:49.359979740 +0000 -@@ -749,7 +749,11 @@ - { - try - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::remove_all( fs::path( m_imgcache_dir, fs::native ) ); -+#else -+ fs::remove_all( fs::path( m_imgcache_dir.c_str() ) ); -+#endif - } - // could happen if a file is locked or we have no write rights - catch( const std::exception &ex ) -@@ -771,7 +775,11 @@ - // no cache available - if( !Dir_Exists( imgcache_dir_active ) ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::create_directories( fs::path( imgcache_dir_active + "/" GAME_PIXMAPS_DIR, fs::native ) ); -+#else -+ fs::create_directories( fs::path( imgcache_dir_active + "/" GAME_PIXMAPS_DIR ) ); -+#endif - } - // cache available - else === modified file 'debian/patches/series' --- debian/patches/series 2011-08-20 20:18:07 +0000 +++ debian/patches/series 2012-02-22 22:23:23 +0000 @@ -1,3 +1,1 @@ -01_configure.patch -02_binutils-gold.patch -03_smc_boost1.46.patch +01_configure.ac.patch === modified file 'debian/rules' --- debian/rules 2011-08-20 20:18:07 +0000 +++ debian/rules 2012-02-22 22:52:48 +0000 @@ -9,6 +9,19 @@ DEB_CONFIGURE_EXTRA_FLAGS := --prefix=$(DEB_DESTDIR)/usr --bindir=/usr/games --datadir=/usr/share/games LDFLAGS = -lboost_system +DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST))) +GIT='https://github.com/FluXy/SMC.git' +# The YYYYMMDD part of the changelog version number, used to get a dated CVS +# checkout from upstream. +REV=$(shell dpkg-parsechangelog \ + | sed -rne 's,^Version: .*[+~]git([0-9]+).*,\1,p') +# The full changelog version number, used for the orig.tar.gz +VER=$(shell dpkg-parsechangelog \ + | sed -rne 's,^Version: (.*[+~]git[0-9]+).*,\1,p') + +post-patches:: + ./autogen.sh + clean:: rm -f config.log config.cache config.status install/smc:: @@ -19,3 +32,13 @@ install/smc-data:: rm -f smc-data/usr/share/games/smc/gui/font/default_bold.ttf smc-data/usr/share/games/smc/gui/font/default.ttf + +get-orig-source: + rm -rf smc-$(VER).orig + git clone $(GIT) + mv SMC/smc smc-$(REV).orig + rm -rf SMC + GZIP=--best tar -cz --owner root --group root --mode a+rX \ + -f smc_$(VER).orig.tar.gz \ + smc-$(REV).orig + rm -rf smc-$(REV).orig
=== modified file 'debian/changelog' --- debian/changelog 2011-09-18 22:03:34 +0000 +++ debian/changelog 2012-02-23 14:59:43 +0000 @@ -1,3 +1,19 @@ +smc (1.9+git20120222-0ubuntu1) precise; urgency=low + + * New upstream snapshot. Fixes FTBFS. (LP: #903126) + - debian/control: Add libboost-thread-dev to B-D + - debian/patches/01_configure.ac.patch: Search for boost_filesystem-mt + instead of boost_filesystem (as required by patch in previous Debian + version of the package). Also search for boost_system so that this + library gets added to the linker line. + - debian/patches: Remove as unnecessary 01_configure.patch, + 02_binutils-gold.patch, 03_smc_boost1.46.patch + - debian/rules: Add get-orig-source rule to check out smc from git. + Add post-patches rule to run autogen.sh after applying the + configure.ac patches. + + -- Barry Warsaw <ba...@ubuntu.com> Wed, 22 Feb 2012 17:14:50 -0500 + smc (1.9-4ubuntu1) oneiric; urgency=low * Update 02_binutils-gold.patch to properly use LDADD. Fixes FTBFS. === modified file 'debian/control' --- debian/control 2011-09-18 22:03:34 +0000 +++ debian/control 2012-02-22 23:01:11 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> XSBC-Original-Maintainer: Muammar El Khatib <muam...@debian.org> -Build-Depends: cdbs, debhelper (>= 6), autotools-dev, libcegui-mk2-dev (>= 0.6.2), libboost-filesystem-dev, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev, pkg-config, quilt (>= 0.40), ttf-dejavu +Build-Depends: cdbs, debhelper (>= 6), autotools-dev, libcegui-mk2-dev (>= 0.6.2), libboost-filesystem-dev, libboost-thread-dev, libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev, libsdl-ttf2.0-dev, pkg-config, quilt (>= 0.40), ttf-dejavu Standards-Version: 3.9.1 Homepage: http://www.secretmaryo.org === added file 'debian/patches/01_configure.ac.patch' --- debian/patches/01_configure.ac.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/01_configure.ac.patch 2012-02-23 14:43:19 +0000 @@ -0,0 +1,23 @@ +Author: Barry Warsaw <ba...@ubuntu.com> +Description: A patch to change configure.ac file to recognize libboost. +--- a/configure.ac ++++ b/configure.ac +@@ -19,13 +19,17 @@ + ### Check for libraries ### + + # Check for the Boost Filesystem library +-AC_CHECK_LIB([boost_filesystem], [main], , ++AC_CHECK_LIB([boost_filesystem-mt], [main], , + [AC_MSG_ERROR([Unable to find Boost Filesystem library])]) + + # Check for the Boost Thread library + AC_CHECK_LIB([boost_thread], [main], , + [AC_MSG_ERROR([Unable to find Boost Thread library])]) + ++# Check for the Boost System library ++AC_CHECK_LIB([boost_system], [main], , ++ [AC_MSG_ERROR([Unable to find Boost System library])]) ++ + # Check for the OpenGL and GLU library + case "${host}" in + *darwin*|*macosx*) === removed file 'debian/patches/01_configure.patch' --- debian/patches/01_configure.patch 2011-08-20 20:18:07 +0000 +++ debian/patches/01_configure.patch 1970-01-01 00:00:00 +0000 @@ -1,30 +0,0 @@ -Author: Joao Pinto <joao.pi...@getdeb.net> -Description: A patch to change configure file to make recognize libboost. ---- smc-1.9.orig/configure -+++ smc-1.9/configure -@@ -3377,13 +3377,13 @@ - # Check for the Boost Filesystem library - - --{ $as_echo "$as_me:$LINENO: checking for main in -lboost_filesystem" >&5 --$as_echo_n "checking for main in -lboost_filesystem... " >&6; } -+{ $as_echo "$as_me:$LINENO: checking for main in -lboost_filesystem-mt" >&5 -+$as_echo_n "checking for main in -lboost_filesystem-mt... " >&6; } - if test "${ac_cv_lib_boost_filesystem_main+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lboost_filesystem $LIBS" -+LIBS="-lboost_filesystem-mt $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -3441,7 +3441,7 @@ - #define HAVE_LIBBOOST_FILESYSTEM 1 - _ACEOF - -- LIBS="-lboost_filesystem $LIBS" -+ LIBS="-lboost_filesystem-mt $LIBS" - - else - { { $as_echo "$as_me:$LINENO: error: Unable to find Boost Filesystem library" >&5 === removed file 'debian/patches/02_binutils-gold.patch' --- debian/patches/02_binutils-gold.patch 2011-09-18 22:03:34 +0000 +++ debian/patches/02_binutils-gold.patch 1970-01-01 00:00:00 +0000 @@ -1,13 +0,0 @@ -Index: smc-1.9/src/Makefile.in -=================================================================== ---- smc-1.9.orig/src/Makefile.in 2011-09-18 22:02:04.000000000 -0400 -+++ smc-1.9/src/Makefile.in 2011-09-18 22:03:01.000000000 -0400 -@@ -78,7 +78,7 @@ - font.$(OBJEXT) gl_surface.$(OBJEXT) img_manager.$(OBJEXT) \ - img_settings.$(OBJEXT) renderer.$(OBJEXT) video.$(OBJEXT) - smc_OBJECTS = $(am_smc_OBJECTS) --smc_LDADD = $(LDADD) -+smc_LDADD = $(LDADD) -lX11 -lboost_system - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles === removed file 'debian/patches/03_smc_boost1.46.patch' --- debian/patches/03_smc_boost1.46.patch 2011-08-20 20:18:07 +0000 +++ debian/patches/03_smc_boost1.46.patch 1970-01-01 00:00:00 +0000 @@ -1,149 +0,0 @@ -diff -ruN smc-1.9/src/core/filesystem/filesystem.cpp smc-1.9.new//src/core/filesystem/filesystem.cpp ---- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 10:11:18.000000000 +0000 -+++ smc-1.9.new//src/core/filesystem/filesystem.cpp 2011-06-08 04:07:04.889984136 +0000 -@@ -64,7 +64,11 @@ - - bool Dir_Exists( const std::string &dir ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - return fs::exists( fs::path( dir, fs::native ) ); -+#else -+ return fs::exists( fs::path( dir.c_str() ) ); -+#endif - - /*struct stat file_info; - -@@ -89,7 +93,11 @@ - - bool Create_Directory( const std::string &dir ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - return fs::create_directory( fs::path( dir, fs::native ) ); -+#else -+ return fs::create_directory( fs::path( dir.c_str() ) ); -+#endif - } - - size_t Get_File_Size( const std::string &filename ) -@@ -130,7 +138,11 @@ - { - vector<std::string> valid_files; - -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::path full_path( dir, fs::native ); -+#else -+ fs::path full_path( dir.c_str() ); -+#endif - fs::directory_iterator end_iter; - - // load all available objects -@@ -142,32 +154,56 @@ - if( fs::is_directory( *dir_itr ) ) - { - // ignore hidden directories -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - if( dir_itr->path().leaf().find( "." ) == 0 ) -+#else -+ if( dir_itr->path().filename().string().find( "." ) == 0 ) -+#endif - { - continue; - } - - if( with_directories ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+#else -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); -+#endif - } - - // load all items from the sub-directory - if( search_in_sub_directories ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories ); -+#else -+ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename().string(), file_type, with_directories ); -+#endif - valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() ); - } - } - // valid file -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos ) -+#else -+ else if( file_type.empty() || dir_itr->path().filename().string().rfind( file_type ) != std::string::npos ) -+#endif - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - valid_files.push_back( dir + "/" + dir_itr->path().leaf() ); -+#else -+ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() ); -+#endif - } - } - catch( const std::exception &ex ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - printf( "%s %s\n", dir_itr->path().leaf().c_str(), ex.what() ); -+#else -+ printf( "%s %s\n", dir_itr->path().filename().string().c_str(), ex.what() ); -+#endif - } - } - -diff -ruN smc-1.9/src/overworld/world_manager.cpp smc-1.9.new//src/overworld/world_manager.cpp ---- smc-1.9/src/overworld/world_manager.cpp 2009-08-16 16:44:52.000000000 +0000 -+++ smc-1.9.new//src/overworld/world_manager.cpp 2011-06-08 13:51:15.159979826 +0000 -@@ -111,14 +111,22 @@ - void cOverworld_Manager :: Load_Dir( const std::string &dir, bool user_dir /* = 0 */ ) - { - // set world directory -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::path full_path( dir, fs::native ); -+#else -+ fs::path full_path( dir.c_str() ); -+#endif - fs::directory_iterator end_iter; - - for( fs::directory_iterator dir_itr( full_path ); dir_itr != end_iter; ++dir_itr ) - { - try - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - std::string current_dir = dir_itr->path().leaf(); -+#else -+ std::string current_dir = dir_itr->path().filename().string(); -+#endif - - // only directories with an existing description - if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) ) -diff -ruN smc-1.9/src/video/video.cpp smc-1.9.new//src/video/video.cpp ---- smc-1.9/src/video/video.cpp 2009-07-04 09:46:56.000000000 +0000 -+++ smc-1.9.new//src/video/video.cpp 2011-06-08 14:02:49.359979740 +0000 -@@ -749,7 +749,11 @@ - { - try - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::remove_all( fs::path( m_imgcache_dir, fs::native ) ); -+#else -+ fs::remove_all( fs::path( m_imgcache_dir.c_str() ) ); -+#endif - } - // could happen if a file is locked or we have no write rights - catch( const std::exception &ex ) -@@ -771,7 +775,11 @@ - // no cache available - if( !Dir_Exists( imgcache_dir_active ) ) - { -+#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2 - fs::create_directories( fs::path( imgcache_dir_active + "/" GAME_PIXMAPS_DIR, fs::native ) ); -+#else -+ fs::create_directories( fs::path( imgcache_dir_active + "/" GAME_PIXMAPS_DIR ) ); -+#endif - } - // cache available - else === modified file 'debian/patches/series' --- debian/patches/series 2011-08-20 20:18:07 +0000 +++ debian/patches/series 2012-02-22 22:23:23 +0000 @@ -1,3 +1,1 @@ -01_configure.patch -02_binutils-gold.patch -03_smc_boost1.46.patch +01_configure.ac.patch === modified file 'debian/rules' --- debian/rules 2011-08-20 20:18:07 +0000 +++ debian/rules 2012-02-22 22:52:48 +0000 @@ -9,6 +9,19 @@ DEB_CONFIGURE_EXTRA_FLAGS := --prefix=$(DEB_DESTDIR)/usr --bindir=/usr/games --datadir=/usr/share/games LDFLAGS = -lboost_system +DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST))) +GIT='https://github.com/FluXy/SMC.git' +# The YYYYMMDD part of the changelog version number, used to get a dated CVS +# checkout from upstream. +REV=$(shell dpkg-parsechangelog \ + | sed -rne 's,^Version: .*[+~]git([0-9]+).*,\1,p') +# The full changelog version number, used for the orig.tar.gz +VER=$(shell dpkg-parsechangelog \ + | sed -rne 's,^Version: (.*[+~]git[0-9]+).*,\1,p') + +post-patches:: + ./autogen.sh + clean:: rm -f config.log config.cache config.status install/smc:: @@ -19,3 +32,13 @@ install/smc-data:: rm -f smc-data/usr/share/games/smc/gui/font/default_bold.ttf smc-data/usr/share/games/smc/gui/font/default.ttf + +get-orig-source: + rm -rf smc-$(VER).orig + git clone $(GIT) + mv SMC/smc smc-$(REV).orig + rm -rf SMC + GZIP=--best tar -cz --owner root --group root --mode a+rX \ + -f smc_$(VER).orig.tar.gz \ + smc-$(REV).orig + rm -rf smc-$(REV).orig
signature.asc
Description: PGP signature