Bug 215098 - devel/nlohmann_json: Header-only C++ library for modern C++-11-style JSON manipulation
Summary: devel/nlohmann_json: Header-only C++ library for modern C++-11-style JSON man...
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: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 15:44 UTC by Slava Mikerov
Modified: 2017-03-29 00:46 UTC (History)
1 user (show)

See Also:


Attachments
poudriere testport on freebsd 10-amd64 (16.19 KB, text/x-log)
2016-12-06 15:44 UTC, Slava Mikerov
no flags Details
poudriere testport on freebsd 9-amd64 (18.56 KB, text/x-log)
2016-12-06 15:44 UTC, Slava Mikerov
no flags Details
shar (1.90 KB, application/x-shar)
2016-12-06 15:44 UTC, Slava Mikerov
no flags Details
shar (1.90 KB, application/x-shar)
2016-12-12 16:16 UTC, Slava Mikerov
no flags Details
shar (1.86 KB, application/x-shar)
2017-03-27 10:11 UTC, Slava Mikerov
no flags Details
shar (1.90 KB, application/x-shar)
2017-03-28 09:52 UTC, Slava Mikerov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Mikerov 2016-12-06 15:44:01 UTC
Created attachment 177722 [details]
poudriere testport on freebsd 10-amd64
Comment 1 Slava Mikerov 2016-12-06 15:44:23 UTC
Created attachment 177723 [details]
poudriere testport on freebsd 9-amd64
Comment 2 Slava Mikerov 2016-12-06 15:44:45 UTC
Created attachment 177724 [details]
shar
Comment 3 Slava Mikerov 2016-12-12 16:16:36 UTC
Created attachment 177915 [details]
shar

Fix the license type of the port and some minor formatting issues.
Comment 4 Michael Gmelin freebsd_committer freebsd_triage 2017-03-23 11:42:26 UTC
Can you update this to the latest version 2.1.1 and rename the port to nlohmann-json (as it's header only and most non-C++ users expect something with lib to install something in lib, it's also shorter and I'd recommend "-" instead of "_" simply because it's a lot more common for ports).
Comment 5 Slava Mikerov 2017-03-27 10:11:32 UTC
Created attachment 181228 [details]
shar
Comment 6 Michael Gmelin freebsd_committer freebsd_triage 2017-03-27 15:35:33 UTC
There are a few problems with this port:
 - It installs files in /usr/local/cmake, which is a non-standard location
   Are cmake files required? If yes, please place them in the appropriate
   location (see man 7 hier). I feel like it would be best to not install them   
   at all
 - pkg-descr has lines > 80 chars (this is something portlint warns about)
 - As shown by poudriere testport, this port can use NO_ARCH=yes
   (pkg-static: DEVELOPER_MODE: Notice: arch "FreeBSD:10:amd64" -- no   
    architecture specific files found: **** could this package use a wildcard 
    architecture?)

As this is header only, maybe it would be best to override the installation target to simply copy the file in question and only add the USES part in case TEST is enabled. This would reduce most of the dependencies.
Comment 7 Slava Mikerov 2017-03-28 09:52:28 UTC
Created attachment 181263 [details]
shar
Comment 8 Michael Gmelin freebsd_committer freebsd_triage 2017-03-28 23:44:15 UTC
(In reply to Slava Mikerov from comment #7)

This still puts cmake files in the wrong location ($PREFIX/cmake/Modules instead of $PREFIX/share/cmake/Modules).

It also doesn't run unit tests on "make test", even if TEST is enabled.

I'll try to fix this for you and commit it.
Comment 9 Michael Gmelin freebsd_committer freebsd_triage 2017-03-29 00:42:43 UTC
I changed the Makefile in the following ways:
 - Add post-patch target to fix cmake file installation location
 - add do-test-TEST-on target for running tests
 - Fix and move PLIST into Makefile (due to the low number of files
   and as suggested by portlint -a)
 - order USES arguments alphabetically

I just committed it, please feel free to ask any questions in case any of my changes are unclear to you.
Comment 10 commit-hook freebsd_committer freebsd_triage 2017-03-29 00:46:31 UTC
A commit references this bug:

Author: grembo
Date: Wed Mar 29 00:28:20 UTC 2017
New revision: 437178
URL: https://svnweb.freebsd.org/changeset/ports/437178

Log:
  Add nlohmann-json v2.1.1, JSON library for Modern C++.

  PR:		215098
  Submitted by:	Viacheslav Mikerov <SlavaMikerov@gmail.com>

Changes:
  head/devel/Makefile
  head/devel/nlohmann-json/
  head/devel/nlohmann-json/Makefile
  head/devel/nlohmann-json/distinfo
  head/devel/nlohmann-json/pkg-descr