Package: blender
Severity: normal
Version: 2.63a-1
User: debian-pyt...@lists.debian.org
Usertags: python3.3
Tags: patch

Blender does not build against default python3 version, instead
python3.2 is hardcoded.

On the same topic, dh_python3 helper is not used (which is the helper
that supersedes python-[central|support])

There are a couple of ways to fix this. My proposed solution:
* build-depends on python3-dev (default dev package for the default
python3)
* uses pkg-config to find include directories (in python3.3 in debian
there are two include directories, and cmake's standard helper doesn't
find them)
* migrate to use dh_python3

I hope you find this patch useful. Alternatively you can implement
building against default python3 & python3.3 in other ways.

diff -Nru blender-2.63a/debian/changelog blender-2.63a/debian/changelog
--- blender-2.63a/debian/changelog	2012-09-09 18:16:50.000000000 +0000
+++ blender-2.63a/debian/changelog	2012-10-25 16:08:02.000000000 +0000
@@ -1,3 +1,11 @@
+blender (2.63a-1ubuntu2) raring-proposed; urgency=low
+
+  * Build-depend on python3-dev rather than python3.2-dev.
+  * Call dh_python3
+  * Use pkg-config to find python3.3 includes.
+
+ -- Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com>  Thu, 25 Oct 2012 12:37:55 +0100
+
 blender (2.63a-1ubuntu1) quantal; urgency=low
 
   * Build-depend on libtiff-dev rather than libtiff4-dev.
diff -Nru blender-2.63a/debian/control blender-2.63a/debian/control
--- blender-2.63a/debian/control	2012-09-09 18:16:48.000000000 +0000
+++ blender-2.63a/debian/control	2012-10-25 11:38:35.000000000 +0000
@@ -36,8 +36,7 @@
                libz-dev,
                libfontconfig-dev,
                pkg-config,
-               python-support,
-               python3.2-dev
+               python3-dev
 Build-Conflicts: nvidia-glx
 Standards-Version: 3.9.3
 Homepage: http://blender.org
@@ -46,7 +45,7 @@
 
 Package: blender
 Architecture: any
-Depends: python3.2,
+Depends: ${python3:Depends},
          fonts-droid,
          ${misc:Depends},
          ${shlibs:Depends}
diff -Nru blender-2.63a/debian/patches/fix-ftbfs-python-3.3.patch blender-2.63a/debian/patches/fix-ftbfs-python-3.3.patch
--- blender-2.63a/debian/patches/fix-ftbfs-python-3.3.patch	1970-01-01 00:00:00.000000000 +0000
+++ blender-2.63a/debian/patches/fix-ftbfs-python-3.3.patch	2012-10-25 15:16:31.000000000 +0000
@@ -0,0 +1,35 @@
+Description: fix ftbfs with python3.3
+ Using pkg-config to lookup flags
+Author: Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com>
+Forwarded: not yet
+Last-Update: 2012-10-25
+
+Index: b/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -482,7 +482,8 @@
+ 
+ 		# Use our own instead, since wothout py is such a rare case,
+ 		# require this package
+-		find_package(PythonLibsUnix REQUIRED)
++		include(FindPkgConfig)
++		pkg_check_modules(PYTHON python3)
+ 	endif()
+ 
+ 
+@@ -1614,7 +1615,13 @@
+ # with _any_ library but since we used a fixed python version this tends to
+ # be most problematic.
+ if(WITH_PYTHON)
+-	if(NOT EXISTS "${PYTHON_INCLUDE_DIR}/Python.h")
++	set(PYTHON_H "")
++	foreach(includedir ${PYTHON_INCLUDE_DIRS})
++		if(EXISTS "${includedir}/Python.h")
++			set(PYTHON_H ${includedir})
++		endif()
++	endforeach(includedir)
++	if(NOT PYTHON_H)
+ 		message(FATAL_ERROR "Missing: \"${PYTHON_INCLUDE_DIR}/Python.h\",\n"
+ 							"Set the cache entry 'PYTHON_INCLUDE_DIR' to point "
+ 							"to a valid python include path. Containing "
diff -Nru blender-2.63a/debian/patches/series blender-2.63a/debian/patches/series
--- blender-2.63a/debian/patches/series	2012-05-12 18:00:33.000000000 +0000
+++ blender-2.63a/debian/patches/series	2012-10-25 12:02:32.000000000 +0000
@@ -7,3 +7,4 @@
 0007-fix_FTBFS_with_ffmpeg_from_debian.patch
 0008-do_not_use_version_number_in_the_system_path.patch
 0009-look_for_droid_ttf_with_fontconfig.patch
+fix-ftbfs-python-3.3.patch
diff -Nru blender-2.63a/debian/pyversions blender-2.63a/debian/pyversions
--- blender-2.63a/debian/pyversions	2012-05-12 16:55:53.000000000 +0000
+++ blender-2.63a/debian/pyversions	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-3.2
diff -Nru blender-2.63a/debian/rules blender-2.63a/debian/rules
--- blender-2.63a/debian/rules	2012-05-12 16:55:53.000000000 +0000
+++ blender-2.63a/debian/rules	2012-10-25 11:37:40.000000000 +0000
@@ -52,7 +52,6 @@
 	#remove duplicated GPL license file and unneeded Python license since python is shipped externally
 	#rm $(INSTDIR)/usr/share/doc/blender/GPL-license.txt
 	#rm $(INSTDIR)/usr/share/doc/blender/Python-license.txt
-	
 
 override_dh_install:
 	dh_install --fail-missing --list-missing
@@ -60,9 +59,5 @@
 override_dh_strip:
 	dh_strip --dbg-package=blender-dbg
 
-override_dh_pysupport:
-	# Not supported yet: dh_pysupport -V 3.1
-	#dh_pysupport -V 3.1
-
 %:
-	dh --buildsystem=cmake --parallel=$(PROCESSORS) $@
+	dh $@ --buildsystem=cmake --parallel=$(PROCESSORS) --with python3
Regards,

Dmitrijs.
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to