Exemplo n.º 1
0
def configure(parameters='',
              installPrefix='/{}'.format(get.defaultprefixDIR()),
              sourceDir='.'):
    """configure source with given cmake parameters = "-DCMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS ... " """
    if can_access_file(join_path(sourceDir, 'CMakeLists.txt')):
        args = 'cmake -DCMAKE_INSTALL_PREFIX={0} \
                      -DCMAKE_INSTALL_LIBDIR={1} \
                      -DCMAKE_BUILD_TYPE=RelWithDebInfo {2} {3}'.format(
            installPrefix,
            "/usr/lib32 " if get.buildTYPE() == "emul32" else "/usr/lib",
            parameters, sourceDir)
        if get.CFLAGS():
            args += ' -DCMAKE_C_FLAGS="{0} {1}"'.format(
                get.CFLAGS(),
                "-m32" if get.buildTYPE() == "emul32" else "-m64")
        if get.CXXFLAGS():
            args += ' -DCMAKE_CXX_FLAGS="{0} {1}"'.format(
                get.CXXFLAGS(),
                "-m32" if get.buildTYPE() == "emul32" else "-m64")
        if get.LDFLAGS():
            args += ' -DCMAKE_LD_FLAGS="{0}"'.format(get.LDFLAGS())

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(
            _('No configure script found. (\"{}\" file not found.)'.format(
                "CMakeLists.txt")))
Exemplo n.º 2
0
def setup():
    shelltools.export("CFLAGS", "%s -fPIC -O3" % get.CFLAGS())
    shelltools.export("CXXFLAGS", "%s -fPIC -O3" % get.CXXFLAGS())

    # for libtool version matching
    #shelltools.copy("/usr/share/aclocal/ltversion.m4", "acinclude/")
    shelltools.system("./autogen.sh")

    #libtools.libtoolize("--force --copy")

    options = "--enable-events \
               --enable-cpuinfo \
               --enable-cdrom \
               --enable-threads \
               --enable-timers \
               --enable-file \
               --enable-alsa \
               --enable-oss \
               --enable-nasm \
               --enable-video-aalib \
               --enable-video-caca \
               --enable-video-directfb \
               --enable-video-fbcon \
               --enable-video-dummy \
               --enable-video-opengl \
               --enable-video-x11 \
               --enable-video-x11-xv \
               --enable-video-x11-xinerama \
               --enable-video-x11-xrandr \
               --with-x \
               --disable-rpath \
               --disable-arts \
               --disable-dga \
               --disable-esd \
               --disable-nas \
               --disable-video-dga \
               --disable-video-ggi \
               --disable-video-svga \
               --disable-video-x11-xme \
               --disable-static"

    if get.buildTYPE() == "emul32":
        options += " --libdir=/usr/lib32 \
                     --bindir=/emul32/bin \
                     --mandir=/emul32/man \
                     --disable-video-aalib \
                     --disable-video-caca \
                     --disable-video-directfb"

        shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
        shelltools.export("CFLAGS", "%s -fPIC -O3 -m32" % get.CFLAGS())
        shelltools.export("CXXFLAGS", "%s -fPIC -O3 -m32" % get.CXXFLAGS())
        shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())

    autotools.configure(options)

    inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
Exemplo n.º 3
0
def build():
    shelltools.system("sed -i 's|lib64|lib|' config/Makefile.linux")
    shelltools.system("sed -i '/^.PHONY: .*\.pc$/d' Makefile")

    if get.buildTYPE() == "emul32":
        inarytools.dosed("config/Makefile.linux", "LD = cc", "LD = gcc -m32")
        shelltools.system("sed -i 's|lib64|lib32|' config/Makefile.linux")
        autotools.make('CC="%s -m32" CXXFLAGS="%s"' %
                       (get.CC(), get.CXXFLAGS()))
        return
    else:
        autotools.make('CC=%s CXXFLAGS="%s"' % (get.CC(), get.CXXFLAGS()))
        return
Exemplo n.º 4
0
def setup():
    options = "--disable-dependency-tracking \
               --disable-static \
               --enable-gif \
               --enable-jpg \
               --enable-tif \
               --enable-png \
               --enable-pnm \
               --enable-bmp \
               --enable-xcf \
               --enable-xpm \
               --enable-tga \
               --enable-lbm \
               --enable-pcx \
               --disable-jpg-shared \
               --disable-png-shared \
               --disable-tif-shared"

    if get.buildTYPE() == "emul32":
        options += " --includedir=/usr/include \
                     --libdir=/usr/lib32"

        shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
        shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
        shelltools.export("CXXFLAGS", "%s -m32" % get.CXXFLAGS())
        shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())

    for i in ["NEWS", "AUTHORS", "ChangeLog"]:
        shelltools.touch(i)

    #autotools.autoreconf("-vfi")
    autotools.configure(options)
