[packages/nnn] up to 3.3

atler atler at pld-linux.org
Thu Aug 6 12:59:54 CEST 2020


commit a28b3c6186ea1843dd986b2ac99d2e95ed1eec83
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Aug 6 12:58:36 2020 +0200

    up to 3.3
    
    - enable pcre and 8 contexts
    - add build flags patch so Makefile can add useful flags too

 nnn-flags.patch | 33 +++++++++++++++++++++++++++++++++
 nnn.spec        | 18 ++++++++++++------
 2 files changed, 45 insertions(+), 6 deletions(-)
---
diff --git a/nnn.spec b/nnn.spec
index 730e09e..0eae452 100644
--- a/nnn.spec
+++ b/nnn.spec
@@ -3,15 +3,17 @@
 #
 Summary:	The missing terminal file browser for X
 Name:		nnn
-Version:	2.1
+Version:	3.3
 Release:	1
 License:	BSD
 Group:		Applications/Console
 Source0:	https://github.com/jarun/nnn/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	6c4094064a9e8edbc73c0f37c6d4ccf0
+# Source0-md5:	08c00d529ab824329b1f30968c3037b0
 Patch0:		%{name}-no-rebuild-on-install.patch
+Patch1:		%{name}-flags.patch
 URL:		https://github.com/jarun/nnn
 BuildRequires:	ncurses-devel
+BuildRequires:	pcre-devel
 BuildRequires:	pkgconfig
 BuildRequires:	readline-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -87,13 +89,17 @@ Dopełnianie parametrów w zsh dla polecenia nnn.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} \
 	CC="%{__cc}" \
 	CFLAGS="%{rpmcflags}" \
+	CFLAGS_OPTIMIZATION= \
 	CPPFLAGS="%{rpmcppflags}" \
-	LDFLAGS="%{rpmldflags}"
+	LDFLAGS="%{rpmldflags}" \
+	O_CTX8=1 \
+	O_PCRE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -102,11 +108,11 @@ rm -rf $RPM_BUILD_ROOT
 	PREFIX=%{_prefix}
 
 install -Dpm0644 -t $RPM_BUILD_ROOT%{bash_compdir} \
-  scripts/auto-completion/bash/nnn-completion.bash
+  misc/auto-completion/bash/nnn-completion.bash
 install -Dpm0644 -t $RPM_BUILD_ROOT%{fish_compdir} \
-  scripts/auto-completion/fish/nnn.fish
+  misc/auto-completion/fish/nnn.fish
 install -Dpm0644 -t $RPM_BUILD_ROOT%{zsh_compdir} \
-  scripts/auto-completion/zsh/_nnn
+  misc/auto-completion/zsh/_nnn
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/nnn-flags.patch b/nnn-flags.patch
new file mode 100644
index 0000000..2305f2b
--- /dev/null
+++ b/nnn-flags.patch
@@ -0,0 +1,33 @@
+--- nnn-3.3/Makefile.orig	2020-08-06 12:43:07.917453708 +0200
++++ nnn-3.3/Makefile	2020-08-06 12:46:43.682792814 +0200
+@@ -41,7 +41,7 @@
+ endif
+ 
+ ifeq ($(O_PCRE),1)
+-	CPPFLAGS += -DPCRE
++	override CPPFLAGS += -DPCRE
+ 	LDLIBS += -lpcre
+ endif
+ 
+@@ -62,7 +62,7 @@
+ endif
+ 
+ ifeq ($(O_CTX8),1)
+-	CPPFLAGS += -DCTX8
++	override CPPFLAGS += -DCTX8
+ endif
+ 
+ ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
+@@ -75,9 +75,9 @@
+ 	LDLIBS_CURSES ?= -lncurses
+ endif
+ 
+-CFLAGS += -std=c11 -Wall -Wextra -Wshadow
+-CFLAGS += $(CFLAGS_OPTIMIZATION)
+-CFLAGS += $(CFLAGS_CURSES)
++override CFLAGS += -std=c11 -Wall -Wextra -Wshadow
++override CFLAGS += $(CFLAGS_OPTIMIZATION)
++override CFLAGS += $(CFLAGS_CURSES)
+ 
+ LDLIBS += $(LDLIBS_CURSES)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nnn.git/commitdiff/a28b3c6186ea1843dd986b2ac99d2e95ed1eec83



More information about the pld-cvs-commit mailing list