oops: different answers, which is best?

> On 2018-03-06, at 16:07, Ken Cunningham <ken.cunningham.web...@gmail.com> 
> wrote:


> This Makefile hardcodes the install prefix, and expects you to hand edit it 
> prior to installation.
> You need to patch it to something like this:
> PREFIX=@@PREFIX@@
> and then in the portfile, before building, do a reinplace on @@PREFIX@@ to 
> set it to ${prefix}

Understood, advantage in using ${prefix}, works.

> On 2018-03-07, at 12:16, Ryan Schmidt <ryandes...@macports.org> wrote:


> Presumably, you're meant to specify PREFIX=/opt/local in build.args.

The advantage is not making a patch for Makefile.



combined:
---------

pre-build {
  build.args        PREFIX=${prefix}
}

:debug:build build phase started at Wed Mar  7 17:17:19 CET 2018
:notice:build --->  Building jdupes
:debug:build Executing proc-pre-org.macports.build-build-0
:debug:build Executing org.macports.build (jdupes)
:debug:build Environment:
:debug:build CC_PRINT_OPTIONS='YES'
:debug:build 
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_paul_Develop_macports_jdupes_sysutils_jdupes/jdupes/wor
k/.CC_PRINT_OPTIONS'
:debug:build CPATH='/opt/local/include'
:debug:build LIBRARY_PATH='/opt/local/lib'
:debug:build MACOSX_DEPLOYMENT_TARGET='10.11'
:info:build Executing:  cd 
"/opt/local/var/macports/build/_Users_paul_Develop_macports_jdupes_sysutils_jdupes/jdupes/work/jdupes
-1.9" && /usr/bin/make -j8 -w all PREFIX=/opt/local
(...)
:debug:destroot checking for mtree violations
:warn:destroot violation by /usr
:warn:destroot jdupes violates the layout of the ports-filesystems!

but it fails. it seems that build.args doesn not overwrite PREIX in Makefile.

Reply via email to