Exemplo n.º 5
0
def builddiet():
    autotools.make("clean")
    shelltools.export(
        "CC", "diet %s %s %s %s -DHAVE_STDINT_H -Os -static" %
        (get.CC(), get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS()))
    autotools.make("mdadm.static")
    autotools.make("mdassemble.static")

    inarytools.insinto("/sbin", "mdadm.static")
    inarytools.insinto("/sbin", "mdassemble.static")
Exemplo n.º 6
0
def build():
    #Parallel build is broken
    shelltools.export("CXXFLAGS",
                      "%s -std=gnu++98 -fno-lifetime-dse" % get.CXXFLAGS())
    autotools.make()
    shelltools.cd("gen")
    inarytools.dosed("install/makeInstallImage.sh", "exit 1", "# exit 1")
    inarytools.dosed("install/makeInstallImage.sh", "chown", 'echo ""# chown')
    inarytools.dosed("install/makeInstallImage.sh", "chmod", 'echo ""# chmod')
    autotools.make("-f Makefile.install buildRoot")
Exemplo n.º 7
0
def setup():
    inarytools.dosed("configure.ac", "-O3", "")
    shelltools.export("CPPFLAGS", get.CXXFLAGS())

    shelltools.system("./bootstrap")
    autotools.configure("--disable-static \
                         --disable-ecore \
                         --enable-glib")

    inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
Exemplo n.º 8
0
def setup():
    #inarytools.dosed("storage/tokudb/ft-index/ft/ft-ops.cc", "LEAFENTRY leaf_entry;", "LEAFENTRY leaf_entry = 0;")
    shelltools.export("CFLAGS", get.CFLAGS())
    shelltools.export("CXXFLAGS", get.CXXFLAGS())
    cmaketools.configure("-DBUILD_CONFIG=mysql_release \
                          -DCMAKE_INSTALL_PREFIX=/usr \
                          -DSYSCONFDIR=/etc/mysql \
                          -DMYSQL_DATADIR=/var/lib/mysql \
                          -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
                          -DDEFAULT_CHARSET=utf8 \
                          -DDEFAULT_COLLATION=utf8_general_ci \
                          -DENABLED_LOCAL_INFILE=ON \
                          -DINSTALL_INFODIR=share/mysql/docs \
                          -DINSTALL_MANDIR=share/man \
                          -DINSTALL_PLUGINDIR=lib/mysql/plugin \
                          -DINSTALL_SCRIPTDIR=bin \
                          -DINSTALL_INCLUDEDIR=include/mysql \
                          -DINSTALL_DOCREADMEDIR=share/mysql \
                          -DINSTALL_SUPPORTFILESDIR=share/mysql \
                          -DINSTALL_MYSQLSHAREDIR=share/mysql \
                          -DINSTALL_DOCDIR=share/mysql/docs \
                          -DINSTALL_SHAREDIR=share/mysql \
                          -DWITH_READLINE=ON \
                          -DWITH_ZLIB=system \
                          -DWITH_SSL=system \
                          -DWITH_PCRE=bundled \
                          -DWITH_LIBWRAP=OFF \
                          -DWITH_JEMALLOC=ON \
                          -DWITH_EXTRA_CHARSETS=complex \
                          -DWITH_EMBEDDED_SERVER=ON \
                          -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
                          -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
                          -DWITH_INNOBASE_STORAGE_ENGINE=1 \
                          -DWITH_PARTITION_STORAGE_ENGINE=1 \
                          -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \
                          -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
                          -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
                          -DWITHOUT_PBXT_STORAGE_ENGINE=1 \
                          -DCMAKE_C_FLAGS='-fPIC %s -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks' \
                          -DCMAKE_CXX_FLAGS='-fPIC %s -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti -fno-delete-null-pointer-checks' \
                          -DWITH_MYSQLD_LDFLAGS='-pie %s,-z,now'" %
                         (get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS()))
Exemplo n.º 9
0
def configure(projectfile='', parameters='', installPrefix=prefix):
    if projectfile != '' and not shelltools.can_access_file(projectfile):
        raise ConfigureError(
            _("Project file \"{}\" not found.").format(projectfile))

    profiles = glob.glob("*.pro")
    if len(profiles) > 1 and projectfile == '':
        raise ConfigureError(
            _("It seems there are more than one .pro file, you must specify one. (Possible .pro files: \"{}\")"
              ).format(", ".join(profiles)))

    shelltools.system(
        "{0} -makefile {1} PREFIX='{2}' QMAKE_CFLAGS+='{3}' QMAKE_CXXFLAGS+='{4}' {5}"
        .format(qmake, projectfile, installPrefix, get.CFLAGS(),
                get.CXXFLAGS(), parameters))
