diff --git a/kdelibs-4.13.2-glibc_DEFAULT_SOURCE.patch b/kdelibs-4.13.2-glibc_DEFAULT_SOURCE.patch new file mode 100644 index 0000000..666fa1e --- /dev/null +++ b/kdelibs-4.13.2-glibc_DEFAULT_SOURCE.patch @@ -0,0 +1,30 @@ +diff -up kdelibs-4.13.2/cmake/modules/FindKDE4Internal.cmake._DEFAULT_SOURCE kdelibs-4.13.2/cmake/modules/FindKDE4Internal.cmake +--- kdelibs-4.13.2/cmake/modules/FindKDE4Internal.cmake._DEFAULT_SOURCE 2014-06-08 17:15:31.037189262 -0500 ++++ kdelibs-4.13.2/cmake/modules/FindKDE4Internal.cmake 2014-06-09 08:00:43.074844711 -0500 +@@ -1097,7 +1097,7 @@ endif (APPLE) + + if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) + if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +- set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE) ++ set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE) + set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}") + set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}") + +@@ -1112,7 +1112,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Linux OR C + endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile) + endif (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + if (CMAKE_C_COMPILER MATCHES "icc") +- set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE) ++ set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE) + set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}") + set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}") + endif (CMAKE_C_COMPILER MATCHES "icc") +@@ -1216,7 +1216,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) + # It is kept here nonetheless both for backwards compatibility in case one does not use add_definitions(${KDE4_DEFINITIONS}) + # and also because it is/was needed by glibc for snprintf to be available when building C files. + # See commit 4a44862b2d178c1d2e1eb4da90010d19a1e4a42c. +- add_definitions (-D_BSD_SOURCE) ++ add_definitions (-D_BSD_SOURCE -D_DEFAULT_SOURCE) + endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) + + if (CMAKE_SYSTEM_NAME STREQUAL GNU) diff --git a/kdelibs.spec b/kdelibs.spec index 3cfa638..e9caa2d 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -39,7 +39,7 @@ Summary: KDE Libraries Version: 4.13.2 -Release: 2%{?dist} +Release: 3%{?dist} Name: kdelibs Epoch: 6 @@ -135,6 +135,10 @@ Patch49: kdelibs-solid_qt_no_debug_output.patch # https://git.reviewboard.kde.org/r/102439/ Patch50: kdelibs-4.7.0-knewstuff2_gpg2.patch +# glibc-2.20 has deprecated _BSD_SOURCE in favor of _DEFAULT_SOURCE +# http://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes +Patch51: kdelibs-4.13.2-glibc_DEFAULT_SOURCE.patch + # Toggle solid upnp support at runtime via env var SOLID_UPNP=1 (disabled by default) Patch52: kdelibs-4.10.0-SOLID_UPNP.patch @@ -353,6 +357,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage # upstreamable patches %patch50 -p1 -b .knewstuff2_gpg2 +%patch51 -p1 -b .glibc_DEFAULT_SOURCE %patch52 -p1 -b .SOLID_UPNP %patch53 -p1 -b .kjs-s390 %patch54 -p1 -b .kjs-locale @@ -624,6 +629,9 @@ gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : %changelog +* Mon Jun 09 2014 Rex Dieter - 6:4.13.2-3 +- FindKDE4Internal.cmake: define _DEFAULT_SOURCE too (to avoid _BSD_SOURCE deprecation warnings) + * Sun Jun 08 2014 Rex Dieter - 6:4.13.2-2 - respin