Ejemplo n.º 1
0
def secondbuilder():
    builder2 = Builder()
    if platform.machine() == "x86_64":
        builder2.add_option('"CFLAGS=-fPIC -O2"')
    builder2.add_option('--enable-float --enable-threads')
    builder2.do_clean = False
    builder2.build()
Ejemplo n.º 2
0
 def _clean(self):
 # Use scons if possible otherwise fallback to hardcoded files to delete.
     if os.path.exists(SCONS):
         utils.run_scons(extraargs="--clean")
     else:
         for file in DEL_FILES:
             if os.path.exists(file):
                 os.remove(file)
     return Builder._clean(self)
Ejemplo n.º 3
0
 def _clean(self):
     # Use scons if possible otherwise fallback to hardcoded files to delete.
     if os.path.exists(SCONS):
         utils.run_scons(extraargs="--clean")
     else:
         for file in DEL_FILES:
             if os.path.exists(file):
                 os.remove(file)
     return Builder._clean(self)
Ejemplo n.º 4
0
from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(buildtargets=['busyfit', 'lib'])
builder.remote_archive = "busyfit-0.2.tar.gz"

gsl = builder.dep.get_install_path("gsl")

builder.add_option("--with-gsl=%s" % gsl)

builder.add_file("files/configure.ac")
builder.add_file("files/configure")
builder.add_file("files/Makefile.in")
builder.add_file("files/install-sh")
builder.add_file("files/config.sub")
builder.add_file("files/config.guess")

builder.build()
Ejemplo n.º 5
0
import os
import distutils.sysconfig

from askapdev.rbuild.builders import Autotools as Builder
from askapdev.rbuild.builders import Setuptools as Builder2
import askapdev.rbuild.utils as utils

targets = 'cpp py java'

os.environ['PYTHON_HOME'] = os.getenv('ASKAP_ROOT')

# Create the builder now as we need builder._prefix.
builder = Builder(confcommand=None)
builder.remote_archive = "Ice-3.5.0.tar.gz"

db = builder.dep.get_install_path("db")
bzip2 = builder.dep.get_install_path("bzip2")
expat = builder.dep.get_install_path("expat")
mcpp = builder.dep.get_install_path("mcpp")
openssl = builder.dep.get_install_path("openssl")

# Required for java build
oldldp = os.environ.get('LD_LIBRARY_PATH', '')
newldp = os.path.join(db, "lib")
oldcp = os.environ.get('CLASSPATH', '')
newcp = os.path.join(db, "lib", "db.jar")

builder.add_classpath_paths(newcp)
builder.add_ld_library_paths(newldp)

