tebako 0.12.10 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '009ef5486538fdd768a0b44c2833236a1f4f5a86ec9a00d89608d4eb601a06d1'
4
- data.tar.gz: 3e2fde5102b5dfc56d9ea8cb9ab133133634e5e586de593f2183ba67c2504eb4
3
+ metadata.gz: e83bf9e1b207b0c69258ee96c251355c5e274705e839cde51e865f2d1a110335
4
+ data.tar.gz: 2c1d9c07af744ebfafa83f8e1d571a0b1b51f39be6c34cabc32fa68259e8ac30
5
5
  SHA512:
6
- metadata.gz: 7ffba2ca2bdd4724bdce1cf7179383028dbeea2e38d3c1ae070f25809eabfcb7bd16a1ed4550895259423d42ae8b190db2438f135cda439b28af9c2004192999
7
- data.tar.gz: 49c62bfdbe3312f7582cc67b9b9766ec1fe38aee715a7888a8de61764b338b2fb21dc35cf2b91f1f96948b9baf5ab9d3ad5758737e91728420f754736ecebc7c
6
+ metadata.gz: ce52bc24ca5699401edb0cca3dcd33d7ba1211e66979f47d19b9019767d2d63d74e95dcd7f4674eb4228cf12795c3135b465b4540473aaafc14edf9a8a7aba02
7
+ data.tar.gz: 0c9c7025bd565c9d7cf39332f29744c9f0d651dcbd6437b7e062d5b6f497a73bdbd272102419c9a30a949a646dc25ff3efc2befb15237bc5fb5ef1e9719fe00c
data/CMakeLists.txt CHANGED
@@ -101,7 +101,7 @@ if("${OSTYPE_TXT}" MATCHES "^linux-gnu.*")
101
101
  endif(REMOVE_GLIBC_PRIVATE)
102
102
  elseif("${OSTYPE_TXT}" MATCHES "^linux-musl.*")
103
103
  set(IS_MUSL ON)
104
- elseif("${OSTYPE_TXT}" MATCHES "^msys*")
104
+ elseif("${OSTYPE_TXT}" MATCHES "^msys*" OR "${OSTYPE_TXT}" MATCHES "^cygwin*")
105
105
  set(IS_MSYS ON)
106
106
  # set(DWARFS_PRELOAD ON)
107
107
  set(RB_W32 ON)
@@ -177,7 +177,7 @@ string(CONCAT RUBY_API_VER ${RUBY_VER_BASE} ".0")
177
177
  # list(GET LIBDWARFS_WR_VER_COMPONENTS 2 LIBDWARFS_WR_VER_PATCH)
178
178
  # set (LIBDWARFS_WR_VER_M ${LIBDWARFS_WR_VER_MAJOR}.${LIBDWARFS_WR_VER_MINOR}.${LIBDWARFS_WR_VER_PATCH})
179
179
  #else(DWARFS_PRELOAD)
180
- def_ext_prj_g(DWARFS_WR "v0.9.3")
180
+ def_ext_prj_g(DWARFS_WR "v0.9.4")
181
181
  #endif(DWARFS_PRELOAD)
182
182
 
183
183
  def_ext_prj_g(PATCHELF "65e14792061c298f1d2bc44becd48a10cbf0bc81")
@@ -425,9 +425,9 @@ if (${SETUP_MODE})
425
425
  ${DEPS_INCLUDE_DIR}/tebako/tebako-version.h
426
426
  )
427
427
 
428
- if(${RUBY_VER} VERSION_LESS "3.3.0" AND "${OSTYPE_TXT}" MATCHES "^msys*")
428
+ if(${RUBY_VER} VERSION_LESS "3.3.0" AND ("${OSTYPE_TXT}" MATCHES "^msys*" OR "${OSTYPE_TXT}" MATCHES "^cygwin*"))
429
429
  target_compile_definitions(tebako-fs PUBLIC RB_W32_PRE_33)
430
- endif(${RUBY_VER} VERSION_LESS "3.3.0" AND "${OSTYPE_TXT}" MATCHES "^msys*")
430
+ endif(${RUBY_VER} VERSION_LESS "3.3.0" AND ("${OSTYPE_TXT}" MATCHES "^msys*" OR "${OSTYPE_TXT}" MATCHES "^cygwin*"))
431
431
 
432
432
  add_dependencies(tebako-fs packaged_filesystem)
433
433
 
data/common.env CHANGED
@@ -1,5 +1,5 @@
1
1
  BUILD_TYPE=Release
