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 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 setup(): inarytools.flags.add("-fPIC") inarytools.dosed("makeinclude.in", "^(docdir.*)$", r"\1/html") autotools.autoconf() options = "\ --enable-gl \ --enable-shared \ --enable-threads \ " if get.buildTYPE() == "emul32": shelltools.export("CFLAGS", "-m32") shelltools.export("CXXFLAGS", "-m32") options += "--prefix=/emul32 \ --libdir=/usr/lib32 \ --with-optim='%s' \ " % get.CFLAGS() elif get.ARCH() == "x86_64": options += "--with-optim='%s' \ " % get.CFLAGS() autotools.configure(options)
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 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 install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) autotools.make("-C libiberty clean") autotools.make('CFLAGS="-fPIC %s" -C libiberty' % get.CFLAGS()) autotools.make("-C bfd clean") autotools.make('CFLAGS="-fPIC %s" -C bfd' % get.CFLAGS()) inarytools.insinto("/usr/lib", "bfd/libbfd.a") inarytools.insinto("/usr/lib", "libiberty/libiberty.a") inarytools.insinto("/usr/include", "include/libiberty.h") inarytools.insinto("/usr/include", "include/demangle.h") # Copy plugin-api.h file to build LLVM with LLVM gold plugin inarytools.insinto("/usr/include", "include/plugin-api.h")
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 build(): autotools.make('OPT="%s" \ SHARED="yes" \ PREFIX=/usr \ MANDIR=/usr/share/man \ IDSDIR="/usr/share/misc" \ all' % get.CFLAGS())
def build(): cc_args = "-DHAS_PCRE -DHAS_MYSQL -I/usr/include/mysql -DHAS_PGSQL -I/usr/include/postgresql \ -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DHAS_LDAP -fPIC" cc_libs = "-pie -Wl,-z,relro -Wl,-z,now -L/usr/lib -lpcre -lcrypt -lpthread -lpam -lssl -lcrypto -lsasl2 -lmysqlclient -lpq -lm -lz -lldap -llber" # Default paths inarytools.dosed("src/global/mail_params.h", \ "#define DEF_README_DIR\s+\"no\"", \ "#define DEF_README_DIR \"/usr/share/doc/%s/readme\"" % get.srcNAME()) inarytools.dosed("src/global/mail_params.h", \ "#define DEF_HTML_DIR\s+\"no\"", \ "#define DEF_HTML_DIR \"/usr/share/doc/%s/html\"" % get.srcNAME()) inarytools.dosed("src/global/mail_params.h", \ "#define DEF_MANPAGE_DIR\s+\"/usr/local/man\"", \ "#define DEF_MANPAGE_DIR \"/usr/share/man\"") inarytools.dosed("src/util/sys_defs.h", \ "#define NATIVE_DAEMON_DIR \"/usr/libexec/postfix\"", \ "#define NATIVE_DAEMON_DIR \"/usr/lib/postfix\"") autotools.make('CC=%s \ OPT="%s" \ CCARGS="%s" \ AUXLIBS="%s" makefiles' % (get.CC(), get.CFLAGS(), cc_args, cc_libs)) 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(): 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 = "--disable-static" if get.buildTYPE() == "emul32": options += " --libdir=/usr/lib32" shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS()) inarytools.dosed("Makefile.in", "check: scripts/symbols.chk", "check:") autotools.configure(options)
def setup(): shelltools.export("CFLAGS","%s -fstack-protector-all" % get.CFLAGS()) mesontools.cmake_configure("-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_RPATH= \ -DCMAKE_SKIP_RPATH=ON")
def setup(): shelltools.export("CFLAGS", "%s -O2" % get.CFLAGS()) autotools.autoreconf("-vfi") autotools.configure("--disable-static \ --enable-shared \ --enable-smi \ --enable-sming")
def setup(): #inarytools.flags.add("-fstack-protector-all", "-DLDAP_DEPRECATED=1") inarytools.dosed("config-scripts/cups-sharedlibs.m4", "( -shared )", " -Wl,--as-needed\\1") # For --enable-avahi autotools.aclocal("-I config-scripts") autotools.autoconf("-I config-scripts") options = '--with-cups-user=daemon \ --with-cups-group=lp \ --with-system-groups=lpadmin \ --with-docdir=/usr/share/cups/html \ --with-dbusdir=/etc/dbus-1 \ --with-optim="%s" \ --with-php=/usr/bin/php-cgi \ --with-cupsd-file-perm=0755 \ --with-log-file-perm=0600 \ --without-java \ --enable-acl \ --enable-ssl=yes \ --enable-libpaper \ --enable-libusb=yes \ --enable-debug \ --enable-gssapi \ --enable-dbus \ --enable-pam=yes \ --enable-relro \ --enable-dnssd \ --enable-browsing \ --enable-threads \ --enable-raw-printing \ --enable-avahi \ --disable-gnutls \ --disable-launchd \ --without-rcdir \ --libdir=/usr/lib \ --without-perl \ --with-logdir=/var/log/cups \ KRB5CONFIG=/usr/bin/krb5-config \ --localstatedir=/var \ --with-rundir=/run/cups \ --with-xinetd=/etc/xinetd.d \ ' % get.CFLAGS() if get.buildTYPE() == "emul32": options += ' \ --enable-libusb=no \ --disable-avahi \ --disable-dnssd \ --disable-gssapi \ --disable-dbus \ --bindir=/usr/bin32 \ --sbindir=/usr/sbin32 \ --libdir=/usr/lib32' autotools.configure(options)
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", "{} -DG_DISABLE_CAST_CHECKS".format(get.CFLAGS())) options = "-Dselinux=disabled -Dman=false -Ddoc=false -Dinternal_pcre=true\ " if get.buildTYPE() == "emul32": shelltools.system("patch -p1 < multilib.patch") mesontools.meson_configure(options)
def build(): shelltools.cd("wpa_supplicant") #Enable syslog output cflags = get.CFLAGS() + " -DCONFIG_DEBUG_SYSLOG" shelltools.export("CFLAGS", cflags) autotools.make("V=1") autotools.make("eapol_test")
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 setup(): shelltools.export("CFLAGS", "%s -fsigned-char -D_FILE_OFFSET_BITS=64" % get.CFLAGS()) autotools.autoreconf("-fi") autotools.configure("--disable-static \ --with-gsm \ --with-dyn-default") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
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(): shelltools.system("sed -i '/pager.c/d' plugins/Makefile.am") shelltools.system("sed -i '/STATIC_PAGER/d' src/private.h") shelltools.system("sed -i 's/libwnck-3.0//' configure.ac") autotools.autoreconf("-fi") shelltools.export("CFLAGS", "{} -lgmodule-2.0".format(get.CFLAGS())) autotools.configure("--with-plugins=all \ --enable-man \ --enable-gtk3") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def setup(): shelltools.export("OPTIMIZER", get.CFLAGS()) shelltools.export("DEBUG", "-DNDEBUG") autotools.rawConfigure("--libdir=/lib \ --disable-static \ --mandir=/usr/share/man \ --libexecdir=/lib \ --bindir=/bin") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def setup(): # Recycles pids is neccessary. When bash's last fork's pid was X and new fork's pid is also X, # bash has to wait for this same pid. Without Recycles pids bash will not wait. shelltools.export("CFLAGS", "%s -D_GNU_SOURCE -DRECYCLES_PIDS %s " % (get.CFLAGS(), cfgsettings)) autotools.autoconf() autotools.configure("--without-installed-readline \ --disable-profiling \ --without-gnu-malloc \ --disable-rpath \ --with-curses")
def setup(): shelltools.export("CFLAGS", "%s -O2 -DIP_MAX_MEMBERSHIPS=20" % get.CFLAGS()) autotools.autoreconf("-vfi") autotools.configure("--enable-ipv6 \ --with-ssl \ --with-smi \ --enable-ipv6 \ --disable-smb \ --mandir=/usr/share/man")
def setup(): shelltools.export("CFLAGS", "%s -fno-strict-aliasing" % get.CFLAGS()) autotools.autoreconf("-vfi") autotools.configure("--disable-static \ --disable-rpath \ --without-x \ --enable-cxx \ --with-pic") inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def setup(): shelltools.export("CFLAGS", "%s -D_FILE_OFFSET_BITS=64" % get.CFLAGS()) autotools.configure("--prefix=/usr \ --sbin=/usr/bin \ --mandir=/usr/share/man \ --disable-ldconfig \ --disable-static \ --with-fuse=external \ --enable-posix-acls \ --enable-ldscript \ --enable-extras")
def setup(): autotools.autoreconf("-vfi") options = "--enable-shared \ --disable-static \ --enable-maxmem=64 \ --disable-dependency-tracking" if get.buildTYPE() == "emul32": options += " --prefix=/emul32 --libdir=/usr/lib32" shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS()) autotools.configure(options)
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(): options = "--disable-static \ --enable-noexecstack" if get.buildTYPE() == "emul32": shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS()) # Use 32-bit assembler, another option is to use --disable-asm option inarytools.dosed("mpi/config.links", "path=\"amd64\"", "path=\"i586 i386\"") autotools.configure(options)