commit:     f4f9d84119b800a462bfa2cba2a620fcdef24466
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Jul  4 08:12:53 2021 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Sun Jul  4 08:12:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f4f9d841

dev-libs/nativefiledialog-extended: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-libs/nativefiledialog-extended/Manifest        |  1 +
 ...ledialog-extended-0_pre20210430-no-static.patch | 12 +++++
 dev-libs/nativefiledialog-extended/metadata.xml    | 52 ++++++++++++++++++++++
 .../nativefiledialog-extended-0_pre20210430.ebuild | 37 +++++++++++++++
 4 files changed, 102 insertions(+)

diff --git a/dev-libs/nativefiledialog-extended/Manifest 
b/dev-libs/nativefiledialog-extended/Manifest
new file mode 100644
index 000000000..f151faaa8
--- /dev/null
+++ b/dev-libs/nativefiledialog-extended/Manifest
@@ -0,0 +1 @@
+DIST nativefiledialog-extended-0_pre20210430.tar.gz 400551 BLAKE2B 
3242bac8a8ec054853f9eac3cbbd09fd2389c1afa1c8bd314452b2d7b66b899c8fadd60f835e97bd7769457bed43bd3b684fdcb5b7480a3ca5ef6e5071fc9fd0
 SHA512 
049a19d39707476a609a6e22f70146df9e1533c5e93b349437d762673d6a1410777181fedff14ca6cf64e2c1e707c85f13d9101370aadbc79afd3795fac792a8

diff --git 
a/dev-libs/nativefiledialog-extended/files/nativefiledialog-extended-0_pre20210430-no-static.patch
 
b/dev-libs/nativefiledialog-extended/files/nativefiledialog-extended-0_pre20210430-no-static.patch
new file mode 100644
index 000000000..61914ccc1
--- /dev/null
+++ 
b/dev-libs/nativefiledialog-extended/files/nativefiledialog-extended-0_pre20210430-no-static.patch
@@ -0,0 +1,12 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -23,8 +23,7 @@
+ endif()
+ 
+ # Define the library
+-add_library(${TARGET_NAME} STATIC
+-  ${SOURCE_FILES})
++add_library(${TARGET_NAME} ${SOURCE_FILES})
+ 
+ # Allow includes from include/
+ target_include_directories(${TARGET_NAME}

diff --git a/dev-libs/nativefiledialog-extended/metadata.xml 
b/dev-libs/nativefiledialog-extended/metadata.xml
new file mode 100644
index 000000000..acf95ed32
--- /dev/null
+++ b/dev-libs/nativefiledialog-extended/metadata.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>lssndrbarbi...@gmail.com</email>
+               <name>Alessandro Barbieri</name>
+       </maintainer>
+       <longdescription lang="en">
+A small C library with that portably invokes native file open, folder select 
and 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).
+
+Features:
+
+Lean C API, static library -- no C++/ObjC runtime needed
+Supports Windows (MSVC, MinGW), MacOS (Clang), and Linux (GCC, Clang)
+Zlib licensed
+Friendly names for filters (e.g. C/C++ Source files (*.c;*.cpp) instead of 
(*.c;*.cpp)) on platforms that support it
+Automatically append file extension on platforms where users expect it
+Support for setting a default folder path
+Support for setting a default file name (e.g. Untitled.c)
+Consistent UTF-8 support on all platforms
+Native character set (UTF-16 wchar_t) support on Windows
+Initialization and de-initialization of platform library (e.g. COM (Windows) / 
GTK (Linux)) decoupled from dialog functions, so applications can choose when 
to initialize/de-initialize
+Multiple file selection support (for file open dialog)
+Support for Vista's modern IFileDialog on Windows
+No third party dependencies
+Modern CMake build system
+Works alongside SDL2 on all platforms
+Optional C++ wrapper with unique_ptr auto-freeing semantics and optional 
parameters, for those using this library from C++
+
+Comparison with original Native File Dialog:
+
+The friendly names feature is the primary reason for breaking API 
compatibility with Michael Labbe's library (and hence this library probably 
will never be merged with it). There are also a number of tweaks that cause 
observable differences in this library.
+
+Features added in Native File Dialog Extended:
+
+Friendly names for filters
+Automatically appending file extensions
+Support for setting a default file name
+Native character set (UTF-16 wchar_t) support on Windows
+Initialization and de-initialization of platform library decoupled from file 
dialog functions
+Modern CMake build system
+Optional C++ wrapper with unique_ptr auto-freeing semantics and optional 
parameters
+
+There is also significant code refractoring, especially for the Windows 
implementation
+       </longdescription>
+       <upstream>
+               
<bugs-to>https://github.com/btzy/nativefiledialog-extended/issues</bugs-to>
+               <remote-id 
type="github">btzy/nativefiledialog-extended</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git 
a/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild
 
b/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild
new file mode 100644
index 000000000..bd9f804e2
--- /dev/null
+++ 
b/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+COMMIT="322d1bc2a98c7b8236195d458643ac8e76391011"
+
+inherit cmake
+
+DESCRIPTION="Cross platform native file dialog library with C and C++ 
bindings, based on nativefiledialog"
+HOMEPAGE="https://github.com/btzy/nativefiledialog-extended";
+SRC_URI="https://github.com/btzy/nativefiledialog-extended/archive/${COMMIT}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="x11-libs/gtk+:3"
+DEPEND="${RDEPEND}"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+PATCHES=( "${FILESDIR}/${P}-no-static.patch" )
+
+src_prepare() {
+       eapply_user
+       sed -e "s|DESTINATION lib|DESTINATION $(get_libdir)|g" -i 
src/CMakeLists.txt || die
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DNFD_BUILD_TESTS=$(usex test)
+       )
+       cmake_src_configure
+}

Reply via email to