diff --git a/blender-2.77a-manpages.patch b/blender-2.77a-manpages.patch deleted file mode 100644 index 3c8a483..0000000 --- a/blender-2.77a-manpages.patch +++ /dev/null @@ -1,157 +0,0 @@ -diff -Naur blender-2.77a.old/doc/manpage/blenderplayer.1 blender-2.77a/doc/manpage/blenderplayer.1 ---- blender-2.77a.old/doc/manpage/blenderplayer.1 1970-01-01 01:00:00.000000000 +0100 -+++ blender-2.77a/doc/manpage/blenderplayer.1 2016-06-12 14:18:50.371651059 +0200 -@@ -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 by Kevin Roy . -diff -Naur blender-2.77a.old/source/creator/CMakeLists.txt blender-2.77a/source/creator/CMakeLists.txt ---- blender-2.77a.old/source/creator/CMakeLists.txt 2016-06-12 14:18:42.358493086 +0200 -+++ blender-2.77a/source/creator/CMakeLists.txt 2016-06-12 14:18:50.373651099 +0200 -@@ -451,6 +451,7 @@ - FILES - ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop - ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg -+ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1 - DESTINATION "." - ) - -@@ -473,6 +474,10 @@ - FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 - DESTINATION share/man/man1 - ) -+ install( -+ FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1 -+ DESTINATION share/man/man1 -+ ) - endif() - - # misc files diff --git a/blender-2.78a-locale.patch b/blender-2.78a-locale.patch new file mode 100644 index 0000000..1a59dbf --- /dev/null +++ b/blender-2.78a-locale.patch @@ -0,0 +1,78 @@ +diff -Naur blender-2.78a.old/source/blender/blenkernel/BKE_appdir.h blender-2.78a/source/blender/blenkernel/BKE_appdir.h +--- blender-2.78a.old/source/blender/blenkernel/BKE_appdir.h 2017-01-29 23:04:06.554693018 +0100 ++++ blender-2.78a/source/blender/blenkernel/BKE_appdir.h 2017-01-29 23:08:38.102468829 +0100 +@@ -67,6 +67,7 @@ + BLENDER_SYSTEM_DATAFILES = 52, + BLENDER_SYSTEM_SCRIPTS = 53, + BLENDER_SYSTEM_PYTHON = 54, ++ BLENDER_SYSTEM_LOCALE = 55, + }; + + /* for BKE_appdir_folder_id_version only */ +diff -Naur blender-2.78a.old/source/blender/blenkernel/intern/appdir.c blender-2.78a/source/blender/blenkernel/intern/appdir.c +--- blender-2.78a.old/source/blender/blenkernel/intern/appdir.c 2017-01-29 23:04:06.556693053 +0100 ++++ blender-2.78a/source/blender/blenkernel/intern/appdir.c 2017-01-29 23:08:38.103468846 +0100 +@@ -398,6 +398,9 @@ + 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 -Naur blender-2.78a.old/source/blender/blentranslation/intern/blt_lang.c blender-2.78a/source/blender/blentranslation/intern/blt_lang.c +--- blender-2.78a.old/source/blender/blentranslation/intern/blt_lang.c 2017-01-29 23:04:06.566693229 +0100 ++++ blender-2.78a/source/blender/blentranslation/intern/blt_lang.c 2017-01-29 23:08:38.104468864 +0100 +@@ -88,9 +88,9 @@ + num_locales = num_locales_menu = 0; + } + +-static void fill_locales(void) ++static void fill_locales(char *locale_path) + { +- const char * const languages_path = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale"); ++ const char * const languages_path = locale_path; + char languages[FILE_MAX]; + LinkNode *lines = NULL, *line; + char *str; +@@ -98,7 +98,7 @@ + + free_locales(); + +- BLI_join_dirfile(languages, FILE_MAX, languages_path, "languages"); ++ BLI_join_dirfile(languages, FILE_MAX, locale_path, "languages"); + line = lines = BLI_file_read_as_lines(languages); + + /* This whole "parsing" code is a bit weak, in that it expects strictly formatted input file... +@@ -198,7 +198,7 @@ + void BLT_lang_init(void) + { + #ifdef WITH_INTERNATIONAL +- const char * const messagepath = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale"); ++ const char * const messagepath = BKE_appdir_folder_id(BLENDER_SYSTEM_LOCALE, NULL); + #endif + + /* Make sure LANG is correct and wouldn't cause std::rumtime_error. */ +@@ -231,7 +231,7 @@ + #ifdef WITH_INTERNATIONAL + if (messagepath) { + bl_locale_init(messagepath, TEXT_DOMAIN_NAME); +- fill_locales(); ++ fill_locales(messagepath); + } + else { + printf("%s: 'locale' data path for translations not found, continuing\n", __func__); +diff -Naur blender-2.78a.old/source/creator/CMakeLists.txt blender-2.78a/source/creator/CMakeLists.txt +--- blender-2.78a.old/source/creator/CMakeLists.txt 2017-01-29 23:08:17.342103709 +0100 ++++ blender-2.78a/source/creator/CMakeLists.txt 2017-01-29 23:09:04.788938173 +0100 +@@ -376,7 +376,7 @@ + ) + + set(_locale_dir "${CMAKE_SOURCE_DIR}/release/datafiles/locale") +- set(_locale_target_dir ${TARGETDIR_VER}/datafiles/locale) ++ set(_locale_target_dir ${CMAKE_INSTALL_PREFIX}/share/locale) + + file(GLOB _po_files "${_locale_dir}/po/*.po") + foreach(_po_file ${_po_files}) diff --git a/blender-2.78a-manpages.patch b/blender-2.78a-manpages.patch new file mode 100644 index 0000000..f8a3b04 --- /dev/null +++ b/blender-2.78a-manpages.patch @@ -0,0 +1,157 @@ +diff -Naur blender-2.78a.old/doc/manpage/blenderplayer.1 blender-2.78a/doc/manpage/blenderplayer.1 +--- blender-2.78a.old/doc/manpage/blenderplayer.1 1970-01-01 01:00:00.000000000 +0100 ++++ blender-2.78a/doc/manpage/blenderplayer.1 2017-01-29 23:10:44.556692826 +0100 +@@ -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 by Kevin Roy . +diff -Naur blender-2.78a.old/source/creator/CMakeLists.txt blender-2.78a/source/creator/CMakeLists.txt +--- blender-2.78a.old/source/creator/CMakeLists.txt 2017-01-29 23:10:25.810363127 +0100 ++++ blender-2.78a/source/creator/CMakeLists.txt 2017-01-29 23:10:44.556692826 +0100 +@@ -480,6 +480,7 @@ + FILES + ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop + ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg ++ ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1 + DESTINATION "." + ) + +@@ -502,6 +503,10 @@ + FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 + DESTINATION share/man/man1 + ) ++ install( ++ FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1 ++ DESTINATION share/man/man1 ++ ) + endif() + + # misc files diff --git a/blender-2.78a-scripts.patch b/blender-2.78a-scripts.patch new file mode 100644 index 0000000..c7397c2 --- /dev/null +++ b/blender-2.78a-scripts.patch @@ -0,0 +1,14 @@ +diff -Naur blender-2.78a.old/source/creator/CMakeLists.txt blender-2.78a/source/creator/CMakeLists.txt +--- blender-2.78a.old/source/creator/CMakeLists.txt 2017-01-29 23:06:07.131813650 +0100 ++++ blender-2.78a/source/creator/CMakeLists.txt 2017-01-29 23:06:33.772282188 +0100 +@@ -353,8 +353,8 @@ + endif() + + install( +- DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts +- DESTINATION ${TARGETDIR_VER} ++ DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/scripts/ + PATTERN ".git" EXCLUDE + PATTERN ".gitignore" EXCLUDE + PATTERN ".arcconfig" EXCLUDE diff --git a/blender-2.78a-thumbnailer.patch b/blender-2.78a-thumbnailer.patch new file mode 100644 index 0000000..618bb72 --- /dev/null +++ b/blender-2.78a-thumbnailer.patch @@ -0,0 +1,20 @@ +diff -Naur blender-2.78a.old/blender.thumbnailer blender-2.78a/blender.thumbnailer +--- blender-2.78a.old/blender.thumbnailer 1970-01-01 01:00:00.000000000 +0100 ++++ blender-2.78a/blender.thumbnailer 2017-01-29 23:04:47.528413638 +0100 +@@ -0,0 +1,4 @@ ++[Thumbnailer Entry] ++TryExec=/usr/share/blender/scripts/blender-thumbnailer.py ++Exec=/usr/share/blender/scripts/blender-thumbnailer.py %i %o ++MimeType=application/x-blender; +diff -Naur blender-2.78a.old/source/creator/CMakeLists.txt blender-2.78a/source/creator/CMakeLists.txt +--- blender-2.78a.old/source/creator/CMakeLists.txt 2017-01-29 23:04:25.162020270 +0100 ++++ blender-2.78a/source/creator/CMakeLists.txt 2017-01-29 23:04:47.529413656 +0100 +@@ -526,7 +526,7 @@ + ) + install( + PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py +- DESTINATION bin ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/scripts + ) + set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender) + endif() diff --git a/blender-2.78a-unversioned-system-path.patch b/blender-2.78a-unversioned-system-path.patch new file mode 100644 index 0000000..c788c9d --- /dev/null +++ b/blender-2.78a-unversioned-system-path.patch @@ -0,0 +1,25 @@ +diff -Naur blender-2.78a.old/intern/ghost/intern/GHOST_SystemPathsUnix.cpp blender-2.78a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp +--- blender-2.78a.old/intern/ghost/intern/GHOST_SystemPathsUnix.cpp 2017-01-29 23:04:06.462691400 +0100 ++++ blender-2.78a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp 2017-01-29 23:12:27.057495546 +0100 +@@ -61,6 +61,9 @@ + + const GHOST_TUns8 *GHOST_SystemPathsUnix::getSystemDir(int, const char *versionstr) const + { ++ /* ignore versionstr when building the system path */ ++ versionstr = ""; ++ + /* no prefix assumes a portable build which only uses bundled scripts */ + if (static_path) { + static string system_path = string(static_path) + "/blender/" + versionstr; +diff -Naur blender-2.78a.old/source/creator/CMakeLists.txt blender-2.78a/source/creator/CMakeLists.txt +--- blender-2.78a.old/source/creator/CMakeLists.txt 2017-01-29 23:12:09.267182657 +0100 ++++ blender-2.78a/source/creator/CMakeLists.txt 2017-01-29 23:12:27.058495563 +0100 +@@ -306,7 +306,7 @@ + if(WITH_INSTALL_PORTABLE) + set(TARGETDIR_VER ${BLENDER_VERSION}) + else() +- set(TARGETDIR_VER share/blender/${BLENDER_VERSION}) ++ set(TARGETDIR_VER share/blender) + endif() + endif() + diff --git a/blender.spec b/blender.spec index 1e14e57..e908e2b 100644 --- a/blender.spec +++ b/blender.spec @@ -1,11 +1,8 @@ %global blender_api 2.78 -# [Fedora] Turn off the brp-python-bytecompile script +# 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') -%global blenderlib %{_datadir}/blender/%{blender_api} -%global blenderarch %{_libdir}/blender/%{blender_api} - %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %ifarch %{ix86} x86_64 @@ -17,7 +14,7 @@ Name: blender Epoch: 1 Version: %{blender_api}a -Release: 7%{?dist} +Release: 8%{?dist} Summary: 3D modeling, animation, rendering and post-production License: GPLv2 @@ -30,11 +27,17 @@ Source2: %{name}-fonts.metainfo.xml Source5: %{name}.xml Source6: %{name}.appdata.xml Source10: macros.%{name} + Patch0: %{name}-2.76-droid.patch +Patch1: %{name}-2.78a-thumbnailer.patch +Patch2: %{name}-2.78a-scripts.patch +Patch3: %{name}-2.78a-locale.patch +Patch4: %{name}-2.78a-manpages.patch +Patch5: %{name}-2.78a-unversioned-system-path.patch + # For ppc64le build, currently being discussed on # https://lists.blender.org/pipermail/bf-committers/2016-November/047844.html -Patch1: blender-2.78a-linux-definition-ppc64.patch -Patch4: %{name}-2.77a-manpages.patch +Patch6: %{name}-2.78a-linux-definition-ppc64.patch # Development stuff BuildRequires: boost-devel @@ -145,9 +148,6 @@ sets. %prep %autosetup -p1 -sed -e 's|BLI_get_folder(BLENDER_DATAFILES, "locale")|"/usr/share/locale"|g' \ - source/%{name}/blentranslation/intern/blt_lang.c - mkdir cmake-make %build @@ -202,13 +202,7 @@ pushd cmake-make %make_install popd -# -# Create empty %%{_libdir}/blender/scripts to claim ownership -# - -mkdir -p %{buildroot}%{blenderarch}/{scripts,plugins/sequence,plugins/texture,datafiles} -cp -R -a -p release/scripts/* %{buildroot}%{blenderlib}/scripts -find %{buildroot}%{blenderlib}/scripts -type f -exec sed -i -e 's/\r$//g' {} \; +find %{buildroot}%{_datadir}/%{name}/scripts -type f -exec sed -i -e 's/\r$//g' {} \; # Mime support install -p -D -m 644 %{SOURCE5} %{buildroot}%{_datadir}/mime/packages/%{name}.xml @@ -216,12 +210,8 @@ install -p -D -m 644 %{SOURCE5} %{buildroot}%{_datadir}/mime/packages/%{name}.xm # Desktop icon desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop -# Plugins are not support now -rm -rf %{buildroot}%{blenderarch}/plugins/* - -rm -rf %{buildroot}%{_bindir}/%{name}-thumbnailer.py +# Deal with docs in the files section rm -rf %{buildroot}%{_docdir}/%{name}/* -cp -aR release/datafiles/locale %{buildroot}/%{blenderlib}/datafiles/ # rpm macros mkdir -p %{buildroot}%{macrosdir} @@ -263,7 +253,6 @@ fi %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* -%{_libdir}/%{name}/ %{_datadir}/%{name}/ %{_datadir}/mime/packages/%{name}.xml %{_mandir}/man1/%{name}.* @@ -283,6 +272,12 @@ fi %{_fontbasedir}/%{name}/ %changelog +* Sun Jan 29 2017 Simone Caronni - 1:2.78a-8 +- Use system locale directory for translations. +- Do not use the Blender API version in the installation folder. +- Install noarch components in /usr/share/blender. +- Install blender-thumbnailer.py in the scripts directory instead of deleting it. + * Sun Jan 29 2017 Simone Caronni - 1:2.78a-7 - Split out main AppStream metadata in its own file, like the fonts subpackage. - Make sure rpmlint does not fail when checking the SPEC file.