From fac87de73ae3680b793ed025f6202cf1904c0506 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Fri, 26 Aug 2016 22:15:13 +0200 Subject: [PATCH] Updated a lot of shizz --- astronaut/freshnaut | 21 ++++++----- satellites/3dstool-git.sat | 13 +++++++ satellites/3dstool.sat | 16 +++++++++ .../ctrtool.sat | 2 +- satellites/fakeroot.sat | 17 ++++----- satellites/ffmpeg.sat | 25 +++++++++++++ satellites/functions/compile/cmake.sh | 3 +- satellites/functions/compile/perl.sh | 21 +++++++++++ satellites/functions/compile/waf.sh | 17 +++++++++ satellites/giblib.sat | 25 +++++++++++++ satellites/gtksourceview2.sat | 15 ++++++++ satellites/i3.sat | 3 +- satellites/imlib2.sat | 14 ++++++++ satellites/libass.sat | 14 ++++++++ satellites/libtorrent-rasterbar.sat | 6 ++-- .../makerom.sat | 2 +- satellites/mpv.sat | 14 ++++++++ satellites/ninja.sat | 19 ++++++++++ satellites/perl-module-build.sat | 14 ++++++++ satellites/po4a.sat | 22 ++++++++++++ satellites/pygtksourceview2.sat | 15 ++++++++ satellites/python3-requests.sat | 4 +-- satellites/python3-setuptools.sat | 6 ++-- satellites/qemu.sat | 16 +++++++-- satellites/radare2-git.sat | 3 +- satellites/scrot.sat | 24 +++++++++++++ satellites/tlp.sat | 4 +-- satellites/waf.sat | 35 +++++++++++++++++++ 28 files changed, 352 insertions(+), 38 deletions(-) create mode 100644 satellites/3dstool-git.sat create mode 100644 satellites/3dstool.sat rename {graveyard/unmaintained_satellites => satellites}/ctrtool.sat (83%) create mode 100644 satellites/ffmpeg.sat create mode 100644 satellites/functions/compile/perl.sh create mode 100644 satellites/functions/compile/waf.sh create mode 100644 satellites/giblib.sat create mode 100644 satellites/gtksourceview2.sat create mode 100644 satellites/imlib2.sat create mode 100644 satellites/libass.sat rename {graveyard/unmaintained_satellites => satellites}/makerom.sat (83%) create mode 100644 satellites/mpv.sat create mode 100644 satellites/ninja.sat create mode 100644 satellites/perl-module-build.sat create mode 100644 satellites/po4a.sat create mode 100644 satellites/pygtksourceview2.sat create mode 100644 satellites/scrot.sat create mode 100644 satellites/waf.sat diff --git a/astronaut/freshnaut b/astronaut/freshnaut index 59cb07e..6835c04 100755 --- a/astronaut/freshnaut +++ b/astronaut/freshnaut @@ -39,21 +39,24 @@ function download(url) return call("curl -Ls '" .. url .. "'") end -function make_regex(filename, version) - --[[-- - -- Converts a string into regex, by escaping all special (magic) characters. - -- Returns two regexes, meant to be used in a loop. (See code using this function to know what I mean) - --]]-- - - local regex = filename:gsub(version, "{{version}}"):gsub("%%", "%%%%") - +function escape_regex(string) -- http://www.lua.org/manual/5.3/manual.html#6.4.1 local magic = "^$().[]*+-?" for i = 1, #magic do local char = magic:sub(i, i) - regex = regex:gsub("%" .. char, "%%" .. char) + string = string:gsub("%" .. char, "%%" .. char) end + return string +end + +function make_regex(filename, version) + --[[-- + -- Converts a string into regex, by escaping all special (magic) characters. + -- Returns two regexes, meant to be used in a loop. (See code using this function to know what I mean) + --]]-- + + local regex = escape_regex(filename:gsub(escape_regex(version), "{{version}}"):gsub("%%", "%%%%")) return regex:gsub("{{version}}", "(.-") .. ")", regex:gsub(".*{{version}}", "(.-)") end diff --git a/satellites/3dstool-git.sat b/satellites/3dstool-git.sat new file mode 100644 index 0000000..ff9c50d --- /dev/null +++ b/satellites/3dstool-git.sat @@ -0,0 +1,13 @@ +import 'compile/cmake' +import 'vcs/git' + +name=3dstool + +vcs_git "https://github.com/dnasdw/$name" +header_end + +cd "$name" +compile_cmake -I +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "bin/Release/$name" + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/3dstool.sat b/satellites/3dstool.sat new file mode 100644 index 0000000..6d69532 --- /dev/null +++ b/satellites/3dstool.sat @@ -0,0 +1,16 @@ +import 'compile/cmake' + +name=3dstool +version=1.0.15 +update_url="https://github.com/dnasdw/$name/releases" +update_names="/archive/v$version.tar.gz" + +dlextract "https://github.com/dnasdw/$name/archive/v$version.tar.gz" \ + 'cfba027c749b4b600dae36f508f0af48' +header_end + +cd "$name-$version" +compile_cmake -I +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "bin/Release/$name" + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/graveyard/unmaintained_satellites/ctrtool.sat b/satellites/ctrtool.sat similarity index 83% rename from graveyard/unmaintained_satellites/ctrtool.sat rename to satellites/ctrtool.sat index 52e186d..03022bc 100644 --- a/graveyard/unmaintained_satellites/ctrtool.sat +++ b/satellites/ctrtool.sat @@ -9,6 +9,6 @@ header_end cd "$name-$version/ctrtool" make -install -D ctrtool "$dir_install/$dir_prefix/bin/ctrtool" +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" ctrtool # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/fakeroot.sat b/satellites/fakeroot.sat index 139b39a..7f2b3d5 100644 --- a/satellites/fakeroot.sat +++ b/satellites/fakeroot.sat @@ -1,23 +1,20 @@ import 'compile/configure' name=fakeroot -version=1.20.2 -#version=1.21 +version=1.21 update_url="http://http.debian.net/debian/pool/main/f/$name/" -dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.bz2" \ - 'a4b4564a75024aa96c86e4d1017ac786' -#dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.gz" \ - #'be5c9a0e516869fca4a6758105968e5a' +dlextract "http://http.debian.net/debian/pool/main/f/$name/${name}_$version.orig.tar.gz" \ + 'be5c9a0e516869fca4a6758105968e5a' header_end cd "$name-$version" -#cd doc -#po4a -k 0 --rm-backups --variable 'srcdir=../doc/' po4a/po4a.cfg -#cd .. +cd doc +po4a -k 0 --rm-backups --variable 'srcdir=../doc/' po4a/po4a.cfg +cd .. -#./bootstrap +./bootstrap compile_configure -- --disable-static # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/ffmpeg.sat b/satellites/ffmpeg.sat new file mode 100644 index 0000000..38d335a --- /dev/null +++ b/satellites/ffmpeg.sat @@ -0,0 +1,25 @@ +name=ffmpeg +version=3.1.2 +update_url='https://ffmpeg.org/download.html' + +dlextract "http://ffmpeg.org/releases/$name-$version.tar.bz2" \ + '8095acdc8d5428b2a9861cb82187ea73' +header_end + +cd "$name-$version" + +# ffmpeg uses it's own configure script with arguably differing options to the +# regular GNU autotools configure scripts. +# Not using compile_configure due to that. +./configure --disable-static --enable-shared \ + --prefix="/$dir_prefix" \ + --bindir="/$dir_prefix/$dir_bindir" \ + --libdir="/$dir_prefix/$dir_libdir" \ + --datadir="/$dir_prefix/$dir_datadir/$name" \ + --mandir="/$dir_prefix/$dir_mandir" \ + --docdir="/$dir_prefix/$dir_docdir/$name" + +make +make DESTDIR="$dir_install" install + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/functions/compile/cmake.sh b/satellites/functions/compile/cmake.sh index 08d0d40..a2977a9 100644 --- a/satellites/functions/compile/cmake.sh +++ b/satellites/functions/compile/cmake.sh @@ -1,4 +1,5 @@ compile_cmake() { + local olddir="$PWD" local noinstall=false local OPTIND=1 @@ -25,5 +26,5 @@ compile_cmake() { $@ make [ "$noinstall" = false ] && make DESTDIR="$dir_install" install - true + cd "$olddir" } diff --git a/satellites/functions/compile/perl.sh b/satellites/functions/compile/perl.sh new file mode 100644 index 0000000..11414e4 --- /dev/null +++ b/satellites/functions/compile/perl.sh @@ -0,0 +1,21 @@ +compile_perl() { + local noinstall=false + + local OPTIND=1 + local opt + while getopts "I" opt; do case "$opt" in + I) local noinstall=true ;; + esac; done + shift $((OPTIND-1)) + + perl Build.PL --create_packlist=0 \ + --prefix="/$dir_prefix" \ + --destdir="$dir_install" \ + --installdirs vendor \ + --install_path script="/$dir_prefix/$dir_bindir" \ + --install_path bin="/$dir_prefix/$dir_bindir" \ + --install_path bindoc="/$dir_prefix/$dir_mandir/man1" \ + --install_path libdoc="/$dir_prefix/$dir_mandir/man3" + ./Build + [ "$noinstall" = false ] && ./Build install || true +} diff --git a/satellites/functions/compile/waf.sh b/satellites/functions/compile/waf.sh new file mode 100644 index 0000000..dec41ca --- /dev/null +++ b/satellites/functions/compile/waf.sh @@ -0,0 +1,17 @@ +compile_waf() { + local binary='waf' + + local OPTIND=1 + local opt + while getopts "b:" opt; do case "$opt" in + b) local binary="$OPTARG" ;; + esac; done + shift $((OPTIND-1)) + + $binary configure build install \ + --prefix="/$dir_prefix" \ + --bindir="/$dir_prefix/$dir_bindir" \ + --libdir="/$dir_prefix/$dir_libdir" \ + --destdir="$dir_install" \ + $WAFFLAGS $@ +} diff --git a/satellites/giblib.sat b/satellites/giblib.sat new file mode 100644 index 0000000..e1f7abc --- /dev/null +++ b/satellites/giblib.sat @@ -0,0 +1,25 @@ +import 'compile/configure' + +name=giblib +majver=1.2.4 +version=$majver-11 +update_url="https://packages.debian.org/sid/${name}1" +update_names="${name}_$version.debian.tar.xz" + +dlextract "http://http.debian.net/debian/pool/main/g/$name/${name}_$majver.orig.tar.gz" \ + '598711e2cb631c59f6ad11cba4383f2c' +dlextract "http://http.debian.net/debian/pool/main/g/$name/${name}_$version.debian.tar.xz" \ + '85d5fb2f8a78d23b3a7929f3f8828f44' +header_end + +cd "$name-$majver.orig" + +# Updating with debian patches as appropiate +for x in $(cat ../debian/patches/series); do + patch -p1 -i ../debian/patches/$x +done + +autoreconf -i +compile_configure + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/gtksourceview2.sat b/satellites/gtksourceview2.sat new file mode 100644 index 0000000..f9200f2 --- /dev/null +++ b/satellites/gtksourceview2.sat @@ -0,0 +1,15 @@ +import 'compile/configure' + +name=gtksourceview +majver=2.10 +version=$majver.5 # I'm not sure why, but everybody seems to use this version. +update_url="https://download.gnome.org/sources/$name/cache.json" + +dlextract "https://download.gnome.org/sources/$name/$majver/$name-$version.tar.bz2" \ + '1219ad1694df136f126507466aeb41aa' +header_end + +cd "$name-$version" +compile_configure + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/i3.sat b/satellites/i3.sat index f75dd09..cae2a2d 100644 --- a/satellites/i3.sat +++ b/satellites/i3.sat @@ -15,13 +15,12 @@ sed -i -e "/\$(INSTALL)/s/bin/$(safe_sed "$dir_bindir")/" \ i3-config-wizard/i3-config-wizard.mk i3bar/i3bar.mk \ i3-dump-log/i3-dump-log.mk i3-input/i3-input.mk -make -make -C man make install \ PREFIX="/$dir_prefix" \ SYSCONFDIR="/$dir_sysconfdir" \ DESTDIR="$dir_install" +make -C man install -Dm644 -t "$dir_install/$dir_prefix/$dir_mandir/man1" man/*.1 # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/imlib2.sat b/satellites/imlib2.sat new file mode 100644 index 0000000..9bb670a --- /dev/null +++ b/satellites/imlib2.sat @@ -0,0 +1,14 @@ +import 'compile/configure' + +name=imlib2 +version=1.4.9 +update_url="https://sourceforge.net/projects/enlightenment/files/$name-src/" + +dlextract "https://sourceforge.net/projects/enlightenment/files/$name-src/$version/$name-$version.tar.bz2" \ + '23ef8b49f2793bc63b16839a2062298b' +header_end + +cd "$name-$version" +compile_configure + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/libass.sat b/satellites/libass.sat new file mode 100644 index 0000000..73b9fb9 --- /dev/null +++ b/satellites/libass.sat @@ -0,0 +1,14 @@ +import 'compile/configure' + +name=libass +version=0.13.2 +update_url="https://github.com/libass/$name/releases" + +dlextract "https://github.com/libass/$name/releases/download/$version/$name-$version.tar.xz" \ + '1c8cbd5751aeb192bda04a65d0464fd9' +header_end + +cd "$name-$version" +compile_configure -- --disable-static + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/libtorrent-rasterbar.sat b/satellites/libtorrent-rasterbar.sat index 26349f6..d6394d2 100644 --- a/satellites/libtorrent-rasterbar.sat +++ b/satellites/libtorrent-rasterbar.sat @@ -1,11 +1,11 @@ import 'compile/configure' name=libtorrent-rasterbar -version=1.1.0 +version=1.1.1 update_url='https://github.com/arvidn/libtorrent/releases' -dlextract "https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1/$name-$version.tar.gz" \ - '3a291044b5b33fec3e30b22a94fda31f' +dlextract "https://github.com/arvidn/libtorrent/releases/download/libtorrent-$(echo "$version" | sed -e 's/\./_/g')/$name-$version.tar.gz" \ + '4c635943c7ca2ca5db9fba8b04e78a3f' header_end cd "$name-$version" diff --git a/graveyard/unmaintained_satellites/makerom.sat b/satellites/makerom.sat similarity index 83% rename from graveyard/unmaintained_satellites/makerom.sat rename to satellites/makerom.sat index b0bc194..9b76561 100644 --- a/graveyard/unmaintained_satellites/makerom.sat +++ b/satellites/makerom.sat @@ -9,6 +9,6 @@ header_end cd "$name-$version/makerom" make -install -D makerom "$dir_install/$dir_prefix/bin/makerom" +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" makerom # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/mpv.sat b/satellites/mpv.sat new file mode 100644 index 0000000..e2444bd --- /dev/null +++ b/satellites/mpv.sat @@ -0,0 +1,14 @@ +import 'compile/waf' + +name=mpv +version=0.19.0 +update_url="https://github.com/mpv-player/$name/releases" + +dlextract "https://github.com/mpv-player/$name/archive/v$version.tar.gz" \ + 'fa91789d030b93388543a8afef4352b1' +header_end + +cd "$name-$version" +compile_waf + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/ninja.sat b/satellites/ninja.sat new file mode 100644 index 0000000..50d41cd --- /dev/null +++ b/satellites/ninja.sat @@ -0,0 +1,19 @@ +name=ninja +version=1.7.1 +update_url="https://github.com/ninja-build/$name/releases" + +dlextract "https://github.com/ninja-build/$name/archive/v$version.tar.gz" \ + 'e45bda009319f9af5385bb79e783da9f' +header_end + +cd "$name-$version" + +./configure.py --bootstrap + +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name" +install -Dm644 misc/bash-completion "$dir_install/$dir_prefix/$dir_datadir/bash-completion/completions/$name" +install -Dm644 misc/zsh-completion "$dir_install/$dir_prefix/$dir_datadir/zsh/site-functions/_$name" +install -Dm644 misc/ninja.vim "$dir_install/$dir_prefix/$dir_datadir/vim/vimfiles/syntax/$name.vim" +# Not installing emacs stuff because I have no idea how it works + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/perl-module-build.sat b/satellites/perl-module-build.sat new file mode 100644 index 0000000..c49c24e --- /dev/null +++ b/satellites/perl-module-build.sat @@ -0,0 +1,14 @@ +import 'compile/perl' + +name=Module-Build +version=0.4220 +update_url='http://www.cpan.org/authors/id/L/LE/LEONT/' + +dlextract "http://www.cpan.org/authors/id/L/LE/LEONT/$name-$version.tar.gz" \ + '9df204e188462a4410d496f316c2c531' +header_end + +cd "$name-$version" +compile_perl + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/po4a.sat b/satellites/po4a.sat new file mode 100644 index 0000000..30aec99 --- /dev/null +++ b/satellites/po4a.sat @@ -0,0 +1,22 @@ +import 'compile/perl' + +name=po4a +version=0.48 +update_url='https://alioth.debian.org/frs/?group_id=30267' + +dlextract "https://alioth.debian.org/frs/download.php/latestfile/195/$name-$version.tar.gz" \ + '5c8fa9b6a23586d3860d0767bed65148' +header_end + +cd "$name-$version" +compile_perl -I + +# Install the manages manually, to put them in the correct dir (Perl won't listen otherwise) +mkdir -p "$dir_install/$dir_prefix/$dir_mandir" +mv blib/man/* "$dir_install/$dir_prefix/$dir_mandir" +rmdir blib/man + +# Install the rest +./Build install + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/pygtksourceview2.sat b/satellites/pygtksourceview2.sat new file mode 100644 index 0000000..c9ca857 --- /dev/null +++ b/satellites/pygtksourceview2.sat @@ -0,0 +1,15 @@ +import 'compile/configure' + +name=pygtksourceview +majver=2.10 +version=$majver.1 +update_url="https://download.gnome.org/sources/$name/cache.json" + +dlextract "https://download.gnome.org/sources/$name/$majver/$name-$version.tar.bz2" \ + '2654354d61422fb79d8375fc3a3b5393' +header_end + +cd "$name-$version" +compile_configure + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/python3-requests.sat b/satellites/python3-requests.sat index be17ea6..bfb1af1 100644 --- a/satellites/python3-requests.sat +++ b/satellites/python3-requests.sat @@ -1,11 +1,11 @@ import 'compile/python' name=requests -version=2.11.0 +version=2.11.1 update_url="https://github.com/kennethreitz/$name/releases" dlextract "https://github.com/kennethreitz/$name/archive/v$version.tar.gz" \ - '09de9d563cd43ee28a3c55fc308c71f0' + '3007b144a7ce83ee16262b79e3acfa1b' header_end cd "$name-$version" diff --git a/satellites/python3-setuptools.sat b/satellites/python3-setuptools.sat index 0f7a719..409474d 100644 --- a/satellites/python3-setuptools.sat +++ b/satellites/python3-setuptools.sat @@ -1,12 +1,12 @@ import 'compile/python' name=setuptools -version=25.2.0 +version=26.0.0 update_url="https://pypi.python.org/pypi/$name" update_names="$name-$version.tar.gz#md5=" -dlextract "https://pypi.python.org/packages/9f/32/81c324675725d78e7f6da777483a3453611a427db0145dfb878940469692/$name-$version.tar.gz" \ - 'a0dbb65889c46214c691f6c516cf959c' +dlextract "https://pypi.python.org/packages/0d/13/ce6a0a22220f3da7483131bb8212d5791a03c8c3e86ff61b2c6a2de547cd/$name-$version.tar.gz" \ + '846e21fea62b9a70dfc845d70c400b7e' header_end cd "$name-$version" diff --git a/satellites/qemu.sat b/satellites/qemu.sat index 57a2db0..e7306fd 100644 --- a/satellites/qemu.sat +++ b/satellites/qemu.sat @@ -1,14 +1,24 @@ import 'compile/configure' name=qemu -version=2.6.0 +version=2.6.1 update_url='http://wiki.qemu.org/Download' +define_option 'targets=all: Define what targets to build (space-separated list)' + dlextract "http://wiki.qemu-project.org/download/$name-$version.tar.bz2" \ - 'ca3f70b43f093e33e9e014f144067f13' + '6a183b192018192943b6781e1bb9b72f' header_end cd "$name-$version" -compile_configure -- --target-list=i386-softmmu + +targets="$(option =targets)" +if [ "$targets" = "all" ]; then + targets="" +else + targets="--target-list=$(echo "$targets" | sed -e 's/ /,/g')" +fi + +compile_configure -- $targets # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/radare2-git.sat b/satellites/radare2-git.sat index 450a9d4..4e0c706 100644 --- a/satellites/radare2-git.sat +++ b/satellites/radare2-git.sat @@ -1,4 +1,5 @@ # Build with the included version of capstone due to it using a newer version and includes patches for it. +# It also contains a patched libmagic which is incompatible with most systems. import 'vcs/git' import 'compile/configure' @@ -9,6 +10,6 @@ vcs_git "https://github.com/radare/$name" header_end cd "$name" -compile_configure -- --with-syszip --with-sysmagic +compile_configure -- --with-syszip # vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/scrot.sat b/satellites/scrot.sat new file mode 100644 index 0000000..278fd4d --- /dev/null +++ b/satellites/scrot.sat @@ -0,0 +1,24 @@ +import 'compile/configure' + +name=scrot +majver=0.8 +version=$majver-17 +update_url="https://packages.debian.org/sid/$name" +update_names="${name}_$version.debian.tar.xz" + +dlextract "http://http.debian.net/debian/pool/main/s/$name/${name}_$majver.orig.tar.gz" \ + 'ccae904d225609571bdd3b03445c1e88' +dlextract "http://http.debian.net/debian/pool/main/s/$name/${name}_$version.debian.tar.xz" \ + '7d6a067f67586623c72a7c83076af842' +header_end + +cd "$name-$majver" + +for x in $(cat ../debian/patches/series); do + patch -p1 -i ../debian/patches/$x +done + +autoreconf -i +compile_configure + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: diff --git a/satellites/tlp.sat b/satellites/tlp.sat index fd5135c..79413a7 100644 --- a/satellites/tlp.sat +++ b/satellites/tlp.sat @@ -1,10 +1,10 @@ name=TLP -version=0.8 +version=0.9 update_url="https://github.com/linrunner/$name/releases" update_names="/archive/$version.tar.gz" dlextract "https://github.com/linrunner/$name/archive/$version.tar.gz" \ - 'd53ef993ce96ccff904d6caad1f14006' + '952712c5de56e5fcb9a165b1cd8ba4e0' header_end cd "$name-$version" diff --git a/satellites/waf.sat b/satellites/waf.sat new file mode 100644 index 0000000..d15ceb4 --- /dev/null +++ b/satellites/waf.sat @@ -0,0 +1,35 @@ +import 'compile/waf' + +name=waf +version=1.9.3 +update_url='https://waf.io/' + +dlextract "https://waf.io/$name-$version.tar.bz2" \ + '038f5661d423a45ccce9169b186b3518' +header_end + +cd "$name-$version" +compile_waf -b "python3 ./$name-light" -- --make-waf + +# Strip packed library from binary. The plain files are installed separately. +sed -i -e '/^#==>$/,/^#<==$/d' "$name" + +# Strip revision from the libdir name +sed -i -e '/dirname =/s/%s-%s-%s/%s-%s/' \ + -e '/dirname =/s/, REVISION//' "$name" + +# Change the logic of checking dirs to find waflib to only check one dir, the dir where we installed it. +sed -i -e "s/INSTALL,'\/usr','\/usr\/local','\/opt'/'$(safe_sed "/$dir_prefix")',/" \ + -e "s/'\/lib\/'/'$(safe_sed "/$dir_libdir/")'/" "$name" + +# Fix the shebang to point to python3 +sed -i -e '1s/python/python3/' "$name" + +install -Dm755 -t "$dir_install/$dir_prefix/$dir_bindir" "$name" + +wafdir="$dir_install/$dir_prefix/$dir_libdir/${name}3-$version" +install -d "$wafdir" +unzip -od "$wafdir" zip/waflib.zip +python3 -OOm compileall "$wafdir" + +# vim:set tabstop=4 shiftwidth=4 syntax=sh et: