mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-19 07:49:00 -04:00
app-misc/neo: update to 0.6.1
Also restricts BDEPEND to PV = 9999, and turns 9999 into the "master" file for easier symlink management. Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Carlos Eduardo <carana2099@gmail.com>
This commit is contained in:
parent
c61b466a5c
commit
f5291650ed
@ -1 +1 @@
|
||||
DIST neo-0.6.tar.gz 141062 BLAKE2B 3e069e071281816913edb90218be551a5d82ded55f5b7cedbe305bce413acf624f0177945e90cf0ec48359ec47a0840adb7b5a32a5e553027e93945876c37a50 SHA512 de3f0d958ecaa284427b4271d7cf1f7569f545487ec0e525f381a999cae4a1dcd6b543c6e9cfe359fa1be8700fc38bbf091d077e6a5fbcea2a37f5cc3af83062
|
||||
DIST neo-0.6.1.tar.gz 134123 BLAKE2B 89ffea78033c7c3aa1e951fac777a784aecb433a062986df388c66f51f2861117ca9cf99dbd3d2c7a82ba26cab19680251524755474e851e2990dd740cf61e45 SHA512 ddd1dd602d2a375c7d292b6c3c71da0c8127c70774a74c0513c8c37aaa52318ada7d3f5540ecf325a586c46d572477d8848fda0a0ab2facce310b42d9137a817
|
||||
|
@ -1,119 +0,0 @@
|
||||
From c7e849a63327166b77e01e6d1683f44e129b3ef7 Mon Sep 17 00:00:00 2001
|
||||
From: Stewart Reive <3587451+st3w@users.noreply.github.com>
|
||||
Date: Sat, 18 Dec 2021 21:43:47 -0800
|
||||
Subject: [PATCH 11/12] Fixes for building with ncursesw
|
||||
|
||||
This commit makes three improvements for building with ncursesw:
|
||||
|
||||
1. Include "ncursesw/ncurses.h" if it exists
|
||||
2. Explicitly link against libtinfow or libtinfo if necessary
|
||||
3. Define _XOPEN_SOURCE_EXTENDED for Mac builds because it should
|
||||
enable some of the widechar functions with the system's default
|
||||
version of ncurses.h.
|
||||
---
|
||||
configure.ac | 18 +++++++++++++++++-
|
||||
src/Makefile.am | 1 -
|
||||
src/cloud.h | 12 ++++++++++--
|
||||
src/neo.cpp | 12 +++++++++++-
|
||||
4 files changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 67fc25f..7b33b91 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -6,7 +6,23 @@ AC_LANG(C++)
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
-AC_CHECK_LIB(ncursesw, initscr)
|
||||
+AC_CHECK_LIB(ncursesw, mvadd_wch)
|
||||
AC_CHECK_HEADERS(getopt.h locale.h ncurses.h)
|
||||
+
|
||||
+dnl Some systems have both ncurses.h and ncursesw/ncurses.h.
|
||||
+dnl On many systems, the headers are identical (e.g. Ubuntu),
|
||||
+dnl but for some systems they differ. So we should always try
|
||||
+dnl to use ncursesw/ncurses.h if it exists.
|
||||
+AC_CHECK_HEADER(ncursesw/ncurses.h, AC_DEFINE(HAVE_NCURSESW_H))
|
||||
+
|
||||
+dnl Some systems build ncurses with a separate "termlib" library.
|
||||
+dnl This will usually be libtinfo or less frequently libtinfow.
|
||||
+dnl These libraries provide functions that do not depend on whether
|
||||
+dnl or not ncurses is using widechars (e.g. cbreak). This line adds
|
||||
+dnl -ltinfow or -ltinfo to LIBS, if needed. If libncursesw
|
||||
+dnl already provides cbreak, then the configure script should
|
||||
+dnl print a message saying "none required", but it should not fail.
|
||||
+AC_SEARCH_LIBS(cbreak, [tinfow tinfo])
|
||||
+
|
||||
AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])
|
||||
AC_OUTPUT
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index e34d8e3..6673492 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -2,7 +2,6 @@ bin_PROGRAMS = neo
|
||||
AM_CXXFLAGS =\
|
||||
-DNCURSES_WIDECHAR\
|
||||
-std=c++11
|
||||
-LDADD = -lncursesw
|
||||
neo_SOURCES = \
|
||||
droplet.h \
|
||||
cloud.h \
|
||||
diff --git a/src/cloud.h b/src/cloud.h
|
||||
index aca7630..20342d8 100644
|
||||
--- a/src/cloud.h
|
||||
+++ b/src/cloud.h
|
||||
@@ -25,11 +25,19 @@
|
||||
#include "droplet.h"
|
||||
#include "neo.h"
|
||||
|
||||
-#include <ncurses.h>
|
||||
-
|
||||
#include <random>
|
||||
#include <vector>
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+ #define _XOPEN_SOURCE_EXTENDED 1
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_NCURSESW_H
|
||||
+ #include <ncursesw/ncurses.h>
|
||||
+#else
|
||||
+ #include <ncurses.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
class Cloud {
|
||||
diff --git a/src/neo.cpp b/src/neo.cpp
|
||||
index fd288f7..8fda940 100644
|
||||
--- a/src/neo.cpp
|
||||
+++ b/src/neo.cpp
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <getopt.h>
|
||||
#include <locale.h>
|
||||
-#include <ncurses.h>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstdarg>
|
||||
@@ -32,6 +31,17 @@
|
||||
#include <random>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
+
|
||||
+#ifdef __APPLE__
|
||||
+ #define _XOPEN_SOURCE_EXTENDED 1
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_NCURSESW_H
|
||||
+ #include <ncursesw/ncurses.h>
|
||||
+#else
|
||||
+ #include <ncurses.h>
|
||||
+#endif
|
||||
+
|
||||
using namespace std;
|
||||
using namespace chrono;
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
1
app-misc/neo/neo-0.6.1.ebuild
Symbolic link
1
app-misc/neo/neo-0.6.1.ebuild
Symbolic link
@ -0,0 +1 @@
|
||||
neo-9999.ebuild
|
@ -1,35 +0,0 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="cmatrix clone with 32-bit color and Unicode support"
|
||||
HOMEPAGE="https://github.com/st3w/neo"
|
||||
|
||||
if [ "$PV" = 9999 ]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/st3w/neo/"
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/st3w/neo/releases/download/v${PV}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
[ "$PV" = 0.6 ] && PATCHES=(
|
||||
"${FILESDIR}"/neo-0.6-fixes-for-building-with-ncursesw.patch
|
||||
)
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="sys-libs/ncurses"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
sys-devel/autoconf
|
||||
sys-devel/autoconf-archive
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
[ -f ./configure ] || ./autogen.sh || die 'autoreconf failed'
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user