Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/hyx/, app-editors/hyx/files/
Date: Wed, 31 Aug 2022 22:25:50
Message-Id: 1661984111.387d202839e119f7d1d3b3b2c67b2ecb0828c4bd.sam@gentoo
1 commit: 387d202839e119f7d1d3b3b2c67b2ecb0828c4bd
2 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
3 AuthorDate: Wed Aug 3 21:18:31 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 31 22:15:11 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=387d2028
7
8 app-editors/hyx: new package, add 2021.06.09
9
10 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
11 Closes: https://github.com/gentoo/gentoo/pull/26731
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 app-editors/hyx/Manifest | 1 +
15 app-editors/hyx/files/hyx-ldflags.patch | 27 +++++++++++++++++++++++++++
16 app-editors/hyx/hyx-2021.06.09.ebuild | 27 +++++++++++++++++++++++++++
17 app-editors/hyx/metadata.xml | 12 ++++++++++++
18 4 files changed, 67 insertions(+)
19
20 diff --git a/app-editors/hyx/Manifest b/app-editors/hyx/Manifest
21 new file mode 100644
22 index 000000000000..8505c8b69dda
23 --- /dev/null
24 +++ b/app-editors/hyx/Manifest
25 @@ -0,0 +1 @@
26 +DIST hyx-2021.06.09.tar.xz 13864 BLAKE2B 2c97364e1ae185e7dd63fdfb452637cb68b8ab0d76d0009ce515d6f0fe709d38b910f86dfa465ac6843c88feb997dfdc3c736e21bb0b4265a39440c054f75251 SHA512 43f990e29ce097f8e2378a4511a3097e2576fd72e16f3b5c81688702487c8715e7189cb4a368e344c5440a90a1c759d2f76e7831ab401fa814f7e5ff7e145bd8
27
28 diff --git a/app-editors/hyx/files/hyx-ldflags.patch b/app-editors/hyx/files/hyx-ldflags.patch
29 new file mode 100644
30 index 000000000000..714e76a795db
31 --- /dev/null
32 +++ b/app-editors/hyx/files/hyx-ldflags.patch
33 @@ -0,0 +1,27 @@
34 +diff -Naur hyx-2021.06.09.org/Makefile hyx-2021.06.09/Makefile
35 +--- hyx-2021.06.09.org/Makefile 2021-06-09 18:09:18.000000000 +0200
36 ++++ hyx-2021.06.09/Makefile 2022-08-31 08:20:27.711819466 +0200
37 +@@ -1,18 +1,19 @@
38 +
39 + all: CFLAGS ?= -O2 -Wl,-s \
40 +- -Wl,-z,relro,-z,now -fpic -pie -D_FORTIFY_SOURCE=2 -fstack-protector-all
41 +-all: CFLAGS += -std=c99 -pedantic -Wall -Wextra -DNDEBUG
42 ++ -std=c99 -pedantic -Wall -Wextra -DNDEBUG
43 ++all: LDFLAGS ?= -Wl,-z,relro,-z,now -fpic -pie -D_FORTIFY_SOURCE=2 -fstack-protector-all
44 + all: hyx
45 +
46 + debug: CFLAGS ?= -O0 -g \
47 + -fsanitize=undefined \
48 +- -Wl,-z,relro,-z,now -fpic -pie -fstack-protector-all
49 +-debug: CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
50 ++ -std=c99 -pedantic -Wall -Wextra -Werror
51 ++debug: LDFLAGS ?= -Wl,-z,relro,-z,now -fpic -pie -fstack-protector-all
52 + debug: hyx
53 +
54 + hyx: *.h *.c
55 + $(CC) \
56 + $(CFLAGS) \
57 ++ $(LDFLAGS) \
58 + hyx.c common.c blob.c history.c view.c input.c \
59 + -o hyx
60 +
61
62 diff --git a/app-editors/hyx/hyx-2021.06.09.ebuild b/app-editors/hyx/hyx-2021.06.09.ebuild
63 new file mode 100644
64 index 000000000000..d185af4b0b5f
65 --- /dev/null
66 +++ b/app-editors/hyx/hyx-2021.06.09.ebuild
67 @@ -0,0 +1,27 @@
68 +# Copyright 1999-2022 Gentoo Authors
69 +# Distributed under the terms of the GNU General Public License v2
70 +
71 +EAPI=8
72 +
73 +inherit toolchain-funcs
74 +
75 +DESCRIPTION="A minimalistic console hex editor with vim-like controls"
76 +HOMEPAGE="https://yx7.cc/code/"
77 +SRC_URI="https://yx7.cc/code/hyx/${P}.tar.xz"
78 +
79 +LICENSE="MIT-with-advertising"
80 +SLOT="0"
81 +KEYWORDS="~amd64 ~x86"
82 +
83 +PATCHES=(
84 + # Avoid complaining about not respecting LDFLAGS
85 + "${FILESDIR}/${PN}-ldflags.patch"
86 +)
87 +
88 +src_compile() {
89 + CC=$(tc-getCC) emake
90 +}
91 +
92 +src_install() {
93 + dobin hyx
94 +}
95
96 diff --git a/app-editors/hyx/metadata.xml b/app-editors/hyx/metadata.xml
97 new file mode 100644
98 index 000000000000..daba394f5855
99 --- /dev/null
100 +++ b/app-editors/hyx/metadata.xml
101 @@ -0,0 +1,12 @@
102 +<?xml version="1.0" encoding="UTF-8"?>
103 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
104 +<pkgmetadata>
105 + <maintainer type="person" proxied="yes">
106 + <email>mario.haustein@×××××××××××××××.de</email>
107 + <name>Mario Haustein</name>
108 + </maintainer>
109 + <maintainer type="project" proxied="proxy">
110 + <email>proxy-maint@g.o</email>
111 + <name>Proxy Maintainers</name>
112 + </maintainer>
113 +</pkgmetadata>