Gentoo Archives: gentoo-commits

From: Adam Pimentel <adam.pimentel@××××××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-p2p/feather/files/, net-p2p/feather/
Date: Wed, 01 Mar 2023 23:04:14
Message-Id: 1677711832.75e3b2116f53ecf20adfc300c1c2bbee76a4d522.adam.pimentel@gentoo
1 commit: 75e3b2116f53ecf20adfc300c1c2bbee76a4d522
2 Author: Adam Pimentel <adam.pimentel <AT> protonmail <DOT> com>
3 AuthorDate: Wed Mar 1 23:03:52 2023 +0000
4 Commit: Adam Pimentel <adam.pimentel <AT> protonmail <DOT> com>
5 CommitDate: Wed Mar 1 23:03:52 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=75e3b211
7
8 net-p2p/feather: version bump for real this time
9
10 Signed-off-by: Adam Pimentel <adam.pimentel <AT> protonmail.com>
11
12 net-p2p/feather/feather-2.4.1_pre20230301.ebuild | 149 +++++++++++++++++++++
13 .../feather_remove_cflags-2.4.1_pre20230301.patch | 18 +++
14 .../monero_remove_cflags-2.4.1_pre20230301.patch | 25 ++++
15 3 files changed, 192 insertions(+)
16
17 diff --git a/net-p2p/feather/feather-2.4.1_pre20230301.ebuild b/net-p2p/feather/feather-2.4.1_pre20230301.ebuild
18 new file mode 100644
19 index 000000000..2f597359e
20 --- /dev/null
21 +++ b/net-p2p/feather/feather-2.4.1_pre20230301.ebuild
22 @@ -0,0 +1,149 @@
23 +# Copyright 1999-2022 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=8
27 +
28 +inherit cmake desktop xdg
29 +
30 +# Comit that fixes qt5:
31 +FEATHER_DIST_COMIT="8e10731e37621e271eea481dd93065a55c0a74c8"
32 +
33 +SINGLEAPPLICATION_DIST_COMIT="3e8e85d1a487e433751711a8a090659684d42e3b"
34 +MONERO_DIST_COMIT="772d207026dac31f927efa733fda3f73b103e71a"
35 + MINIUPNP_DIST_COMIT="544e6fcc73c5ad9af48a8985c94f0f1d742ef2e0"
36 + RANDOMX_DIST_COMIT="261d58c77fc5547c0aa7fdfeb58421ba7e0e6e1c"
37 + RAPIDJSON_DIST_COMIT="129d19ba7f496df5e33658527a7158c79b99c21c"
38 + SUPERCOP_DIST_COMIT="633500ad8c8759995049ccd022107d1fa8a1bbc9"
39 + TREZORCOMMON_DIST_COMIT="bff7fdfe436c727982cc553bdfb29a9021b423b0"
40 +
41 +DESCRIPTION="A free, open-source Monero wallet"
42 +HOMEPAGE="https://featherwallet.org"
43 +SRC_URI="https://github.com/feather-wallet/feather/archive/${FEATHER_DIST_COMIT}.tar.gz -> \
44 +${P}.tar.gz
45 + https://github.com/itay-grudev/SingleApplication/archive/${SINGLEAPPLICATION_DIST_COMIT}.tar.gz -> \
46 +${P}-singleapplication.tar.gz
47 + https://github.com/feather-wallet/monero/archive/${MONERO_DIST_COMIT}.tar.gz -> \
48 +${P}-monero.tar.gz
49 + https://github.com/miniupnp/miniupnp/archive/${MINIUPNP_DIST_COMIT}.tar.gz -> \
50 +${P}-monero-miniupnp.tar.gz
51 + https://github.com/tevador/RandomX/archive/${RANDOMX_DIST_COMIT}.tar.gz -> \
52 +${P}-monero-randomx.tar.gz
53 + https://github.com/Tencent/rapidjson/archive/${RAPIDJSON_DIST_COMIT}.tar.gz -> \
54 +${P}-monero-rapidjson.tar.gz
55 + https://github.com/monero-project/supercop/archive/${SUPERCOP_DIST_COMIT}.tar.gz -> \
56 +${P}-monero-supercop.tar.gz
57 + https://github.com/trezor/trezor-common/archive/${TREZORCOMMON_DIST_COMIT}.tar.gz -> \
58 +${P}-monero-trezorcommon.tar.gz
59 +"
60 +
61 +# Feather is released under the terms of the BSD license, but it vendors
62 +# code from Monero and Tor too.
63 +LICENSE="BSD MIT"
64 +SLOT="0"
65 +KEYWORDS="~amd64"
66 +IUSE="qrcode xmrig localmonero"
67 +
68 +DEPEND="
69 + dev-libs/libsodium:=
70 + media-gfx/qrencode:=
71 + media-gfx/zbar:=[v4l]
72 + >=dev-libs/polyseed-1.0.0
73 + dev-libs/libzip:=
74 + dev-libs/boost:=[nls]
75 + >=dev-qt/qtcore-5.15:5
76 + >=dev-qt/qtwidgets-5.15:5
77 + >=dev-qt/qtgui-5.15:5
78 + >=dev-qt/qtnetwork-5.15:5
79 + >=dev-qt/qtsvg-5.15:5
80 + >=dev-qt/qtxml-5.15:5
81 + >=dev-qt/qtwebsockets-5.15:5
82 + >=dev-qt/qtmultimedia-5.15:5[widgets]
83 + >=dev-qt/qtconcurrent-5.15:5
84 + dev-libs/libgcrypt:=
85 + sys-libs/zlib
86 + dev-libs/openssl:=
87 + net-dns/unbound:=[threads]
88 + net-libs/czmq:=
89 +"
90 +RDEPEND="
91 + ${DEPEND}
92 + net-vpn/tor
93 + xmrig? ( net-misc/xmrig )
94 +"
95 +BDEPEND="virtual/pkgconfig"
96 +
97 +src_unpack() {
98 + unpack ${P}.tar.gz \
99 + ${P}-singleapplication.tar.gz \
100 + ${P}-monero.tar.gz \
101 + ${P}-monero-miniupnp.tar.gz \
102 + ${P}-monero-randomx.tar.gz \
103 + ${P}-monero-rapidjson.tar.gz \
104 + ${P}-monero-supercop.tar.gz \
105 + ${P}-monero-trezorcommon.tar.gz
106 + mv -T "${WORKDIR}"/feather-${FEATHER_DIST_COMIT} \
107 + "${WORKDIR}"/${P} || die
108 + mv -T "${WORKDIR}"/SingleApplication-${SINGLEAPPLICATION_DIST_COMIT} \
109 + "${WORKDIR}"/${P}/src/third-party/singleapplication || die
110 + mv -T "${WORKDIR}"/monero-${MONERO_DIST_COMIT} \
111 + "${WORKDIR}"/${P}/monero || die
112 + mv -T "${WORKDIR}"/miniupnp-${MINIUPNP_DIST_COMIT} \
113 + "${WORKDIR}"/${P}/monero/external/miniupnp || die
114 + mv -T "${WORKDIR}"/RandomX-${RANDOMX_DIST_COMIT} \
115 + "${WORKDIR}"/${P}/monero/external/randomx || die
116 + mv -T "${WORKDIR}"/rapidjson-${RAPIDJSON_DIST_COMIT} \
117 + "${WORKDIR}"/${P}/monero/external/rapidjson || die
118 + mv -T "${WORKDIR}"/supercop-${SUPERCOP_DIST_COMIT} \
119 + "${WORKDIR}"/${P}/monero/external/supercop || die
120 + mv -T "${WORKDIR}"/trezor-common-${TREZORCOMMON_DIST_COMIT} \
121 + "${WORKDIR}"/${P}/monero/external/trezor-common || die
122 +}
123 +
124 +src_prepare() {
125 + default
126 + echo "#define FEATHER_VERSION \"${PV}\"" > "${WORKDIR}"/${PF}/src/config-feather.h || die
127 + echo "#define TOR_VERSION \"NOT_EMBEDDED\"" >> "${WORKDIR}"/${PF}/src/config-feather.h || die
128 + eapply "${FILESDIR}"/feather_remove_cflags-${PV}.patch
129 + pushd monero || die
130 + eapply "${FILESDIR}"/monero_remove_cflags-${PV}.patch
131 + popd || die
132 + cmake_src_prepare
133 +}
134 +
135 +src_configure() {
136 + local mycmakeargs=(
137 + -DCMAKE_BUILD_TYPE=Release
138 + -DBUILD_SHARED_LIBS=OFF
139 + -DARCH=x86-64
140 + -DBUILD_TAG="linux-x64"
141 + -DBUILD_64=ON
142 + -DSELF_CONTAINED=OFF
143 + -DLOCALMONERO=$(usex localmonero)
144 + -DXMRIG=$(usex xmrig)
145 + -DCHECK_UPDATES=OFF
146 + -DPLATFORM_INSTALLER=OFF
147 + -DUSE_DEVICE_TREZOR=OFF
148 + -DDONATE_BEG=OFF
149 + -DWITH_SCANNER=$(usex qrcode)
150 + )
151 +
152 + cmake_src_configure
153 +}
154 +
155 +src_compile() {
156 + cmake_build feather
157 +}
158 +
159 +src_install() {
160 + dobin "${BUILD_DIR}/bin/feather"
161 +
162 + doicon "${WORKDIR}"/${PF}/src/assets/images/feather.png
163 + domenu "${WORKDIR}"/${PF}/src/assets/feather.desktop
164 +}
165 +
166 +pkg_postinst() {
167 + xdg_pkg_postinst
168 +
169 + einfo "Ensure that Tor is running with 'rc-service tor start' before"
170 + einfo "using Feather."
171 +}
172
173 diff --git a/net-p2p/feather/files/feather_remove_cflags-2.4.1_pre20230301.patch b/net-p2p/feather/files/feather_remove_cflags-2.4.1_pre20230301.patch
174 new file mode 100644
175 index 000000000..a3dbbb06e
176 --- /dev/null
177 +++ b/net-p2p/feather/files/feather_remove_cflags-2.4.1_pre20230301.patch
178 @@ -0,0 +1,18 @@
179 +--- a/CMakeLists.txt
180 ++++ b/CMakeLists.txt
181 +@@ -262,12 +262,8 @@
182 + add_c_flag_if_supported(-fPIC C_SECURITY_FLAGS)
183 + add_cxx_flag_if_supported(-fPIC CXX_SECURITY_FLAGS)
184 +
185 +-message(STATUS "Using C security hardening flags: ${C_SECURITY_FLAGS}")
186 +-message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
187 +-message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
188 +-
189 +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
190 +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
191 +-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
192 ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wa,--noexecstack")
193 ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wa,--noexecstack")
194 ++set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,noexecstack ${STATIC_FLAGS}")
195 +
196 + add_subdirectory(src)
197
198 diff --git a/net-p2p/feather/files/monero_remove_cflags-2.4.1_pre20230301.patch b/net-p2p/feather/files/monero_remove_cflags-2.4.1_pre20230301.patch
199 new file mode 100644
200 index 000000000..869a7bdc8
201 --- /dev/null
202 +++ b/net-p2p/feather/files/monero_remove_cflags-2.4.1_pre20230301.patch
203 @@ -0,0 +1,25 @@
204 +--- a/CMakeLists.txt
205 ++++ b/CMakeLists.txt
206 +@@ -773,9 +773,6 @@
207 + message(STATUS "AES support disabled")
208 + endif()
209 +
210 +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}")
211 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}")
212 +-
213 + set(WARNINGS "-Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized")
214 + if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
215 + if(ARM)
216 +@@ -901,9 +898,9 @@
217 + message(STATUS "Using C++ security hardening flags: ${CXX_SECURITY_FLAGS}")
218 + message(STATUS "Using linker security hardening flags: ${LD_SECURITY_FLAGS}")
219 +
220 +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
221 +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
222 +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
223 ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG}")
224 ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG}")
225 ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
226 +
227 + # With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
228 + # is fixed in the code (Issue #847), force compiler to be conservative.