summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Jorna <wraeth@gentoo.org>2020-07-12 20:19:27 +1000
committerSam Jorna <wraeth@gentoo.org>2020-07-12 20:23:55 +1000
commit4174b1f2bba16be562beadb8926b26fce40a41d1 (patch)
tree65dfa883fee7ee04c608d41ec1b7d14e9f375f97 /sys-apps/the_silver_searcher
parentdev-ruby/shoulda: drop alpha keywords (diff)
downloadgentoo-4174b1f2bba16be562beadb8926b26fce40a41d1.tar.gz
gentoo-4174b1f2bba16be562beadb8926b26fce40a41d1.tar.bz2
gentoo-4174b1f2bba16be562beadb8926b26fce40a41d1.zip
sys-apps/the_silver_searcher: fix fno-common
Closes: https://bugs.gentoo.org/708532 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sam Jorna <wraeth@gentoo.org>
Diffstat (limited to 'sys-apps/the_silver_searcher')
-rw-r--r--sys-apps/the_silver_searcher/files/the_silver_searcher-fno-common.patch164
-rw-r--r--sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild4
-rw-r--r--sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild7
-rw-r--r--sys-apps/the_silver_searcher/the_silver_searcher-2.2.0.ebuild7
4 files changed, 177 insertions, 5 deletions
diff --git a/sys-apps/the_silver_searcher/files/the_silver_searcher-fno-common.patch b/sys-apps/the_silver_searcher/files/the_silver_searcher-fno-common.patch
new file mode 100644
index 00000000000..49861018e3a
--- /dev/null
+++ b/sys-apps/the_silver_searcher/files/the_silver_searcher-fno-common.patch
@@ -0,0 +1,164 @@
+--- a/src/search.h
++++ b/src/search.h
+@@ -31,9 +31,9 @@
+ #include "uthash.h"
+ #include "util.h"
+
+-size_t alpha_skip_lookup[256];
+-size_t *find_skip_lookup;
+-uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
++extern size_t alpha_skip_lookup[256];
++extern size_t *find_skip_lookup;
++extern uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
+
+ struct work_queue_t {
+ char *path;
+@@ -41,12 +41,12 @@
+ };
+ typedef struct work_queue_t work_queue_t;
+
+-work_queue_t *work_queue;
+-work_queue_t *work_queue_tail;
+-int done_adding_files;
+-pthread_cond_t files_ready;
+-pthread_mutex_t stats_mtx;
+-pthread_mutex_t work_queue_mtx;
++extern work_queue_t *work_queue;
++extern work_queue_t *work_queue_tail;
++extern int done_adding_files;
++extern pthread_cond_t files_ready;
++extern pthread_mutex_t stats_mtx;
++extern pthread_mutex_t work_queue_mtx;
+
+
+ /* For symlink loop detection */
+@@ -64,7 +64,7 @@
+ UT_hash_handle hh;
+ } symdir_t;
+
+-symdir_t *symhash;
++extern symdir_t *symhash;
+
+ void search_buf(const char *buf, const size_t buf_len,
+ const char *dir_full_path);
+--- a/src/search.c
++++ b/src/search.c
+@@ -2,6 +2,19 @@
+ #include "print.h"
+ #include "scandir.h"
+
++ size_t alpha_skip_lookup[256];
++ size_t *find_skip_lookup;
++ uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
++
++ work_queue_t *work_queue;
++ work_queue_t *work_queue_tail;
++ int done_adding_files;
++ pthread_cond_t files_ready;
++ pthread_mutex_t stats_mtx;
++ pthread_mutex_t work_queue_mtx;
++
++ symdir_t *symhash;
++
+ void search_buf(const char *buf, const size_t buf_len,
+ const char *dir_full_path) {
+ int binary = -1; /* 1 = yes, 0 = no, -1 = don't know */
+--- a/src/log.c
++++ b/src/log.c
+@@ -4,6 +4,8 @@
+ #include "log.h"
+ #include "util.h"
+
++pthread_mutex_t print_mtx;
++
+ static enum log_level log_threshold = LOG_LEVEL_ERR;
+
+ void set_log_level(enum log_level threshold) {
+--- a/src/log.h
++++ b/src/log.h
+@@ -9,7 +9,7 @@
+ #include <pthread.h>
+ #endif
+
+-pthread_mutex_t print_mtx;
++extern pthread_mutex_t print_mtx;
+
+ enum log_level {
+ LOG_LEVEL_DEBUG = 10,
+--- a/src/options.h
++++ b/src/options.h
+@@ -91,7 +91,7 @@
+ } cli_options;
+
+ /* global options. parse_options gives it sane values, everything else reads from it */
+-cli_options opts;
++extern cli_options opts;
+
+ typedef struct option option_t;
+
+--- a/src/options.c
++++ b/src/options.c
+@@ -16,6 +16,8 @@
+ #include "print.h"
+ #include "util.h"
+
++cli_options opts;
++
+ const char *color_line_number = "\033[1;33m"; /* bold yellow */
+ const char *color_match = "\033[30;43m"; /* black with yellow background */
+ const char *color_path = "\033[1;32m"; /* bold green */
+--- a/src/util.h
++++ b/src/util.h
+@@ -12,7 +12,7 @@
+ #include "log.h"
+ #include "options.h"
+
+-FILE *out_fd;
++extern FILE *out_fd;
+
+ #ifndef TRUE
+ #define TRUE 1
+@@ -51,7 +51,7 @@
+ } ag_stats;
+
+
+-ag_stats stats;
++extern ag_stats stats;
+
+ /* Union to translate between chars and words without violating strict aliasing */
+ typedef union {
+--- a/src/util.c
++++ b/src/util.c
+@@ -15,6 +15,10 @@
+ #define getc_unlocked(x) getc(x)
+ #endif
+
++FILE *out_fd;
++
++ag_stats stats;
++
+ #define CHECK_AND_RETURN(ptr) \
+ if (ptr == NULL) { \
+ die("Memory allocation failed."); \
+--- a/src/ignore.c
++++ b/src/ignore.c
+@@ -22,6 +22,8 @@
+
+ /* TODO: build a huge-ass list of files we want to ignore by default (build cache stuff, pyc files, etc) */
+
++ignores *root_ignores;
++
+ const char *evil_hardcoded_ignore_files[] = {
+ ".",
+ "..",
+--- a/src/ignore.h
++++ b/src/ignore.h
+@@ -29,7 +29,7 @@
+ };
+ typedef struct ignores ignores;
+
+-ignores *root_ignores;
++extern ignores *root_ignores;
+
+ extern const char *evil_hardcoded_ignore_files[];
+ extern const char *ignore_pattern_files[];
diff --git a/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild
index d993a7bb70b..6e62890da07 100644
--- a/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -26,6 +26,8 @@ DEPEND="${RDEPEND}
DOCS="README.md"
+PATCHES=( "${FILESDIR}"/${PN}-fno-common.patch )
+
src_prepare() {
sed '/^dist_bashcomp/d' -i Makefile.am || die
diff --git a/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild
index f6cfa25db0a..9643faccd4a 100644
--- a/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.1.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -26,7 +26,10 @@ DEPEND="${RDEPEND}
DOCS="README.md"
-PATCHES=( "${FILESDIR}"/${PN}-2.1.0-lzma.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.0-lzma.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+)
src_prepare() {
sed '/^dist_bashcomp/d' -i Makefile.am || die
diff --git a/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0.ebuild b/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0.ebuild
index f6cfa25db0a..9643faccd4a 100644
--- a/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0.ebuild
+++ b/sys-apps/the_silver_searcher/the_silver_searcher-2.2.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -26,7 +26,10 @@ DEPEND="${RDEPEND}
DOCS="README.md"
-PATCHES=( "${FILESDIR}"/${PN}-2.1.0-lzma.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.0-lzma.patch
+ "${FILESDIR}"/${PN}-fno-common.patch
+)
src_prepare() {
sed '/^dist_bashcomp/d' -i Makefile.am || die