Bug 187280 - New port: astro/GeographicLib Library for geographic projections
New port: astro/GeographicLib Library for geographic projections
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: John Marino
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-05 13:40 UTC by Tatsuki Makino
Modified: 2014-08-30 21:38 UTC (History)
1 user (show)

See Also:


Attachments
file.shar (15.43 KB, text/plain)
2014-03-05 13:40 UTC, Tatsuki Makino
no flags Details
patch-187280.diff (3.78 KB, patch)
2014-05-24 10:39 UTC, Tatsuki Makino
no flags Details | Diff
an updated shar file (16.31 KB, text/plain)
2014-08-12 03:49 UTC, Tatsuki Makino
no flags Details
test log (82.99 KB, text/plain)
2014-08-12 03:52 UTC, Tatsuki Makino
no flags Details
test logs that are enabled hidden functions (340.78 KB, text/plain)
2014-08-12 03:58 UTC, Tatsuki Makino
no flags Details
Plan B (104.89 KB, text/plain)
2014-08-25 06:27 UTC, Tatsuki Makino
no flags Details
Plan B: explain of part of DIRRMTRY_DATADIR= and PLIST_SUB+= (100.50 KB, text/plain)
2014-08-25 07:54 UTC, Tatsuki Makino
no flags Details
Current Makefile (3.29 KB, text/plain)
2014-08-27 00:12 UTC, John Marino
no flags Details
Current pkg-plist (7.90 KB, text/plain)
2014-08-27 00:12 UTC, John Marino
no flags Details
Patch for Current Makefile (1.25 KB, patch)
2014-08-27 02:30 UTC, Tatsuki Makino
no flags Details | Diff
Updated Plan B: removed unclear license dataset (106.36 KB, text/plain)
2014-08-28 02:14 UTC, Tatsuki Makino
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2014-03-05 13:40:00 UTC
GeographicLib is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems. (The library may be used from .NET applications using the NETGeographicLib wrapper library.)

Fix: Patch attached with submission follows:
Comment 1 Tatsuki Makino 2014-05-24 10:39:02 UTC
Update to 1.36 
Comment 2 John Marino freebsd_committer 2014-08-07 15:03:42 UTC
Hi, if you are still interested in having this port in FreeBSD, it may (or may not) need to be reworked to support stage, and it may need updating to other newer conventions such as "USES" which is expanding all time.
For staging, see http://lists.freebsd.org/pipermail/freebsd-ports-announce/2014-May/000080.html


Additionally, you need to provide some sort of quality assurance.    
In order of preference, we are looking for:

1) "poudriere testport" or "poudriere bulk -t" logs
2) Redports or tinderbox logs
3) at least this: https://www.freebsd.org/doc/en/books/porters-handbook/porting-testing.html

Please provide an updated shar file and attach a test log.  Alternatively, please indicate if you are no longer interested in having this software in the Ports Collection and that we can close the PR.

Thanks!
Comment 3 Tatsuki Makino 2014-08-12 03:49:20 UTC
Created attachment 145694 [details]
an updated shar file
Comment 4 Tatsuki Makino 2014-08-12 03:52:00 UTC
Created attachment 145695 [details]
test log
Comment 5 Tatsuki Makino 2014-08-12 03:58:49 UTC
Created attachment 145696 [details]
test logs that are enabled hidden functions
Comment 6 John Marino freebsd_committer 2014-08-12 06:16:08 UTC
looks good.  I think you use OPTION_SUB for at least four of those options.  I'll move this to "patch-ready" and let the next committer evaluate.
Comment 7 Tatsuki Makino 2014-08-13 00:58:28 UTC
I have already tried to use the OPTIONS_* variables. But it could not affect the fetch phase.
This port has big size distfile.
ex: SIZE (GeographicLib/geoids-distrib/egm2008-1.tar.bz2) = 162388303
If the OPTIONS_* variables is used, we can choose data to install easily. But we always download all distfiles included we don't use.
Comment 8 John Marino freebsd_committer 2014-08-17 22:16:42 UTC
you must have tested this on FreeBSD 8.3 because it has ":L" modifiers in it which are illegal now.