Exemplo n.º 10
0
def setup():
    inarytools.dosed("configure.in", "-O")

    options = "\
               --enable-mmx \
               --disable-static"

    if get.buildTYPE() == "emul32":
        options += " --includedir=/usr/include \
                     --libdir=/usr/lib32"

        shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
        shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
        shelltools.export("CXXFLAGS", "%s -m32" % get.CXXFLAGS())
        shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())

    autotools.configure(options)
Exemplo n.º 11
0
def cmake_configure(parameters=""):
    makedirs("inaryPackageBuild")
    cd("inaryPackageBuild")

    if can_access_file(util.join_path("..", 'CMakeLists.txt')):
        args = 'cmake -DCMAKE_INSTALL_PREFIX=/{0} \
                      -DCMAKE_INSTALL_LIBDIR={1} \
                      -DCMAKE_C_FLAGS="{6} {2}" \
                      -DCMAKE_CXX_FLAGS="{6} {3}" \
                      -DCMAKE_LD_FLAGS="{4}" \
                      -DCMAKE_BUILD_TYPE=RelWithDebInfo {5} -G Ninja ..'.format(
            get.defaultprefixDIR(),
            "/usr/lib32 " if get.buildTYPE() == "emul32" else "/usr/lib",
            get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS(), parameters,
            "-m32" if get.buildTYPE() == "emul32" else "-m64")

        if system(args):
            raise ConfigureError(_('CMake configure failed.'))
    else:
        raise ConfigureError(
            _('No configure script found. (\"{}\" file not found.)'.format(
                "CMakeLists.txt")))
Exemplo n.º 12
0
def build():
    shelltools.export("CFLAGS", get.CFLAGS()+"  $(python3-config --includes)")
    shelltools.export("CXXFLAGS", get.CXXFLAGS()+"  $(python3-config --includes)")

    autotools.make()
Exemplo n.º 13
0
def build():
    autotools.make("-C src CXXFLAGS='%s' CFLAGS='%s' LDFLAGS='%s'" % (get.CXXFLAGS(), get.CFLAGS(), get.LDFLAGS()))

    shelltools.system("./compile-voices")
Exemplo n.º 14
0
def setup():
    checkdeletepath="%s/qtbase/src/3rdparty"  % absoluteWorkDir
    for dir in ('libjpeg', 'freetype', 'libpng', 'zlib', "xcb", "sqlite"):
        if os.path.exists(checkdeletepath+dir):
            shelltools.unlinkDir(checkdeletepath+dir)

    filteredCFLAGS = get.CFLAGS().replace("-g3", "-g")
    filteredCXXFLAGS = get.CXXFLAGS().replace("-g3", "-g")

    vars = {"SULIN_CC" :       get.CC() + (" -m32" if get.buildTYPE() == "emul32" else ""),
            "SULIN_CXX":       get.CXX() + (" -m32" if get.buildTYPE() == "emul32" else ""),
            "SULIN_CFLAGS":    filteredCFLAGS + (" -m32" if get.buildTYPE() == "emul32" else ""),
            "SULIN_LDFLAGS":   get.LDFLAGS() + (" -m32" if get.buildTYPE() == "emul32" else "")}

    for k, v in vars.items():
        inarytools.dosed("mkspecs/common/g++-base.conf", k, v)
        inarytools.dosed("mkspecs/common/g++-unix.conf", k, v)

    shelltools.export("CFLAGS", filteredCFLAGS)
    shelltools.export("CXXFLAGS", filteredCXXFLAGS)
    #check that dosed commands without releated patches
    inarytools.dosed("mkspecs/common/gcc-base-unix.conf", "\-Wl,\-rpath,")
    inarytools.dosed("mkspecs/common/gcc-base.conf", "\-O2", filteredCFLAGS)
    inarytools.dosed("mkspecs/common/gcc-base.conf", "^(QMAKE_LFLAGS\s+\+=)", r"\1 %s" % get.LDFLAGS())

    if not get.buildTYPE() == "emul32":
        #-no-pch makes build ccache-friendly
        options = "-v -confirm-license -opensource \
                            -no-rpath \
                            -no-use-gold-linker\
                            -prefix %s \
                            -bindir %s \
                            -headerdir %s \
                            -archdatadir %s\
                            -plugin-sql-{psql,mysql,sqlite,odbc} \
                            -docdir %s \
                            -plugindir %s \
                            -importdir %s \
                            -qmldir %s \
                            -datadir %s \
                            -testsdir %s \
                            -translationdir %s \
                            -sysconfdir %s \
                            -examplesdir %s \
                            -libdir %s \
                            -system-sqlite \
                            -openssl-linked \
                            -nomake tests \
                            -nomake examples \
                            -optimized-qmake \
                            -reduce-relocations \
                            -dbus-linked " % (qt.prefix, bindirQt5, qt.headerdir, qt.archdatadir, qt.docdir, qt.plugindir, qt.importdir, qt.qmldir, qt.datadir, qt.testdir, qt.translationdir, qt.sysconfdir, qt.examplesdir, qt.libdir)
    else:
        inarytools.dosed("mkspecs/linux-g++-64/qmake.conf", "-m64", "-m32")
        shelltools.export("LDFLAGS", "-m32 %s" % get.LDFLAGS())
        options = "-no-pch -v -confirm-license -opensource -no-use-gold-linker\
                   -platform linux-g++-32 \
                   -xplatform linux-g++-32 \
                   -prefix /usr/lib32 \
                   -bindir /usr/lib32/qt5/bin \
                   -docdir /usr/share/doc/qt \
                   -headerdir /usr/lib32/qt5/include/qt5 \
                   -datadir /usr/share/qt5 \
                   -sysconfdir /etc/xdg \
                   -examplesdir /usr/share/doc/qt/examples \
                   -system-sqlite \
                   -openssl-linked \
                   -nomake examples \
                   -no-xcb \
                   -no-rpath \
                   -optimized-qmake \
                   -dbus-linked \
                   -system-harfbuzz \
                   -libdir /usr/lib32/ \
                   -archdatadir /usr/lib32/qt5/"

    autotools.rawConfigure(options)