2
2
  DEPS=deps
3
3
  INCBIN_TAG=348e36b
4
- DWARFS_WR_TAG=v0.9.3
4
+ DWARFS_WR_TAG=v0.9.4
5
5
  RUBY_VER=3.2.6
@@ -35,11 +35,11 @@ module Tebako
35
35
  # Packager module
36
36
  module Packager
37
37
  class << self
38
- def crt_pass1_patch(os_type, mount_point, ruby_ver)
39
- case os_type
40
- when /darwin/
38
+ def crt_pass1_patch(ostype, mount_point, ruby_ver)
39
+ scmb = ScenarioManagerBase.new(ostype)
40
+ if scmb.macos?
41
41
  Pass1DarwinPatch.new(mount_point, ruby_ver)
42
- when /msys/
42
+ elsif scmb.msys?
43
43
  Pass1MSysPatch.new(mount_point, ruby_ver)
44
44
  else
45
45
  Pass1Patch.new(mount_point, ruby_ver)
@@ -197,8 +197,6 @@ module Tebako
197
197
 
198
198
  private
199
199
 
200
- include Tebako::Packager::PatchBuildsystem
201
-
202
200
  def gnumakefile_in_patch_p1 # rubocop:disable Metrics/MethodLength
203
201
  objext = @ruby_ver.ruby32? ? "$(OBJEXT)" : "@OBJEXT@"
