def setup(): if not shelltools.can_access_directory("tools/clang"): shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION()) shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang") if not shelltools.can_access_directory("projects/compiler-rt"): shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION()) shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt") shelltools.export("LD_LIBRARY_PATH", "%s/Release/lib/" % os.getcwd()) shelltools.export("CC", "gcc") shelltools.export("CXX", "g++") autotools.rawConfigure("--prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib/llvm \ --enable-libffi \ --enable-optimized \ --enable-shared \ --disable-assertions \ --disable-debug-runtime \ --host=%s \ --build=%s \ --with-gcc-toolchain=/usr \ --disable-expensive-checks" % (get.HOST(), get.HOST()))
def setup(): for f in shelltools.ls("*/po/Make-in"): pisitools.dosed(f, "(?m)^(datadir = )$(prefix)/@DATADIRNAME@", r"@datadir@") pisitools.dosed(f, "(?m)^(gnulocaledir = )$(prefix)/share", r"$(datadir)") libtools.gnuconfig_update() conf = "--without-included-gettext \ --disable-nls \ --host=%s \ --target=%s\ --datadir=%s \ --infodir=%s/info \ --mandir=%s/man \ --bindir=%s \ --libdir=%s \ --libexecdir=%s \ --includedir=%s \ --enable-shared \ --disable-werror" % (get.HOST(), get.HOST(), datapath, datapath,\ datapath, binpath, libpath, libpath, incpath) shelltools.makedirs("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR()) shelltools.cd("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR()) shelltools.system("%s/%s/configure %s" % (get.workDIR(), WorkDir, conf))
def setup(): shelltools.chmod("scripts/*.sh") undef_variables() conf = "--disable-dev-erandom \ --with-tls \ --with-__thread \ --enable-add-ons=nptl,c_stubs,glibc-compat,libidn \ --enable-kernel=2.6.11 \ --without-cvs \ --without-selinux \ --enable-bind-now \ --build=%s \ --host=%s \ --disable-profile \ --without-gd \ --with-headers=/usr/include \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --libexecdir=/usr/lib/misc" % (get.HOST(), get.HOST()) shelltools.makedirs("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR()) shelltools.cd("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR()) shelltools.system("%s/%s/configure %s" % (get.workDIR(), WorkDir, conf))
def setup(): exportFlags() shelltools.export("CPPFLAGS", "") # Maintainer mode off, do not force recreation of generated files # shelltools.system("contrib/gcc_update --touch") shelltools.makedirs("build") shelltools.cd("build") cmd = '../configure \ --prefix=/usr \ --bindir=/usr/bin \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --includedir=/usr/include \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --build=%s \ --host=%s \ --target=%s \ --disable-libgcj \ --disable-nls \ --disable-mudflap \ --disable-libmudflap \ --disable-libunwind-exceptions \ --enable-checking=release \ --enable-clocale=gnu \ --enable-__cxa_atexit \ --enable-languages=c,c++,fortran,objc,obj-c++,lto \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-shared \ --enable-ssp \ --disable-libssp \ --enable-plugin \ --enable-threads=posix \ --without-included-gettext \ %s \ %s \ %s \ --with-system-zlib \ --with-pkgversion="Pardus Linux" \ --with-bugurl=http://bugs.pardus.org.tr' % ( get.HOST(), get.HOST(), get.HOST(), opt_arch, opt_unwind, opt_multilib) # FIXME: this is supposed to be detected automatically #--enable-long-long \ # --enable-gnu-unique-object \ enable with binutils > 2.20.51.0.2 # --disable-libunwind-exceptions # experiment with libunwind >= 0.99 if get.ARCH() == "arm": cmd = "sb2 %s --with-gxx-include-dir=%s/usr/include/c++" % ( cmd, get.sysroot()) else: cmd += "--with-gxx-include-dir=/usr/include/c++" shelltools.system(cmd)
def exportFlags(): # we set real flags with new configure settings, these are just safe optimizations shelltools.export("CFLAGS", cflags) shelltools.export("CXXFLAGS", cflags) # shelltools.export("LDFLAGS", "") # FIXME: this may not be necessary for biarch shelltools.export("CC", "%s-gcc" % get.HOST()) shelltools.export("CXX", "%s-g++" % get.HOST()) shelltools.export("LC_ALL", "en_US.UTF-8")
def set_variables(cfg): shelltools.export("LANGUAGE", "C") shelltools.export("LANG", "C") shelltools.export("LC_ALL", "C") shelltools.export("CC", "%s-gcc %s" % (get.HOST(), cfg["coreflags"])) shelltools.export("CXX", "%s-g++ %s" % (get.HOST(), cfg["coreflags"])) shelltools.export("LD", "%s-gcc" % get.HOST()) shelltools.export("CPPFLAGS", "") shelltools.export("LDFLAGS", "") shelltools.export("CFLAGS", cfg["buildflags"]) shelltools.export("CXXFLAGS", cfg["buildflags"])
def install(): shelltools.cd("%s/build-default-i686-pc-linux-gnu-nptl" % get.workDIR()) autotools.rawInstall("DESTDIR=%s tooldir=%s" % (get.installDIR(), libpath)) pisitools.removeDir("%s/bin" % libpath) pisitools.insinto(incpath, "include/libiberty.h") pisitools.domove("%s/lib/ldscripts/" % libpath, "%s/ldscripts" % libpath) pisitools.removeDir(libpath + "/lib") pisitools.dodir("/usr/%s/lib" % get.HOST()) pisitools.dodoc("README") # create /usr/bin/* --> /usr/i686-pc-linux-gnu/binutils-bin/2.16.1/nm for bin in shelltools.ls("%s/usr/%s/binutils-bin/%s/" % (get.installDIR(), get.HOST(), get.srcVERSION())): pisitools.dosym("/usr/%s/binutils-bin/%s/%s" % (get.HOST(), get.srcVERSION(), bin), \ "/usr/bin/%s-%s" % (get.HOST(), bin)) pisitools.dosym("/usr/%s/binutils-bin/%s/%s" % (get.HOST(), get.srcVERSION(), bin), \ "/usr/bin/%s" % (bin)) # create usr/i686-pc-linux-gnu/lib/* --> /usr/lib/binutils/i686-pc-linux-gnu/2.16.1/* links for lib in shelltools.ls("%s/usr/lib/binutils/%s/%s/" % (get.installDIR(), get.HOST(), get.srcVERSION())): pisitools.dosym("/usr/lib/binutils/%s/%s/%s" % (get.HOST(), get.srcVERSION(), lib), \ "/usr/%s/lib/%s" % (get.HOST(), lib)) pisitools.remove("/usr/%s/lib/include" % get.HOST()) shelltools.cd("%s/%s" % (get.workDIR(), WorkDir)) # Handle documentation pisitools.newdoc("bfd/README", "bfd/README") pisitools.newdoc("bfd/PORTING", "bfd/PORTING") pisitools.newdoc("bfd/TODO", "bfd/TODO") pisitools.newdoc("binutils/ChangeLog", "binutils/ChangeLog") pisitools.newdoc("binutils/NEWS", "binutils/NEWS") pisitools.newdoc("binutils/README", "binutils/README") pisitools.newdoc("gas/CONTRIBUTORS", "gas/CONTRIBUTORS") pisitools.newdoc("gas/NEWS", "gas/NEWS") pisitools.newdoc("gas/README", "gas/README") pisitools.newdoc("gas/README-vms", "gas/README-vms") pisitools.newdoc("gprof/ChangeLog", "gprof/ChangeLog") pisitools.newdoc("gprof/ChangeLog.linux", "gprof/ChangeLog.linux") pisitools.newdoc("gprof/TEST", "gprof/TEST") pisitools.newdoc("gprof/TODO", "gprof/TODO") pisitools.newdoc("gprof/bbconv.pl", "gprof/bbconv.pl") pisitools.newdoc("ld/README", "ld/README") pisitools.newdoc("ld/NEWS", "ld/NEWS") pisitools.newdoc("ld/TODO", "ld/TODO") pisitools.newdoc("libiberty/ChangeLog.linux", "libiberty/ChangeLog.linux") pisitools.newdoc("libiberty/ChangeLog", "libiberty/ChangeLog") pisitools.newdoc("libiberty/README", "libiberty/README")
def setup(): shelltools.export("LDFLAGS", "-Wl,-z,defs") args = '../configure \ --prefix=/%s \ --build=%s \ --mandir=/%s \ --infodir=/%s \ --datadir=/%s \ --sysconfdir=/%s \ --localstatedir=/%s \ --libexecdir=/%s \ ' % (get.defaultprefixDIR(), \ get.HOST(), get.manDIR(), \ get.infoDIR(), get.dataDIR(), \ get.confDIR(), get.localstateDIR(), get.libexecDIR()) args += "--with-pic \ --disable-static \ --with-ipc=%(ipc_type)s \ --program-suffix=-%(ipc_type)s" for ipc_type in ipc_types: shelltools.makedirs(ipc_type) shelltools.cd(ipc_type) shelltools.system(args % {'ipc_type':ipc_type}) shelltools.cd('..')
def configure(parameters = ''): '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"''' # Set clang as compiler if supported if get.canClang(): export ("CC", "clang") export ("CXX", "clang++") if can_access_file('configure'): gnuconfig_update() prefix = get.emul32prefixDIR() if get.buildTYPE() == "emul32" else get.defaultprefixDIR() args = './configure \ --prefix=/%s \ --build=%s \ --mandir=/%s \ --infodir=/%s \ --datadir=/%s \ --sysconfdir=/%s \ --localstatedir=/%s \ --libexecdir=/%s \ %s' % (prefix, \ get.HOST(), get.manDIR(), \ get.infoDIR(), get.dataDIR(), \ get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters) if get.buildTYPE() == "emul32": args += " --libdir=/usr/lib32" if system(args): raise ConfigureError(_('Configure failed.')) else: raise ConfigureError(_('No configure script found.'))
def setup(): shelltools.copy("/usr/share/automake/install-sh", ".") shelltools.export("WANT_AUTOCONF", "2.5") autotools.autoconf() shelltools.export("CFLAGS", "%s -fPIC" % get.CFLAGS()) autotools.rawConfigure("./configure --libdir=/lib \ --enable-static-libpam \ --enable-fakeroot=%s \ --enable-isadir=/lib/security \ --host=%s" % (get.installDIR(), get.HOST())) # Python stuff in docs gives sandbox problems pisitools.dosed("Makefile", "modules doc examples", "modules") # Do not build pam_userdb.so ... pisitools.dosed("Make.Rules", "^HAVE_NDBM_H=yes", "HAVE_NDBM_H=no") pisitools.dosed("Make.Rules", "^HAVE_LIBNDBM=yes", "HAVE_LIBNDBM=no") pisitools.dosed("Make.Rules", "^HAVE_LIBDB=yes", "HAVE_LIBDB=no") # Also edit the configuration file else the wrong include files get used pisitools.dosed("_pam_aconf.h", "^#define HAVE_NDBM_H.*$", "/* #undef HAVE_NDBM_H */") pisitools.dosed("_pam_aconf.h", "^#define HAVE_DB_H.*$", "/* #undef HAVE_DB_H */")
def install(): autotools.install() # Create symlinks for cc in ("gcc", "g++", "cc", "c++"): # , "clang" , "clang++" pisitools.dosym("../../../bin/ccache", "/usr/lib/ccache/bin/%s" % cc) pisitools.dosym("../../../bin/ccache", "/usr/lib/ccache/bin/%s-%s" % (get.HOST(), cc))
def install(): shelltools.cd("build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) for header in ["limits.h", "syslimits.h"]: pisitools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # cc symlink pisitools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") # Remove our options section from crt stuff """ removePardusSection("%s/usr/lib/" % get.installDIR()) if get.ARCH() == "x86_64": removePardusSection("%s/usr/lib32/" % get.installDIR()) """ # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir)
def install(): shelltools.cd("../build") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) #autotools.install() for header in ["limits.h", "syslimits.h"]: pisitools.insinto( "/usr/lib/gcc/%s/%s/include" % (get.HOST(), verMajor), "gcc/include-fixed/%s" % header) # Not needed pisitools.removeDir("/usr/lib/gcc/*/*/include-fixed") pisitools.removeDir("/usr/lib/gcc/*/*/install-tools") # This one comes with binutils #pisitools.remove("/usr/lib*/libiberty.a") # cc symlink pisitools.dosym("/usr/bin/gcc", "/usr/bin/cc") # /lib/cpp symlink for legacy X11 stuff pisitools.dosym("/usr/bin/cpp", "/lib/cpp") # autoload gdb pretty printers gdbpy_dir = "/usr/share/gdb/auto-load/usr/lib/" pisitools.dodir(gdbpy_dir) gdbpy_files = shelltools.ls("%s/usr/lib/libstdc++*gdb.py*" % get.installDIR()) for i in gdbpy_files: pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), gdbpy_dir)
def setup(): set_variables() shelltools.makedirs("build") shelltools.cd("build") options = "--prefix=/usr \ --enable-add-ons=nptl,libidn \ --enable-obsolete-rpc \ --enable-kernel=3.2.5 \ --enable-bind-now \ --disable-profile \ --enable-stackguard-randomization \ --enable-multi-arch \ --without-cvs \ --without-gd \ --without-selinux \ --with-tls \ --with-__thread" if get.buildTYPE() == "emul32": options += " --libdir=/usr/lib32 \ --libexecdir=/usr/lib32/misc \ --build=i686-pc-linux-gnu" else: options += " --libdir=/usr/lib \ --libexecdir=/usr/lib/misc \ --build=%s" % get.HOST() shelltools.system("../configure %s" % options)
def setup(): #pisitools.ldflags.add("-fuse-ld=lld -rtlib=libgcc") #pisitools.cflags.remove("-D_FORTIFY_SOURCE=2") #pisitools.cxxflags.remove("-D_FORTIFY_SOURCE=2") if get.buildTYPE() == "emul32": shelltools.export("CC", "gcc -m32") shelltools.export("CXX", "g++ -m32") #shelltools.export("CC", "clang -m32") #shelltools.export("CXX", "clang++ -m32") shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig") #clang patch #shelltools.cd("tools") #shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch") #shelltools.cd("..") else: shelltools.export("CC", "gcc") shelltools.export("CXX", "g++") #shelltools.export("CC", "clang") #shelltools.export("CXX", "clang++") shelltools.makedirs("llvm/build") shelltools.cd("llvm/build") if get.buildTYPE() != "emul32": pisitools.cflags.add("-m64") pisitools.cxxflags.add("-m64") options = "-DLLVM_TARGET_ARCH:STRING=x86_64 \ -DLLDB_ENABLE_LUA=OFF \ -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST() if get.buildTYPE() == "emul32": pisitools.cflags.add("-m32") pisitools.cxxflags.add("-m32") options = " -DCMAKE_INSTALL_PREFIX=/emul32 \ -DLLVM_TARGET_ARCH:STRING=i686 \ -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu'" cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \ -G 'Ninja' \ %s \ -DLLVM_ENABLE_PROJECTS='%s' \ -DLLVM_LIBDIR_SUFFIX=%s \ -DLLVM_ENABLE_FFI=ON \ -DLLVM_BUILD_DOCS=OFF \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_ENABLE_EH=ON \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DCLANG_LINK_CLANG_DYLIB=ON \ -DLLDB_USE_SYSTEM_SIX=1 \ -DLLVM_INCLUDEDIR=/usr/include \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DFFI_INCLUDE_DIR=/usr/include \ -DCOMPILER_RT_USE_LIBCXX=OFF" % (options, projects, libsuffix), sourceDir="..")
def setup(): shelltools.export("CC", get.CC()) shelltools.export("CXX", get.CXX()) # many fun sandbox errors, phhh autotools.rawConfigure("--host=%s --prefix=/usr --mandir=/usr/share/man \ --infodir=%s/usr/share/info" % (get.HOST(), get.installDIR()))
def setup(): shelltools.export("CFLAGS", "%s -fPIC" % get.CFLAGS()) autotools.autoreconf() autotools.rawConfigure("--libdir=/lib \ --enable-fakeroot=%s \ --host=%s \ --enable-isadir=/lib/security" % (get.installDIR(),get.HOST()))
def setup(): # Build binutils with LD_SYMBOLIC_FUNCTIONS=1 and reduce PLT relocations in libfd.so by 84%. shelltools.export("LD_SYMBOLIC_FUNCTIONS", "1") autotools.configure('--enable-shared \ --host=%s \ --target=%s \ --enable-gold \ --enable-plugins \ --enable-threads \ --with-pkgversion="Pardus Linux" \ --with-bugurl=http://bugs.pardus.org.tr/ \ --with-separate-debug-dir=/usr/lib/debug \ %s \ --disable-nls \ --disable-werror' % (get.HOST(), get.HOST(), multilib))
def setup(): exportFlags() # Maintainer mode off, do not force recreation of generated files #shelltools.system("contrib/gcc_update --touch") shelltools.cd("../") shelltools.makedirs("build") shelltools.cd("build") shelltools.system('.././gcc-%s/configure \ --prefix=/usr \ --bindir=/usr/bin \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --includedir=/usr/include \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-gxx-include-dir=/usr/include/c++ \ --build=%s \ --disable-libgcj \ --disable-nls \ --disable-mudflap \ --disable-libmudflap \ --disable-libunwind-exceptions \ --with-linker-hash-style=gnu \ --enable-checking=release \ --enable-clocale=gnu \ --enable-__cxa_atexit \ --enable-languages=c,c++,fortran,objc,obj-c++,lto \ --enable-libstdcxx-allocator=new \ --disable-libstdcxx-pch \ --enable-cloog-backend=isl \ --disable-cloog-version-check \ --enable-shared \ --enable-lto \ --enable-gold \ --enable-ld=default \ --enable-plugin \ --with-plugin-ld=ld.gold \ --enable-ssp \ --disable-libssp \ --enable-plugin \ --enable-threads=posix \ --disable-libstdcxx-pch \ --enable-linker-build-id \ --without-included-gettext \ %s \ %s \ %s \ --with-tune=generic \ --with-system-zlib \ --enable-checking=release \ --with-tune=generic \ --enable-gnu-unique-object \ --with-pkgversion="Pisi Linux" \ --disable-libunwind-exceptions \ --enable-long-long \ --with-bugurl=http://bugs.pisilinux.org' % ( verMajor , get.HOST(), opt_arch, opt_unwind, opt_multilib))
def setup(): if get.buildTYPE() != "emul32": if not shelltools.can_access_directory("tools/clang"): shelltools.system("tar xf ../cfe-%s.src.tar.xz -C tools" % get.srcVERSION()) shelltools.move("tools/cfe-%s.src" % get.srcVERSION(), "tools/clang") shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION()) shelltools.move("tools/clang-tools-extra-*", "tools/clang/extra") shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION()) shelltools.move("tools/lldb-*", "tools/lldb") if not shelltools.can_access_directory("projects/compiler-rt"): shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION()) shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt") shelltools.export("CC", "gcc") shelltools.export("CXX", "g++") if get.buildTYPE() == "emul32": shelltools.export("CC", "gcc -m32") shelltools.export("CXX", "g++ -m32") shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig") shelltools.makedirs("build") shelltools.cd("build") if get.buildTYPE() != "emul32": options = "-DCMAKE_C_FLAGS:STRING=-m64 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_CXX_FLAGS:STRING=-m64 \ -DLLVM_TARGET_ARCH:STRING=x86_64 \ -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST() if get.buildTYPE() == "emul32": options = " -DCMAKE_C_FLAGS:STRING=-m32 \ -DCMAKE_INSTALL_PREFIX=/emul32 \ -DLLVM_TARGET_ARCH:STRING=i686 \ -DLLVM_LIBDIR_SUFFIX=32 \ -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \ -DCMAKE_CXX_FLAGS:STRING=-m32" cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \ %s \ -DLLVM_ENABLE_FFI=ON \ -DLLVM_BUILD_DOCS=OFF \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_ENABLE_RTTI=ON \ -DLLVM_INCLUDEDIR=/usr/include \ -DLLVM_ENABLE_ASSERTIONS=OFF \ -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \ -DENABLE_SHARED=ON" % options, sourceDir=".." )
def setup(): autotools.autoreconf("-fi") # All the other directories are configured through prefix. # autotools.configure() overrides them causing some directories # not prefixed by /var/pisi while installing, boom sandbox violations. # Briefly, use rawConfigure() here, (Fixes #8738) autotools.rawConfigure("--prefix=/usr \ --build=%s \ --enable-shared" % get.HOST())
def setup(): pisitools.dosed("gcc/config.in", "HAVE_LD_AS_NEEDED", "USE_LD_AS_NEEDED") # Branding :P pisitools.dosed("gcc/version.c", "<URL:http://gcc.gnu.org/bugs.html>", "<URL:http://bugs.pardus.org.tr>") libtools.gnuconfig_update() shelltools.export("GCC_LANG", "c,c++,objc,f77") # Gcc don't like mcpu flag while bootstrapping itself shelltools.export("CFLAGS", "-march=i686 -O2 -pipe -fomit-frame-pointer") shelltools.export("CXXFLAGS", "-march=i686 -O2 -pipe -fomit-frame-pointer") conf = "--enable-version-specific-runtime-libs \ --prefix=%s \ --bindir=%s \ --includedir=%s \ --datadir=%s \ --mandir=%s \ --infodir=%s \ --with-gxx-include-dir=%s \ --host=%s \ --build=%s \ --disable-altivec \ --disable-nls \ --without-included-gettext \ --with-system-zlib \ --disable-checking \ --disable-werror \ --disable-libunwind-exceptions \ --disable-multilib \ --enable-languages=c,c++,objc,f77 \ --enable-shared \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-clocale=gnu" % (PREFIX, BINPATH, INCDIR, DATAPATH, MANPATH, INFOPATH, STDCXX_INCDIR, get.HOST(), get.HOST()) shelltools.makedirs("%s/build" % get.workDIR()) shelltools.cd("%s/build" % get.workDIR()) shelltools.system("%s/%s/configure %s" % (get.workDIR(), WorkDir, conf))
def removePacklist(): ''' cleans .packlist file from perl packages ''' path = '%s/%s' % (get.installDIR( ), "/usr/lib/perl5/vendor_perl/%s/%s-linux-thread-multi/auto/" % (get.curPERL(), get.HOST().split("-")[0])) for root, dirs, files in os.walk(path): for packFile in files: if packFile == ".packlist": if can_access_file('%s/%s' % (root, packFile)): unlink('%s/%s' % (root, packFile))
def install(): autotools.install() # Create symlinks for cc in ("gcc", "g++", "cc", "c++"): pisitools.dosym("../../../bin/ccache", "/usr/lib/ccache/bin/%s" % cc) pisitools.dosym("../../../bin/ccache", "/usr/lib/ccache/bin/%s-%s" % (get.HOST(), cc)) pisitools.dodoc("LICENSE.txt", "README.txt")
def configure(parameters='', configure_cmd='./configure', no_default_vars=False, no_sb2=False): '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"''' if can_access_file(configure_cmd): gnuconfig_update() cmd = '%s \ --prefix=/%s \ --mandir=/%s \ --infodir=/%s \ --datadir=/%s \ --sysconfdir=/%s \ --localstatedir=/%s \ --libexecdir=/%s \ %s' % (configure_cmd, get.defaultprefixDIR(), \ get.manDIR(), get.infoDIR(), get.dataDIR(), \ get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters) if crosscompiling: if no_sb2 and not no_default_vars: cmd += " --build=%s \ --host=%s" % (get.BUILD(), get.HOST()) elif not no_sb2 and no_default_vars: cmd += "sb2 %s \ --build=%s \ --host=%s" % (cmd, get.BUILD(), get.HOST()) elif not no_sb2 and not no_default_vars: cmd = "sb2 %s \ --build=%s \ --host=%s" % (cmd, get.HOST(), get.HOST()) else: if not no_default_vars: cmd += " --build=%s" % get.BUILD() if system(cmd): raise ConfigureError(_('Configure failed.')) else: raise ConfigureError(_('No configure script found.'))
def setup(): shelltools.cd("build_unix") shelltools.system("../dist/configure \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --datadir=/usr/share \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --libdir=/usr/lib \ --enable-compat185 \ --with-uniquename \ --enable-rpc \ --host=%s \ --enable-java \ --disable-cxx \ --disable-tcl \ --disable-static \ --build=%s" % (get.HOST(), get.HOST()))
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) pisitools.dodoc("AUTHORS.txt", "ChangeLog", "LICENSE", "NEWS.txt") shelltools.chmod( "%s/usr/lib/perl5/vendor_perl/%s/%s-linux-thread-multi/auto/Image/Magick/Magick.so" % (get.installDIR(), get.curPERL(), get.HOST().split("-")[0])) pisitools.remove("/usr/lib/*.la") perlmodules.removePacklist() perlmodules.removePodfiles()
def setup(): undef_variables() shelltools.makedirs("build") shelltools.cd("build") shelltools.system("../configure \ --with-tls \ --with-__thread \ --enable-add-ons=nptl,libidn \ --enable-bind-now \ --enable-kernel=2.6.24 \ --without-cvs \ --without-selinux \ --build=%s \ --host=%s \ --disable-profile \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --libexecdir=/usr/lib/misc" % (get.HOST(), get.HOST()))
def setup(): pisitools.remove("dist/ltversion.sh") pisitools.remove("dist/config.guest") libtools.gnuconfig_update() shelltools.makedirs("build-static") shelltools.makedirs("build-shared") conf = "--host=%s \ --build=%s \ --enable-cxx \ --enable-compat185 \ --disable-java \ --prefix=/usr" % (get.HOST(), get.HOST()) shelltools.cd("build-static") shelltools.system("../dist/configure %s --libdir=/usr/lib --enable-static" % conf) shelltools.cd("../build-shared") shelltools.system("../dist/configure %s --libdir=/usr/lib --enable-dynamic --enable-shared" % conf)
def setup(): shelltools.cd("%s" % get.workDIR()) shelltools.move("gcc-*", "gcc-%s" % get.srcVERSION()) shelltools.cd("gcc-%s" % get.srcVERSION()) exportFlags() # Maintainer mode off, do not force recreation of generated files #shelltools.system("contrib/gcc_update --touch") pisitools.dosed("gcc/Makefile.in", "\.\/fixinc\.sh", "-c true") pisitools.dosed("gcc/configure", "^(ac_cpp='\$CPP\s\$CPPFLAGS)", r"\1 -O2") pisitools.dosed("libiberty/configure", "^(ac_cpp='\$CPP\s\$CPPFLAGS)", r"\1 -O2") shelltools.move("../isl-0.21", "isl") #shelltools.move("mpfr-4.1.0", "mpfr") #shelltools.move("mpc-1.2.0", "mpc") #shelltools.move("gmp-6.2.0", "gmp") #shelltools.cd("../") shelltools.makedirs("build") shelltools.cd("build") shelltools.system('../configure \ --prefix=/usr \ --bindir=/usr/bin \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --includedir=/usr/include \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-bugurl=http://bugs.pisilinux.org \ --enable-languages=c,c++,fortran,lto,objc,obj-c++ \ --enable-cet=auto \ --enable-shared \ --enable-threads=posix \ --with-system-zlib \ --enable-__cxa_atexit \ --disable-libunwind-exceptions \ --enable-clocale=gnu \ --disable-libstdcxx-pch \ --disable-libssp \ --enable-gnu-unique-object \ --enable-linker-build-id \ --with-isl \ --enable-gnu-indirect-function \ --enable-lto \ --enable-plugin \ --with-linker-hash-style=gnu \ --with-pkgversion="Pisi Linux" \ --disable-werror \ --enable-checking=release \ --build=%s \ %s \ %s ' % (get.HOST(), opt_arch, opt_multilib))