On Tue, Jul 18, 2006, Thomas Bushnell BSG wrote:
> So, let me make plain: I am entirely happy to accept a workaround
> patch for lilypond's current upstream stable release that will make it
> build and use python 2.4 even when that is not installed as "python".
> If such a functional patch appears and is mailed to the appropriate
> lilypond bug, it would immediately become a high priority matter for
> me to upload it.  I have wanted to do so for months.

 Here's a patch (which I couldn't test, see below).

 Please note that while writing this patch, I saw that:
 - "make install" is called with prefix=debian/tmp/..., this is usually
   wrong, DESTDIR= should be used instead because prefix is a runtime
   path;  this can cause important bugs such as #337616
 - you don't call dh_python; dh_python will typically create
   ${python:Depends} which will have "python2.4" if your scripts start
   with /usr/bin/python2.4
 - your package is not bin NMU safe due to = source-version dependencies
   on an arch: all package
 - your package fails to build in my pbuilder:
rm -f ./out/accidental-placement.dep; 
DEPENDENCIES_OUTPUT="./out/accidental-placement.dep 
./out/accidental-placement.o" g++ -c   -DHAVE_CONFIG_H  -DNDEBUG 
-DSTRING_UTILS_INLINED -Iinclude -I./out -I../flower/include -I../flower/./out 
-I../flower/include -DNDEBUG -I/usr/include/python2.3  -O2 -finline-functions 
-g -pipe  -I/usr/include/pango-1.0 -I/usr/include/freetype2 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -I/usr/include/freetype2 
      -DNDEBUG -I/usr/include/python2.3  -O2 -finline-functions -g -pipe  
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include    -I/usr/include/freetype2   -W -Wall -Wconversion 
 -o out/accidental-placement.o accidental-placement.cc
include/accidental-interface.hh:24: error: extra qualification 
'Accidental_interface::' on member 'accurate_boxes'
make[2]: *** [out/accidental-placement.o] Error 1
make[2]: Leaving directory `/tmp/buildd/lilypond-2.6.3/lily'

 This is all *very* broken.

 Beside, the configure script uses:
    STEPMAKE_PYTHON(REQUIRED, 2.1)
 which either means that you don't really need python 2.4, or that the
 configure test is broken.

-- 
Loïc Minier <[EMAIL PROTECTED]>
--- lilypond-2.6.3/debian/changelog
+++ lilypond-2.6.3/debian/changelog
@@ -1,3 +1,14 @@
+lilypond (2.6.3-11) UNRELEASED; urgency=low
+
+  * Call configure and $(MAKE) with PYTHON=/usr/bin/python2.4 by exporting
+    PYTHON from debian/rules.
+  * Update build-deps and deps to use python2.4 instead of the default python
+    version.
+  * Fix the shebang of scripts in /usr/bin to use /usr/bin/python2.4 instead
+    of /usr/bin/python.
+
+ -- Loic Minier <[EMAIL PROTECTED]>  Fri, 21 Jul 2006 16:07:50 +0200
+
 lilypond (2.6.3-10) unstable; urgency=low
 
   * debian/control (Build-Depends): Drop explicit dependency on
--- lilypond-2.6.3/debian/control
+++ lilypond-2.6.3/debian/control
@@ -1,5 +1,5 @@
 Source: lilypond
-Build-Depends: debhelper (>= 4.0.0), python-dev, guile-1.6-dev (>= 1.6.7), 
flex (>= 2.5.4a-14) | flex-old, bison (<< 1:1.50) | bison (>> 1:1.75-1), 
texinfo (>= 4.6-1), groff, m4, gettext (>= 0.10.36-1), mftrace (>= 1.1.17-1), 
fontforge (>= 0.0.20050911-1), pkg-config (>= 0.9.0), libfreetype6-dev, 
libpango1.0-dev, libfontconfig-dev
+Build-Depends: debhelper (>= 4.0.0), python2.4-dev, guile-1.6-dev (>= 1.6.7), 
flex (>= 2.5.4a-14) | flex-old, bison (<< 1:1.50) | bison (>> 1:1.75-1), 
texinfo (>= 4.6-1), groff, m4, gettext (>= 0.10.36-1), mftrace (>= 1.1.17-1), 
fontforge (>= 0.0.20050911-1), pkg-config (>= 0.9.0), libfreetype6-dev, 
libpango1.0-dev, libfontconfig-dev
 Build-Depends-Indep: gs-gpl (>= 8.01-5) | gs-esp | gs (<= 7.07-1), netpbm (>= 
2:9.10-1), imagemagick, emacs-intl-fonts, xfonts-intl-arabic, 
xfonts-intl-asian, xfonts-intl-chinese, xfonts-intl-chinese-big, 
xfonts-intl-european, xfonts-intl-japanese, xfonts-intl-japanese-big, 
xfonts-intl-phonetic, ttf-kochi-gothic, ttf-kochi-mincho
 Build-Conflicts-Indep: gs-afpl | gs-gpl (= 8.01-1), gs-gpl (= 8.01-2), gs-gpl 
(= 8.01-3), gs-gpl (= 8.01-4) 
 Section: tex
@@ -11,7 +11,7 @@
 Architecture: any
 Replaces: lilypond1.3
 Provides: lilypond1.3
-Depends: ${shlibs:Depends}, python, guile-1.6 (>= 1.6.7), ${misc:Depends}, 
lilypond-data (= ${Source-Version})
+Depends: ${shlibs:Depends}, python2.4, guile-1.6 (>= 1.6.7), ${misc:Depends}, 
lilypond-data (= ${Source-Version})
 Recommends: lilypond-doc
 Description: A program for typesetting sheet music
  LilyPond is a music typesetter, an automated engraving system.  It
--- lilypond-2.6.3/debian/rules
+++ lilypond-2.6.3/debian/rules
@@ -37,6 +37,8 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
+export PYTHON=/usr/bin/python2.4
+
 build: build-stamp
 build-stamp:
        dh_testdir
@@ -90,6 +92,15 @@
        # Add here commands to install the package into debian/tmp.
        $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
 
+       # force Python runtime in shebang
+       sed -i '1s,#!.*python[^ ]*.*,#!/usr/bin/python2.4,' \
+               debian/tmp/usr/bin/convert-ly \
+               debian/tmp/usr/bin/lilypond-book \
+               debian/tmp/usr/bin/abc2ly \
+               debian/tmp/usr/bin/etf2ly \
+               debian/tmp/usr/bin/mup2ly \
+               debian/tmp/usr/bin/midi2ly
+
        # Remove a file that we get from other debian packages.
        rm $(CURDIR)/debian/tmp/usr/share/lilypond/$(VERSION)/tex/texinfo.tex
 

Reply via email to