From 86ad6e2608d070ad0f5859146ba219c56d6897b0 Mon Sep 17 00:00:00 2001 From: kth5 Date: Fri, 10 Jan 2025 22:47:55 +0100 Subject: [PATCH] * add ripgrep-all --- ripgrep-all/.SRCINFO | 25 +++++++++++++++ ripgrep-all/PKGBUILD | 54 +++++++++++++++++++++++++++++++++ ripgrep-all/pandoc_compat.patch | 11 +++++++ 3 files changed, 90 insertions(+) create mode 100644 ripgrep-all/.SRCINFO create mode 100644 ripgrep-all/PKGBUILD create mode 100644 ripgrep-all/pandoc_compat.patch diff --git a/ripgrep-all/.SRCINFO b/ripgrep-all/.SRCINFO new file mode 100644 index 0000000000..0ddedf4b5c --- /dev/null +++ b/ripgrep-all/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = ripgrep-all + pkgdesc = rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc. + pkgver = 0.10.6 + pkgrel = 3 + url = https://github.com/phiresky/ripgrep-all + arch = x86_64 + arch = powerpc64le + arch = powerpc64 + arch = riscv64 + license = AGPL3 + checkdepends = pandoc + checkdepends = poppler + makedepends = cargo + depends = ripgrep + depends = xz + optdepends = ffmpeg: for the ffmpeg adapter + optdepends = graphicsmagick: for the pdfpages adapter + optdepends = pandoc: for the pandoc adapter + optdepends = poppler: for the poppler adapter + optdepends = tesseract: for the tesseract adapter + options = !lto + source = ripgrep-all-0.10.6.tar.gz::https://github.com/phiresky/ripgrep-all/archive/refs/tags/v0.10.6.tar.gz + b2sums = fc2618369c349fda5a78d3604b17b78788be73ce5925a5b6aa234627ccaa4b70dba8deddfc7cf5ef38dfe3c94d60a84956d9779110af2ff7ca44812774ffa28b + +pkgname = ripgrep-all diff --git a/ripgrep-all/PKGBUILD b/ripgrep-all/PKGBUILD new file mode 100644 index 0000000000..2a90e63014 --- /dev/null +++ b/ripgrep-all/PKGBUILD @@ -0,0 +1,54 @@ +# POWER Maintainer: Alexander Baldeck +# Maintainer: Frederik Schwan +# Contributor: Chris Lane +# Contributor: phiresky +# Contributor: Julien Nicoulaud + +pkgname=ripgrep-all +pkgver=0.10.6 +pkgrel=3 +pkgdesc="rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc." +arch=(x86_64 powerpc64le powerpc64 riscv64) +url='https://github.com/phiresky/ripgrep-all' +license=('AGPL3') +depends=('ripgrep' 'xz') +makedepends=('cargo') +checkdepends=('pandoc' 'poppler') +optdepends=( + 'ffmpeg: for the ffmpeg adapter' + 'graphicsmagick: for the pdfpages adapter' + 'pandoc: for the pandoc adapter' + 'poppler: for the poppler adapter' + 'tesseract: for the tesseract adapter' +) +options=(!lto) +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/phiresky/ripgrep-all/archive/refs/tags/v${pkgver}.tar.gz" +) +b2sums=('fc2618369c349fda5a78d3604b17b78788be73ce5925a5b6aa234627ccaa4b70dba8deddfc7cf5ef38dfe3c94d60a84956d9779110af2ff7ca44812774ffa28b') + +prepare() { + cd ripgrep-all-${pkgver} + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd ripgrep-all-${pkgver} + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release --all-features +} + +check() { + cd ripgrep-all-${pkgver} + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen --all-features +} + +package() { + cd ripgrep-all-${pkgver} + install -Dm 755 target/release/rga "${pkgdir}"/usr/bin/rga + install -Dm 755 target/release/rga-preproc "${pkgdir}"/usr/bin/rga-preproc + install -Dm 755 target/release/rga-fzf "${pkgdir}"/usr/bin/rga-fzf + install -Dm 755 target/release/rga-fzf-open "${pkgdir}"/usr/bin/rga-fzf-open +} diff --git a/ripgrep-all/pandoc_compat.patch b/ripgrep-all/pandoc_compat.patch new file mode 100644 index 0000000000..f899c17704 --- /dev/null +++ b/ripgrep-all/pandoc_compat.patch @@ -0,0 +1,11 @@ +--- aaa/src/adapters/pandoc.rs 2023-03-22 14:32:02.599432479 +0100 ++++ bbb/src/adapters/pandoc.rs 2023-03-22 14:32:54.759429382 +0100 +@@ -80,7 +80,7 @@ + //.arg("--to=commonmark-header_attributes-link_attributes-fenced_divs-markdown_in_html_blocks-raw_html-native_divs-native_spans-bracketed_spans") + .arg("--to=plain") + .arg("--wrap=none") +- .arg("--atx-headers"); ++ .arg("--markdown-headings=atx"); + cmd + } + }