top_m = [('^SUBDIRS.*=.*', 'SUBDIRS  = %s' % targets),
Ejemplo n.º 6
0
from askapdev.rbuild.builders import Data as Builder

builder = Builder(archivename=None)
builder.do_clean = False

builder.build()
Ejemplo n.º 7
0
import os
import shutil
import subprocess

import askapdev.rbuild.utils as utils
from askapdev.rbuild.builders import Autotools as Builder

package_name = "Healpix_3.31"
path = "{0}/src/cxx".format(package_name)

builder = Builder(archivename="Healpix_3.31_2016Aug26.tar.gz",
                  pkgname=package_name,
                  buildsubdir="src/cxx",
                  installcommand=None)

# Select the HEALPix target. The configure script ignores all the standard
# variables such as LDFLAGS and CXXFLAGS, so selecting the target is the only
# reliable way to influence the compilation flags.  At Healpix 3.31, relevant
# targets are: auto, basic_gcc, generic_gcc, linux_icc, optimized_gcc, osx, and
# osx_icc
# For new versions, the src/cxx/config directory should be checked for available
# targets
platform = utils.get_platform()
target = "osx" if platform['system'] == 'Darwin' else "generic_gcc"
os.putenv("HEALPIX_TARGET", target)
builder.add_option("HEALPIX_TARGET={0}".format(target))


def run_autoconf():
    "HealPix requires autoconf prior to configure"
    subprocess.call("autoconf", cwd=path)
Ejemplo n.º 8
0
import os

from askapdev.rbuild.builders import Autotools as Builder

# Pick up directory structure and boost version from current directory name
boost_version = os.path.basename(os.path.abspath(os.curdir))
boost_dir = boost_version.replace('.', '_').replace('-', '_')

builder = Builder(pkgname=boost_dir,
                  confcommand='bootstrap.sh',
                  buildcommand='./bjam',
                  installcommand='./bjam install')
builder.remote_archive = "boost_1_56_0.tar.bz2"

builder.add_option(
    '--with-libraries=python,date_time,filesystem,program_options,thread,system,regex --prefix=builder._prefix'
)
builder.nowarnings = True

builder.build()
Ejemplo n.º 9
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder("cfitsio", buildtargets=['shared'])
builder.remote_archive = "cfitsio3420.tar.gz"
builder.nowarnings = True

if os.path.basename(os.getenv('FC')) == "pgfortran":
    builder.add_env("CPPFLAGS", "-DpgiFortran")

builder.build()
Ejemplo n.º 10
0
import os
import sys
from askapdev.rbuild.builders import Setuptools as Builder

# No docs here.
if 'doc' in sys.argv:
    sys.exit(0)


# Added to stop 'clean' target from warning about non-existent 'build/lib' dir.
def postcallback():
    target = os.path.join('build', 'lib')
    if not os.path.exists(target):
        os.makedirs(os.path.join('build', 'lib'))


builder = Builder('.')
builder.add_postcallback(postcallback)
builder.build()
Ejemplo n.º 11
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="./sqlite-autoconf-3200000")
builder.remote_archive = "sqlite-autoconf-3200000.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 12
0
from askapdev.rbuild.builders import Scons as Builder

builder = Builder(pkgname="BLAS", archivename="blas")
builder.remote_archive = "blas.tgz"
builder.add_file("files/SConstruct")

builder.build()
Ejemplo n.º 13
0
from askapdev.rbuild.builders import Autotools as Builder
import askapdev.rbuild.utils as utils

platform = utils.get_platform()

if platform['system'] == 'Darwin':
    builder = Builder(confcommand='Configure darwin64-x86_64-cc')

    # This works around the problem "Undefined symbols for architecture x86_64:
    # _OPENSSL_ia32cap_P" experienced in using OpenSSL in the "casdaupload"
    #  utility to generate SHA1 checksums. See Jira issue ASKAPSDP-1646
    builder.add_option('no-asm')

elif platform['system'] == 'Linux' and platform['architecture'] == '64bit':
    builder = Builder(confcommand='Configure linux-x86_64')
else:
    builder = Builder(confcommand='config')

if platform['architecture'] == '64bit':
    builder.add_option('-fPIC')

builder.remote_archive = "openssl-1.0.1h.tar.gz"
builder.add_option('no-shared')
builder.parallel = False
builder.nowarnings = True

builder.build()
Ejemplo n.º 14
0
 def __init__(self):
     Builder.__init__(self, pkgname='.', installcommand="scons install")
Ejemplo n.º 15
0
import os

from askapdev.rbuild.builders import Autotools as Builder
import askapdev.rbuild.utils as utils

builder = Builder(buildsubdir="build_unix", confcommand='../dist/configure')
builder.remote_archive = "db-5.3.21.NC.tar.gz"

if os.uname()[4] == 'x86_64':
    builder.add_option('--with-pic')

#builder.add_option('--disable-shared') # Need shared libraries for Java.
builder.add_option('--enable-cxx')
builder.add_option('--enable-java')
builder.nowarnings = True

# On Mac OSX jni.h is in a  location where BerkleyDB can't find it. Including
# $JAVA_HOME/include (and include/darwin) fixes this. The JAVA_HOME environment
# can be setup on OSX like so (for bash): export JAVA_HOME=$(/usr/libexec/java_home)
platform = utils.get_platform()
if platform['system'] == 'Darwin' and os.environ.has_key("JAVA_HOME"):
    javahome = os.environ.get('JAVA_HOME')
    builder.add_option('CPPFLAGS="-I%s/include -I%s/include/darwin"' %
                       (javahome, javahome))

