From 3120ca8e810b4a1f6b541b33206a7c547a41b50f9984cb0d563cc4144fa9e90a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 1 Aug 2024 18:13:56 +0000 Subject: [PATCH 1/3] - cmake include files want to lkink agains gflags_shared instead of glflags only. Creating this libs the hard way. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gflags?expand=0&rev=13 --- .gitattributes | 23 +++++++ .gitignore | 1 + _multibuild | 3 + gflags-2.2.2.tar.gz | 3 + gflags.changes | 88 ++++++++++++++++++++++++++ gflags.spec | 151 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 269 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 gflags-2.2.2.tar.gz create mode 100644 gflags.changes create mode 100644 gflags.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/_multibuild b/_multibuild new file mode 100644 index 0000000..0e126bf --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + static + diff --git a/gflags-2.2.2.tar.gz b/gflags-2.2.2.tar.gz new file mode 100644 index 0000000..300356d --- /dev/null +++ b/gflags-2.2.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf +size 98704 diff --git a/gflags.changes b/gflags.changes new file mode 100644 index 0000000..871c1f0 --- /dev/null +++ b/gflags.changes @@ -0,0 +1,88 @@ +------------------------------------------------------------------- +Mon Jul 29 08:27:28 UTC 2024 - Christian Goll + +- cmake include files want to lkink agains gflags_shared instead + of glflags only. Creating this libs the hard way. + +------------------------------------------------------------------- +Sun Aug 28 19:42:22 UTC 2022 - Stefan Brüns + +- Fix (uncritical) libdir error in pkgconfig file. +- Use default RelWithDebInfo build type. +- Use separate _multibuilds for static and dynamic libraries, + otherwise CMake config depends on the static library. + +------------------------------------------------------------------- +Wed Apr 27 09:04:01 UTC 2022 - Jan Engelhardt + +- Resolve rpmlint report "libgflags2.x86_64: E: + shlib-policy-name-error SONAME: libgflags.so.2.2, expected + package suffix: 2_2" + +------------------------------------------------------------------- +Sun Aug 9 20:57:54 UTC 2020 - Matthias Eliasson + +- Update to version 2.2.2 + * Fixed 267: Support build with GCC option "-fvisibility=hidden". + * Fixed 262: Declare FALGS_no##name variables as static to avoid + "previous extern" warning. + * Fixed 261: Declare FlagRegisterer c’tor explicit template instanations as + extern in header + * Fixed 257: Build with _UNICODE support on Windows. + * Fixed 233/234/235: Move CMake defines that are unused by Bazel to + separate header; makes config.h private again + * Fixed 228: Build with recent MinGW versions that define setenv. + * Fixed 226: Remove obsolete and unused CleanFileName code + * Merged 266: Various PVS Studio and GCC warnings. + * Merged 258: Fix build with some Clang variants that define "restrict" + macro. + * Merged 252: Update documentation on how to use Bazel. + * Merged 249: Use "_debug" postfix for debug libraries. + * Merged 247: CMake "project" VERSION; no enable_testing(); "gflags::" + import target prefix. + * Merged 246: Add Bazel-on-Windows support. + * Merged 239: Use GFLAGS_NAMESPACE instead of "gflags" in test executable. + * Merged 237: Removed unused functions; fixes compilation with -Werror + compiler option. + * Merged 232: Fix typo in Bazel's BUILD definition + * Merged 230: Remove using ::fLS::clstring. + * Merged 221: Add convenience 'uninstall' target +- Run spec-cleaner + * Remove package groups + * Use make macros + +------------------------------------------------------------------- +Tue Sep 10 20:23:51 UTC 2019 - Christophe Giboudeaux + +- Use -ffat-lto-objects when building static libraries. + +------------------------------------------------------------------- +Tue Oct 30 10:29:06 UTC 2018 - Jan Engelhardt + +- Add RPM groups. Fix wrong devel-static description. + +------------------------------------------------------------------- +Tue Jul 11 17:41:43 UTC 2017 - aloisio@gmx.com + +- Update to version 2.2.1 + * Link to online documentation in README + * Merged 194: Include utils by file instead of CMAKE_MODULE_PATH + search + * Merged 195: Remove unused program_name variable + * Merged 196: Enable language C for older CMake versions when + needed + * Merged 202: Changed include directory in bazel build + * Merged 207: Mark single argument constructors in mutex.h as + explicit + * Merged 215: Fix static initialization order fiasco caused by + global registry lock + * Merged 216: Fix use of ARGC in CMake macros + * Merged 222: Static code analyzer error regarding strncmp with + empty kRootDir + +- Renamed source file + +------------------------------------------------------------------- +Tue Mar 21 06:15:05 UTC 2017 - miukumac@outlook.com + +- Initial 2.2.0 release diff --git a/gflags.spec b/gflags.spec new file mode 100644 index 0000000..128c62f --- /dev/null +++ b/gflags.spec @@ -0,0 +1,151 @@ +# +# spec file for package gflags +# +# Copyright (c) 2024 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} + +%global pname gflags + +%if "%{flavor}" == "static" +%define psuffix -%{flavor} +%bcond_with build_shared +%bcond_without build_static +%else +%define psuffix %{nil} +%bcond_without build_shared +%bcond_with build_static +%endif + +%define soversion 2_2 + +Name: gflags%{psuffix} +Version: 2.2.2 +Release: 0 +Summary: Library for commandline flag processing +License: BSD-3-Clause +Group: Development/Libraries/C and C++ +URL: https://github.com/gflags/gflags +Source0: https://github.com/%{pname}/%{pname}/archive/v%{version}.tar.gz#/%{pname}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +Requires: libgflags%{soversion} = %{version} + +%description +The gflags package contains a library that implements commandline +flags processing. As such, it is a replacement for getopt(). It has +increased flexibility, including built-in support for C++ types like +string, and the ability to define flags in the source file in which +they're used. + +%package -n libgflags%{soversion} +Summary: Library for commandline flag processing +Conflicts: libgflags2 + +%description -n libgflags%{soversion} +The gflags package contains a library that implements commandline +flags processing. As such, it is a replacement for getopt(). It has +increased flexibility, including built-in support for C++ types like +string, and the ability to define flags in the source file in which +they're used. + +%package devel +Summary: Development files for the dynamic gflags library +Requires: libgflags%{soversion} = %{version} + +%description devel +This package contains all necessary include files and the dynamic libraries +needed for developing applications. + +%package -n gflags-devel-static +Summary: Development files for the static gflags library +# CMake config for static and shared differ, but use the same export file name +Conflicts: %{pname}-devel + +%description -n gflags-devel-static +This package contains all necessary include files and the static libraries +needed for developing applications. + +%prep +%autosetup -n gflags-%{version} +# Fix prefix duplication, _libdir is absolute +sed -i -e 's@libdir=.*@libdir=%{_libdir}@' cmake/package.pc.in + +%build +%if %{with build_static} +%global _lto_cflags %{_lto_cflags} -ffat-lto-objects +%endif +%cmake \ + -DBUILD_STATIC_LIBS:BOOL=%{?with_build_static:ON}%{!?with_build_static:OFF} \ + -DBUILD_SHARED_LIBS:BOOL=%{?with_build_shared:ON}%{!?with_build_shared:OFF} \ + -DBUILD_TESTING:BOOL=ON \ + %{nil} + +%cmake_build + +%install +%cmake_install + +%if "%{flavor}" == "static" +rm %{buildroot}%{_bindir}/%{pname}_completions.sh +mv %{buildroot}%{_libdir}/pkgconfig/%{pname}{,_static}.pc +%else +ln -s %{_libdir}/libgflags.so %{buildroot}%{_libdir}/libgflags_shared.so +ln -s %{_libdir}/libgflags_nothreads.so %{buildroot}%{_libdir}/libgflags_nothreads_shared.so +%endif + +# Installs a file on $HOME, remove it +rm -rf %{buildroot}/home/ + +%check +export LD_LIBRARY_PATH=`pwd`/%{__builddir}/lib +%ctest + +%post -n libgflags%{soversion} -p /sbin/ldconfig +%postun -n libgflags%{soversion} -p /sbin/ldconfig + +%if "%{flavor}" == "" +%files +%license COPYING.txt +%doc AUTHORS.txt ChangeLog.txt README.md +%{_bindir}/%{pname}_completions.sh + +%files -n libgflags%{soversion} +%license COPYING.txt +%{_libdir}/libgflags.so.* +%{_libdir}/libgflags_nothreads.so.* + +%files devel +%{_includedir}/%{pname}/ +%{_libdir}/libgflags.so +%{_libdir}/libgflags_nothreads.so +%{_libdir}/libgflags_shared.so +%{_libdir}/libgflags_nothreads_shared.so +%{_libdir}/cmake/%{pname}/ +%{_libdir}/pkgconfig/%{pname}.pc +%endif + +%if "%{flavor}" == "static" +%files -n gflags-devel-static +%{_includedir}/%{pname}/ +%{_libdir}/cmake/%{pname}/ +%{_libdir}/pkgconfig/%{pname}_static.pc +%{_libdir}/libgflags.a +%{_libdir}/libgflags_nothreads.a +%endif + +%changelog From 4ce3a7617dd096fd1ad513cce057e5aec5edf797c6f907b4a6d69570a9dd74d7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 2 Aug 2024 06:33:25 +0000 Subject: [PATCH 2/3] - cmake include files want to link agains gflags_shared instead OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gflags?expand=0&rev=14 --- gflags.changes | 2 +- gflags.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gflags.changes b/gflags.changes index 871c1f0..de1c0ff 100644 --- a/gflags.changes +++ b/gflags.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon Jul 29 08:27:28 UTC 2024 - Christian Goll -- cmake include files want to lkink agains gflags_shared instead +- cmake include files want to link agains gflags_shared instead of glflags only. Creating this libs the hard way. ------------------------------------------------------------------- diff --git a/gflags.spec b/gflags.spec index 128c62f..c00a8e1 100644 --- a/gflags.spec +++ b/gflags.spec @@ -1,5 +1,5 @@ # -# spec file for package gflags +# spec file # # Copyright (c) 2024 SUSE LLC # From 2b3683c5913fa1017a5bd3e53b2b8931c39c0447edae8fe28d0b3c443faf74e2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 21 Aug 2024 11:35:32 +0000 Subject: [PATCH 3/3] - Revert previous, incorrect change. gflags_shared is a CMake target name, not a filename. Unfortunately no context was provided, making it impossible to know what was actually wanted. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gflags?expand=0&rev=15 --- gflags.changes | 8 ++++++++ gflags.spec | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gflags.changes b/gflags.changes index de1c0ff..0d576ed 100644 --- a/gflags.changes +++ b/gflags.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Aug 17 17:23:59 UTC 2024 - Stefan Brüns + +- Revert previous, incorrect change. gflags_shared is a CMake + target name, not a filename. Unfortunately no context was + provided, making it impossible to know what was actually + wanted. + ------------------------------------------------------------------- Mon Jul 29 08:27:28 UTC 2024 - Christian Goll diff --git a/gflags.spec b/gflags.spec index c00a8e1..3c18216 100644 --- a/gflags.spec +++ b/gflags.spec @@ -103,9 +103,6 @@ sed -i -e 's@libdir=.*@libdir=%{_libdir}@' cmake/package.pc.in %if "%{flavor}" == "static" rm %{buildroot}%{_bindir}/%{pname}_completions.sh mv %{buildroot}%{_libdir}/pkgconfig/%{pname}{,_static}.pc -%else -ln -s %{_libdir}/libgflags.so %{buildroot}%{_libdir}/libgflags_shared.so -ln -s %{_libdir}/libgflags_nothreads.so %{buildroot}%{_libdir}/libgflags_nothreads_shared.so %endif # Installs a file on $HOME, remove it @@ -133,8 +130,6 @@ export LD_LIBRARY_PATH=`pwd`/%{__builddir}/lib %{_includedir}/%{pname}/ %{_libdir}/libgflags.so %{_libdir}/libgflags_nothreads.so -%{_libdir}/libgflags_shared.so -%{_libdir}/libgflags_nothreads_shared.so %{_libdir}/cmake/%{pname}/ %{_libdir}/pkgconfig/%{pname}.pc %endif