tebako 0.12.9 → 0.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tebako
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.9
4
+ version: 0.12.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-30 00:00:00.000000000 Z
11
+ date: 2025-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.2.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: debug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: hoe
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +94,20 @@ dependencies:
80
94
  - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rdbg
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: rspec
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -190,13 +218,14 @@ files:
190
218
  - lib/tebako/packager.rb
191
219
  - lib/tebako/packager/pass1_patch.rb
192
220
  - lib/tebako/packager/pass1a_patch.rb
193
- - lib/tebako/packager/pass2.rb
221
+ - lib/tebako/packager/pass2_patch.rb
194
222
  - lib/tebako/packager/patch.rb
195
223
  - lib/tebako/packager/patch_buildsystem.rb
196
224
  - lib/tebako/packager/patch_helpers.rb
197
225
  - lib/tebako/packager/patch_libraries.rb
198
226
  - lib/tebako/packager/patch_literals.rb
199
227
  - lib/tebako/packager/patch_main.rb
228
+ - lib/tebako/packager/rubygems_patch.rb
200
229
  - lib/tebako/packager_lite.rb
201
230
  - lib/tebako/ruby_builder.rb
202
231
  - lib/tebako/ruby_version.rb
@@ -222,12 +251,14 @@ files:
222
251
  - tools/cmake-scripts/macos-environment.cmake
223
252
  - tools/cmake-scripts/msys-environment.cmake
224
253
  - tools/cmake-scripts/setup-libarchive.cmake
254
+ - tools/cmake-scripts/setup-libfmt.cmake
225
255
  - tools/cmake-scripts/setup-libhowardhinnerdate.cmake
226
256
  - tools/cmake-scripts/setup-libutfcpp.cmake
227
257
  - tools/cmake-scripts/setup-openssl.cmake
228
258
  - tools/cmake-scripts/version.cmake
229
259
  - tools/include/pro-statvfs.h
230
260
  - tools/tests/cmake/CMakeLists.txt
261
+ - tools/tests/setup-libfmt/CMakeLists.txt
231
262
  - tools/tests/setup-libhowardhinnerdate/CMakeLists.txt
232
263
  - tools/tests/setup-librachive/CMakeLists.txt
233
264
  - tools/tests/setup-libutfcpp/CMakeLists.txt
