From d22cbe7b85fddf01db3268222c73485a1f713900 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Tue, 12 Jan 2021 17:40:26 -0500 Subject: [PATCH] games-emulation/hatari: fix build with USE=capsimage Backported from upstream f63bab9182ce9e23a5f650f9d02c69cc03436dd6 Closes: https://bugs.gentoo.org/765115 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Ionen Wolkens --- .../files/hatari-2.2.1-capslib-5.1-fix.patch | 44 +++++++++++++++++++ games-emulation/hatari/hatari-2.2.1-r1.ebuild | 1 + 2 files changed, 45 insertions(+) create mode 100644 games-emulation/hatari/files/hatari-2.2.1-capslib-5.1-fix.patch diff --git a/games-emulation/hatari/files/hatari-2.2.1-capslib-5.1-fix.patch b/games-emulation/hatari/files/hatari-2.2.1-capslib-5.1-fix.patch new file mode 100644 index 00000000000..6c99ab81993 --- /dev/null +++ b/games-emulation/hatari/files/hatari-2.2.1-capslib-5.1-fix.patch @@ -0,0 +1,44 @@ +From f63bab9182ce9e23a5f650f9d02c69cc03436dd6 Mon Sep 17 00:00:00 2001 +From: Thomas Huth +Date: Sun, 10 Feb 2019 15:30:27 +0100 +Subject: [PATCH] Work-around problems with capslib 5.1 + +--- + src/CMakeLists.txt | 3 +++ + src/floppy_ipf.c | 5 +++++ + 2 files changed, 8 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 36bb166b..2f684661 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -59,6 +59,9 @@ if(X11_FOUND) + include_directories(${X11_INCLUDE_DIR}) + endif(X11_FOUND) + ++if(CAPSIMAGE_FOUND) ++ include_directories(${CAPSIMAGE_INCLUDE_DIR}) ++endif(CAPSIMAGE_FOUND) + + link_directories(${CMAKE_CURRENT_BINARY_DIR}/debug + ${CMAKE_CURRENT_BINARY_DIR}/falcon +diff --git a/src/floppy_ipf.c b/src/floppy_ipf.c +index 4347a5c3..37bf0c4d 100644 +--- a/src/floppy_ipf.c ++++ b/src/floppy_ipf.c +@@ -30,7 +30,12 @@ const char floppy_ipf_fileid[] = "Hatari floppy_ipf.c : " __DATE__ " " __TIME__; + + #ifdef HAVE_CAPSIMAGE + #if CAPSIMAGE_VERSION == 5 ++#ifndef __cdecl ++#define __cdecl /* CAPS headers need this, but do not define it on their own */ ++#endif + #include ++#define CapsLong SDWORD ++#define CapsULong UDWORD + #else + #include + #define CAPS_LIB_RELEASE 4 +-- +2.30.0 + diff --git a/games-emulation/hatari/hatari-2.2.1-r1.ebuild b/games-emulation/hatari/hatari-2.2.1-r1.ebuild index a1beaed5a2e..67f708247b2 100644 --- a/games-emulation/hatari/hatari-2.2.1-r1.ebuild +++ b/games-emulation/hatari/hatari-2.2.1-r1.ebuild @@ -41,6 +41,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${PN}-2.2.1-default-rom.patch "${FILESDIR}"/${PN}-2.2.1-joystick.patch + "${FILESDIR}"/${PN}-2.2.1-capslib-5.1-fix.patch ) DOCS=( -- 2.30.0