mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] tree: Version bump. 1.6.0 -> 2.1.0
Date: Wed,  4 Jan 2023 13:11:42 +0100	[thread overview]
Message-ID: <20230104121142.3065356-1-christian.melki@t2data.com> (raw)

So, 10+ years since last update.
A few releases has been made.
https://mama.indstate.edu/users/ice/tree/changes.html

* Add patch to try to cleanup the variable handling in makefile.
* Fix prefix.
* Add busybox tree collision handling.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 ...ect-prefix-handling-and-installation.patch | 76 +++++++++++++++++++
 patches/tree-2.1.0/series                     |  5 ++
 rules/tree.in                                 |  4 +
 rules/tree.make                               |  7 +-
 4 files changed, 89 insertions(+), 3 deletions(-)
 create mode 100644 patches/tree-2.1.0/0100-Makefile-Correct-prefix-handling-and-installation.patch
 create mode 100644 patches/tree-2.1.0/series

diff --git a/patches/tree-2.1.0/0100-Makefile-Correct-prefix-handling-and-installation.patch b/patches/tree-2.1.0/0100-Makefile-Correct-prefix-handling-and-installation.patch
new file mode 100644
index 000000000..60fe88f94
--- /dev/null
+++ b/patches/tree-2.1.0/0100-Makefile-Correct-prefix-handling-and-installation.patch
@@ -0,0 +1,76 @@
+From: Christian Melki <christian.melki@t2data.com>
+Date: Wed, 4 Jan 2023 11:22:17 +0100
+Subject: [PATCH] Makefile: Correct prefix handling and installation
+
+Curly braces won't work.
+Just minimal effort variable handling cleaning.
+
+Signed-off-by: Christian Melki <christian.melki@t2data.com>
+---
+ Makefile | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 752e55002c59..2a8e2a62b068 100644
+--- a/Makefile
++++ b/Makefile
+@@ -23,10 +23,9 @@ INSTALL=install
+ 
+ VERSION=2.1.0
+ TREE_DEST=tree
+-DESTDIR=${PREFIX}/bin
+ MAN=tree.1
+-# Probably needs to be ${PREFIX}/share/man for most systems now
+-MANDIR=${PREFIX}/man
++BINDIR=$(PREFIX)/bin
++MANDIR=$(PREFIX)/man/man1
+ 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
+ 
+ # Uncomment options below for your particular OS:
+@@ -51,7 +50,6 @@ CFLAGS+=-O3 -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=6
+ #CC=cc
+ #CFLAGS+=-xO0 -v
+ #LDFLAGS+=
+-#MANDIR=${prefix}/share/man
+ 
+ # Uncomment for Cygwin:
+ #CFLAGS+=-O2 -Wall -fomit-frame-pointer
+@@ -63,22 +61,20 @@ CFLAGS+=-O3 -std=c11 -pedantic -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=6
+ #CC=cc
+ #CFLAGS+=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp
+ #LDFLAGS+=
+-#MANDIR=${PREFIX}/share/man
+ 
+ # Uncomment for HP/UX:
+-#prefix=/opt
++#PREFIX=/opt
+ #CC=cc
+ # manpage of mbsrtowcs() requires C99 and the two defines
+ #CFLAGS+=+w -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200112 -AC99
+ #LDFLAGS+=
+-#MANDIR=${PREFIX}/share/man
+ 
+ # Uncomment for OS/2:
+ #CFLAGS+=-02 -Wall -fomit-frame-pointer -Zomf -Zsmall-conv
+ #LDFLAGS+=-s -Zomf -Zsmall-conv
+ 
+ # Uncomment for HP NonStop:
+-#prefix = /opt
++#PREFIX=/opt
+ #CC=c89
+ #CFLAGS+=-Wextensions -WIEEE_float -g -Wnowarn=1506 -D_XOPEN_SOURCE_EXTENDED=1 \
+ #	 -Wallow_cplusplus_comments
+@@ -104,9 +100,10 @@ clean:
+ 
+ install: tree
+ 	$(INSTALL) -d $(DESTDIR)
+-	$(INSTALL) -d $(MANDIR)/man1
+-	$(INSTALL) $(TREE_DEST) $(DESTDIR)/$(TREE_DEST); \
+-	$(INSTALL) -m 644 doc/$(MAN) $(MANDIR)/man1/$(MAN)
++	$(INSTALL) -d $(DESTDIR)$(BINDIR)
++	$(INSTALL) -d $(DESTDIR)$(MANDIR)
++	$(INSTALL) $(TREE_DEST) $(DESTDIR)$(BINDIR)/$(TREE_DEST)
++	$(INSTALL) -m 644 doc/$(MAN) $(DESTDIR)$(MANDIR)/$(MAN)
+ 
+ distclean:
+ 	rm -f *.o *~
diff --git a/patches/tree-2.1.0/series b/patches/tree-2.1.0/series
new file mode 100644
index 000000000..4096d016c
--- /dev/null
+++ b/patches/tree-2.1.0/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+#tag:ptx --start-number 100
+0100-Makefile-Correct-prefix-handling-and-installation.patch
+# c6afa65ff4fa8096eb1f7c44d7fc7341  - git-ptx-patches magic
diff --git a/rules/tree.in b/rules/tree.in
index d513f04c9..4a03f1bd0 100644
--- a/rules/tree.in
+++ b/rules/tree.in
@@ -4,6 +4,10 @@ config TREE
 	tristate
 	prompt "tree"
 	select GCCLIBS_GCC_S
+	depends on !BUSYBOX_TREE || ALLYES
 	help
 	  A directory listing program displaying a depth indented list of
 	  files.
+
+comment "BusyBox' tree is selected!"
+	depends on BUSYBOX_TREE
diff --git a/rules/tree.make b/rules/tree.make
index 1f1512f21..feadeaf06 100644
--- a/rules/tree.make
+++ b/rules/tree.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_TREE) += tree
 #
 # Paths and names
 #
-TREE_VERSION	:= 1.6.0
-TREE_MD5	:= 04e967a3f4108d50cde3b4b0e89e970a
+TREE_VERSION	:= 2.1.0
+TREE_MD5	:= 50aa5cdb28df6340ef67a3a3ec953ffc
 TREE		:= tree-$(TREE_VERSION)
 TREE_SUFFIX	:= tgz
 TREE_URL	:= http://mama.indstate.edu/users/ice/tree/src/$(TREE).$(TREE_SUFFIX)
@@ -36,7 +36,8 @@ TREE_MAKE_OPT	:= \
 	$(CROSS_ENV_AS)
 
 TREE_INSTALL_OPT := \
-	prefix=$(TREE_PKGDIR)/usr install
+	PREFIX=/usr \
+	install
 
 # ----------------------------------------------------------------------------
 # Target-Install
-- 
2.34.1




             reply	other threads:[~2023-01-04 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 12:11 Christian Melki [this message]
2023-01-06 16:01 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230104121142.3065356-1-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox