[blender: 1/2] New upstream release

Jochen Schmitt s4504kr at fedoraproject.org
Wed May 15 21:21:30 UTC 2013


commit 7e489cf8f29f713d27b1b5bc399f6f3adf240463
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Wed May 15 23:14:37 2013 +0200

    New upstream release
    
    - Add subpackage for international mono space font

 .gitignore                 |    1 +
 blender-2.66-dbgedit.patch |   12 ------
 blender-2.66-droid.patch   |   81 -----------------------------------------
 blender-2.66-syspath.patch |   54 ---------------------------
 blender-2.67-droid.patch   |   86 ++++++++++++++++++++++++++++++++++++++++++++
 blender-2.67-syspath.patch |   12 ++++++
 blender.spec               |   42 +++++++++++++++++-----
 sources                    |    2 +-
 8 files changed, 133 insertions(+), 157 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index afb9690..87613e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@ blender-2.49b-repack.tar.bz2
 /blender-2.65a.tar.gz
 /blender-2.66.tar.gz
 /blender-2.66a.tar.gz
+/blender-2.67.tar.gz
diff --git a/blender-2.67-droid.patch b/blender-2.67-droid.patch
new file mode 100644
index 0000000..a23fe81
--- /dev/null
+++ b/blender-2.67-droid.patch
@@ -0,0 +1,86 @@
+diff -up blender-2.67/source/blender/blenfont/intern/blf_translation.c.droid blender-2.67/source/blender/blenfont/intern/blf_translation.c
+--- blender-2.67/source/blender/blenfont/intern/blf_translation.c.droid	2013-03-20 19:42:09.000000000 +0100
++++ blender-2.67/source/blender/blenfont/intern/blf_translation.c	2013-05-08 17:32:21.494426968 +0200
+@@ -47,7 +47,7 @@
+ 
+ #include "boost_locale_wrapper.h"
+ 
+-static const char unifont_filename[] = "droidsans.ttf.gz";
++static const char unifont_filename[] = "droidsans.ttf";
+ static unsigned char *unifont_ttf = NULL;
+ static int unifont_size = 0;
+ static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz";
+@@ -59,13 +59,13 @@ unsigned char *BLF_get_unifont(int *unif
+ {
+ #ifdef WITH_INTERNATIONAL
+ 	if (unifont_ttf == NULL) {
+-		const char * const fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
++		const char * const fontpath = "/usr/share/fonts/google-droid";
+ 		if (fontpath) {
+ 			char unifont_path[1024];
+ 
+ 			BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
+ 
+-			unifont_ttf = (unsigned char *)BLI_file_ungzip_to_mem(unifont_path, &unifont_size);
++			unifont_ttf = (unsigned char *)BLI_file_to_mem(unifont_path, &unifont_size);
+ 		}
+ 		else {
+ 			printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
+@@ -94,7 +94,7 @@ unsigned char *BLF_get_unifont_mono(int
+ {
+ #ifdef WITH_INTERNATIONAL
+ 	if (unifont_mono_ttf == NULL) {
+-		const char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
++		const char *fontpath = "/usr/share/fonts/blender";
+ 		if (fontpath) {
+ 			char unifont_path[1024];
+ 
+diff -up blender-2.67/source/blender/blenlib/BLI_fileops.h.droid blender-2.67/source/blender/blenlib/BLI_fileops.h
+--- blender-2.67/source/blender/blenlib/BLI_fileops.h.droid	2013-03-26 08:29:01.000000000 +0100
++++ blender-2.67/source/blender/blenlib/BLI_fileops.h	2013-05-08 17:43:04.378413699 +0200
+@@ -81,6 +81,8 @@ bool   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 -up blender-2.67/source/blender/blenlib/intern/fileops.c.droid blender-2.67/source/blender/blenlib/intern/fileops.c
+--- blender-2.67/source/blender/blenlib/intern/fileops.c.droid	2013-05-01 19:43:33.000000000 +0200
++++ blender-2.67/source/blender/blenlib/intern/fileops.c	2013-05-08 17:39:00.896339249 +0200
+@@ -160,6 +160,33 @@ char *BLI_file_ungzip_to_mem(const char
+ 	return mem;
+ }
+ 
++char *BLI_file_to_mem(const char *from_file, int *size_r)
++{
++        int file;
++	int size = 0;
++	char *mem = NULL;
++
++	file = BLI_open(from_file, O_RDONLY, 0);
++
++	size = BLI_file_descriptor_size(file);
++       
++	if (size == 0) {
++	  close (file);
++	  return 0;
++	}
++      
++	mem = MEM_callocN(size, "BLI_ungzip_to_mem");
++		
++	read(file, mem, size);
++	
++	close (file);
++
++	*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/blender-2.67-syspath.patch b/blender-2.67-syspath.patch
new file mode 100644
index 0000000..2291b3b
--- /dev/null
+++ b/blender-2.67-syspath.patch
@@ -0,0 +1,12 @@
+diff -up blender-2.67/source/blender/blenfont/intern/blf_lang.c.syspath blender-2.67/source/blender/blenfont/intern/blf_lang.c
+--- blender-2.67/source/blender/blenfont/intern/blf_lang.c.syspath	2013-03-22 15:31:03.000000000 +0100
++++ blender-2.67/source/blender/blenfont/intern/blf_lang.c	2013-05-08 16:51:05.091202907 +0200
+@@ -78,7 +78,7 @@ static void free_locales(void)
+ 
+ static void fill_locales(void)
+ {
+-	const char * const languages_path = BLI_get_folder(BLENDER_DATAFILES, "locale");
++	const char * const languages_path = "/usr/share/blender";
+ 	char languages[FILE_MAX];
+ 	LinkNode *lines = NULL, *line;
+ 	char *str;
diff --git a/blender.spec b/blender.spec
index 37336eb..bda2005 100644
--- a/blender.spec
+++ b/blender.spec
@@ -1,4 +1,5 @@
-%global blender_api 2.66
+%global blender_api 2.67
+%global blender_fontdir %{_fontbasedir}/blender
 
 # [Fedora] Turn off the brp-python-bytecompile script 
 %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
@@ -12,8 +13,8 @@
 
 Name:           blender
 Epoch:          1
-Version:        %{blender_api}a
-Release:        2%{?dist}
+Version:        %{blender_api}
+Release:        1%{?dist}
 
 Summary:        3D modeling, animation, rendering and post-production
 
@@ -27,11 +28,8 @@ Source5:        blender.xml
 
 Source10:       macros.blender
 
-Patch1:         blender-2.66-syspath.patch
-Patch2:	       blender-2.66-droid.patch
-
-# New rpm release does't like '//' in includes
-Patch3:	       blender-2.66-dbgedit.patch
+Patch1:         blender-2.67-syspath.patch
+Patch2:	        blender-2.67-droid.patch
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  gettext
@@ -89,6 +87,8 @@ BuildRequires:	subversion-devel
 
 BuildRequires:  libspnav-devel
 
+BuildRequires:	fontpackages-devel
+
 Requires(post): desktop-file-utils
 Requires(post): shared-mime-info
 Requires(postun): desktop-file-utils
@@ -128,12 +128,22 @@ BuildArch:     noarch
 This package provides rpm macros to support the creation of third-party
 addon packages to extend blender.
 
+%package -n fonts-blender
+Summary:       International blender mono space font
+Group:	       User Interface/X
+License:       ASL 2.0 and GPlv3 and Bitstream Vera and Public Domain
+Requires:       %{name} = %{version}-%{release}
+
+%description -n fonts-blender
+This package contains an international blender mono space font which is
+a composition of several mono space fonts to cover several character
+sets.
+
 %prep
 %setup -q
  
 %patch1 -p1 -b .syspath
 %patch2 -p1 -b .droid
-%patch3 -p1 -b .dbg
 
 find -name '.svn' -print | xargs rm -rf
 
@@ -229,6 +239,11 @@ sed -e 's/@VERSION@/%{blender_api}/g' %{SOURCE10} \
 mv ${RPM_BUILD_ROOT}/%{_datadir}/locale/languages \
    ${RPM_BUILD_ROOT}/%{_datadir}/blender/
 
+
+mkdir -p ${RPM_BUILD_ROOT}/%{blender_fontdir}/
+cp -p release/datafiles/fonts/bmonofont-i18n.ttf.gz \
+    ${RPM_BUILD_ROOT}%{blender_fontdir}/
+
 %find_lang %{name}
 
 %post
@@ -268,7 +283,16 @@ fi || :
 %defattr(-,root,root,-)
 %{_sysconfdir}/rpm/macros.blender
 
+%files -n fonts-blender
+%defattr(-,root,root,-)
+%{blender_fontdir}/
+%doc release/datafiles/LICENSE-bmonofont-i18n.ttf.txt
+
 %changelog
+* Wed May  8 2013 Jochen Schmitt <Jochen herr-schmitt de> - 1:2.67-1
+- New upstream release
+- Add subpackage for international mono space font
+
 * Sun Mar 10 2013 Rex Dieter <rdieter at fedoraproject.org> - 1:2.66a-2
 - rebuild (OpenEXR)
 
diff --git a/sources b/sources
index bdca774..9fc65e7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-dde8211818e35b00a1c01a11efef4533  blender-2.66a.tar.gz
+5ada1df1f0e5d106dc43e6156652c5ea  blender-2.67.tar.gz


More information about the scm-commits mailing list