[v2,01/13] build-system: Add asdf-build-system.
Commit Message
Hi again,
Things took a little longer than expected as I ran into a bug with ECL
(fix attached). I'll try to upstream it later. It can be re-ordered
somewhere nearer the beginning of the series.
On Wed, 5 Oct 2016 16:59:07 -0400
Andy Patterson <ajpatter@uwaterloo.ca> wrote:
> > What’s the ‘compile-dependencies’ used for? I think when compile a
> > system, ASDF will load all its depends (from the :depends-on) first.
> > Sometimes we need load extra systems manually?
> >
>
> It's for packages like slynk, where many systems are defined within
> the same file. When telling asdf to find a system, it will only
> search for a file with the same name unless it already knows about
> that system. Therefore, in these cases the system which contains the
> definitions is loaded first. This mechanism is a bit clunky so
> suggestions are welcome. For now I'll document the reason it's done
> that way.
>
I found a better way to solve this.
I hope I've managed to cover everything you've suggested. The slynk
packages look quite a bit nicer now. I'll attach the updates as replies
to the corresponding v2 patches. Let me know what you think.
--
Andy
From 7646691c77c9a01e620e5f0c4695db8abb276863 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
Date: Fri, 7 Oct 2016 03:19:26 -0400
Subject: [PATCH v3 12/12] gnu: ecl: Fix `truename' on long target files.
When the target of a symbolic link exceeded 128 characters, `truename'
would unexpectedly fail.
* gnu/packages/patches/ecl-fix-si-readlink.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/lisp.scm | 4 +++-
gnu/packages/patches/ecl-fix-si-readlink.patch | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/ecl-fix-si-readlink.patch
@@ -497,6 +497,7 @@ dist_patch_DATA = \
%D%/packages/patches/doxygen-test.patch \
%D%/packages/patches/duplicity-piped-password.patch \
%D%/packages/patches/duplicity-test_selection-tmp.patch \
+ %D%/packages/patches/ecl-fix-si-readlink.patch \
%D%/packages/patches/elfutils-tests-ptrace.patch \
%D%/packages/patches/elixir-disable-failing-tests.patch \
%D%/packages/patches/einstein-build.patch \
@@ -130,7 +130,9 @@ interface to the Tk widget system.")
(snippet
;; Add ecl-bundle-systems to 'default-system-source-registry'.
`(substitute* "contrib/asdf/asdf.lisp"
- ,@(asdf-substitutions name)))))
+ ,@(asdf-substitutions name)))
+ (patches
+ (search-patches "ecl-fix-si-readlink.patch"))))
(build-system gnu-build-system)
;; src/configure uses 'which' to confirm the existence of 'gzip'.
(native-inputs `(("which" ,which)))
new file mode 100644
@@ -0,0 +1,20 @@
+--- a/src/c/unixfsys.d 2016-02-25 02:06:19.000000000 -0500
++++ b/src/c/unixfsys.d 2016-10-07 00:50:20.172282246 -0400
+@@ -236,15 +236,15 @@ static cl_object
+ si_readlink(cl_object filename) {
+ /* Given a filename which is a symlink, this routine returns
+ * the value of this link in the form of a pathname. */
+- cl_index size = 128, written;
++ cl_index size = 0, written;
+ cl_object output, kind;
+ do {
++ size += 128;
+ output = ecl_alloc_adjustable_base_string(size);
+ ecl_disable_interrupts();
+ written = readlink((char*)filename->base_string.self,
+ (char*)output->base_string.self, size);
+ ecl_enable_interrupts();
+- size += 256;
+ } while (written == size);
+ output->base_string.self[written] = '\0';
+ kind = file_kind((char*)output->base_string.self, FALSE);
--
2.10.0