Bug 267599 - www/restinio: Use upstream release archive
Summary: www/restinio: Use upstream release archive
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: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-06 14:13 UTC by Daniel Engberg
Modified: 2022-11-07 08:04 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
Patch for restinio (2.80 KB, patch)
2022-11-06 14:13 UTC, Daniel Engberg
no flags Details | Diff
Patch for restinio (2.92 KB, patch)
2022-11-06 20:45 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2022-11-06 14:13:24 UTC
Created attachment 237898 [details]
Patch for restinio

Use upstream release archive as recommended by Porters Handbook in USE_GITHUB section

Use Boost Asio instead of standalone library to reduce amount of dependencies

Compileand runtime tested on FreeBSD 13.1-STABLE (amd64) (make, make check-plist, make test)
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-06 17:13:48 UTC
Thanks for the patch.

This patch breaks the build when SAMPLES=ON.

* fatal error: 'clara.hpp' file not found
* also #include <asio.hpp> in installed files isn't satisfied

Perhaps it is broken with RESTINIO_USE_BOOST_ASIO=shared - I am not sure what this does/supposed to do. But it works with RESTINIO_USE_BOOST_ASIO=none.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2022-11-06 17:26:37 UTC
(In reply to Yuri Victorovich from comment #1)
Ahh... thanks, I'll have a look again at it.
The idea (at least according to upstream) is to toggle between asio in boost and the external library.
https://github.com/Stiffstream/restinio/blob/master/dev/CMakeLists.txt#L66
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-06 17:30:47 UTC
> The idea (at least according to upstream) is to toggle between asio in boost and the external library.

It looks like this doesn't really work. This project is also currently frozen, so I wouldn't expect them to fix this.
So I think that most reasonable way is to keep asio as it is now.
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2022-11-06 18:59:24 UTC
(In reply to Yuri Victorovich from comment #3)
It does however users of restinio headers needs to define what library/code path they want to use.

https://github.com/Stiffstream/restinio/blob/master/dev/restinio/asio_include.hpp#L11

Given the above I think we shouldn't define net/asio as a hard dependency

opendht actually requires asio external (definition is missing in port)
https://github.com/savoirfairelinux/opendht/blob/master/CMakeLists.txt#L80 and I would assume that any other potential user would do the same.
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2022-11-06 20:45:18 UTC
Created attachment 237909 [details]
Patch for restinio

Fix SAMPLES option

Poudriere testport OK 12.3-RELEASE (amd64)
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2022-11-07 08:04:26 UTC
Committed, thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-11-07 08:04:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ecda0c704abcaa82a6a2a5ddb2c0c588afe05781

commit ecda0c704abcaa82a6a2a5ddb2c0c588afe05781
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-11-07 07:51:05 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-11-07 08:04:28 +0000

    www/restinio: Use upstream release archive; Use Boost ASIO

    PR:             267599

 www/restinio/Makefile | 34 ++++++++++++++++++++++------------
 www/restinio/distinfo |  8 +++-----
 2 files changed, 25 insertions(+), 17 deletions(-)