[Python-modules-commits] r13117 - in packages/shiboken/trunk/debian (6 files)

odyx-guest at users.alioth.debian.org odyx-guest at users.alioth.debian.org
Fri May 28 09:44:49 UTC 2010


    Date: Friday, May 28, 2010 @ 09:44:26
  Author: odyx-guest
Revision: 13117

Use the new dpkg-buildflags to use distro compiler options
  - Drop ftbfs_mips.patch
  + Add debian_buildoptions.patch

Added:
  packages/shiboken/trunk/debian/patches/debian_buildoptions.patch
Modified:
  packages/shiboken/trunk/debian/changelog
  packages/shiboken/trunk/debian/control
  packages/shiboken/trunk/debian/patches/series
  packages/shiboken/trunk/debian/rules
Deleted:
  packages/shiboken/trunk/debian/patches/ftbfs_mips.patch

Modified: packages/shiboken/trunk/debian/changelog
===================================================================
--- packages/shiboken/trunk/debian/changelog	2010-05-28 08:20:04 UTC (rev 13116)
+++ packages/shiboken/trunk/debian/changelog	2010-05-28 09:44:26 UTC (rev 13117)
@@ -1,3 +1,11 @@
+shiboken (0.3.1-3) unstable; urgency=low
+
+  * Use the new dpkg-buildflags to push standard compilation options.
+    - Drop ftbfs_mips.patch
+    - Add debian_buildoptions.patch
+
+ -- Didier Raboud <didier at raboud.com>  Fri, 28 May 2010 11:32:09 +0200
+
 shiboken (0.3.1-2) unstable; urgency=low
 
   * shiboken depends on generatorrunner (Closes: #581215)

Modified: packages/shiboken/trunk/debian/control
===================================================================
--- packages/shiboken/trunk/debian/control	2010-05-28 08:20:04 UTC (rev 13116)
+++ packages/shiboken/trunk/debian/control	2010-05-28 09:44:26 UTC (rev 13117)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Didier Raboud <didier at raboud.com>
-Build-Depends: dpkg-dev (>= 1.15.6), debhelper (>= 7.3.12), cmake (>= 2.6.0),
+Build-Depends: dpkg-dev (>= 1.15.7), debhelper (>= 7.3.12), cmake (>= 2.6.0),
 	libqt4-dev (>= 4.5.0), libapiextractor-dev (>= 0.5.1), generatorrunner (>= 0.4.2), libgenrunner-dev (>= 0.4.2),
 	libsparsehash-dev (>= 1.6),
 	python-all-dev, python-all-dbg,

Added: packages/shiboken/trunk/debian/patches/debian_buildoptions.patch
===================================================================
--- packages/shiboken/trunk/debian/patches/debian_buildoptions.patch	                        (rev 0)
+++ packages/shiboken/trunk/debian/patches/debian_buildoptions.patch	2010-05-28 09:44:26 UTC (rev 13117)
@@ -0,0 +1,37 @@
+Description: Allow pushing custom build options (see debian/rules)
+Author: Didier Raboud <didier at raboud.com>
+Origin: vendor
+Forwarded: not needed (distributor customization)
+Last-Update: 2010-05-28
+Index: shiboken/CMakeLists.txt
+===================================================================
+--- shiboken.orig/CMakeLists.txt	2010-05-28 08:54:14.000000000 +0200
++++ shiboken/CMakeLists.txt	2010-05-28 11:40:34.000000000 +0200
+@@ -17,15 +17,21 @@
+     set(CMAKE_BUILD_TYPE "Debug")
+ endif()
+ 
+-if (MSVC)
+-    set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DLIBSHIBOKEN_BUILD -D_SCL_SECURE_NO_WARNINGS")
+-else()
+-    if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+-        set(CMAKE_CXX_FLAGS "-Wall -Wno-strict-aliasing -DNDEBUG -O2 -Wl,-O1 -Wl,--hash-style=gnu -fvisibility=hidden")
++if (NOT CMAKE_CXX_FLAGS)
++    message("Debian: No CMAKE_CXX_FLAGS provided. Setting CMAKE_CXX_FLAGS defaults")
++    if (MSVC)
++        set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DLIBSHIBOKEN_BUILD -D_SCL_SECURE_NO_WARNINGS")
+     else()
+-        set(CMAKE_CXX_FLAGS "-g -Wall -Wno-strict-aliasing -fvisibility=hidden")
++        if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
++            set(CMAKE_CXX_FLAGS "-Wall -Wno-strict-aliasing -DNDEBUG -O2 -Wl,-O1 -Wl,--hash-style=gnu -fvisibility=hidden")
++        else()
++            set(CMAKE_CXX_FLAGS "-g -Wall -Wno-strict-aliasing -fvisibility=hidden")
++        endif()
+     endif()
++else()
++    message("Debian: CMAKE_CXX_FLAGS provided. Using those: '${CMAKE_CXX_FLAGS}'")
+ endif()
++
+ if (WIN32 OR AVOID_PROTECTED_HACK)
+     message(STATUS "Avoiding protected hack!")
+     add_definitions("-DAVOID_PROTECTED_HACK")

Deleted: packages/shiboken/trunk/debian/patches/ftbfs_mips.patch
===================================================================
--- packages/shiboken/trunk/debian/patches/ftbfs_mips.patch	2010-05-28 08:20:04 UTC (rev 13116)
+++ packages/shiboken/trunk/debian/patches/ftbfs_mips.patch	2010-05-28 09:44:26 UTC (rev 13117)
@@ -1,18 +0,0 @@
-Description: Fix FTBFS on MIPS/MIPSEL by forcing hash-style to both for all arches
-Author: Didier Raboud <didier at raboud.com>
-Origin: vendor
-Forwarded: not yet
-Last-Updated: 2010-05-20
-Index: shiboken/CMakeLists.txt
-===================================================================
---- shiboken.orig/CMakeLists.txt	2010-05-20 15:55:29.000000000 +0200
-+++ shiboken/CMakeLists.txt	2010-05-20 16:00:28.000000000 +0200
-@@ -21,7 +21,7 @@
-     set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DLIBSHIBOKEN_BUILD -D_SCL_SECURE_NO_WARNINGS")
- else()
-     if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
--        set(CMAKE_CXX_FLAGS "-Wall -Wno-strict-aliasing -DNDEBUG -O2 -Wl,-O1 -Wl,--hash-style=gnu -fvisibility=hidden")
-+        set(CMAKE_CXX_FLAGS "-Wall -Wno-strict-aliasing -DNDEBUG -O2 -Wl,-O1 -Wl,--hash-style=both -fvisibility=hidden")
-     else()
-         set(CMAKE_CXX_FLAGS "-g -Wall -Wno-strict-aliasing -fvisibility=hidden")
-     endif()

Modified: packages/shiboken/trunk/debian/patches/series
===================================================================
--- packages/shiboken/trunk/debian/patches/series	2010-05-28 08:20:04 UTC (rev 13116)
+++ packages/shiboken/trunk/debian/patches/series	2010-05-28 09:44:26 UTC (rev 13117)
@@ -1,4 +1,4 @@
 use_original_sparsehash.patch
 fix_tests.patch
-ftbfs_mips.patch
+debian_buildoptions.patch
 u_ftbfs_missing_file_44071543.patch

Modified: packages/shiboken/trunk/debian/rules
===================================================================
--- packages/shiboken/trunk/debian/rules	2010-05-28 08:20:04 UTC (rev 13116)
+++ packages/shiboken/trunk/debian/rules	2010-05-28 09:44:26 UTC (rev 13117)
@@ -7,6 +7,15 @@
 PYVERSIONS=$(shell pyversions -v -r)
 DEFAULT_PY=$(shell pyversions -v -d)
 
+# Get distro defaults
+COMMON_CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) # Normally: -g -O2
+COMMON_LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)   # Normally: <empty>
+
+# Push package customisations
+COMMON_CXXFLAGS += -Wall -Wno-strict-aliasing -fvisibility=hidden
+CXXFLAGS = ${COMMON_CXXFLAGS} -DNDEBUG ${COMMON_LDFLAGS}
+DEBUG_CXXFLAGS = ${COMMON_CXXFLAGS} ${COMMON_LDFLAGS}
+
 #### CONFIGURE ####
 
 override_dh_auto_configure: $(PYVERSIONS:%=override_dh_auto_configure-%)
@@ -15,6 +24,7 @@
 	mkdir -p build-$*-dbg
 	dh_auto_configure --builddirectory=build-$*-dbg -- \
 	-DCMAKE_BUILD_TYPE:STRING="Debug" \
+	-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
 	-DCMAKE_SKIP_RPATH=true \
 	-DCMAKE_MODULE_PATH="$(shell pwd)/debian/cmake" \
 	-DCMAKE_PYTHON_VERSION="$*-dbg;$*" \
@@ -25,6 +35,7 @@
 	mkdir -p build-$*
 	dh_auto_configure --builddirectory=build-$* -- \
 	-DCMAKE_BUILD_TYPE:STRING="Release" \
+	-DCMAKE_CXX_FLAGS="${DEBUG_CXXFLAGS}" \
 	-DCMAKE_SKIP_RPATH=true \
 	-DCMAKE_MODULE_PATH="$(shell pwd)/debian/cmake" \
 	-DCMAKE_PYTHON_VERSION=$* \




More information about the Python-modules-commits mailing list