diff --git a/.gitignore b/.gitignore index ec10982..e526958 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ +<<<<<<< HEAD /YafaRay-blender.0.1.1.zip /YafaRay.0.1.1.zip +======= +/Blender-Exporter-464135a.tar.gz +/Core-07e6dfe.tar.gz +>>>>>>> d8f274d... Latest git snapshot diff --git a/README.Fedora b/README.Fedora deleted file mode 100644 index 70f3043..0000000 --- a/README.Fedora +++ /dev/null @@ -1,3 +0,0 @@ -YafaRay may crash with some versions of gettext (bugzilla #650471). -As a workaround, running "qtconfig-qt4" and changing -the style from "GTK+" to "Plastique", fix the problem (at least in KDE). diff --git a/YafaRay-0.1.1-gcc6.patch b/YafaRay-0.1.1-gcc6.patch deleted file mode 100644 index 0179e40..0000000 --- a/YafaRay-0.1.1-gcc6.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urp a/src/textures/rgbe_texture.cc b/src/textures/rgbe_texture.cc ---- a/src/textures/rgbe_texture.cc 2008-08-27 15:12:20.000000000 -0500 -+++ b/src/textures/rgbe_texture.cc 2016-03-07 21:57:16.016998548 -0600 -@@ -111,10 +111,10 @@ gBuf_t* loadHDR(const char* f - { - FILE *file = fopen(filename,"rb"); - int xmax, ymax; -- if (file==NULL) return false; -+ if (file==NULL) return NULL; - if (!checkHDR(file, xmax, ymax)) { - fclose(file); -- return false; -+ return NULL; - } - bool ok=true; - gBuf_t *image = new gBuf_t(xmax, ymax); -diff -urp a/src/yafraycore/font_frankbook.cc b/src/yafraycore/font_frankbook.cc ---- a/src/yafraycore/font_frankbook.cc 2007-10-03 05:29:28.000000000 -0500 -+++ b/src/yafraycore/font_frankbook.cc 2016-03-07 21:47:12.290267985 -0600 -@@ -1,7 +1,7 @@ - /* DataToC output of file */ - - int font_ttf_size= 84484; --char font_ttf[]= { -+unsigned char font_ttf[]= { - 0, 1, 0, 0, - 0, 11, 0,128, 0, 3, 0, 48, 79, 83, 47, 50, 19, 41,185, 28, 0, 0, 1, 56, 0, 0, 0, 78, 99,109, 97,112, 69,192,131,251, - 0, 0, 5,128, 0, 0, 2, 6,103,108,121,102,183, 2,204,127, 0, 0, 9,136, 0, 0, 92,100,104,101, 97,100,218, 82,110, 92, diff --git a/YafaRay.spec b/YafaRay.spec index b9a331e..d746c80 100644 --- a/YafaRay.spec +++ b/YafaRay.spec @@ -1,148 +1,196 @@ -%define date 20090512 -%define yname yafaray -%bcond_without qt -%bcond_with snap -%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%global commit0 07e6dfe3237c7316b433597a6e36fda6c81e2ad4 +%global commit1 464135af684ba94ac1e62b1346996ca44f1f68b1 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global shortcommit1 %(c=%{commit1}; echo ${c:0:7}) +%global date 20170221 +%global yname yafaray +%global alphatag beta -# we don't want to provide private python extension libs -%{?filter_setup:%filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup} - -Name: YafaRay -License: LGPLv2.1 -Summary: A free open-source raytracing render engine -Version: 0.1.1 -URL: http://www.yafray.org/ -Group: Applications/Multimedia -%if %{with snap} -Release: 0.14.svn.%{date}%{?dist} -Source0: %{yname}-%{date}.tar.gz -Source1: python-%{date}.tar.gz -Source2: README.Fedora -Source3: yafaray-snapshot.sh -%else -Release: 14%{?dist} -Source0: http://static.yafaray.org/sources/%{name}.%{version}.zip -Source1: http://static.yafaray.org/sources/%{name}-blender.%{version}.zip -Source2: README.Fedora -%endif -Patch0: YafaRay-0.1.1-gcc6.patch - -BuildRequires: scons >= 0.97 -BuildRequires: freetype-devel -BuildRequires: libjpeg-devel -BuildRequires: libpng-devel -BuildRequires: libxml2-devel -BuildRequires: python-devel -BuildRequires: swig -%{?with_qt:BuildRequires: qt4-devel} -BuildRequires: zlib-devel -BuildRequires: OpenEXR-devel >= 1.2 -#Introduced in F-15, Can be dropped by F-17 -Obsoletes: yafray < 0.1.0 -Provides: yafray = %{version}-%{release} -Obsoletes: %{yname} < 0.1.1-4 -Provides: %{yname} = %{version}-%{release} +%{!?python_sitearch:%%global python_sitearch %%(%%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +# we don't want to provide private python extension libs +#%%{?filter_setup:%%filter_provides_in %%{python_sitearch}/.*\.so$ %%filter_setup} + +Name: YafaRay +License: LGPLv2+ +Summary: A free open-source ray-tracing render engine +Version: 3.2.0 +URL: http://www.yafray.org/ +Release: 0.5%{?date:.%{date}git}%{?dist} + +# Comment source release and use git snapshot instead as suggested by upstream +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/ZQTGNFJFTXHWWPYED44NVK3PLCUTGG6B/ +#Source0: https://github.com/%%{name}/Core/archive/v%%{version}-%%{alphatag}/Core-%%{version}-%%{alphatag}.tar.gz + +%{?shortcommit0: +Source0: https://github.com/%{name}/Core/archive/%{commit0}.tar.gz#/Core-%{shortcommit0}.tar.gz} +%{!?shortcommit0: +Source0: https://github.com/%{name}/Core/archive/v%{version}.tar.gz#/Core-%{version}.tar.gz} + +%{?shortcommit1: +Source1: https://github.com/%{name}/Blender-Exporter/archive/%{commit1}.tar.gz#/Blender-Exporter-%{shortcommit1}.tar.gz} +%{!?shortcommit1: +Source1: https://github.com/%{name}/Blender-Exporter/archive/v%{version}.tar.gz#/Blender-Exporter-%{version}.tar.gz} + +Source2: yafaray-blender.metainfo.xml + +BuildRequires: blender-rpm-macros +BuildRequires: boost-devel +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: freetype-devel +BuildRequires: libappstream-glib +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libtiff-devel +BuildRequires: libxml2-devel +BuildRequires: opencv-devel +BuildRequires: OpenEXR-devel >= 1.2 +BuildRequires: python3-devel +BuildRequires: qt-devel +BuildRequires: swig +BuildRequires: zlib-devel + +Requires: %{name}%{?_isa} = %{version}-%{release} +# Set exclusive arch +# https://koji.fedoraproject.org/koji/taskinfo?taskID=17920427 +ExclusiveArch: %{ix86} x86_64 %description -YafaRay is a free open-source raytracing render engine. -Raytracing is a rendering technique for generating -realistic images by tracing the path of light through a 3D scene. -A render engine consists of a "faceless" computer program that interacts -with a host 3D application to provide very specific raytracing capabilities -"on demand". Blender 3D is the host application of YafaRay. - -%package blender -Summary: Blender integration scripts -Group: Applications/Multimedia -Requires: %{name} = %{version}-%{release} -Requires: blender -Obsoletes: %{yname}-blender < 0.1.1-4 -Provides: %{yname}-blender = %{version}-%{release} - -%description blender -YafRay uses a python-coded settings interface to set -lighting and rendering parameters. This settings interface -is launched by an entry automatically added to the Blender Render menu. +YafaRay is a free open-source ray-tracing render engine. +Ray-tracing is a rendering technique for generating realistic images by tracing +the path of light through a 3D scene. A render engine consists of a "faceless" +computer program that interacts with a host 3D application to provide very +specific ray-tracing capabilities "on demand". +Blender 3D is the host application of YafaRay. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for + applications that use %{name}. + +%package blender +Summary: Blender integration scripts%{name} = %{version}-%{release} +Requires: blender +Obsoletes: %{yname}-blender < 0.1.1-4 +Provides: %{yname}-blender = %{version}-%{release} + +%description blender +YafRay uses a python-coded settings interface to set lighting and rendering +parameters. This settings interface is launched by an entry automatically +added to the Blender Render menu. %prep -%if %{with snap} -%setup -q -n %{yname}-%{date} -%setup -q -D -T -a 1 -n %{yname}-%{date} -%else -%setup -q -n %{yname} -%setup -q -D -T -a 1 -n %{yname} -%endif -%patch0 -p1 -b .gcc6 - -sed -i -e"s,/lib',/%{_lib}',g" config/linux2-config.py -sed -i -e"s,/lib/,/%{_lib}/,g" config/linux2-config.py - -%if %{with qt} -sed -i -e"s,WITH_YF_QT='false',WITH_YF_QT='true',g" config/linux2-config.py -%endif - -cat << EOF >> config/linux2-config.py -YF_QTDIR = '%{_libdir}/qt4' -# unversioned SO is correct by itself when the said shared object is -# meant to be dlopen at runtime, instead of being linked at build time. -#YF_SHLINKFLAGS = "-Wl,-soname,libyafaraycore.so.1" -EOF -sed -i -e"s|REL_CCFLAGS = '-O3 -ffast-math'|REL_CCFLAGS = '-ffast-math -fPIC %{optflags}'|g" config/linux2-config.py -# fixes %%{buildroot} in libyafaraycore.so -sed -i -e"s,\$YF_LIBOUT,%{_libdir},g" tools/writeconfig.py -sed -i -e"s,\$YF_PLUGINPATH,%{_libdir}/%{yname},g" tools/writeconfig.py -install -pm644 %{SOURCE2} ./ +%autosetup -D -n Core-%{commit0} +%autosetup -D -T -a 1 -n Core-%{commit0} + +sed -i -e 's|set(YAF_LIB_DIR lib)|set(YAF_LIB_DIR %{_lib})|g' CMakeLists.txt +sed -i -e 's|set(YAF_TARGET_TYPE ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RUNTIME)|\ + set(YAF_TARGET_TYPE ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/%{_lib} RUNTIME)|g' CMakeLists.txt + +# Set proper permission per packaging guideline +find . -name "*.h" -exec chmod 644 {} \; +find . -name "*.c" -exec chmod 644 {} \; +find . -name "*.cc" -exec chmod 644 {} \; %build -scons build -scons swig +%cmake \ + -DBLENDER_ADDON:BOOL=false \ + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true \ + -DCMAKE_SKIP_RPATH:BOOL=true \ + -DDEBUG_BUILD=ON \ + -DUSER_DBGFLAGS="%{optflags}" \ + . +%make_build VERBOSE=1 %install -scons PREFIX=%{buildroot}%{_prefix} install - -mkdir -p %{buildroot}%{_datadir}/blender/scripts -mkdir -p %{buildroot}%{python_sitearch} - -%if %{with snap} -pushd %{_builddir}/%{yname}-%{date} -cp -p bindings/python/yaf*.py \ - %{buildroot}%{_datadir}/blender/scripts -cp -p bindings/python/_yaf*.so \ - %{buildroot}%{python_sitearch} -cp -p python-%{date}/yaf*.py \ - %{buildroot}%{_datadir}/blender/scripts -cp -p %{SOURCE3} . -%else -pushd %{_builddir}/%{yname} -cp -p bindings/python/yaf*.py \ - %{buildroot}%{_datadir}/blender/scripts -cp -p bindings/python/_yaf*.so \ - %{buildroot}%{python_sitearch} -cp -p %{yname}-blender/yaf*.py \ - %{buildroot}%{_datadir}/blender/scripts -%endif -popd +%make_install VERBOSE=1 + +# Let RPM pick docs in the file section +rm -fr %{buildroot}%{_docdir}/%{yname} + +mkdir -p %{buildroot}%{blender_addons}/%{yname} +#mkdir -p %%{buildroot}%%{blender_presets}/%%{yname} +cp -pr Blender-Exporter-%{commit1}/{__init__*,io,prop,ui} \ + %{buildroot}%{blender_addons}/%{yname} +# +#cp -pr Blender-Exporter-%%{commit1}/presets \ +# %%{buildroot}%%{blender_presets}/%%{yname} + +# AppData +install -p -m 644 -D %{SOURCE2} %{buildroot}%{_datadir}/metainfo/%{yname}-blender.metainfo.xml + +%check +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{yname}-blender.metainfo.xml + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig %files -%defattr(-, root, root) -%doc CODING LICENSE INSTALL +%license LICENSES +%doc AUTHORS CHANGELOG README %{_bindir}/%{yname}-xml -%{_libdir}/%{yname}/*.so -%{_libdir}/libyafaraycore.so +%{_datadir}/%{yname}/* -%files blender -%defattr(-, root, root) -%if %{with snap} -%doc yafaray-snapshot.sh -%endif -%doc README.Fedora -%{_datadir}/blender/scripts/* +%files devel +%{_includedir}/%{yname}/ +%{_libdir}/%{yname}-plugins +%{_libdir}/*.so %{?with_qt:%{_libdir}/libyafarayqt.so} -%{_libdir}/libyafarayplugin.so -%{python_sitearch}/_yaf*.so +%files blender +%{_datadir}/metainfo/%{yname}-blender.metainfo.xml +%{blender_addons}/%{yname} %changelog +* Wed Feb 22 2017 Luya Tshimbalanga - 3.2.0-0.5.20170221git +- Latest git snapshot + +* Fri Feb 17 2017 Luya Tshimbalanga - 3.2.0-0.4.20170217git +- Latest git snapshot +- Fix spelling to adhere US spelling guideine +- Fix license +- Fix mixed use of spaces and tab errors +- Set source files non executables + +* Mon Feb 13 2017 Luya Tshimbalanga - 3.2.0-0.3.20170212git +- Add conditional statement for release line +- Align description to 80 columns as possible +- Disable rpath per Fedora packaging guideline +- Let RPM pick docs in the file section +- Add missing requirement libappstream-glib +- Temporarily disable preset in yafaray-blender + +* Sun Feb 12 2017 Luya Tshimbalanga - 3.2.0-0.2.20170212git +- Latest git snapshot +- Add libtiff dependency +- Use versioning from Fedora packaging guideline +- Define sources url + +* Wed Feb 08 2017 Luya Tshimbalanga - 3.2.0-0.1.20170131git +- Move appdata to its own file +- Latest git snapshot +- Use POSITION_INDEPENDENT_CODE to prevent compilation error +- Fix library path + +* Thu Jan 12 2017 Luya Tshimbalanga - 3.1.1-0.2.beta +- Fixed changelog by including missing upstream update info +- Fixed url for the sources +- Added requirement for base package +- Fix lib sharing, relic for legacy method +- Further cleaned up spec + +* Thu Sep 22 2016 Luya Tshimbalanga - 3.0.0-0.1.beta +- Update to 3.1.1-beta + +* Sat Jul 16 2016 Luya Tshimbalanga - 3.0.0-0.1.beta +- Update to 3.0.0-beta +- Cleaned up spec file +- Dropped scons as dependency + * Tue Mar 08 2016 Yaakov Selkowitz - 0.1.1-14 - Fix FTBFS with GCC 6 (#1307303) @@ -169,92 +217,3 @@ popd * Wed Feb 13 2013 Fedora Release Engineering - 0.1.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 0.1.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sun Jul 8 2012 Peter Robinson - 0.1.1-6 -- Build with PIC (fix FTBFS on ARM) - -* Fri Apr 27 2012 Peter Robinson - 0.1.1-5 -- Fix endif statement - -* Tue Feb 28 2012 Fedora Release Engineering - 0.1.1-4 -- Rebuilt for c++ ABI breakage - -* Thu Jan 12 2012 Fedora Release Engineering - 0.1.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 0.1.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Paulo Roma 0.1.1-4 -- Fixed Obsoletes clause for yafaray. - -* Fri Jan 21 2011 Paulo Roma 0.1.1-3 -- Changed package name to YafaRay. -- Providing README.Fedora - -* Thu Nov 04 2010 Paulo Roma 0.1.1-2 -- Conditionally building with qt support. -- Fixed URL and license. - -* Sat Aug 29 2009 Paulo Roma 0.1.1-1 -- Updated 0.1.1 - -* Sat May 23 2009 Paulo Roma 0.1.0.315-1 -- Updated 0.1.0.315 - -* Tue May 12 2009 Paulo Roma 0.1.0-1 -- Built official 0.1.0 (305) version. - -* Tue May 12 2009 Paulo Roma 0.1.0-0.1.svn.20090512 -- Built revision 315. - -* Sat Apr 11 2009 Paulo Roma 0.1.0-0.1.svn.20090411 -- Built revision 300. - -* Mon Jan 26 2009 Paulo Roma 0.1.0-0.1.svn.20090126 -- Built revision 299. - -* Tue Nov 11 2008 Paulo Roma 0.1.0-0.1.svn.20081031 -- Installing _yaf*.so in %%{python_sitearch} -- Using %%{snv}.%%{date} for release. -- Using %%{optflags}. - -* Thu Oct 23 2008 Paulo Roma 0.1.0-5 -- Built revision 287. -- Replaced BR libxml-devel for libxml2-devel. -- Using %%{buildroot} in the comment in the %%prep section. -- Included yafaray-snapshot.sh - -* Sun Oct 19 2008 Paulo Roma 0.1.0-4 -- Created blender integration package. -- svn co https://ssl.little-isp.de/svn/lynx/yafaray/blender/python - -* Wed Oct 15 2008 Paulo Roma 0.1.0-3 -- Built revision 286. -- Adapted spec file. -- svn co https://ssl.little-isp.de/svn/lynx/yafaray/mainline/ yafaray - -* Sun Feb 04 2007 Paulo Roma 0.0.9-2 -- Rebuilt for Fedora 6 -- Updated to 0.0.9 - -* Wed Jan 25 2006 - mls@suse.de -- converted neededforbuild to BuildRequires - -* Mon Sep 19 2005 - pnemec@suse.cz -- fixed wrong return value in tiangletools.cc - -* Tue Jul 26 2005 - sbrabec@suse.cz -- Updated to version 0.0.8. - -* Mon May 16 2005 - pmladek@suse.cz -- fixed to build with gcc4 on 64-bit architectures - -* Thu Aug 26 2004 - kukuk@suse.de -- Fix building on lib64 archs - -* Wed Aug 25 2004 - sbrabec@suse.cz -- New SuSE package, version 0.0.7. diff --git a/sources b/sources index c5da08f..02439a4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -d7e7f86b9e90e7f960707ebaea1843ab YafaRay-blender.0.1.1.zip -d1722dec25299f6f3fcc1d7c661a4e90 YafaRay.0.1.1.zip +SHA512 (Blender-Exporter-464135a.tar.gz) = 24b4b7a4e912533b32bc2341d97f734fd21625932a22e842df986a9a4182b391e81318316cb98d28e54ed44de86ec3941ec4eec5737b8eb126a30c8068b4bb83 +SHA512 (Core-07e6dfe.tar.gz) = 76802f7a1231c74c24a3e9563f32d3eff0cdf2e0e78d8c0fa6f7a6e8bc50f7153acdde33c20cb4b386b1e2b4ce7f34c78b9a5fc00de3a2601bf1d06e2298d4f6 diff --git a/yafaray-blender.metainfo.xml b/yafaray-blender.metainfo.xml new file mode 100644 index 0000000..9051b85 --- /dev/null +++ b/yafaray-blender.metainfo.xml @@ -0,0 +1,13 @@ + + + + yafaray-blender + YafaRay + blender.desktop + 3D renderer plugin for Blender + http://www.yafaray.org + http://www.yafaray.org/development/bugtracker/yafaray + CC0-1.0 + GPL-3.0+ + http://www.yafaray.org/community/forum +