Bug 196697 - [new port] math/cminpack
Summary: [new port] math/cminpack
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Pawel Pekala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-13 22:06 UTC by Fernando Apesteguía
Modified: 2015-02-23 20:25 UTC (History)
1 user (show)

See Also:


Attachments
shar file with new port (5.91 KB, text/plain)
2015-01-13 22:06 UTC, Fernando Apesteguía
no flags Details
poudriere log on 8.4-RELEASE amd64 (111.99 KB, text/x-log)
2015-01-13 22:07 UTC, Fernando Apesteguía
no flags Details
poudriere log on 9.3-RELEASE amd64 (111.95 KB, text/x-log)
2015-01-13 22:07 UTC, Fernando Apesteguía
no flags Details
poudriere log on 10.1-RELEASE amd64 (124.49 KB, text/x-log)
2015-01-13 22:08 UTC, Fernando Apesteguía
no flags Details
New shar file (3.21 KB, text/plain)
2015-02-10 22:54 UTC, Fernando Apesteguía
no flags Details
shar file with new port (6.15 KB, text/plain)
2015-02-21 19:27 UTC, Fernando Apesteguía
no flags Details
new poudriere log on 8.4-RELEASE-amd64 (111.83 KB, text/x-log)
2015-02-21 19:27 UTC, Fernando Apesteguía
no flags Details
poudriere log on 9.3-RELEASE-amd64 (111.78 KB, text/x-log)
2015-02-21 19:28 UTC, Fernando Apesteguía
no flags Details
new poudriere log on 10.1-RELEASE-amd64 (125.54 KB, text/x-log)
2015-02-21 19:28 UTC, Fernando Apesteguía
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Apesteguía freebsd_committer freebsd_triage 2015-01-13 22:06:58 UTC
Created attachment 151587 [details]
shar file with new port

Overview:

The attached patch adds math/cminpack to our ports collection. This is for the last available version (1.3.4)
From the website:

"Minpack includes software for solving nonlinear equations and nonlinear least squares problems."

It has no external dependencies (written in C).

The need:
Besides being useful by itself, it is a required dependency of the new version of cad/openvsp.

Logs:
Attached poudriere logs for {8.4,9.3,10.1}amd64
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2015-01-13 22:07:23 UTC
Created attachment 151588 [details]
poudriere log on 8.4-RELEASE amd64
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2015-01-13 22:07:51 UTC
Created attachment 151589 [details]
poudriere log on 9.3-RELEASE amd64
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2015-01-13 22:08:21 UTC
Created attachment 151590 [details]
poudriere log on 10.1-RELEASE amd64
Comment 4 Pawel Pekala freebsd_committer freebsd_triage 2015-02-09 20:24:39 UTC
X	${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/cminpack.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/
X	${MKDIR} ${STAGEDIR}${PREFIX}/share/cmake/Modules/
X	${MV} ${STAGEDIR}${LOCALBASE}/share/cmake/Modules/FindCMinpack.cmake ${STAGEDIR}${PREFIX}/share/cmake/Modules/

It would be preferable to avoid this by patching/using REINPLACE_CMD to
modify responsible CmakeLists.txt file.

X.if ${PORT_OPTIONS:MEXAMPLES}
X	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
X	(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} "*.[ch] testdata" ${STAGEDIR}${EXAMPLESDIR})
X.endif

Optional installation is deprecated with staging unless it's
very heavy on resources but it's not an issue here.

X@dir %%PORTEXAMPLES%%%%EXAMPLESDIR%%/testdata
X@dir lib/pkgconfig
X@dir share/cmake/Modules
X@dir share/cmake

@dir is not equivalent to deprecated @dirrm, should be only used
for empty dirs on dirs with permissions other then default.
See /usr/ports/CHANGES entry 20140922 for details.
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-10 22:53:20 UTC
(In reply to Pawel Pekala from comment #4)

Attached new shar file.

I changed the first two things you pointed out (thank you!).
About @dir, shouldn't I use it since it refers to a directory out of PREFIX?


Cheers.
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-10 22:54:02 UTC
Created attachment 152856 [details]
New shar file
Comment 7 Pawel Pekala freebsd_committer freebsd_triage 2015-02-21 15:41:27 UTC
You misunderstood my advice about examples installation, what I meant was 
that this conditional construct is not needed:

X.if ${PORT_OPTIONS:MEXAMPLES}
     <good installation commands now removed>
X.endif

Out of prefix files/directories begin with root '/' so your directories
are all installed with PREFIX, example of out of prefix dir would be:

@dir /var/run/some_file.
Comment 8 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 18:46:39 UTC
(In reply to Pawel Pekala from comment #7)

I fixed the examples issue. Sorry, I misunderstood what you said.

On the other issue... I read the CHANGES entry you pointed out, but if I remove those @dir entries in the plist file, I got errors from the QA scripts:

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir lib/pkgconfig
Error: Orphaned: @dir /usr/local/share/cmake/Modules
Error: Orphaned: @dir /usr/local/share/cmake

and from my poudriere installations:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir lib/pkgconfig
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Note: I didn't update a new shar file.
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 19:27:19 UTC
Created attachment 153287 [details]
shar file with new port

This patch should address all the issues recorder in the log so far.
Comment 10 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 19:27:48 UTC
Created attachment 153288 [details]
new poudriere log on 8.4-RELEASE-amd64
Comment 11 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 19:28:19 UTC
Created attachment 153289 [details]
poudriere log on 9.3-RELEASE-amd64
Comment 12 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 19:28:44 UTC
Created attachment 153290 [details]
new poudriere log on 10.1-RELEASE-amd64
Comment 13 Fernando Apesteguía freebsd_committer freebsd_triage 2015-02-21 19:29:23 UTC
(In reply to fernando.apesteguia from comment #8)

OK. I think I got it. New shar file and new poudriere logs.
Comment 14 commit-hook freebsd_committer freebsd_triage 2015-02-23 20:25:07 UTC
A commit references this bug:

Author: pawel
Date: Mon Feb 23 20:24:34 UTC 2015
New revision: 379703
URL: https://svnweb.freebsd.org/changeset/ports/379703

Log:
  Minpack includes software for solving nonlinear equations and nonlinear least
  squares problems. Five algorithmic paths each include a core subroutine and
  an easy-to-use driver. The algorithms proceed either from an analytic
  specification of the Jacobian matrix or directly from the problem functions.
  The paths include facilities for systems of equations with a banded Jacobian
  matrix, for least squares problems with a large amount of data, and for
  checking the consistency of the Jacobian matrix with the functions

  WWW: http://devernay.free.fr/hacks/cminpack/

  PR:		196697
  Submitted by:	Fernando Apesteguia <fernando.apesteguia@gmail.com>

Changes:
  head/math/Makefile
  head/math/cminpack/
  head/math/cminpack/Makefile
  head/math/cminpack/distinfo
  head/math/cminpack/files/
  head/math/cminpack/files/patch-CMakeLists.txt
  head/math/cminpack/files/patch-cmake_CMakeLists.txt
  head/math/cminpack/pkg-descr
  head/math/cminpack/pkg-plist