linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit 0736d09738a08d2c4f233be630309d414fcd0c82
parent 642162add717ef4eb0dea6509dfa9045bb3a8781
Author: Jul <jul@9o.is>
Date:   Mon, 28 Jul 2025 14:56:32 +0800

add silver searcher (ag)

Diffstat:
M.gitmodules | 3+++
Apkg/ag/build | 35+++++++++++++++++++++++++++++++++++
Apkg/ag/config.h | 124+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/ag/patches/0001-set-color-in-config.h.patch | 29+++++++++++++++++++++++++++++
Apkg/ag/repo | 1+
5 files changed, 192 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -19,3 +19,6 @@ path = pkg/fzy/repo url = https://github.com/jhawthorn/fzy.git ignore = all +[submodule "ag"] + path = pkg/ag/repo + url = https://github.com/ggreer/the_silver_searcher.git diff --git a/pkg/ag/build b/pkg/ag/build @@ -0,0 +1,35 @@ +#!/bin/sh +set -euo pipefail + +# required: +# - automake +# - pcre-devel + +gitref="a61f178" +repodir="$srcdir/repo" + +if [ "$skip_clean" != "true" ]; then + git -C "$repodir" clean -dx + git -C "$repodir" reset --hard "$gitref" + + for patch in $srcdir/patches/*.patch; do + git -C "$repodir" am --no-gpg-sign "$patch" + done +fi + +( + cd $repodir + ./autogen.sh + ./configure --prefix=/usr +) + +rm -rf "$outdir" +cp "$srcdir/config.h" "$repodir/src/config.h" + +make -C "$repodir" + +if [ "$local_install" == "true" ]; then + sudo make -C "$repodir" install +else + make DESTDIR="$outdir" -C "$repodir" install +fi diff --git a/pkg/ag/config.h b/pkg/ag/config.h @@ -0,0 +1,124 @@ +#define COLOR_LINE_NUMBER "\033[0m" /* default */ +#define COLOR_MATCH "\033[30;43m" /* black with yellow background */ +#define COLOR_PATH "\033[0;34m" /* blue */ + +/* Have dirent struct member d_namlen */ +/* #undef HAVE_DIRENT_DNAMLEN */ + +/* Have dirent struct member d_type */ +#define HAVE_DIRENT_DTYPE /**/ + +/* Define to 1 if you have the <err.h> header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the 'fgetln' function. */ +/* #undef HAVE_FGETLN */ + +/* Define to 1 if you have the 'fopencookie' function. */ +#define HAVE_FOPENCOOKIE 1 + +/* Define to 1 if you have the 'getline' function. */ +#define HAVE_GETLINE 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the 'shlwapi' library (-lshlwapi). */ +/* #undef HAVE_LIBSHLWAPI */ + +/* Define to 1 if you have the <lzma.h> header file. */ +#define HAVE_LZMA_H 1 + +/* Define to 1 if you have the 'madvise' function. */ +#define HAVE_MADVISE 1 + +/* Define to 1 if you have the 'pledge' function. */ +/* #undef HAVE_PLEDGE */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +#define HAVE_POSIX_FADVISE 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have the 'pthread_setaffinity_np' function. */ +#define HAVE_PTHREAD_SETAFFINITY_NP 1 + +/* Define to 1 if you have the 'realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the 'strndup' function. */ +#define HAVE_STRNDUP 1 + +/* Define to 1 if you have the <sys/cpuset.h> header file. */ +/* #undef HAVE_SYS_CPUSET_H */ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the 'vasprintf' function. */ +#define HAVE_VASPRINTF 1 + +/* Define to 1 if you have the <zlib.h> header file. */ +#define HAVE_ZLIB_H 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/ggreer/the_silver_searcher/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "the_silver_searcher" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "the_silver_searcher 2.2.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "the_silver_searcher" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://github.com/ggreer/the_silver_searcher" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.2.0" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Use CPU_SET macros */ +#define USE_CPU_SET /**/ + +/* Use PCRE JIT */ +#define USE_PCRE_JIT /**/ + diff --git a/pkg/ag/patches/0001-set-color-in-config.h.patch b/pkg/ag/patches/0001-set-color-in-config.h.patch @@ -0,0 +1,29 @@ +From bd382cfaf963b9245762b91a8d5690752a34f725 Mon Sep 17 00:00:00 2001 +From: Jul <jul@qh.is> +Date: Mon, 28 Jul 2025 14:54:41 +0800 +Subject: [PATCH] set color in config.h + +--- + src/options.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/options.c b/src/options.c +index 2145b33..f33ad93 100644 +--- a/src/options.c ++++ b/src/options.c +@@ -16,9 +16,9 @@ + #include "print.h" + #include "util.h" + +-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 */ ++const char *color_line_number = COLOR_LINE_NUMBER; ++const char *color_match = COLOR_MATCH; ++const char *color_path = COLOR_PATH; + + cli_options opts; + +-- +2.50.1 + diff --git a/pkg/ag/repo b/pkg/ag/repo @@ -0,0 +1 @@ +Subproject commit 918c9874f925ed6a47ea4565c29530b9b2c2e8ba