sysutils/tree: provide fallback download URL and other improvements

- For some reason, upstream distfile site is currently inaccessible
  in certain parts of the world, e.g. Russia
- Pass build-related variables down to inner Makefile via MAKE_ARGS
  and remove the patch file (particularly, it was patching `install'
  target which is useless as the port is using its own)
- Adjust LICENSE (it's GPLv2 or later) and install documentation in
  the dedicated helper target (also install TODO file while here)

PR:	261547
This commit is contained in:
Alexey Dokuchaev 2022-01-29 06:36:26 +00:00
parent 919fa2a44a
commit 7fbb727e11
2 changed files with 7 additions and 52 deletions

View file

@ -3,27 +3,29 @@
PORTNAME= tree
PORTVERSION= 2.0.1
CATEGORIES= sysutils
MASTER_SITES= http://mama.indstate.edu/users/ice/tree/src/
MASTER_SITES= http://mama.indstate.edu/users/ice/tree/src/ \
https://fossies.org/linux/misc/
MAINTAINER= gb@unistra.fr
COMMENT= Display a tree-view of directories with optional color or HTML output
LICENSE= GPLv2
LICENSE= GPLv2+
MAKE_ENV+= MKDIR="${MKDIR}"
USES= gmake tar:tgz
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
PLIST_FILES= bin/tree \
man/man1/tree.1.gz \
man/man1/tree.fr.1.gz
PORTDOCS= CHANGES README
PORTDOCS= CHANGES README TODO
OPTIONS_DEFINE= DOCS
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tree ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

View file

@ -1,47 +0,0 @@
--- Makefile.orig 2022-01-23 13:10:10.027280000 +0100
+++ Makefile 2022-01-23 13:14:05.143686000 +0100
@@ -24,7 +24,7 @@
VERSION=2.0.1
TREE_DEST=tree
DESTDIR=${PREFIX}/bin
-MAN=tree.1
+MAN=doc/tree.1
MANDIR=${PREFIX}/man
OBJS=tree.o list.o hash.o color.o file.o filter.o info.o unix.o xml.o json.o html.o strverscmp.o
@@ -32,13 +32,13 @@
# Linux defaults:
#CFLAGS=-ggdb -pedantic -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-CFLAGS=-O3 -pedantic -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-LDFLAGS=-s
+#CFLAGS=-O3 -pedantic -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+#LDFLAGS=-s
# Uncomment for FreeBSD:
-#CC=cc
-#CFLAGS=-O2 -Wall -fomit-frame-pointer
-#LDFLAGS=-s
+CC=cc
+CFLAGS=-O2 -Wall -fomit-frame-pointer
+LDFLAGS=-s
# Uncomment for OpenBSD:
#TREE_DEST=colortree
@@ -101,11 +101,11 @@
clean:
rm -f $(TREE_DEST) *.o *~
-install: tree
- $(INSTALL) -d $(DESTDIR)
- $(INSTALL) -d $(MANDIR)/man1
- $(INSTALL) $(TREE_DEST) $(DESTDIR)/$(TREE_DEST); \
- $(INSTALL) -m 644 doc/$(MAN) $(MANDIR)/man1/$(MAN)
+install: $(TREE_DEST)
+ @$(MKDIR) $(BINDIR)
+ @$(MKDIR) $(MANDIR)
+ ${BSD_INSTALL_PROGRAM} $(TREE_DEST) $(BINDIR)
+ ${BSD_INSTALL_MAN} $(MAN) $(MANDIR)
distclean:
rm -f *.o *~