From 7e050ab0ea3548b369f49882b87046c2580cc842 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 24 Jul 2021 13:53:51 +0200 Subject: [PATCH] Add uriparser_isystem.patch --- uriparser.spec | 3 +++ uriparser_buildtests.patch | 12 ++---------- uriparser_isystem.patch | 13 +++++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 uriparser_isystem.patch diff --git a/uriparser.spec b/uriparser.spec index 5f1dfaf..52f76f6 100644 --- a/uriparser.spec +++ b/uriparser.spec @@ -11,6 +11,9 @@ Source0: https://github.com/%{name}/%{name}/releases/download/%{name}-%{v # Don't use -isystem, pass -fPIE when building tests Patch0: uriparser_buildtests.patch +# Prevent -isystem /usr/include +# https://gitlab.kitware.com/cmake/cmake/-/issues/16919 +Patch1: uriparser_isystem.patch BuildRequires: cmake BuildRequires: doxygen diff --git a/uriparser_buildtests.patch b/uriparser_buildtests.patch index 10ac7ad..58d955f 100644 --- a/uriparser_buildtests.patch +++ b/uriparser_buildtests.patch @@ -1,7 +1,7 @@ diff -rupN --no-dereference uriparser-0.9.5/CMakeLists.txt uriparser-0.9.5-new/CMakeLists.txt --- uriparser-0.9.5/CMakeLists.txt 2021-03-18 17:35:29.000000000 +0100 -+++ uriparser-0.9.5-new/CMakeLists.txt 2021-03-24 10:56:09.004167463 +0100 -@@ -283,13 +283,14 @@ if(URIPARSER_BUILD_TESTS) ++++ uriparser-0.9.5-new/CMakeLists.txt 2021-07-24 13:45:23.023102634 +0200 +@@ -283,6 +283,7 @@ if(URIPARSER_BUILD_TESTS) ${LIBRARY_CODE_FILES} ) @@ -9,11 +9,3 @@ diff -rupN --no-dereference uriparser-0.9.5/CMakeLists.txt uriparser-0.9.5-new/C target_compile_definitions(testrunner PRIVATE URI_STATIC_BUILD) if(MSVC) - target_compile_definitions(testrunner PRIVATE -D_CRT_SECURE_NO_WARNINGS) - endif() - -- target_include_directories(testrunner SYSTEM PRIVATE -+ target_include_directories(testrunner PRIVATE - ${GTEST_INCLUDE_DIRS} - ) - diff --git a/uriparser_isystem.patch b/uriparser_isystem.patch new file mode 100644 index 0000000..b1b6c78 --- /dev/null +++ b/uriparser_isystem.patch @@ -0,0 +1,13 @@ +diff -rupN --no-dereference uriparser-0.9.5/CMakeLists.txt uriparser-0.9.5-new/CMakeLists.txt +--- uriparser-0.9.5/CMakeLists.txt 2021-07-24 13:45:23.032102663 +0200 ++++ uriparser-0.9.5-new/CMakeLists.txt 2021-07-24 13:45:23.035102673 +0200 +@@ -36,6 +36,9 @@ + # + cmake_minimum_required(VERSION 3.3) + ++set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES /usr/include) ++set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES /usr/include) ++ + project(uriparser + VERSION + 0.9.5