mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
libsdl2: fix build for gcc2 and secondary arch
This commit is contained in:
@@ -6,7 +6,7 @@ software, emulators, and popular games."
|
||||
HOMEPAGE="https://www.libsdl.org/"
|
||||
COPYRIGHT="1997-2021 Sam Lantinga"
|
||||
LICENSE="Zlib"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc"
|
||||
SOURCE_DIR="SDL2-$portVersion"
|
||||
|
||||
@@ -1,4 +1,52 @@
|
||||
From cab82bafaa473b144c3bb04d04faf27627848a7c Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Fri, 2 Feb 2018 09:40:46 +0100
|
||||
Subject: Fix secondary arch build.
|
||||
|
||||
Rather than trying to guess the name of libstdc++, run libtool in C++
|
||||
mode so it figures this out by itself. The previous way of detecting
|
||||
libstdc++ would not allow for building a secondary architecture package.
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 57871be..ea7f5e5 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -151,13 +151,13 @@ update-revision:
|
||||
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
|
||||
|
||||
$(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS)
|
||||
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
|
||||
|
||||
$(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
|
||||
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
|
||||
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir)
|
||||
|
||||
$(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS)
|
||||
- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
|
||||
+ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CXX --mode=link $(CXX) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir)
|
||||
|
||||
install: all install-bin install-hdrs install-lib install-data
|
||||
install-bin:
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b7e519b..8e15ca9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3942,9 +3942,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
# The Haiku platform requires special setup.
|
||||
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
||||
- # Haiku's x86 spins use libstdc++.r4.so (for binary compat?), but
|
||||
- # other spins, like x86-64, use a more standard "libstdc++.so.*"
|
||||
- AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
|
||||
;;
|
||||
*-ios-*)
|
||||
ARCH=ios
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From 91df47cd7ab55dc8eace6850ff4fab72f31364db Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 5 Mar 2021 17:29:13 +1000
|
||||
Subject: Fix relative mode for mouse
|
||||
@@ -60,7 +108,7 @@ index 817fccf..234eaf0 100644
|
||||
2.30.0
|
||||
|
||||
|
||||
From 3325c1a3db41dbe80e3914b2534a73ec7a5382b7 Mon Sep 17 00:00:00 2001
|
||||
From 825f87de8ef9a54fad03ed5e51c1faedbff5d915 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 5 Mar 2021 17:30:08 +1000
|
||||
Subject: Add support for system cursors
|
||||
@@ -182,7 +230,7 @@ index 234eaf0..0948451 100644
|
||||
2.30.0
|
||||
|
||||
|
||||
From 74d61a5e46f4ba2b1fd628ee2ca89a7eaeee120b Mon Sep 17 00:00:00 2001
|
||||
From 45a5cbd4df36a36ab55337a16f352192c68b3178 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 5 Mar 2021 17:31:02 +1000
|
||||
Subject: Disable direct mode for BGLView
|
||||
@@ -204,3 +252,47 @@ index 220d60a..2b01d11 100644
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
From af8a95d20ad00a3ba9e17061b65fca2826b4e421 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 5 Mar 2021 21:54:21 +0000
|
||||
Subject: Fix build for gcc2
|
||||
|
||||
|
||||
diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc
|
||||
index 0948451..f3c80ac 100644
|
||||
--- a/src/video/haiku/SDL_bvideo.cc
|
||||
+++ b/src/video/haiku/SDL_bvideo.cc
|
||||
@@ -18,11 +18,14 @@
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
+
|
||||
#include "../../SDL_internal.h"
|
||||
#include "../../main/haiku/SDL_BApp.h"
|
||||
|
||||
#if SDL_VIDEO_DRIVER_HAIKU
|
||||
|
||||
+#include "SDL_BWin.h"
|
||||
+#include <Url.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -37,14 +40,10 @@ extern "C" {
|
||||
#include "SDL_bframebuffer.h"
|
||||
#include "SDL_bevents.h"
|
||||
|
||||
-#include "SDL_BWin.h"
|
||||
-
|
||||
static SDL_INLINE SDL_BWin *_ToBeWin(SDL_Window *window) {
|
||||
return ((SDL_BWin*)(window->driverdata));
|
||||
}
|
||||
|
||||
-#include <Url.h>
|
||||
-
|
||||
/* FIXME: Undefined functions */
|
||||
// #define HAIKU_PumpEvents NULL
|
||||
#define HAIKU_StartTextInput NULL
|
||||
--
|
||||
2.30.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user