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")))
def build(): shelltools.export("LDFLAGS", "%s -Wl,-z,now" % get.LDFLAGS()) # inarytools.dosed("Makefile", "gcc (\-Wall.*)", "%s \\1 %s" % (get.CC(), get.CFLAGS())) inarytools.dosed("Makefile", "^(LDFLAGS[ \t]+=).*", "\\1 %s" % get.LDFLAGS()) autotools.make()
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)
def setup(): shelltools.export("CFLAGS","%s -fpie" % get.CFLAGS()) shelltools.export("LDFLAGS","%s -pie" % get.LDFLAGS()) #inarytools.dosed("pathnames.h", "/usr/X11R6/bin/xauth", r"/usr/bin/xauth") #inarytools.dosed("sshd_config", "(?m)^(^#UsePAM ).*", r"UsePAM yes") #inarytools.dosed("sshd_config", "(?m)^(^#PasswordAuthentication ).*", r"PasswordAuthentication no") #inarytools.dosed("sshd_config", "(?m)^(^#X11Forwarding ).*", r"X11Forwarding yes") #inarytools.dosed("sshd_config", "(?m)^(^#UseDNS ).*", r"UseDNS no") #inarytools.dosed("sshd_config", "(?m)^(^#PermitRootLogin ).*", r"PermitRootLogin no") autotools.autoreconf("-fi") # Kerberos support is a must, libedit is optional # Update configure parameters when both are ready autotools.configure("--sysconfdir=/etc/ssh \ --libexecdir=/usr/libexec/openssh \ --datadir=/usr/share/openssh \ --disable-strip \ --with-pam \ --with-libedit \ --with-kerberos5 \ --with-tcp-wrappers \ --with-md5-passwords \ --with-ipaddr-display \ --with-privsep-user=sshd \ --with-privsep-path=/var/empty \ --without-zlib-version-check \ --without-ssl-engine")
def setup(): options = "-with-xinput=yes \ --enable-man" #shelltools.export("CFLAGS", get.CFLAGS().replace("-fomit-frame-pointer","")) #gtk2 needs -DGTK_COMPILATION CPPFLAG when compiling itself #Avoid "Only <gtk/gtk.h> can be included directly error" shelltools.export("CPPFLAGS", "-DGTK_COMPILATION") if get.buildTYPE() == "emul32": options += " --libdir=/usr/lib32 \ --bindir=/usr/bin32 \ --sbindir=/usr/sbin32 \ --disable-cups" shelltools.export("CC", "%s -m32" % get.CC()) shelltools.export("CXX", "%s -m32" % get.CC()) shelltools.export("CXXFLAGS", "%s -m32" % get.CFLAGS()) shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS()) shelltools.export("CPPFLAGS", "-DGTK_COMPILATION") autotools.autoconf() autotools.configure(options) inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def setup(): options = "--prefix=/usr \ --sysconfdir=/etc \ --enable-x11-backend \ --enable-broadway-backend \ --disable-wayland-backend \ " shelltools.export("CFLAGS", get.CFLAGS().replace("-fomit-frame-pointer", "")) if get.buildTYPE() == "emul32": options += " --libdir=/usr/lib32 \ --bindir=/usr/bin32 \ --sbindir=/usr/sbin32 \ --enable-colord=no \ " shelltools.export("CC", "%s -m32" % get.CC()) shelltools.export("CXX", "%s -m32" % get.CC()) shelltools.export( "CFLAGS", "%s -m32" % get.CFLAGS().replace("-fomit-frame-pointer", "")) shelltools.export("CXXFLAGS", "%s -m32" % get.CFLAGS()) shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS()) shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig") inarytools.dosed("configure.ac", "cups-config", "cups-config-32bit") autotools.autoreconf("-fiv") autotools.configure(options) inarytools.dosed("libtool", "( -shared )", r" -Wl,-O1,--as-needed\1")
def setup(): inarytools.dosed( "src/Makefile", "^CFLAGS.*$", "CFLAGS=%s -fPIC -DLUA_USE_LINUX -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" % get.CFLAGS()) inarytools.dosed("src/Makefile", "^MYLDFLAGS.*$", "MYLDFLAGS=%s" % get.LDFLAGS()) inarytools.dosed("lua.pc", "%VER%", "%s" % major) inarytools.dosed("lua.pc", "%REL%", "%s" % get.srcVERSION())
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 ")
def setup(): shelltools.export("LDFLAGS", "%s -ldl" % get.LDFLAGS()) autotools.configure("--prefix=/usr \ --disable-static \ --disable-schemas-compile \ --enable-libnotify \ --with-nvidia") # for fix unused dependency inarytools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
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")
def build(): MINOR = "7" REL = "6" shelltools.export("SULIN_CFLAGS", "%s" % get.CFLAGS()) args = 'REAL_DAEMON_DIR=%s \ SULIN_OPT="-fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" \ MAJOR=0 MINOR=%s REL=%s' % (get.sbinDIR(), MINOR, REL) autotools.make("%s config-check" % args) autotools.make('%s LDFLAGS="-pie %s" linux' % (args, get.LDFLAGS()))
def setup(): # FIXME: shelltools.echo() appends to the end of the file by default so clear them first shelltools.unlink('conf-cc') shelltools.unlink('conf-ld') shelltools.unlink('conf-home') shelltools.echo( 'conf-cc', "%s %s -malign-double -fPIC -DPIC" % (get.CC(), get.CFLAGS().replace( "-D_FORTIFY_SOURCE=2", "").replace("-fomit-frame-pointer", ""))) shelltools.echo('conf-ld', "%s %s" % (get.CC(), get.LDFLAGS())) shelltools.echo('conf-home', "%s/usr" % get.installDIR())
def builddiet(): inarytools.flags.add("-fno-lto") shelltools.export("LIBS", "-lpthread -luuid") dietCC = "diet %s %s %s -Os -static" % (get.CC(), get.CFLAGS(), get.LDFLAGS()) #dietCC = "%s %s %s -Os -static" % (get.CC(), get.CFLAGS(), get.LDFLAGS()) shelltools.export("CC", dietCC) autotools.make("distclean") autotools.autoreconf("-fi") autotools.configure('--with-thin-check= \ --with-thin-dump= \ --with-thin-repair= \ --with-thin-restore= \ --with-cache-check= \ --with-cache-dump= \ --with-cache-repair= \ --with-cache-restore= \ ac_cv_lib_dl_dlopen=no \ --with-staticdir="/sbin" \ --enable-debug \ --with-optimisation=\"%s -Os\" \ --enable-static_link \ --with-lvm1=internal \ --disable-readline \ --disable-nls \ --disable-selinux \ --with-confdir=/etc \ --enable-applib \ --enable-cmdlib \ --enable-pkgconfig \ --enable-udev_rules \ --with-systemdsystemunitdir=no \ --enable-udev_sync' % get.CFLAGS()) #inarytools.dosed("lib/misc/configure.h","rpl_malloc","malloc") #inarytools.dosed("lib/misc/configure.h","rpl_realloc","realloc") autotools.make("-j1 -C include") autotools.make("-j1 -C lib LIB_SHARED= VERSIONED_SHLIB=") autotools.make("-j1 -C libdm LIB_SHARED= VERSIONED_SHLIB=") autotools.make("-j1 -C tools install_dmsetup_dynamic") autotools.make("-j1 -C udev install") autotools.make("-j1 -C libdaemon LIB_SHARED= VERSIONED_SHLIB=") autotools.make( "-j1 -C tools dmsetup.static lvm.static DIETLIBC_LIBS=\"-lcompat\"") inarytools.insinto("/usr/lib/dietlibc/lib-i386", "libdm/ioctl/libdevmapper.a") inarytools.insinto("/sbin/", "tools/lvm.static") inarytools.insinto("/sbin/", "tools/dmsetup.static")
def setup(): # Respect the user LDFLAGS shelltools.system("./autogen.sh") shelltools.export("EXTRA_LDFLAGS", get.LDFLAGS()) autotools.configure("PYTHON=python2 \ --prefix=/usr \ --disable-static \ --with-apache-libexecdir \ --with-lz4=internal \ --with-utf8proc=internal") inarytools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
def build(): if get.LDFLAGS(): ld = "-j1 LD=%s %s" % (get.LD(), get.LDFLAGS()) else: ld = "-j1 LD=%s" % get.LD() autotools.make(ld) shelltools.cd("contrib") autotools.make(ld) shelltools.cd("..") shelltools.cd("contrib/xml2") autotools.make(ld) shelltools.cd("../..") shelltools.cd("src/interfaces/libpq") autotools.make(ld) shelltools.cd("../../..") shelltools.cd("doc") autotools.make(ld) shelltools.cd("..")
def setup(): shelltools.export( "CFLAGS", "%s -fPIC -fno-strict-aliasing -fPIE -DPIE " % get.CFLAGS()) shelltools.export("LDFLAGS", "%s -pie -Wl,-z,now" % get.LDFLAGS()) autotools.autoreconf("-fi") autotools.configure("--disable-static \ --disable-dependency-tracking \ --disable-rpath \ --localstatedir=/var \ --enable-slpv1 \ --enable-slpv2-security") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def setup(): for package in shelltools.ls("."): if package.startswith(Skip): continue shelltools.cd(package) if package.startswith("xorg-cf-files"): inarytools.dosed("host.def", "_SULIN_CC_", get.CC()) inarytools.dosed("host.def", "_SULIN_CXX_", get.CXX()) inarytools.dosed("host.def", "_SULIN_AS_", get.AS()) inarytools.dosed("host.def", "_SULIN_LD_", get.LD()) inarytools.dosed("host.def", "_SULIN_CFLAGS_", get.CFLAGS()) inarytools.dosed("host.def", "_SULIN_LDFLAGS_", get.LDFLAGS()) autotools.configure("--with-config-dir=/usr/share/X11/config") shelltools.cd("../")
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)
def setup(): # Breaks linking when sandbox is disabled shelltools.export("CLDFLAGS", get.LDFLAGS()) shelltools.export("LIB_PTHREAD", "-lpthread") inarytools.dosed("conf/example.conf.in", "use_lvmetad = 0", "use_lvmetad = 1") autotools.autoreconf("-fi") autotools.configure("--with-thin-check= \ --with-thin-dump= \ --with-thin-repair= \ --with-thin-restore= \ --with-cache-check= \ --with-cache-dump= \ --with-cache-repair= \ --with-cache-restore= \ --enable-lvm1_fallback \ --with-default-pid-dir=/run \ --with-default-run-dir=/run/lvm \ --with-default-locking-dir=/run/lock/lvm \ --with-dmeventd-path=/sbin/dmeventd \ --enable-fsadm \ --with-pool=internal \ --with-user= \ --with-group= \ --with-usrlibdir=/usr/lib \ --with-usrsbindir=%s \ --with-udevdir=/lib/udev/rules.d \ --with-device-uid=0 \ --with-device-gid=6 \ --with-device-mode=0660 \ --enable-dmeventd \ --enable-udev_rules \ --enable-udev_sync \ --with-snapshots=internal \ --with-mirrors=internal \ --with-interface=ioctl \ --enable-static_link=no \ --disable-readline \ --disable-realtime \ --disable-selinux \ --with-confdir=/etc \ --enable-applib \ --enable-cmdlib \ --enable-pkgconfig " % get.sbinDIR())
def build(): shelltools.system('sed -i "/MANDIR =/s#)/#)/share/#" unix/Makefile') opt = '-DACORN_FTYPE_NFS \ -DWILD_STOP_AT_DIR \ -DLARGE_FILE_SUPPORT \ -DUNICODE_SUPPORT \ -DUNICODE_WCHAR \ -DUTF8_MAYBE_NATIVE \ -DNO_LCHMOD \ -DDATE_FORMAT=DF_YMD \ -DUSE_BZIP2 -DNOMEMCPY \ -DNO_WORKING_ISPRINT' autotools.make( '-f unix/Makefile prefix=/usr D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 LF2="%s" CF="%s -I. %s" unzips' % (get.LDFLAGS(), get.CFLAGS(), opt))
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()))
def setup(): # Respect the user LDFLAGS shelltools.system("./autogen.sh") shelltools.export("EXTRA_LDFLAGS", get.LDFLAGS()) autotools.configure("PYTHON=python2 \ --disable-static \ --with-jdk=/usr/lib/jvm/java-7-openjdk \ --enable-javahl \ --with-apr=/usr \ --with-apr-util=/usr \ --with-apache=/usr/lib/apache2/ \ --with-apxs \ --with-serf=/usr \ --with-sqlite=/usr \ --with-zlib=/usr \ --with-jikes=no \ --without-berkeley-db \ --disable-mod-activation") inarytools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
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")))
def build(): autotools.make("-C src CXXFLAGS='%s' CFLAGS='%s' LDFLAGS='%s'" % (get.CXXFLAGS(), get.CFLAGS(), get.LDFLAGS())) shelltools.system("./compile-voices")
def build(): autotools.make('CC="%s" CFLAGS="%s -fpie" LINK="-pie -lssl" LDFLAGS="%s"' % (get.CC(), get.CFLAGS(), get.LDFLAGS()))
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/licenses/gpl.txt from inary.actionsapi import inarytools from inary.actionsapi import pythonmodules from inary.actionsapi import shelltools from inary.actionsapi import get WorkDir = "numpy-%s" % get.srcVERSION() NUMPY_FCONFIG = "config_fc --fcompiler=gnu95" f2py_docs = "%s/%s/f2py_docs" % (get.docDIR(), get.srcNAME()) shelltools.export("LDFLAGS", "%s -shared" % get.LDFLAGS()) shelltools.export("ATLAS", "None") shelltools.export("PTATLAS", "None") def build(): pythonmodules.compile(NUMPY_FCONFIG) def install(): pythonmodules.install(NUMPY_FCONFIG) inarytools.remove("/usr/bin/f2py") inarytools.removeDir("/usr/share") inarytools.dodoc("LICENSE.txt", "THANKS.txt")
def build(): autotools.make("RCFLAGS=\"%s %s -DINET6\"" % (get.CFLAGS(), get.LDFLAGS()))
def build(): autotools.make("CC=%s CFLAGS='%s -fPIC' LDFLAGS='%s'" % (get.CC(), get.CFLAGS(), get.LDFLAGS()))
def build(): autotools.make('LDFLAGS="%s"' % get.LDFLAGS())
def build(): shelltools.export("LDFLAGS", "{} $(pkg-config libssh2 --libs)".format(get.LDFLAGS())) kde.make()