| git.druid.rocks | index | druid520 | ports | classes/ | autotools.mp |
classes/autotools.mp
pkg_deps="gnu-autoconf gnu-automake gnu-libtool"
build:
# TMPDIR -> this port's own stage dir (always writable under
# SANDBOX="yes", unlike /tmp): autoreconf's own Autom4te::General
# creates a real tempdir via Perl's File::Temp, defaulting to /tmp
# when $TMPDIR is unset -- confirmed directly ("Error in tempdir()
# using /tmp/arXXXXXX: Could not create directory ...: Read-only
# file system"), the exact same class of sandbox/TMPDIR interaction
# already root-caused for gcc's own bundled gettext prerequisite's
# dependency-tracking bootstrap (GNU Make's jobserver mkfifo hitting
# the same read-only /tmp) -- this one's autoconf's own tempfile
# handling instead of make's jobserver, but the same fix applies.
export TMPDIR="$PWD"
# libtoolize can deposit ltmain.sh one directory UP from the checkout
# here (an mp staging quirk: the checkout dir shares its parent's
# name, which seems to confuse libtoolize's aux-dir heuristic), while
# automake looks for it at ./ltmain.sh, failing outright -- copying it
# into place first works around it.
autoreconf -fi || { cp ../ltmain.sh . 2>/dev/null && autoreconf -fi; }
./configure --prefix=$MP_PREFIX $CONFIGURE_FLAGS
make -j$MP_JOBS
install:
make install
make clean || true
remove:
# remove: runs BEFORE fetch: on a "reinstall" (and after "mp clean
# pkgname" wipes a stale checkout for a plain removal too), so the
# checkout this Makefile lives in may genuinely not exist at this
# point -- "make uninstall" against a missing Makefile is a hard,
# unguarded error otherwise ("No targets specified and no makefile
# found"). a no-op here is fine either way: mp's own manifest sweep
# (pkg_manifest_cleanup, on by default) still deletes every file
# this port's own install: actually put down, remove: only needs to
# handle what genuinely needs its own logic beyond that.
[ -f Makefile ] || exit 0
make uninstall