]> git.donarmstrong.com Git - lilypond.git/commitdiff
Bundle our own private copy of guile-1.8
authorAnthony Fok <foka@debian.org>
Fri, 27 Jan 2017 11:58:07 +0000 (04:58 -0700)
committerAnthony Fok <foka@debian.org>
Fri, 27 Jan 2017 12:03:03 +0000 (05:03 -0700)
Superceded by guile-2.0, the old guile-1.8 was finally removed from Debian
in May 2016.

Unfortunately, LilyPond 2.18.2 still requires Guile 1.8,
and LilyPond 2.19.x and Guile 2 are just not yet ready for each other.
So, it would seem that bundling our own private guile-1.8 is the only
viable option to keep LilyPond 2.18.2 in Debian for the time being.

Hope this would allow LilyPond to re-enter Debian 9 "stretch"!

24 files changed:
debian/clean [new file with mode: 0644]
debian/control
debian/copyright
debian/guile.reloc.in [new file with mode: 0644]
debian/lilypond-data.install [changed mode: 0644->0755]
debian/lilypond-invoke-editor.sh.in [new file with mode: 0644]
debian/lilypond.install [changed mode: 0644->0755]
debian/lilypond.sh.in [new file with mode: 0644]
debian/patches/0001-Change-guile-tut-to-guile-tut-1.8.patch [new file with mode: 0644]
debian/patches/0002-Handle-the-DFSG-package-split.patch [new file with mode: 0644]
debian/patches/0003-Fix-the-SRFI-60-copy-bit-documentation.patch [new file with mode: 0644]
debian/patches/0004-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch [new file with mode: 0644]
debian/patches/0005-Don-t-access-uninitialised-memory-in-scm_to_sockaddr.patch [new file with mode: 0644]
debian/patches/0006-Make-sockets.test-more-robust.patch [new file with mode: 0644]
debian/patches/0007-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch [new file with mode: 0644]
debian/patches/0008-Fix-problems-in-guile-tut.texi-that-cause-makeinfo-t.patch [new file with mode: 0644]
debian/patches/0009-Fix-r5rs.texi-makeinfo-failure-by-applying-changes-f.patch [new file with mode: 0644]
debian/patches/0010-Fix-test-suite-failure-caused-by-formfeed-difference.patch [new file with mode: 0644]
debian/patches/0011-Fix-incompatibility-with-automake-1.13-specify-seria.patch [new file with mode: 0644]
debian/patches/0012-remove-spurious-declarations-in-c-tokenize.lex.patch [new file with mode: 0644]
debian/patches/0100-guile-config-link-static-libguile.a-for-lilypond.patch [new file with mode: 0644]
debian/patches/0101-read_relocation_dir-in-lilypond_datadir-too.patch [new file with mode: 0644]
debian/patches/series
debian/rules

diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..c919c78
--- /dev/null
@@ -0,0 +1,61 @@
+config.hh
+config.log
+config.make
+config.status
+config.status.lineno
+local.make
+Documentation/snippets/out/
+input/regression/musicxml/book-musicxml-testsuite.pyc
+out/guile/
+.htaccess
+debian/guile.reloc
+debian/lilypond.sh
+debian/lilypond-invoke-editor.sh
+guile18/INSTALL
+guile18/Makefile.in
+guile18/aclocal.m4
+guile18/am/Makefile.in
+guile18/benchmark-suite/Makefile.in
+guile18/build-aux/compile
+guile18/build-aux/config.guess
+guile18/build-aux/config.sub
+guile18/build-aux/depcomp
+guile18/build-aux/install-sh
+guile18/build-aux/ltmain.sh
+guile18/build-aux/mdate-sh
+guile18/build-aux/missing
+guile18/build-aux/texinfo.tex
+guile18/config.h.in
+guile18/configure
+guile18/doc/Makefile.in
+guile18/doc/r5rs/Makefile.in
+guile18/doc/tutorial/Makefile.in
+guile18/emacs/Makefile.in
+guile18/examples/Makefile.in
+guile18/guile-config/Makefile.in
+guile18/guile-readline/Makefile.in
+guile18/guile-readline/aclocal.m4
+guile18/guile-readline/compile
+guile18/guile-readline/config.guess
+guile18/guile-readline/config.sub
+guile18/guile-readline/configure
+guile18/guile-readline/depcomp
+guile18/guile-readline/guile-readline-config.h.in
+guile18/guile-readline/ice-9/Makefile.in
+guile18/guile-readline/install-sh
+guile18/guile-readline/ltmain.sh
+guile18/guile-readline/missing
+guile18/ice-9/Makefile.in
+guile18/lang/Makefile.in
+guile18/libguile/Makefile.in
+guile18/m4/libtool.m4
+guile18/m4/ltoptions.m4
+guile18/m4/ltsugar.m4
+guile18/m4/ltversion.m4
+guile18/m4/lt~obsolete.m4
+guile18/oop/Makefile.in
+guile18/oop/goops/Makefile.in
+guile18/scripts/Makefile.in
+guile18/srfi/Makefile.in
+guile18/test-suite/Makefile.in
+guile18/test-suite/standalone/Makefile.in
index 66681965aba5ba4be8fbc51cdd1e399d1643cc5d..a2e3e8ab7c40e0eabfcae47f5489aaa26a3d5c97 100644 (file)
@@ -1,6 +1,5 @@
 Source: lilypond
-Build-Depends: debhelper (>= 9), quilt, python-all-dev (>= 2.6.6-3~), dh-python,
- guile-1.8-dev,
+Build-Depends: debhelper (>= 9), quilt, python-all-dev (>= 2.6.6-3~), dh-python, dh-exec,
  libfl-dev, flex, bison, texinfo, groff, m4, gettext, mftrace, fontforge,
  pkg-config, libfreetype6-dev, libpango1.0-dev,
  libfontconfig1-dev, help2man,