Also the portname has capital letters.  I assume you did this rather than override the DISTNAME, but that will probably have to be changed.
Comment 9 John Marino freebsd_committer 2014-08-17 22:21:56 UTC
I see some :tu modifiers, so you probably just overlooked these.  I'm having problems downloading though.  This is all I get:

root@draco:/mech/ptrees/default/astro/GeographicLib # make checksum
===>  License MIT accepted by the user
===>   GeographicLib-1.37 depends on file: /usr/local/sbin/pkg - found
=> GeographicLib-1.37.tar.gz doesn't seem to exist in /usr/ports/distfiles/GeographicLib.
=> Attempting to fetch http://downloads.sourceforge.net/project/geographiclib/distrib/GeographicLib-1.37.tar.gz
GeographicLib-1.37.tar.gz                     100% of 1917 kB  488 kBps 00m04s
===> Fetching all distfiles required by GeographicLib-1.37 for building
=> SHA256 Checksum OK for GeographicLib/GeographicLib-1.37.tar.gz.
Comment 10 John Marino freebsd_committer 2014-08-18 20:06:29 UTC
moving this back to "in discussion" to avoid somebody trying to claim the ticket.  We need to understand what's going on here.
Comment 11 Tatsuki Makino 2014-08-25 06:27:41 UTC
Created attachment 146239 [details]
Plan B
Comment 12 John Marino freebsd_committer 2014-08-25 06:35:55 UTC
I don't understand why you did this:

X.if ${PORT_OPTIONS:MGEOID_*}
XDIRRMTRY_DATADIR=	yes
XPLIST_SUB+=	DATA_GEOID=""
XSUB_LIST+=	DATA_GEOID=""
X.else
XPLIST_SUB+=	DATA_GEOID="@comment "
XSUB_LIST+=	DATA_GEOID="@comment "
X.endif
X.if ${PORT_OPTIONS:MGRAVITY_*}
XDIRRMTRY_DATADIR=	yes
XPLIST_SUB+=	DATA_GRAVITY=""
XSUB_LIST+=	DATA_GRAVITY=""
X.else
XPLIST_SUB+=	DATA_GRAVITY="@comment "
XSUB_LIST+=	DATA_GRAVITY="@comment "
X.endif
X.if ${PORT_OPTIONS:MMAGNETIC_*}
XDIRRMTRY_DATADIR=	yes
XPLIST_SUB+=	DATA_MAGNETIC=""
XSUB_LIST+=	DATA_MAGNETIC=""
X.else
XPLIST_SUB+=	DATA_MAGNETIC="@comment "
XSUB_LIST+=	DATA_MAGNETIC="@comment "
X.endif
X.ifdef DIRRMTRY_DATADIR
XPLIST_SUB+=	DIRRMTRY_DATADIR=""
XSUB_LIST+=	DIRRMTRY_DATADIR=""
X.else
XPLIST_SUB+=	DIRRMTRY_DATADIR="@comment "
XSUB_LIST+=	DIRRMTRY_DATADIR="@comment "
X.endif


You have OPTIONS_SUB=yes, so if you pkg-plist used for example %%MAGNETIC%% instead of %%DATA_MAGNETIC%%, you can delete all the PLIST_SUB lines.

for SUB_LIST, how is "@comment " valid on a non-pkg-plist?  It's a very strange substition to make.

I'd have to look at DIRRMTRY_DATADIR closer but that smells like a hack.
Comment 13 Tatsuki Makino 2014-08-25 07:54:06 UTC
Created attachment 146242 [details]
Plan B: explain of part of DIRRMTRY_DATADIR= and PLIST_SUB+=

