Author Topic: lilypond - walk through, example... I hope. DOH! Not.  (Read 1816 times)

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
lilypond - walk through, example... I hope. DOH! Not.
« on: November 13, 2009, 03:37:34 PM »
This won't be quick, this won't be easy, but if I succeed, I hope it will be an example, of what to do, or what not to do, depending on how it turns out, so stay tuned.  All updates from me will be added to this initial post, not as a reply.

Latest Source:
http://download.linuxaudio.org/lilypond/sources/v2.12/lilypond-2.12.2.tar.gz
PCLinuxOS src.rpm:
ftp://ibiblio.org/pub/linux/distributions/pclinuxos/apt/pclinuxos/2007/SRPMS.extra/lilypond-2.11.33-2pclos2007.src.rpm

Code: [Select]
Executing(%prep): /bin/sh -e /home/joe/src/tmp/rpm-tmp.88521
+ umask 022
+ cd /home/joe/src/rpm/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/joe/src/rpm/BUILD
+ rm -rf lilypond-2.12.2
+ /usr/bin/gzip -dc /home/joe/src/rpm/SOURCES/lilypond-2.12.2.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd lilypond-2.12.2
+ echo 'Patch #2 (lilypond-2.8.6-tex-use-utf8.patch):'
Patch #2 (lilypond-2.8.6-tex-use-utf8.patch):
+ patch -p1 -b --suffix .utf8 -s
The text leading up to this was:
--------------------------
|--- lilypond-2.8.6/tex/lilyponddefs.tex.utf8   2005-04-02 18:28:17.000000000 +0200
|+++ lilypond-2.8.6/tex/lilyponddefs.tex        2005-07-27 01:50:31.000000000 +0200
--------------------------
File to patch:

Seen that before, recently too.  Soon as I solve it, will post back.

Hoping that the latest source is compatible with our current setup, I removed the patches, they would probably have to be redone anyway.
Code: [Select]
checking whether compiler understands -pipe... ./configure: line 3709: syntax error near unexpected token `newline'
./configure: line 3709: `yes:'
Soon as I solve that, I will post back.  (Looking at the spec file from maik)
OK, after reviewing my current spec file, and the one from maik, I have decided to download the src.rpm maik linked to.  This will take a while.
Code: [Select]
error: Could not open %files file /home/joe/src/rpm/BUILD/lilypond-2.12.2/lilypond.lang: No such file or directory

