From b7ff6fa17753e319ad297b9627a3da0a3bdaa86d Mon Sep 17 00:00:00 2001
From: rc-05 <rc23@email.it>
Date: Thu, 13 Jun 2019 00:00:40 +0200
Subject: [PATCH 1/2] New package: ol-2.0

---
 srcpkgs/ol/patches/ol.patch | 21 +++++++++++++++++++++
 srcpkgs/ol/template         | 15 +++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 srcpkgs/ol/patches/ol.patch
 create mode 100644 srcpkgs/ol/template

diff --git a/srcpkgs/ol/patches/ol.patch b/srcpkgs/ol/patches/ol.patch
new file mode 100644
index 00000000000..80a56845b22
--- /dev/null
+++ b/srcpkgs/ol/patches/ol.patch
@@ -0,0 +1,21 @@
+# Thanks to Chocimier for the patch!
+
+diff --git Makefile Makefile
+index 29ea60f..d586472 100644
+--- Makefile
++++ Makefile
+@@ -7,6 +7,7 @@ export OL_HOME=libraries
+ all: release
+ 
+ CC ?= gcc
++LD ?= ld
+ UNAME ?= $(shell uname -s)
+ 
+ # 'configure' part:
+@@ -167,7 +168,7 @@ src/olvm.c: extensions/ffi.c
+ 	touch src/olvm.c
+ 
+ $(repl.o): repl
+-	ld -r -b binary -o $(repl.o) repl
++	$(LD) -r -b binary -o $(repl.o) repl
+
diff --git a/srcpkgs/ol/template b/srcpkgs/ol/template
new file mode 100644
index 00000000000..87845656260
--- /dev/null
+++ b/srcpkgs/ol/template
@@ -0,0 +1,15 @@
+# Template file for 'ol'
+pkgname=ol
+version=2.0
+revision=1
+build_style=gnu-makefile
+short_desc="Purely functional dialect of Lisp"
+maintainer="rc-05 <rc23@email.it>"
+license="LGPL-3.0-or-later, MIT"
+homepage="https://yuriy-chumak.github.io/ol/"
+distfiles="https://github.com/yuriy-chumak/ol/archive/v${version}.tar.gz"
+checksum=5ad537b6bd032549334d1c72e742b78b7d40ccb8d1491d5cf0ce952964deeeea
+
+post_install() {
+	vlicense LICENSE
+}

From edd86f285fd9fd3bc9a2b5adab4eaf9893b9d4cb Mon Sep 17 00:00:00 2001
From: rc-05 <rc23@email.it>
Date: Tue, 16 Jul 2019 16:49:07 +0200
Subject: [PATCH 2/2] scheme48: Enabling cross compilation.

The previous revision had the 'nocross' in order to compile it for x86_64 and i686 architectures.
Hopefully now it can be compiled also for the other CPU architectures.
---
 srcpkgs/ol/patches/ol.patch | 21 ---------------------
 srcpkgs/ol/template         | 15 ---------------
 srcpkgs/scheme48/template   | 20 ++++++++++++++++++++
 3 files changed, 20 insertions(+), 36 deletions(-)
 delete mode 100644 srcpkgs/ol/patches/ol.patch
 delete mode 100644 srcpkgs/ol/template
 create mode 100644 srcpkgs/scheme48/template

diff --git a/srcpkgs/ol/patches/ol.patch b/srcpkgs/ol/patches/ol.patch
deleted file mode 100644
index 80a56845b22..00000000000
--- a/srcpkgs/ol/patches/ol.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-# Thanks to Chocimier for the patch!
-
-diff --git Makefile Makefile
-index 29ea60f..d586472 100644
---- Makefile
-+++ Makefile
-@@ -7,6 +7,7 @@ export OL_HOME=libraries
- all: release
- 
- CC ?= gcc
-+LD ?= ld
- UNAME ?= $(shell uname -s)
- 
- # 'configure' part:
-@@ -167,7 +168,7 @@ src/olvm.c: extensions/ffi.c
- 	touch src/olvm.c
- 
- $(repl.o): repl
--	ld -r -b binary -o $(repl.o) repl
-+	$(LD) -r -b binary -o $(repl.o) repl
-
diff --git a/srcpkgs/ol/template b/srcpkgs/ol/template
deleted file mode 100644
index 87845656260..00000000000
--- a/srcpkgs/ol/template
+++ /dev/null
@@ -1,15 +0,0 @@
-# Template file for 'ol'
-pkgname=ol
-version=2.0
-revision=1
-build_style=gnu-makefile
-short_desc="Purely functional dialect of Lisp"
-maintainer="rc-05 <rc23@email.it>"
-license="LGPL-3.0-or-later, MIT"
-homepage="https://yuriy-chumak.github.io/ol/"
-distfiles="https://github.com/yuriy-chumak/ol/archive/v${version}.tar.gz"
-checksum=5ad537b6bd032549334d1c72e742b78b7d40ccb8d1491d5cf0ce952964deeeea
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/scheme48/template b/srcpkgs/scheme48/template
new file mode 100644
index 00000000000..cb3c287fa31
--- /dev/null
+++ b/srcpkgs/scheme48/template
@@ -0,0 +1,20 @@
+# Template file for 'scheme48'
+pkgname=scheme48
+version=1.9.2
+revision=2
+build_style=gnu-configure
+short_desc="Implementation of the R5RS Scheme standard"
+maintainer="rc-05 <rc23@email.it>"
+license="custom:scheme48"
+homepage="http://s48.org/"
+distfiles="http://s48.org/${version}/scheme48-${version}.tgz"
+checksum=9c4921a90e95daee067cd2e9cc0ffe09e118f4da01c0c0198e577c4f47759df4
+alternatives="
+ scheme:scheme:/usr/bin/scheme48
+ scheme:scheme.1:/usr/share/man/man1/scheme48.1
+"
+
+post_install() {
+	vlicense COPYING
+}
+
