Files
nativefiledialog-extended/nativefiledialog-extended.spec

116 lines
3.5 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package nativefiledialog-extended
#
Accepting request 1272810 from home:alois Update to version 1.2.1 This is a bugfix release that fixes a crash in the GTK backend that is caused by GTK creating a dialog window on X11 even though the parent window is on Wayland, or vice versa. The build script also received a fix that improves usability when this library is set up as a dependency of another project. What's Changed * Build: Add alias target for dependent project CMake consumption * GTK: Open the dialog window on the same GdkScreen (and GdkDisplay) as the parent version 1.2.0: This release brings two new features: Opening a folder picker that allows multiple selection (PickFolderMultiple), and giving the dialog a parent window (only X11 support is currently implemented; Wayland support will likely be added in the future). A bunch of new functions have also been added to nfd.h in a backward compatible manner to support passing a parent window and allow for adding more new optional parameters in the future. There are also various code cleanups and improved code comments in Doxygen syntax. What's Changed * Test: Add tests with NFD_NATIVE * Replace Macros with Aliases * Doxygen Syntax * Add versioned API * New feature: Implement PickFolderMultiple * New feature: Accept native parent window handle and implement glue code to major platform abstraction frameworks * README: Add versioned API, PickFolderMultiple, and parent OBS-URL: https://build.opensuse.org/request/show/1272810 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nativefiledialog-extended?expand=0&rev=2
2025-05-20 10:04:10 +00:00
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2022 Jonathan Wright <jonathan@almalinux.org>
#
# 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/
#
%define sover 1
Name: nativefiledialog-extended
Accepting request 1272810 from home:alois Update to version 1.2.1 This is a bugfix release that fixes a crash in the GTK backend that is caused by GTK creating a dialog window on X11 even though the parent window is on Wayland, or vice versa. The build script also received a fix that improves usability when this library is set up as a dependency of another project. What's Changed * Build: Add alias target for dependent project CMake consumption * GTK: Open the dialog window on the same GdkScreen (and GdkDisplay) as the parent version 1.2.0: This release brings two new features: Opening a folder picker that allows multiple selection (PickFolderMultiple), and giving the dialog a parent window (only X11 support is currently implemented; Wayland support will likely be added in the future). A bunch of new functions have also been added to nfd.h in a backward compatible manner to support passing a parent window and allow for adding more new optional parameters in the future. There are also various code cleanups and improved code comments in Doxygen syntax. What's Changed * Test: Add tests with NFD_NATIVE * Replace Macros with Aliases * Doxygen Syntax * Add versioned API * New feature: Implement PickFolderMultiple * New feature: Accept native parent window handle and implement glue code to major platform abstraction frameworks * README: Add versioned API, PickFolderMultiple, and parent OBS-URL: https://build.opensuse.org/request/show/1272810 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nativefiledialog-extended?expand=0&rev=2
2025-05-20 10:04:10 +00:00
Version: 1.2.1
Release: 0
Summary: Native file dialog library with C and C++ bindings
License: Zlib
URL: https://github.com/btzy/nativefiledialog-extended
Source0: https://github.com/btzy/nativefiledialog-extended/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Accepting request 1272810 from home:alois Update to version 1.2.1 This is a bugfix release that fixes a crash in the GTK backend that is caused by GTK creating a dialog window on X11 even though the parent window is on Wayland, or vice versa. The build script also received a fix that improves usability when this library is set up as a dependency of another project. What's Changed * Build: Add alias target for dependent project CMake consumption * GTK: Open the dialog window on the same GdkScreen (and GdkDisplay) as the parent version 1.2.0: This release brings two new features: Opening a folder picker that allows multiple selection (PickFolderMultiple), and giving the dialog a parent window (only X11 support is currently implemented; Wayland support will likely be added in the future). A bunch of new functions have also been added to nfd.h in a backward compatible manner to support passing a parent window and allow for adding more new optional parameters in the future. There are also various code cleanups and improved code comments in Doxygen syntax. What's Changed * Test: Add tests with NFD_NATIVE * Replace Macros with Aliases * Doxygen Syntax * Add versioned API * New feature: Implement PickFolderMultiple * New feature: Accept native parent window handle and implement glue code to major platform abstraction frameworks * README: Add versioned API, PickFolderMultiple, and parent OBS-URL: https://build.opensuse.org/request/show/1272810 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nativefiledialog-extended?expand=0&rev=2
2025-05-20 10:04:10 +00:00
# PATCH-FIX-OPENSUSE nfd-use_correct_cmake_folder.patch
Patch0: nfd-use_correct_cmake_folder.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gtk+-3.0)
%description
A small C library with that portably invokes native file open, folder
select and file save dialogs. Write dialog code once and have it pop up
native dialogs on all supported platforms. Avoid linking large
dependencies like wxWidgets and Qt.
This library is based on Michael Labbe's Native File Dialog
(mlabbe/nativefiledialog).
%package -n libnfd%{sover}
Summary: Native file dialog library with C and C++ bindings
%description -n libnfd%{sover}
A small C library with that portably invokes native file open, folder
select and file save dialogs. Write dialog code once and have it pop up
native dialogs on all supported platforms. Avoid linking large
dependencies like wxWidgets and Qt.
This library is based on Michael Labbe's Native File Dialog
(mlabbe/nativefiledialog).
%package devel
Summary: Development files for %{name}
Requires: libnfd%{sover} = %{version}
%description devel
A small C library with that portably invokes native file open, folder
select and file save dialogs. Write dialog code once and have it pop up
native dialogs on all supported platforms. Avoid linking large
dependencies like wxWidgets and Qt.
This library is based on Michael Labbe's Native File Dialog
(mlabbe/nativefiledialog).
%prep
%autosetup -p1
%build
%cmake \
-D NFD_BUILD_TESTS=OFF \
-D BUILD_SHARED_LIBRARY=ON
%cmake_build
%install
%cmake_install
# creates support file for pkg-config
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
tee %{buildroot}/%{_libdir}/pkgconfig/nfd.pc << "EOF"
prefix=%{_prefix}
exec_prefix=${prefix}
libdir=${exec_prefix}/%{_lib}
includedir=${prefix}/include
Name: nativefiledialog-extended
Description: Native file dialog library with C and C++ bindings
Version: %{version}
Libs: -lnfd
Cflags: -I${includedir}
EOF
%check
# all tests will fail because they require a display
%ldconfig_scriptlets -n libnfd%{sover}
%files -n libnfd%{sover}
%license LICENSE
%doc README.md
%{_libdir}/libnfd.so.%{sover}*
%files devel
%license LICENSE
Accepting request 1272810 from home:alois Update to version 1.2.1 This is a bugfix release that fixes a crash in the GTK backend that is caused by GTK creating a dialog window on X11 even though the parent window is on Wayland, or vice versa. The build script also received a fix that improves usability when this library is set up as a dependency of another project. What's Changed * Build: Add alias target for dependent project CMake consumption * GTK: Open the dialog window on the same GdkScreen (and GdkDisplay) as the parent version 1.2.0: This release brings two new features: Opening a folder picker that allows multiple selection (PickFolderMultiple), and giving the dialog a parent window (only X11 support is currently implemented; Wayland support will likely be added in the future). A bunch of new functions have also been added to nfd.h in a backward compatible manner to support passing a parent window and allow for adding more new optional parameters in the future. There are also various code cleanups and improved code comments in Doxygen syntax. What's Changed * Test: Add tests with NFD_NATIVE * Replace Macros with Aliases * Doxygen Syntax * Add versioned API * New feature: Implement PickFolderMultiple * New feature: Accept native parent window handle and implement glue code to major platform abstraction frameworks * README: Add versioned API, PickFolderMultiple, and parent OBS-URL: https://build.opensuse.org/request/show/1272810 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nativefiledialog-extended?expand=0&rev=2
2025-05-20 10:04:10 +00:00
%{_includedir}/nfd.h
%{_includedir}/nfd.hpp
%{_includedir}/nfd_glfw3.h
%{_includedir}/nfd_sdl2.h
%{_libdir}/libnfd.so
Accepting request 1272810 from home:alois Update to version 1.2.1 This is a bugfix release that fixes a crash in the GTK backend that is caused by GTK creating a dialog window on X11 even though the parent window is on Wayland, or vice versa. The build script also received a fix that improves usability when this library is set up as a dependency of another project. What's Changed * Build: Add alias target for dependent project CMake consumption * GTK: Open the dialog window on the same GdkScreen (and GdkDisplay) as the parent version 1.2.0: This release brings two new features: Opening a folder picker that allows multiple selection (PickFolderMultiple), and giving the dialog a parent window (only X11 support is currently implemented; Wayland support will likely be added in the future). A bunch of new functions have also been added to nfd.h in a backward compatible manner to support passing a parent window and allow for adding more new optional parameters in the future. There are also various code cleanups and improved code comments in Doxygen syntax. What's Changed * Test: Add tests with NFD_NATIVE * Replace Macros with Aliases * Doxygen Syntax * Add versioned API * New feature: Implement PickFolderMultiple * New feature: Accept native parent window handle and implement glue code to major platform abstraction frameworks * README: Add versioned API, PickFolderMultiple, and parent OBS-URL: https://build.opensuse.org/request/show/1272810 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/nativefiledialog-extended?expand=0&rev=2
2025-05-20 10:04:10 +00:00
%dir %{_libdir}/cmake/nfd
%{_libdir}/cmake/nfd/nfd-config-relwithdebinfo.cmake
%{_libdir}/cmake/nfd/nfd-config.cmake
%{_libdir}/pkgconfig/nfd.pc
%changelog