[SCM] QJson library packaging branch, master, updated. debian/0.8.1-3-8-g114b797

Lisandro Damián Nicanor Pérez lisandro at moszumanska.debian.org
Tue Nov 10 19:31:14 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/krap/qjson.git;a=commitdiff;h=47a5bad

The following commit has been merged in the master branch:
commit 47a5bad8a56fe7b9d6f54bc6df9b38c9fbf8d3a6
Author: Lisandro Damián Nicanor Pérez Meyer <perezmeyer at gmail.com>
Date:   Tue Nov 10 16:25:30 2015 -0300

    Use -fPIC with Qt5.
---
 debian/changelog                           |  1 +
 debian/patches/compile_qt5_with_fpic.patch | 38 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  2 ++
 3 files changed, 41 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f93a5ba..96262da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ qjson (0.8.1+git103-gee054a7-1) UNRELEASED; urgency=medium
   * New upstream snapshot.
   * Refresh enable_multiarch.patch.
   * Add testscannerfix.patch, solving an issue while building the tests.
+  * Create compile_qt5_with_fpic.patch in order to use -fPIC with Qt5.
 
  -- Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>  Sun, 09 Mar 2014 00:18:52 -0300
 
diff --git a/debian/patches/compile_qt5_with_fpic.patch b/debian/patches/compile_qt5_with_fpic.patch
new file mode 100644
index 0000000..3eca66e
--- /dev/null
+++ b/debian/patches/compile_qt5_with_fpic.patch
@@ -0,0 +1,38 @@
+Description: use -fPIC when building with Qt5 on Debian
+ Qt5 on Debian requires using -fPIC.
+Author: Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>
+
+---
+ src/CMakeLists.txt           |    4 ++++
+ tests/scanner/CMakeLists.txt |    2 ++
+ 2 files changed, 6 insertions(+)
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -28,11 +28,15 @@ INCLUDE_DIRECTORIES(.)
+ # lib what can be compiled against scanner test.
+ if(QJSON_BUILD_TESTS AND BUILD_SHARED_LIBS)
+   add_library(qjson_scanner STATIC json_scanner.cpp)
++  if(Qt5Core_FOUND)
++    set_target_properties( qjson_scanner PROPERTIES COMPILE_FLAGS "-fPIC")
++  endif()
+ endif()
+ 
+ add_library (qjson${QJSON_SUFFIX} ${qjson_SRCS} ${qjson_MOC_SRCS} ${qjson_HEADERS})
+ IF (Qt5Core_FOUND)
+   target_link_libraries( qjson${QJSON_SUFFIX} ${Qt5Core_LIBRARIES})
++  set_target_properties( qjson${QJSON_SUFFIX} PROPERTIES COMPILE_FLAGS "-fPIC")
+ ELSE()
+   target_link_libraries( qjson${QJSON_SUFFIX} ${QT_LIBRARIES})
+ ENDIF()
+--- a/tests/scanner/CMakeLists.txt
++++ b/tests/scanner/CMakeLists.txt
+@@ -25,6 +25,8 @@ FOREACH(test ${UNIT_TESTS})
+   MESSAGE(STATUS "Building ${test}")
+   IF (NOT Qt5Core_FOUND)
+     QT4_WRAP_CPP(MOC_SOURCE ${test}.cpp)
++  ELSEIF (NOT Qt5Core_FOUND)
++    set_target_properties( ${test} PROPERTIES COMPILE_FLAGS "-fPIC")
+   ENDIF()
+   ADD_EXECUTABLE(
+     ${test}
diff --git a/debian/patches/series b/debian/patches/series
index 213051c..9a789a7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
+testscannerfix.patch
 enable_multiarch.patch
+compile_qt5_with_fpic.patch

-- 
QJson library packaging



More information about the pkg-kde-commits mailing list