Bug 238581 - irc/irssi: Add DEBUG option
Summary: irc/irssi: Add DEBUG option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kai Knoblich
URL:
Keywords: feature
Depends on:
Blocks:
 
Reported: 2019-06-15 15:08 UTC by serpent7776
Modified: 2019-07-09 21:31 UTC (History)
2 users (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments
patch (797 bytes, patch)
2019-06-15 15:08 UTC, serpent7776
no flags Details | Diff
irc/irssi: Add DEBUG option (932 bytes, patch)
2019-06-17 21:18 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description serpent7776 2019-06-15 15:08:00 UTC
Created attachment 205077 [details]
patch

Added DEBUG option that adds debugging symbols and don't strip binary.
Comment 1 David O'Rourke 2019-06-16 09:31:36 UTC
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
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-16 09:38:00 UTC
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
Comment 3 David O'Rourke 2019-06-16 09:46:45 UTC
Will do. I should have some time to do that later today, or tomorrow.
Comment 4 serpent7776 2019-06-16 11:12:57 UTC
I think I've tried building with DEBUG disabled and without INSTALL_TARGET and binary was stripped anyway.
Comment 5 David O'Rourke 2019-06-17 21:18:28 UTC
Created attachment 205188 [details]
irc/irssi: Add DEBUG option

Patch for DEBUG option, bumps PORTREVISION to 1, passes poudriere testport.
Comment 6 David O'Rourke 2019-06-17 21:21:33 UTC
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
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2019-06-18 03:20:58 UTC
Thank you David
Comment 8 commit-hook freebsd_committer 2019-07-09 21:26:57 UTC
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
Comment 9 Kai Knoblich freebsd_committer 2019-07-09 21:31:21 UTC
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.