kodi: added patch for swig 4.2.x

This commit is contained in:
Matt Housh 2024-02-27 09:49:20 -06:00
parent 6d89fef5c8
commit 1ae93fa92b
Signed by: jaeger
GPG Key ID: F9DE89ED1BFADFD7
3 changed files with 40 additions and 3 deletions

View File

@ -1,7 +1,8 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3y3g3XLhD2tYtyb3vH1pJpFljsZnvV86KpCv9cJJUlbrQWyl5EFsiWnujl6c/iYYgggIDXfC0IhxCeHgjeKX+wE=
SHA256 (Pkgfile) = 3d8f52bc8e36b54f9b11e4e08683184bd7bbb2557ff6bba49a96099812c89cd3
RWSagIOpLGJF39HKQfvE9EV0+ByOQ6kVIfnfN9TgLy9ECsfEIT49lSj6XSXm4w4kgfQTZA9lgd5NszJ525LX6TP4olpDKLNfvgI=
SHA256 (Pkgfile) = 8d526e5f57f9b41235d51abc3ff8e7f073bdf16770c0300aef9d1741ae33eb75
SHA256 (.footprint) = 0a92bc1aa49557700a76f8e88a91666e11d107b6c35134a4939f3f1fae16afbf
SHA256 (kodi-20.4.tar.gz) = ccb2d3e382b5ae628a89db2325f5e778f1770a2a182f6eaa25645a22ccdffb18
SHA256 (gl-headers.patch) = 6fa089625184b2b47bea7a3dcb349931e9b39681df9d84fd690a1ba848460168
SHA256 (taglib.patch) = dc77cc0ba8eddef7b75b586b541e00c78db58d002e9928fdde6e9b34e5360cc7
SHA256 (swig-4.2.0.patch) = 27909339dffbf08cc900514fb883291efb7f5b21648fcb09300629a3efd4fadb

View File

@ -7,7 +7,7 @@ name=kodi
version=20.4
release=1
source=(https://github.com/xbmc/xbmc/archive/$version-Nexus/$name-$version.tar.gz gl-headers.patch \
taglib.patch)
taglib.patch swig-4.2.0.patch)
build() {
export PATH="/usr/lib/java/openjdk17-jdk/bin:$PATH"
@ -16,6 +16,7 @@ build() {
patch -d xbmc-$version-Nexus -p1 -i $SRC/gl-headers.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/taglib.patch
patch -d xbmc-$version-Nexus -p1 -i $SRC/swig-4.2.0.patch
cmake -Bbuild \
-DVERBOSE=ON \

35
kodi/swig-4.2.0.patch Normal file
View File

@ -0,0 +1,35 @@
From f6b1efbd6b3876537a25e7008bbf35254a1c55c7 Mon Sep 17 00:00:00 2001
From: fuzzard <fuzzard@kodi.tv>
Date: Mon, 1 Jan 2024 19:57:30 +1000
Subject: [PATCH] [swig] Fix building with Swig 4.2.0
swig 4.2.0 introduced a change that adds a constructor to the generated AddonModuleXbmcaddon.i.cpp
file. This causes failures such as
build/swig/AddonModuleXbmcaddon.i.cpp: In function 'PyObject* PythonBindings::xbmcaddon_XBMCAddon_xbmcaddon_Settings_New(PyTypeObject*, PyObject*, PyObject*)':
build/swig/AddonModuleXbmcaddon.i.cpp:1751:52: error: no matching function for call to 'XBMCAddon::xbmcaddon::Settings::Settings()'
1751 | apiResult = new XBMCAddon::xbmcaddon::Settings();
| ^
In file included from ../xbmc/interfaces/legacy/Addon.h:14,
from build/swig/AddonModuleXbmcaddon.i.cpp:30:
../xbmc/interfaces/legacy/Settings.h:58:3: note: candidate: 'XBMCAddon::xbmcaddon::Settings::Settings(std::shared_ptr<CSettingsBase>)'
58 | Settings(std::shared_ptr<CSettingsBase> settings);
| ^~~~~~~~
../xbmc/interfaces/legacy/Settings.h:58:3: note: candidate expects 1 argument, 0 provided
If we disable the contructor for Settings, we get the same generated output as swig <=4.1.1
---
xbmc/interfaces/swig/AddonModuleXbmcaddon.i | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/interfaces/swig/AddonModuleXbmcaddon.i b/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
index 6c00a1caa2f5a..d38794c043377 100644
--- a/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
+++ b/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
@@ -33,5 +33,6 @@ using namespace xbmcaddon;
%include "interfaces/legacy/AddonString.h"
%include "interfaces/legacy/Addon.h"
+%nodefaultctor Settings;
%include "interfaces/legacy/Settings.h"