Permalink
Switch branches/tags
release/0.0.3 gub-release-lilypond-2.17.0-1 gub-release-lilypond-2.17.0-1-actual gub-release-lilypond-2.16.0-1 gub-release-lilypond-2.15.95-1 gub-release-lilypond-2.15.42-1 gub-release-lilypond-2.15.41-1 gub-release-lilypond-2.15.40-1 gub-release-lilypond-2.15.39-1 gub-release-lilypond-2.15.38-1 gub-release-lilypond-2.15.37-1 gub-release-lilypond-2.15.36-1 gub-release-lilypond-2.15.35-1 gub-release-lilypond-2.15.34-1 gub-release-lilypond-2.15.33-1 gub-release-lilypond-2.15.32-1 gub-release-lilypond-2.15.31-1 gub-release-lilypond-2.15.30-1 gub-release-lilypond-2.15.16-1 gub-release-lilypond-2.15.15-1 gub-release-lilypond-2.15.14-1 gub-release-lilypond-2.15.13-1 gub-release-lilypond-2.15.12-1 gub-release-lilypond-2.15.11-1 gub-release-lilypond-2.15.10-1 gub-release-lilypond-2.15.9-1 gub-release-lilypond-2.15.8-1 gub-release-lilypond-2.15.7-1 gub-release-lilypond-2.15.6-1 gub-release-lilypond-2.15.5-1 gub-release-lilypond-2.15.4-1 gub-release-lilypond-2.15.3-1 gub-release-lilypond-2.15.2-1 gub-release-lilypond-2.15.1-1 gub-release-lilypond-2.15.0-1 gub-release-lilypond-2.14.2-1 gub-release-lilypond-2.14.1-1 gub-release-lilypond-2.14.0-1 gub-release-lilypond-2.13.63-1 gub-release-lilypond-2.13.62-1 gub-release-lilypond-2.13.61-1 gub-release-lilypond-2.13.60-1 gub-release-lilypond-2.13.59-1 gub-release-lilypond-2.13.58-1 gub-release-lilypond-2.13.57-1 gub-release-lilypond-2.13.56-1 gub-release-lilypond-2.13.55-1 gub-release-lilypond-2.13.54-1 gub-release-lilypond-2.13.53-1 gub-release-lilypond-2.13.52-1 gub-release-lilypond-2.13.51-1 gub-release-lilypond-2.13.50-1 gub-release-lilypond-2.13.49-1 gub-release-lilypond-2.13.48-1 gub-release-lilypond-2.13.47-1 gub-release-lilypond-2.13.46-1 gub-release-lilypond-2.13.45-1 gub-release-lilypond-2.13.44-1 gub-release-lilypond-2.13.43-1 gub-release-lilypond-2.13.42-1 gub-release-lilypond-2.13.41-1 gub-release-lilypond-2.13.40-1 gub-release-lilypond-2.13.39-1 gub-release-lilypond-2.13.38-1 gub-release-lilypond-2.13.37-1 gub-release-lilypond-2.13.36-1 gub-release-lilypond-2.13.35-1 gub-release-lilypond-2.13.34-1 gub-release-lilypond-2.13.33-1 gub-release-lilypond-2.13.32-1 gub-release-lilypond-2.13.31-1 gub-release-lilypond-2.13.30-1 gub-release-lilypond-2.13.29-1 gub-release-lilypond-2.13.28-1 gub-release-lilypond-2.13.27-2 gub-release-lilypond-2.13.27-1 gub-release-lilypond-2.13.26-1 gub-release-lilypond-2.13.25-1 gub-release-lilypond-2.13.24-1 gub-release-lilypond-2.13.23-1 gub-release-lilypond-2.13.22-1 gub-release-lilypond-2.13.21-1 gub-release-lilypond-2.13.20-1 gub-release-lilypond-2.13.19-1 gub-release-lilypond-2.13.18-1 gub-release-lilypond-2.13.17-1 gub-release-lilypond-2.13.16-1 gub-release-lilypond-2.13.15-1 gub-release-lilypond-2.13.14-1 gub-release-lilypond-2.13.13-1 gub-release-lilypond-2.13.12-1 gub-release-lilypond-2.13.11-1 gub-release-lilypond-2.13.10-1 gub-release-lilypond-2.13.9-1 gub-release-lilypond-2.13.8-1 gub-release-lilypond-2.13.7-1 gub-release-lilypond-2.13.7-0 gub-release-lilypond-2.13.6-1 gub-release-lilypond-2.13.5-0 gub-release-lilypond-2.13.4-1
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (63 sloc) 2.73 KB
import re
import os
#
from gub import build
from gub import misc
from gub import target
from gub import tools
class Gmp (target.AutoBuild):
source = 'http://ftp.gnu.org/pub/gnu/gmp/gmp-6.0.0a.tar.xz'
def __init__ (self, settings, source):
target.AutoBuild.__init__ (self, settings, source)
if not self.settings.platform.startswith ('darwin'):
self.target_architecture = re.sub ('i[0-9]86-', 'i386-', settings.target_architecture)
if 'stat' in misc.librestrict ():
build.add_dict (self, {'LIBRESTRICT_IGNORE': '%(tools_prefix)s/bin/bash'})
dependencies = ['libtool', 'tools::autoconf', 'tools::automake', 'tools::bison', 'tools::flex', 'tools::libtool', 'tools::xzutils']
configure_flags = (target.AutoBuild.configure_flags
+ ' --disable-cxx ')
def configure (self):
target.AutoBuild.configure (self)
# automake's Makefile.in's too old for new libtool,
# but autoupdating breaks even more. This nice
# hack seems to work.
self.file_sub ([('(#! .*/bin/.*sh)', r'#! \1\ntagname=CXX')],
'%(builddir)s/libtool')
class Gmp__darwin (Gmp):
def patch (self):
## powerpc/darwin cross barfs on all C++ includes from
## a C linkage file.
## don't know why. Let's patch C++ completely from GMP.
self.file_sub ([('__GMP_DECLSPEC_XX std::[oi]stream& operator[<>][^;]+;$', ''),
('#include <iosfwd>', ''),
('<cstddef>','<stddef.h>')
],
'%(srcdir)s/gmp-h.in')
Gmp.patch (self)
def install (self):
Gmp.install (self)
self.file_sub ([('using std::FILE;','')],
'%(install_prefix)s/include/gmp.h')
class Gmp__mingw (Gmp):
patches = []
def __init__ (self, settings, source):
Gmp.__init__ (self, settings, source)
# Configure (compile) without -mwindows for console
self.target_gcc_flags = '-mms-bitfields'
def install (self):
Gmp.install (self)
self.system ('''
mv %(install_prefix)s/lib/*dll %(install_prefix)s/bin || true
''')
class Gmp__tools (tools.AutoBuild, Gmp):
dependencies = ['bison', 'flex', 'libtool', 'xzutils']
configure_variables = (tools.AutoBuild.configure_variables
# avoid __isoc99_fscanf@@GLIBC_2.7 etc
+ ' CPPFLAGS=-D_GNU_SOURCE')
def __init__ (self, settings, source):
tools.AutoBuild.__init__ (self, settings, source)
if 'ABI' not in os.environ:
if settings.target_bits == "32":
self.configure_variables += ' ABI=32'
elif settings.target_bits == "64":
self.configure_variables += ' ABI=64'