From: Adeodato Simó <adeodato@debian.org>
Subject: Do not let python modules link against libpython.
Forwarded: no
Origin: vendor
Last-Update: 2008-01-25

Do not link python modules against -lpython2.X. Since KDE4's cmake file
uses --no-undefined by default, we have to remove that from the default
CMAKE_SHARED_LINKER_FLAGS variable, but only for the pykde4 subdirectory.

Index: pykde4-4.13.97/CMakeLists.txt
===================================================================
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -152,6 +152,9 @@ if (NOT _exit_code)
     python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
 endif ()
 
+# Do not use --no-undefined for python modules.
+STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
 file(GLOB kdecore_files_sip sip/kdecore/*.sip)
 set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
 add_sip_python_module(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})
