From 9f5b514bd222210a066ab1c3cdb6286cbe9608e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 14 Apr 2021 21:33:30 +0700 Subject: [PATCH] notcurses: restore lost symbol --- .../patches/restore-lost-symbol.patch | 66 +++++++++++++++++++ srcpkgs/notcurses/template | 3 +- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/notcurses/patches/restore-lost-symbol.patch diff --git a/srcpkgs/notcurses/patches/restore-lost-symbol.patch b/srcpkgs/notcurses/patches/restore-lost-symbol.patch new file mode 100644 index 0000000000..b938a35ed3 --- /dev/null +++ b/srcpkgs/notcurses/patches/restore-lost-symbol.patch @@ -0,0 +1,66 @@ +From da2a897544b9d239515b85ed31c8db4d90d23883 Mon Sep 17 00:00:00 2001 +From: nick black +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){ diff --git a/srcpkgs/notcurses/template b/srcpkgs/notcurses/template index 7aea010bab..f2bc3e9ae1 100644 --- a/srcpkgs/notcurses/template +++ b/srcpkgs/notcurses/template @@ -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"