From aede2f5189895de600540d8bc9279d79e1bd0d2167f4e9b94ff687350bd5cd12 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 21 Jan 2019 07:09:39 +0000 Subject: [PATCH] Accepting request 666367 from home:weatherhead99 - fix incorrect permissions in -devel package installed files - update package to new version (0.9.6) - update patch for buildsystem installation locations - patch for forcing c++11 mode on gcc4.8 (for openSUSE_Leap_42.3) - initial package from upstream source (0.9.5) - patch for correcting buildsystem installation locations OBS-URL: https://build.opensuse.org/request/show/666367 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/rttr?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + cmake_install_dir.patch | 32 +++++++++ cxx11_compiler_flags.patch | 12 ++++ doxygen_remove_date_time.patch | 13 ++++ rttr-0.9.6-src.tar.gz | 3 + rttr.changes | 17 +++++ rttr.spec | 116 +++++++++++++++++++++++++++++++++ 8 files changed, 217 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cmake_install_dir.patch create mode 100644 cxx11_compiler_flags.patch create mode 100644 doxygen_remove_date_time.patch create mode 100644 rttr-0.9.6-src.tar.gz create mode 100644 rttr.changes create mode 100644 rttr.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cmake_install_dir.patch b/cmake_install_dir.patch new file mode 100644 index 0000000..439aacc --- /dev/null +++ b/cmake_install_dir.patch @@ -0,0 +1,32 @@ +Index: rttr-0.9.6/CMake/config.cmake +=================================================================== +--- rttr-0.9.6.orig/CMake/config.cmake ++++ rttr-0.9.6/CMake/config.cmake +@@ -69,7 +69,7 @@ if(UNIX) + + set(RTTR_INSTALL_FULL_LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") + +- set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr/cmake") ++ set(RTTR_CMAKE_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/rttr/") + set(RTTR_ADDITIONAL_FILES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/rttr") + + elseif(WIN32) +Index: rttr-0.9.6/doc/CMakeLists.txt +=================================================================== +--- rttr-0.9.6.orig/doc/CMakeLists.txt ++++ rttr-0.9.6/doc/CMakeLists.txt +@@ -33,12 +33,12 @@ set(DOXYGEN_PROJECT_NAME "${PROJECT + set(DOXYGEN_INPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/src/rttr \\ + ${CMAKE_CURRENT_SOURCE_DIR}" ) + set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/doc") +-set(DOXYGEN_DOC_INSTALL_DIR "doc") ++set(DOXYGEN_DOC_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/packages/rttr") + set(DOXYGEN_CONFIG_FILE_IN "DoxyFile.cfg.in") + set(DOXYGEN_LAYOUT_FILE_IN "doxygen-customization/layout/DoxygenLayout.xml.in") + set(DOXYGEN_EXCLUDE "") + set(DOXYGEN_STRIP_FROM_PATH "${CMAKE_SOURCE_DIR}/src/rttr") +-set(DOXYGEN_CUSTOM_HTML_DIR "rttr-${RTTR_VERSION_MAJOR}-${RTTR_VERSION_MINOR}-${RTTR_VERSION_PATCH}") ++set(DOXYGEN_CUSTOM_HTML_DIR "html") + set(DOXYGEN_PREDEFINED "DOXYGEN \\ + RTTR_INLINE= \\ + RTTR_FORCE_INLINE= \\ diff --git a/cxx11_compiler_flags.patch b/cxx11_compiler_flags.patch new file mode 100644 index 0000000..4ef303e --- /dev/null +++ b/cxx11_compiler_flags.patch @@ -0,0 +1,12 @@ +Index: rttr-0.9.6/CMakeLists.txt +=================================================================== +--- rttr-0.9.6.orig/CMakeLists.txt ++++ rttr-0.9.6/CMakeLists.txt +@@ -34,6 +34,7 @@ + cmake_minimum_required (VERSION 3.0) + + project ("rttr" LANGUAGES CXX) ++set(CMAKE_CXX_STANDARD 11) + + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake") + diff --git a/doxygen_remove_date_time.patch b/doxygen_remove_date_time.patch new file mode 100644 index 0000000..218ba70 --- /dev/null +++ b/doxygen_remove_date_time.patch @@ -0,0 +1,13 @@ +Index: rttr-0.9.6/doc/DoxyFile.cfg.in +=================================================================== +--- rttr-0.9.6.orig/doc/DoxyFile.cfg.in ++++ rttr-0.9.6/doc/DoxyFile.cfg.in +@@ -1187,7 +1187,7 @@ HTML_COLORSTYLE_GAMMA = 80 + # The default value is: NO. + # This tag requires that the tag GENERATE_HTML is set to YES. + +-HTML_TIMESTAMP = YES ++HTML_TIMESTAMP = NO + + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML + # documentation will contain sections that can be hidden and shown after the diff --git a/rttr-0.9.6-src.tar.gz b/rttr-0.9.6-src.tar.gz new file mode 100644 index 0000000..b2d1afb --- /dev/null +++ b/rttr-0.9.6-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f62caee43016489320f8a69145c9208cddd72e451ea95618bc26a49a4cd6c990 +size 1137269 diff --git a/rttr.changes b/rttr.changes new file mode 100644 index 0000000..b169ba1 --- /dev/null +++ b/rttr.changes @@ -0,0 +1,17 @@ +------------------------------------------------------------------- +Thu Jun 21 22:43:53 UTC 2018 - dan.weatherill@cantab.net + +- fix incorrect permissions in -devel package installed files + +------------------------------------------------------------------- +Tue Jun 19 00:20:24 UTC 2018 - dan.weatherill@cantab.net + +- update package to new version (0.9.6) +- update patch for buildsystem installation locations +- patch for forcing c++11 mode on gcc4.8 (for openSUSE_Leap_42.3) + +------------------------------------------------------------------- +Thu Jul 27 22:30:46 UTC 2017 - dan.weatherill@cantab.net + +- initial package from upstream source (0.9.5) +- patch for correcting buildsystem installation locations diff --git a/rttr.spec b/rttr.spec new file mode 100644 index 0000000..4b20d00 --- /dev/null +++ b/rttr.spec @@ -0,0 +1,116 @@ +# +# spec file for package rttr +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: rttr +Version: 0.9.6 +Release: 0 +Summary: An open source library, which adds reflection to C++ +License: MIT +Url: http://www.rttr.org/releases/rttr-%{version}-src.tar.gz +Group: Development/Languages/C and C++ +Source0: %{name}-%{version}-src.tar.gz +#PATCH-FIX-OPENSUSE cxx11_compiler_flags.patch force c++11 mode on gcc4.8 (for Leap 42.3) +Patch0: cxx11_compiler_flags.patch +#PATCH-FIX-OPENSUSE cmake_install_dir.patch fix cmake installation directories for SUSE standards +Patch1: cmake_install_dir.patch +#PATCH-FIX-OPENSUSE doxygen_remove_date_time.patch remove date and time information from generated documentation +Patch2: doxygen_remove_date_time.patch +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: doxygen +BuildRequires: dos2unix +BuildRoot: %{_tmppath}/%{name}-%{version}-build + + +%description +RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library. + +The goal of this project is to provide an easy and intuitive way to use reflection in C++. + + +%prep +%setup -q -n%{name}-%{version} +%if 0%{?suse_version} < 1500 +%patch0 -p1 +%endif +%patch1 -p1 +%patch2 -p1 + +%build +%cmake -DBUILD_BENCHMARKS=OFF -DCMAKE_INSTALL_CMAKEDIR=cmake +#make unit tests pass +export LD_LIBRARY_PATH=%{_builddir}/rttr-%{version}/build/lib/ +%make_jobs + +%install +#make unit tests pass +export LD_LIBRARY_PATH=%{_builddir}/rttr-%{version}/build/lib/ +%cmake_install rttr_core + +#fix line endings of README.md +dos2unix %{buildroot}%{_datadir}/rttr/README.md + +%package -n lib%{name}_core0_9_6 +Summary: An open source library, which adds reflection to C++ + +%description -n lib%{name}_core0_9_6 +RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library. + +The goal of this project is to provide an easy and intuitive way to use reflection in C++. + +%post -n lib%{name}_core0_9_6 -p /sbin/ldconfig +%postun -n lib%{name}_core0_9_6 -p /sbin/ldconfig + + +%files -n lib%{name}_core0_9_6 +%defattr(644,root,root,-) +%{_libdir}/librttr_core.so.%{version} + +%package devel +Summary: Development files necessary for building software that uses rttr +Requires: librttr_core0_9_6 +Group: Development/Languages/C and C++ +%description devel +RTTR stands for Run Time Type Reflection. It describes the ability of a computer program to introspect and modify an object at runtime. It is also the name of the library itself, which is written in C++ and released as open source library. + +The goal of this project is to provide an easy and intuitive way to use reflection in C++. + + +%files devel +%defattr(644,root,root,-) +%{_includedir}/rttr/ +%{_libdir}/librttr_core.so +%{_libdir}/cmake/rttr/ + +%package doc +Summary: Documentation for rttr +Group: Development/Languages/C and C++ +%description doc +API Documentation for rttr + +%files doc +%defattr(644,root,root,-) +%docdir %{_datadir}/rttr +%docdir %{_docdir}/rttr/ + +%{_datadir}/rttr +%{_docdir}/rttr/ + +%changelog + +