On Mon, May 10 2021, Björn Gohla <b.go...@gmx.de> wrote:
> hi all,
>
> i'm trying to make a port, and the problem i ran into is that their
> build system tries to write linker output directly to /usr/local . i
> imagine it will be impossible to create a package this way.
>
> is there any way that the ports infrastructure can help to sandbox this?
> i'm guessing not, and i'll have to modify the upstream build system; but
> i thought i'd ask just in case.
>
> just to help my understanding, is it correct that the ports system
> assumes upstream build systems only write to the package directory below
> /usr/ports/pobj ?

The infrastructure expects files to be installed under ${WRKINST},
which by default is under ${WRKDIR} and ${WRKOBJDIR} (the latter
defaults to /usr/ports/pobj).

Check the Makefile/build system of your software package, see if the
install targets let you override DESTDIR/PREFIX or similar.  The ports
tree provides FAKE_FLAGS to override some variables only for the fake
step.  You may need to patch the Makefile.  Another approach is to write
a do-install target in the port Makefile.

(There's also DESTDIRNAME but I'd suggest to look at this one once you
get a working port using the approaches mentioned above.)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to