jobcore/ncurses/PKGBUILD

107 lines
4.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=ncurses
pkgver=6.5
pkgrel=01
pkgdesc='System V Release 4.0 curses emulation library'
_url='https://invisible-island.net/ncurses/ncurses.html'
url="https://invisible-mirror.net/archives"
depends=(glibc gcc-libs)
makedepends=(autoconf-archive git)
optdepends=('bash: for ncursesw6-config')
provides=(libncurses++w.so libformw.so libmenuw.so libpanelw.so libncursesw.so)
replaces=(alacritty-terminfo)
#options=(debug) # uncomment this to produce the debug pkg
#source=($url/$pkgname/current/$pkgname-${pkgver/_/-}.tgz{,.asc}
#source=($pkgname::git+https://github.com/ThomasDickey/ncurses-snapshots.git?signed#commit=$_commit
source=($pkgname::git+https://github.com/ThomasDickey/ncurses-snapshots.git?signed#tag=v${pkgver/./_}
$pkgname-6.3-libs.patch
$pkgname-6.3-pkgconfig.patch)
#pkgver() {
# cd $pkgname
# git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g;s/_/./'
#}
prepare() {
# do not link against test libraries
patch -Np1 -d $pkgname -i ../$pkgname-6.3-libs.patch
# do not leak build-time LDFLAGS into the pkgconfig files:
# https://bugs.archlinux.org/task/68523
patch -Np1 -d $pkgname -i ../$pkgname-6.3-pkgconfig.patch
# NOTE: can't run autoreconf because the autotools setup is custom and ancient
}
build() {
cd $pkgname
./configure --prefix=/usr \
--enable-widec \
--enable-pc-files \
--disable-root-access \
--disable-root-environ \
--disable-setuid-environ \
--mandir=/usr/share/man \
--with-cxx-binding \
--with-cxx-shared \
--with-manpage-format=normal \
--with-pkg-config-libdir=/usr/lib/pkgconfig \
--with-shared \
--with-versioned-syms \
--without-ada \
--with-xterm-kbs=del \
--without-debug
make
}
package() {
local _pkgver=${pkgver/_*/}
make DESTDIR="$pkgdir" install -C $pkgname
install -vDm 644 $pkgname/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
# fool packages looking to link to non-wide-character ncurses libraries
for lib in ncurses ncurses++ form panel menu; do
printf "INPUT(-l%sw)\n" "${lib}" > "$pkgdir/usr/lib/lib${lib}.so"
ln -sv ${lib}w.pc "$pkgdir/usr/lib/pkgconfig/${lib}.pc"
done
# some packages look for -lcurses during build
printf 'INPUT(-lncursesw)\n' > "$pkgdir/usr/lib/libcursesw.so"
ln -sv libncurses.so "$pkgdir/usr/lib/libcurses.so"
# tic and ticinfo functionality is built in by default
# make sure that anything linking against it links against libncursesw.so instead
for lib in tic tinfo; do
printf "INPUT(libncursesw.so.%s)\n" "${_pkgver:0:1}" > "$pkgdir/usr/lib/lib${lib}.so"
ln -sv libncursesw.so.${pkgver:0:1} "$pkgdir/usr/lib/lib${lib}.so.${_pkgver:0:1}"
ln -sv ncursesw.pc "$pkgdir/usr/lib/pkgconfig/${lib}.pc"
done
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(MIT-open-group)
validpgpkeys=('19882D92DDA4C400C22C0D56CC2AF4472167BE03') # Thomas Dickey <dickey@invisible-island.net>
sha512sums=('da9a9e6227d14deef580785b49ab366e9b1c99890c1dd428a566572d01a7fc7da1ed110c9a80047ce6dee813f4dadf37ba43f8048c43b0ab6074a10b0c4b4ef2'
'adb02b838c40f1e58a1b31c26d5cd0f2a1c43f3b6d68e839981764c0f6c905a9eb51dd36ff018628fdeb20747cc7467727d57135408ab4848259384077a52b28'
'2d2c0ec3c880e638ab4aa3dbff5e28e4cd233153e24816bd87e077f848aa3edd5114cd0f2a7f6e8869dd1861a2746e512886c18264ff1676927dcc320c5ef958')
b2sums=('c0c577b633d74838d109b30ea387c10fce70fb7fea548f4f965d508dc0fc1efd2ef45a81f5c5cc960a236ccee0e3aa1d4d99d0b666692c9b5bfcdd75bad604a0'
'31bb10e82dd018a75e57252052650d9f0f5eb5e7e887118c2ea40032b11f59ec6aa4d9bae804c615cbecdf3382f3434e0c9e9e8440fdefe66a507be020b8965c'
'fb6cf606cf3db7f6b306272696a63bce83d52cfa91e850f9a7bdb9d3d8455a26943529a9cf79731dddc7f763c27211a9afab9c4c31dbb6d12fd720eb390eb0a3')
sha256sums=(SKIP
dc4261b6642058a9df1c0945e2409b24f84673ddc3a665d8a15ed3580e51ee25 # ncurses-6.3-libs.patch
b8544a607dfbeffaba2b087f03b57ed1fa81286afca25df65f61b04b5f3b3738) # ncurses-6.3-pkgconfig.patch
## 11ebe92164b7941dde43b0b69715fa347d7683215ad4c7e9024574493c00b592 ncurses-6.5-01-x86_64.pkg.tar.lz