@@ -9,7 +8,9 @@ Build-Depends: debhelper (>= 9), quilt, python-all-dev (>= 2.6.6-3~), dh-python,
  zip, rsync, texlive-fonts-recommended, dblatex, netpbm, imagemagick,
  fonts-linuxlibertine, fonts-freefont-ttf, fonts-ipafont-mincho,
  texlive-lang-cyrillic,
- gsfonts | gsfonts-x11
+ gsfonts | gsfonts-x11,
+ libtool, autoconf, automake, libgmp-dev, libltdl-dev, libncurses5-dev,
+ libreadline6-dev
 Build-Conflicts: fonts-noto-cjk
 Section: tex
 Priority: optional
@@ -24,7 +25,7 @@ Package: lilypond
 Architecture: any
 Replaces: lilypond1.3
 Provides: lilypond1.3
-Depends: ${shlibs:Depends}, ${python:Depends}, guile-1.8, ${misc:Depends}, lilypond-data (= ${source:Version}), ghostscript
+Depends: ${shlibs:Depends}, ${python:Depends}, ${misc:Depends}, lilypond-data (= ${source:Version}), ghostscript
 Breaks: ${python:Breaks}
 Recommends: lilypond-doc, texlive-latex-base
 Description: program for typesetting sheet music
index 118aa340c75733210b3465dc72f2555a0b29db70..3646a02dfeb4aeb89f940f79aa92cca5ab408855 100644 (file)
@@ -284,6 +284,77 @@ Copyright: UNKNOWN
 License: GPL-3+
 
 