Exemplo n.º 15
0
def setup():
    autotools.rawConfigure("--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info CXXFLAGS='%s'" % get.CXXFLAGS())
Exemplo n.º 16
0
def setup():
    shelltools.export("CFLAGS", get.CFLAGS().replace("-fstack-protector", ""))
    shelltools.export("CPPFLAGS",
                      get.CXXFLAGS().replace("-fstack-protector", ""))
    autotools.configure("--without-mpicc")
Exemplo n.º 17
0
def setup():
    #inarytools.dosed("storage/tokudb/ft-index/ft/ft-ops.cc", "LEAFENTRY leaf_entry;", "LEAFENTRY leaf_entry = 0;")
    shelltools.export("CFLAGS", get.CFLAGS())
    shelltools.export("CXXFLAGS", get.CXXFLAGS())
    cmaketools.configure("  -DCOMPILATION_COMMENT=\"Sulin\" \
                            -DBUILD_CONFIG=mysql_release \
                            -DCMAKE_INSTALL_PREFIX=/usr \
                            -DSYSCONFDIR=/etc \
                            -DSYSCONF2DIR=/etc/my.cnf.d \
                            -DMYSQL_DATADIR=/var/lib/mysql \
                            -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \
                            -DDEFAULT_CHARSET=utf8mb4 \
                            -DDEFAULT_COLLATION=utf8mb4_general_ci \
                            -DENABLED_LOCAL_INFILE=ON \
                            -DINSTALL_INFODIR=share/info \
                            -DINSTALL_MANDIR=share/man \
                            -DINSTALL_PLUGINDIR=lib/mysql/plugin \
                            -DINSTALL_SCRIPTDIR=bin \
                            -DINSTALL_INCLUDEDIR=include/mysql \
                            -DINSTALL_DOCREADMEDIR=share/doc/mariadb \
                            -DINSTALL_SUPPORTFILESDIR=share/mysql \
                            -DINSTALL_MYSQLSHAREDIR=share/mysql \
                            -DINSTALL_DOCDIR=share/doc/mariadb \
                            -DTMPDIR=/var/tmp \
                            -DCONNECT_WITH_MYSQL=ON \
                            -DCONNECT_WITH_LIBXML2=system \
                            -DCONNECT_WITH_ODBC=NO \
                            -DCONNECT_WITH_JDBC=NO \
                            -DPLUGIN_ARCHIVE=YES \
                            -DPLUGIN_ARIA=YES \
                            -DPLUGIN_BLACKHOLE=YES \
                            -DPLUGIN_CASSANDRA=NO \
                            -DPLUGIN_CSV=YES \
                            -DPLUGIN_MYISAM=YES \
                            -DPLUGIN_MROONGA=NO \
                            -DPLUGIN_OQGRAPH=NO \
                            -DPLUGIN_PARTITION=YES \
                            -DPLUGIN_SPHINX=NO \
                            -DPLUGIN_TOKUDB=NO \
                            -DPLUGIN_AUTH_GSSAPI=NO \
                            -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF \
                            -DPLUGIN_CRACKLIB_PASSWORD_CHECK=NO \
                            -DWITH_ASAN=OFF \
                            -DWITH_EMBEDDED_SERVER=ON \
                            -DWITH_EXTRA_CHARSETS=complex \
                            -DWITH_INNODB_BZIP2=OFF \
                            -DWITH_INNODB_LZ4=OFF \
                            -DWITH_INNODB_LZMA=ON \
                            -DWITH_INNODB_LZO=OFF \
                            -DWITH_INNODB_SNAPPY=OFF \
                            -DWITH_ROCKSDB_BZIP2=OFF \
                            -DWITH_ROCKSDB_JEMALLOC=OFF \
                            -DWITH_ROCKSDB_LZ4=OFF \
                            -DWITH_ROCKSDB_ZSTD=OFF \
                            -DWITH_ROCKSDB_SNAPPY=OFF \
                            -DWITH_JEMALLOC=NO \
                            -DWITH_LIBARCHIVE=system \
                            -DWITH_LIBNUMA=NO \
                            -DWITH_LIBWRAP=OFF \
                            -DWITH_LIBWSEP=OFF \
                            -DWITH_MARIABACKUP=ON \
                            -DWITH_PCRE=system \
                            -DWITH_READLINE=ON \
                            -DWITH_SYSTEMD=no \
                            -DWITH_SSL=system \
                            -DWITH_VALGRIND=OFF \
                            -DWITH_ZLIB=system \
                            -DSKIP_TESTS=ON")
