From f42d7362e5a1f5c0617b387366460fd3270a7794 Mon Sep 17 00:00:00 2001 From: icp Date: Mon, 23 Jan 2023 18:23:00 +0530 Subject: [PATCH] New package: sq-0.42.0 --- srcpkgs/sq/patches/32-bit.patch | 11 +++++++++++ srcpkgs/sq/template | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 srcpkgs/sq/patches/32-bit.patch create mode 100644 srcpkgs/sq/template diff --git a/srcpkgs/sq/patches/32-bit.patch b/srcpkgs/sq/patches/32-bit.patch new file mode 100644 index 0000000000000..ea4c868ece3b4 --- /dev/null +++ b/srcpkgs/sq/patches/32-bit.patch @@ -0,0 +1,11 @@ +--- a/libsq/ast/render/range.go ++++ b/libsq/ast/render/range.go +@@ -27,7 +27,7 @@ + if rr.Limit == -1 { + // MySQL requires a LIMIT if OFFSET is used. Therefore + // we make the LIMIT a very large number +- limit = fmt.Sprintf("LIMIT %d", math.MaxInt64) ++ limit = fmt.Sprintf("LIMIT %d", uint64(math.MaxInt64)) + } + } + diff --git a/srcpkgs/sq/template b/srcpkgs/sq/template new file mode 100644 index 0000000000000..736291540fa14 --- /dev/null +++ b/srcpkgs/sq/template @@ -0,0 +1,32 @@ +# Template file for 'sq' +pkgname=sq +version=0.42.0 +revision=1 +build_style=go +go_import_path="github.com/neilotoole/sq" +go_ldflags="-X ${go_import_path}/cli/buildinfo.Version=v${version}" +go_build_tags="libsqlite3" +makedepends="sqlite-devel" +short_desc="CLI tool that provides jq-style access to structured data sources" +maintainer="icp " +license="MIT" +homepage="https://sq.io" +changelog="https://raw.githubusercontent.com/neilotoole/sq/master/CHANGELOG.md" +distfiles="https://github.com/neilotoole/sq/archive/refs/tags/v${version}.tar.gz + https://github.com/neilotoole/sq/releases/download/v${version}/sq-${version}-amd64-amd64.tar.gz" +checksum="1d73a814ead3205211aca852fa8c30528ec60546732cfc282105f9aa8e4556f5 + abcab9a053f759e62d516f4ab003f918c7d03385c0581c09c5ed369debd44038" +conflicts="squirrel sequoia-sq" + +post_extract() { + mv sq-${version}/* . +} + +post_install() { + for shell in bash fish zsh; do + vcompletion "completions/sq.${shell}" "${shell}" + done + + vman manpages/sq.1.gz + vlicense LICENSE +}