[SCM] blender/master: debian/patches: patch set re-worked
mfv-guest at users.alioth.debian.org
mfv-guest at users.alioth.debian.org
Mon Mar 12 17:49:10 UTC 2012
The following commit has been merged in the master branch:
commit a0da813fadf350355b4e6e0fbcb9dfba792fe633
Author: Matteo F. Vescovi <mfv.debian at gmail.com>
Date: Tue Feb 21 22:22:49 2012 +0100
debian/patches: patch set re-worked
Git-Dch: Ignore
diff --git a/debian/patches/0001-blender_thumbnailer.patch b/debian/patches/0001-blender_thumbnailer.patch
index 2e35cd8..fc4ad3a 100644
--- a/debian/patches/0001-blender_thumbnailer.patch
+++ b/debian/patches/0001-blender_thumbnailer.patch
@@ -29,10 +29,10 @@ index 8b93eeb..a056852 100755
import struct
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 79a7f5b..27c13d7 100644
+index 1b4d88a..8bd89d6 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
-@@ -360,7 +360,7 @@ if(UNIX AND NOT APPLE)
+@@ -376,7 +376,7 @@ if(UNIX AND NOT APPLE)
)
install(
PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
@@ -41,4 +41,3 @@ index 79a7f5b..27c13d7 100644
)
install(
FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
---
diff --git a/debian/patches/0002-disable_tests.patch b/debian/patches/0002-disable_tests.patch
new file mode 100644
index 0000000..25dcb6a
--- /dev/null
+++ b/debian/patches/0002-disable_tests.patch
@@ -0,0 +1,21 @@
+From: Kevin Roy <kiniou at gmail.com>
+Date: Fri, 15 Apr 2011 19:44:00 +0200
+Subject: disable_tests
+
+added WITH_TESTS condition to implicitly disable
+---
+ source/CMakeLists.txt | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index 529aaac..eb1f32a 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -33,4 +33,6 @@ if(WINDOWS)
+ add_subdirectory(icons)
+ endif()
+
+-add_subdirectory(tests)
++if(WITH_TESTS)
++ add_subdirectory(tests)
++endif()
diff --git a/debian/patches/0003-disable_tests.patch b/debian/patches/0003-disable_tests.patch
deleted file mode 100644
index 9326a9b..0000000
--- a/debian/patches/0003-disable_tests.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Fri, 15 Apr 2011 19:44:00 +0200
-Subject: disable_tests
-
-added WITH_TESTS condition to implicitly disable
----
- source/CMakeLists.txt | 4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
-index 529aaac..eb1f32a 100644
---- a/source/CMakeLists.txt
-+++ b/source/CMakeLists.txt
-@@ -33,4 +33,6 @@ if(WINDOWS)
- add_subdirectory(icons)
- endif()
-
--add_subdirectory(tests)
-+if(WITH_TESTS)
-+ add_subdirectory(tests)
-+endif()
---
diff --git a/debian/patches/0003-install_in_usr_lib.patch b/debian/patches/0003-install_in_usr_lib.patch
new file mode 100644
index 0000000..e312328
--- /dev/null
+++ b/debian/patches/0003-install_in_usr_lib.patch
@@ -0,0 +1,39 @@
+From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+Date: Thu, 5 Jan 2012 09:50:48 +0100
+Subject: install_in_usr_lib
+
+ * Arch-specific files go to /usr/lib rather than /usr/share
+ * Make blender look for systemdir into /usr/lib instead of /usr/share
+---
+ intern/ghost/intern/GHOST_SystemPathsX11.cpp | 2 +-
+ source/creator/CMakeLists.txt | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+index 7261491..30ff1da 100644
+--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
++++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+@@ -47,7 +47,7 @@
+ #endif
+
+ #ifdef PREFIX
+-static const char *static_path= PREFIX "/share" ;
++static const char *static_path= PREFIX "/lib" ;
+ #else
+ static const char *static_path= NULL;
+ #endif
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index 8bd89d6..7a6a581 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -273,8 +273,8 @@ if(WITH_PYTHON)
+ endif()
+
+ install(
+- DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
+- DESTINATION ${TARGETDIR_VER}
++ DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/blender/scripts/
+ PATTERN ".svn" EXCLUDE
+ PATTERN "__pycache__" EXCLUDE
+ PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
diff --git a/debian/patches/0004-filter_docs_to_install.patch b/debian/patches/0004-filter_docs_to_install.patch
new file mode 100644
index 0000000..5e4b650
--- /dev/null
+++ b/debian/patches/0004-filter_docs_to_install.patch
@@ -0,0 +1,22 @@
+From: "Matteo F. Vescovi" <m.vescovi at revese.it>
+Date: Thu, 22 Dec 2011 18:13:03 +0100
+Subject: filter_docs_to_install
+
+Install relevant documentation
+---
+ source/creator/CMakeLists.txt | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index 7a6a581..7480ab8 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -218,8 +218,6 @@ else()
+ endif()
+
+ set(BLENDER_TEXT_FILES
+- ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
+- ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
+ ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
+ ${CMAKE_SOURCE_DIR}/release/text/readme.html
+ )
diff --git a/debian/patches/0004-install_in_usr_lib.patch b/debian/patches/0004-install_in_usr_lib.patch
deleted file mode 100644
index ae52185..0000000
--- a/debian/patches/0004-install_in_usr_lib.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Matteo F. Vescovi <mfv.debian at gmail.com>
-Date: Thu, 5 Jan 2012 09:50:48 +0100
-Subject: install_in_usr_lib
-
- * Arch-specific files go to /usr/lib rather than /usr/share
- * Make blender look for systemdir into /usr/lib instead of /usr/share
----
- intern/ghost/intern/GHOST_SystemPathsX11.cpp | 2 +-
- source/creator/CMakeLists.txt | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
-index 7261491..30ff1da 100644
---- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
-+++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
-@@ -47,7 +47,7 @@
- #endif
-
- #ifdef PREFIX
--static const char *static_path= PREFIX "/share" ;
-+static const char *static_path= PREFIX "/lib" ;
- #else
- static const char *static_path= NULL;
- #endif
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 27c13d7..e09fe05 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -257,8 +257,8 @@ if(WITH_PYTHON)
- endif()
-
- install(
-- DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
-- DESTINATION ${TARGETDIR_VER}
-+ DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
-+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/blender/scripts/
- PATTERN ".svn" EXCLUDE
- PATTERN "__pycache__" EXCLUDE
- PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
---
diff --git a/debian/patches/0005-filter_docs_to_install.patch b/debian/patches/0005-filter_docs_to_install.patch
deleted file mode 100644
index 4d8d3c9..0000000
--- a/debian/patches/0005-filter_docs_to_install.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Matteo F. Vescovi <m.vescovi at revese.it>
-Date: Thu, 22 Dec 2011 18:13:03 +0100
-Subject: filter_docs_to_install
-
-Install relevant documentation
----
- source/creator/CMakeLists.txt | 2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index e09fe05..033cbf0 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -206,8 +206,6 @@ else()
- endif()
-
- set(BLENDER_TEXT_FILES
-- ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
-- ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
- ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
- ${CMAKE_SOURCE_DIR}/release/text/readme.html
- )
---
diff --git a/debian/patches/0005-locales_directory_install.patch b/debian/patches/0005-locales_directory_install.patch
new file mode 100644
index 0000000..b5bb113
--- /dev/null
+++ b/debian/patches/0005-locales_directory_install.patch
@@ -0,0 +1,67 @@
+From: "Matteo F. Vescovi" <m.vescovi at revese.it>
+Date: Thu, 22 Dec 2011 18:17:18 +0100
+Subject: locales_directory_install
+
+Change where locales are installed
+---
+ source/blender/blenfont/intern/blf_lang.c | 2 +-
+ source/blender/blenlib/BLI_path_util.h | 1 +
+ source/blender/blenlib/intern/path_util.c | 3 +++
+ source/creator/CMakeLists.txt | 4 ++--
+ 4 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
+index d96011f..67d02dc 100644
+--- a/source/blender/blenfont/intern/blf_lang.c
++++ b/source/blender/blenfont/intern/blf_lang.c
+@@ -109,7 +109,7 @@ static const char *locales[] = {
+
+ void BLF_lang_init(void)
+ {
+- char *messagepath= BLI_get_folder(BLENDER_DATAFILES, "locale");
++ char *messagepath= BLI_get_folder(BLENDER_SYSTEM_LOCALE, NULL);
+
+ BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
+
+diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
+index 68bb1a7..ba1852e 100644
+--- a/source/blender/blenlib/BLI_path_util.h
++++ b/source/blender/blenlib/BLI_path_util.h
+@@ -62,6 +62,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
+ #define BLENDER_SYSTEM_SCRIPTS 53
+ #define BLENDER_SYSTEM_PLUGINS 54
+ #define BLENDER_SYSTEM_PYTHON 54
++#define BLENDER_SYSTEM_LOCALE 55
+
+ /* for BLI_get_folder_version only */
+ #define BLENDER_RESOURCE_PATH_USER 0
+diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
+index bbdb9bc..06043a5 100644
+--- a/source/blender/blenlib/intern/path_util.c
++++ b/source/blender/blenlib/intern/path_util.c
+@@ -1090,6 +1090,9 @@ char *BLI_get_folder(int folder_id, const char *subfolder)
+ if (get_path_local(path, "python", subfolder, ver)) break;
+ if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break;
+ return NULL;
++
++ case BLENDER_SYSTEM_LOCALE:
++ BLI_strncpy(path,"/usr/share/locale",FILE_MAX);break;
+ }
+
+ return path;
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index 7480ab8..b0469e6 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -285,9 +285,9 @@ endif()
+ if(WITH_INTERNATIONAL)
+ install(
+ DIRECTORY
+- ${CMAKE_SOURCE_DIR}/release/datafiles/locale
++ ${CMAKE_SOURCE_DIR}/release/datafiles/locale/
+ ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
+- DESTINATION ${TARGETDIR_VER}/datafiles
++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale
+ PATTERN ".svn" EXCLUDE
+ )
+ endif()
diff --git a/debian/patches/0006-locales_directory_install.patch b/debian/patches/0006-locales_directory_install.patch
deleted file mode 100644
index 935e803..0000000
--- a/debian/patches/0006-locales_directory_install.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From: Matteo F. Vescovi <m.vescovi at revese.it>
-Date: Thu, 22 Dec 2011 18:17:18 +0100
-Subject: locales_directory_install
-
-Change where locales are installed
----
- source/blender/blenfont/intern/blf_lang.c | 2 +-
- source/blender/blenlib/BLI_path_util.h | 1 +
- source/blender/blenlib/intern/path_util.c | 3 +++
- source/creator/CMakeLists.txt | 4 ++--
- 4 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
-index 2ba23e5..ec585af 100644
---- a/source/blender/blenfont/intern/blf_lang.c
-+++ b/source/blender/blenfont/intern/blf_lang.c
-@@ -101,7 +101,7 @@ static const char *locales[] = {
-
- void BLF_lang_init(void)
- {
-- char *messagepath= BLI_get_folder(BLENDER_DATAFILES, "locale");
-+ char *messagepath= BLI_get_folder(BLENDER_SYSTEM_LOCALE, NULL);
-
- BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
-
-diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
-index 68bb1a7..ba1852e 100644
---- a/source/blender/blenlib/BLI_path_util.h
-+++ b/source/blender/blenlib/BLI_path_util.h
-@@ -62,6 +62,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
- #define BLENDER_SYSTEM_SCRIPTS 53
- #define BLENDER_SYSTEM_PLUGINS 54
- #define BLENDER_SYSTEM_PYTHON 54
-+#define BLENDER_SYSTEM_LOCALE 55
-
- /* for BLI_get_folder_version only */
- #define BLENDER_RESOURCE_PATH_USER 0
-diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
-index e79d850..383e0e8 100644
---- a/source/blender/blenlib/intern/path_util.c
-+++ b/source/blender/blenlib/intern/path_util.c
-@@ -1088,6 +1088,9 @@ char *BLI_get_folder(int folder_id, const char *subfolder)
- if (get_path_local(path, "python", subfolder, ver)) break;
- if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break;
- return NULL;
-+
-+ case BLENDER_SYSTEM_LOCALE:
-+ BLI_strncpy(path,"/usr/share/locale",FILE_MAX);break;
- }
-
- return path;
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 033cbf0..4f84792 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -269,9 +269,9 @@ endif()
- if(WITH_INTERNATIONAL)
- install(
- DIRECTORY
-- ${CMAKE_SOURCE_DIR}/release/datafiles/locale
-+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale/
- ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
-- DESTINATION ${TARGETDIR_VER}/datafiles
-+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale
- PATTERN ".svn" EXCLUDE
- )
- endif()
---
diff --git a/debian/patches/0006-update_manpages.patch b/debian/patches/0006-update_manpages.patch
new file mode 100644
index 0000000..2afc5ae
--- /dev/null
+++ b/debian/patches/0006-update_manpages.patch
@@ -0,0 +1,174 @@
+From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+Date: Tue, 21 Feb 2012 21:34:30 +0100
+Subject: update_manpages
+
+ * Update blender manpage with current version
+ * Add blenderplayer manpage
+
+Signed-off-by: Kevin Roy <kiniou at gmail.com>
+---
+ doc/manpage/blenderplayer.1 | 131 +++++++++++++++++++++++++++++++++++++++++
+ source/creator/CMakeLists.txt | 5 +-
+ 2 files changed, 135 insertions(+), 1 deletions(-)
+ create mode 100644 doc/manpage/blenderplayer.1
+
+diff --git a/doc/manpage/blenderplayer.1 b/doc/manpage/blenderplayer.1
+new file mode 100644
+index 0000000..d15b0c9
+--- /dev/null
++++ b/doc/manpage/blenderplayer.1
+@@ -0,0 +1,131 @@
++.TH "BLENDERPLAYER" "1" "October 17, 2011" "Blender 2\&.60 (sub 0)"
++.SH "NAME"
++blenderplayer \- the blender game engine runner
++.SH "SYNOPSIS"
++usage: blenderplayer [\-w [w h l t]] [\-f [fw fh fb ff]] [\-g gamengineoptions] [\-s stereomode] [\-m aasamples] filename.blend
++.SH "DESCRIPTION"
++.B blenderplayer
++is the 3D and physics game engine
++.SH "OPTIONS"
++.PP
++.B -h
++: Prints this command summary
++.PP
++.B -w
++: display in a window
++ optional parameters
++ w = window width
++ h = window height
++ l = window left coordinate
++ t = window top coordinate
++ Note: If w or h is defined, both must be defined.
++ Also, if l or t is defined, all options must be used.
++.PP
++.B -f
++: start game in full screen mode
++ optional parameters
++ fw = full screen mode pixel width
++ fh = full screen mode pixel height
++ fb = full screen mode bits per pixel
++ ff = full screen mode frequency
++ Note: If fw or fh is defined, both must be defined.
++ Also, if fb is used, fw and fh must be used. ff requires all options.
++.PP
++.B -s
++: start player in stereo
++.PP
++ depending on the type of stereo you want:
++.PP
++ stereomode: hwpageflip
++ (Quad buffered shutter glasses)
++.PP
++ syncdoubling
++ (Above Below)
++.PP
++ sidebyside
++ (Left Right)
++.PP
++ anaglyph
++ (Red\-Blue glasses)
++.PP
++ vinterlace
++ (Vertical interlace for autostereo display)
++.PP
++.B -D
++: start player in dome mode
++.PP
++ Optional parameters:
++.PP
++ angle = field of view in degrees
++.PP
++ tilt = tilt angle in degrees
++.PP
++ warpdata = a file to use for warping the image (absolute path)
++.PP
++ mode = fisheye (Fisheye), truncatedfront (Front\-Truncated),
++ truncatedrear (Rear\-Truncated), cubemap(Cube Map),
++ sphericalpanoramic (Spherical Panoramic)
++.PP
++ depending on the type of dome you are using
++.PP
++.B -m
++: maximum anti-aliasing (eg. 2,4,8,16)
++.PP
++.B -i
++: parent windows ID
++.PP
++.B -d
++: turn debugging on
++.PP
++.B -g
++: game engine options
++.RS 4
++.TP 29
++Name
++Default Description
++.TP
++---------------------------
++------------------------------------
++.TP
++fixedtime
++0 "Enable all frames"
++.TP
++nomipmap
++0 Disable mipmaps
++.TP
++show_framerate
++0 Show the frame rate
++.TP
++show_properties
++0 Show debug properties
++.TP
++show_profile
++0 Show profiling information
++.TP
++blender_material
++0 Enable material settings
++.TP
++ignore_deprecation_warnings
++1 Ignore deprecation warnings
++.RE
++.PP
++.B -
++: all arguments after this are ignored, allowing python to access them from sys.argv
++.SH "EXAMPLES"
++.TP
++.B blenderplayer -w 320 200 10 10 -g noaudio //home//user//filename.blend
++Launch blenderplayer in window mode with size 320x200 at 10 pixels from left and 10 pixels
++from top of the screen without audio.
++.TP
++.B blenderplayer -g show_framerate = 0 //home//user//filename.blend
++Disable framerate reports.
++.TP
++.B blenderplayer -i 232421 -m 16 //home//user//filename.blend
++Launch blenderplayer embedded in an existing window and set antialiasing to 16.
++
++.SH "SEE ALSO"
++.B blender(1)
++
++.br
++.SH AUTHORS
++This manpage was written for a Debian GNU/Linux by Kevin Roy <kiniou at gmail.com>.
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index b0469e6..46b8fe3 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -314,6 +314,7 @@ if(UNIX AND NOT APPLE)
+ ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
+ ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
+ ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
++ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
+ DESTINATION ${TARGETDIR}
+ )
+
+@@ -377,7 +378,9 @@ if(UNIX AND NOT APPLE)
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/blender/scripts
+ )
+ install(
+- FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
++ FILES
++ ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
++ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
+ )
+ install(
diff --git a/debian/patches/0007-fix_FTBFS_with_ffmpeg_from_debian.patch b/debian/patches/0007-fix_FTBFS_with_ffmpeg_from_debian.patch
new file mode 100644
index 0000000..e2be5b8
--- /dev/null
+++ b/debian/patches/0007-fix_FTBFS_with_ffmpeg_from_debian.patch
@@ -0,0 +1,106 @@
+From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+Date: Tue, 21 Feb 2012 19:30:16 +0100
+Subject: fix_FTBFS_with_ffmpeg_from_debian
+
+avformat_alloc_output_context2() should be in
+the libavformat 53.2.0 but it isn't in Debian,
+so re-define it.
+
+Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>
+---
+ intern/ffmpeg/ffmpeg_compat.h | 62 ++++++++++++++++++++++++
+ source/blender/blenkernel/intern/writeffmpeg.c | 1 +
+ 2 files changed, 63 insertions(+), 0 deletions(-)
+
+diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
+index 582086d..156073f 100644
+--- a/intern/ffmpeg/ffmpeg_compat.h
++++ b/intern/ffmpeg/ffmpeg_compat.h
+@@ -35,6 +35,7 @@
+
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/rational.h>
++#include <libavutil/mathematics.h>
+ #include <libavutil/opt.h>
+
+ #if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
+@@ -49,6 +50,67 @@
+ #define FFMPEG_HAVE_AVIO 1
+ #endif
+
++#if (LIBAVFORMAT_VERSION_MAJOR < 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 21))
++/* XXX The last check above should be (LIBAVFORMAT_VERSION_MINOR < 2),
++ * look at http://patches.libav.org/patch/3333/ but ffmpeg in Debian is
++ * strange: 53.2.0 should have avformat_alloc_output_context2() but it does
++ * not.
++ */
++#include <libavutil/avstring.h>
++static int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *oformat,
++ const char *format, const char *filename)
++{
++ AVFormatContext *s = avformat_alloc_context();
++ int ret = 0;
++
++ *avctx = NULL;
++ if (!s)
++ goto nomem;
++
++ if (!oformat) {
++ if (format) {
++ oformat = av_guess_format(format, NULL, NULL);
++ if (!oformat) {
++ av_log(s, AV_LOG_ERROR, "Requested output format '%s' is not a suitable output format\n", format);
++ ret = AVERROR(EINVAL);
++ goto error;
++ }
++ } else {
++ oformat = av_guess_format(NULL, filename, NULL);
++ if (!oformat) {
++ ret = AVERROR(EINVAL);
++ av_log(s, AV_LOG_ERROR, "Unable to find a suitable output format for '%s'\n",
++ filename);
++ goto error;
++ }
++ }
++ }
++
++ s->oformat = oformat;
++ if (s->oformat->priv_data_size > 0) {
++ s->priv_data = av_mallocz(s->oformat->priv_data_size);
++ if (!s->priv_data)
++ goto nomem;
++ if (s->oformat->priv_class) {
++ *(const AVClass**)s->priv_data= s->oformat->priv_class;
++ av_opt_set_defaults(s->priv_data);
++ }
++ } else
++ s->priv_data = NULL;
++
++ if (filename)
++ av_strlcpy(s->filename, filename, sizeof(s->filename));
++ *avctx = s;
++ return 0;
++nomem:
++ av_log(s, AV_LOG_ERROR, "Out of memory\n");
++ ret = AVERROR(ENOMEM);
++error:
++ avformat_free_context(s);
++ return ret;
++}
++#endif
++
+ #if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1)) || ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR >= 121))
+ #define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
+ #endif
+diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
+index c4c3eb4..09ed61d 100644
+--- a/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/source/blender/blenkernel/intern/writeffmpeg.c
+@@ -36,6 +36,7 @@
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/rational.h>
++#include <libavutil/mathematics.h>
+ #include <libswscale/swscale.h>
+ #include <libavcodec/opt.h>
+
diff --git a/debian/patches/0007-update_manpages.patch b/debian/patches/0007-update_manpages.patch
deleted file mode 100644
index cce7831..0000000
--- a/debian/patches/0007-update_manpages.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-From: Matteo F. Vescovi <m.vescovi at revese.it>
-Date: Thu, 22 Dec 2011 18:24:53 +0100
-Subject: update_manpages
-
- * Update blender manpage with current version
- * Add blenderplayer manpage
----
- doc/manpage/blenderplayer.1 | 131 +++++++++++++++++++++++++++++++++++++++++
- source/creator/CMakeLists.txt | 5 +-
- 2 files changed, 135 insertions(+), 1 deletions(-)
- create mode 100644 doc/manpage/blenderplayer.1
-
-diff --git a/doc/manpage/blenderplayer.1 b/doc/manpage/blenderplayer.1
-new file mode 100644
-index 0000000..d15b0c9
---- /dev/null
-+++ b/doc/manpage/blenderplayer.1
-@@ -0,0 +1,131 @@
-+.TH "BLENDERPLAYER" "1" "October 17, 2011" "Blender 2\&.60 (sub 0)"
-+.SH "NAME"
-+blenderplayer \- the blender game engine runner
-+.SH "SYNOPSIS"
-+usage: blenderplayer [\-w [w h l t]] [\-f [fw fh fb ff]] [\-g gamengineoptions] [\-s stereomode] [\-m aasamples] filename.blend
-+.SH "DESCRIPTION"
-+.B blenderplayer
-+is the 3D and physics game engine
-+.SH "OPTIONS"
-+.PP
-+.B -h
-+: Prints this command summary
-+.PP
-+.B -w
-+: display in a window
-+ optional parameters
-+ w = window width
-+ h = window height
-+ l = window left coordinate
-+ t = window top coordinate
-+ Note: If w or h is defined, both must be defined.
-+ Also, if l or t is defined, all options must be used.
-+.PP
-+.B -f
-+: start game in full screen mode
-+ optional parameters
-+ fw = full screen mode pixel width
-+ fh = full screen mode pixel height
-+ fb = full screen mode bits per pixel
-+ ff = full screen mode frequency
-+ Note: If fw or fh is defined, both must be defined.
-+ Also, if fb is used, fw and fh must be used. ff requires all options.
-+.PP
-+.B -s
-+: start player in stereo
-+.PP
-+ depending on the type of stereo you want:
-+.PP
-+ stereomode: hwpageflip
-+ (Quad buffered shutter glasses)
-+.PP
-+ syncdoubling
-+ (Above Below)
-+.PP
-+ sidebyside
-+ (Left Right)
-+.PP
-+ anaglyph
-+ (Red\-Blue glasses)
-+.PP
-+ vinterlace
-+ (Vertical interlace for autostereo display)
-+.PP
-+.B -D
-+: start player in dome mode
-+.PP
-+ Optional parameters:
-+.PP
-+ angle = field of view in degrees
-+.PP
-+ tilt = tilt angle in degrees
-+.PP
-+ warpdata = a file to use for warping the image (absolute path)
-+.PP
-+ mode = fisheye (Fisheye), truncatedfront (Front\-Truncated),
-+ truncatedrear (Rear\-Truncated), cubemap(Cube Map),
-+ sphericalpanoramic (Spherical Panoramic)
-+.PP
-+ depending on the type of dome you are using
-+.PP
-+.B -m
-+: maximum anti-aliasing (eg. 2,4,8,16)
-+.PP
-+.B -i
-+: parent windows ID
-+.PP
-+.B -d
-+: turn debugging on
-+.PP
-+.B -g
-+: game engine options
-+.RS 4
-+.TP 29
-+Name
-+Default Description
-+.TP
-+---------------------------
-+------------------------------------
-+.TP
-+fixedtime
-+0 "Enable all frames"
-+.TP
-+nomipmap
-+0 Disable mipmaps
-+.TP
-+show_framerate
-+0 Show the frame rate
-+.TP
-+show_properties
-+0 Show debug properties
-+.TP
-+show_profile
-+0 Show profiling information
-+.TP
-+blender_material
-+0 Enable material settings
-+.TP
-+ignore_deprecation_warnings
-+1 Ignore deprecation warnings
-+.RE
-+.PP
-+.B -
-+: all arguments after this are ignored, allowing python to access them from sys.argv
-+.SH "EXAMPLES"
-+.TP
-+.B blenderplayer -w 320 200 10 10 -g noaudio //home//user//filename.blend
-+Launch blenderplayer in window mode with size 320x200 at 10 pixels from left and 10 pixels
-+from top of the screen without audio.
-+.TP
-+.B blenderplayer -g show_framerate = 0 //home//user//filename.blend
-+Disable framerate reports.
-+.TP
-+.B blenderplayer -i 232421 -m 16 //home//user//filename.blend
-+Launch blenderplayer embedded in an existing window and set antialiasing to 16.
-+
-+.SH "SEE ALSO"
-+.B blender(1)
-+
-+.br
-+.SH AUTHORS
-+This manpage was written for a Debian GNU/Linux by Kevin Roy <kiniou at gmail.com>.
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 4f84792..1987aa7 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -298,6 +298,7 @@ if(UNIX AND NOT APPLE)
- ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
- ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
- ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
-+ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
- DESTINATION ${TARGETDIR}
- )
-
-@@ -361,7 +362,9 @@ if(UNIX AND NOT APPLE)
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/blender/scripts
- )
- install(
-- FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
-+ FILES
-+ ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1
-+ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
- )
- install(
---
diff --git a/debian/patches/0008-do_not_use_version_number_in_the_system_path.patch b/debian/patches/0008-do_not_use_version_number_in_the_system_path.patch
new file mode 100644
index 0000000..2697d4a
--- /dev/null
+++ b/debian/patches/0008-do_not_use_version_number_in_the_system_path.patch
@@ -0,0 +1,32 @@
+From: Antonio Ospite <ospite at studenti.unina.it>
+Date: Fri, 6 Jan 2012 14:31:50 +0100
+Subject: do_not_use_version_number_in_the_system_path
+
+Global installation expects system patch to be something like
+/usr/lib/blender/scripts/ without version numbers.
+---
+ source/blender/blenlib/intern/path_util.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
+index 06043a5..c5e1146 100644
+--- a/source/blender/blenlib/intern/path_util.c
++++ b/source/blender/blenlib/intern/path_util.c
+@@ -89,7 +89,7 @@
+ # else /* new XDG ~/blender/.config/ */
+ # define BLENDER_USER_FORMAT "%s/blender/%s"
+ # endif // WITH_XDG_USER_DIRS
+-# define BLENDER_SYSTEM_FORMAT "%s/blender/%s"
++# define BLENDER_SYSTEM_FORMAT "%s/blender"
+ #endif
+
+ /* local */
+@@ -1027,7 +1027,7 @@ static int get_path_system(char *targetpath, const char *folder_name, const char
+
+ system_base_path = (const char *)GHOST_getSystemDir();
+ if (system_base_path) {
+- BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path, blender_version_decimal(ver));
++ BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path);
+ }
+
+ if(!system_path[0])
diff --git a/debian/patches/0008-fix_FTBFS_with_ffmpeg_from_debian.patch b/debian/patches/0008-fix_FTBFS_with_ffmpeg_from_debian.patch
deleted file mode 100644
index 9f5ba81..0000000
--- a/debian/patches/0008-fix_FTBFS_with_ffmpeg_from_debian.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From: Antonio Ospite <ospite at studenti.unina.it>
-Date: Sat, 17 Dec 2011 15:45:16 +0100
-Subject: fix_FTBFS_with_ffmpeg_from_debian
-
-avformat_alloc_output_context2() should be in the libavformat 53.2.0 but
-it isn't in Debian, re-define it.
-
-Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>
----
- intern/ffmpeg/ffmpeg_compat.h | 62 ++++++++++++++++++++++++
- source/blender/blenkernel/intern/writeffmpeg.c | 1 +
- 2 files changed, 63 insertions(+), 0 deletions(-)
-
-diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
-index dfdad22..bb07576 100644
---- a/intern/ffmpeg/ffmpeg_compat.h
-+++ b/intern/ffmpeg/ffmpeg_compat.h
-@@ -35,6 +35,7 @@
-
- #include <libavcodec/avcodec.h>
- #include <libavutil/rational.h>
-+#include <libavutil/mathematics.h>
-
- #if (LIBAVFORMAT_VERSION_MAJOR > 52) || ((LIBAVFORMAT_VERSION_MAJOR >= 52) && (LIBAVFORMAT_VERSION_MINOR >= 101))
- #define FFMPEG_HAVE_PARSE_UTILS 1
-@@ -48,6 +49,67 @@
- #define FFMPEG_HAVE_AVIO 1
- #endif
-
-+#if (LIBAVFORMAT_VERSION_MAJOR < 53) || ((LIBAVFORMAT_VERSION_MAJOR == 53) && (LIBAVFORMAT_VERSION_MINOR < 21))
-+/* XXX The last check above should be (LIBAVFORMAT_VERSION_MINOR < 2),
-+ * look at http://patches.libav.org/patch/3333/ but ffmpeg in Debian is
-+ * strange: 53.2.0 should have avformat_alloc_output_context2() but it does
-+ * not.
-+ */
-+#include <libavutil/avstring.h>
-+static int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *oformat,
-+ const char *format, const char *filename)
-+{
-+ AVFormatContext *s = avformat_alloc_context();
-+ int ret = 0;
-+
-+ *avctx = NULL;
-+ if (!s)
-+ goto nomem;
-+
-+ if (!oformat) {
-+ if (format) {
-+ oformat = av_guess_format(format, NULL, NULL);
-+ if (!oformat) {
-+ av_log(s, AV_LOG_ERROR, "Requested output format '%s' is not a suitable output format\n", format);
-+ ret = AVERROR(EINVAL);
-+ goto error;
-+ }
-+ } else {
-+ oformat = av_guess_format(NULL, filename, NULL);
-+ if (!oformat) {
-+ ret = AVERROR(EINVAL);
-+ av_log(s, AV_LOG_ERROR, "Unable to find a suitable output format for '%s'\n",
-+ filename);
-+ goto error;
-+ }
-+ }
-+ }
-+
-+ s->oformat = oformat;
-+ if (s->oformat->priv_data_size > 0) {
-+ s->priv_data = av_mallocz(s->oformat->priv_data_size);
-+ if (!s->priv_data)
-+ goto nomem;
-+ if (s->oformat->priv_class) {
-+ *(const AVClass**)s->priv_data= s->oformat->priv_class;
-+ av_opt_set_defaults(s->priv_data);
-+ }
-+ } else
-+ s->priv_data = NULL;
-+
-+ if (filename)
-+ av_strlcpy(s->filename, filename, sizeof(s->filename));
-+ *avctx = s;
-+ return 0;
-+nomem:
-+ av_log(s, AV_LOG_ERROR, "Out of memory\n");
-+ ret = AVERROR(ENOMEM);
-+error:
-+ avformat_free_context(s);
-+ return ret;
-+}
-+#endif
-+
- #if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && (LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1)) || ((LIBAVCODEC_VERSION_MAJOR == 52) && (LIBAVCODEC_VERSION_MINOR >= 121))
- #define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
- #endif
-diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
-index aa7d71b..2e2633b 100644
---- a/source/blender/blenkernel/intern/writeffmpeg.c
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c
-@@ -36,6 +36,7 @@
- #include <libavformat/avformat.h>
- #include <libavcodec/avcodec.h>
- #include <libavutil/rational.h>
-+#include <libavutil/mathematics.h>
- #include <libswscale/swscale.h>
- #include <libavcodec/opt.h>
-
---
diff --git a/debian/patches/0009-do_not_use_version_number_in_the_system_path.patch b/debian/patches/0009-do_not_use_version_number_in_the_system_path.patch
deleted file mode 100644
index ef5ddee..0000000
--- a/debian/patches/0009-do_not_use_version_number_in_the_system_path.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Antonio Ospite <ospite at studenti.unina.it>
-Date: Fri, 6 Jan 2012 14:31:50 +0100
-Subject: do_not_use_version_number_in_the_system_path
-
-Global installation expects system patch to be something like
-/usr/lib/blender/scripts/ without version numbers.
----
- source/blender/blenlib/intern/path_util.c | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
-index 383e0e8..ebe4e2a 100644
---- a/source/blender/blenlib/intern/path_util.c
-+++ b/source/blender/blenlib/intern/path_util.c
-@@ -89,7 +89,7 @@
- # else /* new XDG ~/blender/.config/ */
- # define BLENDER_USER_FORMAT "%s/blender/%s"
- # endif // WITH_XDG_USER_DIRS
--# define BLENDER_SYSTEM_FORMAT "%s/blender/%s"
-+# define BLENDER_SYSTEM_FORMAT "%s/blender"
- #endif
-
- /* local */
-@@ -1025,7 +1025,7 @@ static int get_path_system(char *targetpath, const char *folder_name, const char
-
- system_base_path = (const char *)GHOST_getSystemDir();
- if (system_base_path) {
-- BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path, blender_version_decimal(ver));
-+ BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path);
- }
-
- if(!system_path[0])
---
diff --git a/debian/patches/0009-look_for_droid_ttf_with_fontconfig.patch b/debian/patches/0009-look_for_droid_ttf_with_fontconfig.patch
new file mode 100644
index 0000000..540f84a
--- /dev/null
+++ b/debian/patches/0009-look_for_droid_ttf_with_fontconfig.patch
@@ -0,0 +1,270 @@
+From: "Matteo F. Vescovi" <mfv.debian at gmail.com>
+Date: Tue, 21 Feb 2012 19:51:50 +0100
+Subject: look_for_droid_ttf_with_fontconfig
+
+ * Remove bad installation of fonts directory into locales.
+ * Avoid using the droid font shipped with upstream source
+ and use fontconfig to get it.
+
+Signed-off-by: Kevin Roy <kiniou at gmail.com>
+---
+ CMakeLists.txt | 10 ++++
+ build_files/cmake/Modules/FindFontconfig.cmake | 49 ++++++++++++++++++++++
+ build_files/cmake/macros.cmake | 6 ++-
+ source/blender/blenfont/CMakeLists.txt | 7 +++
+ source/blender/blenfont/intern/blf_translation.c | 23 ++++++++++
+ source/blender/blenlib/BLI_fileops.h | 1 +
+ source/blender/blenlib/intern/fileops.c | 43 +++++++++++++++++++
+ source/creator/CMakeLists.txt | 1 -
+ 8 files changed, 138 insertions(+), 2 deletions(-)
+ create mode 100644 build_files/cmake/Modules/FindFontconfig.cmake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e0b14b7..139aed8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -117,6 +117,9 @@ option(WITH_BLENDER "Build blender (disable to build only the blender player)" O
+ mark_as_advanced(WITH_BLENDER)
+
+ option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
++if(UNIX AND NOT APPLE)
++ option(WITH_FONTCONFIG "Enable Fontconfig (discovering fonts installed on linux)" OFF)
++endif()
+
+ option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
+ option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default (recommend to leave off)" OFF)
+@@ -510,6 +513,13 @@ if(UNIX AND NOT APPLE)
+ endif()
+ endif()
+
++ if(WITH_FONTCONFIG)
++ find_package(Fontconfig)
++ if(NOT FONTCONFIG_FOUND)
++ set(WITH_FONTCONFIG OFF)
++ endif()
++ endif()
++
+ if(WITH_FFTW3)
+ find_package(Fftw3)
+ if(NOT FFTW3_FOUND)
+diff --git a/build_files/cmake/Modules/FindFontconfig.cmake b/build_files/cmake/Modules/FindFontconfig.cmake
+new file mode 100644
+index 0000000..337ece9
+--- /dev/null
++++ b/build_files/cmake/Modules/FindFontconfig.cmake
+@@ -0,0 +1,49 @@
++# - Try to find the Fontconfig
++# Once done this will define
++#
++# FONTCONFIG_FOUND - system has Fontconfig
++# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
++# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
++# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
++
++# Copyright (c) 2006,2007 Laurent Montel, <montel at kde.org>
++#
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
++
++
++if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
++
++ # in cache already
++ set(FONTCONFIG_FOUND TRUE)
++
++else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
++
++ if (NOT WIN32)
++ # use pkg-config to get the directories and then use these values
++ # in the FIND_PATH() and FIND_LIBRARY() calls
++ find_package(PkgConfig)
++ pkg_check_modules(FONTCONFIG fontconfig)
++
++ set(FONTCONFIG_DEFINITIONS ${FONTCONFIG_CFLAGS_OTHER})
++ endif (NOT WIN32)
++
++ find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
++ PATHS
++ ${FONTCONFIG_INCLUDEDIR}
++ ${FONTCONFIG_INCLUDE_DIRS}
++ /usr/X11/include
++ )
++
++ find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
++ PATHS
++ ${FONTCONFIG_LIBDIR}
++ ${FONTCONFIG_LIBRARY_DIRS}
++ )
++
++ include(FindPackageHandleStandardArgs)
++ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
++
++ mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
++
++endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
+diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
+index 406f253..ba88ea8 100644
+--- a/build_files/cmake/macros.cmake
++++ b/build_files/cmake/macros.cmake
+@@ -244,6 +244,10 @@ macro(setup_liblinks
+ endif()
+ endif()
+
++ if(WITH_FONTCONFIG)
++ target_link_libraries(${target} ${FONTCONFIG_LIBRARIES})
++ endif()
++
+ if(WITH_OPENAL)
+ target_link_libraries(${target} ${OPENAL_LIBRARY})
+ endif()
+@@ -677,4 +681,4 @@ macro(set_lib_path
+ endif()
+
+
+-endmacro()
+\ No newline at end of file
++endmacro()
+diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
+index ebf9ff4..550aa0d 100644
+--- a/source/blender/blenfont/CMakeLists.txt
++++ b/source/blender/blenfont/CMakeLists.txt
+@@ -57,6 +57,13 @@ if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+ endif()
+
++if(WITH_FONTCONFIG)
++ list(APPEND INC_SYS
++ ${FONTCONFIG_INCLUDE_DIRS}
++ )
++ add_definitions(-DWITH_FONTCONFIG)
++endif()
++
+ add_definitions(-DGLEW_STATIC)
+
+ blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
+diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
+index 0ddb654..83ed78b 100644
+--- a/source/blender/blenfont/intern/blf_translation.c
++++ b/source/blender/blenfont/intern/blf_translation.c
+@@ -57,13 +57,35 @@
+ #include "DNA_userdef_types.h" /* For user settings. */
+
+ #ifdef WITH_INTERNATIONAL
++#ifdef WITH_FONTCONFIG
++#include <fontconfig/fontconfig.h>
++#else
+ static const char unifont_filename[]="droidsans.ttf.gz";
++#endif
+ static unsigned char *unifont_ttf= NULL;
+ static int unifont_size= 0;
+
+ unsigned char *BLF_get_unifont(int *unifont_size_r)
+ {
+ if(unifont_ttf==NULL) {
++#ifdef WITH_FONTCONFIG
++ FcFontSet *fontset = NULL;
++ FcValue v;
++ FcPattern *pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Droid Sans",FC_STYLE, FcTypeString, "Regular", (char *) 0);
++ fontset = FcFontList(0,pattern,0);
++ if (fontset->nfont > 0) {
++ //get the file of the first font in the fontset that match pattern
++ FcPatternGet(fontset->fonts[0], FC_FILE, 0, &v);
++ //load the file stored in the union of FcValue into memory
++ unifont_ttf = (unsigned char*)BLI_file_to_mem(
++ (const char *)v.u.s,
++ &unifont_size
++ );
++ }
++ else {
++ printf("%s: 'Droid Sans Regular' font not found with fontconfig\n",__func__);
++ }
++#else
+ char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
+ if (fontpath) {
+ char unifont_path[1024];
+@@ -75,6 +97,7 @@ unsigned char *BLF_get_unifont(int *unifont_size_r)
+ else {
+ printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
+ }
++#endif
+ }
+
+ *unifont_size_r= unifont_size;
+diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
+index 2e8f1a5..0e66218 100644
+--- a/source/blender/blenlib/BLI_fileops.h
++++ b/source/blender/blenlib/BLI_fileops.h
+@@ -70,6 +70,7 @@ int BLI_file_touch(const char *file);
+
+ int BLI_file_gzip(const char *from, const char *to);
+ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r);
++char *BLI_file_to_mem(const char *from_file, int *size_r);
+
+ size_t BLI_file_descriptor_size(int file);
+ size_t BLI_file_size(const char *file);
+diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
+index ad04780..f902106 100644
+--- a/source/blender/blenlib/intern/fileops.c
++++ b/source/blender/blenlib/intern/fileops.c
+@@ -147,6 +147,49 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
+ return mem;
+ }
+
++/* read the file in from_file and write it to memory to_mem, at most size bytes.
++ return the file size
++ */
++char *BLI_file_to_mem(const char *from_file, int *size_r) {
++
++ FILE * file;
++ int readsize, size, alloc_size=0;
++ char *mem= NULL;
++ const int chunk_size= 512*1024;
++
++ size= 0;
++
++ file = fopen( from_file, "rb" );
++
++ for(;;) {
++ if(mem==NULL) {
++ mem= MEM_callocN(chunk_size, "BLI_file_to_mem");
++ alloc_size= chunk_size;
++ } else {
++ mem= MEM_reallocN(mem, size+chunk_size);
++ alloc_size+= chunk_size;
++ }
++
++ readsize= fread(mem+size, chunk_size,1,file);
++ if(readsize>0) {
++ size+= readsize;
++ }
++ else break;
++ }
++
++ if(size==0) {
++ MEM_freeN(mem);
++ mem= NULL;
++ }
++ else if(alloc_size!=size)
++ mem= MEM_reallocN(mem, size);
++
++ fclose(file);
++ *size_r= size;
++
++ return mem;
++
++}
+
+ /* return 1 when file can be written */
+ int BLI_file_is_writable(const char *filename)
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index 46b8fe3..f047426 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -286,7 +286,6 @@ if(WITH_INTERNATIONAL)
+ install(
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale/
+- ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale
+ PATTERN ".svn" EXCLUDE
+ )
diff --git a/debian/patches/0011-look_for_droid_ttf_with_fontconfig.patch b/debian/patches/0011-look_for_droid_ttf_with_fontconfig.patch
deleted file mode 100644
index 6589ece..0000000
--- a/debian/patches/0011-look_for_droid_ttf_with_fontconfig.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Wed, 25 Jan 2012 16:07:07 +0100
-Subject: look_for_droid_ttf_with_fontconfig
-
-* Remove bad installation of fonts directory into locales
-* Avoid using the droid font shipped with upstream source and
-use fontconfig to get it
----
- CMakeLists.txt | 10 ++++
- build_files/cmake/Modules/FindFontconfig.cmake | 49 ++++++++++++++++++++++
- build_files/cmake/macros.cmake | 5 ++
- source/blender/blenfont/CMakeLists.txt | 7 +++
- source/blender/blenfont/intern/blf_translation.c | 23 ++++++++++
- source/blender/blenlib/BLI_fileops.h | 1 +
- source/blender/blenlib/intern/fileops.c | 44 +++++++++++++++++++
- source/creator/CMakeLists.txt | 1 -
- 8 files changed, 139 insertions(+), 1 deletions(-)
- create mode 100644 build_files/cmake/Modules/FindFontconfig.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index eaa75dd..2ede279 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -117,6 +117,9 @@ option(WITH_BLENDER "Build blender (disable to build only the blender player)" O
- mark_as_advanced(WITH_BLENDER)
-
- option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
-+if(UNIX AND NOT APPLE)
-+ option(WITH_FONTCONFIG "Enable Fontconfig (discovering fonts installed on linux)" OFF)
-+endif()
-
- option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON)
- option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default (recommend to leave off)" OFF)
-@@ -492,6 +495,13 @@ if(UNIX AND NOT APPLE)
- endif()
- endif()
-
-+ if(WITH_FONTCONFIG)
-+ find_package(Fontconfig)
-+ if(NOT FONTCONFIG_FOUND)
-+ set(WITH_FONTCONFIG OFF)
-+ endif()
-+ endif()
-+
- if(WITH_FFTW3)
- find_package(Fftw3)
- if(NOT FFTW3_FOUND)
-diff --git a/build_files/cmake/Modules/FindFontconfig.cmake b/build_files/cmake/Modules/FindFontconfig.cmake
-new file mode 100644
-index 0000000..337ece9
---- /dev/null
-+++ b/build_files/cmake/Modules/FindFontconfig.cmake
-@@ -0,0 +1,49 @@
-+# - Try to find the Fontconfig
-+# Once done this will define
-+#
-+# FONTCONFIG_FOUND - system has Fontconfig
-+# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
-+# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
-+# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
-+
-+# Copyright (c) 2006,2007 Laurent Montel, <montel at kde.org>
-+#
-+# Redistribution and use is allowed according to the terms of the BSD license.
-+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-+
-+
-+if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
-+
-+ # in cache already
-+ set(FONTCONFIG_FOUND TRUE)
-+
-+else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
-+
-+ if (NOT WIN32)
-+ # use pkg-config to get the directories and then use these values
-+ # in the FIND_PATH() and FIND_LIBRARY() calls
-+ find_package(PkgConfig)
-+ pkg_check_modules(FONTCONFIG fontconfig)
-+
-+ set(FONTCONFIG_DEFINITIONS ${FONTCONFIG_CFLAGS_OTHER})
-+ endif (NOT WIN32)
-+
-+ find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
-+ PATHS
-+ ${FONTCONFIG_INCLUDEDIR}
-+ ${FONTCONFIG_INCLUDE_DIRS}
-+ /usr/X11/include
-+ )
-+
-+ find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
-+ PATHS
-+ ${FONTCONFIG_LIBDIR}
-+ ${FONTCONFIG_LIBRARY_DIRS}
-+ )
-+
-+ include(FindPackageHandleStandardArgs)
-+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
-+
-+ mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
-+
-+endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
-diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
-index c6a8340..6a06c58 100644
---- a/build_files/cmake/macros.cmake
-+++ b/build_files/cmake/macros.cmake
-@@ -244,6 +244,11 @@ macro(setup_liblinks
- endif()
- endif()
-
-+ if(WITH_FONTCONFIG)
-+ target_link_libraries(${target} ${FONTCONFIG_LIBRARIES})
-+ endif()
-+
-+
- if(WITH_OPENAL)
- target_link_libraries(${target} ${OPENAL_LIBRARY})
- endif()
-diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
-index d928297..1fce891 100644
---- a/source/blender/blenfont/CMakeLists.txt
-+++ b/source/blender/blenfont/CMakeLists.txt
-@@ -57,5 +57,12 @@ if(WITH_INTERNATIONAL)
- add_definitions(-DWITH_INTERNATIONAL)
- endif()
-
-+if(WITH_FONTCONFIG)
-+ list(APPEND INC_SYS
-+ ${FONTCONFIG_INCLUDE_DIRS}
-+ )
-+ add_definitions(-DWITH_FONTCONFIG)
-+endif()
-+
- blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
-
-diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
-index fe14f5d..8f89c8b 100644
---- a/source/blender/blenfont/intern/blf_translation.c
-+++ b/source/blender/blenfont/intern/blf_translation.c
-@@ -47,13 +47,35 @@
- #include "DNA_userdef_types.h" /* For user settings. */
-
- #ifdef WITH_INTERNATIONAL
-+#ifdef WITH_FONTCONFIG
-+#include <fontconfig/fontconfig.h>
-+#else
- static const char unifont_filename[]="droidsans.ttf.gz";
-+#endif
- static unsigned char *unifont_ttf= NULL;
- static int unifont_size= 0;
-
- unsigned char *BLF_get_unifont(int *unifont_size_r)
- {
- if(unifont_ttf==NULL) {
-+#ifdef WITH_FONTCONFIG
-+ FcFontSet *fontset = NULL;
-+ FcValue v;
-+ FcPattern *pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Droid Sans",FC_STYLE, FcTypeString, "Regular", (char *) 0);
-+ fontset = FcFontList(0,pattern,0);
-+ if (fontset->nfont > 0) {
-+ //get the file of the first font in the fontset that match pattern
-+ FcPatternGet(fontset->fonts[0], FC_FILE, 0, &v);
-+ //load the file stored in the union of FcValue into memory
-+ unifont_ttf = (unsigned char*)BLI_file_to_mem(
-+ (const char *)v.u.s,
-+ &unifont_size
-+ );
-+ }
-+ else {
-+ printf("%s: 'Droid Sans Regular' font not found with fontconfig\n",__func__);
-+ }
-+#else
- char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
- if (fontpath) {
- char unifont_path[1024];
-@@ -65,6 +87,7 @@ unsigned char *BLF_get_unifont(int *unifont_size_r)
- else {
- printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
- }
-+#endif
- }
-
- *unifont_size_r= unifont_size;
-diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
-index 2e8f1a5..0e66218 100644
---- a/source/blender/blenlib/BLI_fileops.h
-+++ b/source/blender/blenlib/BLI_fileops.h
-@@ -70,6 +70,7 @@ int BLI_file_touch(const char *file);
-
- int BLI_file_gzip(const char *from, const char *to);
- char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r);
-+char *BLI_file_to_mem(const char *from_file, int *size_r);
-
- size_t BLI_file_descriptor_size(int file);
- size_t BLI_file_size(const char *file);
-diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
-index 95b6a97..57f45dd 100644
---- a/source/blender/blenlib/intern/fileops.c
-+++ b/source/blender/blenlib/intern/fileops.c
-@@ -148,6 +148,50 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r)
- }
-
-
-+/* read the file in from_file and write it to memory to_mem, at most size bytes.
-+ return the file size
-+ */
-+char *BLI_file_to_mem(const char *from_file, int *size_r) {
-+
-+ FILE * file;
-+ int readsize, size, alloc_size=0;
-+ char *mem= NULL;
-+ const int chunk_size= 512*1024;
-+
-+ size= 0;
-+
-+ file = fopen( from_file, "rb" );
-+
-+ for(;;) {
-+ if(mem==NULL) {
-+ mem= MEM_callocN(chunk_size, "BLI_file_to_mem");
-+ alloc_size= chunk_size;
-+ } else {
-+ mem= MEM_reallocN(mem, size+chunk_size);
-+ alloc_size+= chunk_size;
-+ }
-+
-+ readsize= fread(mem+size, chunk_size,1,file);
-+ if(readsize>0) {
-+ size+= readsize;
-+ }
-+ else break;
-+ }
-+
-+ if(size==0) {
-+ MEM_freeN(mem);
-+ mem= NULL;
-+ }
-+ else if(alloc_size!=size)
-+ mem= MEM_reallocN(mem, size);
-+
-+ fclose(file);
-+ *size_r= size;
-+
-+ return mem;
-+
-+}
-+
- /* return 1 when file can be written */
- int BLI_file_is_writable(const char *filename)
- {
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 1987aa7..59cfe64 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -270,7 +270,6 @@ if(WITH_INTERNATIONAL)
- install(
- DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/datafiles/locale/
-- ${CMAKE_SOURCE_DIR}/release/datafiles/fonts
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale
- PATTERN ".svn" EXCLUDE
- )
---
diff --git a/debian/patches/series b/debian/patches/series
index 586db05..85eef24 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,13 +1,9 @@
0001-blender_thumbnailer.patch
-0002-fix_FTBFS_on_KFreeBSD.patch
-0003-disable_tests.patch
-0004-install_in_usr_lib.patch
-0005-filter_docs_to_install.patch
-0006-locales_directory_install.patch
-0007-update_manpages.patch
-0008-fix_FTBFS_with_ffmpeg_from_debian.patch
-0009-do_not_use_version_number_in_the_system_path.patch
-0010-fix_FTBFS_with_libmv.patch
-0011-look_for_droid_ttf_with_fontconfig.patch
-0012-fix_implicit_declaration_of_av_rescale_q.patch
-0013-fix_implicit_declaration_of_guardealloc.patch
+0002-disable_tests.patch
+0003-install_in_usr_lib.patch
+0004-filter_docs_to_install.patch
+0005-locales_directory_install.patch
+0006-update_manpages.patch
+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
--
blender packaging
More information about the pkg-multimedia-commits
mailing list