notcurses: restore lost symbol
This commit is contained in:
parent
8e52a18299
commit
9f5b514bd2
2 changed files with 68 additions and 1 deletions
66
srcpkgs/notcurses/patches/restore-lost-symbol.patch
Normal file
66
srcpkgs/notcurses/patches/restore-lost-symbol.patch
Normal file
|
@ -0,0 +1,66 @@
|
|||
From da2a897544b9d239515b85ed31c8db4d90d23883 Mon Sep 17 00:00:00 2001
|
||||
From: nick black <dankamongmen@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 10:04:28 -0400
|
||||
Subject: [PATCH] fix unintended cell abi breakage #1532
|
||||
|
||||
cell_release() and cell_duplicate() were deprecated in 2.2.6,
|
||||
but replaced with static inlines. this breaks the abi, forcing
|
||||
recompiles from client programs. restore them as exported
|
||||
functions.
|
||||
---
|
||||
include/notcurses/notcurses.h | 10 ++--------
|
||||
src/lib/render.c | 9 +++++++++
|
||||
2 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h
|
||||
index aece8cb6d..9d98ea19f 100644
|
||||
--- a/include/notcurses/notcurses.h
|
||||
+++ b/include/notcurses/notcurses.h
|
||||
@@ -677,18 +677,12 @@ cell_prime(struct ncplane* n, nccell* c, const char* gcluster,
|
||||
// failure, and 0 on success.
|
||||
API int nccell_duplicate(struct ncplane* n, nccell* targ, const nccell* c);
|
||||
|
||||
-__attribute__ ((deprecated)) static inline int
|
||||
-cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c){
|
||||
- return nccell_duplicate(n, targ, c);
|
||||
-}
|
||||
+__attribute__ ((deprecated)) API int cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c);
|
||||
|
||||
// Release resources held by the nccell 'c'.
|
||||
API void nccell_release(struct ncplane* n, nccell* c);
|
||||
|
||||
-__attribute__ ((deprecated)) static inline void
|
||||
-cell_release(struct ncplane* n, nccell* c){
|
||||
- nccell_release(n, c);
|
||||
-}
|
||||
+__attribute__ ((deprecated)) API void cell_release(struct ncplane* n, nccell* c);
|
||||
|
||||
#define NCSTYLE_MASK 0x03ffu
|
||||
#define NCSTYLE_STANDOUT 0x0080u
|
||||
diff --git a/src/lib/render.c b/src/lib/render.c
|
||||
index ad95cd878..e1334416f 100644
|
||||
--- a/src/lib/render.c
|
||||
+++ b/src/lib/render.c
|
||||
@@ -175,6 +175,11 @@ void nccell_release(ncplane* n, nccell* c){
|
||||
pool_release(&n->pool, c);
|
||||
}
|
||||
|
||||
+// FIXME deprecated, goes away in abi3
|
||||
+void cell_release(ncplane* n, nccell* c){
|
||||
+ nccell_release(n, c);
|
||||
+}
|
||||
+
|
||||
// Duplicate one cell onto another when they share a plane. Convenience wrapper.
|
||||
int nccell_duplicate(ncplane* n, nccell* targ, const nccell* c){
|
||||
if(cell_duplicate_far(&n->pool, targ, n, c) < 0){
|
||||
@@ -184,6 +189,10 @@ int nccell_duplicate(ncplane* n, nccell* targ, const nccell* c){
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int cell_duplicate(struct ncplane* n, nccell* targ, const nccell* c){
|
||||
+ return nccell_duplicate(n, targ, c);
|
||||
+}
|
||||
+
|
||||
// Emit fchannel with RGB changed to contrast effectively against bchannel.
|
||||
static uint32_t
|
||||
highcontrast(uint32_t bchannel){
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'notcurses'
|
||||
pkgname=notcurses
|
||||
version=2.2.6
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=cmake
|
||||
configure_args="-DUSE_STATIC=ON $(vopt_bool man USE_PANDOC)"
|
||||
hostmakedepends="pkg-config $(vopt_if man pandoc)"
|
||||
|
@ -15,6 +15,7 @@ homepage="https://nick-black.com/dankwiki/index.php/Notcurses"
|
|||
changelog="https://raw.githubusercontent.com/dankamongmen/notcurses/master/NEWS.md"
|
||||
distfiles="https://github.com/dankamongmen/notcurses/archive/v${version}.tar.gz"
|
||||
checksum=0507e507f9843a494aa66f31e419add5fbdbceb8fbc9345f3e6d4b55ed8a89d9
|
||||
patch_args=-Np1
|
||||
|
||||
build_options="man"
|
||||
desc_option_man="Use pandoc for manpages"
|
||||
|
|
Loading…
Reference in a new issue