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/ne/files/, app-editors/ne/
Date: Tue, 18 May 2021 23:38:16
Message-Id: 1621380915.a3d5c325c790fb1072489d4f3e29665b3ef58d61.sam@gentoo
1 commit: a3d5c325c790fb1072489d4f3e29665b3ef58d61
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 18 23:34:10 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 18 23:35:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3d5c325
7
8 app-editors/ne: add 3.3.1
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-editors/ne/Manifest | 1 +
13 app-editors/ne/files/ne-3.3.1-respect-CFLAGS.patch | 14 ++++++
14 app-editors/ne/ne-3.3.1.ebuild | 57 ++++++++++++++++++++++
15 3 files changed, 72 insertions(+)
16
17 diff --git a/app-editors/ne/Manifest b/app-editors/ne/Manifest
18 index b558bdc9e67..f8c4a374195 100644
19 --- a/app-editors/ne/Manifest
20 +++ b/app-editors/ne/Manifest
21 @@ -1 +1,2 @@
22 DIST ne-3.3.0.tar.gz 1173159 BLAKE2B a4be3fd37a0a79b440290846184bc50551cfb9b73dc50c0376110f3603233879b396f67a87e2f9defe9c0cbc42c963e66bc43ab5396f8ccb27e5b6182c429006 SHA512 73a1bbc5a9f62354834288e25b8f4bf2b0d2ff6faf3408108b217305e2c9d8fed768b5a3c3fd21df7b3bf75a3f9c71ea899a8b3f528b560a8e5e66accd442919
23 +DIST ne-3.3.1.tar.gz 1138072 BLAKE2B 8494ff955b456bbac2e82823ee155980f8fab5a1071d0bfd6a987f1ed0724129ab2ecb70737547836b592369b45daf5e499d50d7230b04c5eabfd1536a56271f SHA512 d8c1d8cd9bbafcc7c8c485ca4454d6979be3d33ae918139865ce5f76e428f165043707c95c2e440bd9bccd00c67ce81a41f87f94b85cae3518c4749233718123
24
25 diff --git a/app-editors/ne/files/ne-3.3.1-respect-CFLAGS.patch b/app-editors/ne/files/ne-3.3.1-respect-CFLAGS.patch
26 new file mode 100644
27 index 00000000000..13e47b9be2b
28 --- /dev/null
29 +++ b/app-editors/ne/files/ne-3.3.1-respect-CFLAGS.patch
30 @@ -0,0 +1,14 @@
31 +diff --git a/src/makefile b/src/makefile
32 +index ae358fe..76bfe1d 100644
33 +--- a/src/makefile
34 ++++ b/src/makefile
35 +@@ -96,8 +96,7 @@ endif
36 +
37 + # Test for GCC
38 + ifneq (,$(findstring gcc,$(shell $(CC) 2>&1)))
39 +-GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -flto=auto -ffat-lto-objects -Wp,-D_FORTIFY_SOURCE=2
40 +-LDFLAGS=-flto=auto
41 ++GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2
42 + endif
43 +
44 + CFLAGS=$(GCCFLAGS) \
45
46 diff --git a/app-editors/ne/ne-3.3.1.ebuild b/app-editors/ne/ne-3.3.1.ebuild
47 new file mode 100644
48 index 00000000000..242892b33de
49 --- /dev/null
50 +++ b/app-editors/ne/ne-3.3.1.ebuild
51 @@ -0,0 +1,57 @@
52 +# Copyright 1999-2021 Gentoo Authors
53 +# Distributed under the terms of the GNU General Public License v2
54 +
55 +EAPI=7
56 +
57 +inherit autotools flag-o-matic toolchain-funcs
58 +
59 +DESCRIPTION="The nice editor, easy to use for the beginner and powerful for the wizard"
60 +HOMEPAGE="https://ne.di.unimi.it/"
61 +SRC_URI="https://ne.di.unimi.it/${P}.tar.gz"
62 +
63 +LICENSE="GPL-3"
64 +SLOT="0"
65 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
66 +
67 +BDEPEND="virtual/pkgconfig"
68 +DEPEND="sys-libs/ncurses:="
69 +RDEPEND="
70 + ${DEPEND}
71 + dev-lang/perl
72 +"
73 +
74 +HTML_DOCS=( doc/html/. )
75 +
76 +PATCHES=(
77 + "${FILESDIR}"/${PN}-3.3.1-respect-CFLAGS.patch
78 +)
79 +
80 +src_prepare() {
81 + default
82 +
83 + sed -i -e 's/-O3//' src/makefile || die
84 +}
85 +
86 +src_configure() {
87 + # bug #776799
88 + sed -i -e "s/-lcurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" src/makefile || die
89 +}
90 +
91 +src_compile() {
92 + append-cflags -std=c11
93 + emake -C src CC="$(tc-getCC)" \
94 + NE_GLOBAL_DIR="/usr/share/${PN}" \
95 + OPTS="${CFLAGS}" \
96 + LDFLAGS="${LDFLAGS}" \
97 + "${PN}"
98 +}
99 +
100 +src_install() {
101 + dobin src/${PN}
102 +
103 + insinto /usr/share/${PN}/syntax
104 + doins syntax/*.jsf
105 +
106 + doman doc/${PN}.1
107 + dodoc CHANGES README.md NEWS doc/*.{txt,pdf,texinfo} doc/default.*
108 +}