def setup(): inarytools.cflags.add("-fwrapv") # no rpath inarytools.dosed("configure.ac", "-rpath \$\(LIBDIR\) ") inarytools.dosed("Lib/cgi.py", r"/usr/local/bin/", r"/usr/bin/") inarytools.dosed("setup.py", "SQLITE_OMIT_LOAD_EXTENSION", deleteLine=True) inarytools.dosed("setup.py","ndbm_libs =.*","ndbm_libs = ['gdbm', 'gdbm_compat']") for dir in ["expat","zlib","_ctypes/libffi_arm_wince","_ctypes/libffi_msvc", "_ctypes/libffi_osx","_ctypes/libffi","_ctypes/darwin"]: shelltools.unlinkDir("Modules/%s" % dir) autotools.autoreconf("-vif") # disable bsddb inarytools.dosed("setup.py", "^(disabled_module_list = \[)\]", r"\1'_bsddb', 'dbm']") # no rpath inarytools.dosed("Lib/distutils/command/build_ext.py", "self.rpath.append\(user_lib\)", "pass") autotools.configure("--with-fpectl \ --enable-shared \ --enable-ipv6 \ --with-threads \ --with-libc='' \ --enable-unicode=ucs4 \ --with-wctype-functions \ --with-system-expat \ --with-system-ffi \ --with-dbmliborder=gdbm \ ")
def install(): pythonmodules.install() inarytools.insinto("/etc/bash_completion.d/", "contrib/bash/bzr") inarytools.insinto("%s/%s" % (get.docDIR(), get.srcNAME()), "doc/*") inarytools.dodoc("COPYING.txt", "README", "NEWS", "TODO") shelltools.unlinkDir("{}/usr/man/".format(get.installDIR()))
def setup(): # Remove source files shelltools.unlink("usbdux/*dux") shelltools.unlink("*/*.asm") # These + a lot of other firmware are shipped within alsa-firmware for fw in ("ess", "korg", "sb16", "yamaha"): shelltools.unlinkDir(fw)
def build(): for directory in ["freeglut","freetype","harfbuzz","jbig2dec","libjpeg","openjpeg","zlib"]: shelltools.unlinkDir("thirdparty/"+directory) shelltools.export("USE_SYSTEM_LIBS",'yes') shelltools.system("sed '/TOFU_CJK /c #define TOFU_CJK 1/' -i include/mupdf/fitz/config.h") shelltools.system("sed -i '/ttc/s/^/#/' Makefile") autotools.make("prefix=/usr")
def testUnlinkDir(self): from inary.actionsapi.shelltools import makedirs from inary.actionsapi.shelltools import sym from inary.actionsapi.shelltools import unlinkDir makedirs('tests/testdirectory/sample') sym('testdirectory/sample', 'tests/history') self.assertEqual(os.path.islink('tests/history'), True) unlinkDir('tests/testdirectory/sample') self.assertEqual(os.path.islink('tests/testdirectory/sample'), False)
def install(): if get.buildTYPE() == "rebuild_python": autotools.rawInstall("DESTDIR='%s/python2'" % get.installDIR()) shelltools.move("%s/python2/usr/lib/python2.7" % get.installDIR(), "%s/usr/lib/" % get.installDIR()) shelltools.unlinkDir("%s/python2" % get.installDIR()) return autotools.rawInstall("DESTDIR='%s'" % get.installDIR()) inarytools.dodoc("ABOUT*", "AUTHORS", "COPYING", "NEWS", "README")
def install(): shelltools.cd("build-python3") autotools.rawInstall("DESTDIR=%s" % get.installDIR()) shelltools.cd("..") shelltools.cd("build-python2") autotools.rawInstall("DESTDIR=%s/python2" % get.installDIR()) shelltools.move("%s/python2/usr/lib/python2.7" % get.installDIR(), "%s/usr/lib/" % get.installDIR()) shelltools.unlinkDir("%s/python2" % get.installDIR()) shelltools.cd("..") inarytools.dodoc("doc/*.txt", "COPYING", "NEWS", "README.md", "TODO")
def setup(): shelltools.unlinkDir("%s/tcl8.6.9/pkgs/sqlite3.25.3" % get.workDIR()) shelltools.cd("unix") autotools.autoreconf("-fi") autotools.configure("--with-encoding=utf-8 \ --enable-threads \ --enable-man-compression=gzip \ --mandir=/usr/share/man \ --enable-man-symlinks \ --enable-shared \ --enable-64bit")
def setup(): # Use system libtool instead of bundled one shelltools.unlinkDir("libltdl") libtools.libtoolize("-c -f --ltdl") autotools.autoreconf("-fi") autotools.configure("--sysconfdir=/etc/unixODBC \ --disable-dependency-tracking \ --disable-gui \ --enable-threads \ --enable-drivers \ --enable-driver-conf \ --disable-stats ")
def setup(): # use system zlib shelltools.unlinkDir("cpan/Compress-Raw-Zlib/zlib-src") inarytools.dosed("MANIFEST", "zlib-src", deleteLine=True) inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(BUILD_ZLIB\s+=\s)True", r"\1False") inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(INCLUDE\s+=\s)\.\/zlib-src", r"\1/usr/include") inarytools.dosed("cpan/Compress-Raw-Zlib/config.in", "(LIB\s+=\s)\.\/zlib-src", r"\1/usr/lib") shelltools.export("LC_ALL", "C") #fix one of tests #shelltools.system('sed -i "s#version vutil.c .*#version vutil.c f1c7e4778fcf78c04141f562b80183b91cbbf6c9#" t/porting/customized.dat') shelltools.system('sh Configure -des \ -Darchname=%s-linux \ -Dcccdlflags=-fPIC \ -Dusedevel \ -Dccdlflags="-rdynamic -Wl,--enable-new-dtags" \ -Dcc=%s \ -Dprefix=/usr \ -Dvendorprefix=/usr \ -Dsiteprefix=/usr \ -Ulocincpth= \ -Doptimize="%s" \ -Duselargefiles \ -Dusethreads \ -Duseithreads \ -Dd_semctl_semun \ -Dscriptdir=/usr/bin \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dinstallman1dir=%s/usr/share/man/man1 \ -Dinstallman3dir=%s/usr/share/man/man3 \ -Dlibperl=libperl.so.%s \ -Duseshrplib \ -Dman1ext=1 \ -Dman3ext=3pm \ -Dcf_by="Sulin" \ -Ud_csh \ -Di_ndbm \ -Di_gdbm \ -Di_db \ -Ubincompat5005 \ -Uversiononly \ -Dpager="/usr/bin/less -isr" \ -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto \ -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto \ -Ud_endservent_r_proto -Ud_setservent_r_proto \ -Dlibpth="/lib /usr/lib" \ ' %(get.ARCH(), get.CC(), get.CFLAGS(), get.installDIR(), get.installDIR(), get.srcVERSION()))
def install(): if get.buildTYPE() == "rebuild_python": autotools.rawInstall("DESTDIR='%s/python2'" % get.installDIR()) shelltools.move("%s/python2/usr/lib/python2.7" % get.installDIR(), "%s/usr/lib/" % get.installDIR()) shelltools.unlinkDir("%s/python2" % get.installDIR()) return autotools.rawInstall("DESTDIR=%s" % get.installDIR()) if get.buildTYPE() == "emul32" or "i686": inarytools.removeDir("/usr/share/gtk-doc") return inarytools.dodoc("AUTHORS", "ChangeLog", "NEWS", "README", "TODO")
def install(): if get.buildTYPE()=="rebuild_python": autotools.rawInstall("DESTDIR={}/python2".format(get.installDIR())) shelltools.move("{}/python2/usr/lib/python2*".format(get.installDIR()), "{}/usr/lib/".format(get.installDIR())) shelltools.unlinkDir("{}/python2/".format(get.installDIR())) return autotools.install() # Create dictionary files #shelltools.system("cat /usr/share/cracklib/cracklib-small|%s/usr/sbin/cracklib-packer %s/usr/share/cracklib/pw_dict" % (get.installDIR(),get.installDIR())) inarytools.domo("po/tr.po","tr","cracklib.mo") inarytools.dodoc("ChangeLog", "README*", "NEWS", "COPYING.LIB", "AUTHORS")
def setup(): sql_ver = "3.30.1.2" shelltools.unlinkDir("{}/tcl{}/pkgs/sqlite{}".format( get.workDIR(), get.srcVERSION(), sql_ver)) shelltools.cd("unix") autotools.autoreconf("-fi") if get.buildTYPE() == "emul32": option = "--enable-32bit" else: option = "--enable-64bit" autotools.configure("--with-encoding=utf-8 \ --enable-threads \ --enable-man-compression=gzip \ --mandir=/usr/share/man \ --enable-man-symlinks \ --enable-shared \ {}".format(option))
def install(): if get.buildTYPE()=="rebuild_python": autotools.rawInstall("DESTDIR={}/python2".format(get.installDIR())) shelltools.move("{}/python2/usr/lib/python2*".format(get.installDIR()), "{}/usr/lib/".format(get.installDIR())) shelltools.unlinkDir("{}/python2/".format(get.installDIR())) return autotools.install() shelltools.system("install -v -m644 -D ../cracklib-words-2.9.7.gz \ {}/usr/share/dict/cracklib-words.gz".format(get.installDIR())) shelltools.system("gunzip -v {}/usr/share/dict/cracklib-words.gz".format(get.installDIR())) shelltools.system("ln -v -sf cracklib-words {}/usr/share/dict/words".format(get.installDIR())) shelltools.system("echo $(hostname) >> {}/usr/share/dict/cracklib-extra-words".format(get.installDIR())) shelltools.system("install -v -m755 -d {}/lib/cracklib".format(get.installDIR())) # Create dictionary files shelltools.system("create-cracklib-dict {0}/usr/share/dict/cracklib-words \ {0}/usr/share/cracklib/pw_dict".format(get.installDIR())) inarytools.domo("po/tr.po","tr","cracklib.mo") inarytools.dodoc("ChangeLog", "README*", "NEWS", "COPYING.LIB", "AUTHORS")
def setup(): # Remove local copies for system libs for directory in ["gpdl", "lcms2mt", "libpng", "openjpeg", "tiff", "zlib"]: shelltools.unlinkDir(directory) #inarytools.flags.add("-fno-strict-aliasing") autotools.autoreconf("-fi") options = "--disable-compile-inits \ --disable-gtk \ --enable-dynamic \ --with-system-libtiff \ --with-ijs \ --with-drivers=ALL \ --with-libpaper \ --with-jbig2dec \ --enable-fontconfig \ --enable-freetype \ --without-luratech \ --without-omni \ --with-x \ --with-fontpath=/usr/share/fonts:/usr/share/fonts/default/ghostscript:/usr/share/cups/fonts:/usr/share/fonts/TTF:/usr/share/fonts/Type1:/usr/share/poppler/cMap/*" options += " --disable-cups --includedir=/usr/include --libdir=/usr/lib32" if get.buildTYPE( ) == "emul32" else " --enable-cups" autotools.configure(options) shelltools.cd("ijs/") inarytools.dosed("configure.ac", "AM_PROG_CC_STDC", "AC_PROG_CC") shelltools.system("./autogen.sh \ --prefix=/usr \ --mandir=/usr/share/man \ --disable-static \ --enable-shared")
def install(): mesontools.ninja_install() if get.buildTYPE() == "emul32": shelltools.copy("{}/emul32/usr/lib32".format(get.installDIR()), "{}/usr/".format(get.installDIR())) #shelltools.copy("{}/emul32/lib32".format(get.installDIR()),"{}/".format(get.installDIR())) shelltools.unlinkDir("{}/emul32".format(get.installDIR())) shelltools.unlinkDir("{}/usr/usr/".format(get.installDIR())) shelltools.unlinkDir("{}/usr/share/installed-tests/".format( get.installDIR()))
def removeEmptydirs(d): """ remove empty dirs from perl package if exists after deletion .pod and .packlist files """ if not os.listdir(d) and not d == get.installDIR(): unlinkDir(d) d = d[:d.rfind("/")] removeEmptydirs(d)
def install(): autotools.rawInstall("DESTDIR=%s" % get.installDIR()) inarytools.domove("/lib/pkgconfig/*", "/usr/lib/pkgconfig/") shelltools.unlinkDir("{}/lib/pkgconfig/".format(get.installDIR())) inarytools.dodoc("ABOUT-NLS", "AUTHORS", "ChangeLog", "COPYING*", "FAQ", "README*", "NEWS", "TODO")
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)