diff --git a/debian/patches/build-Add-include-directories-for-all-SDL2_foo-modules.patch b/debian/patches/build-Add-include-directories-for-all-SDL2_foo-modules.patch new file mode 100644 index 0000000..e91e05a --- /dev/null +++ b/debian/patches/build-Add-include-directories-for-all-SDL2_foo-modules.patch @@ -0,0 +1,36 @@ +From: Simon McVittie +Date: Wed, 30 Sep 2020 16:37:52 +0200 +Subject: build-Add-include-directories-for-all-SDL2_foo-modules + +The build system assumed that SDL2 and all the SDL2_foo libraries were +installed with the same ${includedir}, but this is not guaranteed: +we could be using a system copy of SDL2 in conjunction with SDL2_foo +libraries in a non-standard prefix. + +This also fixes a build regression with recent Debian SDL2 packages, in +which the SDL2 headers are installed in an architecture-dependent +directory but the SDL2_foo headers are not. + +Signed-off-by: Simon McVittie +Forwarded: no +Bug-Debian: https://bugs.debian.org/951943 +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dedb267..17efe75 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,8 +68,11 @@ include_directories(${SDL2_INCLUDE_DIR}) + #Setup things that use pkg-config + find_package(PkgConfig REQUIRED) + pkg_search_module(SDL2MIXER REQUIRED SDL2_mixer) ++include_directories(${SDL2MIXER_INCLUDE_DIRS}) + pkg_search_module(SDL2IMAGE REQUIRED SDL2_image) ++include_directories(${SDL2IMAGE_INCLUDE_DIRS}) + pkg_search_module(SDL2TTF REQUIRED SDL2_ttf) ++include_directories(${SDL2TTF_INCLUDE_DIRS}) + + include_directories(${SDL2MIXER_INCLUDE_DIRS}) + include_directories(${SDL2IMAGE_INCLUDE_DIRS}) diff --git a/debian/patches/install-path.patch b/debian/patches/install-path.patch index 046ac28..3296da8 100644 --- a/debian/patches/install-path.patch +++ b/debian/patches/install-path.patch @@ -8,7 +8,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 131df21..d4d7644 100644 +index 86c4dc2..dedb267 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ set(INSTALL_DATA_DIR "share/blockattack" CACHE STRING "Install data to this dire diff --git a/debian/patches/series b/debian/patches/series index 31f7921..ce3a7ec 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ install-path.patch +build-Add-include-directories-for-all-SDL2_foo-modules.patch