ncurses: add add NCURSES_STATIC to Cflags.private in the .pc files

So that pkgconf users will automatically get it if they pass --static
This commit is contained in:
Christoph Reiter 2022-04-29 21:12:32 +02:00
parent 141d7a509d
commit aa3b174e75
2 changed files with 17 additions and 3 deletions

View File

@ -3,7 +3,7 @@
pkgbase=ncurses
pkgname=('ncurses' 'ncurses-devel')
pkgver=6.3
pkgrel=2
pkgrel=3
pkgdesc="System V Release 4.0 curses emulation library"
arch=('i686' 'x86_64')
url="https://www.gnu.org/software/ncurses/"
@ -11,10 +11,12 @@ license=('MIT')
makedepends=('autotools' 'gcc')
source=(#"${pkgbase}-${pkgver}.tar.gz"::"https://invisible-mirror.net/archives/ncurses/current/${pkgbase}-${_basever}-${_date}.tgz"
https://ftp.gnu.org/pub/gnu/ncurses/ncurses-${pkgver}.tar.gz{,.sig}
"ncurses-6.3-pkgconfig.patch")
"ncurses-6.3-pkgconfig.patch"
"ncurses-6.3-cflags-private.patch")
sha256sums=('97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059'
'SKIP'
'b8544a607dfbeffaba2b087f03b57ed1fa81286afca25df65f61b04b5f3b3738')
'b8544a607dfbeffaba2b087f03b57ed1fa81286afca25df65f61b04b5f3b3738'
'3107029dfb807e338d34641d78329cd6725c58e6b873352621f4b9611a8380bf')
validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03')
prepare() {
@ -23,6 +25,8 @@ prepare() {
# do not leak build-time LDFLAGS into the pkgconfig files:
# https://bugs.archlinux.org/task/68523
patch -p1 -i ${srcdir}/ncurses-6.3-pkgconfig.patch
patch -p1 -i ${srcdir}/ncurses-6.3-cflags-private.patch
}
build() {

View File

@ -0,0 +1,10 @@
--- ncurses-6.3/misc/gen-pkgconfig.in.orig 2022-04-29 20:19:42.668758200 +0200
+++ ncurses-6.3/misc/gen-pkgconfig.in 2022-04-29 20:27:10.636256800 +0200
@@ -238,6 +238,7 @@
Libs: $lib_flags $LIBS
Libs.private: @LIBS@ $main_libs
Cflags: $CFLAGS
+Cflags.private: -DNCURSES_STATIC
EOF
done