[Python-modules-commits] r13574 - in packages/shiboken/trunk/debian (4 files)
odyx-guest at users.alioth.debian.org
odyx-guest at users.alioth.debian.org
Wed Jun 23 22:26:49 UTC 2010
Date: Wednesday, June 23, 2010 @ 22:26:48
Author: odyx-guest
Revision: 13574
* Add debug-built versions to fix PySide's debug build
- Import u_2f7c242_fidDebugBuild.patch from upstream
Added:
packages/shiboken/trunk/debian/patches/u_2f7c242_fidDebugBuild.patch
Modified:
packages/shiboken/trunk/debian/changelog
packages/shiboken/trunk/debian/patches/series
packages/shiboken/trunk/debian/rules
Modified: packages/shiboken/trunk/debian/changelog
===================================================================
--- packages/shiboken/trunk/debian/changelog 2010-06-23 19:13:39 UTC (rev 13573)
+++ packages/shiboken/trunk/debian/changelog 2010-06-23 22:26:48 UTC (rev 13574)
@@ -1,9 +1,12 @@
shiboken (0.3.2-2) unstable; urgency=low
+ * Add debug-built versions to fix PySide's debug build
+ - Import u_2f7c242_fidDebugBuild.patch from upstream
+
* Fix the Hurd FTBFS by importing u_4bab9a8_fix_Hurd_FTBFS.patch from
upstream.
- -- Didier Raboud <didier at raboud.com> Wed, 16 Jun 2010 19:06:09 +0200
+ -- Didier Raboud <didier at raboud.com> Thu, 24 Jun 2010 00:25:51 +0200
shiboken (0.3.2-1) unstable; urgency=low
Modified: packages/shiboken/trunk/debian/patches/series
===================================================================
--- packages/shiboken/trunk/debian/patches/series 2010-06-23 19:13:39 UTC (rev 13573)
+++ packages/shiboken/trunk/debian/patches/series 2010-06-23 22:26:48 UTC (rev 13574)
@@ -1,3 +1,4 @@
u_4bab9a8_fix_Hurd_FTBFS.patch
+u_2f7c242_fidDebugBuild.patch
use_original_sparsehash.patch
fix_tests.patch
Added: packages/shiboken/trunk/debian/patches/u_2f7c242_fidDebugBuild.patch
===================================================================
--- packages/shiboken/trunk/debian/patches/u_2f7c242_fidDebugBuild.patch (rev 0)
+++ packages/shiboken/trunk/debian/patches/u_2f7c242_fidDebugBuild.patch 2010-06-23 22:26:48 UTC (rev 13574)
@@ -0,0 +1,40 @@
+From 2f7c24248b6f8b398b6211f3bf6e09767ea913d8 Mon Sep 17 00:00:00 2001
+From: Hugo Parente Lima <hugo.pl at gmail.com>
+Date: Mon, 21 Jun 2010 11:15:30 -0300
+Subject: [PATCH] Fix bug: "Debug build fails to run the tests (doesn't work) [_Py_AddToAllObjects: Assertion (...) failed]"
+
+Reviewer: Luciano Wolf <luciano.wolf at openbossa.org>
+ Marcelo Lira <marcelo.lira at openbossa.org>
+---
+ libshiboken/CMakeLists.txt | 11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+
+Index: shiboken/libshiboken/CMakeLists.txt
+===================================================================
+--- shiboken.orig/libshiboken/CMakeLists.txt 2010-06-17 16:57:40.000000000 +0200
++++ shiboken/libshiboken/CMakeLists.txt 2010-06-23 16:47:41.000000000 +0200
+@@ -1,6 +1,7 @@
+ project(libshiboken)
+
+ find_package(PythonLibs REQUIRED)
++find_package(PythonInterp REQUIRED)
+
+ set(libshiboken_MAJOR_VERSION ${shiboken_MAJOR_VERSION})
+ set(libshiboken_MINOR_VERSION ${shiboken_MINOR_VERSION})
+@@ -16,6 +17,16 @@
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/shiboken.pc" @ONLY)
+
++# Detect if the python libs were compiled in debug mode
++execute_process(
++ COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\
++ print sysconfig.get_config_var('Py_DEBUG')"
++ OUTPUT_VARIABLE PY_DEBUG
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
++if (PY_DEBUG)
++ add_definitions("-DPy_DEBUG")
++endif()
++
+ set(libshiboken_SRC
+ basewrapper.cpp
+ helper.cpp
Modified: packages/shiboken/trunk/debian/rules
===================================================================
--- packages/shiboken/trunk/debian/rules 2010-06-23 19:13:39 UTC (rev 13573)
+++ packages/shiboken/trunk/debian/rules 2010-06-23 22:26:48 UTC (rev 13574)
@@ -9,7 +9,7 @@
#### CONFIGURE ####
-override_dh_auto_configure: $(PYVERSIONS:%=override_dh_auto_configure-%)
+override_dh_auto_configure: $(PYVERSIONS:%=override_dh_auto_configure_dbg-%) $(PYVERSIONS:%=override_dh_auto_configure-%)
override_dh_auto_configure_dbg-%:
mkdir -p build-$*-dbg
@@ -33,7 +33,7 @@
#### BUILD ####
-override_dh_auto_build: $(PYVERSIONS:%=override_dh_auto_build-%)
+override_dh_auto_build: $(PYVERSIONS:%=override_dh_auto_build_dbg-%) $(PYVERSIONS:%=override_dh_auto_build-%)
override_dh_auto_build_dbg-%:
dh_auto_build --builddirectory=build-$*-dbg
@@ -46,7 +46,7 @@
#### INSTALL ####
-override_dh_auto_install: $(PYVERSIONS:%=override_dh_auto_install-%)
+override_dh_auto_install: $(PYVERSIONS:%=override_dh_auto_install_dbg-%) $(PYVERSIONS:%=override_dh_auto_install-%)
override_dh_auto_install_dbg-%:
dh_auto_install --builddirectory=build-$*-dbg --destdir=debian/tmp-dbg
@@ -60,14 +60,25 @@
#### TEST ####
-override_dh_auto_test: $(PYVERSIONS:%=override_dh_auto_test-%)
+override_dh_auto_test: $(PYVERSIONS:%=override_dh_auto_test_dbg-%) $(PYVERSIONS:%=override_dh_auto_test-%)
-override_dh_auto_test_dbg-%:
- dh_auto_test --builddirectory=build-$*-dbg
+override_dh_auto_test_dbg-%: prepare_debug_test-%
+ - dh_auto_test --builddirectory=build-$*-dbg
override_dh_auto_test-%: prepare_test-%
dh_auto_test --builddirectory=build-$*
+prepare_debug_test-%:
+ # Prepare the convenience symlinks for the tests
+ $(shell ln -s libother`echo -py$* | sed -e 's/\.//g' -`_d.so \
+ build-$*-dbg/tests/libother/libother.so )
+ $(shell ln -s libsample`echo -py$* | sed -e 's/\.//g' -`_d.so \
+ build-$*-dbg/tests/libsample/libsample.so )
+ $(shell ln -s other`echo -py$* | sed -e 's/\.//g' -`_d.so \
+ build-$*-dbg/tests/otherbinding/other.so )
+ $(shell ln -s sample`echo -py$* | sed -e 's/\.//g' -`_d.so \
+ build-$*-dbg/tests/samplebinding/sample.so )
+
prepare_test-%:
# Prepare the convenience symlinks for the tests
$(shell ln -s libother`echo -py$* | sed -e 's/\.//g' -`.so \
@@ -87,14 +98,31 @@
#### DEBIAN INSTALL ####
-override_dh_install:
- # Install symlinks for default version
+override_dh_install: override_dh_install_3
+
+override_dh_install_1:
+ # Setup the default version symbolic links
$(shell ln -s libshiboken_generator`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`.so \
debian/tmp/usr/lib/generatorrunner/libshiboken_generator.so )
$(shell ln -s libshiboken`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`.so \
debian/tmp/usr/lib/libshiboken.so )
+ # Setup the default version symbolic links for the debug build
+ $(shell ln -s libshiboken_generator`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`_d.so \
+ debian/tmp-dbg/usr/lib/generatorrunner/libshiboken_generator_d.so )
+ $(shell ln -s libshiboken`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`_d.so \
+ debian/tmp-dbg/usr/lib/libshiboken_d.so )
+
+override_dh_install_2: override_dh_install_1
+ # Do the legacy install for the rest
dh_install --list-missing
+ # Prepare dirs for debug
+ mkdir -p debian/shiboken-dbg/usr/lib/generatorrunner/
+override_dh_install_3: override_dh_install_2
+ # Move the debug build to the correct package
+ $(shell rename 's/debian\/tmp-dbg/debian\/shiboken-dbg/' \
+ debian/tmp-dbg/usr/lib/libshiboken*_d.so* debian/tmp-dbg/usr/lib/generatorrunner/*_d.so )
+
#### Shared libs ####
override_dh_makeshlibs:
# Package shiboken ships a usr/lib/generatorrunner/*.so plugin. No shared libs in there.
More information about the Python-modules-commits
mailing list