# The Cray cc and c++ compilers wrappers break here, so go directly to gcc and g++
if os.environ.has_key("CRAYOS_VERSION"):
    builder.add_env("CC", "gcc")
    builder.add_env("CXX", "g++")
    builder.add_env("LINK", "g++")
    builder.add_env("SHLINK", "g++")
Ejemplo n.º 16
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="libcutl-1.10.0")
builder.remote_archive = "libcutl-1.10.0.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 17
0
import os.path

from askapdev.rbuild.builders import Autotools as Builder

prefix = os.path.join(os.path.abspath(os.path.curdir), "install")

builder = Builder(confcommand=None,
                  installcommand='make install PREFIX=%s' % prefix)
builder.remote_archive = "bzip2-1.0.5.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 18
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="libodb-pgsql-2.4.0")

# setup the libodb dependency
libodb = builder.dep.get_install_path("libodb")
builder.add_option("CPPFLAGS=-I{0}/include".format(libodb))
builder.add_option("LDFLAGS=-L{0}/lib".format(libodb))

builder.remote_archive = "libodb-pgsql-2.4.0.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 19
0
# Copyright (c) 2009 CSIRO
# Australia Telescope National Facility (ATNF)
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# PO Box 76, Epping NSW 1710, Australia
# [email protected]
#
# This file is part of the ASKAP software distribution.
#
# The ASKAP software distribution is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

from askapdev.rbuild.builders import Ant as Builder

builder = Builder(".")

builder.build()
Ejemplo n.º 20
0
 def __init__(self):
     Builder.__init__(self, pkgname='.', archivename=None, extractdir=None)
Ejemplo n.º 21
0
import os

from askapdev.rbuild.builders import Autotools as Builder
import askapdev.rbuild.utils as utils

ASKAP_ROOT = os.getenv('ASKAP_ROOT')
install_cmd = "make prefix=%s install" % ASKAP_ROOT

platform = utils.get_platform()

if platform['system'] == 'Darwin':
    archext = "macosx"
    buildext = "mac"
else:
    archext = "linux"
    buildext = "gcc"

if platform['system'] == 'FreeBSD':
    install_cmd = 'g' + install_cmd

builder = Builder(pkgname="astyle/build/%s" % buildext,
                  confcommand=None,
                  installcommand=install_cmd)
builder.remote_archive = "astyle_2.04_" + archext + ".tar.gz"

# It extracts to sub directory astyle not the expected astyle-2.04.
builder.add_extra_clean_targets('astyle')
builder.nowarnings = True
builder.build()
Ejemplo n.º 22
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="odb-2.4.0")

# cutl dependency
libcutl = builder.dep.get_install_path("libcutl")
builder.add_option("CPPFLAGS=-I{0}/include".format(libcutl))
builder.add_option("LDFLAGS=-L{0}/lib".format(libcutl))

builder.add_option("CXXFLAGS=-O1")

builder.remote_archive = "odb-2.4.0.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 23
0
 def __init__(self):
     Builder.__init__(self, pkgname='.', installcommand="scons install")
Ejemplo n.º 24
0
from askapdev.rbuild.builders import Builder

builder = Builder(".")
builder.build()
Ejemplo n.º 25
0
import os

from askapdev.rbuild.builders import CMake as Builder
import askapdev.rbuild.utils as utils

platform =  utils.get_platform()
builder = Builder(pkgname="mysql-connector-c-6.1.11-src")
builder.remote_archive = "mysql-connector-c-6.1.11-src.tar.gz"

# Force use of raw GNU compilers. This is due to bug #5798 seen on the Cray XC30
# (Galaxy). Builds using the newer cmake (2.8.12+) fail when cmake uses the Cray
# compiler wrappers
if platform['system'] != 'Darwin':
    builder.add_option("-DCMAKE_C_COMPILER=gcc")
    builder.add_option("-DCMAKE_CXX_COMPILER=g++")

builder.build()

