From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: nnn: add build options
Date: Mon, 19 Sep 2022 15:12:28 +0200 [thread overview]
Message-ID: <20220919131228.8RBNfaGA387wT54Wz3HVdQuBxhHgwG5Zv8J5cDqqu5Y@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39360@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 2063 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/39360#issuecomment-1251001665
Comment:
> I think it's better to patch their Makefile to have let's say -include config.mk and put the option there. Whoever want some custom option could put the config into files directory. With that approach, we won't need to care for nnn's change in build option whatsoever. As for build dependencies, just add them all. nnn is always a leaf (as in graph) packages.
Here is possible implementation, no build options required:
```diff
srcpkgs/nnn/patches/config.patch | 11 +++++++++++
srcpkgs/nnn/template | 5 ++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/nnn/patches/config.patch b/srcpkgs/nnn/patches/config.patch
new file mode 100644
index 0000000000..e7d7238276
--- /dev/null
+++ b/srcpkgs/nnn/patches/config.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -36,6 +36,8 @@ O_GITSTATUS := 0 # add git status to det
+ O_NAMEFIRST := 0 # print file name first, add uid and guid to detail view
+ O_RESTOREPREVIEW := 0 # add preview pipe to close and restore preview pane
+
++-include config.mk
++
+ # convert targets to flags for backwards compatibility
+ ifneq ($(filter debug,$(MAKECMDGOALS)),)
+ O_DEBUG := 1
diff --git a/srcpkgs/nnn/template b/srcpkgs/nnn/template
index cea82d3681..32f5fec3c1 100644
--- a/srcpkgs/nnn/template
+++ b/srcpkgs/nnn/template
@@ -5,7 +5,7 @@ revision=1
build_style=gnu-makefile
make_install_target="install install-desktop"
hostmakedepends="pkg-config"
-makedepends="ncurses-devel readline-devel"
+makedepends="ncurses-devel readline-devel gpm-devel pcre-devel"
short_desc="Missing terminal file browser for X"
maintainer="Dennis Kraus <kraus@posteo.de>"
license="BSD-2-Clause"
@@ -22,6 +22,9 @@ pre_build() {
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
export LDLIBS=-lfts
fi
+ if [ -f "$FILESDIR/config.mk" ]; then
+ cp "$FILESDIR/config.mk" .
+ fi
}
post_install() {
```
next prev parent reply other threads:[~2022-09-19 13:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 8:48 [PR PATCH] " freddylist
2022-09-19 10:32 ` [PR REVIEW] " classabbyamp
2022-09-19 10:34 ` classabbyamp
2022-09-19 10:38 ` classabbyamp
2022-09-19 10:39 ` [PR REVIEW] " classabbyamp
2022-09-19 10:40 ` freddylist
2022-09-19 10:43 ` freddylist
2022-09-19 10:46 ` freddylist
2022-09-19 10:48 ` freddylist
2022-09-19 10:53 ` freddylist
2022-09-19 10:54 ` sgn
2022-09-19 10:57 ` freddylist
2022-09-19 10:58 ` sgn
2022-09-19 11:00 ` sgn
2022-09-19 11:32 ` paper42
2022-09-19 11:59 ` freddylist
2022-09-19 12:33 ` [PR PATCH] [Updated] " freddylist
2022-09-19 12:39 ` freddylist
2022-09-19 12:40 ` paper42
2022-09-19 12:49 ` sgn
2022-09-19 12:51 ` sgn
2022-09-19 12:54 ` [PR PATCH] [Updated] " freddylist
2022-09-19 13:06 ` freddylist
2022-09-19 13:10 ` freddylist
2022-09-19 13:12 ` sgn
2022-09-19 13:12 ` sgn [this message]
2022-09-19 13:13 ` freddylist
2022-09-19 13:14 ` sgn
2022-09-19 13:16 ` [PR PATCH] [Updated] " freddylist
2022-09-19 13:57 ` freddylist
2022-09-19 13:58 ` freddylist
2022-09-19 13:59 ` freddylist
2022-09-19 14:08 ` freddylist
2022-09-19 16:26 ` freddylist
2022-09-19 19:12 ` freddylist
2022-09-20 8:24 ` freddylist
2022-09-20 8:31 ` freddylist
2022-09-20 8:32 ` freddylist
2022-09-20 8:37 ` [PR REVIEW] " freddylist
2022-09-30 13:03 ` [PR PATCH] [Updated] " freddylist
2022-12-05 19:47 ` [PR PATCH] [Closed]: " freddylist
2022-12-06 0:01 ` sgn
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=20220919131228.8RBNfaGA387wT54Wz3HVdQuBxhHgwG5Zv8J5cDqqu5Y@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/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;
as well as URLs for NNTP newsgroup(s).