Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-libs/nativefiledialog-extended/, dev-libs/nativefiledialog-extended/files/
Date: Sun, 04 Jul 2021 08:13:30
Message-Id: 1625386373.f4f9d84119b800a462bfa2cba2a620fcdef24466.Alessandro-Barbieri@gentoo
1 commit: f4f9d84119b800a462bfa2cba2a620fcdef24466
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun Jul 4 08:12:53 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sun Jul 4 08:12:53 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f4f9d841
7
8 dev-libs/nativefiledialog-extended: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-libs/nativefiledialog-extended/Manifest | 1 +
13 ...ledialog-extended-0_pre20210430-no-static.patch | 12 +++++
14 dev-libs/nativefiledialog-extended/metadata.xml | 52 ++++++++++++++++++++++
15 .../nativefiledialog-extended-0_pre20210430.ebuild | 37 +++++++++++++++
16 4 files changed, 102 insertions(+)
17
18 diff --git a/dev-libs/nativefiledialog-extended/Manifest b/dev-libs/nativefiledialog-extended/Manifest
19 new file mode 100644
20 index 000000000..f151faaa8
21 --- /dev/null
22 +++ b/dev-libs/nativefiledialog-extended/Manifest
23 @@ -0,0 +1 @@
24 +DIST nativefiledialog-extended-0_pre20210430.tar.gz 400551 BLAKE2B 3242bac8a8ec054853f9eac3cbbd09fd2389c1afa1c8bd314452b2d7b66b899c8fadd60f835e97bd7769457bed43bd3b684fdcb5b7480a3ca5ef6e5071fc9fd0 SHA512 049a19d39707476a609a6e22f70146df9e1533c5e93b349437d762673d6a1410777181fedff14ca6cf64e2c1e707c85f13d9101370aadbc79afd3795fac792a8
25
26 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
27 new file mode 100644
28 index 000000000..61914ccc1
29 --- /dev/null
30 +++ b/dev-libs/nativefiledialog-extended/files/nativefiledialog-extended-0_pre20210430-no-static.patch
31 @@ -0,0 +1,12 @@
32 +--- a/src/CMakeLists.txt
33 ++++ b/src/CMakeLists.txt
34 +@@ -23,8 +23,7 @@
35 + endif()
36 +
37 + # Define the library
38 +-add_library(${TARGET_NAME} STATIC
39 +- ${SOURCE_FILES})
40 ++add_library(${TARGET_NAME} ${SOURCE_FILES})
41 +
42 + # Allow includes from include/
43 + target_include_directories(${TARGET_NAME}
44
45 diff --git a/dev-libs/nativefiledialog-extended/metadata.xml b/dev-libs/nativefiledialog-extended/metadata.xml
46 new file mode 100644
47 index 000000000..acf95ed32
48 --- /dev/null
49 +++ b/dev-libs/nativefiledialog-extended/metadata.xml
50 @@ -0,0 +1,52 @@
51 +<?xml version="1.0" encoding="UTF-8"?>
52 +<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
53 +<pkgmetadata>
54 + <maintainer type="person">
55 + <email>lssndrbarbieri@×××××.com</email>
56 + <name>Alessandro Barbieri</name>
57 + </maintainer>
58 + <longdescription lang="en">
59 +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.
60 +
61 +This library is based on Michael Labbe's Native File Dialog (mlabbe/nativefiledialog).
62 +
63 +Features:
64 +
65 +Lean C API, static library -- no C++/ObjC runtime needed
66 +Supports Windows (MSVC, MinGW), MacOS (Clang), and Linux (GCC, Clang)
67 +Zlib licensed
68 +Friendly names for filters (e.g. C/C++ Source files (*.c;*.cpp) instead of (*.c;*.cpp)) on platforms that support it
69 +Automatically append file extension on platforms where users expect it
70 +Support for setting a default folder path
71 +Support for setting a default file name (e.g. Untitled.c)
72 +Consistent UTF-8 support on all platforms
73 +Native character set (UTF-16 wchar_t) support on Windows
74 +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
75 +Multiple file selection support (for file open dialog)
76 +Support for Vista's modern IFileDialog on Windows
77 +No third party dependencies
78 +Modern CMake build system
79 +Works alongside SDL2 on all platforms
80 +Optional C++ wrapper with unique_ptr auto-freeing semantics and optional parameters, for those using this library from C++
81 +
82 +Comparison with original Native File Dialog:
83 +
84 +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.
85 +
86 +Features added in Native File Dialog Extended:
87 +
88 +Friendly names for filters
89 +Automatically appending file extensions
90 +Support for setting a default file name
91 +Native character set (UTF-16 wchar_t) support on Windows
92 +Initialization and de-initialization of platform library decoupled from file dialog functions
93 +Modern CMake build system
94 +Optional C++ wrapper with unique_ptr auto-freeing semantics and optional parameters
95 +
96 +There is also significant code refractoring, especially for the Windows implementation
97 + </longdescription>
98 + <upstream>
99 + <bugs-to>https://github.com/btzy/nativefiledialog-extended/issues</bugs-to>
100 + <remote-id type="github">btzy/nativefiledialog-extended</remote-id>
101 + </upstream>
102 +</pkgmetadata>
103
104 diff --git a/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild b/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild
105 new file mode 100644
106 index 000000000..bd9f804e2
107 --- /dev/null
108 +++ b/dev-libs/nativefiledialog-extended/nativefiledialog-extended-0_pre20210430.ebuild
109 @@ -0,0 +1,37 @@
110 +# Copyright 1999-2021 Gentoo Authors
111 +# Distributed under the terms of the GNU General Public License v2
112 +
113 +EAPI=7
114 +
115 +COMMIT="322d1bc2a98c7b8236195d458643ac8e76391011"
116 +
117 +inherit cmake
118 +
119 +DESCRIPTION="Cross platform native file dialog library with C and C++ bindings, based on nativefiledialog"
120 +HOMEPAGE="https://github.com/btzy/nativefiledialog-extended"
121 +SRC_URI="https://github.com/btzy/nativefiledialog-extended/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
122 +S="${WORKDIR}/${PN}-${COMMIT}"
123 +
124 +LICENSE="ZLIB"
125 +SLOT="0"
126 +KEYWORDS="~amd64"
127 +
128 +RDEPEND="x11-libs/gtk+:3"
129 +DEPEND="${RDEPEND}"
130 +IUSE="test"
131 +
132 +RESTRICT="!test? ( test )"
133 +PATCHES=( "${FILESDIR}/${P}-no-static.patch" )
134 +
135 +src_prepare() {
136 + eapply_user
137 + sed -e "s|DESTINATION lib|DESTINATION $(get_libdir)|g" -i src/CMakeLists.txt || die
138 + cmake_src_prepare
139 +}
140 +
141 +src_configure() {
142 + local mycmakeargs=(
143 + -DNFD_BUILD_TESTS=$(usex test)
144 + )
145 + cmake_src_configure
146 +}