Bug 254388

Summary: shells/fish: Update to 3.2.1
Product: Ports & Packages Reporter: Lewis Cook <lcook>
Component: Individual Port(s)Assignee: Alan Somers <asomers>
Status: Closed FIXED    
Severity: Affects Only Me CC: diizzy
Priority: --- Flags: asomers: maintainer-feedback+
lcook: maintainer-feedback?
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/fish-shell/fish-shell/releases/tag/3.2.1
Attachments:
Description Flags
fish-3.2.1.diff
none
fish-3.2.1.diff none

Description Lewis Cook freebsd_committer freebsd_triage 2021-03-18 19:08:43 UTC
Created attachment 223402 [details]
fish-3.2.1.diff

I switched the port to use `tar:xz` instead since on the latest release page[1], there's no gz archive to download for building. As mentioned in the notes, fish source tarballs are now distributed using the xz compression. Both pkg-plist and the patch in files/ have been updated accordingly.

Tested and built inside Poudriere with 12.2-RELEASE (amd64/i386). Looking at prior releases, numerous features have been introduced, so I don't think an MFH would be necessary here.

Thanks!

Changes: 
 * https://github.com/fish-shell/fish-shell/releases/tag/3.2.0
 * [1]https://github.com/fish-shell/fish-shell/releases/tag/3.2.1
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2021-03-19 00:51:39 UTC
Hi,

I few issues that should be fixed in general

PORTVERSION --> DISTVERSION
"Table 5.2. Package Naming Examples" in Porters Handbook

LICENSE_FILE is missing

USES= python:3.4+,build is invaild as oldest version in tree is 3.6
You probbaly also want to use env instead of build given the comment about python usage in Makefile and sort options in alphabetical order

Several DEPENDS arguments uses += instead of =

There's a proper option for docs, "BUILD_DOCS:BOOL=OFF"

Best regards,
Daniel
Comment 2 Lewis Cook freebsd_committer freebsd_triage 2021-03-19 03:07:27 UTC
Created attachment 223410 [details]
fish-3.2.1.diff

Great suggestions; those have now been addressed in the latest patch; thanks! One thing I'm unsure about is having MANPAGES glued together with DOCS with my initial thought of this; 

DOCS_BUILD_DEPENDS=     sphinx-build:textproc/py-sphinx
DOCS_CMAKE_BOOL=        BUILD_DOC
MANPAGES_BUILD_DEPENDS= ${DOCS_BUILD_DEPENDS}
MANPAGES_CMAKE_BOOL=    ${DOCS_CMAKE_BOOL}

The problem/peeve is this line[1] (checking for the presence of the sphinx binary); both options (DOCS & MANPAGES) are mutually inclusive. Therefore, the documentation and manpages are always built, regardless of whether the other option is disabled. Annoyingly unless we patch the file, we can't change that behaviour, but it's not the be-all-end-all of everything.

Whilst it works fine without issue if both options are enabled, as expected, CMAKE_ARGS gets a duplicate entry:

$ make -VCMAKE_ARGS | grep -o '\-DBUILD_DOC:BOOL=true'
-DBUILD_DOC:BOOL=true
-DBUILD_DOC:BOOL=true

So, instead, I've added a conditional in the pre-stage;

.if ${PORT_OPTIONS:MDOCS} || ${PORT_OPTIONS:MMANPAGES}
CMAKE_ARGS+=    -DBUILD_DOCS=TRUE
BUILD_DEPENDS+= sphinx-build:textproc/py-sphinx
.endif

If there's a more elegant way, I would love to know. Otherwise, it works OK. For the record, I've taken the courtesy of formatting with portfmt/portclippy.

Cheers!

[1] https://github.com/fish-shell/fish-shell/blob/master/cmake/Docs.cmake#L43
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2021-03-20 19:57:08 UTC
That looks a lot better to me, nicely done!
Comment 4 Alan Somers freebsd_committer freebsd_triage 2021-03-21 00:52:01 UTC
LGTM!  And thanks for the tip about python:env, Daniel.  I didn't know that.
Comment 5 Lewis Cook freebsd_committer freebsd_triage 2021-03-23 09:34:05 UTC
Are we OK to commit? :)
Comment 6 Alan Somers freebsd_committer freebsd_triage 2021-03-23 13:01:15 UTC
Ok by me, lcook.  But I am not a ports committer.
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-03-24 11:30:39 UTC
A commit references this bug:

Author: lcook
Date: Wed Mar 24 11:29:41 UTC 2021
New revision: 569108
URL: https://svnweb.freebsd.org/changeset/ports/569108

Log:
  shells/fish: Update to 3.2.1

  While here, appease both portclippy/portfmt and simplify port.

  Changes:		https://github.com/fish-shell/fish-shell/releases/tag/3.2.0
  			https://github.com/fish-shell/fish-shell/releases/tag/3.2.1
  PR:			254388
  Reviewed by: 		asomers (maintainer)
  Approved by:		fernape (mentor)
  Differential Revision:	https://reviews.freebsd.org/D29395

Changes:
  head/shells/fish/Makefile
  head/shells/fish/distinfo
  head/shells/fish/files/patch-cmake_Install.cmake
  head/shells/fish/pkg-plist
Comment 8 Lewis Cook freebsd_committer freebsd_triage 2021-03-24 11:31:31 UTC
Committed! :)