summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2024-09-15 17:36:16 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2024-09-15 17:36:16 +0200
commit1ab0275a4618bbc7aef0e78cffaf20348c021dc4 (patch)
tree6162d5b2fd432098bb08af643a5f46de9037a258
parenta5e096e20d6678507d918fb2364cd35897fa3573 (diff)
downloadarchlinuxewe-1ab0275a4618bbc7aef0e78cffaf20348c021dc4.tar.xz
wcc-git -> wcc
-rw-r--r--wcc-git/.gitignore1
-rw-r--r--wcc-git/PKGBUILD51
-rw-r--r--wcc-git/stropts.h.diff10
-rw-r--r--wcc/.gitignore1
-rw-r--r--wcc/PKGBUILD34
5 files changed, 35 insertions, 62 deletions
diff --git a/wcc-git/.gitignore b/wcc-git/.gitignore
deleted file mode 100644
index c204780de..000000000
--- a/wcc-git/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-wcc
diff --git a/wcc-git/PKGBUILD b/wcc-git/PKGBUILD
deleted file mode 100644
index fb386b064..000000000
--- a/wcc-git/PKGBUILD
+++ /dev/null
@@ -1,51 +0,0 @@
-# Maintainer: Erich Eckner <arch at eckner dot net>
-# Contributor: epitron <chris@ill-logic.com>
-
-pkgname=wcc-git
-_pkgname=wcc
-pkgver=0.0.6.r13.g08f67cd
-pkgrel=2
-pkgdesc="The Witchcraft Compiler Collection"
-arch=('i486' 'i686' 'pentium4' 'x86_64')
-license=('MIT')
-_pinned_dependencies=(
- 'binutils=2.43+r4+g7999dae6961'
- 'capstone=5.0.3'
- 'glibc>=2.33'
- 'libelf=0.191'
- 'zlib=1:1.3.1'
- 'zstd=1.5.6'
-)
-depends=(binutils readline gsl "${_pinned_dependencies[@]}")
-makedepends=(git make)
-provides=(wcc=${pkgver%.r*.g*})
-conflicts=(wcc)
-url=https://github.com/endrazine/wcc
-source=("git+https://github.com/endrazine/wcc.git")
-sha512sums=('SKIP')
-
-pkgver() {
- cd "$_pkgname"
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
-}
-
-prepare() {
- cd "$_pkgname"
- git submodule init
- git submodule update
-}
-
-build() {
- cd "$_pkgname"
- make
-}
-
-package() {
- cd "$_pkgname"
- install -d "${pkgdir}/usr/bin"
- make DESTDIR="${pkgdir}/" install
-
- # install manpages
- install -d "${pkgdir}/usr/share/man/man1/"
- install -pm 644 doc/manpages/* $pkgdir/usr/share/man/man1
-}
diff --git a/wcc-git/stropts.h.diff b/wcc-git/stropts.h.diff
deleted file mode 100644
index 55334ed36..000000000
--- a/wcc-git/stropts.h.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/wsh/include/libwitch/wsh.h 2021-11-22 12:40:11.733332595 +0100
-+++ b/src/wsh/include/libwitch/wsh.h 2021-11-22 12:40:11.733332595 +0100
-@@ -47,7 +47,6 @@
- #include <stdbool.h>
- #include <sys/wait.h>
- #include <poll.h>
--#include <stropts.h>
- #include <signal.h>
- #include <malloc.h>
- #include <sys/mman.h>
diff --git a/wcc/.gitignore b/wcc/.gitignore
new file mode 100644
index 000000000..b8be4e70e
--- /dev/null
+++ b/wcc/.gitignore
@@ -0,0 +1 @@
+wsh-system-libs.patch
diff --git a/wcc/PKGBUILD b/wcc/PKGBUILD
new file mode 100644
index 000000000..65fb08a9f
--- /dev/null
+++ b/wcc/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Adrian Perez de Castro <aperez@igalia.com>
+pkgname=wcc
+pkgver=0.0.4
+pkgrel=1
+pkgdesc='The Witchcraft Compiler Collection'
+url=https://github.com/endrazine/wcc
+arch=(i686 x86_64)
+license=(custom:MIT)
+depends=(capstone glibc binutils zlib libelf linenoise lua53)
+makedepends=(git make)
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz"
+ wsh-system-libs.patch)
+b2sums=('b08196fd15657c896cac6cfa309efd082471fdb87b8146b0ee17d686c09c6246e35aae843a979fdb732fc1083b635faeba89e0d124764083fc8335043417c75a'
+ '18ae4ddf34ebf3d290183c41fe93d899a35d1330addff8ca9ae2be894164ba28d405fcf1eb47930355fd49065e12f3941a7cec9c8b2cb68c4cc22e29aa2dbb4e')
+
+prepare () {
+ cd "${pkgname}-${pkgver}"
+ patch -p0 < "${srcdir}/wsh-system-libs.patch"
+}
+
+build () {
+ cd "${pkgname}-${pkgver}"
+ make
+}
+
+package () {
+ cd "${pkgname}-${pkgver}"
+ mkdir -p "${pkgdir}/usr/bin"
+ make DESTDIR="${pkgdir}/" install
+
+ install -Dm644 -t "${pkgdir}/usr/share/man/man1" doc/manpages/*.1
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
+}