diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/frogatto/fbsd-fixes.patch | 113 | ||||
-rw-r--r-- | games/frogatto/frogatto-boost-1.70.patch | 37 | ||||
-rw-r--r-- | games/frogatto/frogatto.SlackBuild | 17 | ||||
-rw-r--r-- | games/frogatto/frogatto.info | 2 | ||||
-rw-r--r-- | games/frogatto/slack-desc | 2 |
5 files changed, 165 insertions, 6 deletions
diff --git a/games/frogatto/fbsd-fixes.patch b/games/frogatto/fbsd-fixes.patch new file mode 100644 index 0000000000..5abb8eed33 --- /dev/null +++ b/games/frogatto/fbsd-fixes.patch @@ -0,0 +1,113 @@ +diff -upr frogatto-1.3.1.orig/Makefile frogatto-1.3.1/Makefile +--- frogatto-1.3.1.orig/Makefile 2012-12-09 00:36:13.000000000 +0200 ++++ frogatto-1.3.1/Makefile 2020-04-25 20:36:32.066907199 +0300 +@@ -22,7 +22,7 @@ + # found in PATH), this option has no effect. + # + +-OPTIMIZE=yes ++OPTIMIZE=no + CCACHE?=ccache + USE_CCACHE?=$(shell which $(CCACHE) 2>&1 > /dev/null && echo yes) + ifneq ($(USE_CCACHE),yes) +@@ -34,7 +34,7 @@ BASE_CXXFLAGS += -O2 + endif + + # Initial compiler options, used before CXXFLAGS and CPPFLAGS. +-BASE_CXXFLAGS += -g -fno-inline-functions -fthreadsafe-statics -Wnon-virtual-dtor -Werror -Wignored-qualifiers -Wformat -Wswitch ++BASE_CXXFLAGS += -fno-inline-functions -fthreadsafe-statics -Wnon-virtual-dtor -Werror -Wformat -Wswitch -Wno-narrowing + + # Compiler include options, used after CXXFLAGS and CPPFLAGS. + INC := $(shell pkg-config --cflags x11 sdl glu glew SDL_image libpng zlib) +@@ -60,7 +60,7 @@ game: $(objects) + $(CCACHE) $(CXX) \ + $(BASE_CXXFLAGS) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(INC) \ + $(objects) -o game \ +- $(LIBS) -lboost_regex-mt -lboost_system-mt -lpthread -fthreadsafe-statics ++ $(LIBS) -lboost_regex -lboost_system -lpthread -fthreadsafe-statics + + # pull in dependency info for *existing* .o files + -include $(objects:.o=.d) +@@ -69,7 +69,7 @@ server: $(server_objects) + $(CCACHE) $(CXX) \ + $(BASE_CXXFLAGS) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) \ + $(server_objects) -o server \ +- $(LIBS) -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lboost_iostreams-mt ++ $(LIBS) -lboost_regex -lboost_system -lboost_thread -lboost_iostreams + + clean: + rm -f *.o *.d game +diff -upr frogatto-1.3.1.orig/src/code_editor_dialog.cpp frogatto-1.3.1/src/code_editor_dialog.cpp +--- frogatto-1.3.1.orig/src/code_editor_dialog.cpp 2012-12-09 00:36:13.000000000 +0200 ++++ frogatto-1.3.1/src/code_editor_dialog.cpp 2020-04-25 20:37:25.271352863 +0300 +@@ -55,7 +55,7 @@ void code_editor_dialog::init() + + //std::cerr << "CED: " << x() << "," << y() << "; " << width() << "," << height() << std::endl; + drag_widget* dragger = new drag_widget(x(), y(), width(), height(), +- drag_widget::DRAG_HORIZONTAL, NULL, ++ drag_widget::DRAG_HORIZONTAL, [](int, int){}, + boost::bind(&code_editor_dialog::on_drag_end, this, _1, _2), + boost::bind(&code_editor_dialog::on_drag, this, _1, _2)); + +diff -upr frogatto-1.3.1.orig/src/filesystem.cpp frogatto-1.3.1/src/filesystem.cpp +--- frogatto-1.3.1.orig/src/filesystem.cpp 2012-12-09 00:36:13.000000000 +0200 ++++ frogatto-1.3.1/src/filesystem.cpp 2020-04-25 20:37:30.291458013 +0300 +@@ -405,8 +405,14 @@ void get_files_in_dir(const std::string& + } + #else + struct stat st; ++ std::string dirname; + +- DIR* dir = opendir(directory.c_str()); ++ if(have_datadir) ++ dirname = data_dir + "/" + directory; ++ else ++ dirname = directory; ++ ++ DIR* dir = opendir(dirname.c_str()); + + if(dir == NULL) { + return; +@@ -437,14 +443,14 @@ void get_files_in_dir(const std::string& + #endif /* !APPLE */ + + std::string fullname; +- if (directory.empty() || directory[directory.size()-1] == '/' ++ if (dirname.empty() || dirname[dirname.size()-1] == '/' + #ifdef __AMIGAOS4__ +- || (directory[directory.size()-1]==':') ++ || (dirname[dirname.size()-1]==':') + #endif /* __AMIGAOS4__ */ + ) +- fullname = directory + basename; ++ fullname = dirname + basename; + else +- fullname = (directory + "/") + basename; ++ fullname = (dirname + "/") + basename; + + if (::stat(fullname.c_str(), &st) != -1) { + if (S_ISREG(st.st_mode)) { +diff -upr frogatto-1.3.1.orig/src/surface_cache.cpp frogatto-1.3.1/src/surface_cache.cpp +--- frogatto-1.3.1.orig/src/surface_cache.cpp 2012-12-09 00:36:13.000000000 +0200 ++++ frogatto-1.3.1/src/surface_cache.cpp 2020-04-25 20:38:31.589411134 +0300 +@@ -116,7 +116,7 @@ surface get_no_cache(const std::string& + }
+ #endif // ANDROID
+ //std::cerr << "loading image '" << fname << "'\n";
+- if(surf.get() == false || surf->w == 0) {
++ if(surf.get() == nullptr || surf->w == 0) {
+ if(key != "") {
+ std::cerr << "failed to load image '" << key << "'\n";
+ }
+diff -upr frogatto-1.3.1.orig/src/texture.hpp frogatto-1.3.1/src/texture.hpp +--- frogatto-1.3.1.orig/src/texture.hpp 2012-12-09 00:36:13.000000000 +0200 ++++ frogatto-1.3.1/src/texture.hpp 2020-04-25 20:38:39.952920335 +0300 +@@ -58,7 +58,7 @@ public: + unsigned int get_id() const; + static void set_current_texture(unsigned int id); + void set_as_current_texture() const; +- bool valid() const { return id_; } ++ bool valid() const { return static_cast<bool>(id_); } + + static texture get(const std::string& str, int options=0); + static texture get(const std::string& str, const std::string& algorithm); diff --git a/games/frogatto/frogatto-boost-1.70.patch b/games/frogatto/frogatto-boost-1.70.patch new file mode 100644 index 0000000000..3a47530a4d --- /dev/null +++ b/games/frogatto/frogatto-boost-1.70.patch @@ -0,0 +1,37 @@ +rc/http_server.cpp:34:46: error: no member named 'get_io_service' in + 'boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::executor>' + socket_ptr socket(new tcp::socket(acceptor_.get_io_service())); + ~~~~~~~~~ ^ +src/server.cpp:40:47: error: no member named 'get_io_service' in + 'boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::executor>' + socket_ptr socket(new tcp::socket(acceptor_.get_io_service())); + ~~~~~~~~~ ^ + +--- src/http_server.cpp.orig 2012-12-08 22:36:13 UTC ++++ src/http_server.cpp +@@ -31,7 +31,11 @@ web_server::web_server(boost::asio::io_service& io_ser + + void web_server::start_accept() + { ++#if BOOST_VERSION < 107000 + socket_ptr socket(new tcp::socket(acceptor_.get_io_service())); ++#else ++ socket_ptr socket(new tcp::socket(acceptor_.get_executor())); ++#endif + acceptor_.async_accept(*socket, boost::bind(&web_server::handle_accept, this, socket, boost::asio::placeholders::error)); + + } +--- src/server.cpp.orig 2012-12-08 22:36:13 UTC ++++ src/server.cpp +@@ -37,7 +37,11 @@ class server (public) + private: + void start_accept() + { ++#if BOOST_VERSION < 107000 + socket_ptr socket(new tcp::socket(acceptor_.get_io_service())); ++#else ++ socket_ptr socket(new tcp::socket(acceptor_.get_executor())); ++#endif + acceptor_.async_accept(*socket, boost::bind(&server::handle_accept, this, socket, boost::asio::placeholders::error)); + } + diff --git a/games/frogatto/frogatto.SlackBuild b/games/frogatto/frogatto.SlackBuild index 0f24518542..6e555d740e 100644 --- a/games/frogatto/frogatto.SlackBuild +++ b/games/frogatto/frogatto.SlackBuild @@ -38,9 +38,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -72,6 +69,7 @@ cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* cd $PRGNAM-$VERSION +rm -rf MacOSJet chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -79,8 +77,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks to the Arch folks +patch -p1 -i $CWD/fbsd-fixes.patch +patch -p0 -i $CWD/frogatto-boost-1.70.patch + # Fix linking with boost libs and remove -Werror -sed -i -e 's,-mt,,g' -e 's, -Werror,,' Makefile +sed -i \ + -e 's,-mt,,g' \ + -e 's, -Werror,,' \ + -e 's/-lprofiler//g' \ + -e 's/ccache //g' \ + -e 's/\.io_service/\.get_io_service/g' \ + -e 's/\%lu\\n/\%zu\\n/g' \ + Makefile make \ OPTIMIZE=no \ diff --git a/games/frogatto/frogatto.info b/games/frogatto/frogatto.info index 52230633cd..2fd82b1656 100644 --- a/games/frogatto/frogatto.info +++ b/games/frogatto/frogatto.info @@ -1,6 +1,6 @@ PRGNAM="frogatto" VERSION="1.3.1" -HOMEPAGE="http://www.frogatto.com/" +HOMEPAGE="https://frogatto.com/" DOWNLOAD="https://github.com/frogatto/frogatto/archive/1.3.1/frogatto-1.3.1.tar.gz" MD5SUM="f3206fbe1395ea2878092fbd4ed2c591" DOWNLOAD_x86_64="" diff --git a/games/frogatto/slack-desc b/games/frogatto/slack-desc index f6f780a6a8..1a76dd28e4 100644 --- a/games/frogatto/slack-desc +++ b/games/frogatto/slack-desc @@ -11,7 +11,7 @@ frogatto: frogatto: Frogatto & Friends is an action-adventure "platformer" frogatto: game starring a certain green dude. frogatto: -frogatto: http://www.frogatto.com/ +frogatto: https://frogatto.com/ frogatto: frogatto: frogatto: |