You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
import 'compile/waf'
|
|
|
|
name=waf
|
|
version=2.0.9
|
|
|
|
dlextract "https://waf.io/$name-$version.tar.bz2" \
|
|
'ae4225757cb0611b408856ea99b9a901'
|
|
_
|
|
|
|
cd "$name-$version"
|
|
compile_waf -b "python3 ./$name-light" -- --make-waf
|
|
|
|
# Strip the packed library from the program. 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/' \
|
|
-e '/dirname =/s/, VERSION, 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_lib/")'/" "$name"
|
|
|
|
# Fix the shebang to point to python3
|
|
sed -i -e '1s/python/python3/' "$name"
|
|
|
|
# Install program
|
|
install -Dm755 -t "$dir_install/$dir_prefix/$dir_bin" "$name"
|
|
|
|
# Install library
|
|
wafdir="$dir_install/$dir_prefix/$dir_lib/${name}3"
|
|
install -d "$wafdir"
|
|
unzip -od "$wafdir" zip/waflib.zip
|
|
python3 -OOm compileall "$wafdir"
|
|
chmod -R a+r "$wafdir"
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|
|
|