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
91 lines (87 sloc) 4.07 KB
#
from gub import misc
from gub import target
from gub import tools
class Db (target.AutoBuild):
source = 'http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz'
srcdir_build_broken = True
dependencies = ['tools::libtool']
autodir = '%(srcdir)s/dist'
config_cache_file = '%(builddir)s/build_unix/config.cache'
configure_command = 'cd build_unix && ' + target.AutoBuild.configure_command
configure_binary = '%(builddir)s/dist/configure'
make_flags = '-C build_unix'
def configure (self):
self.system ('mkdir -p %(builddir)s/build_unix')
target.AutoBuild.configure (self)
self.file_sub ([('\(prefix\)docs', '\(prefix\)/share/doc/db'),
('^ @', ' ')],
'%(builddir)s/build_unix/Makefile')
def install (self):
target.AutoBuild.install (self)
# FIXME: /usr/docs/ is full of invalid symlinks
self.system ('rm -rf %(install_prefix)s/docs')
self.system ('rm -f %(install_prefix)s/lib/libdb.{a,so{,.a},la}')
self.system ('cd %(install_prefix)s/lib && ln -s libdb-*.a libdb.a')
self.system ('cd %(install_prefix)s/lib && cp libdb-*.la libdb.la')
self.system ('cd %(install_prefix)s/lib && ln -s libdb-*.so libdb.so || :')
class Db__mingw (Db):
patches = ['db-4.7.25-mingw.patch']
# no libdb.dll without libwsock.dll
# cannot find a free and functional libwsock.dll, though
def xxget_build_dependencies (self):
return ['libwsock32']
def patch (self):
Db.patch (self)
self.file_sub ([('HAVE_VXWORKS', '__MINGW32__')],
'%(srcdir)s/os/os_mkdir.c')
self.file_sub ([('dbenv', 'env')], '%(srcdir)s/os/os_yield.c')
def configure (self):
Db.configure (self)
self.system ('echo "#undef fsync" >> %(builddir)s/build_unix/db_config.h')
self.system ('echo "#define fsync _commit" >> %(builddir)s/build_unix/db_config.h')
self.file_sub ([('[.]exe', '')], '%(builddir)s/build_unix/Makefile')
self.system ('''mkdir -p %(builddir)s/build_unix/arpa %(builddir)s/build_unix/net %(builddir)s/build_unix/netinet %(builddir)s/build_unix/sys
touch %(builddir)s/build_unix/net/uio.h
touch %(builddir)s/build_unix/sys/uio.h
touch %(builddir)s/build_unix/netinet/in.h
touch %(builddir)s/build_unix/netdb.h
touch %(builddir)s/build_unix/arpa/inet.h
''')
configure_flags = (Db.configure_flags
+ misc.join_lines ('''
--disable-posixmutexes
--disable-mutexsupport
--disable-pthread_api
LDFLAGS=-lwsock32
'''))
def install (self):
target.AutoBuild.install (self)
# FIXME: /usr/docs/ is full of invalid symlinks
self.system ('rm -rf %(install_prefix)s/docs')
self.system ('rm -f %(install_prefix)s/{bin,lib}/libdb.{{,so,dll}{,.a},la}')
self.system ('cd %(install_prefix)s/lib && cp libdb-*.a libdb.a')
self.system ('cd %(install_prefix)s/lib && cp libdb-*.la libdb.la')
if 'libwsock32' in self.get_build_dependencies ():
self.system ('cd %(install_prefix)s/bin && cp libdb-*.dll libdb.dll')
self.system ('cd %(install_prefix)s/lib && cp libdb-*.dll.a libdb.dll.a')
else:
self.system ('cd %(install_prefix)s/lib && mv libdb.la libdb.la-')
self.system ('cd %(install_prefix)s/lib && mv libdb-4.7.la libdb-4.7.la-')
class Db__tools (tools.AutoBuild, Db):
srcdir_build_broken = True
dependencies = ['libtool']
configure_command = 'cd build_unix && ' + tools.AutoBuild.configure_command
def configure (self):
self.system ('mkdir -p %(builddir)s/build_unix')
tools.AutoBuild.configure (self)
self.file_sub ([('\(prefix\)docs', '\(prefix\)/share/doc/db'),
('^ @', ' ')],
'%(builddir)s/build_unix/Makefile')
def update_libtool (self):
pass
def install (self):
tools.AutoBuild.install (self)
# FIXME: /usr/docs/ is full of invalid symlinks
self.system ('rm -rf %(install_prefix)s/docs')
self.system ('cd %(install_prefix)s/lib && ln -s libdb-*.la libdb.la')