Skip to content

Commit

Permalink
sysutils/xxd: Make port track vim version, fix WWW
Browse files Browse the repository at this point in the history
As suggested by adamw, since the port uses the vim distribution,
it can track the vim port PORTVERSION, and use its distfile. [1]

While here:

- Fix WWW, tracking vim one here too [1]
- Adjust COMMENT and pkg-plist a little

Reported by:	adamw [1]
Approved by:	Gianmarco Giovannelli <gmarco@giovannelli.it> (maintainer)
  • Loading branch information
madpilot78 committed Mar 31, 2023
1 parent be28259 commit fb9f09b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
18 changes: 13 additions & 5 deletions sysutils/xxd/Makefile
@@ -1,14 +1,15 @@
PORTNAME= xxd
DISTVERSIONPREFIX= v
DISTVERSION= 9.0.1366
DISTVERSIONPREFIX= ${VIM_DISTVERSIONPREFIX}
DISTVERSION= ${VIM_DISTVERSION}
CATEGORIES= sysutils

MAINTAINER= gmarco@giovannelli.it
COMMENT= Hexdump and reverse hexdump utility
WWW= https://github.com/mew-cx/xxd
COMMENT= Hexdump and reverse hexdump utility from vim distribution
WWW= ${VIM_WWW}

CONFLICTS_INSTALL= vim-[0-9]* vim-gtk2 vim-gtk3 vim-motif vim-x11

DISTINFO_FILE= ${VIM_PORT}/distinfo
ALL_TARGET= ${PORTNAME}
PORTSCOUT= ignore:1
EXTRACT_AFTER_ARGS= --include='*/src/xxd*'
Expand All @@ -20,7 +21,14 @@ USE_GITHUB= yes
GH_ACCOUNT= vim
GH_PROJECT= vim

.include <bsd.port.pre.mk>

VIM_PORT= ${.CURDIR}/../../editors/vim
VIM_DISTVERSIONPREFIX!= ${BSDMAKE} -f ${VIM_PORT}/Makefile -V DISTVERSIONPREFIX
VIM_DISTVERSION!= ${BSDMAKE} -f ${VIM_PORT}/Makefile -V DISTVERSION
VIM_WWW!= ${BSDMAKE} -f ${VIM_PORT}/Makefile -V WWW

do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xxd ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>
.include <bsd.port.post.mk>
3 changes: 0 additions & 3 deletions sysutils/xxd/distinfo

This file was deleted.

4 changes: 3 additions & 1 deletion sysutils/xxd/pkg-descr
@@ -1,2 +1,4 @@
Xxd creates a hex dump of a given file or standard input.
Standalone xxd utility fromt eh vim editor ditribution.

Xxd creates an hex dump of a given file or standard input.
It can also convert a hex dump back to its original binary form.

0 comments on commit fb9f09b

Please sign in to comment.