summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2021-06-05 18:18:26 -0400
committerTodd Zullinger <tmz@pobox.com>2021-06-06 17:09:52 -0400
commit75e33a6155a26dcf6e65ee29a1186b7afd4d3bbc (patch)
tree66ca2f88889d5c9bcb2a3299cf79aa9427bcfcab
parentfcd0e59be6b4ce9392e58c7b3f14086e17193a20 (diff)
downloadcgit_EL6-75e33a6155a26dcf6e65ee29a1186b7afd4d3bbc.tar.gz
refresh highlight-3 patch
The patch to default to highlight-3 applied with a bit of an offset. On EL7 this causes a .orig file to be created. This is then copied into the filter dir by the cgit install process. Rebase the patch on the current cgit to avoid this bit of cruft. Alternately (or additionally), we could add `--no-backup-if-mismatch` to the %_default_patch_flags macro for EL7 builds. This flag is set in newer Fedora and EL releases.
-rw-r--r--0001-use-highlight-3-by-default.patch28
-rw-r--r--cgit-0.9.1-highlightv3.patch13
-rw-r--r--cgit.spec3
3 files changed, 30 insertions, 14 deletions
diff --git a/0001-use-highlight-3-by-default.patch b/0001-use-highlight-3-by-default.patch
new file mode 100644
index 0000000..4263113
--- /dev/null
+++ b/0001-use-highlight-3-by-default.patch
@@ -0,0 +1,28 @@
+From fc155711420fd305e5b6570b61ef605a99ba30c7 Mon Sep 17 00:00:00 2001
+From: Kevin Fenzi <kevin@scrye.com>
+Date: Sat, 17 Nov 2012 10:53:33 -0700
+Subject: [PATCH] use highlight-3 by default
+
+All Fedora and EL releases have highlight-3.x except for EL-5. Make it
+the default.
+---
+ filters/syntax-highlighting.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh
+index 840bc34..5033f58 100755
+--- a/filters/syntax-highlighting.sh
++++ b/filters/syntax-highlighting.sh
+@@ -115,7 +115,7 @@ EXTENSION="${BASENAME##*.}"
+ # found (for example) on EPEL 6.
+ #
+ # This is for version 2
+-exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
++#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
+
+ # This is for version 3
+-#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
++exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
+--
+2.32.0
+
diff --git a/cgit-0.9.1-highlightv3.patch b/cgit-0.9.1-highlightv3.patch
deleted file mode 100644
index df06a81..0000000
--- a/cgit-0.9.1-highlightv3.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Nur cgit-0.9.1.orig/filters/syntax-highlighting.sh cgit-0.9.1/filters/syntax-highlighting.sh
---- cgit-0.9.1.orig/filters/syntax-highlighting.sh 2012-11-14 17:28:59.000000000 -0700
-+++ cgit-0.9.1/filters/syntax-highlighting.sh 2012-11-17 10:47:07.870778180 -0700
-@@ -53,7 +53,7 @@
- # found (for example) on EPEL 6.
- #
- # This is for version 2
--exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
-+#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
-
- # This is for version 3
--#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
-+exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
diff --git a/cgit.spec b/cgit.spec
index 1e2ec95..3b8b0b1 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -60,7 +60,7 @@ Source92: https://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.asc
Source93: https://www.kernel.org/pub/software/scm/git/git-%{gitver}.tar.sign
# All supported releases use highlight version 3.
-Patch0: cgit-0.9.1-highlightv3.patch
+Patch0: 0001-use-highlight-3-by-default.patch
# Improve test suite's support for older tar versions
# https://lists.zx2c4.com/pipermail/cgit/2020-August/004513.html
@@ -221,6 +221,7 @@ make test
- clean up & improve dist conditionals
- remove %%_python_bytecompile_extra
- limit *.py[co] %%exclude to el7
+- refresh highlight v3 patch
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild