Created attachment 169411 [details] Replace /usr/local with ${PREFIX} and only build documentation, if needed The problem is obvious and the patch is trivial, but without it the newly-built code fails to find itself under ${STAGEDIR} and can not generate its own documentation: -MAKE_ENV+= TCLLIBPATH=${STAGEDIR}/usr/local/lib +MAKE_ENV+= TCLLIBPATH=${STAGEDIR}/${PREFIX}/lib The second hunk in the patch stops generating the (useless) PORTDOCS, when docs are disabled. The port fails numerous self-tests after building -- this patch does not address that problem.
A commit references this bug: Author: gahr Date: Mon Apr 18 07:45:03 UTC 2016 New revision: 413558 URL: https://svnweb.freebsd.org/changeset/ports/413558 Log: devel/tclxml: respect PREFIX and DOCS [1], use TEST_TARGET PR: 208874 [1] Submitted by: mi [1] Changes: head/devel/tclxml/Makefile
The committed patch overdoes it. The --prefix part is added to CONFIGURE_ARGS automatically, no need for the port to do it. Now it is listed twice: % make -V CONFIGURE_ARGS --prefix=/opt --exec-prefix=/opt --with-tcl=/opt/lib/tcl8.6 XML_CONFIG="/opt/bin/xml2-config" --prefix=/opt ${_LATE_CONFIGURE_ARGS} And the --exec-prefix is, probably, simply not needed in this case. I would suggest removing the newly-introduced settings: USE_LDCONFIG?= ${PREFIX}/lib/Tclxml${PORTVERSION} -CONFIGURE_ARGS= --prefix=${PREFIX} \ - --exec-prefix=${PREFIX} \ - --with-tcl=${TCL_LIBDIR} \ +CONFIGURE_ARGS= --with-tcl=${TCL_LIBDIR} \ XML_CONFIG="${XML_CONFIG}" Thanks!
You're right about --prefix Mikhail. --exec-prefix is needed, though. Try to run "port test" and you'll see.
A commit references this bug: Author: gahr Date: Mon Apr 18 12:30:43 UTC 2016 New revision: 413571 URL: https://svnweb.freebsd.org/changeset/ports/413571 Log: devel/tclxml: no need to add --prefix to CONFIGURE_ARGS PR: 208874 Submitted by: mi Changes: head/devel/tclxml/Makefile
(In reply to Pietro Cerutti from comment #3) > Try to run "port test" and you'll see. I have the exact same (and numerous) test-failures with and without --exec-prefix. And none of the files generated during build contain the string "/usr/local" even if I do not specify it...
(In reply to Mikhail Teterin from comment #5) I said "port test", not "make test".
(In reply to Pietro Cerutti from comment #6) > I said "port test", not "make test". Sorry, I don't know, what "port test" means...
(In reply to Mikhail Teterin from comment #7) https://github.com/xmj/porttools/(In reply to Mikhail Teterin from comment #7) https://github.com/xmj/porttools/ Anyway, exec_prefix is needed as it is in other TEA based ports. without: $ make PREFIX=/tmp/tclxml configure && make -C `make -V WRKSRC` -V exec_prefix /usr/local And you can see how it's used: $ grep exec_prefix `make -V WRKSRC`/Makefile exec_prefix = /usr/local bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib
> And you can see how it's used: > $ grep exec_prefix `make -V WRKSRC`/Makefile > exec_prefix = /usr/local No, that's my point. I do NOT see this even if I remove --exec-prefix from CONFIGURE_ARGS locally. Here: % make -V CONFIGURE_ARGS --with-tcl=/opt/lib/tcl8.6 XML_CONFIG="/opt/bin/xml2-config" --prefix=/opt ${_LATE_CONFIGURE_ARGS} % rm -rf `make -V WRKDIR` % make configure > /dev/null % grep -c /usr/local `make -V WRKSRC`/Makefile 0
(In reply to Mikhail Teterin from comment #9) Of course the problem exists only if PREFIX != LOCALBASE. The latter is used to set TCL_LIBDIR, used in the --with-cl configure arg. In your case, both are /opt.
(In reply to Pietro Cerutti from comment #10) > Of course the problem exists only if PREFIX != LOCALBASE. Got it. Thank you for the clarification.