# rusthigh/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. By default, if this package is built, it: (a) doesn't delete the "rustlocal" package tree (b) doesn't delete previously cached build objects (c) downloads sources for some Rust libraries and programs un- less they're already present (d) builds some Rust libraries and programs in the "rustlocal" package tree To force actual as opposed to cached compiles, delete the following cache directory tree first: $PRODTREE/rustlocal/rusthome/sccache/ To force a full rebuild from scratch, delete the following package directory tree instead: $PRODTREE/rustlocal/ This will both download updated sources, in most but not all cases, and rebuild from scratch. If you do this, you'll need to rebuild the following packages in dir- ectory name order: /src/*_rust/* except for "0010_rustc" /src/*/_rusthigh For a rebuild from scratch, Internet access is required. The results of this type of build are unpredictable. This type of build may very well fail. #--------------------------------------------------------------------- 2. The following procedure: export RUSTOFFLINE=true makelac rusthigh --force rebuilds the same libraries and programs using the same sources. It shouldn't access the Internet. This mode requires that a full build from scratch have been done previously. Cached build objects may be used unless the following cache tree is deleted first: $PRODTREE/rustlocal/rusthome/sccache/ #--------------------------------------------------------------------- 3. In the default mode, this package requires Internet access to bui- ld. Builds are also non-repeatable; i.e., the results may be differ- ent each time and builds may not work at all. This is one of relatively few packages of this type that Laclin sup- ports. #--------------------------------------------------------------------- 4. This package doesn't modify the Rust compiler directory tree at: $PRODTREE/rustc/ #--------------------------------------------------------------------- 5. Some notes on a program that we call "rcat": "rcat" is named "mcat" upstream. However, we call it "rustmcat" or "rcat" locally to avoid a conflict with the "mtools" package. This mode is similar to "less" but adds line numbers by default: rcat foo.txt Concatenate images vertically and write result to PNG output: rcat img1.png img2.jpg ... -o image > output.png Same but concatenate horizontally: rcat --hori img1.png img2.jpg ... -o image > output.png "rcat" can concatenate videos as follows if they all use the same co- decs and parameters: rcat part1.mp4 part2.mp4 ... -o video > output.mp4 #--------------------------------------------------------------------- [buildtimes] #--------------------------------------------------------------------- [settings] compiler = clang configure = none defer = glibc64 proddir = none purge = no shareddir = yes strip = no unpack = none setpaths = \ appstream dav1d gtkcore gtkcore \ libadwaita libheif libsass libxmlb \ llvmgcc20 openjdk17 rustc sassc \ wayland xorg \ appstream-glib #--------------------------------------------------------------------- [depends] alsa appstream appstream-glib brotli bzip2 cairo cmake cryptsetup curl dav1d eudev expat fontconfig freetype2 fribidi graphite2 gstreamer gtkcore java jpeg jsonc libadwaita libbsd libffi libheif libicu libidn2 liblzo2 liborc libpng libpsl librtmp libsasl libsass libssh2 libunistring libwebp libxml2 libxmlb libyaml lvm2 nasm2 ncurses nghttp2 openldap openssl pcre2 pulseaudio rust rustlocal:strict sassc tiff util-linux xorg xzutils zlib zstd #--------------------------------------------------------------------- [build] export RUSTC_BOOTSTRAP=1 OFFLINESW="" if [ "@$RUSTOFFLINE" == "@1" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@yes" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@true" ]; then OFFLINESW=--offline ; fi HERE=`pwd` PP=$PRODTREE/rustlocal BINDIR=$PP/bin TGTDIR=$HERE/target RUSTOFFLINE=$RUSTOFFLINE rm -fr $TGTDIR mkdir -p $BINDIR $TGTDIR cd $PP mkdir -p rusthome cd rusthome export HOME=`pwd` export CARGO_TARGET_DIR=$TGTDIR #--------------------------------------------------------------------- export SCCACHE_CACHE_SIZE="5G" export SCCACHE_DIR=$HOME/sccache export RUSTC_WRAPPER=$BINDIR/sccache mkdir -p $SCCACHE_DIR pkill --full /bin/sccache || true sleep 1 sccache rustc || unset RUSTC_WRAPPER #--------------------------------------------------------------------- PKGLIST=" aichat glide mcat menyoki oxipng " #--------------------------------------------------------------------- for pkg in $PKGLIST; do ERR=false echo ==== `date` \ cargo install $OFFLINESW --force $pkg cargo install $OFFLINESW --force $pkg || ERR=true if [ "@$ERR" == "@true" ]; then echo Error: $pkg failed exit 1 fi done #--------------------------------------------------------------------- GITPKG="" #--------------------------------------------------------------------- for pkg in $GITPKG do echo ==== `date` build of $pkg start cd $HERE deco $PKGDIR_SPECIAL/$pkg-git*.tar* cd $pkg-git* if [ "@$RUSTOFFLINE" \!= "@true" ]; then cargo fetch fi cargo build $OFFLINESW --release cd $CARGO_TARGET_DIR/release/ mv $pkg $BINDIR/ for x in * do trueifexe $x && mv $x $BINDIR/ done cd $HERE echo ==== `date` build of $pkg end done #--------------------------------------------------------------------- # Handle a special case. cd $HOME/.cargo/bin/ rm -fr rustmcat rustcat rcat mv mcat rustmcat ln -nsf rustmcat rustcat ln -nsf rustmcat rcat #--------------------------------------------------------------------- badlinks -d $HOME/.cargo/bin/ || true strip $HOME/.cargo/bin/* || true ln -nsf $HOME/.cargo/bin/* $BINDIR/ badlinks -d $BINDIR/ || true echo ==== `date` instreplinks -d $BINDIR/ /usr/bin/ instreplinks -d $BINDIR/ /usr/bin/ #--------------------------------------------------------------------- rm -fr $CARGO_TARGET_DIR #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = n/a #--------------------------------------------------------------------- [history] 250224 Added package 250525 Updated to latest sources 250529 Added "rustmcat" aka "rcat"