Subject: [alpine-aports] [PATCH] testing/libctl: new aport

From: Isaac Dunham <[email-masked]>
Date: Sat, 18 Jul 2015 16:40:05 -0700

libctl is MIT's glue for embedding guile in programs.
---
 testing/libctl/APKBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 testing/libctl/APKBUILD

diff --git a/testing/libctl/APKBUILD b/testing/libctl/APKBUILD
new file mode 100644
index 0000000..9f950c8
--- /dev/null
+++ b/testing/libctl/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Isaac Dunham <[email-masked]>
+# Maintainer:
+pkgname=libctl
+pkgver=3.2.2
+pkgrel=0
+pkgdesc="Guile-based library implementing flexible control files for scientific simulations"
+url="http://ab-initio.mit.edu/wiki/index.php/Libctl"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="guile-dev"
+makedepends="$depends_dev gc-dev gfortran"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://ab-initio.mit.edu/libctl/libctl-$pkgver.tar.gz"
+
+_builddir="$srcdir"/libctl-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		--enable-shared --disable-static \
+		|| return 1
+	make || return 1
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+}
+
+md5sums="5fd7634dc9ae8e7fa70a68473b9cbb68  libctl-3.2.2.tar.gz"
+sha256sums="8abd8b58bc60e84e16d25b56f71020e0cb24d75b28bc5db86d50028197c7efbc  libctl-3.2.2.tar.gz"
+sha512sums="646456c23490eb3e63e845d4866b16bd1d92b210f2279342560888bb4764e474b97e17ff34beb672d43afe4d42bbcbddbcf8bb49cedc23b886061a93de10e6df  libctl-3.2.2.tar.gz"
-- 
2.4.5

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Francesco Colista <[email-masked]>
Date: Mon, 20 Jul 2015 08:36:03 +0200

Il 2015-07-19 01:40 Isaac Dunham ha scritto:
>  testing/libctl/APKBUILD | 51 
> +++++++++++++++++++++++++++++++++++++++++++++++++

Hi Isaac.
libctl does not compile:

  -MF .deps/subplex.Tpo -c -o subplex.lo subplex.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Os -fomit-frame-pointer 
-I/usr/include/guile/2.0 -Os -fomit-frame-pointer -MT ctl.lo -MD -MP -MF 
.deps/ctl.Tpo -c ctl.c  -fPIC -DPIC -o .libs/ctl.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Os -fomit-frame-pointer 
-I/usr/include/guile/2.0 -Os -fomit-frame-pointer -MT subplex.lo -MD -MP 
-MF .deps/subplex.Tpo -c subplex.c  -fPIC -DPIC -o .libs/subplex.o
In file included from subplex.c:62:0:
ctl.h:30:24: fatal error: guile/gh.h: No such file or directory
compilation terminated.
In file included from ctl.c:27:0:
ctl.h:30:24: fatal error: guile/gh.h: No such file or directory
compilation terminated.

This is due to a change to guile package.
gh.h does not exist anymore, libctl needs to be patched to look for 
libguile.h rather than gh.h
Can you please send another patch for that?
Thanks!

-- 
:: Francesco Colista
:: Alpine Linux Infrstraucture
:: http://www.alpinelinux.org

---

---

From: Francesco Colista <[email-masked]>
Date: Mon, 20 Jul 2015 14:55:30 +0200

>>  create mode 100644 testing/libctl/APKBUILD
guile/gh.h: No such file or directory
> Can you please send another patch for that?

Hi Isaac. I had time to create a patch and fix the build.

http://git.alpinelinux.org/cgit/aports/commit/?id=22306dd8

See you around.

---