Bug 240304 - textproc/bat: Update to v0.12.1
Summary: textproc/bat: Update to v0.12.1
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: Luca Pizzamiglio
URL: https://github.com/sharkdp/bat/releas...
Keywords:
Depends on:
Blocks: 240725
  Show dependency treegraph
 
Reported: 2019-09-03 15:52 UTC by Santhosh Raju
Modified: 2019-09-23 11:42 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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
Comment 8 Santhosh Raju freebsd_committer freebsd_triage 2019-09-21 07:34:49 UTC
A bug report has been filed with the suggested change in Mk/Uses/cargo.mk

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240725
Comment 9 Santhosh Raju freebsd_committer freebsd_triage 2019-09-21 13:17:52 UTC
(In reply to Santhosh Raju from comment #8)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240725#c2

Looks like adding the dependency in cargo.mk makes LLVM being unnecessarily being pulled by other rust ports that may not need it.

According to the rust people, "It might be better to leave it up to the individual ports to add it when they actually need it."

I could update the patch to have a BUILD_DEPENDS line for textproc/bat, do let me know if this is alright with you.
Comment 10 Luca Pizzamiglio freebsd_committer freebsd_triage 2019-09-23 10:06:07 UTC
I've spoken with tobik and he disagree in automatic dependency injection in cargo.mk.
I'm testing the build, adding llvm${LLVM_DEFAULT} as BUILD_DEPEND
it seems the way to go
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-09-23 11:01:01 UTC
A commit references this bug:

Author: pizzamig
Date: Mon Sep 23 11:00:27 UTC 2019
New revision: 512624
URL: https://svnweb.freebsd.org/changeset/ports/512624

Log:
  textproc/bat: Update to 0.12.1

  Changes: https://github.com/sharkdp/bat/releases/

  PR:		240304
  Submitted by:	fox@

Changes:
  head/textproc/bat/Makefile
  head/textproc/bat/distinfo
Comment 12 Santhosh Raju freebsd_committer freebsd_triage 2019-09-23 11:18:43 UTC
Thank you for the commit.

Closing the ticket since the package has been updated to 0.12.1 in the repository.