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.66-dbgedit.patch b/blender-2.66-dbgedit.patch deleted file mode 100644 index afcdfa7..0000000 --- a/blender-2.66-dbgedit.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up blender-2.66/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp.dbg blender-2.66/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp ---- blender-2.66/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp.dbg 2013-02-22 16:29:56.783083071 +0100 -+++ blender-2.66/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp 2013-02-22 16:32:35.832668869 +0100 -@@ -33,7 +33,7 @@ subject to the following restrictions: - #include "KX_GameObject.h" - - #include "BulletSoftBody/btSoftBody.h" --#include "BulletSoftBody//btSoftBodyInternals.h" -+#include "BulletSoftBody/btSoftBodyInternals.h" - #include "BulletSoftBody/btSoftBodyHelpers.h" - #include "LinearMath/btConvexHull.h" - #include "BulletCollision/Gimpact/btGImpactShape.h" diff --git a/blender-2.66-droid.patch b/blender-2.66-droid.patch deleted file mode 100644 index 39054ab..0000000 --- a/blender-2.66-droid.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff -up blender-2.66/source/blender/blenfont/intern/blf_translation.c.droid blender-2.66/source/blender/blenfont/intern/blf_translation.c ---- blender-2.66/source/blender/blenfont/intern/blf_translation.c.droid 2013-02-13 12:52:01.000000000 +0100 -+++ blender-2.66/source/blender/blenfont/intern/blf_translation.c 2013-02-23 20:04:13.851326385 +0100 -@@ -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; - #endif /* WITH_INTERNATIONAL */ -@@ -56,17 +56,10 @@ unsigned char *BLF_get_unifont(int *unif - { - #ifdef WITH_INTERNATIONAL - if (unifont_ttf == NULL) { -- char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts"); -- 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); -- } -- else { -- printf("%s: 'fonts' data path not found for international font, continuing\n", __func__); -- } -+ char *fontpath = "/usr/share/fonts/goggle-droid"; -+ char unifont_path[1024]; -+ BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename); -+ unifont_ttf = (unsigned char *)BLI_file_to_mem(unifont_path, &unifont_size); - } - - *unifont_size_r = unifont_size; -diff -up blender-2.66/source/blender/blenlib/BLI_fileops.h.droid blender-2.66/source/blender/blenlib/BLI_fileops.h ---- blender-2.66/source/blender/blenlib/BLI_fileops.h.droid 2012-10-06 09:03:03.000000000 +0200 -+++ blender-2.66/source/blender/blenlib/BLI_fileops.h 2013-02-23 19:55:54.818513899 +0100 -@@ -81,6 +81,8 @@ 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 -up blender-2.66/source/blender/blenlib/intern/fileops.c.droid blender-2.66/source/blender/blenlib/intern/fileops.c ---- blender-2.66/source/blender/blenlib/intern/fileops.c.droid 2013-02-11 01:49:00.000000000 +0100 -+++ blender-2.66/source/blender/blenlib/intern/fileops.c 2013-02-23 19:55:54.821513746 +0100 -@@ -155,6 +155,31 @@ 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; -+} - - /* return 1 when file can be written */ - int BLI_file_is_writable(const char *filename) diff --git a/blender-2.66-syspath.patch b/blender-2.66-syspath.patch deleted file mode 100644 index 5bd2222..0000000 --- a/blender-2.66-syspath.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff -up blender-2.66/source/blender/blenfont/intern/blf_lang.c.syspath blender-2.66/source/blender/blenfont/intern/blf_lang.c ---- blender-2.66/source/blender/blenfont/intern/blf_lang.c.syspath 2013-01-21 11:46:01.000000000 +0100 -+++ blender-2.66/source/blender/blenfont/intern/blf_lang.c 2013-02-21 20:07:21.742554532 +0100 -@@ -78,7 +78,7 @@ static void free_locales(void) - - static void fill_locales(void) - { -- char *languages_path = BLI_get_folder(BLENDER_DATAFILES, "locale"); -+ char languages_path[FILE_MAX] = "/usr/share/blender"; - LinkNode *lines = NULL, *line; - char *str; - int idx = 0; -diff -up blender-2.66/source/blender/blenlib/intern/path_util.c.syspath blender-2.66/source/blender/blenlib/intern/path_util.c ---- blender-2.66/source/blender/blenlib/intern/path_util.c.syspath 2013-02-06 12:24:13.000000000 +0100 -+++ blender-2.66/source/blender/blenlib/intern/path_util.c 2013-02-21 20:07:21.749554080 +0100 -@@ -989,38 +989,6 @@ static int get_path_system(char *targetp - char system_path[FILE_MAX]; - const char *system_base_path; - -- -- /* first allow developer only overrides to the system path -- * these are only used when running blender from source */ -- char cwd[FILE_MAX]; -- char relfolder[FILE_MAX]; -- -- if (folder_name) { -- if (subfolder_name) { -- BLI_join_dirfile(relfolder, sizeof(relfolder), folder_name, subfolder_name); -- } -- else { -- BLI_strncpy(relfolder, folder_name, sizeof(relfolder)); -- } -- } -- else { -- relfolder[0] = '\0'; -- } -- -- /* try CWD/release/folder_name */ -- if (BLI_current_working_dir(cwd, sizeof(cwd))) { -- if (test_path(targetpath, cwd, "release", relfolder)) { -- return 1; -- } -- } -- -- /* try EXECUTABLE_DIR/release/folder_name */ -- if (test_path(targetpath, bprogdir, "release", relfolder)) -- return 1; -- /* end developer overrides */ -- -- -- - system_path[0] = '\0'; - - if (test_env_path(system_path, envvar)) { 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 - 1:2.67-1 +- New upstream release +- Add subpackage for international mono space font + * Sun Mar 10 2013 Rex Dieter - 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