In Pkg, you can build (compile) packages from source, with custom build options, but it requires the BuildPet (based on Iguleders buildpet).. To use it, you need to set BUILDTOOL=buildpet in ~/.pkg/pkgrc
Example, showing how to compile packages with custom options:
pkg build xarchiver --configure='--prefix=/usr/local --other-opts' --cflags='-D -02 -whatever'
It would be cool if petbuild supported passing these options.
Pkg would need an update here:
# if we got a build script
if [ -f "$BUILDSCRIPT" ];then
cd `dirname "$BUILDSCRIPT"`
# compile the pkg
bash *.petbuild
# after build, move any pets created to WORKDIR
mv /usr/share/petbuild/0pets_out/*.pet "$WORKDIR" 2>/dev/null
# back to prev dir (WORKDIR)
cd -
fi