diff --git a/blender-2.67-droid.patch b/blender-2.67-droid.patch deleted file mode 100644 index a23fe81..0000000 --- a/blender-2.67-droid.patch +++ /dev/null @@ -1,86 +0,0 @@ -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 deleted file mode 100644 index 2291b3b..0000000 --- a/blender-2.67-syspath.patch +++ /dev/null @@ -1,12 +0,0 @@ -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-2.68a-droid.patch b/blender-2.68a-droid.patch new file mode 100644 index 0000000..fa4c6f7 --- /dev/null +++ b/blender-2.68a-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.68a-syspath.patch b/blender-2.68a-syspath.patch new file mode 100644 index 0000000..5545b6b --- /dev/null +++ b/blender-2.68a-syspath.patch @@ -0,0 +1,12 @@ +diff -up blender-2.68a/source/blender/blenfont/intern/blf_lang.c.syspath blender-2.68a/source/blender/blenfont/intern/blf_lang.c +--- blender-2.68a/source/blender/blenfont/intern/blf_lang.c.syspath 2013-06-21 14:33:19.000000000 +0200 ++++ blender-2.68a/source/blender/blenfont/intern/blf_lang.c 2013-09-01 15:58:24.422656833 +0200 +@@ -186,7 +186,7 @@ EnumPropertyItem *BLF_RNA_lang_enum_prop + void BLF_lang_init(void) + { + #ifdef WITH_INTERNATIONAL +- const char * const messagepath = BLI_get_folder(BLENDER_DATAFILES, "locale"); ++ const char * const messagepath = "/usr/share/locale"; + + if (messagepath) { + bl_locale_init(messagepath, TEXT_DOMAIN_NAME); diff --git a/blender.spec b/blender.spec index 609a870..4c5cf27 100644 --- a/blender.spec +++ b/blender.spec @@ -14,7 +14,7 @@ Name: blender Epoch: 1 Version: %{blender_api}a -Release: 3%{?dist} +Release: 4%{?dist} Summary: 3D modeling, animation, rendering and post-production @@ -28,9 +28,8 @@ Source5: blender.xml Source10: macros.blender -Patch1: blender-2.67-syspath.patch -Patch2: blender-2.67-droid.patch -Patch3: blender-2.67b-rna.patch +Patch1: blender-2.68a-syspath.patch +Patch2: blender-2.68a-droid.patch BuildRequires: desktop-file-utils BuildRequires: gettext @@ -148,7 +147,6 @@ sets. %patch1 -p1 -b .syspath %patch2 -p1 -b .droid -%patch3 -p1 -b .rna find -name '.svn' -print | xargs rm -rf @@ -233,6 +231,11 @@ rm -rf ${RPM_BUILD_ROOT}%{_bindir}/blender-thumbnailer.py rm -rf ${RPM_BUILD_ROOT}%{_docdir}/blender/* +rm -rf ${RPM_BUILD_ROOT}/%{blenderlib}/datafiles/locale/* +cp -a release/datafiles/locale/languages ${RPM_BUILD_ROOT}/%{blenderlib}/datafiles/locale/ + +rm -rf ${RPM_BUILD_ROOT}/%{blenderlib}/datafiles/fonts + # # rpm macros # @@ -242,9 +245,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm sed -e 's/@VERSION@/%{blender_api}/g' %{SOURCE10} \ >${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/macros.blender -mv ${RPM_BUILD_ROOT}/%{_datadir}/locale/languages \ - ${RPM_BUILD_ROOT}/%{_datadir}/blender/ - +rm ${RPM_BUILD_ROOT}/%{_datadir}/locale/languages mkdir -p ${RPM_BUILD_ROOT}/%{blender_fontdir}/ cp -p release/datafiles/fonts/bmonofont-i18n.ttf.gz \ @@ -295,6 +296,10 @@ fi || : %doc release/datafiles/LICENSE-bmonofont-i18n.ttf.txt %changelog +* Sun Sep 1 2013 Jochen Schmitt - 1:2.68a-4 +- Aboid twice occurance of locale files +- Fix typo in DroideSans font name + * Wed Aug 28 2013 François Cami - 1:2.68a-3 - Enable jemalloc and OpenColorIO. (#1002197) - Re-enable localization (#867285)