Bug 240304 - textproc/bat: Update to v0.12.1
Summary: textproc/bat: Update to v0.12.1
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Luca Pizzamiglio
URL: https://github.com/sharkdp/bat/releas...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-03 15:52 UTC by Santhosh Raju
Modified: 2019-09-20 16:08 UTC (History)
3 users (show)

See Also:
pizzamig: maintainer-feedback+


Attachments
Patch to upgrade the ports script to support bat-v0.12.1 builds. (39.03 KB, patch)
2019-09-03 15:52 UTC, Santhosh Raju
fox: maintainer-approval? (pizzamig)
Details | Diff
Patch to add libclang.so dependency for onig_sys (Mk/Uses/cargo.mk) (495 bytes, patch)
2019-09-20 16:08 UTC, Santhosh Raju
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Santhosh Raju freebsd_committer 2019-09-03 15:52:33 UTC
Created attachment 207146 [details]
Patch to upgrade the ports script to support bat-v0.12.1 builds.

bat has been updated to v0.12.1.

I have made a patch that enables to build v0.12.1 in ports.

Change Log:

textproc/bat: Update to 0.12.1

Changes since 0.12.0:

Bugfixes

  * Fixes a bug for older Windows versions ("The procedure entry point
    CreateFile2 could not be located")

Changes since 0.11.0:

Features

  * Binary file content can now be viewed with bat -A
  * bat can now be used as a man pager.
  * Add new style component to separate multiple --line-ranges
  * Added -L as an alias for --list-languages

Bugfixes

  * Output looks unbalanced when using '--style=grid,numbers' without 'header'
  * issues with filenames starting with "cache"
  * Can't build cache with new theme without creating cache dir
  * --terminal-width -10 is parsed incorrectly

Other

  * Added fish completions to DEB package

New syntaxes

  * Emacs Org mode
  * requirements.txt
  * DotENV .env
  * SSH config syntax (-l ssh_config)
  * /etc/hosts
  * GraphQL
  * Verilog
  * SCSS and Sass
  * strace syntax

Packaging

  * bat is now in the official Gentoo repositories
  * bat is now in the official Alpine Linux repositories
  * bat is in the official Fedora repositories
Comment 1 Santhosh Raju freebsd_committer 2019-09-03 16:28:55 UTC
Oops, I accidentally added myself to the maintainer feedback when submitting the patch, this was not intentional.

How do I remove myself from the maintainer-feedback?
Comment 2 Santhosh Raju freebsd_committer 2019-09-04 04:05:32 UTC
Comment on attachment 207146 [details]
Patch to upgrade the ports script to support bat-v0.12.1 builds.

Set the current maintainer for maintainer-approval.
Comment 3 Luca Pizzamiglio freebsd_committer 2019-09-20 12:54:14 UTC
It's not building.
this the PR for bat:
https://github.com/sharkdp/bat/issues/650

The problem is with the onig_sys crate, as reported in this PR:
https://github.com/rust-onig/rust-onig/issues/109

Adding llvm as build dependency should solve the issue, I guess bingen needs libclang.so, however it seems weird.
Comment 4 Santhosh Raju freebsd_committer 2019-09-20 13:05:20 UTC
(In reply to Luca Pizzamiglio from comment #3)

> Adding llvm as build dependency should solve the issue, I guess bingen needs libclang.so, however it seems weird.

I had a similar issue building it in NetBSD and adding libclang.so as a package dependency resolved it. I can update the patch with the dependency, also do a poudriere build to see if things work.
Comment 5 Luca Pizzamiglio freebsd_committer 2019-09-20 13:43:04 UTC
adding the build depends to bat is a solution, but not the best one.

A better place would be Mk/Uses/cargo.mk , were onig_sys is already treated as a special citizens.

IMO, a PR on that file would be more appropriate
Comment 6 Santhosh Raju freebsd_committer 2019-09-20 14:32:39 UTC
(In reply to Luca Pizzamiglio from comment #5)

> A better place would be Mk/Uses/cargo.mk , were onig_sys is already treated as a special citizens.

Understood, let me play around with it a bit and see if I can get it to build correctly by changing the above file in the correct place.

Thank you for the advice.
Comment 7 Santhosh Raju freebsd_committer 2019-09-20 16:08:27 UTC
Created attachment 207655 [details]
Patch to add libclang.so dependency for onig_sys (Mk/Uses/cargo.mk)

Adding

LIB_DEPENDS+=  libclang.so:devel/llvm${LLVM_DEFAULT}

to the onig_sys section in Mk/Uses/cargo.mk seems to fix the build issue and I was able to test it for FreeBSD/amd64 12.0-RELEASE in poudriere. I should also do a check for it in 11 and 13-CURRENT.

I am not sure if that is the correct way to define the dependency in cargo.mk, but I shall raise a separate bug report like you suggested on Mk/Uses/cargo.mk