summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-sound/mup/ChangeLog8
-rw-r--r--media-sound/mup/Manifest19
-rw-r--r--media-sound/mup/files/digest-mup-5.12
-rw-r--r--media-sound/mup/files/mup-5.1css.patch242
-rw-r--r--media-sound/mup/mup-5.1.ebuild85
5 files changed, 342 insertions, 14 deletions
diff --git a/media-sound/mup/ChangeLog b/media-sound/mup/ChangeLog
index 4cfa3795dab3..142de5891553 100644
--- a/media-sound/mup/ChangeLog
+++ b/media-sound/mup/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/mup
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/mup/ChangeLog,v 1.15 2005/08/24 07:48:41 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mup/ChangeLog,v 1.16 2005/10/05 21:28:48 matsuu Exp $
+
+*mup-5.1 (05 Oct 2005)
+
+ 05 Oct 2005; MATSUU Takuto <matsuu@gentoo.org> +files/mup-5.1css.patch,
+ +mup-5.1.ebuild:
+ Version bumped. Bug 18636.
24 Aug 2005; Diego Pettenò <flameeyes@gentoo.org> mup-5.0.ebuild:
Just chown root if you need to make setuid a binary, the group can be
diff --git a/media-sound/mup/Manifest b/media-sound/mup/Manifest
index 1a928e94445e..dc8df2c09d9e 100644
--- a/media-sound/mup/Manifest
+++ b/media-sound/mup/Manifest
@@ -1,20 +1,13 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 4071a2541100bf388bd92a561ebe0577 ChangeLog 1932
+MD5 b38f2b90f45c35b80a3a93fcbf340d29 mup-5.1.ebuild 2114
+MD5 948103f2005dce62a32f289b0981a282 mup-5.0.ebuild 2119
MD5 2aa7f964e840bea93ea0ceb418be50ed mup-4.4.ebuild 2103
+MD5 4071a2541100bf388bd92a561ebe0577 ChangeLog 1932
MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
-MD5 948103f2005dce62a32f289b0981a282 mup-5.0.ebuild 2119
MD5 41c3b17508896d4f8d030ffa37446b2a mup-4.6.ebuild 2134
MD5 234ec2d99e4c992ccc12fa76de885a0e files/5.0-beaming-bug.patch 928
-MD5 54c05300dd4879fbf61504bc145fc1ef files/digest-mup-4.6 120
+MD5 af5a1af06445e7d8e07f574d0c40c3c6 files/mup-5.1css.patch 7807
MD5 d73a9c5effa0eb340ee9eb4b799e32b8 files/4.6-gcc.patch 272
MD5 3cdff463ef32c2e7b16982e0db999cfa files/digest-mup-4.4 120
+MD5 54c05300dd4879fbf61504bc145fc1ef files/digest-mup-4.6 120
MD5 631bd9db6b998acd073dbeae3e9cc0b8 files/digest-mup-5.0 120
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFDDCZuj5H05b2HAEkRAnscAJ9KLNvUY+VZLvgsdkTEbFrkpsIYlgCfdTzb
-avAkQ9G7VnxqUuLIQN6T61A=
-=ELg8
------END PGP SIGNATURE-----
+MD5 f4346f0c55847eeae7adeb14cce4f6c4 files/digest-mup-5.1 120
diff --git a/media-sound/mup/files/digest-mup-5.1 b/media-sound/mup/files/digest-mup-5.1
new file mode 100644
index 000000000000..b2acb5c58616
--- /dev/null
+++ b/media-sound/mup/files/digest-mup-5.1
@@ -0,0 +1,2 @@
+MD5 be9657f88d1811cac222f16a23aee4f2 mup51src.tar.gz 816673
+MD5 e3f4ddf4b3eca298f3c8685817d5458e mup51doc.tar.gz 667966
diff --git a/media-sound/mup/files/mup-5.1css.patch b/media-sound/mup/files/mup-5.1css.patch
new file mode 100644
index 000000000000..ed6bed2916c6
--- /dev/null
+++ b/media-sound/mup/files/mup-5.1css.patch
@@ -0,0 +1,242 @@
+diff -ur mup-5.1-orig/mup/absvert.c mup-5.1/mup/absvert.c
+--- mup-5.1-orig/mup/absvert.c 2005-05-01 01:00:29.000000000 +0200
++++ mup-5.1/mup/absvert.c 2005-05-31 09:19:23.000000000 +0200
+@@ -1661,14 +1661,14 @@
+ horzavoid();
+
+ /*
+- * Back in relvert.c, we skipped placing phrases whose endpoint groups
+- * were affected by CSS. Now that we know where the final group
+- * boundaries are, we set up the coords for these phrases.
+- * phrase_points destroys groups' AN and AS, and depends on them
+- * starting out as zero. So zero them now and restore them later.
+- * Because phrases can cross bar lines, we need to zap all of these
+- * coords in this first loop, and have a separate loop below to do the
+- * phrase work (and restore the groups' coords).
++ * Back in relvert.c, we skipped placing tie/slur/bend/phrases whose
++ * endpoint groups were affected by CSS. Now that we know where the
++ * final group boundaries are, we set up the coords for these items.
++ * tieslur_points and phrase_points destroy groups' AN and AS, and
++ * depends on them starting out as zero. So zero them now and restore
++ * them later. Because these items can cross bar lines, we need
++ * to zap all of these coords in this first loop, and have a separate
++ * loop to do the main work (and restore the groups' coords).
+ */
+ for (mainll_p = Mainllhc_p; mainll_p != 0; mainll_p = mainll_p->next) {
+ if (mainll_p->str != S_STAFF) {
+@@ -1692,29 +1692,57 @@
+ thisstaff_p = mainll_p->u.staff_p;
+
+ /*
+- * Find every phrase starting in this staff and handle them.
++ * Find and handle every tie/slur/bend/phrase starting in this
++ * staff.
+ */
+ for (stuff_p = thisstaff_p->stuff_p;
+ stuff_p != 0; stuff_p = stuff_p->next) {
+- if (stuff_p->stuff_type != ST_PHRASE) {
+- continue;
+- }
+- if (css_affects_phrase(stuff_p, mainll_p) == YES) {
+- phrase_points(mainll_p, stuff_p);
++ switch (stuff_p->stuff_type) {
++ case ST_PHRASE:
++ if (css_affects_phrase(stuff_p,
++ mainll_p) == YES) {
++ phrase_points(mainll_p, stuff_p);
++
++ stuff_p->c[AY] = thisstaff_p->c[AY]
++ + stuff_p->c[RY];
++ stuff_p->c[AN] = thisstaff_p->c[AY]
++ + stuff_p->c[RN];
++ stuff_p->c[AS] = thisstaff_p->c[AY]
++ + stuff_p->c[RS];
++
++ /* do the phrase points too */
++ for (pp_p = stuff_p->crvlist_p;
++ pp_p != 0; pp_p = pp_p->next) {
++
++ pp_p->y += thisstaff_p->c[AY];
++ }
++ }
++ break;
++ case ST_TIESLUR:
++ case ST_BEND:
++ if (css_affects_tieslurbend(stuff_p,
++ mainll_p) == YES) {
++ if (stuff_p->stuff_type == ST_TIESLUR) {
++ tieslur_points(mainll_p, stuff_p);
++ } else {
++ bend_points(mainll_p, stuff_p);
++ }
+
+- stuff_p->c[AY] = thisstaff_p->c[AY]
+- + stuff_p->c[RY];
+- stuff_p->c[AN] = thisstaff_p->c[AY]
+- + stuff_p->c[RN];
+- stuff_p->c[AS] = thisstaff_p->c[AY]
+- + stuff_p->c[RS];
+-
+- /* do the phrase points too */
+- for (pp_p = stuff_p->crvlist_p;
+- pp_p != 0; pp_p = pp_p->next) {
++ stuff_p->c[AY] = thisstaff_p->c[AY]
++ + stuff_p->c[RY];
++ stuff_p->c[AN] = thisstaff_p->c[AY]
++ + stuff_p->c[RN];
++ stuff_p->c[AS] = thisstaff_p->c[AY]
++ + stuff_p->c[RS];
++
++ /* do the tie/slur/bend points too */
++ for (pp_p = stuff_p->crvlist_p;
++ pp_p != 0; pp_p = pp_p->next) {
+
+- pp_p->y += thisstaff_p->c[AY];
++ pp_p->y += thisstaff_p->c[AY];
++ }
+ }
++ break;
+ }
+ }
+
+diff -ur mup-5.1-orig/mup/globals.h mup-5.1/mup/globals.h
+--- mup-5.1-orig/mup/globals.h 2005-05-01 01:00:29.000000000 +0200
++++ mup-5.1/mup/globals.h 2005-05-31 09:19:23.000000000 +0200
+@@ -568,6 +568,8 @@
+ extern double solvecubic P((double a, double b, double c, double d,
+ double lo, double hi, double thresh));
+ extern int css_affects_stemtip P((struct GRPSYL *gs1_p));
++extern int css_affects_tieslurbend P((struct STUFF *stuff_p,
++ struct MAINLL *mll_p));
+ extern int css_affects_phrase P((struct STUFF *stuff_p, struct MAINLL *mll_p));
+ extern struct GRPSYL *nextsimilar P((struct GRPSYL *));
+ extern struct GRPSYL *prevsimilar P((struct GRPSYL *));
+diff -ur mup-5.1-orig/mup/plutils.c mup-5.1/mup/plutils.c
+--- mup-5.1-orig/mup/plutils.c 2005-05-01 01:00:29.000000000 +0200
++++ mup-5.1/mup/plutils.c 2005-05-31 09:19:23.000000000 +0200
+@@ -1853,6 +1853,95 @@
+ }
+
+ /*
++ * Name: css_affects_tieslurbend()
++ *
++ * Abstract: Do CSS notes (if any) affect the position of this tie/slur/bend?
++ *
++ * Returns: YES or NO
++ *
++ * Description: This function decides whether the given tie, slur, or bend is
++ * affected by CSS notes in any of the groups it covers.
++ */
++
++int
++css_affects_tieslurbend(stuff_p, mll_p)
++
++struct STUFF *stuff_p; /* the tie, slur, or bend */
++struct MAINLL *mll_p; /* MLL item where this tie/slur/bend starts */
++
++{
++ struct GRPSYL *sg_p; /* starting group of the tie/slur/bend */
++ struct GRPSYL *eg_p; /* starting group of the tie/slur/bend */
++ struct NOTE *snote_p; /* starting note of the tie/slur/bend */
++ struct NOTE *enote_p; /* ending note of the tie/slur/bend */
++ int idx; /* index of note in the group */
++
++
++ /* if not cross staff stemming, don't waste time checking */
++ if (CSSused == NO) {
++ return (NO);
++ }
++
++ sg_p = stuff_p->beggrp_p;
++ snote_p = stuff_p->begnote_p;
++
++ /* find the index of the note in the group */
++ for (idx = 0; idx < sg_p->nnotes; idx++) {
++ if (&sg_p->notelist[idx] == snote_p) {
++ break;
++ }
++ }
++ if (idx == sg_p->nnotes) {
++ pfatal("can't find tied/slurred/bent note in group");
++ }
++
++ /* if this starting note is CSS, return YES */
++ if (IS_CSS_NOTE(sg_p, idx)) {
++ return (YES);
++ }
++
++ /*
++ * Find the end note of the tie/slur/bend. If none, we don't care
++ * about the end note.
++ */
++ eg_p = nextgrpsyl(sg_p, &mll_p);
++ if (eg_p == 0) {
++ return (NO);
++ }
++
++ /* find the note tied/slurred/bent to */
++ if (stuff_p->curveno == -1) { /* this is a tie */
++ enote_p = find_matching_note(eg_p, snote_p->letter,
++ snote_p->octave, (char *)0);
++ } else { /* this is a slur or bend */
++ enote_p = find_matching_note(eg_p,
++ snote_p->slurtolist[stuff_p->curveno].letter,
++ snote_p->slurtolist[stuff_p->curveno].octave,
++ (char *)0);
++ }
++
++ if (enote_p == 0) {
++ return (NO);
++ }
++
++ /* find the index of the note in the group */
++ for (idx = 0; idx < eg_p->nnotes; idx++) {
++ if (&eg_p->notelist[idx] == enote_p) {
++ break;
++ }
++ }
++ if (idx == eg_p->nnotes) {
++ pfatal("can't find tied/slurred/bent-to note in group");
++ }
++
++ /* if this ending note is CSS, return YES */
++ if (IS_CSS_NOTE(eg_p, idx)) {
++ return (YES);
++ }
++
++ return (NO);
++}
++/*
+ * Name: css_affects_phrase()
+ *
+ * Abstract: Do CSS notes (if any) affect the position of this phrase mark?
+diff -ur mup-5.1-orig/mup/relvert.c mup-5.1/mup/relvert.c
+--- mup-5.1-orig/mup/relvert.c 2005-05-01 01:00:29.000000000 +0200
++++ mup-5.1/mup/relvert.c 2005-05-31 09:19:23.000000000 +0200
+@@ -1000,12 +1000,26 @@
+ if (place == PL_ABOVE) {
+ switch (stuff_p->stuff_type) {
+ case ST_TIESLUR:
++ /* don't call tieslur_points now if the
++ * positions of the tie/slur's endpoints
++ * would change later due to CSS */
++ if (css_affects_tieslurbend(stuff_p,
++ mainll_p) == YES) {
++ break;
++ }
+ tieslur_points(mainll_p, stuff_p);
+ break;
+ case ST_TABSLUR:
+ tabslur_points(mainll_p, stuff_p);
+ break;
+ case ST_BEND:
++ /* don't call bend_points now if the
++ * positions of the bend's endpoints
++ * would change later due to CSS */
++ if (css_affects_tieslurbend(stuff_p,
++ mainll_p) == YES) {
++ break;
++ }
+ bend_points(mainll_p, stuff_p);
+ break;
+ case ST_PHRASE:
diff --git a/media-sound/mup/mup-5.1.ebuild b/media-sound/mup/mup-5.1.ebuild
new file mode 100644
index 000000000000..a78572f6df22
--- /dev/null
+++ b/media-sound/mup/mup-5.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mup/mup-5.1.ebuild,v 1.1 2005/10/05 21:28:48 matsuu Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Program for printing music scores"
+HOMEPAGE="http://www.arkkra.com/"
+SRC_URI="ftp://ftp.arkkra.com/pub/unix/mup${PV//.}src.tar.gz
+ ftp://ftp.arkkra.com/pub/unix/mup${PV//.}doc.tar.gz"
+
+LICENSE="Arkkra"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="X svga"
+
+RDEPEND="X? ( virtual/x11 )
+ svga? ( >=media-libs/svgalib-1.4.3 )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}css.patch
+}
+
+src_compile() {
+ local param
+
+ cd ${S}/mup
+ echo $(tc-getCC) ${CFLAGS} -o mup *.c -lm
+ $(tc-getCC) ${CFLAGS} -o mup *.c -lm || die "mup compile failed"
+
+ cd ${S}/mkmupfnt
+ echo $(tc-getCC) ${CFLAGS} -o mkmupfnt *.c
+ $(tc-getCC) ${CFLAGS} -o mkmupfnt *.c || die "mkmupfnt compile failed"
+
+ if use X || use svga ; then
+ cd ${S}/mupdisp
+ if use X ; then
+ param="-lX11 -L/usr/X11R6/lib"
+ else
+ sed -i '/XWINDOW/s:.*::' dispttyp.h
+ fi
+ if use svga ; then
+ param="${param} -lvga"
+ else
+ param="${param} -DNO_VGA_LIB"
+ fi
+ echo $(tc-getCC) ${CFLAGS} -o mupdisp *.c -lm ${param}
+ $(tc-getCC) ${CFLAGS} -o mupdisp *.c -lm ${param} || die "mupdisp compile failed"
+ fi
+}
+
+src_install() {
+ dobin mup/mup mkmupfnt/mkmupfnt mupprnt || die
+ if use X || use svga ; then
+ dobin mupdisp/mupdisp || die
+ fi
+
+ dodoc license.txt README0
+ cd docs
+ dodoc *.txt README1
+ doman mup.1 mkmupfnt.1 mupprnt.1
+ if use X || use svga ; then
+ doman mupdisp.1
+ fi
+ dohtml uguide/*
+ docinto sample
+ dodoc *.mup *.ps
+}
+
+pkg_postinst() {
+ if use svga ; then
+ einfo "Please note that using mupdisp in SVGA mode on the console"
+ einfo "requires that it can write to the console device. To allow"
+ einfo "this, make mupdisp setuid to root, like this:"
+ einfo
+ einfo "\tchown root /usr/bin/mupdisp"
+ einfo "\tchmod u+s /usr/bin/mupdisp"
+ fi
+ if use X || use svga ; then
+ echo
+ einfo "If you want to use mupdisp, make sure you also install ghostscript."
+ fi
+}