Skip to content

Commit

Permalink
app-editors/ne: add 3.3.1
Browse files Browse the repository at this point in the history
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed May 18, 2021
1 parent 8de2504 commit a3d5c32
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-editors/ne/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST ne-3.3.0.tar.gz 1173159 BLAKE2B a4be3fd37a0a79b440290846184bc50551cfb9b73dc50c0376110f3603233879b396f67a87e2f9defe9c0cbc42c963e66bc43ab5396f8ccb27e5b6182c429006 SHA512 73a1bbc5a9f62354834288e25b8f4bf2b0d2ff6faf3408108b217305e2c9d8fed768b5a3c3fd21df7b3bf75a3f9c71ea899a8b3f528b560a8e5e66accd442919
DIST ne-3.3.1.tar.gz 1138072 BLAKE2B 8494ff955b456bbac2e82823ee155980f8fab5a1071d0bfd6a987f1ed0724129ab2ecb70737547836b592369b45daf5e499d50d7230b04c5eabfd1536a56271f SHA512 d8c1d8cd9bbafcc7c8c485ca4454d6979be3d33ae918139865ce5f76e428f165043707c95c2e440bd9bccd00c67ce81a41f87f94b85cae3518c4749233718123
14 changes: 14 additions & 0 deletions app-editors/ne/files/ne-3.3.1-respect-CFLAGS.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/makefile b/src/makefile
index ae358fe..76bfe1d 100644
--- a/src/makefile
+++ b/src/makefile
@@ -96,8 +96,7 @@ endif

# Test for GCC
ifneq (,$(findstring gcc,$(shell $(CC) 2>&1)))
-GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -flto=auto -ffat-lto-objects -Wp,-D_FORTIFY_SOURCE=2
-LDFLAGS=-flto=auto
+GCCFLAGS=-std=c99 -Wall -Wno-parentheses -fno-strict-aliasing -Wp,-D_FORTIFY_SOURCE=2
endif

CFLAGS=$(GCCFLAGS) \
57 changes: 57 additions & 0 deletions app-editors/ne/ne-3.3.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools flag-o-matic toolchain-funcs

DESCRIPTION="The nice editor, easy to use for the beginner and powerful for the wizard"
HOMEPAGE="https://ne.di.unimi.it/"
SRC_URI="https://ne.di.unimi.it/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"

BDEPEND="virtual/pkgconfig"
DEPEND="sys-libs/ncurses:="
RDEPEND="
${DEPEND}
dev-lang/perl
"

HTML_DOCS=( doc/html/. )

PATCHES=(
"${FILESDIR}"/${PN}-3.3.1-respect-CFLAGS.patch
)

src_prepare() {
default

sed -i -e 's/-O3//' src/makefile || die
}

src_configure() {
# bug #776799
sed -i -e "s/-lcurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" src/makefile || die
}

src_compile() {
append-cflags -std=c11
emake -C src CC="$(tc-getCC)" \
NE_GLOBAL_DIR="/usr/share/${PN}" \
OPTS="${CFLAGS}" \
LDFLAGS="${LDFLAGS}" \
"${PN}"
}

src_install() {
dobin src/${PN}

insinto /usr/share/${PN}/syntax
doins syntax/*.jsf

doman doc/${PN}.1
dodoc CHANGES README.md NEWS doc/*.{txt,pdf,texinfo} doc/default.*
}

0 comments on commit a3d5c32

Please sign in to comment.