Fix the error(s) and try again
Odd.
Code: [Select]
Executing(%prep): /bin/sh -e /home/joe/src/tmp/rpm-tmp.2710
.....
+ exit 0
So far so good.
Code: [Select]
checking whether compiler understands -pipe... ./configure: line 3709: syntax error near unexpected token `newline' Same Error, even with the new src.rpm and it's current patches.  Will report back when I get past this.

Finally found something:
http://osdir.com/ml/bug-lilypond-gnu/2009-08/msg00007.html
Will be trying out that fix.
Ouch, well the configure in the source looks right, according to that site, so is autoconf rewriting it in the build?  Hmm.
I commented autoconf out of the spec file, and now it's moving right along, I hope it's doing something useful.
Code: [Select]
relocate.cc:279: error: invalid conversion from ‘const char*’ to ‘char*’
make[1]: *** [out/relocate.o] Error 1
DOH!

------------------------
gseaman got a newer version built, so I'm not killing myself over this one.  End of Project.... End of Thread.   :P
« Last Edit: November 16, 2009, 12:29:35 PM by libJoble.so.4 »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3731
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: lilypond - walk through, example... I hope.
« Reply #1 on: November 13, 2009, 04:16:38 PM »
and i hope, i learn more about it  ::)
I express to you the thumb

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: lilypond - walk through, example... I hope.
« Reply #2 on: November 13, 2009, 04:29:07 PM »
More info?


Offline maik3531

  • Full Member
  • ***
  • Posts: 129
Re: lilypond - walk through, example... I hope.
« Reply #3 on: November 13, 2009, 05:40:06 PM »
With sources of ftp://ftp.uni-bayreuth.de/pub/linux/Mandrakelinux/official/2010.0/SRPMS/contrib/release/lilypond-2.12.2-3mdv2009.1.src.rpm and this spec

Code: [Select]
# Turn off debuginfo package
%define _enable_debug_packages %{nil}
%define debug_package %{nil}

# Taken from pango spec
%define biarchs_32 %{ix86}
%define biarchs_64 x86_64
%define query_modules_suffix %{nil}
%ifarch %{biarchs_32}
%define query_modules_suffix -32
%endif
%ifarch %{biarchs_64}
%define query_modules_suffix -64
%endif
%define query_modules pango-querymodules%{query_modules_suffix}

Name:           lilypond
Version:        2.12.2
Release:        %mkrel 1
Summary:        Program for printing sheet music
Summary(de):    Programm für das Drucken von Noten
License:        GPL
Group:          Publishing
URL:            http://www.lilypond.org/
#Source0:       http://lilypond.org/download/sources/v2.9/lilypond-%{version}.tar.gz
Source0:        http://lilypond.org/download/sources/v2.11/%{name}-%{version}.tar.gz
#Source1:        %{name}.bash-completion
Source2: http://download.linuxaudio.org/lilypond/binaries/documentation/%{name}-%{version}-1.documentation.tar.bz2
# (Abel) use locale-independency date as document timestamp
#Patch2:         lilypond-2.8.6-tex-use-utf8.patch
Patch2: lilypond-2.21.2-gcc44-relocate.patch
Patch3:         lilypond-2.6.3-locale-indep-date.patch
# (Abel) use ImageMagick to replace netpbm -- pnmtopng segfault
# and I'm too lazy to look into the problem
Patch4:         lilypond-2.6.4-use-imagemagick.patch
Patch5: lilypond-2.12.2-fix-string-format.patch
Suggests: %{name}-doc = %{version}
Requires(post): ec-fonts-mftraced
Requires(post): rpm-helper
Requires(preun): rpm-helper
Requires(post): findutils
Requires(post): tetex
Requires(postun): tetex
# (Abel) bib2html or bibtex2html -- pick either one
BuildRequires:  bib2html
BuildRequires:  bison
BuildRequires:  ec-fonts-mftraced
BuildRequires:  flex
BuildRequires:  fontforge
BuildRequires:  gettext-devel
BuildRequires:  ghostscript
BuildRequires:  groff-for-man
BuildRequires:  gtk2-devel
BuildRequires:  guile-devel >= 1.8.1
BuildRequires:  mftrace
BuildRequires:  python-devel
BuildRequires:  tetex-devel
BuildRequires:  texinfo
BuildRequires:  info-install
BuildRequires:  zip
BuildRequires:  ImageMagick
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
LilyPond is a music typesetter.  It produces beautiful sheet music using a
high level description file as input.  LilyPond is part of the GNU project.
 
LilyPond is split into two packages.  The package "lilypond" provides the
core package, containing the utilities for converting the music source
(.ly) files into printable output.  The package "lilypond-doc"
provides the full documentation, example .ly files for various features and
the Mutopia project files (musical equivalent of the Gutenberg project - see
http://www.mutopiaproject.org for details).
 
If you are new to lilypond, you will almost certainly want to install the
"lilypond-doc" package and take a look at tutorials under
%{_docdir}/lilypond-doc.

%description -l de
Die Inspiration zu LilyPond kam, als zwei befreundete Musiker sich über die fade und
langweilig aussehenden Computerausdrucke von Noten ärgerten. Jeder Musiker möchte schöne
Musik lesen, warum also können wir Programmierer dieses Problem nicht lösen? LilyPond
macht genau das: Hiermit kann ohne große Probleme Musik gedruckt werden, die den Traditionen
des klassischen Notensatzes entspricht. Man muss seine Zeit nicht damit verschwenden, die
Abstände anzupassen, Vorzeichen umzugruppieren oder Bögen zu verändern. Der Notensatz von
LilyPond wird Freunde und Kollegen durch seinen scharfen Druck beeindrucken. LilyPond ist
in zwei Pakete aufgeteilt. Das Paket „lilypond“ enthält das Kernpaket, die Dienstprogramme
zum Konvertieren von Musik Quelldateien (.LY) in druckbare Ausgabe enthält. Das Paket „lilypond-DOC“
bietet die vollständige Dokumentation, Beispiel .LY Dateien für verschiedene Funktionen und
die Mutopia Projektdateien (Musical Äquivalent des Gutenberg Projekts - siehe
http://www.mutopiaproject.org Einzelheiten). Wenn Sie Anfangen lilypond zu erkunden,
sollten Sie das Paket „lilypond-DOC“ installieren und die Lernprogramme unter
/usr/share/doc/lilypond betrachten. Deutsches Forum unter http://www.lilypondforum.de

%package doc
Summary:        LilyPond documentation, examples and Mutopia files
Summary(de):    LilyPond Dokumentation, Beispiele und Mutopia Dateien
Group:          Publishing
Obsoletes:      %{name}-manual
Provides:       %{name}-manual
Requires(post): scrollkeeper
Requires(postun): scrollkeeper

%description doc
The documentation of LilyPond, both in HTML and PostScript, along with
example input files and the files from the Mutopia project. If you
want to try the examples or score files from Mutopia project, please
also install LilyPond main package.

%description -l de doc
LilyPond-Dokumentation im HTML-, PS- und DVI-Format
Dieses Paket enthält die HTML-, PostScript- und DVI-Dokumentation für die LilyPond-Software.

%prep
%setup -q
%patch3 -p1 -b .date
%patch4 -p1 -b .netpbm
%patch5 -p0

%{__perl} -pi -e 's/1\.6\.7/1.6/' configure.in
#%{__autoconf}

mkdir -p %{name}-documentation-%{version}
cd %{name}-documentation-%{version}
bunzip2 -dcq %SOURCE2 | tar -xf -
cd -

%build

GCC_VERSION=`gcc --version | awk 'NR == 1 {print $3}'`
if echo $GCC_VERSION | grep ^4 > /dev/null; then
   export CC=gcc-$GCC_VERSION
else
   echo "Need GCC 4 to build"
   exit 1
fi

export CC=gcc-$GCC_VERSION

# build environment untrustworthy
#
%{_bindir}/%query_modules > pango.modules
echo "[Pango]" > pangorc
echo "ModuleFiles = `pwd`/pango.modules" >> pangorc
export PANGO_RC_FILE=`pwd`/pangorc

# build timestamp in HTML can be affected by locale
# (not necessary after applying date patch)
#
#export LC_TIME=C
%{configure2_5x} --enable-gui
%{make}

# Doesn't work out of the box for this version.
#%{make} web
%install
%{__rm} -rf %{buildroot}
%{makeinstall_std}

# web doc
#
# Doesn't work out of the box for this version.
#%{__make} out=www web-install DESTDIR=%{buildroot}

# move emacs file to our location
#
%{__install} -D -m 644 elisp/lilypond-init.el %{buildroot}%{_sysconfdir}/emacs/site-start.d/lilypond-init.el

#
# move vim stuff to our location
#
%{__mv} %{buildroot}%{_datadir}/lilypond/%{version}/vim %{buildroot}%{_datadir}/vim

#
# some more house cleaning
#
%{_bindir}/find %{buildroot} -path '*%{_datadir}/lilypond/%{version}/fonts' -prune -type f -o -name 'fonts.cache-1' -print0 | %{_bindir}/xargs -r -0 %{__rm}
%{_bindir}/find %{buildroot}%{_docdir} -name '*.png' -empty -print0 | %{_bindir}/xargs -r -0 %{__rm}
%{_bindir}/find %{buildroot}%{_datadir}/lilypond/%{version} -xtype l -print0 | %{_bindir}/xargs -r -0 %{__rm}

#
# Create symlinks to lilypond folder under TeX directory, so that TeX can
# use lilypond files natively, courtesy of Michael Brown's great hacks
# Necessary for tex backend to work, since startup profile is gone -- Abel
#
%{__mkdir_p} %{buildroot}%{_datadir}/texmf/dvips \
         %{buildroot}%{_datadir}/texmf/tex \
         %{buildroot}%{_datadir}/texmf/fonts/source \
         %{buildroot}%{_datadir}/texmf/fonts/tfm
pushd %{buildroot}%{_datadir}/texmf > /dev/null
%{__ln_s} ../../lilypond/%{version}/ps dvips/lilypond
%{__ln_s} ../../lilypond/%{version}/tex tex/lilypond
%{__ln_s} ../../../lilypond/%{version}/fonts/source fonts/source/lilypond
%{__ln_s} ../../../lilypond/%{version}/fonts/tfm fonts/tfm/lilypond
popd > /dev/null

%{find_lang} %{name}

mkdir -p %{buildroot}%_sysconfdir/X11/fontpath.d/
ln -s ../../..%_datadir/lilypond/%{version}/fonts/type1 \
    %{buildroot}%_sysconfdir/X11/fontpath.d/lilypond:pri=50

%clean
%{__rm} -rf %{buildroot}

%post
%_install_info lilypond.info
%_install_info lilypond-internals.info
%_install_info lilypond-learning.info
%_install_info lilypond-program.info
%_install_info music-glossary.info

%{_bindir}/find /var/lib/texmf \( -name 'feta*.pk' -or -name 'feta*.tfm' -or -name 'parmesan*.pk' -or -name 'parmesan*.tfm' \) -print0 | %{_bindir}/xargs -r -0 %{__rm} -f

%{_bindir}/mktexlsr > /dev/null

%{_bindir}/mkfontdir %{_datadir}/lilypond/%{version}/fonts/type1

%preun
%_remove_install_info lilypond.info
%_remove_install_info lilypond-learning.info
%_remove_install_info lilypond-internals.info
%_remove_install_info lilypond-program.info
%_remove_install_info music-glossary.info

%{__rm} -f %{_datadir}/lilypond/%{version}/fonts/type1/fonts.dir

%postun
%{_bindir}/mktexlsr > /dev/null

%post doc
%update_scrollkeeper

%postun doc
%clean_scrollkeeper

%files -f %{name}.lang
%defattr(-, root, root)
%doc COPYING README.txt DEDICATION NEWS.txt AUTHORS.txt THANKS
%{_bindir}/*
%{_datadir}/emacs/site-lisp/lilypond*
%{_datadir}/%{name}
%{_datadir}/texmf/dvips/lilypond
%{_datadir}/texmf/fonts/source/lilypond
%{_datadir}/texmf/fonts/tfm/lilypond
%{_datadir}/texmf/tex/lilypond
%{_datadir}/vim/*/*
%{_libdir}/%{name}
%{_mandir}/man?/*
%{_infodir}/*.info*
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*
%{_sysconfdir}/X11/fontpath.d/lilypond:pri=50

%files doc
%defattr(-, root, root)
%doc %{name}-documentation-%{version}/*
%{_datadir}/omf/%{name}

Code: [Select]
...snip...
config.status: creating config.hh

WARNING: Please consider installing optional programs:  texi2html >= 1.79 (installed: 1.76)

ERROR: Please install required programs:  GUILE-with-rational-bugfix
...snip....

texi2html >= 1.79 (installed: 1.76)    So perhaps we must renew tetext...
with http://rpm.pbone.net/index.php3/stat/4/idpl/13002798/com/texi2html-1.82-2mdv2010.0.noarch.rpm.html it is not because it stands in conflict with tetex
Please excuse my English

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: lilypond - walk through, example... I hope.
« Reply #4 on: November 13, 2009, 06:11:39 PM »
I've built this on my system. I took out all of the patches. (I don't think any of them are needed anymore.) I built texi2html from source. I don't know with to do with the existing tetex-texi2html rpm. I put in the updated packages for texinfo, that allows it to build. I haven't submitted the texi2html or lilypond packages because I haven't figured out what to do with the lilypond-docs rpm. The source is 118mb and I don't think we need all of it, but I can't get it built correctly, and too be honest, I've been too busy to figure it out right now.

Galen

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: lilypond - walk through, example... I hope.
« Reply #5 on: November 13, 2009, 06:48:13 PM »
If you all have done this, then why is it not in the repo?   Congrats on your success, I guess.  Put up or shut up.  (that is not intended to be derogatory.  I really like you guys.)  Teach me.

Maik,  Latex/Tatex was just updated was it not?  I'm going to do what I can with this, and hope it ends with success.    Still, if not, sometimes it does go that way.
« Last Edit: November 13, 2009, 06:53:41 PM by libJoble.so.4 »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: lilypond - walk through, example... I hope.
« Reply #6 on: November 13, 2009, 07:48:56 PM »
(Don't put me in there with the regular's ;), I'm new at this.)

I've got a lilypond rpm that works, but I've haven't figured out what to do with texi2html and lilypond-docs, so I didn't want to send in an rpm with broken dependencies. I'll have to solve this and send it in, since others are waiting on it.

Galen

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: lilypond - walk through, example... I hope.
« Reply #7 on: November 13, 2009, 08:19:06 PM »
Galen, it's not like that at all.  Just if you got this, then I will move on to the next project is all.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: lilypond - walk through, example... I hope.
« Reply #8 on: November 13, 2009, 11:33:05 PM »
Ok, I'll take another look at it. I didn't announce that I was working on it because I didn't want to discourage the experts from packaging this if they were interested. I'm not being humble, there are just a lot of interactions between programs that I just don't know much about. If I can't figure it out in the next couple of days, I'll post questions to get it sorted.

The only thing I could teach you is the music created with lilypond. ;D

Galen

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: lilypond - walk through, example... I hope.
« Reply #9 on: November 13, 2009, 11:38:28 PM »
Only two things I can say.  If you get it done, I will be very happy for you. and very relieved for me.   ;)  Good luck.
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: lilypond - walk through, example... I hope.
« Reply #10 on: November 15, 2009, 10:02:19 PM »
Summary:

I have the lilypond source rpm working. The source rpm builds the lilypond rpm and lilypond-doc rpm. The lilypond rpm works perfectly. The lilypond doc rpm is 140mb and installs to 400mb. The package includes html and pdf's in several languages. The information is available at lilypond.org. There may not even be anyone needing lilypond-doc. I don't see using up that much space on the server for a package that nobody needs.

My plan:

Change the source rpm to just build lilypond. Save the info needed so that if anyone requests lilypond-doc, try to trim it a little, and create a second src.rpm.

Galen

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3731
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: lilypond - walk through, example... I hope.
« Reply #11 on: November 16, 2009, 02:43:00 AM »
I think,
Quote
and create a second src.rpm.
that's a good idea...
My 2 cents... ;)

Offline Joble

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6804
  • USA - Mountain Time
Re: lilypond - walk through, example... I hope.
« Reply #12 on: November 16, 2009, 06:44:23 AM »
That's good news, I worked all weekend trying to get 2.12 working on mine, no luck so far.

gseaman got a newer version built, so I'm not killing myself over this one.  End of Project.... End of Thread.   :P

WhewHew!

PS:  That's the last time I try to build a package that is requested by a PACKAGER!  What a nightmare!
« Last Edit: November 16, 2009, 06:44:10 PM by Joble »
Search First.
Forum Rules
Hero means I talk a lot, nothing more, nothing less!
Have an Awesome Day!
Healthy System