@@ -1,149 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
4
- # All rights reserved.
5
- # This file is a part of tebako
6
- #
7
- # Redistribution and use in source and binary forms, with or without
8
- # modification, are permitted provided that the following conditions
9
- # are met:
10
- # 1. Redistributions of source code must retain the above copyright
11
- # notice, this list of conditions and the following disclaimer.
12
- # 2. Redistributions in binary form must reproduce the above copyright
13
- # notice, this list of conditions and the following disclaimer in the
14
- # documentation and/or other materials provided with the distribution.
15
- #
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
- # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18
- # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19
- # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
20
- # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
- # POSSIBILITY OF SUCH DAMAGE.
27
-
28
- require_relative "patch_literals"
29
- require_relative "patch_main"
30
- require_relative "patch_libraries"
31
- require_relative "patch_helpers"
32
- require_relative "patch_buildsystem"
33
-
34
- # Tebako - an executable packager
35
- module Tebako
36
- module Packager
37
- # Ruby patching definitions (pass2)
38
- module Pass2
39
- class << self
40
- def get_patch_map(ostype, deps_lib_dir, ruby_ver)
41
- patch_map = get_patch_map_base(ostype, deps_lib_dir, ruby_ver)
42
- patch_map.store("thread_pthread.c", LINUX_MUSL_THREAD_PTHREAD_PATCH) if ostype =~ /linux-musl/
43
- if PatchHelpers.msys?(ostype)
44
- patch_map.merge!(get_msys_patches(ruby_ver))
45
- elsif ruby_ver.ruby3x?
46
- patch_map.store("common.mk", COMMON_MK_PATCH)
47
- end
48
- extend_patch_map_r33(patch_map, ostype, deps_lib_dir, ruby_ver)
49
- patch_map.store("prism_compile.c", PRISM_PATCHES) if ruby_ver.ruby34?
50
- patch_map
51
- end
52
-
53
- private
54
-
55
- include Tebako::Packager::PatchBuildsystem
56
- include Tebako::Packager::PatchLiterals
57
- def extend_patch_map_r33(patch_map, ostype, deps_lib_dir, ruby_ver)
58
- if ruby_ver.ruby33? || PatchHelpers.msys?(ostype)
59
- patch_map.store("config.status",
60
- get_config_status_patch(ostype, deps_lib_dir, ruby_ver))
61
- end
62
- patch_map
63
- end
64
-
65
- def get_dir_c_patch(ostype)
66
- pattern = PatchHelpers.msys?(ostype) ? "/* define system APIs */" : "#ifdef HAVE_GETATTRLIST"
67
- dir_c_patch = PatchHelpers.patch_c_file_pre(pattern)
68
- dir_c_patch.merge!(DIR_C_BASE_PATCH)
69
- dir_c_patch
70
- end
71
-
72
- def get_dln_c_patch(ostype, ruby_ver)
73
- pattern = "#ifndef dln_loaderror"
74
- # Not using substitutions of dlxxx functions on Windows
75
- dln_c_patch = {
76
- pattern => "#{PatchHelpers.msys?(ostype) ? C_FILE_SUBST_LESS : C_FILE_SUBST}\n#{pattern}\n"
77
- }
78
-
79
- if PatchHelpers.msys?(ostype)
80
- patch = ruby_ver.ruby32? ? DLN_C_MSYS_PATCH : DLN_C_MSYS_PATCH_PRE32
81
- dln_c_patch.merge!(patch)
82
- end
83
-
84
- dln_c_patch
85
- end
86
-
87
- def get_io_c_msys_patch(ruby_ver)
88
- io_c_msys_patch = ruby_ver.ruby32? ? IO_C_MSYS_PATCH : IO_C_MSYS_PATCH_PRE_32
89
- io_c_msys_patch.merge(IO_C_MSYS_BASE_PATCH)
90
- end
91
-
92
- def get_io_c_patch(ostype, ruby_ver)
93
- io_c_patch = PatchHelpers.patch_c_file_pre("/* define system APIs */")
94
- io_c_patch.merge!(get_io_c_msys_patch(ruby_ver)) if PatchHelpers.msys?(ostype)
95
- io_c_patch
96
- end
97
-
98
- def get_util_c_patch(ruby_ver)
99
- if ruby_ver.ruby31?
100
- PatchHelpers.patch_c_file_post("#endif /* !HAVE_GNU_QSORT_R */")
101
- else
102
- PatchHelpers.patch_c_file_pre("#ifndef S_ISDIR")
103
- end
104
- end
105
-
106
- def get_tool_mkconfig_rb_patch(ostype)
107
- subst = PatchHelpers.msys?(ostype) ? TOOL_MKCONFIG_RB_SUBST_MSYS : TOOL_MKCONFIG_RB_SUBST
108
- {
109
- " if fast[name]" => subst
110
- }
111
- end
112
-
113
- def get_msys_patches(ruby_ver)
114
- {
115
- "cygwin/GNUmakefile.in" => get_gnumakefile_in_patch_p2(ruby_ver),
116
- "ruby.c" => RUBY_C_MSYS_PATCHES,
117
- "win32/file.c" => WIN32_FILE_C_MSYS_PATCHES,
118
- "win32/win32.c" => WIN32_WIN32_C_MSYS_PATCHES
119
- }
120
- end
121
-
122
- def get_patch_map_base(ostype, deps_lib_dir, ruby_ver)
123
- {
124
- "template/Makefile.in" => template_makefile_in_patch(ostype, deps_lib_dir, ruby_ver),
125
- "tool/mkconfig.rb" => get_tool_mkconfig_rb_patch(ostype),
126
- "dir.c" => get_dir_c_patch(ostype), "dln.c" => get_dln_c_patch(ostype, ruby_ver),
127
- "io.c" => get_io_c_patch(ostype, ruby_ver), "main.c" => PatchMain.get_main_c_patch(ruby_ver),
128
- "file.c" => PatchHelpers.patch_c_file_pre("/* define system APIs */"),
129
- "util.c" => get_util_c_patch(ruby_ver)
130
- }
131
- end
132
-
133
- def mlibs_subst(ostype, deps_lib_dir, ruby_ver)
134
- yjit_libs = ruby_ver.ruby32only? ? "$(YJIT_LIBS) " : ""
135
- {
136
- "MAINLIBS = #{yjit_libs}@MAINLIBS@" =>
137
- "# -- Start of tebako patch -- \n" \
138
- "MAINLIBS = #{yjit_libs}#{PatchLibraries.mlibs(ostype, deps_lib_dir, ruby_ver, true)}\n" \
139
- "# -- End of tebako patch -- \n"
140
- }
141
- end
142
-
143
- def template_makefile_in_patch(ostype, deps_lib_dir, ruby_ver)
144
- template_makefile_in_patch_two(ostype, ruby_ver).merge(mlibs_subst(ostype, deps_lib_dir, ruby_ver))
145
- end
146
- end
147
- end
148
- end
149
- end