summaryrefslogtreecommitdiff
path: root/lua-cpml
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-11-03 17:33:52 +0100
committerAki <please@ignore.pl>2024-11-03 17:35:48 +0100
commit3b7886fbed2e23da39d4f87e4325cb7616004cc5 (patch)
tree9a4f07f262f76d822ea3532881e3e432ce2445b5 /lua-cpml
parent818d903c9382994256ccaf2e6ac0dd30b628a743 (diff)
downloadarch-ignore-3b7886fbed2e23da39d4f87e4325cb7616004cc5.zip
arch-ignore-3b7886fbed2e23da39d4f87e4325cb7616004cc5.tar.gz
arch-ignore-3b7886fbed2e23da39d4f87e4325cb7616004cc5.tar.bz2
Added lua-cpml package
Note that this package is meant for luajit and lua 5.1, but has been bumped to 5.4 naively here simply because I use 5.4 more often.
Diffstat (limited to 'lua-cpml')
-rw-r--r--lua-cpml/.SRCINFO16
-rw-r--r--lua-cpml/.gitignore1
-rw-r--r--lua-cpml/PKGBUILD37
-rw-r--r--lua-cpml/lua_version.diff12
4 files changed, 66 insertions, 0 deletions
diff --git a/lua-cpml/.SRCINFO b/lua-cpml/.SRCINFO
new file mode 100644
index 0000000..8cc9efe
--- /dev/null
+++ b/lua-cpml/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = lua-cpml
+ pkgdesc = Cirno's Perfect Math Library
+ pkgver = 1.0.0.r64.geb209f6
+ pkgrel = 1
+ url = https://github.com/excessive/cpml
+ arch = any
+ license = BSD
+ license = MIT
+ license = CC0
+ makedepends = luarocks
+ source = git+https://github.com/excessive/cpml.git
+ source = lua_version.diff
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = lua-cpml
diff --git a/lua-cpml/.gitignore b/lua-cpml/.gitignore
new file mode 100644
index 0000000..a16cb64
--- /dev/null
+++ b/lua-cpml/.gitignore
@@ -0,0 +1 @@
+cpml/
diff --git a/lua-cpml/PKGBUILD b/lua-cpml/PKGBUILD
new file mode 100644
index 0000000..e79738f
--- /dev/null
+++ b/lua-cpml/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Aki <please at ignore pl>
+
+pkgname=lua-cpml
+pkgver=1.0.0.r64.geb209f6
+pkgrel=1
+pkgdesc="Cirno's Perfect Math Library"
+arch=('any')
+url='https://github.com/excessive/cpml'
+license=('BSD' 'MIT' 'CC0')
+makedepends=('luarocks')
+source=("git+https://github.com/excessive/cpml.git" 'lua_version.diff')
+sha256sums=('SKIP' 'SKIP')
+
+
+pkgver() {
+ cd cpml
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+
+prepare() {
+ cd cpml
+ patch --forward --strip=1 --input="$srcdir/lua_version.diff"
+}
+
+
+build() {
+ cd cpml
+ luarocks make --pack-binary-rock cpml-scm-1.rockspec
+}
+
+
+package() {
+ cd cpml
+ luarocks --lua-version=5.4 --tree="$pkgdir/usr" install --deps-mode=none cpml-scm-1.all.rock
+ find "$pkgdir/usr" -name manifest -delete
+}
diff --git a/lua-cpml/lua_version.diff b/lua-cpml/lua_version.diff
new file mode 100644
index 0000000..a13986b
--- /dev/null
+++ b/lua-cpml/lua_version.diff
@@ -0,0 +1,12 @@
+diff '--color=auto' -aru cpml.orig/cpml-scm-1.rockspec cpml.new/cpml-scm-1.rockspec
+--- cpml.orig/cpml-scm-1.rockspec 2024-11-03 17:16:36.946767968 +0100
++++ cpml.new/cpml-scm-1.rockspec 2024-11-03 17:16:57.813434738 +0100
+@@ -10,7 +10,7 @@
+ license = "MIT"
+ }
+ dependencies = {
+- "lua ~> 5.1"
++ "lua ~> 5.4"
+ }
+ build = {
+ type = "builtin",