commit:     2a360ea360f2126d38c45443dbd966413720410f
Author:     Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Thu Oct 30 07:04:57 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Thu Oct 30 12:17:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2a360ea3

dev-crystal/crystal-sqlite3: add 0.22.0

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>

 dev-crystal/crystal-sqlite3/Manifest               |  1 +
 .../crystal-sqlite3/crystal-sqlite3-0.22.0.ebuild  | 23 ++++++++++++++
 .../crystal-sqlite3-0.22.0-fix-uri-parsing.patch   | 35 ++++++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/dev-crystal/crystal-sqlite3/Manifest 
b/dev-crystal/crystal-sqlite3/Manifest
index 978ef436f2..27938a63c4 100644
--- a/dev-crystal/crystal-sqlite3/Manifest
+++ b/dev-crystal/crystal-sqlite3/Manifest
@@ -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

diff --git a/dev-crystal/crystal-sqlite3/crystal-sqlite3-0.22.0.ebuild 
b/dev-crystal/crystal-sqlite3/crystal-sqlite3-0.22.0.ebuild
new file mode 100644
index 0000000000..594ba23061
--- /dev/null
+++ b/dev-crystal/crystal-sqlite3/crystal-sqlite3-0.22.0.ebuild
@@ -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 )

diff --git 
a/dev-crystal/crystal-sqlite3/files/crystal-sqlite3-0.22.0-fix-uri-parsing.patch
 
b/dev-crystal/crystal-sqlite3/files/crystal-sqlite3-0.22.0-fix-uri-parsing.patch
new file mode 100644
index 0000000000..eec58d962b
--- /dev/null
+++ 
b/dev-crystal/crystal-sqlite3/files/crystal-sqlite3-0.22.0-fix-uri-parsing.patch
@@ -0,0 +1,35 @@
+From f4e94b042ab64cf6558086b812e7fd56780cd4de Mon Sep 17 00:00:00 2001
+From: "Brian J. Cardiff" <[email protected]>
+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
+

Reply via email to