mirror of
https://github.com/netbirdio/FreeBSD-ports.git
synced 2026-05-22 18:42:42 -07:00
databases/rubygem-sqlite3: Update to 1.5.0
Changes: https://github.com/sparklemotion/sqlite3-ruby/releases
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PORTNAME= sqlite3
|
||||
PORTVERSION= 1.4.4
|
||||
PORTVERSION= 1.5.0
|
||||
CATEGORIES= databases rubygems
|
||||
MASTER_SITES= RG
|
||||
|
||||
@@ -10,7 +10,6 @@ WWW= https://github.com/sparklemotion/sqlite3-ruby
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= swig:devel/swig
|
||||
LIB_DEPENDS= libsqlite3.so:databases/sqlite3
|
||||
|
||||
USES= gem
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1655398692
|
||||
SHA256 (rubygem/sqlite3-1.4.4.gem) = 5d81cac1341d43260ce9673e146f41d28db0d09ec67e76a35ee8089686513cfc
|
||||
SIZE (rubygem/sqlite3-1.4.4.gem) = 71168
|
||||
TIMESTAMP = 1662820076
|
||||
SHA256 (rubygem/sqlite3-1.5.0.gem) = 8eeb6dab3c7ff6b1aa88f8a4a3879b33048c74b309077dba67fa71b72352048a
|
||||
SIZE (rubygem/sqlite3-1.5.0.gem) = 3102720
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
--- ext/sqlite3/extconf.rb.orig 2022-09-10 15:17:36 UTC
|
||||
+++ ext/sqlite3/extconf.rb
|
||||
@@ -1,5 +1,4 @@
|
||||
require "mkmf"
|
||||
-require "mini_portile2"
|
||||
|
||||
module Sqlite3
|
||||
module ExtConf
|
||||
@@ -48,33 +47,6 @@ module Sqlite3
|
||||
end
|
||||
|
||||
def configure_packaged_libraries
|
||||
- minimal_recipe.tap do |recipe|
|
||||
- recipe.configure_options += ["--enable-shared=no", "--enable-static=yes"]
|
||||
- ENV.to_h.tap do |env|
|
||||
- additional_cflags = [
|
||||
- "-fPIC", # needed for linking the static library into a shared library
|
||||
- "-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
|
||||
- ]
|
||||
- env["CFLAGS"] = [env["CFLAGS"], additional_cflags].flatten.join(" ")
|
||||
- recipe.configure_options += env.select { |k,v| ENV_ALLOWLIST.include?(k) }
|
||||
- .map { |key, value| "#{key}=#{value.strip}" }
|
||||
- end
|
||||
-
|
||||
- unless File.exist?(File.join(recipe.target, recipe.host, recipe.name, recipe.version))
|
||||
- recipe.cook
|
||||
- end
|
||||
- recipe.activate
|
||||
-
|
||||
- ENV["PKG_CONFIG_ALLOW_SYSTEM_CFLAGS"] = "t" # on macos, pkg-config will not return --cflags without this
|
||||
- pcfile = File.join(recipe.path, "lib", "pkgconfig", "sqlite3.pc")
|
||||
- if pkg_config(pcfile)
|
||||
- # see https://bugs.ruby-lang.org/issues/18490
|
||||
- libs = xpopen(["pkg-config", "--libs", "--static", pcfile], err: [:child, :out], &:read)
|
||||
- libs.split.each { |lib| append_ldflags(lib) } if $?.success?
|
||||
- else
|
||||
- abort("\nCould not configure the build properly. Please install either the `pkg-config` utility or the `pkg-config` rubygem.\n\n")
|
||||
- end
|
||||
- end
|
||||
end
|
||||
|
||||
def configure_extension
|
||||
@@ -115,11 +87,6 @@ module Sqlite3
|
||||
end
|
||||
|
||||
def minimal_recipe
|
||||
- MiniPortile.new(libname, sqlite3_config[:version]).tap do |recipe|
|
||||
- recipe.files = sqlite3_config[:files]
|
||||
- recipe.target = File.join(package_root_dir, "ports")
|
||||
- recipe.patch_files = Dir[File.join(package_root_dir, "patches", "*.patch")].sort
|
||||
- end
|
||||
end
|
||||
|
||||
def package_root_dir
|
||||
@@ -127,27 +94,9 @@ module Sqlite3
|
||||
end
|
||||
|
||||
def sqlite3_config
|
||||
- mini_portile_config[:sqlite3]
|
||||
end
|
||||
|
||||
def mini_portile_config
|
||||
- {
|
||||
- sqlite3: {
|
||||
- # checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
|
||||
- #
|
||||
- # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3390300.tar.gz
|
||||
- # dfa055c70724cd63f0b7da6e9f53530d8da51fe021e3f864d58c7c847d590e1d ports/archives/sqlite-autoconf-3390300.tar.gz
|
||||
- #
|
||||
- # $ sha256sum ports/archives/sqlite-autoconf-3390300.tar.gz
|
||||
- # 7868fb3082be3f2cf4491c6fba6de2bddcbc293a35fefb0624ee3c13f01422b9 ports/archives/sqlite-autoconf-3390300.tar.gz
|
||||
- #
|
||||
- version: "3.39.3",
|
||||
- files: [{
|
||||
- url: "https://www.sqlite.org/2022/sqlite-autoconf-3390300.tar.gz",
|
||||
- sha256: "7868fb3082be3f2cf4491c6fba6de2bddcbc293a35fefb0624ee3c13f01422b9",
|
||||
- }],
|
||||
- }
|
||||
- }
|
||||
end
|
||||
|
||||
def abort_could_not_find(missing)
|
||||
@@ -156,10 +105,6 @@ module Sqlite3
|
||||
|
||||
def cross_build?
|
||||
enable_config("cross-build")
|
||||
- end
|
||||
-
|
||||
- def download
|
||||
- minimal_recipe.download
|
||||
end
|
||||
|
||||
def print_help
|
||||
@@ -0,0 +1,10 @@
|
||||
--- sqlite3.gemspec.orig 2022-09-10 14:48:02 UTC
|
||||
+++ sqlite3.gemspec
|
||||
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
|
||||
end
|
||||
|
||||
if s.respond_to? :add_runtime_dependency then
|
||||
- s.add_runtime_dependency(%q<mini_portile2>.freeze, ["~> 2.8.0"])
|
||||
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.15"])
|
||||
s.add_development_dependency(%q<rake-compiler>.freeze, ["~> 1.2.0"])
|
||||
s.add_development_dependency(%q<rake-compiler-dock>.freeze, ["~> 1.2.1"])
|
||||
Reference in New Issue
Block a user