# The MySQL client no longer builds the separate thread-safe libmysqlclient_r.so
# library. There is only a thread-safe library now (named without the _r
# suffix).  However, the ODB libraries still look for the old thread-safe
# name. And that can't be changed without patching the ODB configure script.
# The simplest solution is to create symlinks here.
try:
    lib_path = '{0}/{1}/lib'.format(builder._bdir, builder._installdir)
    source = os.path.join(lib_path, 'libmysqlclient.{0}')
    target = os.path.join(lib_path, 'libmysqlclient_r.{0}')

# symlink the static library
    os.symlink(source.format('a'), target.format('a'))
Ejemplo n.º 26
0
import os.path

from askapdev.rbuild.builders import CMake as Builder
import askapdev.rbuild.utils as utils

# CMake doesn't know about ROOT_DIR for blas and lapack, so need to
# explicitly name them.  Want to use the dynamic libraries in order
# to avoid link problems with missing FORTRAN symbols.
platform = utils.get_platform()
libblas = "libblas.a"
liblapack = "liblapack.a"
if platform['system'] == 'Darwin':
    libblas = libblas.replace(".so", ".dylib")
    liblapack = liblapack.replace(".so", ".dylib")

builder = Builder("casarest-1.4.2")
builder.remote_archive = "https://github.com/casacore/casarest/archive/v1.4.2.zip"

cfitsio = builder.dep.get_install_path("cfitsio")
wcslib = builder.dep.get_install_path("wcslib")
if not platform['system'] == 'Darwin':
    blas = builder.dep.get_install_path("blas")
    lapack = builder.dep.get_install_path("lapack")
fftw3 = builder.dep.get_install_path("fftw3")
casacore = builder.dep.get_install_path("casacore")
boost = builder.dep.get_install_path("boost")

# CMake doesn't know about ROOT_DIR for these packages, so be explicit
if platform['system'] != 'Darwin':
    builder.add_option("-DBLAS_LIBRARIES=%s" %
                       os.path.join(blas, 'lib', libblas))
Ejemplo n.º 27
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="libodb-boost-2.4.0")

# setup the libodb dependency
libodb = builder.dep.get_install_path("libodb")
builder.add_option("CPPFLAGS=-I{0}/include".format(libodb))

# setup the boost dependency
boost = builder.dep.get_install_path("boost")
builder.add_option("--with-boost={0}/include".format(boost))

# Set LDFLAGS
builder.add_option("LDFLAGS='-L{0}/lib -L{1}/lib'".format(
    libodb,
    boost))

builder.remote_archive = "libodb-boost-2.4.0.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 28
0
from askapdev.rbuild.builders import Scons as Builder

b = Builder(".")
b.build()
Ejemplo n.º 29
0
import os

from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(pkgname="libodb-sqlite-2.4.0")

# dependencies
libodb = builder.dep.get_install_path("libodb")
libsqlite = builder.dep.get_install_path("libsqlite3")
builder.add_option('"CPPFLAGS=-I{0}/include -I{1}/include"'.format(
    libodb, libsqlite))
builder.add_option('"LDFLAGS=-L{0}/lib -L{1}/lib"'.format(libodb, libsqlite))

builder.remote_archive = "libodb-sqlite-2.4.0.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 30
0
 def __init__(self):
     Builder.__init__(self, pkgname='.', archivename=None, extractdir=None)
Ejemplo n.º 31
0
from askapdev.rbuild.builders import Autotools as Builder

builder = Builder(buildtargets=['duchamp', 'lib'])
builder.remote_archive = "Duchamp-1.6.1.tar.gz"

cfitsio = builder.dep.get_install_path("cfitsio")
wcslib = builder.dep.get_install_path("wcslib")

builder.add_option("--without-pgplot")
builder.add_option("--with-cfitsio=%s" % cfitsio)
builder.add_option("--with-wcslib=%s" % wcslib)

builder.build()
Ejemplo n.º 32
0
from askapdev.rbuild.builders import Setuptools as Builder

builder = Builder()
builder.remote_archive = "pywcs-1.12.tar.gz"
builder.nowarnings = True
builder.build()
Ejemplo n.º 33
0
from askapdev.rbuild.builders import Data as Builder

builder = Builder(pkgname="hibernate-distribution-3.6.1.Final")
builder.remote_archive = "hibernate-distribution-3.6.1.Final.tar.gz"
builder.build()