204
202
  {
@@ -208,7 +206,6 @@ module Tebako
208
206
  "$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.#{objext} $(WINMAINOBJ) # tebako patched",
209
207
 
210
208
  "$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@" =>
211
-
212
209
  "$(WINMAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@ # tebako patched",
213
210
 
214
211
  "--output-exp=$(RUBY_EXP) \\" => "# tebako patched --output-exp=$(RUBY_EXP) \\",
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright (c) 2021-2024 [Ribose Inc](https://www.ribose.com).
3
+ # Copyright (c) 2021-2025 [Ribose Inc](https://www.ribose.com).
4
4
  # All rights reserved.
5
5
  # This file is a part of tebako
6
6
  #
@@ -33,7 +33,18 @@ require_relative "patch_buildsystem"
33
33
 
34
34
  # Tebako - an executable packager
35
35
  module Tebako
36
+ # Packager module
36
37
  module Packager
38
+ class << self
39
+ def crt_pass2_patch(ostype, deps_lib_dir, ruby_ver)
40
+ scmb = ScenarioManagerBase.new(ostype)
41
+ if scmb.msys?
42
+ Pass2MSysPatch.new(ostype, deps_lib_dir, ruby_ver)
43
+ else
44
+ Pass2NonMSysPatch.new(ostype, deps_lib_dir, ruby_ver)
45
+ end
46
+ end
47
+ end
37
48
  # Ruby patching definitions (pass2)
38
49
  class Pass2Patch < Patch
39
50
  def initialize(ostype, deps_lib_dir, ruby_ver)
@@ -45,32 +56,19 @@ module Tebako
45
56
  end
46
57
 
47
58
  def patch_map
48
- patch_map = patch_map_base
49
- patch_map.store("thread_pthread.c", LINUX_MUSL_THREAD_PTHREAD_PATCH) if @scmb.musl?
50
- if @scmb.msys?
51
- patch_map.merge!(msys_patches)
52
- elsif @ruby_ver.ruby3x?
53
- patch_map.store("common.mk", COMMON_MK_PATCH)
54
- end
55
- extend_patch_map_r33(patch_map)
56
- patch_map.store("prism_compile.c", PRISM_PATCHES) if @ruby_ver.ruby34?
57
- patch_map
59
+ pm = patch_map_base
60
+ pm.store("thread_pthread.c", LINUX_MUSL_THREAD_PTHREAD_PATCH) if @scmb.musl?
61
+ pm.store("prism_compile.c", PRISM_PATCHES) if @ruby_ver.ruby34?
62
+ pm
58
63
  end
59
64
 
60
65
  private
61
66
 
62
67
  include Tebako::Packager::PatchBuildsystem
63
68
  include Tebako::Packager::PatchLiterals
64
- def extend_patch_map_r33(patch_map)
65
- if @ruby_ver.ruby33? || @scmb.msys?
66
- patch_map.store("config.status",
67
- get_config_status_patch(@ostype, @deps_lib_dir, @ruby_ver))
68
- end
69
- patch_map
70
- end
71
69
 
72
70
  def dir_c_patch
73
- pattern = ScenarioManagerBase.new.msys? ? "/* define system APIs */" : "#ifdef HAVE_GETATTRLIST"
71
+ pattern = @scmb.msys? ? "/* define system APIs */" : "#ifdef HAVE_GETATTRLIST"
74
72
  patch = PatchHelpers.patch_c_file_pre(pattern)
75
73
  patch.merge!(DIR_C_BASE_PATCH)
76
74
  patch
@@ -116,15 +114,6 @@ module Tebako
116
114
  }
117
115
  end
118
116
 
119
- def msys_patches
120
- {
121
- "cygwin/GNUmakefile.in" => get_gnumakefile_in_patch_p2(@ruby_ver),
122
- "ruby.c" => RUBY_C_MSYS_PATCHES,
123
- "win32/file.c" => WIN32_FILE_C_MSYS_PATCHES,
124
- "win32/win32.c" => WIN32_WIN32_C_MSYS_PATCHES
125
- }
126
- end
127
-
128
117
  def patch_map_base
129
118
  {
130
119
  "template/Makefile.in" => template_makefile_in_patch,
@@ -150,5 +139,81 @@ module Tebako
150
139
  template_makefile_in_patch_two(@ruby_ver).merge(mlibs_subst)
151
140
  end
152
141
  end
142
+
143
+ # Msys Pass2 patches
144
+ class Pass2MSysPatch < Pass2Patch
145
+ def patch_map
146
+ pm = super
147
+ pm.merge!(msys_patches)
148
+ pm.store("config.status", get_config_status_patch(@ostype, @deps_lib_dir, @ruby_ver))
149
+ pm
150
+ end
151
+
152
+ private
153
+
154
+ include Tebako::Packager::PatchBuildsystem
155
+ include Tebako::Packager::PatchLiterals
156
+
157
+ # Other MSYS (GNUMakefile) specific patches
158
+ # - The same issue with libraries as for Makefile above
159
+ # - 'Kill' ruby.exp regeneration on pass2
160
+ # since we want to use output from pass1 for implib generation
161
+ # [VERY UGLY HACK]
162
+ # - Introduce LIBRUBY dependency on static extensions
163
+ # This is an addition to COMMON_MK_PATCH specified above
164
+ def gnumakefile_in_patch_p2 # rubocop:disable Metrics/MethodLength
165
+ objext = @ruby_ver.ruby32? ? "$(OBJEXT)" : "@OBJEXT@"
166
+
167
+ {
168
+ "$(Q) $(DLLWRAP) \\" => GNUMAKEFILE_IN_DLLTOOL_SUBST,
169
+
170
+ "--output-exp=$(RUBY_EXP) \\" => "# tebako patched --output-exp=$(RUBY_EXP) \\",
171
+
172
+ "--export-all $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)" =>
173
+ "# tebako patched --export-all $(LIBRUBY_A) $(LIBS) -o $(PROGRAM)",
174
+
175
+ "@rm -f $(PROGRAM)" => "# tebako patched @rm -f $(PROGRAM)",
176
+
177
+ " $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.o $(SOLIBS) -o $(PROGRAM)" =>
178
+ "# tebako patched $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.o $(SOLIBS) -o $(PROGRAM)",
179
+
180
+ "$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.#{objext}" =>
181
+ "$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.#{objext} $(WINMAINOBJ) # tebako patched",
182
+
183
+ "RUBYDEF = $(DLL_BASE_NAME).def" => GNUMAKEFILE_IN_WINMAIN_SUBST,
184
+
185
+ "$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@" =>
186
+ "$(WINMAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) -o $@ # tebako patched",
187
+
188
+ "$(RUBY_EXP): $(LIBRUBY_A)" => "dummy.exp: $(LIBRUBY_A) # tebako patched",
189
+
190
+ "$(PROGRAM): $(RUBY_INSTALL_NAME).res.#{objext}" =>
191
+ "$(PROGRAM): $(RUBY_INSTALL_NAME).res.#{objext} $(LIBRUBY_A) # tebako patched\n" \
192
+ "$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(INITOBJS) # tebako patched\n"
193
+ }
194
+ end
195
+
196
+ def msys_patches
197
+ {
198
+ "cygwin/GNUmakefile.in" => gnumakefile_in_patch_p2,
199
+ "ruby.c" => RUBY_C_MSYS_PATCHES,
200
+ "win32/file.c" => WIN32_FILE_C_MSYS_PATCHES,
201
+ "win32/win32.c" => WIN32_WIN32_C_MSYS_PATCHES
202
+ }
203
+ end
204
+ end
205
+
206
+ # Non-msys Pass2 patches
207
+ class Pass2NonMSysPatch < Pass2Patch
208
+ def patch_map
209
+ pm = super
210
+ pm.store("common.mk", COMMON_MK_PATCH) if @ruby_ver.ruby3x?
211
+ pm.store("config.status", get_config_status_patch(@ostype, @deps_lib_dir, @ruby_ver)) if @ruby_ver.ruby33?
212
+ pm
213
+ end
214
+
215
+ include Tebako::Packager::PatchBuildsystem
216
+ include Tebako::Packager::PatchLiterals
217
+ end
153
218
  end
154
219
  end
@@ -28,6 +28,22 @@
28
28
  # Tebako - an executable packager
29
29
  module Tebako
30
30
  module Packager
31
+ # Substitutions for cygwin/Gnumakefile.in shared across Pass1 and Pass2
32
+ GNUMAKEFILE_IN_DLLTOOL_SUBST = <<~SUBST
33
+ $(Q) dlltool --output-lib=$(LIBRUBY) --output-def=tebako.def --export-all $(LIBRUBY_A) --output-exp=$(RUBY_EXP) # tebako patched
34
+ SUBST
35
+
36
+ # This MSYS specific thing ensure compilation of winmain.c
37
+ # Did try to understand why it did not work out of the box
38
+ GNUMAKEFILE_IN_WINMAIN_SUBST = <<~SUBST
39
+ RUBYDEF = $(DLL_BASE_NAME).def
40
+
41
+ # Start of tebako patch
42
+ WINMAINOBJ = win32/winmain.$(OBJEXT)
43
+ $(WINMAINOBJ): win32/winmain.c
44
+ # End of tebako patch
45
+ SUBST
46
+
31
47
  # Ruby patching definitions (common base)
32
48
  class Patch
33
49
  def patch_map
@@ -97,31 +97,14 @@ module Tebako
97
97
  end
98
98
  end
99
99
 
100
- GNUMAKEFILE_IN_DLLTOOL_SUBST = <<~SUBST
101
- $(Q) dlltool --output-lib=$(LIBRUBY) --output-def=tebako.def --export-all $(LIBRUBY_A) --output-exp=$(RUBY_EXP) # tebako patched
102
- SUBST
103
-
104
- # This MSYS specific thing ensure compilation of winmain.c
105
- # Did try to understand why it did not work out of the box
106
- GNUMAKEFILE_IN_WINMAIN_SUBST = <<~SUBST
107
- RUBYDEF = $(DLL_BASE_NAME).def
108
-
109
- # Start of tebako patch
110
- WINMAINOBJ = win32/winmain.$(OBJEXT)
111
- $(WINMAINOBJ): win32/winmain.c
112
- # End of tebako patch
113
- SUBST
114
-
115
100
  def get_config_status_pattern(ostype)
116
- case ostype
117
- when /linux-/
118
- "S[\"MAINLIBS\"]=\"-lz -lrt -lrt -ldl -lcrypt -lm -lpthread \""
119
- when /darwin/
101
+ scmb = ScenarioManagerBase.new(ostype)
102
+ if scmb.macos?
120
103
  "S[\"MAINLIBS\"]=\"-ldl -lobjc -lpthread \""
121
- when /msys/
104
+ elsif scmb.msys?
122
105
  "S[\"MAINLIBS\"]=\"-lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi -lbcrypt \""
123
106
  else
124
- raise Tebako::Error, "Unknown ostype #{ostype}"
107
+ "S[\"MAINLIBS\"]=\"-lz -lrt -lrt -ldl -lcrypt -lm -lpthread \""
125
108
  end
126
109
  end
127
110
 
@@ -131,33 +114,6 @@ module Tebako
131
114
  "S[\"MAINLIBS\"]=\"#{PatchLibraries.mlibs(ostype, deps_lib_dir, ruby_ver, false)}\""
132
115
  }
133
116
  end
134
-
135
- # Other MSYS (GNUMakefile) specific patches
136
- # - The same issue with libraries as for Makefile above
137
- # - 'Kill' ruby.exp regeneration on pass2
138
- # since we want to use output from pass1 for implib generation
139
- # [VERY UGLY HACK]
140
- # - Introduce LIBRUBY dependency on static extensions
141
- # This is an addition to COMMON_MK_PATCH specified above
142
- def get_gnumakefile_in_patch_p2(ruby_ver) # rubocop:disable Metrics/MethodLength
143
- objext = ruby_ver.ruby32? ? "$(OBJEXT)" : "@OBJEXT@"
144
-
145
- {
146
- "$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.#{objext}" =>
147
- "$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.#{objext} $(WINMAINOBJ) # tebako patched",
148
-
149
- "RUBYDEF = $(DLL_BASE_NAME).def" => GNUMAKEFILE_IN_WINMAIN_SUBST,
150
-
151
- "$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@" =>
152
- "$(WINMAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) -o $@ # tebako patched",
153
-
154
- "$(RUBY_EXP): $(LIBRUBY_A)" => "dummy.exp: $(LIBRUBY_A) # tebako patched",
155
-
156
- "$(PROGRAM): $(RUBY_INSTALL_NAME).res.#{objext}" =>
157
- "$(PROGRAM): $(RUBY_INSTALL_NAME).res.#{objext} $(LIBRUBY_A) # tebako patched\n" \
158
- "$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(INITOBJS) # tebako patched\n"
159
- }
160
- end
161
117
  end
162
118
  end
163
119
  end
@@ -148,18 +148,16 @@ module Tebako
148
148
  # This is fixed by ext/extmk.rb patch [TODO ?]
149
149
  # .....................................................
150
150
 
151
- def mlibs(ostype, deps_lib_dir, ruby_ver, with_compression) # rubocop:disable Metrics/MethodLength
152
- case ostype
153
- when /linux-gnu/
154
- linux_gnu_libraries(ruby_ver, with_compression)
155
- when /linux-musl/
156
- linux_musl_libraries(ruby_ver, with_compression)
157
- when /darwin/
158
- darwin_libraries(deps_lib_dir, ruby_ver, with_compression)
159
- when /msys/
151
+ def mlibs(ostype, deps_lib_dir, ruby_ver, with_compression)
152
+ scmb = ScenarioManagerBase.new(ostype)
153
+ if scmb.msys?
160
154
  msys_libraries(ruby_ver, with_compression)
155
+ elsif scmb.macos?
156
+ darwin_libraries(deps_lib_dir, ruby_ver, with_compression)
157
+ elsif scmb.musl?
158
+ linux_musl_libraries(ruby_ver, with_compression)
161
159
  else
162
- raise Tebako::Error, "Unknown ostype #{ostype}"
160
+ linux_gnu_libraries(ruby_ver, with_compression)
163
161
  end
164
162
  end
165
163
  end
@@ -141,8 +141,8 @@ module Tebako
141
141
  # Patch gem_prelude.rb
142
142
  def pass1a(ruby_source_dir)
143
143
  puts "-- Running pass1a script"
144
- patch = Pass1APatch.new.patch_map
145
- do_patch(patch, ruby_source_dir)
144
+ patch = Pass1APatch.new
145
+ do_patch(patch.patch_map, ruby_source_dir)
146
146
  end
147
147
 
148
148
  # Pass2
@@ -150,8 +150,8 @@ module Tebako
150
150
  def pass2(ostype, ruby_source_dir, deps_lib_dir, ruby_ver)
151
151
  puts "-- Running pass2 script"
152
152
 
153
- patch = Pass2Patch.new(ostype, deps_lib_dir, ruby_ver).patch_map
154
- do_patch(patch, ruby_source_dir)
153
+ patch = crt_pass2_patch(ostype, deps_lib_dir, ruby_ver)
154
+ do_patch(patch.patch_map, ruby_source_dir)
155
155
  end
156
156
 
157
157
  # Stash
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.12.10"
29
+ VERSION = "0.12.11"
30
30
  end
@@ -36,13 +36,52 @@ concurrency:
36
36
  cancel-in-progress: true
37
37
 
38
38
  jobs:
39
+ test-setup-libfmt:
40
+ name: test setup-libfmt on ${{ matrix.os }}
41
+ runs-on: ${{ matrix.os }}
42
+ strategy:
43
+ fail-fast: false
44
+ matrix:
45
+ os: [ ubuntu-20.04, macos-13, macos-14 ]
46
+ steps:
47
+ - name: Checkout
48
+ uses: actions/checkout@v4
49
+
50
+ - name: Run cmake script
51
+ run: |
52
+ cmake -B build/setup-libfmt -DROOT=$PWD tests/setup-libfmt
53
+ cmake --build build/setup-libfmt
54
+
55
+ - name: Test setup-libfmt
56
+ run: |
57
+ set -o errexit -o pipefail -o noclobber -o nounset
58
+ test -f build/setup-libfmt/deps/lib/libfmt.a
59
+ test -f build/setup-libfmt/deps/include/fmt/args.h
60
+ test -f build/setup-libfmt/deps/include/fmt/chrono.h
61
+ test -f build/setup-libfmt/deps/include/fmt/color.h
62
+ test -f build/setup-libfmt/deps/include/fmt/compile.h
63
+ test -f build/setup-libfmt/deps/include/fmt/core.h
64
+ test -f build/setup-libfmt/deps/include/fmt/format.h
65
+ test -f build/setup-libfmt/deps/include/fmt/format-inl.h
66
+ test -f build/setup-libfmt/deps/include/fmt/os.h
67
+ test -f build/setup-libfmt/deps/include/fmt/ostream.h
68
+ test -f build/setup-libfmt/deps/include/fmt/printf.h
69
+ test -f build/setup-libfmt/deps/include/fmt/ranges.h
70
+ test -f build/setup-libfmt/deps/include/fmt/std.h
71
+ test -f build/setup-libfmt/deps/include/fmt/xchar.h
72
+ test -f build/setup-libfmt/deps/lib/cmake/fmt/fmt-config.cmake
73
+ test -f build/setup-libfmt/deps/lib/cmake/fmt/fmt-config-version.cmake
74
+ test -f build/setup-libfmt/deps/lib/cmake/fmt/fmt-targets.cmake
75
+ test -f build/setup-libfmt/deps/lib/cmake/fmt/fmt-targets-release.cmake
76
+ test -f build/setup-libfmt/deps/lib/pkgconfig/fmt.pc
77
+
39
78
  test-setup-librachive:
40
79
  name: test setup-librachive on ${{ matrix.os }}
41
80
  runs-on: ${{ matrix.os }}
42
81
  strategy:
43
82
  fail-fast: false
44
83
  matrix:
45
- os: [ ubuntu-20.04, macos-12 ]
84
+ os: [ ubuntu-20.04, macos-13, macos-14 ]
46
85
  steps:
47
86
  - name: Checkout
48
87
  uses: actions/checkout@v4
@@ -67,7 +106,7 @@ jobs:
67
106
  strategy:
68
107
  fail-fast: false
69
108
  matrix:
70
- os: [ ubuntu-20.04, macos-12 ]
109
+ os: [ ubuntu-20.04, macos-13, macos-14 ]
71
110
  steps:
72
111
  - name: Checkout
73
112
  uses: actions/checkout@v4
@@ -89,7 +128,7 @@ jobs:
89
128
  strategy:
90
129
  fail-fast: false
91
130
  matrix:
92
- os: [ ubuntu-20.04, macos-12 ]
131
+ os: [ ubuntu-20.04, macos-13 ]
93
132
  steps:
94
133
  - name: Checkout
95
134
  uses: actions/checkout@v4
@@ -106,7 +145,7 @@ jobs:
106
145
 
107
146
  test-cross-brew-install:
108
147
  name: test arm-brew-setup/install
109
- runs-on: macos-12
148
+ runs-on: macos-13
110
149
  steps:
111
150
  - name: Checkout
112
151
  uses: actions/checkout@v4
@@ -129,7 +168,7 @@ jobs:
129
168
  strategy:
130
169
  fail-fast: false
131
170
  matrix:
132
- os: [ macos-12, macos-13, macos-14 ]
171
+ os: [ macos-13, macos-14 ]
133
172
 
134
173
  steps:
135
174
  - name: Checkout
@@ -37,7 +37,7 @@ DIR1="$DIR0/arm-homebrew"
37
37
  for bottle in "${@:2}"
38
38
  do
39
39
  echo "Installing $bottle"
40
- response=$("$DIR1/bin/brew" fetch --force --bottle-tag=arm64_big_sur "$bottle" | grep "Downloaded to")
40
+ response=$("$DIR1/bin/brew" fetch --force --bottle-tag=arm64_ventura "$bottle" | grep "bottle.tar.gz")
41
41
  IFS=" " read -r -a parsed <<< "$response"
42
42
  "$DIR1/bin/brew" install "${parsed[2]}"
43
43
  done
@@ -43,7 +43,7 @@ do_patch_multiline() {
43
43
  "$gSed" -i "s/$re/${sbst//$'\n'/"\\n"}/g" "$1"
44
44
  }
45
45
 
46
- if [[ "$OSTYPE" == "linux-gnu"* || "$OSTYPE" == "linux-musl"* || "$OSTYPE" == "msys" ]]; then
46
+ if [[ "$OSTYPE" == "linux-gnu"* || "$OSTYPE" == "linux-musl"* || "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
47
47
  gSed="sed"
48
48
  elif [[ "$OSTYPE" == "darwin"* ]]; then
49
49
  gSed="gsed"
@@ -52,7 +52,7 @@ else
52
52
  exit 1
53
53
  fi
54
54
 
55
- if [[ "$OSTYPE" == "msys" ]]; then
55
+ if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
56
56
  re="ftruncate(file\.fd(), finalBufferSize),"
57
57
  sbst="folly::portability::unistd::ftruncate(file.fd(), finalBufferSize), \/* tebako patched *\/"
58
58
  do_patch "$1/thrift/lib/cpp2/frozen/FrozenUtil.h" "$re" "$sbst"
@@ -60,4 +60,19 @@ if [[ "$OSTYPE" == "msys" ]]; then
60
60
  re="if (detail::platform_is_windows()) {"
61
61
  sbst="if (false) { \/* tebako patched *\/"
62
62
  do_patch "$1/thrift/compiler/source_location.cc" "$re" "$sbst"
63
+
64
+ re="#include <fmt\/fmt-format\.h>"
65
+ # shellcheck disable=SC2251
66
+ ! IFS= read -r -d '' sbst << EOM
67
+ #include <fmt\/format.h>
68
+
69
+ \/* -- Start of tebako patch -- *\/
70
+ #include <fmt\/fmt-ranges.h>
71
+ \/* -- End of tebako patch -- *\/
72
+ EOM
73
+
74
+ do_patch_multiline "$1/thrift/compiler/lib/cpp2/util.h" "$re" "$sbst"
75
+ do_patch_multiline "$1/thrift/compiler/gen/cpp/namespace_resolver.cc" "$re" "$sbst"
76
+ do_patch_multiline "$1/thrift/compiler/ast/t_const_value.h" "$re" "$sbst"
77
+
63
78
  fi
@@ -70,6 +70,12 @@ defined_n_win32_to_msc_ver() {
70
70
  "$GNU_SED" -i "s/$re/$sbst/g" "$1"
71
71
  }
72
72
 
73
+ defined_el_win32_to_msc_ver() {
74
+ re="#elif _WIN32"
75
+ sbst="#elif _MSC_VER \/* tebako patched *\/ "
76
+ "$GNU_SED" -i "s/$re/$sbst/g" "$1"
77
+ }
78
+
73
79
  defined_msc_ver_to_win32() {
74
80
  re="defined(_MSC_VER)"
75
81
  sbst="defined(_WIN32) \/* tebako patched *\/ "
@@ -195,7 +201,7 @@ EOM
195
201
  sbst="set(OPENSSL_INCLUDE_DIR \"\${OPENSSL_ROOT_DIR}\/include\") # tebako patched"
196
202
  "$GNU_SED" -i "s/$re/$sbst/g" "$1/CMakeLists.txt"
197
203
 
198
- elif [[ "$OSTYPE" == "msys"* ]]; then
204
+ elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
199
205
  # --- folly/portability/Stdlib.h ---
200
206
  re="#define PATH_MAX _MAX_PATH"
201
207
  sbst="\/* #define PATH_MAX _MAX_PATH --- tebako patched *\/"
@@ -514,4 +520,5 @@ EOM
514
520
  defined_win32_to_msc_ver "$1/folly/portability/SysTime.cpp"
515
521
  defined_win32_to_msc_ver "$1/folly/lang/Exception.cpp"
516
522
 
523
+ defined_el_win32_to_msc_ver "$1/folly/io/async/AsyncUDPSocket.cpp"
517
524
  fi
@@ -0,0 +1,61 @@
1
+ # Copyright (c) 2024 [Ribose Inc](https://www.ribose.com).
2
+ # All rights reserved.
3
+ # This file is a part of tebako
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions
7
+ # are met:
8
+ # 1. Redistributions of source code must retain the above copyright
9
+ # notice, this list of conditions and the following disclaimer.
10
+ # 2. Redistributions in binary form must reproduce the above copyright
11
+ # notice, this list of conditions and the following disclaimer in the
12
+ # documentation and/or other materials provided with the distribution.
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
+ # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16
+ # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
18
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
+ # POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ def_ext_prj_t(LIBFMT "10.2.1" "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9")
27
+
28
+ message(STATUS "Collecting libfmt - " v${LIBFMT_VER} " at " ${LIBFMT_SOURCE_DIR})
29
+
30
+ set(__LIBFMT "${DEPS}/lib/libfmt.a")
31
+
32
+ set(CMAKE_ARGUMENTS -DCMAKE_INSTALL_PREFIX=${DEPS}
33
+ -DFMT_DOC=OFF
34
+ -DFMT_TEST=OFF
35
+ -DFMT_FUZZ=OFF
36
+ -DFMT_CUDA_TEST=OFF
37
+ -DCMAKE_BUILD_TYPE=Release
38
+ -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
39
+ -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
40
+ )
41
+
42
+ if(TEBAKO_BUILD_TARGET)
43
+ list(APPEND CMAKE_ARGUMENTS -DCMAKE_C_FLAGS=--target=${TEBAKO_BUILD_TARGET})
44
+ list(APPEND CMAKE_ARGUMENTS -DCMAKE_EXE_LINKER_FLAGS=--target=${TEBAKO_BUILD_TARGET})
45
+ list(APPEND CMAKE_ARGUMENTS -DCMAKE_SHARED_LINKER_FLAGS=--target=${TEBAKO_BUILD_TARGET})
46
+ endif(TEBAKO_BUILD_TARGET)
47
+
48
+ ExternalProject_Add(${LIBFMT_PRJ}
49
+ PREFIX "${DEPS}"
50
+ URL https://github.com/fmtlib/fmt/releases/download/${LIBFMT_VER}/fmt-${LIBFMT_VER}.zip
51
+ URL_HASH SHA256=${LIBFMT_HASH}
52
+ DOWNLOAD_NO_PROGRESS true
53
+ CMAKE_ARGS ${CMAKE_ARGUMENTS}
54
+ SOURCE_DIR ${LIBFMT_SOURCE_DIR}
55
+ BINARY_DIR ${LIBFMT_BINARY_DIR}
56
+ BUILD_BYPRODUCTS ${__LIBFMT}
57
+ )
58
+
59
+ add_library(_LIBFMT STATIC IMPORTED)
60
+ set_target_properties(_LIBFMT PROPERTIES IMPORTED_LOCATION ${__LIBFMT})
61
+ add_dependencies(_LIBFMT ${LIBFMT_PRJ})
@@ -0,0 +1,35 @@
1
+ # Copyright (c) 2024, [Ribose Inc](https://www.ribose.com).
2
+ # All rights reserved.
3
+ # This file is a part of tebako
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions
7
+ # are met:
8
+ # 1. Redistributions of source code must retain the above copyright
9
+ # notice, this list of conditions and the following disclaimer.
10
+ # 2. Redistributions in binary form must reproduce the above copyright
11
+ # notice, this list of conditions and the following disclaimer in the
12
+ # documentation and/or other materials provided with the distribution.
13
+ #
14
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
+ # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16
+ # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
18
+ # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
+ # POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ cmake_minimum_required(VERSION 3.24.0)
27
+ project(setup-libfmt-test)
28
+
29
+ include(ExternalProject)
30
+
31
+ set(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
32
+ set(DEPS ${CMAKE_CURRENT_BINARY_DIR}/deps)
33
+
34
+ include(${ROOT}/cmake-scripts/def-external-project.cmake)
35
+ include(${ROOT}/cmake-scripts/setup-libfmt.cmake)
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.10
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-02-07 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
@@ -251,12 +251,14 @@ files:
251
251
  - tools/cmake-scripts/macos-environment.cmake
252
252
  - tools/cmake-scripts/msys-environment.cmake
253
253
  - tools/cmake-scripts/setup-libarchive.cmake
254
+ - tools/cmake-scripts/setup-libfmt.cmake
254
255
  - tools/cmake-scripts/setup-libhowardhinnerdate.cmake
255
256
  - tools/cmake-scripts/setup-libutfcpp.cmake
256
257
  - tools/cmake-scripts/setup-openssl.cmake
257
258
  - tools/cmake-scripts/version.cmake
258
259
  - tools/include/pro-statvfs.h
259
260
  - tools/tests/cmake/CMakeLists.txt
261
+ - tools/tests/setup-libfmt/CMakeLists.txt
260
262
  - tools/tests/setup-libhowardhinnerdate/CMakeLists.txt
261
263
  - tools/tests/setup-librachive/CMakeLists.txt
262
264
  - tools/tests/setup-libutfcpp/CMakeLists.txt