+Files: guile18/*
+Copyright: 1996-2010 Free Software Foundation, Inc.
+License: LGPL-2.1+
+
+Files: guile18/doc/tutorial
+Copyright: 1997, 1998, 2004, 2006 Free Software Foundation
+License: Guile-Tutorial
+ Permission is granted to make and distribute verbatim copies of
+ this manual provided the copyright notice and this permission notice
+ are preserved on all copies.
+ .
+ Permission is granted to copy and distribute modified versions of this
+ manual under the conditions for verbatim copying, provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+ .
+ Permission is granted to copy and distribute translations of this manual
+ into another language, under the above conditions for modified versions,
+ except that this permission notice may be stated in a translation approved
+ by the author.
+
+Files: guile18/NEWS
+Copyright: 1996-2010 Free Software Foundation, Inc.
+License: Guile-NEWS
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and this permission notice are preserved,
+ thus giving the recipient permission to redistribute in turn.
+ .
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last changed them.
+
+Files: guile18/doc/goops/goops-tutorial.texi
+Copyright: 1993-1999 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
+License: MIT-GOOPS-Tutorial
+ Permission to use, copy, modify, distribute, and license this
+ software and its documentation for any purpose is hereby granted,
+ provided that existing copyright notices are retained in all
+ copies and that this notice is included verbatim in any
+ distributions.  No written agreement, license, or royalty fee is
+ required for any of the authorized uses.
+ This software is provided ``AS IS'' without express or implied
+ warranty.
+ .
+ Adapted for use in Guile with the author's permission.
+Comment: STk Reference manual (Appendix: An Introduction to STklos)
+ This chapter was originally written by Erick Gallesio as an appendix
+ for the STk reference manual, and subsequently adapted to GOOPS.
+
+Files: guile18/libguile/gc_os_dep.c
+Copyright: 1988, 1989, 2010 Hans-J. Boehm, Alan J. Demers
+           1991-1995 by Xerox Corporation.  All rights reserved.
+           1996-1999 by Silicon Graphics.  All rights reserved.
+           1999 by Hewlett-Packard Company.  All rights reserved.
+           2000, 2001, 2002, 2003, 2004, 2006, 2008 Free Software Foundation
+License: MIT-gc_os_dep.c
+ THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+ OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
+ .
+ Permission is hereby granted to use or copy this program
+ for any purpose,  provided the above notices are retained on all copies.
+ Permission to modify the code and to distribute modified code is granted,
+ provided the above notices are retained, and a notice that the code was
+ modified is included with the above copyright notice.
+Comment:
+ Copied from gc5.2, files "os_dep.c", "gc_priv.h", "mark.c" and "gcconfig.h",
+ and modified for Guile by Marius Vollmer.
+
+
 License: BSL-1.0
  Boost Software License - Version 1.0 - August 17th, 2003
  .
@@ -357,6 +428,25 @@ License: GPL-2+
  Public License can be found in `/usr/share/common-licenses/GPL-2'.
 
 
+LICENSE: LGPL-2.1+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ .
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ .
+ On Debian systems, the full text of the GNU Lesser General Public License
+ version 2.1 can be found in the file `/usr/share/common-licenses/LGPL-2.1'.
+
+
 License: LPPL-1.3c+
   The LaTeX Project Public License
   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
diff --git a/debian/guile.reloc.in b/debian/guile.reloc.in
new file mode 100644 (file)
index 0000000..4e6a87e
--- /dev/null
@@ -0,0 +1 @@
+prependdir GUILE_LOAD_PATH=/usr/share/lilypond/@LILYPOND_VERSION@/guile/1.8
old mode 100644 (file)
new mode 100755 (executable)
index 3318066..260f9ee
@@ -1,2 +1,5 @@
+#!/usr/bin/dh-exec
 usr/share/lilypond
 usr/share/emacs/site-lisp
+out/guile/usr/share/guile usr/share/lilypond/${LILYPOND_VERSION}/
+debian/guile.reloc usr/share/lilypond/${LILYPOND_VERSION}/etc/relocate/
diff --git a/debian/lilypond-invoke-editor.sh.in b/debian/lilypond-invoke-editor.sh.in
new file mode 100644 (file)
index 0000000..fff5e11
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+export GUILE_LOAD_PATH="/usr/share/lilypond/@LILYPOND_VERSION@/guile/1.8"
+export LD_LIBRARY_PATH="/usr/lib/@DEB_HOST_MULTIARCH@/lilypond/@LILYPOND_VERSION@/guile:$LD_LIBRARY_PATH"
+exec "/usr/lib/@DEB_HOST_MULTIARCH@/lilypond/@LILYPOND_VERSION@/bin/guile-1.8" "/usr/bin/lilypond-invoke-editor.real" "$@"
old mode 100644 (file)
new mode 100755 (executable)
index 499e3a2..43f0e3d
@@ -1,4 +1,12 @@
+#!/usr/bin/dh-exec
 usr/bin
 usr/share/locale
 usr/share/man
 usr/lib
+usr/bin/lilypond   => usr/bin/lilypond.real
+debian/lilypond.sh => usr/bin/lilypond
+usr/bin/lilypond-invoke-editor   => usr/bin/lilypond-invoke-editor.real
+debian/lilypond-invoke-editor.sh => usr/bin/lilypond-invoke-editor
+out/guile/usr/lib/libguile.so*       usr/lib/${DEB_HOST_MULTIARCH}/lilypond/${LILYPOND_VERSION}/guile/
+out/guile/usr/lib/libguile-srfi*.so* usr/lib/${DEB_HOST_MULTIARCH}/lilypond/${LILYPOND_VERSION}/guile/
+out/guile/usr/bin/guile          =>  usr/lib/${DEB_HOST_MULTIARCH}/lilypond/${LILYPOND_VERSION}/bin/guile-1.8
diff --git a/debian/lilypond.sh.in b/debian/lilypond.sh.in
new file mode 100644 (file)
index 0000000..6b9948e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+export LD_LIBRARY_PATH="/usr/lib/@DEB_HOST_MULTIARCH@/lilypond/@LILYPOND_VERSION@/guile"
+exec "/usr/bin/lilypond.real" "$@"
diff --git a/debian/patches/0001-Change-guile-tut-to-guile-tut-1.8.patch b/debian/patches/0001-Change-guile-tut-to-guile-tut-1.8.patch
new file mode 100644 (file)
index 0000000..3ec4396
--- /dev/null
@@ -0,0 +1,43 @@
+From d8710a1913682ab09a82beb877389c16dac68c95 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 23 Apr 2011 14:57:47 -0500
+Subject: Change guile-tut to guile-tut-1.8.
+
+---
+ doc/tutorial/Makefile.am    | 2 +-
+ doc/tutorial/guile-tut.texi | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/guile18/doc/tutorial/Makefile.am b/guile18/doc/tutorial/Makefile.am
+index f49220d..98630fd 100644
+--- a/guile18/doc/tutorial/Makefile.am
++++ b/guile18/doc/tutorial/Makefile.am
+@@ -21,6 +21,6 @@
+ AUTOMAKE_OPTIONS = gnu
+-info_TEXINFOS = guile-tut.texi
++info_TEXINFOS = guile-tut-1.8.texi
+ EXTRA_DIST = ChangeLog-2008
+diff --git a/guile18/doc/tutorial/guile-tut.texi b/guile18/doc/tutorial/guile-tut.texi
+index ed0b202..80903e6 100644
+--- a/guile18/doc/tutorial/guile-tut.texi
++++ b/guile18/doc/tutorial/guile-tut.texi
+@@ -1,6 +1,6 @@
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+-@setfilename guile-tut.info
++@setfilename guile-tut-1.8.info
+ @settitle Guile Tutorial
+ @set guile-tut
+@@ -8,7 +8,7 @@
+ @dircategory The Algorithmic Language Scheme
+ @direntry
+-* Guile Tutorial: (guile-tut).  The Guile tutorial.
++* Guile Tutorial: (guile-tut-1.8).  The Guile tutorial.
+ @end direntry
+ @setchapternewpage off
diff --git a/debian/patches/0002-Handle-the-DFSG-package-split.patch b/debian/patches/0002-Handle-the-DFSG-package-split.patch
new file mode 100644 (file)
index 0000000..d744a6f
--- /dev/null
@@ -0,0 +1,51 @@
+From 1309cbe9a907c22250bf4215937810ddf3040154 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 23 Apr 2011 14:57:48 -0500
+Subject: Handle the DFSG package split.
+
+---
+ configure.in    | 2 --
+ doc/Makefile.am | 9 +--------
+ 2 files changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/guile18/configure.in b/guile18/configure.in
+index 217ac83..9f23a4a 100644
+--- a/guile18/configure.in
++++ b/guile18/configure.in
+@@ -1559,9 +1559,7 @@ AC_CONFIG_FILES([
+   am/Makefile
+   benchmark-suite/Makefile
+   doc/Makefile
+-  doc/goops/Makefile
+   doc/r5rs/Makefile
+-  doc/ref/Makefile
+   doc/tutorial/Makefile
+   emacs/Makefile
+   examples/Makefile
+diff --git a/guile18/doc/Makefile.am b/guile18/doc/Makefile.am
+index 4581a72..b70d55d 100644
+--- a/guile18/doc/Makefile.am
++++ b/guile18/doc/Makefile.am
+@@ -21,21 +21,14 @@
+ AUTOMAKE_OPTIONS = gnu
+-SUBDIRS = ref tutorial goops r5rs
++SUBDIRS = tutorial r5rs
+ dist_man1_MANS = guile.1
+-EXAMPLE_SMOB_FILES = \
+-    ChangeLog-2008 Makefile README image-type.c image-type.h myguile.c
+-
+ OLDFMT = oldfmt.c
+ dist-hook:
+       cp $(srcdir)/$(OLDFMT) $(distdir)/
+-      mkdir $(distdir)/example-smob
+-      for f in $(EXAMPLE_SMOB_FILES); do \
+-        cp $(srcdir)/example-smob/$$f $(distdir)/example-smob/; \
+-        done
+ EXTRA_DIST = groupings.alist ChangeLog-2008 # guile-api.alist
diff --git a/debian/patches/0003-Fix-the-SRFI-60-copy-bit-documentation.patch b/debian/patches/0003-Fix-the-SRFI-60-copy-bit-documentation.patch
new file mode 100644 (file)
index 0000000..fb75f52
--- /dev/null
@@ -0,0 +1,31 @@
+From 45f900bd1974431bbae64538e0994290d051a5a2 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 23 Apr 2011 14:57:49 -0500
+Subject: Fix the SRFI 60 copy-bit documentation.
+
+---
+ srfi/srfi-60.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/guile18/srfi/srfi-60.c b/guile18/srfi/srfi-60.c
+index a91cb50..2b7c27c 100644
+--- a/guile18/srfi/srfi-60.c
++++ b/guile18/srfi/srfi-60.c
+@@ -63,7 +63,7 @@ SCM_DEFINE (scm_srfi60_log2_binary_factors, "log2-binary-factors", 1, 0, 0,
+ SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
+-            (SCM index, SCM n, SCM bit),
++            (SCM index, SCM n, SCM newbit),
+           "Return @var{n} with the bit at @var{index} set according to\n"
+           "@var{newbit}.  @var{newbit} should be @code{#t} to set the bit\n"
+           "to 1, or @code{#f} to set it to 0.  Bits other than at\n"
+@@ -79,7 +79,7 @@ SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
+   int bb;
+   ii = scm_to_ulong (index);
+-  bb = scm_to_bool (bit);
++  bb = scm_to_bool (newbit);
+   if (SCM_I_INUMP (n))
+     {
diff --git a/debian/patches/0004-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch b/debian/patches/0004-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch
new file mode 100644 (file)
index 0000000..63915d8
--- /dev/null
@@ -0,0 +1,23 @@
+From 771d70606687f6d0ab03a0cafa928d7e5d53a402 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sat, 23 Apr 2011 14:57:50 -0500
+Subject: Define _GNU_SOURCE to fix the GNU/kFreeBSD build.
+
+Author: Petr Salinger <Petr.Salinger@seznam.cz>
+Closes: #401168
+---
+ libguile/fports.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/guile18/libguile/fports.c b/guile18/libguile/fports.c
+index 007ee3f..e036679 100644
+--- a/guile18/libguile/fports.c
++++ b/guile18/libguile/fports.c
+@@ -18,6 +18,7 @@
\f
+ #define _LARGEFILE64_SOURCE      /* ask for stat64 etc */
++#define _GNU_SOURCE              /* ask for LONG_LONG_MAX/LONG_LONG_MIN */
+ #ifdef HAVE_CONFIG_H
+ #  include <config.h>
diff --git a/debian/patches/0005-Don-t-access-uninitialised-memory-in-scm_to_sockaddr.patch b/debian/patches/0005-Don-t-access-uninitialised-memory-in-scm_to_sockaddr.patch
new file mode 100644 (file)
index 0000000..bb1db84
--- /dev/null
@@ -0,0 +1,28 @@
+From 0ed896b3f6c9f9d731fd7cfb0d121d2fbb807be8 Mon Sep 17 00:00:00 2001
+From: Thorsten Glaser <tg@debian.org>
+Date: Wed, 27 Apr 2011 12:35:58 +0000
+Subject: Don't access uninitialised memory in scm_to_sockaddr().
+
+Signed-off-by: Thorsten Glaser <tg@debian.org>
+---
+ libguile/socket.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/guile18/libguile/socket.c b/guile18/libguile/socket.c
+index cb954f4..e338dcb 100644
+--- a/guile18/libguile/socket.c
++++ b/guile18/libguile/socket.c
+@@ -1143,6 +1143,13 @@ scm_to_sockaddr (SCM address, size_t *address_size)
+         {
+           struct sockaddr_in c_inet;
++          /*
++           * initialise the entire struct, including all
++           * possible padding, to NUL to avoid copying
++           * uninitialised memory in the memcpy below
++           */
++          memset (&c_inet, 0, sizeof (c_inet));
++
+           c_inet.sin_addr.s_addr =
+             htonl (scm_to_ulong (SCM_SIMPLE_VECTOR_REF (address, 1)));
+           c_inet.sin_port =
diff --git a/debian/patches/0006-Make-sockets.test-more-robust.patch b/debian/patches/0006-Make-sockets.test-more-robust.patch
new file mode 100644 (file)
index 0000000..aabe1aa
--- /dev/null
@@ -0,0 +1,55 @@
+From 4bd9feda896f146786de6481a63b449a1904047c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
+Date: Tue, 19 Jan 2010 18:49:06 +0100
+Subject: Make `sockets.test' more robust.
+
+* test-suite/tests/socket.test ("AF_INET6/SOCK_STREAM"): Gracefully
+  handle cases where this combination is not supported.
+---
+ test-suite/tests/socket.test | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/guile18/test-suite/tests/socket.test b/guile18/test-suite/tests/socket.test
+index e73f585..0510f54 100644
+--- a/guile18/test-suite/tests/socket.test
++++ b/guile18/test-suite/tests/socket.test
+@@ -1,6 +1,6 @@
+ ;;;; socket.test --- test socket functions     -*- scheme -*-
+ ;;;;
+-;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++;;;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ ;;;;
+ ;;;; This library is free software; you can redistribute it and/or
+ ;;;; modify it under the terms of the GNU Lesser General Public
+@@ -341,7 +341,9 @@
+       ;; testing `bind', `listen' and `connect' on stream-oriented sockets
+-      (let ((server-socket (socket AF_INET6 SOCK_STREAM 0))
++      (let ((server-socket
++             ;; Some platforms don't support this protocol/family combination.
++             (false-if-exception (socket AF_INET6 SOCK_STREAM 0)))
+           (server-bound? #f)
+           (server-listening? #f)
+           (server-pid #f)
+@@ -350,6 +352,8 @@
+           (client-port 9998))
+       (pass-if "bind"
++          (if (not server-socket)
++              (throw 'unresolved))
+         (catch 'system-error
+           (lambda ()
+             (bind server-socket AF_INET6 ipv6-addr server-port)
+@@ -361,8 +365,10 @@
+                     (else (apply throw args)))))))
+       (pass-if "bind/sockaddr"
+-        (let* ((sock (socket AF_INET6 SOCK_STREAM 0))
++        (let* ((sock (false-if-exception (socket AF_INET6 SOCK_STREAM 0)))
+                (sockaddr (make-socket-address AF_INET6 ipv6-addr client-port)))
++            (if (not sock)
++                (throw 'unresolved))
+           (catch 'system-error
+             (lambda ()
+               (bind sock sockaddr)
diff --git a/debian/patches/0007-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/debian/patches/0007-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
new file mode 100644 (file)
index 0000000..be1fa9c
--- /dev/null
@@ -0,0 +1,27 @@
+From 6e4faf6b47d5385ea26a62791d96d352be4a1bbb Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Tue, 6 Mar 2012 21:05:04 -0600
+Subject: Mark "Unused modules are removed" gc test as unresolved.
+
+As per discussion with upstream, mark this test as unresolved since it
+may produce false negatives, depending on the behavior/timing of the
+garbage collector.
+
+Closes: #653939
+---
+ test-suite/tests/gc.test | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/guile18/test-suite/tests/gc.test b/guile18/test-suite/tests/gc.test
+index badf2b7..b0d7427 100644
+--- a/guile18/test-suite/tests/gc.test
++++ b/guile18/test-suite/tests/gc.test
+@@ -76,5 +76,7 @@
+            (gc)
+            (gc) ;; twice: have to kill the weak vectors.
+-           (= last-count (cdr (assoc "eval-closure" (gc-live-object-stats)))))
++           (if (= last-count (cdr (assoc "eval-closure" (gc-live-object-stats))))
++                 #t
++                 (throw 'unresolved)))
+          ))
diff --git a/debian/patches/0008-Fix-problems-in-guile-tut.texi-that-cause-makeinfo-t.patch b/debian/patches/0008-Fix-problems-in-guile-tut.texi-that-cause-makeinfo-t.patch
new file mode 100644 (file)
index 0000000..a1a3607
--- /dev/null
@@ -0,0 +1,53 @@
+From 030f81c1db8ad626e75d1a2ab0916c9594aab65b Mon Sep 17 00:00:00 2001
+From: Hideki Yamane <henrich@debian.or.jp>
+Date: Sun, 9 Feb 2014 12:32:47 -0600
+Subject: Fix problems in guile-tut.texi that cause makeinfo to fail.
+
+[rlb@defaultvalue.org: adjust commit message.]
+
+Bug-Debian: http://bugs.debian.org/711029
+---
+ doc/tutorial/guile-tut.texi | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/guile18/doc/tutorial/guile-tut.texi b/guile18/doc/tutorial/guile-tut.texi
+index 80903e6..c220b2f 100644
+--- a/guile18/doc/tutorial/guile-tut.texi
++++ b/guile18/doc/tutorial/guile-tut.texi
+@@ -446,7 +446,7 @@ get started, look at the books @cite{Simply Scheme} and @cite{The Little
+ Schemer} from that list.}
+-@subsection Hello World
++@section Hello World
+ @cindex hello world
+ Our first program is the typical Scheme "hello world" program.  Put the
+@@ -535,12 +535,12 @@ guile> @kbd{(memq 4 ls)}
+ guile> @kbd{(if (memq 4 ls)
+            (display "hey, it's true!\n")
+            (display "dude, it's false\n"))}
+-       @print{hey, it's true!}
++       @print{} hey, it's true!
+        @result{}
+ guile> @kbd{(if (memq 12 ls)
+            (display "hey, it's true!\n")
+            (display "dude, it's false\n"))}
+-       @print{dude, it's false}
++       @print{} dude, it's false
+        @result{}
+ guile> @kbd{(memq 4 (reverse ls))}
+        @result{} (4 3 2 1)
+@@ -656,9 +656,9 @@ And then invoke it with
+ (represent-matrix m
+                   (lambda (x) (begin (display x) (display " ")))
+                   (lambda (l) (begin (display "\n"))))
+-@print{7 2 1 3 2 8 5 3 6}
+-@print{4 1 1 1 3 8 9 8 1}
+-@print{5 5 4 8 1 8 2 2 4}
++@print{} 7 2 1 3 2 8 5 3 6
++@print{} 4 1 1 1 3 8 9 8 1
++@print{} 5 5 4 8 1 8 2 2 4
+ @end smalllisp
+ @cindex objects
diff --git a/debian/patches/0009-Fix-r5rs.texi-makeinfo-failure-by-applying-changes-f.patch b/debian/patches/0009-Fix-r5rs.texi-makeinfo-failure-by-applying-changes-f.patch
new file mode 100644 (file)
index 0000000..20ab14b
--- /dev/null
@@ -0,0 +1,63 @@
+From 662aacccb58d90e41547e4aae2bf19f5e174087d Mon Sep 17 00:00:00 2001
+From: Dimitri John Ledkov <xnox@ubuntu.com>
+Date: Sun, 9 Feb 2014 12:45:45 -0600
+Subject: Fix r5rs.texi makeinfo failure by applying changes from guile-2.0.
+
+[rlb@defaultvalue.org: adjust commit message.]
+
+Bug-Debian: http://bugs.debian.org/711029
+---
+ doc/r5rs/r5rs.texi | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/guile18/doc/r5rs/r5rs.texi b/guile18/doc/r5rs/r5rs.texi
+index 605a976..775c930 100644
+--- a/guile18/doc/r5rs/r5rs.texi
++++ b/guile18/doc/r5rs/r5rs.texi
+@@ -106,7 +106,6 @@
+ @author C. H@sc{ANSON} 
+ @author K. M. P@sc{ITMAN} 
+ @author M. W@sc{AND} 
+-@author 
+ @c  {\it Dedicated to the Memory of ALGOL 60}
+@@ -116,7 +115,7 @@
+-@unnumbered Summary
++@majorheading Summary
+ The report gives a defining description of the programming language
+@@ -4429,9 +4428,9 @@ all.
+ These procedures are part of every implementation that supports
+ @c %R4%%
+ general
+-real numbers; they compute the usual transcendental functions.  @samp{Log}
++real numbers; they compute the usual transcendental functions.  @samp{log}
+ computes the natural logarithm of @var{z} (not the base ten logarithm).
+-@samp{Asin}, @samp{acos}, and @samp{atan} compute arcsine (sin^-1),
++@samp{asin}, @samp{acos}, and @samp{atan} compute arcsine (sin^-1),
+ arccosine (cos^-1), and arctangent (tan^-1), respectively.
+ The two-argument variant of @samp{atan} computes @t{(angle
+ (make-rectangular @var{x} @var{y}))} (see below), even in implementations
+@@ -4446,7 +4445,7 @@ With log defined this way, the values of sin^-1 z, cos^-1 z,
+ and tan^-1 z are according to the following formulae:
+-@center sin^-1 z = -i log (i z + sqrt1 - z^2)
++@center sin^-1 z = -i log (i z + sqrt(1 - z^2))
+@@ -5988,7 +5987,7 @@ unspecified value.
+-Vectors are heterogenous structures whose elements are indexed
++Vectors are heterogeneous structures whose elements are indexed
+ by integers.  A vector typically occupies less space than a list
+ of the same length, and the average time required to access a randomly
+ chosen element is typically less for the vector than for the list.
diff --git a/debian/patches/0010-Fix-test-suite-failure-caused-by-formfeed-difference.patch b/debian/patches/0010-Fix-test-suite-failure-caused-by-formfeed-difference.patch
new file mode 100644 (file)
index 0000000..c0bf0ef
--- /dev/null
@@ -0,0 +1,33 @@
+From d484b576e960a216ec189b9ebe1967ee21a340f8 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@ubuntu.com>
+Date: Sun, 9 Feb 2014 12:58:24 -0600
+Subject: Fix test-suite failure caused by formfeed differences in texinfo 5.
+
+The version of makeinfo in texinfo 5.2 (at least) emits
+slightly-differently-formatted output that breaks
+ice-9/documentation.scm, and hence the test suite.  Later versions of
+Guile implement their own texinfo parsing and thus no longer rely on
+makeinfo for this, but this workaround is enough to fix the test suite
+for now.
+
+[rlb@defaultvalue.org: adjust commit message.]
+
+Closes: #711029
+Bug-Debian: http://bugs.debian.org/711029
+---
+ libguile/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/guile18/libguile/Makefile.am b/guile18/libguile/Makefile.am
+index 1299cf2..e2e8025 100644
+--- a/guile18/libguile/Makefile.am
++++ b/guile18/libguile/Makefile.am
+@@ -304,7 +304,7 @@ if HAVE_MAKEINFO
+ guile-procedures.txt: guile-procedures.texi
+       rm -f $@
+-      makeinfo --force -o $@ guile-procedures.texi || test -f $@
++      makeinfo --force --no-headers guile-procedures.texi | sed 's/\f  */\f/g' > $@
+ else
diff --git a/debian/patches/0011-Fix-incompatibility-with-automake-1.13-specify-seria.patch b/debian/patches/0011-Fix-incompatibility-with-automake-1.13-specify-seria.patch
new file mode 100644 (file)
index 0000000..d827111
--- /dev/null
@@ -0,0 +1,27 @@
+From 7c0b9a8633c802c014593f6975cb60cddb0624b1 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Sun, 9 Feb 2014 15:24:42 -0600
+Subject: Fix incompatibility with automake 1.13; specify serial-tests.
+
+As of automake 1.13, the default test harness changed to a newer one
+that's not compatible with Guile 1.8's current arrangement.  Specify
+serial-tests to select the old harness.
+
+https://lists.gnu.org/archive/html/bug-automake/2013-06/msg00018.html
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/guile18/configure.in b/guile18/configure.in
+index 9f23a4a..e894adc 100644
+--- a/guile18/configure.in
++++ b/guile18/configure.in
+@@ -41,7 +41,7 @@ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(GUILE-VERSION)
+-AM_INIT_AUTOMAKE([gnu no-define check-news -Wall -Wno-override])
++AM_INIT_AUTOMAKE([gnu no-define check-news serial-tests -Wall -Wno-override])
+ AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
+ AC_CONFIG_SRCDIR([GUILE-VERSION])
diff --git a/debian/patches/0012-remove-spurious-declarations-in-c-tokenize.lex.patch b/debian/patches/0012-remove-spurious-declarations-in-c-tokenize.lex.patch
new file mode 100644 (file)
index 0000000..5c56d9e
--- /dev/null
@@ -0,0 +1,60 @@
+From 57d98d6142d490332839ec261a2a4d01c31de4a4 Mon Sep 17 00:00:00 2001
+From: Andy Wingo <wingo@pobox.com>
+Date: Fri, 26 Mar 2010 13:20:00 +0100
+Subject: remove spurious declarations in c-tokenize.lex
+
+* libguile/c-tokenize.lex: Remove spurious declarations of flex-internal
+  functions, as their prototypes are changing in upstream flex.
+
+Origin: http://git.savannah.gnu.org/cgit/guile.git/commit/?id=83a7b43bf2bf445af9d2611252deaacb4de7095e
+Added-by: Rob Browning <rlb@defaultvalue.org>
+---
+ THANKS                  |  2 ++
+ libguile/c-tokenize.lex | 14 --------------
+ 2 files changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/guile18/THANKS b/guile18/THANKS
+index 48a105a..0a3e84e 100644
+--- a/guile18/THANKS
++++ b/guile18/THANKS
+@@ -74,6 +74,7 @@ For fixes or providing information which led to a fix:
+             Dan McMahill
+           Roger Mc Murtrie
+           Scott McPeak
++         Andrew Milkowski
+             Tim Mooney
+         Han-Wen Nienhuys
+             Jan Nieuwenhuizen
+@@ -86,6 +87,7 @@ For fixes or providing information which led to a fix:
+            Arno Peters
+           Ron Peterson
+           David Pirotte
++         Sergey Poznyakoff
+             Ken Raeburn
+         Andreas Rottmann
+            Hugh Sasse
+diff --git a/guile18/libguile/c-tokenize.lex b/guile18/libguile/c-tokenize.lex
+index 938a5d2..dc72257 100644
+--- a/guile18/libguile/c-tokenize.lex
++++ b/guile18/libguile/c-tokenize.lex
+@@ -24,20 +24,6 @@ INTQUAL             (l|L|ll|LL|lL|Ll|u|U)
+    an error for that. */
+ #define YY_NO_INPUT
+-int yylex(void);
+-
+-int yyget_lineno (void);
+-FILE *yyget_in (void);
+-FILE *yyget_out (void);
+-int yyget_leng (void);
+-char *yyget_text (void);
+-void yyset_lineno (int line_number);
+-void yyset_in (FILE * in_str);
+-void yyset_out (FILE * out_str);
+-int yyget_debug (void);
+-void yyset_debug (int  bdebug);
+-int yylex_destroy (void);
+- 
+ int filter_snarfage = 0;
+ int print = 1; 
diff --git a/debian/patches/0100-guile-config-link-static-libguile.a-for-lilypond.patch b/debian/patches/0100-guile-config-link-static-libguile.a-for-lilypond.patch
new file mode 100644 (file)
index 0000000..86e5227
--- /dev/null
@@ -0,0 +1,42 @@
+Description: Tweak guile-config to link with static libguile.a
+ This patch allows LilyPond to be built with an embedded static library
+ of guile-1.8 for Debian 9 "stretch" due to the removal of guile-1.8
+ from Debian and the incompatibility between the current LilyPond and
+ Guile 2.
+Author: Anthony Fok <foka@debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/746005
+Forwarded: not-needed
+Last-Update: 2017-01-23
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/guile18/guile-config/guile-config.in
++++ b/guile18/guile-config/guile-config.in
+@@ -155,6 +155,7 @@
+                        (string=? libdir "/usr/lib/"))
+                  ""
+                  (string-append "-L" (get-build-info 'libdir)))
++                 (string-append "-L" (getcwd) "/guile18/libguile/.libs")
+                "-lguile -lltdl"
+              (string-join other-flags)
+@@ -191,7 +192,7 @@
+     (if (not (string=? (get-build-info 'includedir) "/usr/include"))
+        (string-append "-I" (get-build-info 'includedir) " ")
+        " ")
+-    
++    (string-append "-I" (getcwd) "/guile18" " ")
+     (get-build-info 'CFLAGS)
+     "\n"
+     )))
+--- a/guile18/guile-config/Makefile.am
++++ b/guile18/guile-config/Makefile.am
+@@ -35,7 +35,7 @@
+ guile-config: guile-config.in ${top_builddir}/libguile/libpath.h
+       rm -f guile-config.tmp
+       sed < ${srcdir}/guile-config.in > guile-config.tmp \
+-          -e 's|@-bindir-@|${bindir}|' \
++          -e 's|@-bindir-@|${abs_top_builddir}/libguile|' \
+           -e s:@-GUILE_VERSION-@:${GUILE_VERSION}:
+       chmod +x guile-config.tmp
+       mv guile-config.tmp guile-config
diff --git a/debian/patches/0101-read_relocation_dir-in-lilypond_datadir-too.patch b/debian/patches/0101-read_relocation_dir-in-lilypond_datadir-too.patch
new file mode 100644 (file)
index 0000000..a7cb3f6
--- /dev/null
@@ -0,0 +1,23 @@
+Description: Read relocation dir under lilypond_datadir too
+ This allows loading /usr/share/lilypond/2.18.2/etc/relocate/guile.reloc
+ to set our own private GUILE_LOAD_PATH at startup.
+Author: Anthony Fok <foka@debian.org>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/746005
+Forwarded: not-needed
+Last-Update: 2017-01-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lily/relocate.cc
++++ b/lily/relocate.cc
+@@ -148,8 +148,10 @@
+   debug_output (_f ("Relocation: framework_prefix=%s", prefix));
+   sane_putenv ("INSTALLER_PREFIX", prefix, true);
++  sane_putenv ("LILYPOND_DATADIR", lilypond_datadir, true);
+   read_relocation_dir (prefix + "/etc/relocate/");
++  read_relocation_dir (lilypond_datadir + "/etc/relocate/");
+   string bindir = prefix + "/bin";
index f9a110576d81eef2a03bbb9ca3d64ff49fb0d90a..25f6388f1bce4562e63ccae71a36bdd4e769a3f5 100644 (file)
@@ -4,3 +4,17 @@ hurd_file_name_support
 more_debug_output_during_build
 use_cstring_and_ctype_includes
 use_debians_help2man
+# 0001-Change-guile-tut-to-guile-tut-1.8.patch
+0002-Handle-the-DFSG-package-split.patch
+0003-Fix-the-SRFI-60-copy-bit-documentation.patch
+0004-Define-_GNU_SOURCE-to-fix-the-GNU-kFreeBSD-build.patch
+0005-Don-t-access-uninitialised-memory-in-scm_to_sockaddr.patch
+0006-Make-sockets.test-more-robust.patch
+0007-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
+0008-Fix-problems-in-guile-tut.texi-that-cause-makeinfo-t.patch
+0009-Fix-r5rs.texi-makeinfo-failure-by-applying-changes-f.patch
+0010-Fix-test-suite-failure-caused-by-formfeed-difference.patch
+0011-Fix-incompatibility-with-automake-1.13-specify-seria.patch
+0012-remove-spurious-declarations-in-c-tokenize.lex.patch
+0100-guile-config-link-static-libguile.a-for-lilypond.patch
+0101-read_relocation_dir-in-lilypond_datadir-too.patch
index 55d5d16ef4728eff6a9da7a953aab05b78edde55..e528bbdfcc069d195c6304db755f963630017221 100755 (executable)
@@ -10,6 +10,7 @@ include VERSION
 export MAILADDRESS = lilypond@packages.debian.org
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
 CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
 ifneq (,$(filter $(DEB_HOST_ARCH), i386 kfreebsd-i386))
@@ -27,22 +28,88 @@ endif
 DOC_OPTIONS := WEB_TARGETS="offline"
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        DOC_OPTIONS := $(DOC_OPTIONS) CPU_COUNT=$(firstword $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
+       guile_make_args := -j$(firstword $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))))
 endif
 
+########################################################################
+# START: Definitions from the old guile-1.8 (1.8.8+1-10) package
+########################################################################
+
+# Make sure the build process doesn't touch the real HOME.
+export HOME := $(CURDIR)/no-trespassing
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifeq (alpha,$(shell dpkg-architecture -qDEB_HOST_ARCH))
+  # The -O2 option breaks make check on alpha right now.
+  guile_deb_cflags := -Os -g
+else ifeq (sh4,$(shell dpkg-architecture -qDEB_HOST_ARCH))
+  # Renesas SH(sh4) needs -mieee.  Without it, test-conversion fails.
+  # (Bug: 531378)
+  guile_deb_cflags := -O2 -g -mieee
+else
+  guile_deb_cflags := -O2 -g
+endif
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+       INSTALL_PROGRAM += -s
+endif
+
+guile_configure_args = \
+  --host=$(DEB_HOST_GNU_TYPE) \
+  --build=$(DEB_BUILD_GNU_TYPE) \
+  --with-threads=no \
+  --disable-error-on-warning \
+  --prefix=/usr
+
+ifeq (hurd-i386,$(shell dpkg-architecture -qDEB_HOST_ARCH))
+  guile_configure_args += LIBS=-lpthread
+endif
+
+########################################################################
+# END: Definitions from the old guile-1.8 (1.8.8+1-10) package
+########################################################################
+
+export PATH := $(CURDIR)/out/guile/usr/bin:$(PATH)
+export LD_LIBRARY_PATH := $(CURDIR)/out/guile/usr/lib:$(LD_LIBRARY_PATH)
+export GUILE_LOAD_PATH := $(CURDIR)/out/guile/usr/share/guile/1.8
+export LILYPOND_VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
+
+%.reloc: %.reloc.in
+       sed < $< > $@ \
+               -e 's!@LILYPOND_VERSION@!$(LILYPOND_VERSION)!g'
+
+%.sh: %.sh.in
+       sed < $< > $@ \
+               -e 's!@DEB_HOST_MULTIARCH@!$(DEB_HOST_MULTIARCH)!g' \
+               -e 's!@LILYPOND_VERSION@!$(LILYPOND_VERSION)!g'
+
 %:
        dh $@ --parallel --with autotools-dev --with python2 --with quilt
 
 ## we need to nuke the parser files, because if there is a mismatch
 ## between upstreams bison and our bison, the build will fail epically
 override_dh_auto_configure:
+       $(eval unexport GUILE_LOAD_PATH)
+       cd guile18 && ./autogen.sh
+       cd guile18 && CFLAGS="$(guile_deb_cflags)" ./configure ${guile_configure_args}
+       cd guile18 && $(MAKE) ${guile_make_args}
+       $(MAKE) -C guile18 install DESTDIR=$(CURDIR)/out/guile
        rm -f lily/out/parser.*
-       dh_auto_configure -- --disable-checking --enable-debugging $(config_opt)
+       GUILE_LOAD_PATH=$(GUILE_LOAD_PATH) \
+               dh_auto_configure -- --disable-checking --enable-debugging $(config_opt)
 
 override_dh_auto_build-indep:
        dh_auto_build
        $(MAKE) doc $(DOC_OPTIONS)
 
-override_dh_auto_install-indep:
+override_dh_auto_install-indep: debian/guile.reloc
        $(MAKE) install-doc $(DOC_OPTIONS) prefix=$(CURDIR)/debian/tmp/usr/
        $(MAKE) install-info $(DOC_OPTIONS) prefix=$(CURDIR)/debian/tmp/usr
        rm -rf $(CURDIR)/debian/tmp/usr/share/omf
@@ -56,14 +123,18 @@ override_dh_auto_install-indep:
 ## directly. They also don't provide an install rule which doesn't
 ## install the documentation, which we don't care about for the
 ## architecture dependent build
-override_dh_auto_install-arch:
+override_dh_auto_install-arch: debian/lilypond.sh debian/lilypond-invoke-editor.sh
        for dir in `echo */*makefile|xargs -n 1 dirname|grep -v Documentation`; do \
                $(MAKE) --no-builtin-rules PACKAGE=LILYPOND package=lilypond -C $$dir install $(DOC_OPTIONS) prefix=$(CURDIR)/debian/tmp/usr/; \
        done
+       sed -i -e '1s!$(CURDIR)/out/guile/usr/bin/guile!/usr/bin/guile!' \
+               debian/tmp/usr/bin/lilypond-invoke-editor
 
 ## we need to nuke the parser files, because if there is a mismatch
 ## between upstreams bison and our bison, the build will fail epically
 override_dh_auto_clean:
+       rm -rf no-trespassing
+       -$(MAKE) -C guile18 maintainer-clean
        rm -f lily/out/parser.*
        dh_auto_clean --no-parallel
 
@@ -104,6 +175,10 @@ override_dh_installdocs:
                install -m0644 $$a debian/$$package/usr/share/doc-base/$$package; \
        done
 
+override_dh_shlibdeps:
+       $(eval unexport LD_LIBRARY_PATH)
+       dh_shlibdeps -lusr/lib/$(DEB_HOST_MULTIARCH)/lilypond/$(LILYPOND_VERSION)/guile
+
 override_dh_auto_test:
 ifneq (,$(filter $(DEB_BUILD_OPTIONS),nocheck))
        $(MAKE) test-baseline