summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/poppler/files/poppler-0.28.1-respect-cflags.patch')
-rw-r--r--app-text/poppler/files/poppler-0.28.1-respect-cflags.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/app-text/poppler/files/poppler-0.28.1-respect-cflags.patch b/app-text/poppler/files/poppler-0.28.1-respect-cflags.patch
new file mode 100644
index 000000000000..0b94042c8af8
--- /dev/null
+++ b/app-text/poppler/files/poppler-0.28.1-respect-cflags.patch
@@ -0,0 +1,48 @@
+diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
+index 6cadf40..7e5e6b2 100644
+--- a/cmake/modules/PopplerMacros.cmake
++++ b/cmake/modules/PopplerMacros.cmake
+@@ -98,41 +98,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_TYPE RelWithDebInfo)
+ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+
+-if(CMAKE_COMPILER_IS_GNUCXX)
+- # set the default compile warnings
+ set(DEFAULT_COMPILE_WARNINGS_NO)
+ set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common")
+ set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
+
+- set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}")
+- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+- set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
+- set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline")
+- set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+- set(CMAKE_C_FLAGS "-std=c99")
+- set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+- set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+- set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
+- set(CMAKE_C_FLAGS_DEBUGFULL "-g3 -fno-inline")
+- set(CMAKE_C_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+-
+- poppler_check_link_flag("-Wl,--as-needed" GCC_HAS_AS_NEEDED)
+- if(GCC_HAS_AS_NEEDED)
+- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")
+- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--as-needed")
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
+- endif(GCC_HAS_AS_NEEDED)
+-endif (CMAKE_COMPILER_IS_GNUCXX)
+-
+-if(CMAKE_C_COMPILER MATCHES "icc")
+- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+- set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -0b0 -noalign")
+- set(CMAKE_CXX_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+- set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+- set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
+- set(CMAKE_C_FLAGS_DEBUG "-O2 -g -Ob0 -noalign")
+- set(CMAKE_C_FLAGS_DEBUGFULL "-g -Ob0 -noalign")
+-endif(CMAKE_C_COMPILER MATCHES "icc")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual")
+
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")