Bug 242144 - new port: graphics/airsaned-d20211018: Apple AirScan compatible SANE web frontend
Summary: new port: graphics/airsaned-d20211018: Apple AirScan compatible SANE web fron...
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: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-21 16:57 UTC by J.R. Oldroyd
Modified: 2021-10-08 07:17 UTC (History)
1 user (show)

See Also:


Attachments
shar archive of initial port version (6.01 KB, text/plain)
2019-11-21 16:57 UTC, J.R. Oldroyd
no flags Details
shar archive of initial port version (6.43 KB, text/plain)
2019-11-21 18:50 UTC, J.R. Oldroyd
no flags Details
shar archive of initial port version (6.24 KB, text/plain)
2019-12-05 03:21 UTC, J.R. Oldroyd
no flags Details
shar of airsaned-d20211018 (7.59 KB, text/plain)
2021-10-05 09:51 UTC, J.R. Oldroyd
no flags Details
Patch for airsaned (7.48 KB, patch)
2021-10-05 11:24 UTC, Daniel Engberg
no flags Details | Diff
update to 0.3.2.51 (7.71 KB, text/plain)
2021-10-05 14:01 UTC, J.R. Oldroyd
fbsd: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J.R. Oldroyd 2019-11-21 16:57:07 UTC
Created attachment 209322 [details]
shar archive of initial port version

Apple AirScan compatible SANE web frontend
Comment 1 J.R. Oldroyd 2019-11-21 18:50:22 UTC
Created attachment 209325 [details]
shar archive of initial port version

A port's date-version is supposed to be date of last commit, so fixed that.

Also an additional patch to fix obtaining hostname on BSD.
Comment 2 J.R. Oldroyd 2019-12-05 03:21:08 UTC
Created attachment 209711 [details]
shar archive of initial port version

I simplified the etc/rc.d script for this.

Also removed pkg-plist and used PLIST_FILES= in Makefile instead since there is only one file that's installed.

Also renamed the port from "graphics/airsane" to "graphics/airsaned" because that is what's installed and that allows further Makefile cleanups.
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2021-10-04 23:50:11 UTC
Hi,

Could you bump this to latest release if its still of interest otherwise please close this bug report.

I apologize for very long handling time.

Best regards,
Daniel
Comment 4 J.R. Oldroyd 2021-10-05 09:51:24 UTC
Created attachment 228458 [details]
shar of airsaned-d20211018

As requested.
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2021-10-05 10:21:15 UTC
Great, thanks!
Can you also try to get the patches submitted upstream?
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2021-10-05 11:24:58 UTC
Created attachment 228459 [details]
Patch for airsaned

Remove # $FreeBSD:$ (obsolete)
Change PORTVERSION to DISTVERSION and other related variables to follow Porter's Handbook
https://docs.freebsd.org/en/books/porters-handbook/book/ - "Example 19. Using USE_GITHUB to Access a Commit Between Two Versions"
Add jpeg dependency to USES=
Change hardcoded GCC c++11 library to generic c++11 library dependency to avoid pulling in GCC unnecessarily
Move includes via CFLAGS to USES= localbase:ldflags
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2021-10-05 11:26:06 UTC
Hi,

Can you give this patch a try and I don't see why we need to hardcode GCC dependency?

Best regards,
Daniel
Comment 8 J.R. Oldroyd 2021-10-05 11:48:45 UTC
Looks good.

The gcc must have been needed back when I did the original version in October 2019, but it does work now without.

And thanks for finding the version number!
Comment 9 J.R. Oldroyd 2021-10-05 14:01:36 UTC
Created attachment 228462 [details]
update to 0.3.2.51

I've updated the patches so that they are suitable for sending to upstream.

At the same time, I see upstream commited this morning, so I rebased to that.
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-10-08 07:07:49 UTC
A commit in branch main references this bug:

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

commit b75c465cc063856bd854ff9e91c4a09d2dea3de4
Author:     J.R. Oldroyd <fbsd@opal.com>
AuthorDate: 2021-10-08 06:14:55 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2021-10-08 07:06:34 +0000

    graphics/airsaned: New port: Apple AirScan compatible SANE web frontend

    A SANE WebScan frontend that supports Apple's AirScan protocol.
    Scanners are detected automatically, and published through mDNS.
    Acquired images may be transferred in JPEG, PNG, and PDF/raster format.

    WWW: https://github.com/SimulPiscator/AirSane

    PR:             242144
    Approved by:    arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32314

 graphics/Makefile                                  |  1 +
 graphics/airsaned/Makefile (new)                   | 32 ++++++++++
 graphics/airsaned/distinfo (new)                   |  3 +
 graphics/airsaned/files/airsaned.in (new)          | 24 ++++++++
 graphics/airsaned/files/patch-CMakeLists.txt (new) | 71 ++++++++++++++++++++++
 .../files/patch-imageformats-pngencoder.cpp (new)  | 20 ++++++
 .../airsaned/files/patch-server-server.cpp (new)   | 16 +++++
 .../airsaned/files/patch-web-httpserver.cpp (new)  | 12 ++++
 .../files/patch-zeroconf-hotplugnotifier.cpp (new) | 14 +++++
 graphics/airsaned/pkg-descr (new)                  | 21 +++++++
 graphics/airsaned/pkg-plist (new)                  |  4 ++
 11 files changed, 218 insertions(+)
Comment 11 Daniel Engberg freebsd_committer freebsd_triage 2021-10-08 07:17:22 UTC
Your version bump actually flew by my radar (except for upstreamable patch changes) and we don't need to bump the port for a change in the readme file.
Unless there's a major fix etc I'd suggest that we stick to releases for now on. 

Committed with some modifications, thanks for your contribution and patience!