That parts is used for suppressing "Error: Missing: @dirrmtry" lines.
SUB_LIST+= is imitate that wrote on Porter's Handbook 5.12.3.1.
Comment 14 John Marino freebsd_committer 2014-08-25 08:06:40 UTC
(In reply to Tatsuki Makino from comment #13)
> Created attachment 146242 [details]
> Plan B: explain of part of DIRRMTRY_DATADIR= and PLIST_SUB+=
> 
> That parts is used for suppressing "Error: Missing: @dirrmtry" lines.


These errors:
XError: Missing: @dirrmtry %%DATADIR%%/geoids
XError: Missing: @dirrmtry %%DATADIR%%/gravity
XError: Missing: @dirrmtry %%DATADIR%%/magnetic
XError: Missing: @dirrmtry %%DATADIR%%


okay, i sort of see what you are trying to do.  They are shared between many options, but might not be needed at all.


> SUB_LIST+= is imitate that wrote on Porter's Handbook 5.12.3.1.


I understand that to mean you don't know why you have it?
I don't even see any SUB_FILES definition.  the shar doesn't show any templates.  As far as I can see, you don't need SUB_LIST at all.
Ok, it looks like you removed all that completely, good.


ack, you added 84i386-default.log to the shar, that's wrong.  I'll have to remember to remove that.

I would also want to use PORTDOCS=* and remove %%PORTDOCS%% lines from pkg-plist.


Okay, I'll try this version.  It will probably need some tweaking but seems like it's mostly intact.
Comment 15 John Marino freebsd_committer 2014-08-26 21:37:05 UTC
okay, I'm making a lot of modifications.

I think you should identify which sets have "unclear licences".  Make the rest install by default.

If the unclear license sets options are chose, then set restricted.  Right now you have restricted set unconditionally regardless if you use a bad set or not.
Comment 16 John Marino freebsd_committer 2014-08-27 00:12:12 UTC
Created attachment 146348 [details]
Current Makefile
Comment 17 John Marino freebsd_committer 2014-08-27 00:12:37 UTC
Created attachment 146349 [details]
Current pkg-plist
Comment 18 John Marino freebsd_committer 2014-08-27 00:15:23 UTC
I made a lot of changes, including to python files.  You can download Makefile and pkg-plist to compare against your last version to see them all.

Everything works as I think you intended.

However, I think it's a mistake to have all these options off by default, and I think it's a mistake to mark this restricted by default.

Please identify which datasets are legally unrestricted and lets make all of those on by default.  Then we can commit the port.
Comment 19 Tatsuki Makino 2014-08-27 02:30:42 UTC
Created attachment 146354 [details]
Patch for Current Makefile

(In reply to John Marino from comment #18)
> I made a lot of changes, including to python files.  You can download
> Makefile and pkg-plist to compare against your last version to see them all.

Thank you for your great work.

> Everything works as I think you intended.
> 
> However, I think it's a mistake to have all these options off by default,

It works. But I did a few modifications and attach a patch.
Because ${DISTNAME}${EXTRACT_SUFX} is not included LICENSE_DISTFILES_MIT.
OPTIONS_DEFAULT must be returned to original.
And ${WRKSRC}/tools/geographiclib-get-*.sh need patch.

> and I think it's a mistake to mark this restricted by default.
> 
> Please identify which datasets are legally unrestricted and lets make all of
> those on by default.  Then we can commit the port.

I found a license for datasets that exist earlier. License of those files are written in the following URL.
http://earth-info.nga.mil/gns/html/index.html
http://ngdc.noaa.gov/geomag/WMM/license.shtml
But, I could not find a license text for gravity-distrib/grs80.tar.bz2 that added in 2014-07-17.
So, I think license of gravity-distrib/grs80.tar.bz2 is unclear.
Comment 20 John Marino freebsd_committer 2014-08-27 09:19:53 UTC
(In reply to Tatsuki Makino from comment #19)
> It works. But I did a few modifications and attach a patch.
> Because ${DISTNAME}${EXTRACT_SUFX} is not included LICENSE_DISTFILES_MIT.

ok.


> OPTIONS_DEFAULT must be returned to original.

Actually, I think it needs more.  See below


> And ${WRKSRC}/tools/geographiclib-get-*.sh need patch.
> 
> > and I think it's a mistake to mark this restricted by default.
> > 
> > Please identify which datasets are legally unrestricted and lets make all of
> > those on by default.  Then we can commit the port.
> 
> I found a license for datasets that exist earlier. License of those files
> are written in the following URL.
> http://earth-info.nga.mil/gns/html/index.html
> http://ngdc.noaa.gov/geomag/WMM/license.shtml
> But, I could not find a license text for gravity-distrib/grs80.tar.bz2 that
> added in 2014-07-17.
> So, I think license of gravity-distrib/grs80.tar.bz2 is unclear.


So if I understand you, the issue, you can't locate a license so you are moving with caution and assuming it's restricted.   But we have lots of ports without explicit licenses and don't restrict those by default.  We restrict when there's an explicit reason to restrict.

And even so, shouldn't at least all the magnetic and geoid options be installed by default?  Remember, this is going to be a binary package so you should install as many options by default as possible (ideally all of them)

I'd say unless you have reason to suspect that the sets where we don't know where the license is is really restricted, assume they aren't.  If they are, the owners will object and we remove it then.  right?
Comment 21 Tatsuki Makino 2014-08-28 02:14:37 UTC
Created attachment 146431 [details]
Updated Plan B: removed unclear license dataset

(In reply to John Marino from comment #20)
> > OPTIONS_DEFAULT must be returned to original.
> 
> Actually, I think it needs more.  See below
> 
> So if I understand you, the issue, you can't locate a license so you are
> the owners will object and we remove it then.  right?

gravity-distrib/grs80.tar.bz2 are removed. And I will hold it when I find the evidence that license is clear.
Other files have no problems of license.

I choose only GEOID_EGM96_5, GRAVITY_EGM96, GRAVITY_WGS84, MAGNETIC_WMM2010 and MAGNETIC_IGRF11 as OPTIONS_DEFAULT.
Because those datasets have been specified minimal datasets by geographiclib-get-* scripts. And if stingy-root install only egm96-5 geoid dataset, user can install newer hi-resolution dataset and use it as below:
geographiclib-get-geoids -p /home/user egm2008-1
env GEOGRAPHICLIB_DATA=/home/user GeoidEval --input-file -
Comment 22 John Marino freebsd_committer 2014-08-28 11:37:11 UTC
(In reply to Tatsuki Makino from comment #21)
> Created attachment 146431 [details]
> Updated Plan B: removed unclear license dataset


Hmm, I much preferred your patch to my "current makefile" to a new shar. 



> > So if I understand you, the issue, you can't locate a license so you are
> > the owners will object and we remove it then.  right?
> 
> gravity-distrib/grs80.tar.bz2 are removed. And I will hold it when I find
> the evidence that license is clear.
> Other files have no problems of license.


How many options are contained in grs80.tar.bz2?  One?  or more than one?


> 
> I choose only GEOID_EGM96_5, GRAVITY_EGM96, GRAVITY_WGS84, MAGNETIC_WMM2010
> and MAGNETIC_IGRF11 as OPTIONS_DEFAULT.
> Because those datasets have been specified minimal datasets by
> geographiclib-get-* scripts. 


But are those scripts the normal use case?
I would think you'd want the binary package to be as useful as possible and thus have every possible legal option turned off.  For source builds, the builder can just unset the options he doesn't want.


Ultimately this is your decision and I will do what you want.  I'm just "challenging" you so we can get the most useful configuration for your port (I'm mostly thinking of binary package users since source builders have full control)
Comment 23 John Marino freebsd_committer 2014-08-30 21:13:55 UTC
okay, i expanded the shar and compared it.  I like the changes.

Since I didn't hear back, I'm just going to go with this set of option defaults.  If you change your mind later, just ping the PR.
Comment 24 commit-hook freebsd_committer 2014-08-30 21:32:35 UTC
A commit references this bug:

Author: marino
Date: Sat Aug 30 21:32:06 UTC 2014
New revision: 366683
URL: http://svnweb.freebsd.org/changeset/ports/366683

Log:
  Add new port astro/geographic lib

  PR:		187280
  Submitted by:	Tatsuki Makino

  GeographicLib is a small set of C++ classes for performing conversions
  between geographic, UTM, UPS, MGRS, geocentric, and local cartesian
  coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic
  field (e.g., WMM2010) calculations, and for solving geodesic problems.

  The library may be used from .NET applications using the NETGeographicLib
  wrapper library.  It is a suitable replacement for the core functionality
  provided by geotrans.

Changes:
  head/astro/Makefile
  head/astro/geographiclib/
  head/astro/geographiclib/Makefile
  head/astro/geographiclib/distinfo
  head/astro/geographiclib/pkg-descr
  head/astro/geographiclib/pkg-plist
Comment 25 John Marino freebsd_committer 2014-08-30 21:38:23 UTC
Thank for hanging in there, I know it took a long time, but I hope you are happy with the result.