Bug 255974 - New port: www/civetweb Embedded C/C++ web server
Summary: New port: www/civetweb Embedded C/C++ web server
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: Guangyuan Yang
URL:
Keywords:
Depends on:
Blocks: 242546
  Show dependency treegraph
 
Reported: 2021-05-18 12:38 UTC by Frank Scholl
Modified: 2021-06-02 02:22 UTC (History)
2 users (show)

See Also:


Attachments
civetweb 1.14 (2.01 KB, patch)
2021-05-18 12:38 UTC, Frank Scholl
no flags Details | Diff
civetweb 1.14 (2.06 KB, patch)
2021-05-28 17:02 UTC, Frank Scholl
maintainer.freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Scholl 2021-05-18 12:38:31 UTC
Created attachment 225061 [details]
civetweb 1.14

This port is an embedded C/C++ web server, available as a binary and as a shared library.

This port is needed by science/orthanc as a build dependency. While porting science/orthanc, this port was created to integrate science/orthanc and its dependencies into the ports tree as much as possible.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2021-05-20 00:40:00 UTC
Hi,

You should use DISTVERSION as Porters Handbook instructions you to.
https://docs.freebsd.org/en/books/porters-handbook/book.html#makefile-master_sites-github-description

DISTVERSIONPREFIX should be set before DISTVERSION - See link above

Please define LICENSE_FILE
https://docs.freebsd.org/en/books/porters-handbook/book.html#licenses

USE_LDCONFIG is missing
https://docs.freebsd.org/en/books/porters-handbook/book.html#porting-shlibs

Have a look at section "6.5.4. Using cmake" in Porters Handbook, CMAKE_ON / CMAKE_OFF should work instead of using CMAKE_ARGS

Looking at the CMake-file these options doesn't seem to be enabled by default, does it make sense to have these enabled especially since they won't pull in any other deps?
CIVETWEB_ENABLE_IPV6 , CIVETWEB_ENABLE_ZLIB , CIVETWEB_ENABLE_SSL ?

You don't need to define GH_ACCOUNT
https://docs.freebsd.org/en/books/porters-handbook/book.html#makefile-master_sites-github-description

USE_GITHUB needs to be relocated in the Makefile

Give portlint and/or portfmt a spin :-)

Does it build using poudriere?

Thanks for your submission

Best regards,
Daniel
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2021-05-20 00:52:08 UTC
...and I forgot, if unit tests works please enable it in the port.
Comment 3 Frank Scholl 2021-05-28 17:02:00 UTC
Created attachment 225334 [details]
civetweb 1.14

This port got an update to reflect the changes suggested by Daniel:

- DISTVERSIONPREFIX is defined before DISTVERSION
- LICENSE_FILE is added.
- now users CMAKE_ON / CMAKE_OFF instead of using CMAKE_ARGS.
- as suggested, CIVETWEB_ENABLE_IPV6, CIVETWEB_ENABLE_ZLIB, CIVETWEB_ENABLE_SSL are turned on.
- GH_ACCOUNT is not used anymore.

Further information:
- portlint is fine.
- Builds in poudriere (testport), tested for 11.4, 12.2 and 13.0
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-06-02 02:19:42 UTC
A commit in branch main references this bug:

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

commit f1e718499cb309115b622453026bbacc4af60d73
Author:     Frank Scholl <maintainer.freebsd@xpoundit.com>
AuthorDate: 2021-06-02 02:18:26 +0000
Commit:     Guangyuan Yang <ygy@FreeBSD.org>
CommitDate: 2021-06-02 02:18:26 +0000

    www/civetweb: New port: Embedded C/C++ web server

    PR:             255974
    Approved by:    lwhsu (mentor)

 www/Makefile                 |  1 +
 www/civetweb/Makefile (new)  | 21 +++++++++++++++++++++
 www/civetweb/distinfo (new)  |  3 +++
 www/civetweb/pkg-descr (new) |  3 +++
 www/civetweb/pkg-plist (new) | 11 +++++++++++
 5 files changed, 39 insertions(+)
Comment 5 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-02 02:22:35 UTC
Committed, thanks!