On 20/02/15 15:42, Corinna Vinschen wrote:
unfortunately it turns out that our guile (and lilypond) maintainer has
left us, so the packages are orphaned.  Jan's last version of guile was
1.8.7-2 for 32 bit.

Does anybody have fun to take over maintainership of guile or lilypond?

First, let me say that I have no intention of maintaining lilypond - I am aware that even replying to this e-mail puts me in danger of acquiring another couple of packages ;-) I absolutely love lilypond and would like it to stay within Cygwin if at all possible, but I don't have the time right now to take on a package that is going to be a little problematic.

I had a go at building lilypond for x86_64 about 18 months ago, but didn't get very far. I managed to produce an executable, but 'make doc' and 'make check' both failed, so I didn't have any confidence in the binary produced. My need for a working lilypond exceeded the tinkering time available, so I just used Fedora.

I've tidied up the cygport file this evening, and this (along with a small patch) is attached. Hopefully this will be a starting point for a prospective maintainer with the time to do it justice.

Dave.

# lilypond.cygport
NAME="lilypond"
VERSION=2.19.15
RELEASE=1
SUMMARY="A typesetting system for music notation."
DESCRIPTION="LilyPond is an automated music engraving system. It formats music 
beautifully and automatically, and has a friendly syntax for its input files."
CATEGORY="Interpreters"

MAJOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 1)"
MINOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 2)"


#############################################################################
# Patches. These are as follows:
#
#   - 2.18.2-dos-to-posix.patch - Use cygwin_conv_path() instead of
#     cygwin_conv_to_posix_path().
PATCH_URI="
        2.18.2-dos-to-posix.patch
"
#############################################################################


HOMEPAGE="http://www.lilypond.org/";
SRC_URI="http://download.linuxaudio.org/${PN}/sources/v${MAJOR_VERSION}.${MINOR_VERSION}/${P}.tar.gz";
DIFF_EXCLUDES="configure"


#############################################################################
# This cygport file produces two packages, the main 'lilypond' package and
# 'lilypond-doc' which contains the documentation.
PKG_NAMES="lilypond lilypond-doc"
#############################################################################


#############################################################################
# The main 'lilypond' package contains everything except the HTML
# documentation.
lilypond_CONTENTS="--exclude=html usr"
lilypond_SUMMARY="${SUMMARY}"
lilypond_DESCRIPTION="${DESCRIPTION}"
lilypond_CATEGORY="Interpreters"
#############################################################################


#############################################################################
# The 'lilypond-doc' package.
lilypond_doc_CONTENTS="usr/share/doc/lilypond/html"
lilypond_doc_SUMMARY="HTML documentation for LilyPond."
lilypond_doc_DESCRIPTION="${DESCRIPTION} This package contains the HTML 
documentation for LilyPond."
lilypond_doc_CATEGORY="Doc"
#############################################################################


src_compile() {
        cd "${S}"
        ./autogen.sh --noconfigure
        cd "${B}"
        "${S}/configure" --prefix=/usr --exec-prefix=/usr \
                --with-ncsb-dir=/usr/share/ghostscript/fonts

        # lilypond doesn't compile with parallel builds.
        MAKEOPTS+=" -j 1"

        # The code in the python directory won't compile out of the box, as
        # it needs '-lpython', and the makefile doesn't link against this
        # library. So we build this first, explicitly specifying the python
        # libraries. Once this is built, we can build the rest of the
        # lilypond code.
        cd "${B}/python"
        cygmake LDFLAGS="$(python-config --libs)"
        cd "${B}"
        cygmake

        # Make the lilypond documentation.
        cygmake doc
}


src_install() {
        local vimdir=/usr/share/vim/vim74
        mkdir -p "${D}${vimdir}"

        cd "${B}"
        make install DESTDIR="${D}" vimdir="${vimdir}"

        # Symlink lilypond-init.el in emacs' site-start.d directory
        cd "${D}/usr/share/emacs/site-lisp"
        mkdir site-start.d
        ln -s ../lilypond-init.el site-start.d
}
--- origsrc/lilypond-2.18.2/flower/file-name.cc	2014-03-17 15:29:16.000000000 +0000
+++ src/lilypond-2.18.2/flower/file-name.cc	2015-02-20 19:49:29.762829900 +0000
@@ -53,13 +53,14 @@ using namespace std;
 static string
 dos_to_posix (const string &file_name)
 {
-  char buf[PATH_MAX] = "";
-  char s[PATH_MAX] = {0};
-  file_name.copy (s, PATH_MAX - 1);
-  /* ugh: char const* argument gets modified.  */
-  int fail = cygwin_conv_to_posix_path (s, buf);
-  if (!fail)
-    return buf;
+  const char* const win32 = file_name.c_str();
+  const ssize_t size = cygwin_conv_path(CCP_WIN_W_TO_POSIX | CCP_RELATIVE, win32, NULL, 0);
+  if (size >= 0)
+  {
+    std::vector<char> posix(size, '\0');
+    if (!cygwin_conv_path(CCP_WIN_W_TO_POSIX | CCP_RELATIVE, win32, &posix[0], size))
+      return std::string(&posix[0], size);
+  }
   return file_name;
 }
 #endif /* __CYGWIN__ */
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to