summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD5
-rw-r--r--smc-boost_filesystem-patch.diff80
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5e41d71ae885..9b2b616ede14 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -18,12 +18,14 @@ pkgbase = smc
source = smc.png
source = smc-cegui-0.7.diff
source = smc-boost_filesystem3.diff
+ source = smc-boost_filesystem-patch.diff
source = smc.desktop
sha256sums = b4194e70d3f1de3da884dd1a11e4f5cec25a205f66a3b85cc9fc1c86289b237d
sha256sums = c5bb2e1830c7cbe499c93851f5a02b2b900b4730d2c7a133a44a7b43a297dab8
sha256sums = ace860984a79fe50b63eb1853b885ca910e070a1409e86b3fb5fb7b84b198ef9
sha256sums = a82a47525126c874ceeda28c310d5ce1fb521b8e2812dd1134b8a686551c7412
sha256sums = 42c8698af5241f09f736f0f878ea2713224834477fd625da72372bb694d34d1e
+ sha256sums = 41d99a7696dc5d2001957d320f2aa559dd17b519dd1e7dd88fbe51b1315740d3
sha256sums = 291fca2243262c24cf086bec60ae77fd53f58bc42e876b224d58e96a5a35d79a
pkgname = smc
diff --git a/PKGBUILD b/PKGBUILD
index 2e0e89b90dc2..f6da94fbe5d8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,12 +19,14 @@ source=("http://downloads.sourceforge.net/smclone/smc-$pkgver.tar.bz2"
"smc.png"
"smc-cegui-0.7.diff"
"smc-boost_filesystem3.diff"
+ "smc-boost_filesystem-patch.diff"
"smc.desktop")
sha256sums=('b4194e70d3f1de3da884dd1a11e4f5cec25a205f66a3b85cc9fc1c86289b237d'
'c5bb2e1830c7cbe499c93851f5a02b2b900b4730d2c7a133a44a7b43a297dab8'
'ace860984a79fe50b63eb1853b885ca910e070a1409e86b3fb5fb7b84b198ef9'
'a82a47525126c874ceeda28c310d5ce1fb521b8e2812dd1134b8a686551c7412'
'42c8698af5241f09f736f0f878ea2713224834477fd625da72372bb694d34d1e'
+ '41d99a7696dc5d2001957d320f2aa559dd17b519dd1e7dd88fbe51b1315740d3'
'291fca2243262c24cf086bec60ae77fd53f58bc42e876b224d58e96a5a35d79a')
prepare() {
@@ -35,6 +37,9 @@ prepare() {
# fix for boost >= 1.50
patch -Np1 < ../smc-boost_filesystem3.diff
+
+ # fix for 2021 boost
+ patch -Np1 < ../smc-boost_filesystem-patch.diff
}
build() {
diff --git a/smc-boost_filesystem-patch.diff b/smc-boost_filesystem-patch.diff
new file mode 100644
index 000000000000..cef14f10503e
--- /dev/null
+++ b/smc-boost_filesystem-patch.diff
@@ -0,0 +1,80 @@
+From 1608c3d8be9ec4be18e89e265bbce36aa3cc7e26 Mon Sep 17 00:00:00 2001
+From: Anthony Wang <ta180m@gmail.com>
+Date: Fri, 30 Apr 2021 11:31:43 -0500
+Subject: [PATCH] Fix code for compatibility with 2021 Boost
+
+---
+ src/core/filesystem/filesystem.cpp | 6 +++---
+ src/overworld/world_manager.cpp | 2 +-
+ src/video/video.cpp | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/core/filesystem/filesystem.cpp b/src/core/filesystem/filesystem.cpp
+index 5f80e26..0805cc6 100644
+--- a/src/core/filesystem/filesystem.cpp
++++ b/src/core/filesystem/filesystem.cpp
+@@ -64,7 +64,7 @@ bool File_Exists( const std::string &filename )
+
+ 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 Delete_File( const std::string &filename )
+
+ 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> Get_Directory_Files( const std::string &dir, const std::stri
+ {
+ 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
+diff --git a/src/overworld/world_manager.cpp b/src/overworld/world_manager.cpp
+index 4b440f5..601c9b5 100644
+--- a/src/overworld/world_manager.cpp
++++ b/src/overworld/world_manager.cpp
+@@ -111,7 +111,7 @@ void cOverworld_Manager :: Load( void )
+ 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 )
+diff --git a/src/video/video.cpp b/src/video/video.cpp
+index 667a8ef..6ca6e58 100644
+--- a/src/video/video.cpp
++++ b/src/video/video.cpp
+@@ -747,7 +747,7 @@ void cVideo :: Init_Image_Cache( bool recreate /* = 0 */, bool draw_gui /* = 0 *
+ {
+ 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 )
+@@ -769,7 +769,7 @@ void cVideo :: Init_Image_Cache( bool recreate /* = 0 */, bool draw_gui /* = 0 *
+ // 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
+--
+2.31.1
+