cmatrix: Add package

This commit is contained in:
Techie Guy 2023-04-07 11:17:26 +05:30 committed by GitHub
parent a185091f86
commit 9695f877f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 0 deletions

38
cmatrix/PKGBUILD Normal file
View File

@ -0,0 +1,38 @@
pkgname=('cmatrix')
pkgver=2.0
pkgrel=1
pkgdesc="A curses-based scrolling 'Matrix'-like screen"
arch=('any')
url="http://www.asty.org/cmatrix/"
license=('GPL3')
depends=('ncurses')
makedepends=('ncurses-devel' 'make' 'autotools' 'gcc')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/abishekvashok/cmatrix/archive/refs/tags/v${pkgver}.tar.gz"
"define_TIOCSTI.patch")
sha256sums=('ad93ba39acd383696ab6a9ebbed1259ecf2d3cf9f49d6b97038c66f80749e99a'
'70b3c94813427355490b5fad29ad8a116bae87e198033e1951ca218683317874')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 -i "${srcdir}/define_TIOCSTI.patch"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
autoreconf -i
./configure --prefix=/usr --mandir=/usr/share/man
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="$pkgdir" install
for i in AUTHORS NEWS COPYING README ChangeLog INSTALL; do
install -Dm644 $i "$pkgdir/usr/share/doc/cmatrix/$i"
done
}

View File

@ -0,0 +1,15 @@
diff --git a/cmatrix.c b/cmatrix.c
index 90284cb..7bca3f3 100644
--- a/cmatrix.c
+++ b/cmatrix.c
@@ -57,6 +57,10 @@
#include <termio.h>
#endif
+#ifdef __CYGWIN__
+#define TIOCSTI 0x5412
+#endif
+
/* Matrix typedef */
typedef struct cmatrix {
int val;