From acf0c5fc9d9caf87552aa16307ce31fadafa3f9f Mon Sep 17 00:00:00 2001
From: Logen Kain <logen@sudotask.com>
Date: Sat, 8 Jun 2019 17:19:23 -0400
Subject: [PATCH 1/4] New Package: odin-0.10.0

---
 srcpkgs/odin/template | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 srcpkgs/odin/template

diff --git a/srcpkgs/odin/template b/srcpkgs/odin/template
new file mode 100644
index 00000000000..40e5f34fd2a
--- /dev/null
+++ b/srcpkgs/odin/template
@@ -0,0 +1,32 @@
+# Template file for 'odin'
+pkgname=odin
+version=0.10.0
+revision=1
+archs="x86_64-musl x86_64"
+wrksrc="Odin-${version}"
+build_style="gnu-makefile"
+hostmakedepends="pkg-config clang llvm"
+depends="clang"
+short_desc="Fast. concise, readable, pragmatic and open programming language"
+maintainer="Logen Kain <logen@sudotask.com>"
+license="BSD"
+homepage="https://odin-lang.org"
+distfiles="https://github.com/odin-lang/Odin/archive/v${version}.tar.gz"
+checksum=04a1c9e8719281a598cac5e9cc3e5ca2316cc038a8b8f9ae43f514aba967c635
+nopie=1
+make_build_args+=" debug"
+
+do_build() {
+	: ${make_cmd:=make}
+
+		${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
+}
+
+do_install() {
+	vmkdir opt/odin
+	vmkdir usr/bin
+	vcopy "*" opt/odin
+	vlicense LICENSE
+	ln -s /opt/odin/odin ${DESTDIR}/usr/bin/odin
+}
+

From 7b979b2efac8f8f2158bb95c32bf832371c89a1c Mon Sep 17 00:00:00 2001
From: Logen Kain <logen@sudotask.com>
Date: Sat, 8 Jun 2019 19:26:34 -0400
Subject: [PATCH 2/4] odin: revise template to standards

---
 srcpkgs/odin/template | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/srcpkgs/odin/template b/srcpkgs/odin/template
index 40e5f34fd2a..b6cc507644b 100644
--- a/srcpkgs/odin/template
+++ b/srcpkgs/odin/template
@@ -2,25 +2,20 @@
 pkgname=odin
 version=0.10.0
 revision=1
-archs="x86_64-musl x86_64"
+archs="x86_64"
 wrksrc="Odin-${version}"
 build_style="gnu-makefile"
 hostmakedepends="pkg-config clang llvm"
 depends="clang"
-short_desc="Fast. concise, readable, pragmatic and open programming language"
+short_desc="Fast, concise, readable, pragmatic and open programming language"
 maintainer="Logen Kain <logen@sudotask.com>"
-license="BSD"
+license="BSD-2-Clause"
 homepage="https://odin-lang.org"
 distfiles="https://github.com/odin-lang/Odin/archive/v${version}.tar.gz"
 checksum=04a1c9e8719281a598cac5e9cc3e5ca2316cc038a8b8f9ae43f514aba967c635
-nopie=1
-make_build_args+=" debug"
-
-do_build() {
-	: ${make_cmd:=make}
-
-		${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}
-}
+nopie=yes
+make_build_target="debug"
+make_use_env=yes
 
 do_install() {
 	vmkdir opt/odin
@@ -29,4 +24,3 @@ do_install() {
 	vlicense LICENSE
 	ln -s /opt/odin/odin ${DESTDIR}/usr/bin/odin
 }
-

From d19549b271bad7bc00184746cdfc023eaf0b7590 Mon Sep 17 00:00:00 2001
From: Logen Kain <logen@sudotask.com>
Date: Sat, 8 Jun 2019 19:35:49 -0400
Subject: [PATCH 3/4] odin: limit installed files to what is needed

---
 srcpkgs/odin/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/odin/template b/srcpkgs/odin/template
index b6cc507644b..cddf48a04be 100644
--- a/srcpkgs/odin/template
+++ b/srcpkgs/odin/template
@@ -20,7 +20,9 @@ make_use_env=yes
 do_install() {
 	vmkdir opt/odin
 	vmkdir usr/bin
-	vcopy "*" opt/odin
+	vcopy "shared" opt/odin
+	vcopy "core" opt/odin
+	vcopy "odin" opt/odin
 	vlicense LICENSE
 	ln -s /opt/odin/odin ${DESTDIR}/usr/bin/odin
 }

From 4612cade5439a94d4a534feb983367626c6abca6 Mon Sep 17 00:00:00 2001
From: Logen Kain <logen@sudotask.com>
Date: Sat, 8 Jun 2019 19:51:00 -0400
Subject: [PATCH 4/4] odin: fix xlint errors

---
 srcpkgs/odin/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/odin/template b/srcpkgs/odin/template
index cddf48a04be..de726b786a5 100644
--- a/srcpkgs/odin/template
+++ b/srcpkgs/odin/template
@@ -5,6 +5,8 @@ revision=1
 archs="x86_64"
 wrksrc="Odin-${version}"
 build_style="gnu-makefile"
+make_use_env=yes
+make_build_target="debug"
 hostmakedepends="pkg-config clang llvm"
 depends="clang"
 short_desc="Fast, concise, readable, pragmatic and open programming language"
@@ -14,8 +16,6 @@ homepage="https://odin-lang.org"
 distfiles="https://github.com/odin-lang/Odin/archive/v${version}.tar.gz"
 checksum=04a1c9e8719281a598cac5e9cc3e5ca2316cc038a8b8f9ae43f514aba967c635
 nopie=yes
-make_build_target="debug"
-make_use_env=yes
 
 do_install() {
 	vmkdir opt/odin
