From 1df80cb4a042fd3977c46e85d8b87dd88661e9b9 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Wed, 19 Dec 2018 07:55:35 +0100 Subject: [PATCH] Successful LilyPond build. This is a rebased and updated version of https://github.com/gperciva/gub/pull/7 condensed into a single commit. * *.make: Use $(GUB) and $(PYTHON) instead of `bin/gub' and `python', respectively. * bin/gib: Print help message if run without arguments. * bin/gub: Remove unnecessary lambda. * gub/dependency.py: Avoid TypeError: issubclass() arg 1 must be a class. * gcc.py, guile.py: Don't build info docs. * lilypond-doc.py, lilypond-test.py: Don't run `dblatex' regression tests. --- arbora.make | 4 ++-- bin/gib | 5 +++++ bin/gub | 2 +- denemo.make | 4 ++-- gub/dependency.py | 2 +- gub/specs/darwin/cross/gcc.py | 5 +++++ gub/specs/freebsd/cross/gcc.py | 4 ++++ gub/specs/guile.py | 6 +++++- gub/specs/lilypond-doc.py | 1 + gub/specs/lilypond-test.py | 1 + inkscape.make | 2 +- lilypond.make | 16 ++++++++-------- mingit.make | 2 +- openoffice.make | 2 +- schikkers-list.make | 4 ++-- 15 files changed, 40 insertions(+), 20 deletions(-) diff --git a/arbora.make b/arbora.make index 1754d77de..8b9250ba1 100644 --- a/arbora.make +++ b/arbora.make @@ -45,10 +45,10 @@ arbora-installers: $(foreach p, $(PLATFORMS), $(call INVOKE_INSTALLER_BUILDER,$(p)) $(INSTALL_PACKAGE) &&) true # nsis: - bin/gub tools::nsis + $(GUB) tools::nsis update-versions: - python gub/versiondb.py --no-sources --version-db=versiondb/arbora.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/arbora + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/arbora.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/arbora print-success: @echo "success!!" diff --git a/bin/gib b/bin/gib index 0a7ccf398..91d98b644 100755 --- a/bin/gib +++ b/bin/gib @@ -102,6 +102,11 @@ Examples: (options, args) = p.parse_args () + if not args: + gub_log.error ('error: nothing to do\n') + p.print_help () + sys.exit (2) + return (options, args) def check_installer (installer, options, args): diff --git a/bin/gub b/bin/gub index dd4b37630..261e7f901 100755 --- a/bin/gub +++ b/bin/gub @@ -280,7 +280,7 @@ def environment_sanity (settings): if os.path.exists (environment_file): environment = dict (pickle.loads (open (environment_file, 'rb').read ())) # expand any ~ in the PATH - os.environ['PATH'] = ":".join( map( lambda(x):os.path.expanduser(x), + os.environ['PATH'] = ":".join( map( os.path.expanduser, os.environ['PATH'].split(':'))) differ = [] for key in list (misc.uniq (sorted (environment.keys () diff --git a/denemo.make b/denemo.make index 605088146..b1343988b 100644 --- a/denemo.make +++ b/denemo.make @@ -52,10 +52,10 @@ denemo-installers: $(foreach p, $(PLATFORMS), $(call INVOKE_INSTALLER_BUILDER,$(p)) $(INSTALL_PACKAGE) &&) true # nsis: - bin/gub tools::nsis + $(GUB) tools::nsis update-versions: - python gub/versiondb.py --no-sources --version-db=versiondb/denemo.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/denemo + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/denemo.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/denemo print-success: @echo "success!!" diff --git a/gub/dependency.py b/gub/dependency.py index 6518102e9..3220d8ed3 100644 --- a/gub/dependency.py +++ b/gub/dependency.py @@ -35,7 +35,7 @@ def get_build_from_file (platform, file_name, name): and (not cls or issubclass (cls, target.AutoBuild))): cls = misc.most_significant_in_dict (module.__dict__, class_name.replace ('tools32', 'tools'), '__') if ((platform == 'tools' or platform == 'tools32') - and (issubclass (cls, target.AutoBuild) + and (not cls or issubclass (cls, target.AutoBuild) and not issubclass (cls, tools.AutoBuild) and not issubclass (cls, tools32.AutoBuild))): cls = None diff --git a/gub/specs/darwin/cross/gcc.py b/gub/specs/darwin/cross/gcc.py index a0c349b0c..bca7923e1 100644 --- a/gub/specs/darwin/cross/gcc.py +++ b/gub/specs/darwin/cross/gcc.py @@ -3,6 +3,7 @@ from gub.specs.cross import gcc as cross_gcc from gub import loggedos from gub import cross +from gub import misc class Gcc__darwin (cross_gcc.Gcc): dependencies = ['tools::gmp', 'tools::mpfr', 'tools::mpc', 'odcctools'] @@ -13,6 +14,10 @@ class Gcc__darwin (cross_gcc.Gcc): configure_flags = (cross_gcc.Gcc.configure_flags + ' --disable-libcilkrts' ) + configure_variables = (cross_gcc.Gcc.configure_variables + + misc.join_lines (''' +MAKEINFO=no +''')) def languages (self): # objective-c is used for quartz's Carbon/Carbon.h in pango, gtk+ return cross_gcc.Gcc.languages (self) + ['objc', 'obj-c++'] diff --git a/gub/specs/freebsd/cross/gcc.py b/gub/specs/freebsd/cross/gcc.py index 663a8bd30..4b25d3661 100644 --- a/gub/specs/freebsd/cross/gcc.py +++ b/gub/specs/freebsd/cross/gcc.py @@ -7,4 +7,8 @@ class Gcc__freebsd (cross_gcc.Gcc): --program-prefix=%(toolchain_prefix)s --disable-libcilkrts --disable-__cxa_atexit +''')) + configure_variables = (cross_gcc.Gcc.configure_variables + + misc.join_lines (''' +MAKEINFO=no ''')) diff --git a/gub/specs/guile.py b/gub/specs/guile.py index 13df25de3..4ec866189 100644 --- a/gub/specs/guile.py +++ b/gub/specs/guile.py @@ -24,6 +24,9 @@ class Guile (target.AutoBuild): --disable-error-on-warning --enable-relocation --enable-rpath +''') + guile_configure_variables = misc.join_lines (''' +have_makeinfo=no ''') configure_variables = (target.AutoBuild.configure_variables + misc.join_lines (''' @@ -50,7 +53,8 @@ class Guile (target.AutoBuild): # without setting the proper LD_LIBRARY_PATH. configure_command = ('GUILE_FOR_BUILD=%(tools_prefix)s/bin/guile ' + target.AutoBuild.configure_command - + guile_configure_flags) + + guile_configure_flags + + guile_configure_variables) compile_command = ('preinstguile=%(tools_prefix)s/bin/guile ' + target.AutoBuild.compile_command) subpackage_names = ['doc', 'devel', 'runtime', ''] diff --git a/gub/specs/lilypond-doc.py b/gub/specs/lilypond-doc.py index 10eefb2fc..4123130c4 100644 --- a/gub/specs/lilypond-doc.py +++ b/gub/specs/lilypond-doc.py @@ -49,6 +49,7 @@ def compile (self): WEB_TARGETS="offline online" TARGET_PYTHON=/usr/bin/python CPU_COUNT=%(cpu_count)s +MISSING_OPTIONAL=dblatex ''') compile_flags = lilypond.LilyPond_base.compile_flags + ' top-doc doc' install_flags = (' install-doc install-help2man' diff --git a/gub/specs/lilypond-test.py b/gub/specs/lilypond-test.py index 4edc90485..a07b3f4bc 100644 --- a/gub/specs/lilypond-test.py +++ b/gub/specs/lilypond-test.py @@ -23,6 +23,7 @@ def test_ball (self): return '%(uploads)s/lilypond-%(version)s-%(build_number)s.test-output.tar.bz2' make_flags = misc.join_lines (''' CPU_COUNT=%(cpu_count)s +MISSING_OPTIONAL=dblatex ''') compile_flags = lilypond.LilyPond_base.compile_flags + ' test' #return (lilypond.LilyPond_base.install_command diff --git a/inkscape.make b/inkscape.make index a20d44d44..debfc7e62 100644 --- a/inkscape.make +++ b/inkscape.make @@ -41,7 +41,7 @@ inkscape-installer: installers inkscape-installers: installers update-versions: - python gub/versiondb.py --no-sources --version-db=versiondb/inkscape.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/inkscape + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/inkscape.versions --download --platforms="mingw" --url=http://lilypond.org/blog/janneke/software/inkscape print-success: @echo installer: uploads/inkscape*$(BUILD_PLATFORM).sh diff --git a/lilypond.make b/lilypond.make index aa5b4fe56..fbc84e1f7 100644 --- a/lilypond.make +++ b/lilypond.make @@ -81,15 +81,15 @@ include compilers.make unlocked-update-versions: $(info **** **** unlocked-update-versions rule) - python gub/versiondb.py --version-db=$(LILYPOND_VERSIONS) --download --platforms="$(PLATFORMS)" + $(PYTHON) gub/versiondb.py --version-db=$(LILYPOND_VERSIONS) --download --platforms="$(PLATFORMS)" ifneq ($(findstring cygwin,$(PLATFORMS)),) # this is downloading the same info 5 times. Can we do this more efficiently? - python gub/versiondb.py --no-sources --version-db=versiondb/freetype2.versions --download --platforms="cygwin" - python gub/versiondb.py --no-sources --version-db=versiondb/fontconfig.versions --download --platforms="cygwin" - python gub/versiondb.py --no-sources --version-db=versiondb/guile.versions --download --platforms="cygwin" - python gub/versiondb.py --no-sources --version-db=versiondb/libtool.versions --download --platforms="cygwin" - python gub/versiondb.py --no-sources --version-db=versiondb/noweb.versions --download --platforms="cygwin" + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/freetype2.versions --download --platforms="cygwin" + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/fontconfig.versions --download --platforms="cygwin" + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/guile.versions --download --platforms="cygwin" + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/libtool.versions --download --platforms="cygwin" + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/noweb.versions --download --platforms="cygwin" endif download-cygwin: @@ -157,7 +157,7 @@ test-output: print-success: $(info **** print-success rule) - python test-lily/upload.py --branch=$(LILYPOND_BRANCH) --url $(LILYPOND_REPO_URL) + $(PYTHON) test-lily/upload.py --branch=$(LILYPOND_BRANCH) --url $(LILYPOND_REPO_URL) @echo "" @echo "To upload, run:" @echo @@ -208,7 +208,7 @@ ptools: nsis: $(info **** nsis rule) - bin/gub tools::nsis + $(GUB) tools::nsis ################################################################ # docs diff --git a/mingit.make b/mingit.make index 344186281..75f231456 100644 --- a/mingit.make +++ b/mingit.make @@ -33,7 +33,7 @@ mingw: $(call BUILD,$@,git) update-versions: - python gub/versiondb.py --no-sources --url http://lilypond.org/git --dbfile versiondb/git.versions --download --platforms="$(PLATFORMS)" + $(PYTHON) gub/versiondb.py --no-sources --url http://lilypond.org/git --dbfile versiondb/git.versions --download --platforms="$(PLATFORMS)" LAST_GIT=$(shell ls -1 -t uploads/git*.exe|head -1) TAG=gub-release-mingw-git-$(subst uploads/git-,,$(LAST_GIT)) diff --git a/openoffice.make b/openoffice.make index c5bc54d68..cd820e775 100644 --- a/openoffice.make +++ b/openoffice.make @@ -35,7 +35,7 @@ openoffice-installers: $(call INVOKE_INSTALLER_BUILDER,$(PLATFORMS)) $(INSTALL_PACKAGE) nsis: - bin/gub tools::nsis + $(GUB) tools::nsis print-success: @echo "success!!" diff --git a/schikkers-list.make b/schikkers-list.make index a8d6ce1ff..3c56cd1e5 100644 --- a/schikkers-list.make +++ b/schikkers-list.make @@ -54,10 +54,10 @@ schikkers-list-installers: $(foreach p, $(PLATFORMS), $(call INVOKE_INSTALLER_BUILDER,$(p)) $(INSTALL_PACKAGE) &&) true # nsis: - bin/gub tools::nsis + $(GUB) tools::nsis update-versions: - python gub/versiondb.py --no-sources --version-db=versiondb/schikkers-list.versions --download --platforms="mingw,linux-x86" --url=http://lilypond.org/schikkers-list/download/ + $(PYTHON) gub/versiondb.py --no-sources --version-db=versiondb/schikkers-list.versions --download --platforms="mingw,linux-x86" --url=http://lilypond.org/schikkers-list/download/ print-success: @echo "success!!"