Exemplo n.º 18
0
def build():
    scons.make('PREFIX=/usr \
                COMPILE_FLAGS="%s %s -lpthread" \
                BUILD_TESTS=0 \
                PYTHON=/usr/bin/python3' % (get.CXXFLAGS(), get.LDFLAGS()))
Exemplo n.º 19
0
def setup():
    # TODO: do we need that ?
    shelltools.export("CXXFLAGS",
                      get.CXXFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
    shelltools.export("CFLAGS",
                      get.CFLAGS().replace("-D_FORTIFY_SOURCE=2", ""))
    inarytools.dosed("runtime/tools/mve.awk", "#!/usr/bin/nawk -f",
                     "#!/usr/bin/awk -f")

    # define the place for the global (g)vimrc file (set to /etc/vim/vimrc)
    shelltools.echo("src/feature.h",
                    "#define SYS_VIMRC_FILE \"/etc/vim/vimrc\"")

    # our binary ctags file is names as exuberant-ctags
    inarytools.dosed("runtime/doc/syntax.txt", "(ctags(\"| [-*.]|\\s+/))",
                     "exuberant-\\1")
    inarytools.dosed("runtime/doc/tagsrch.txt", "(ctags(\"| [-*.]|\\s+/))",
                     "exuberant-\\1")
    inarytools.dosed("runtime/doc/usr_29.txt", "(ctags(\"| [-*.]|\\s+/))",
                     "exuberant-\\1")
    inarytools.dosed("runtime/menu.vim", "(ctags(\"| [-*.]|\\s+/))",
                     "exuberant-\\1")
    #    inarytools.dosed("src/configure.in", "(ctags(\"| [-*.]|\\s+/))", "exuberant-\\1")

    # TODO: do we need that ?
    #    inarytools.dosed("src/configure.in", r"libc\.h", "")

    # TODO: we could need that
    #autotools.make("-C src autoconf")

    # TODO: * We should use "big" feature instead of "huge".
    #       * Investigate impacts on current use
    options = "--with-features=huge \
              --enable-multibyte \
              --enable-perlinterp \
              --enable-pythoninterp \
              --enable-python3interp \
              --with-python3-config-dir=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/ \
              --enable-rubyinterp \
              --enable-gui=no \
              --with-tlib=ncurses \
              --prefix=/usr \
              --localstatedir=/var/lib/vim \
              --with-features=big \
              --disable-acl \
              --with-compiledby=Sulin \
              --enable-gpm \
              --enable-acl \
              --enable-cscope \
              --disable-netbeans \
              --disable-luainterp \
              --with-x=no \
              --with-modified-by=Sulin"

    if get.buildTYPE() == "gui":
        options += " --enable-gui=gtk2 \
                     --with-vim-name=gvim \
                     --with-view-name=gview \
                     --with-x=yes"

    autotools.configure(options)