]> git.donarmstrong.com Git - lilypond.git/blobdiff - cygwin/mknetrel
(code): add plus glyph.
[lilypond.git] / cygwin / mknetrel
index 49954d4f5f73bbfd5eff1c47e85e18a8d3a8f3e5..41587c5b9e1c6f2436c7cd2a58ac3884342790a9 100644 (file)
@@ -43,7 +43,42 @@ done
 
 
 needdevoflags () {
-    return 1
+    false
+}
+
+fix_libtool_script () {
+    cd $build || exit 1
+
+    # Fix libtool's -rpath detection
+    export CC="${build_cc}"
+    export CXX="${build_cxx}"
+    export DLLTOOL=${build_dlltool}
+    export OBJDUMP=${build_objdump}
+    export AS="${build_as}"
+    export HOST_CC=/usr/bin/gcc
+    export allow_undefined="yes"
+    export allow_undefined_flag=""
+    
+    # fix libtool's dlltool usage
+    mv libtool libtool.orig
+    sed -e 's/^DLLTOOL="dlltool"/DLLTOOL="i686-cygwin-dlltool"/' \
+        -e 's/^DLLTOOL=/HOST_CC=gcc\nDLLTOOL=/' \
+        -e 's/^HOST_CC=/SED=sed\nHOST_CC=/' < libtool.orig > libtool
+    chmod +x libtool
+}
+
+fix_libtool_la () {
+    # fix libtool's .la dependency_libs output for dlopen
+    for i in $inst/lib $inst/$prefix/lib ]; do
+       if [ -d $i ]; then
+           cd $i || exit 1
+           for j in $(ls -1 *la); do
+               mv $j .libtool-$j
+               sed -e 's/ *-L *[^ ][^ ]*//g' .libtool-$j > $j
+               chmod +x $j
+           done
+       fi
+    done
 }
 
 preconfig () {
@@ -54,31 +89,32 @@ preconfig () {
     # for cross-compiling LilyPond, fake a guile-config
     if ! iscygwin; then
        cd $build || exit 1
-       GUILE=1.6.4
-       cat > guile-config <<EOF
-[ "\$1" == "--version" ] && echo "guile-config - Guile version $GUILE"
+       GUILE=1.6.5
+       cat > i686-cygwin-guile-config <<EOF
+[ "\$1" == "--version" ] && echo "i686-cygwin-guile-config - Guile version $GUILE"
 [ "\$1" == "compile" ] && echo "-I$cygwin_root/usr/include"
 [ "\$1" == "link" ] && echo "-L$cygwin_root/usr/lib -lguile"
 exit 0
 EOF
-       chmod 755 guile-config
+       chmod 755 i686-cygwin-guile-config
        PATH=$(pwd):$PATH
+       export PKG_CONFIG_PATH=$cygwin_root/usr/lib/pkgconfig
+       export PKG_CONFIG="pkg-config \
+--define-variable prefix=$cygwin_root \
+--define-variable includedir=$cygwin_root/usr/include"
     fi
 }
 
 postconfig () {
+    # fix_libtool_script
+
     # cross-compiling: configure for build-host
     if ! iscygwin; then
        rm -f config.cache
        export HOST_CC=gcc
        export HOST_CXX=g++
-       if [ "$ABI" = "1.3" ]; then
-           HOST_CC=gcc-2.95
-           HOST_CXX=g++-2.95
-           (cd $src && ln -s GNUmakefile.in GNUmakefile)
-       fi
        (PATH="$old_path" \
-           PATH="$HOME/usr/pkg/guile-1.6/bin:$PATH" \
+           PATH="$HOME/usr/pkg/guile/bin:$PATH" \
            CFLAGS="-O2 -g" \
            CC=$HOST_CC \
            CXX=$HOST_CXX \
@@ -101,12 +137,15 @@ prebuild () {
        
        mkdir -p mf/out
        cp -pv mf/out-for-build/* mf/out
+
+       mkdir -p Documentation/user/out
+       cp -pv Documentation/user/out-for-build/*{tely,texi} Documentation/user/out
     fi
 
     # set LDFLAGS to find the python library
     # EXTRABUILDARGS="LDFLAGS=$cygwin_root/usr/bin/libpython2.3.dll"
 
-    addmakeflags LDFLAGS="$cygwin_root/usr/bin/libpython2.3.dll" ' ' "target=i686-pc-cygwin" ' '
+    addmakeflags LDFLAGS="$cygwin_root/usr/bin/libpython2.4.dll" ' ' "target=i686-pc-cygwin" ' '
 
     if iscygwin; then
        # EXTRABUILDARGS="$EXTRABUILDARGS all doc web"
@@ -129,6 +168,7 @@ preinstall () {
 
 postinstall () {
     fixdoc
+    fix_libtool_la
     
     mkdir -p $inst-doc/$docprefix
     cd $build || exit 1
@@ -152,7 +192,7 @@ postinstall () {
     cygwin=cygwin
     cd $src || exit 1
     install -d -m755 $inst/$cygdocdir
-    install -m644 $cygwin/changelog $inst/$cygdocdir/changelog.Cygwin
+    install -m644 $cygwin/changelog $inst/$packagedocdir/changelog.Cygwin
 
     cd $build || exit 1
     install -m644 $cygwin/out/README $inst/$packagedocdir/README.Cygwin
@@ -166,4 +206,7 @@ postinstall () {
 
     #cd $inst-doc/$packagedocdir &&
     #ln -s $(find html/Documentation -name '*.ps.gz') .
+
+    install -d -m755 $inst-doc/$infodir/lilypond
+    cd $inst-doc/$infodir/lilypond && ln -sf ../../doc/$base-$ver/Documentation/user/out-www/*png .
 }