アプリのMakefileのインストール先に${DESTDIR}を必ず付けること
リスト 1 editors/xemacs の例
もともと DESTDIR 無しなので以下のパッチを Makefile.in.in に加える
--- Makefile.in.in.orig 2005-01-31 11:54:47.000000000 +0900
+++ Makefile.in.in 2016-04-13 06:42:10.468570000 +0900
@@ -97,7 +97,7 @@
## subdirectories of this directory. The default values for many of
## the variables below are expressed in terms of this one, so you may
## not need to change them. This defaults to /usr/local.
-prefix=@prefix@
+prefix=${DESTDIR}@prefix@
## Variable data (as per each program update) goes here
## The default is ${PROGNAME}
@@ -132,14 +132,14 @@
libdir=@libdir@
## Where to install XEmacs's man pages, and what extension they should \
have.
-mandir=@mandir@
+mandir=${DESTDIR}@mandir@/man1
manext=.1
## Where to install and expect the info files describing XEmacs. In the
## past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but
## since there are now many packages documented with the texinfo
## system, it is inappropriate to imply that it is part of XEmacs.
-infodir=@infodir@
+infodir=${DESTDIR}@infodir@