lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upgrading from 2.6 to 2.8


From: Daniel Johnson
Subject: Re: Upgrading from 2.6 to 2.8
Date: Fri, 07 Apr 2006 15:43:45 -0700
User-agent: Thunderbird 1.5 (Windows/20051201)

Here's how to get Lilypond 2.8.1 installed from source in Gentoo... it isn't hard. This includes installing a patched version of Ghostscript 8.53 (which under Gentoo supports the hl1250 printer driver in addition to the standard drivers).

1. make sure PORTDIR_OVERLAY is declared in /etc/make.conf (point it to /usr/local/portage)
2. echo "media-sound/lilypond ~x86" >> /etc/portage/package.keywords
3. echo "app-text/ghostscript-afpl ~x86" >> /etc/portage/package.keywords
4. mkdir -p /usr/local/portage/media-sound/lilypond; cd /usr/local/portage/media-sound/lilypond 5. cp /usr/portage/media-sound/lilypond/lilypond-2.8.0-r1.ebuild ./lilypond-2.8.1.ebuild
6. ebuild lilypond-2.8.1.ebuild digest
7. mkdir -p /usr/local/portage/app-text/ghostscript-afpl/files
8. cp /usr/portage/app-text/ghostscript-afpl/files/*.{patch,mak,diff} /usr/local/portage/app-text/ghostscript-afpl/files 9. copy ghostscript-8.53-global-glyph-names.patch (attached to this email) to /usr/local/portage/app-text/ghostscript-afpl/files (this patch prevents ghostscript from creating PDF's that are about ten times too large)
10. cd /usr/local/portage/app-text/ghostscript-afpl
11. copy ghostscript-afpl-8.53-r5.ebuild (attached to this email) to /usr/local/portage/app-text/ghostscript-afpl
12. ebuild ghostscript-afpl-8.53-r5.ebuild digest
13. if you have ghostscript-esp or ghostscript-gnu installed, uninstall them (e.g. emerge -C ghostscript-esp)*
13. emerge --oneshot --ask --verbose =app-text/ghostscript-afpl-8.53-r5
14. emerge --ask --verbose =media-sound/lilypond-2.8.1

If you want to use the 2.9 branch, do the same as above, but using a different-version filename for the lilypond ebuild. Also, in your Portage overlay, you'll want to copy the guile-1.6.7 ebuild from /usr/portage/dev-util/guile to guile-1.8.0 in your $PORTDIR_OVERLAY, comment out all the patches in the ebuild, do ebuild guile-1.8.0.ebuild digest, and then emerge guile. There is currently a Gentoo bugzilla request for an official guile-1.8.0 ebuild.

The advantage of this system is that you know exactly what software is being invoked, since there is only one copy of python, guile, ghostscript, etc. on your system. This makes troubleshooting easier. The disadvantage is that you are re-doing what the developers already spent plenty of time doing.

--Daniel

P.S. Pango 1.12.x is currently hard-masked in Portage. If you are not running a Gnome system and are willing to do a bit of dirty work, you can unmask it and install it (and a host of supporting libraries). It will give you the benefit of being able to take advantage of OpenType support for ligatures.

* If you think you may need to revert your ghostscript install, you may want to create a binary package before unmerging. If you have gentoolkit installed, you can do the following:
   quickpkg ghostscript-esp
Then if you need to re-emerge that same verion, you can do
   emerge --usepkg ghostscript-esp
and you can thereby skip the compile step.

Kress, Stephen wrote:

Hello, all.

I post this with the hopes that it will prove helpful to someone.

I run on a Gentoo Linux system (thanks to whoever picked up the maintenance for the lilypond ebuild! When will I see 2.8.1, btw?) and ran into a simple issue that took a while to work out.

Back in the 2.6/2.7 days, I had used the package installer for lilypond (the Gentoo ebuild only handled 2.7 and I wasn't ready for that).

When it was time to move to 2.8, I did "package remove lilypond" which worked fine. I then tried both emerging of 2.8.0 and using the install script for 2.8.1. Both worked fine until I tried a simple "lilypond myfile.ly". This produced an error when converting from ps to pdf. The command being used was "gs-nox" and it was producing a strange error about init.ps or something like that having a version mismatch.

To make a long story short, I needed to do "package remove ghostscript" (I already had an appropriate version emerged using Gentoo's stuff) before my problem cleared up. Installing lilypond 2.6 with the package installer also installed a version of ghostscript (which turned out not to be compatable with 2.8) along with it and removing lilypond dit not remove ghostscript. I need to check if guile also has the same issue...

So, if you are on Linux and move from 2.6 to 2.8, make sure your ghostscript (and probably guile) installation is up-to-date.

Stephen


# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 
/var/cvsroot/gentoo-x86/app-text/ghostscript-afpl/ghostscript-afpl-8.53-r5.ebuild,v
 1.1 2006/04/04 21:40:00 genstef Exp $

inherit eutils

DESCRIPTION="AFPL Ghostscript"
HOMEPAGE="http://www.cs.wisc.edu/~ghost/";

CUPS_PV=1.1.23
MY_P=ghostscript-${PV}
PVM=${PV%.[0-9]}
SRC_URI="mirror://sourceforge/ghostscript/${MY_P}.tar.gz
        cups? ( mirror://gentoo/cups-${CUPS_PV}-source.tar.bz2 )
        cjk? ( 
http://www.matsusaka-u.ac.jp/mirror/gs-cjk/adobe-cmaps-200204.tar.gz
                
http://www.matsusaka-u.ac.jp/mirror/gs-cjk/acro5-cmaps-2001.tar.gz )
        mirror://gentoo/gdevhl12.c.gz
        
http://dev.gentoo.org/~genstef/files/dist/ghostscript-afpl-8.53-krgb.patch.bz2";

LICENSE="Aladdin"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="X cups cjk emacs gtk jpeg2k"


DEP="virtual/libc
        >=media-libs/jpeg-6b
        >=media-libs/libpng-1.2.5
        >=sys-libs/zlib-1.1.4
        >=media-libs/tiff-3.7
        X? ( || ( x11-libs/libXt virtual/x11 ) )
        gtk? ( >=x11-libs/gtk+-2.0 )
        cups? ( >=net-print/cups-1.1.20 )
        jpeg2k? ( media-libs/jasper )
        !app-text/ghostscript-esp
        !app-text/ghostscript-gnu"

RDEPEND="${DEP}
        cjk? ( media-fonts/arphicfonts
                media-fonts/kochi-substitute
                media-fonts/baekmuk-fonts )
        media-fonts/gnu-gs-fonts-std"

DEPEND="${DEP}
        gtk? ( dev-util/pkgconfig )"

S=${WORKDIR}/${MY_P}

src_unpack() {
        unpack ${A/adobe-cmaps-200204.tar.gz acro5-cmaps-2001.tar.gz}
        epatch ${FILESDIR}/ghostscript-${PV}-global-glyph-names.patch
        # cups support
        if use cups; then
                cp -r cups-${CUPS_PV}/pstoraster ${S}
                cd ${S}/pstoraster
                sed -e 's:@prefix@:/usr:' -e 's:@exec_prefix@:${prefix}:' -e \
                        's:@bindir@:${exec_prefix}/bin:' -e 's:@GS@:gs:' \
                        pstopxl.in > pstopxl || die "pstopxlsed failed"
                sed -i -e 's:OUTPUTFILE="%stdout" $profile $6$:\0 -:' \
                        -e 's:/usr/local:/usr:' pstoraster || die 
"pstorastersed failed"
                sed -i -e "s:pstopcl6:pstopxl:" cups.mak || die "cupssed failed"
                cd ..
                epatch ${FILESDIR}/gdevcups.patch
        fi

        # enable cfax device (bug #56704)
        sed -i -e 's:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev 
$(DD)faxg4.dev:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev 
$(DD)cfax.dev:' ${S}/Makefile.in || die "sed failed"
        cd ${S}
        epatch "${FILESDIR}"/gs852-lib.patch
        # see bug #111537
        use amd64 || epatch "${FILESDIR}"/rinkj.patch
        # krgb, bug
        epatch ${WORKDIR}/${P}-krgb.patch

        # 
http://www.linuxprinting.org/download/printing/ghostscript-8.x/drivers/hl1250
        cp ${WORKDIR}/gdevhl12.c ${S}/src/gdevhl12.c || die
        cat ${FILESDIR}/gdevhl12-hl1250.mak >> ${S}/src/contrib.mak || die
        sed 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \
                -i "${S}"/Makefile.in "${S}"/src/Makefile.in  || die
        sed -i "s:#if 1:#if 0:" "${S}"/src/gdevhl12.c || die

        # bug 121383 - gxccman.c assertion failed
        epatch ${FILESDIR}/${PN}-8.53-assertionfailed.patch

        epatch 
/usr/portage/app-text/ghostscript-esp/files/ghostscript-gtk2.patch
        if ! use gtk; then
                sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
                sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed 
failed"
        fi

        # search path fix
        sed -i -e 
"s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
                Makefile.in || die "sed failed"
        sed -i -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
                Makefile.in || die "sed failed"
        sed -i -e 
"s:\$(gsdatadir)/Resource:/usr/share/ghostscript/${PVM}/Resource:" \
                Makefile.in || die "sed failed"

        # #128650, #128645
        epatch ${FILESDIR}/${P}-ps2epsi-afpl.diff
}

src_compile() {
        local myconf
        myconf="--with-ijs --with-jbig2dec"

        econf $(use_with X x) \
                $(use_with jpeg2k jasper) \
                ${myconf} || die "econf failed"

        if use cups; then
                echo 'include pstoraster/cups.mak' >> Makefile
                sed -i -e 's:DEVICE_DEVS17=:DEVICE_DEVS17=$(DD)cups.dev:' 
Makefile || die "sed failed"
                sed -i -e 's:EXTRALIBS=\(.*\):EXTRALIBS=\1 -lcups -lcupsimage:' 
Makefile || die "sed failed"
        fi
        emake -j1 || die "make failed"
        emake so -j1 || die "make failed"

        cd ijs
        ./autogen.sh
        econf || die "econf failed"
        emake -j1 || die "make failed"
        cd ..
}

src_install() {
        einstall D=/ install_prefix=${D} soinstall

        rm -fr ${D}/usr/share/ghostscript/${PVM}/doc || die
        dodoc doc/README
        dohtml doc/*.html doc/*.htm

        if use emacs; then
                insinto /usr/share/emacs/site-lisp
                doins doc/gsdoc.el
        fi

        if use cjk; then
                dodir /usr/share/ghostscript/Resource
                dodir /usr/share/ghostscript/Resource/Font
                dodir /usr/share/ghostscript/Resource/CIDFont
                cd ${D}/usr/share/ghostscript/Resource
                unpack adobe-cmaps-200204.tar.gz
                unpack acro5-cmaps-2001.tar.gz
        fi

        # install ijs
        cd ${S}/ijs
        make DESTDIR="${D}" install || die "ijs install failed"
}
diff -Naur ghostscript-8.53.old/src/gdevpdtt.c ghostscript-8.53/src/gdevpdtt.c
--- ghostscript-8.53.old/src/gdevpdtt.c 2006-03-28 09:32:02.000000000 -0800
+++ ghostscript-8.53/src/gdevpdtt.c     2006-03-28 09:39:24.000000000 -0800
@@ -1308,6 +1308,7 @@
     gs_char ch;
     gs_const_string gname;
     gs_glyph *gid = (gs_glyph *)pstr->data; /* pdf_text_process allocs enough 
space. */
+    bool unknown = false;
 
     /* Translate glyph name indices into gscencs.c indices. */
     for (i = 0; i < pstr->size; i++) {
@@ -1316,9 +1317,14 @@
        if (code < 0)
            return code;
        gid[i] = gs_c_name_glyph(gname.data, gname.size);
-       if (gid[i] == GS_NO_GLYPH)
-           return_error(gs_error_rangecheck);
+       if (gid[i] == GS_NO_GLYPH) {
+           /* Use global glyph name. */
+           gid[i] = gdata[i];
+           unknown = true;
+       }
     }
+    if (unknown)
+       return 0; /* Using global glyph names. */
 
     /* Find an acceptable encodng. */
     for (ei = 0; gs_c_known_encodings[ei]; ei++) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]