Bug 204179

Summary: [patch] science/libint: enabling library options
Product: Ports & Packages Reporter: Johannes M Dieterich <jmd>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: danfe, koobs, miwi
Priority: --- Keywords: needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff for science/libint
none
svn diff for science/libint (version 2) none

Description Johannes M Dieterich freebsd_committer freebsd_triage 2015-10-31 20:30:21 UTC
Created attachment 162646 [details]
svn diff for science/libint

Find attached a patch exposing three options of the library:

* debug (interesting for developers writing code against libint)
* derivatives
* R12 type integrals

Please note that this port seems to expose an interesting edge case in the ports tree. Namely, the patch to configure.in is NOT needed if aclocal && autoconf are run [deprecated to use] but in the now recommended autoreconf && GNU_CONFIGURE, it is needed. Hence, I closed my pull request with upstream on this.

The newer version of this library (libint2) is also plagued by this problem and cannot be as easily patched as this version.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-01 04:32:53 UTC
Thanks for your contribution Dieterich.

On initial review, the MOPTION conditionals need to turned into "OPTIONS helpers":

<OPTION>_CONFIGURE_{ON,ENABLE,WITH} = <value>

Please see /usr/ports/Mk/bsd.options.mk for usage details, along with:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#makefile-options - Section: 5.12.3. Options Helpers

Along with --enabling the options, it is highly recommended to explicitly --disable-* options when the options are off.

Regarding wanting/needing to run autoreconf, you can use USES=autoreconf for this, please see: /usr/ports/Mk/uses/autoreconf.mk for usage details
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-01 04:34:08 UTC
Also option OPTDEBUG should be renamed to the standard "DEBUG". DEBUG_DESC isnt needed then, as it is already set in Mk/bsd.options.desc.mk
Comment 3 Johannes M Dieterich freebsd_committer freebsd_triage 2015-11-01 22:02:45 UTC
Created attachment 162688 [details]
svn diff for science/libint (version 2)

Thanks for your comments! Except for the autoreconf, this new patch version implements your suggestions, I think.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2015-11-02 03:05:23 UTC
@Dieterich, you don't want to use USES=autoreconf counter to my understanding of comment #0? Can you elaborate on the rationale? ..

Please also confirm this passes QA successfuly (portlint, poudriere testport)
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-03-20 03:21:02 UTC
A commit references this bug:

Author: danfe
Date: Mon Mar 20 03:20:14 UTC 2017
New revision: 436530
URL: https://svnweb.freebsd.org/changeset/ports/436530

Log:
  - Introduce couple of useful mathematical options and debugging support
  - Respect CFLAGS/CXXFLAGS (when building the port in release mode)

  PR:	204179

Changes:
  head/science/libint/Makefile