Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New recipe: diff-so-fancy #7872

Merged
merged 2 commits into from
Feb 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 36 additions & 0 deletions app-misc/diff-so-fancy/diff_so_fancy-1.4.3.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
SUMMARY="Pretty diff generator"
DESCRIPTION="diff-so-fancy strives to make your diffs human readable instead of machine readable. \
This helps improve code quality and helps you spot defects faster.

Configure git to use diff-so-fancy for all diff output:

git config --global core.pager \"diff-so-fancy | less --tabs=4 -RFX\"
git config --global interactive.diffFilter \"diff-so-fancy --patch\""
HOMEPAGE="https://github.com/so-fancy/diff-so-fancy"
COPYRIGHT="2016 So Fancy team"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
COPYRIGHT="2016 So Fancy team"
COPYRIGHT="2016-2022 So Fancy team"

Just to acknowledge the date of this particular release (and so it doesn't appears to be "ancient" code).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've copied this from their license file, since this is mainly intended as a legal basis I'm not compfprtable with changing it on a whim.

LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/so-fancy/diff-so-fancy/releases/download/v$portVersion/diff-so-fancy#noarchive"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to download the whole release using the standard

https://github.com/so-fancy/diff-so-fancy/archive/refs/tags/v$portVersion.tar.gz

so that you can copy the README.md (and the other markdown files?) to $docDir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file downloaded and the file in the archive are not equivalent

see so-fancy/diff-so-fancy#455

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's annoying. In theory you could add an extra SOURCE_URI to get the markdown files but I don't know if it's critical.

CHECKSUM_SHA256="de90659705436cf17d9a8aaad7012c9ed82d7f16eadf1ecee3d6badb0717b73f"

DISABLE_SOURCE_PACKAGE="yes"

ARCHITECTURES="all"
nephele-gh marked this conversation as resolved.
Show resolved Hide resolved
SECONDARY_ARCHITECTURES="?x86"

PROVIDES="
diff_so_fancy = $portVersion
cmd:diff_so_fancy
"

REQUIRES="
haiku
cmd:perl
"

INSTALL()
{
mkdir -p $binDir
cp diff-so-fancy $binDir
chmod o+x $binDir/diff-so-fancy
augiedoggie marked this conversation as resolved.
Show resolved Hide resolved
}