Created attachment 205077 [details] patch Added DEBUG option that adds debugging symbols and don't strip binary.
I believe the `INSTALL_TARGET=install-strip` is still needed here, as the irssi `make install` doesn't strip by default and the ports `INSTALL_TARGET` defaults to "install". The `WITH_DEBUG=yes` when the `DEBUG` option is enabled should take care of ensuring that the `INSTALL_TARGET` is changed to `INSTALL_TARGET=install`, according to https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?revision=503781&view=markup#l1743 -David
It is still required. ${STRIP_CMD} is set to ${TRUE} when WITH_DEBUG is defined (as it is here), so the target removal is not necessary. @David, Could you run this through QA (poudriere) with DEBUG=ON/OFF to ensure no other build/package/runtime regressions please
Will do. I should have some time to do that later today, or tomorrow.
I think I've tried building with DEBUG disabled and without INSTALL_TARGET and binary was stripped anyway.
Created attachment 205188 [details] irc/irssi: Add DEBUG option Patch for DEBUG option, bumps PORTREVISION to 1, passes poudriere testport.
The newer patch passes `poudriere testport` with DEBUG both off and on. DEBUG_CONFIGURE_WITH was removed, as irssi doesn't know about --with-debug or --without-debug. PORTREVISION was bumped. The produced binaries look like the following when examined with `file` after extracting the packages: irssi-debug/usr/local/bin/irssi: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0 (1200086), FreeBSD-style, with debug_info, not stripped irssi-nodebug/usr/local/bin/irssi: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0 (1200086), FreeBSD-style, stripped -David
Thank you David
A commit references this bug: Author: kai Date: Tue Jul 9 21:25:53 UTC 2019 New revision: 506316 URL: https://svnweb.freebsd.org/changeset/ports/506316 Log: irc/irssi: Add non-default option DEBUG * Add non-default option DEBUG to enable builds with debug symbols. PR: 238581 Submitted by: serpent7776@gmail.com (initial version), David O'Rourke Reviewed by: koobs Approved by: David O'Rourke (maintainer) Changes: head/irc/irssi/Makefile
Committed, thank you both for the patches and Kubilay, for the reviewing! Just a small note: I didn't bump the PORTREVISION as it's a non-default option and thus doesn't change the content of the package.