dev-crystal/crystal-sqlite3: add 0.22.0

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
Anna (cybertailor) Vyalkova
2025-10-30 12:04:57 +05:00
parent 7a5c116d3d
commit 2a360ea360
3 changed files with 59 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST crystal-sqlite3-0.21.0.tar.gz 12284 BLAKE2B a6943a30d00a8ec47860121f2878ce9274aab100bfe6a8a82aadbcdd71f0b4eef1943fa29e6d86bb2807ccfe6294136d5422b797086078d5c3196b9e63fd3f89 SHA512 a11b70e714c19762a4344383b95b3106be05cf9f51f9a4491e1bfda37c7fff0c178bec366fc86845db903a597e2c6a4eeb288c2c365f0b8752345f761bc68759
DIST crystal-sqlite3-0.22.0.tar.gz 13720 BLAKE2B 1590d872b98a38a2df8a8753306e70e653e4cb52ae536457e567230b58e8c42ab61afd6f7292072f3d69a8346818317b243fad4999e1a55af4244f0ced29e9be SHA512 b2e8cfd88ec0870bc712ece7e8e95eade37101ab02226b73aaa6f0151a7aae7bbb19fe3b517ccf2e23ffdb9e267ae1871e67463c55f220ef7e79bf867bd3f258

View File

@@ -0,0 +1,23 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit shards
DESCRIPTION="SQLite3 bindings for Crystal"
HOMEPAGE="https://github.com/crystal-lang/crystal-sqlite3"
SRC_URI="https://github.com/crystal-lang/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
>=dev-crystal/crystal-db-0.13.0
<dev-crystal/crystal-db-0.15.0
"
PATCHES=( "${FILESDIR}"/${PN}-0.22.0-fix-uri-parsing.patch )
DOCS=( {CHANGELOG,README}.md )

View File

@@ -0,0 +1,35 @@
From f4e94b042ab64cf6558086b812e7fd56780cd4de Mon Sep 17 00:00:00 2001
From: "Brian J. Cardiff" <bcardiff@gmail.com>
Date: Thu, 16 Oct 2025 16:57:41 -0300
Subject: [PATCH] Use URI#hostname to avoid interpreting :memory: as [:memory:]
(#105)
---
src/sqlite3/connection.cr | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sqlite3/connection.cr b/src/sqlite3/connection.cr
index 750776f..948715e 100644
--- a/src/sqlite3/connection.cr
+++ b/src/sqlite3/connection.cr
@@ -12,7 +12,7 @@ class SQLite3::Connection < DB::Connection
params = HTTP::Params.parse(uri.query || "")
Options.new(
- filename: URI.decode_www_form((uri.host || "") + uri.path),
+ filename: URI.decode_www_form((uri.hostname || "") + uri.path),
# pragmas
busy_timeout: params.fetch("busy_timeout", default.busy_timeout),
cache_size: params.fetch("cache_size", default.cache_size),
@@ -56,7 +56,7 @@ class SQLite3::Connection < DB::Connection
end
def self.filename(uri : URI)
- URI.decode_www_form((uri.host || "") + uri.path)
+ URI.decode_www_form((uri.hostname || "") + uri.path)
end
def build_prepared_statement(query) : Statement
--
2.51.2