[SCM] blender/master: debian/patches/: patchset updated
mfv at users.alioth.debian.org
mfv at users.alioth.debian.org
Mon Jul 20 08:26:46 UTC 2015
The following commit has been merged in the master branch:
commit efa94e9c38dd7a269a08407d4cacc9313db557d7
Author: Matteo F. Vescovi <mfv at debian.org>
Date: Sat Jul 18 22:16:01 2015 +0200
debian/patches/: patchset updated
- 0003-filter_docs_to_install.patch dropped
- #0004 renamed to #0003
- #0005 renamed to #0004
- #0006 renamed to #0005
- #0008 renamed to #0006
- 0007-look_for_droid_ttf_with_fontconfig.patch improved
diff --git a/debian/patches/0003-filter_docs_to_install.patch b/debian/patches/0003-filter_docs_to_install.patch
deleted file mode 100644
index 2991e8c..0000000
--- a/debian/patches/0003-filter_docs_to_install.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: "Matteo F. Vescovi" <mfv at debian.org>
-Date: Thu, 8 Jan 2015 12:39:04 +0100
-Subject: filter_docs_to_install
-
-Install only relevant documentation.
----
- source/creator/CMakeLists.txt | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index fad5a6e..c914eac 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -242,8 +242,6 @@ endif()
- # Post build steps for bundling/packaging.
-
- 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
- ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt
diff --git a/debian/patches/0004-locales_directory_install.patch b/debian/patches/0003-locales_directory_install.patch
similarity index 79%
rename from debian/patches/0004-locales_directory_install.patch
rename to debian/patches/0003-locales_directory_install.patch
index 3915e2a..81fe3af 100644
--- a/debian/patches/0004-locales_directory_install.patch
+++ b/debian/patches/0003-locales_directory_install.patch
@@ -1,5 +1,5 @@
From: "Matteo F. Vescovi" <mfv at debian.org>
-Date: Fri, 3 Apr 2015 09:42:30 +0200
+Date: Fri, 17 Jul 2015 22:10:32 +0200
Subject: locales_directory_install
Change where locales are installed.
@@ -9,8 +9,9 @@ Contributions by:
---
source/blender/blenfont/intern/blf_lang.c | 10 +++++-----
source/blender/blenkernel/BKE_appdir.h | 1 +
+ source/blender/blenkernel/intern/appdir.c | 3 +++
source/creator/CMakeLists.txt | 4 ++--
- 3 files changed, 8 insertions(+), 7 deletions(-)
+ 4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 99e1aa5..4a8b0d6 100644
@@ -67,11 +68,25 @@ index 5e42f17..d6838bc 100644
};
/* for BKE_appdir_folder_id_version only */
+diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
+index 60e8100..d7605d5 100644
+--- a/source/blender/blenkernel/intern/appdir.c
++++ b/source/blender/blenkernel/intern/appdir.c
+@@ -399,6 +399,9 @@ const char *BKE_appdir_folder_id(const int folder_id, const char *subfolder)
+ 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;
++
+ default:
+ BLI_assert(0);
+ break;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index c914eac..2b11015 100644
+index fad5a6e..178cdcf 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
-@@ -327,11 +327,11 @@ if(WITH_INTERNATIONAL)
+@@ -329,11 +329,11 @@ if(WITH_INTERNATIONAL)
install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/datafiles/fonts
diff --git a/debian/patches/0005-update_manpages.patch b/debian/patches/0004-update_manpages.patch
similarity index 97%
rename from debian/patches/0005-update_manpages.patch
rename to debian/patches/0004-update_manpages.patch
index 136d036..2083c6b 100644
--- a/debian/patches/0005-update_manpages.patch
+++ b/debian/patches/0004-update_manpages.patch
@@ -148,10 +148,10 @@ index 0000000..d15b0c9
+.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 2b11015..25cf67d 100644
+index 178cdcf..30af58d 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
-@@ -425,6 +425,7 @@ if(UNIX AND NOT APPLE)
+@@ -427,6 +427,7 @@ if(UNIX AND NOT APPLE)
FILES
${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
@@ -159,7 +159,7 @@ index 2b11015..25cf67d 100644
DESTINATION "."
)
-@@ -457,6 +458,10 @@ if(UNIX AND NOT APPLE)
+@@ -459,6 +460,10 @@ if(UNIX AND NOT APPLE)
FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1
DESTINATION share/man/man1
)
diff --git a/debian/patches/0006-do_not_use_version_number_in_system_path.patch b/debian/patches/0005-do_not_use_version_number_in_system_path.patch
similarity index 95%
rename from debian/patches/0006-do_not_use_version_number_in_system_path.patch
rename to debian/patches/0005-do_not_use_version_number_in_system_path.patch
index 802e71a..8d26ad3 100644
--- a/debian/patches/0006-do_not_use_version_number_in_system_path.patch
+++ b/debian/patches/0005-do_not_use_version_number_in_system_path.patch
@@ -28,10 +28,10 @@ index e2d9733..ec0e691 100644
if (static_path) {
static string system_path = string(static_path) + "/blender/" + versionstr;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 25cf67d..9e8777a 100644
+index 30af58d..7551c3e 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
-@@ -265,7 +265,7 @@ if(UNIX AND NOT APPLE)
+@@ -267,7 +267,7 @@ if(UNIX AND NOT APPLE)
if(WITH_PYTHON_MODULE)
set(TARGETDIR_VER ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${BLENDER_VERSION})
else()
diff --git a/debian/patches/0008-blender_desktop.patch b/debian/patches/0006-blender_desktop.patch
similarity index 100%
rename from debian/patches/0008-blender_desktop.patch
rename to debian/patches/0006-blender_desktop.patch
diff --git a/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch b/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
index 3e16710..18144df 100644
--- a/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
+++ b/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
@@ -1,25 +1,37 @@
From: "Matteo F. Vescovi" <mfv at debian.org>
-Date: Fri, 3 Apr 2015 09:50:43 +0200
+Date: Sat, 18 Jul 2015 22:14:52 +0200
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 | 7 ++++
- build_files/cmake/macros.cmake | 3 ++
+ CMakeLists.txt | 11 ++++++
+ build_files/cmake/Modules/FindFontconfig.cmake | 48 ++++++++++++++++++++++++
+ build_files/cmake/macros.cmake | 6 +++
source/blender/blenfont/CMakeLists.txt | 7 ++++
- source/blender/blenfont/intern/blf_translation.c | 23 +++++++++++++
+ source/blender/blenfont/intern/blf_translation.c | 44 +++++++++++++++++++++-
source/blender/blenlib/BLI_fileops.h | 1 +
- source/blender/blenlib/intern/fileops.c | 44 ++++++++++++++++++++++++
- source/creator/CMakeLists.txt | 6 ----
- 7 files changed, 85 insertions(+), 6 deletions(-)
+ source/blender/blenlib/intern/fileops.c | 43 +++++++++++++++++++++
+ source/creator/CMakeLists.txt | 6 ---
+ 8 files changed, 159 insertions(+), 7 deletions(-)
+ create mode 100644 build_files/cmake/Modules/FindFontconfig.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b52dd05..08529c5 100644
+index b52dd05..4f59c65 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -872,6 +872,13 @@ if(UNIX AND NOT APPLE)
+@@ -192,6 +192,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" ON)
+@@ -872,6 +875,13 @@ if(UNIX AND NOT APPLE)
endif()
endif()
@@ -33,11 +45,83 @@ index b52dd05..08529c5 100644
# Codecs
if(WITH_CODEC_SNDFILE)
find_package_wrapper(SndFile)
+@@ -2847,6 +2857,7 @@ if(FIRST_RUN)
+
+ info_cfg_text("Other:")
+ info_cfg_option(WITH_OPENNL)
++ info_cfg_option(WITH_FONTCONFIG)
+
+ # debug
+ message(STATUS "HAVE_STDBOOL_H = ${HAVE_STDBOOL_H}")
+diff --git a/build_files/cmake/Modules/FindFontconfig.cmake b/build_files/cmake/Modules/FindFontconfig.cmake
+new file mode 100644
+index 0000000..7dc09f3
+--- /dev/null
++++ b/build_files/cmake/Modules/FindFontconfig.cmake
+@@ -0,0 +1,48 @@
++# 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 33c7644..73e3a86 100644
+index 33c7644..ab5ec3a 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
-@@ -324,6 +324,9 @@ macro(setup_liblinks
+@@ -284,6 +284,9 @@ macro(SETUP_LIBDIRS)
+ if(WITH_MEM_JEMALLOC)
+ link_directories(${JEMALLOC_LIBPATH})
+ endif()
++ if(WITH_FONTCONFIG)
++ link_directories(${FONTCONFIG_LIBPATH})
++ endif()
+
+ if(WIN32 AND NOT UNIX)
+ link_directories(${PTHREADS_LIBPATH})
+@@ -324,6 +327,9 @@ macro(setup_liblinks
if(WITH_SYSTEM_GLEW)
target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
endif()
@@ -66,10 +150,10 @@ index 392a9ed..deb1f3c 100644
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 2a4a152..7fd4b5c 100644
+index 2a4a152..bb4e226 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
-@@ -52,7 +52,11 @@
+@@ -52,10 +52,14 @@
#include "boost_locale_wrapper.h"
@@ -77,10 +161,14 @@ index 2a4a152..7fd4b5c 100644
+#include <fontconfig/fontconfig.h>
+#else
static const char unifont_filename[] = "droidsans.ttf.gz";
++static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz";
+#endif
static unsigned char *unifont_ttf = NULL;
static int unifont_size = 0;
- static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz";
+-static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz";
+ static unsigned char *unifont_mono_ttf = NULL;
+ static int unifont_mono_size = 0;
+ #endif /* WITH_INTERNATIONAL */
@@ -64,6 +68,24 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
{
#ifdef WITH_INTERNATIONAL
@@ -88,104 +176,136 @@ index 2a4a152..7fd4b5c 100644
+#ifdef WITH_FONTCONFIG
+ FcFontSet *fontset = NULL;
+ FcValue v;
-+ FcPattern *pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Droid Sans",FC_STYLE, FcTypeString, "Regular", (char *) 0);
++ 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
++ // 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
++ // 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__);
++ printf("%s: 'Droid Sans Regular' font not found with fontconfig\n", __func__);
+ }
+#else
const char * const fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts");
if (fontpath) {
char unifont_path[1024];
-@@ -74,6 +96,7 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
- }
+@@ -75,6 +97,7 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
else {
printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
+ }
+#endif
+ }
+
+ *r_unifont_size = unifont_size;
+@@ -99,6 +122,24 @@ unsigned char *BLF_get_unifont_mono(int *r_unifont_size)
+ {
+ #ifdef WITH_INTERNATIONAL
+ if (unifont_mono_ttf == NULL) {
++#ifdef WITH_FONTCONFIG
++ FcFontSet *fontset = NULL;
++ FcValue v;
++ FcPattern *pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Droid Sans Mono", 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_mono_ttf = (unsigned char*)BLI_file_to_mem(
++ (const char *)v.u.s,
++ &unifont_mono_size
++ );
++ }
++ else {
++ printf("%s: 'Droid Sans Mono' font not found with fontconfig\n", __func__);
++ }
++#else
+ const char *fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts");
+ if (fontpath) {
+ char unifont_path[1024];
+@@ -110,6 +151,7 @@ unsigned char *BLF_get_unifont_mono(int *r_unifont_size)
+ else {
+ printf("%s: 'fonts' data path not found for international monospace font, continuing\n", __func__);
}
++#endif
}
+ *r_unifont_size = unifont_mono_size;
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
-index 7898a54..7db1d2e 100644
+index 7898a54..0be8666 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -89,6 +89,7 @@ bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void BLI_dir_create_recursive(const char *dir) ATTR_NONNULL();
double BLI_dir_free_space(const char *dir) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
char *BLI_current_working_dir(char *dir, const size_t maxlen) ATTR_NONNULL();
-+char *BLI_file_to_mem(const char *from_file, int *size_r);
++char *BLI_file_to_mem(const char *from_file, int *size_r) ATTR_NONNULL();
/* Filelist */
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
-index d6fe5e5..52e2c33 100644
+index d6fe5e5..beb01da 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
-@@ -159,6 +159,50 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
+@@ -159,6 +159,49 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
return mem;
}
-+/* read the file in from_file and write it to memory to_mem, at most size bytes.
-+ return the file size
-+ */
++/* 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;
++ int readsize, size, alloc_size = 0;
++ char *mem = NULL;
++ const int chunk_size = 512*1024;
+
+ size= 0;
+
-+ file = fopen( from_file, "rb" );
++ file = fopen(from_file, "rb");
+
+ for(;;) {
-+ if(mem==NULL) {
-+ mem= MEM_callocN(chunk_size, "BLI_file_to_mem");
-+ alloc_size= chunk_size;
++ 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;
++ mem = MEM_reallocN(mem, size+chunk_size);
++ alloc_size += chunk_size;
+ }
+
-+ readsize= fread(mem+size, 1, chunk_size, file);
-+ if(readsize>0) {
-+ size+= readsize;
++ readsize = fread(mem+size, 1, chunk_size, file);
++ if(readsize > 0) {
++ size += readsize;
+ }
+ else break;
+ }
+
-+ if(size==0) {
++ if(size == 0) {
+ MEM_freeN(mem);
-+ mem= NULL;
++ mem = NULL;
+ }
-+ else if(alloc_size!=size)
-+ mem= MEM_reallocN(mem, size);
++ else if(alloc_size != size)
++ mem = MEM_reallocN(mem, size);
+
+ fclose(file);
-+ *size_r= size;
++ *size_r = size;
+
+ return mem;
-+
+}
+
/**
* Returns true if the file with the specified name can be written.
* This implementation uses access(2), which makes the check according
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 9e8777a..2279826 100644
+index 7551c3e..f808402 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
-@@ -324,12 +324,6 @@ endif()
+@@ -326,12 +326,6 @@ endif()
# localization
if(WITH_INTERNATIONAL)
diff --git a/debian/patches/series b/debian/patches/series
index bddec51..6cc6086 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,7 @@
0001-blender_thumbnailer.patch
0002-install_in_usr_share.patch
-0003-filter_docs_to_install.patch
-0004-locales_directory_install.patch
-0005-update_manpages.patch
-0006-do_not_use_version_number_in_system_path.patch
+0003-locales_directory_install.patch
+0004-update_manpages.patch
+0005-do_not_use_version_number_in_system_path.patch
+0006-blender_desktop.patch
0007-look_for_droid_ttf_with_fontconfig.patch
-0008-blender_desktop.patch
--
blender packaging
More information about the pkg-multimedia-commits
mailing list