diff options
author | FabioLolix | 2023-07-26 17:47:48 +0200 |
---|---|---|
committer | FabioLolix | 2023-07-26 17:47:48 +0200 |
commit | 68fcd2714511f18a994bcbf7d15297a1f3fbbe6c (patch) | |
tree | ea5ef4570c0d102548ee4d453ebe2c7543fce4d8 | |
parent | 45f604cdf11c45269ec44061d2e19b33f5f01bf1 (diff) | |
download | aur-odin-git.tar.gz |
use llvm14, add tests
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | 0001-update-odin-to-use-llvm-12.patch | 84 | ||||
-rw-r--r-- | 0001-use-llvm13.patch | 33 | ||||
-rw-r--r-- | PKGBUILD | 34 |
4 files changed, 29 insertions, 135 deletions
@@ -1,21 +1,22 @@ pkgbase = odin-git pkgdesc = A fast, concise, readable, pragmatic and open sourced programming language. - pkgver = r6557.a1f15c2c + pkgver = r8682.5ac7fe453 pkgrel = 1 url = https://github.com/odin-lang/odin arch = x86_64 license = BSD + checkdepends = python makedepends = git makedepends = clang - makedepends = llvm + makedepends = llvm14 + makedepends = clang14 depends = glibc - depends = llvm-libs - depends = ncurses + depends = llvm14-libs + optdepends = python + optdepends = java-runtime provides = odin conflicts = odin source = git+https://github.com/odin-lang/odin.git - source = 0001-use-llvm13.patch sha256sums = SKIP - sha256sums = 4e0e571d4067975f0405564d7110d67092549a213a3012ff3a42f93efffda84f pkgname = odin-git diff --git a/0001-update-odin-to-use-llvm-12.patch b/0001-update-odin-to-use-llvm-12.patch deleted file mode 100644 index 7d64116ed609..000000000000 --- a/0001-update-odin-to-use-llvm-12.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 45705c2ccdfe4af2a1cf6b238525111c0c84693f Mon Sep 17 00:00:00 2001 -From: pyxel <imhxnna@gmail.com> -Date: Mon, 1 Nov 2021 00:32:54 -0400 -Subject: [PATCH] update odin to use llvm 12 - ---- - Makefile | 61 +++++++++++++++++++++++++++++--------------------------- - 1 file changed, 32 insertions(+), 29 deletions(-) - -diff --git a/Makefile b/Makefile -index 23fb7be6..15d00655 100644 ---- a/Makefile -+++ b/Makefile -@@ -7,35 +7,38 @@ CC=clang - - OS=$(shell uname) - --ifeq ($(OS), Darwin) -- LLVM_CONFIG=llvm-config -- ifneq ($(shell llvm-config --version | grep '^11\.'),) -- LLVM_CONFIG=llvm-config -- else -- $(error "Requirement: llvm-config must be version 11") -- endif -- -- LDFLAGS:=$(LDFLAGS) -liconv -- CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags) -- LDFLAGS:=$(LDFLAGS) -lLLVM-C --endif --ifeq ($(OS), Linux) -- LLVM_CONFIG=llvm-config-11 -- ifneq ($(shell which llvm-config-11 2>/dev/null),) -- LLVM_CONFIG=llvm-config-11 -- else ifneq ($(shell which llvm-config-11-64 2>/dev/null),) -- LLVM_CONFIG=llvm-config-11-64 -- else -- ifneq ($(shell llvm-config --version | grep '^11\.'),) -- LLVM_CONFIG=llvm-config -- else -- $(error "Requirement: llvm-config must be version 11") -- endif -- endif -- -- CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags) -- LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs) --endif -+#ifeq ($(OS), Darwin) -+# LLVM_CONFIG=llvm-config -+# ifneq ($(shell llvm-config --version | grep '^11\.'),) -+# LLVM_CONFIG=llvm-config -+# else -+# $(error "Requirement: llvm-config must be version 11") -+# endif -+# -+# LDFLAGS:=$(LDFLAGS) -liconv -+# CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags) -+# LDFLAGS:=$(LDFLAGS) -lLLVM-C -+#endif -+#ifeq ($(OS), Linux) -+# LLVM_CONFIG=llvm-config-11 -+# ifneq ($(shell which llvm-config-11 2>/dev/null),) -+# LLVM_CONFIG=llvm-config-11 -+# else ifneq ($(shell which llvm-config-11-64 2>/dev/null),) -+# LLVM_CONFIG=llvm-config-11-64 -+# else -+# ifneq ($(shell llvm-config --version | grep '^11\.'),) -+# LLVM_CONFIG=llvm-config -+# else -+# $(error "Requirement: llvm-config must be version 11") -+# endif -+# endif -+# -+# CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags) -+# LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs) -+#endif -+ -+CFLAGS:=$(CFLAGS) $(shell llvm-config --cxxflags) -+LDFLAGS:=$(LDFLAGS) $(shell llvm-config --libs --ldflags) -lz -ltinfo - - all: debug demo - --- -2.33.1 - diff --git a/0001-use-llvm13.patch b/0001-use-llvm13.patch deleted file mode 100644 index 7d1f28f22e6a..000000000000 --- a/0001-use-llvm13.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5295e01a6b9b8e50d4ea2aa3f6fb015ad39c0371 Mon Sep 17 00:00:00 2001 -From: FabioLolix <fabio.loli@disroot.org> -Date: Sun, 6 Mar 2022 13:51:29 +0100 -Subject: [PATCH] use llvm13 - ---- - Makefile | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/Makefile b/Makefile -index ceff3c20..ef3dc59b 100644 ---- a/Makefile -+++ b/Makefile -@@ -40,11 +40,11 @@ ifeq ($(OS), Darwin) - LDFLAGS:=$(LDFLAGS) -lLLVM-C - endif - ifeq ($(OS), Linux) -- LLVM_CONFIG=llvm-config-11 -- ifneq ($(shell which llvm-config-11 2>/dev/null),) -- LLVM_CONFIG=llvm-config-11 -- else ifneq ($(shell which llvm-config-11-64 2>/dev/null),) -- LLVM_CONFIG=llvm-config-11-64 -+ LLVM_CONFIG=llvm-config -+ ifneq ($(shell which llvm-config 2>/dev/null),) -+ LLVM_CONFIG=llvm-config -+ else ifneq ($(shell which llvm-config-64 2>/dev/null),) -+ LLVM_CONFIG=llvm-config-64 - else - ifeq ($(shell $(LLVM_CONFIG) --version | grep '^11\.'),) - $(error "Requirement: llvm-config must be version 11") --- -2.35.1 - @@ -4,22 +4,20 @@ pkgname=odin-git _pkgname=odin -pkgver=r6557.a1f15c2c +pkgver=r8682.5ac7fe453 pkgrel=1 pkgdesc="A fast, concise, readable, pragmatic and open sourced programming language." arch=(x86_64) url="https://github.com/odin-lang/odin" license=(BSD) -depends=(glibc llvm-libs ncurses) -makedepends=(git clang llvm) +depends=(glibc llvm14-libs) +makedepends=(git clang llvm14 clang14) +checkdepends=(python) +optdepends=(python java-runtime) provides=(odin) conflicts=(odin) - -source=("git+https://github.com/odin-lang/odin.git" - '0001-use-llvm13.patch') - -sha256sums=('SKIP' - '4e0e571d4067975f0405564d7110d67092549a213a3012ff3a42f93efffda84f') +source=("git+https://github.com/odin-lang/odin.git") +sha256sums=('SKIP') pkgver() { cd "${_pkgname}" @@ -28,11 +26,23 @@ pkgver() { build() { cd "${_pkgname}" - #patch --forward --strip=1 --input="${srcdir}/0001-use-llvm13.patch" - sed -i "s/linux\/libraylib.a/system:raylib/g" "vendor/raylib/raylib.odin" + #sed -i "s/linux\/libraylib.a/system:raylib/g" "vendor/raylib/raylib.odin" + export LLVM_CONFIG=llvm-config-14 + export CXX=/usr/lib/llvm14/bin/clang++ make release } +check() { + cd "${_pkgname}" + ./odin check examples/all -strict-style + + cd tests/core + make + + cd ../internal + make +} + package() { cd "${_pkgname}" install -d "${pkgdir}/usr/bin" @@ -43,5 +53,5 @@ package() { install -Dm644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" cp -r examples "${pkgdir}/usr/share/doc/${_pkgname}/examples" - cp -r vendor "${pkgdir}/usr/lib/${_pkgname}/vendor" + cp -r vendor "${pkgdir}/usr/lib/${_pkgname}/vendor" } |