Bug 254686

Summary: lang/scsh: Patch attached - undeleting and updating lang/scsh port
Product: Ports & Packages Reporter: Sean Champ <lab+bsd>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Only Me CC: fuz
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
lang/scsh: Undelete and update port
none
lang/scsh: Undelete and update port (with update to MOVED) none

Description Sean Champ 2021-04-01 04:40:39 UTC
Created attachment 223738 [details]
lang/scsh: Undelete and update port

The lang/scsh port was deleted in 2014
https://svnweb.freebsd.org/ports?view=revision&revision=367800

After some testing for a port contribution for scsh under pkgsrc-wip, it was possible to build scsh from src available at GitHub
https://github.com/scheme/scsh
This build used scheme48

The attached patch would undelete the lang/scsh port. furthermore updating the port with the following features
* using scsh src from the scheme group at GitHub. 
* add a second distfile, to accommodate a git submodule (rx) used for the scsh build
* using scheme48 when building this src
* adding port options for processing the scsh reference documentation, to an effect of producing documentation in any zero or more formats: Text, Markdown, HTML, LaTeX, and PDF. Any of these options requires, at least, racket - as to provide racket's scribble cmd. The PDF option also requires Xetex
* updated pkg-message, for the newer src
* adding a test target

To address some known concerns about the undeleted port:
- There are other ways to produce PDF with racket's scribble. Using Xetex might serve at least to minimize the additional dependencies under this port option
- While I've tested the build and the built scsh locally under a direct ports build, I've not yet been able to test it under a poudriere build - Poudriere is now in hour 48 of a local ports build and the build machine is pretty well maxxed out for processor usage. Inasmuch, I'm not entirely certain if all the build dependencies will "Just work" under Poudriere - there may be some option-specific dependencies I've missed, simply due to the ports being installed under the initial build
- The scsh built with the direct ports build, locally, has been tested only insofar as to ensure it can create a REPL on the console.  Candidly, although the updated port provides a test target, I notice that I've not yet built the port under a testing configuration.

Regardless, I hope that the patch may be of interest. I'll try to conduct some further testing with the patched ports tree, locally. I believe it might be usable as-is. 

Of course, it may need further build testing with poudriere - such as with all docs options enabled, to catch any missing deps - and testing under the test target.


Health,

- Sean Champ
Comment 1 Sean Champ 2021-04-01 04:44:17 UTC
Comment on attachment 223738 [details]
lang/scsh: Undelete and update port

The pkg-descr may need further updating - just noticed. The code seems to work, at least for one local build
Comment 2 Sean Champ 2021-04-01 15:31:30 UTC
For the patched port, I've tested the build under poudriere, and tested under do-test.

The initial attachment on this bugzilla topic does not include an update for /usr/ports/MOVED. I'll put a patch together that would remove the entry:
lang/scsh||2014-09-10|Not staged

Under make(do-test) scsh's own test tgt will run some testing code with the scsh.image as built. An initial REPL screen will be displayed, but the testing code itself will run without interaction required. 

I'll attach an updated patch to a later comment

- Sean
Comment 3 Sean Champ 2021-04-01 15:39:03 UTC
Created attachment 223751 [details]
lang/scsh: Undelete and update port (with update to MOVED)

Attached: An updated patch for un-deleting lang/scsh. This patch will also update MOVED

- Sean
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-04-27 21:54:03 UTC
Thank you for your submission.  Please make sure to set "maintainer-approval" on your patch so it gets looked at.

 - please set MAINTAINER to your email address if you want to maintain this port
 - your USE_GITHUB usage looks wonky.  Why is there no default distfile?
 - NO_STAGE is no longer supported.  Please remove it.
 - the way you deal with the SCRBL options seems very complicated.  I don't
   completely understand it.  Can it be done simpler?  For example, the PORTDOCS
   loop could be simplified to

    .for opt in ${OPTIONS_GROUP_SCRBL}
    . if ${PORT_OPTIONS:M${.OPT.}}
    PORTDOCS+= ${${.OPT.}_DIR}/${SCRBL_FILES:.scribble=${${.OPT.}_EXT}}
    . endif
    .endfor