tebako 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b93ceda3b8a6329b0a332f3ebfbf4c24ff030eda6c1727109623a98bbf868eae
4
- data.tar.gz: 78e53009d65e1841a8c706b3be9fcbe17f7976864d23e5f70bf07357f3f2701f
3
+ metadata.gz: 22aea474f49445f022530cf4cc3c16c2bce29da88bb1c3bc0c4d0a64838676a8
4
+ data.tar.gz: 3f3efc915bcde108bdd14b6f21946cf6c2e20edc7d48e2703db54f9ea9ed5dfb
5
5
  SHA512:
6
- metadata.gz: c256ed82865bea01ac84c9c5bc33f7ef0c99df2d143eb78ac1f6b486492d42affb10fe14f590665a7a00b2c397ae57d9ba7cd3c52b6742b5740965340eeb1c77
7
- data.tar.gz: 2d5dd78d7ccdf95f06b7453b4939ebc81e759242fbf37259edd95e598901adc6a5af6828cf1c57c081c7c7f487c6a4609e3f1c8d2b59e070a5be0869448781f1
6
+ metadata.gz: 78be29f984b8505a537327970820f91151411dde2fd0bbb6d760741cd373e61324d1b225ca2e1792f22f53b32a52ad0b3bcfa8c23ec7ede3df221c6435d8cb45
7
+ data.tar.gz: 13f0505477b14079016a48c83f44da433dcabf1858ea99ae2e8ab3892d7231493d5d46f02defdf57908ad5b652c6b8713d5ef0129b25ae979798bc549e3442f7
data/CMakeLists.txt CHANGED
@@ -172,14 +172,37 @@ elseif("${OSTYPE_TXT}" MATCHES "^msys*")
172
172
  set(RUBY_MAKEFILE "--file=GNUmakefile")
173
173
  elseif("${OSTYPE_TXT}" MATCHES "^darwin.*")
174
174
  set(IS_DARWIN ON)
175
- if(${RUBY_VER} VERSION_LESS "3.2.0")
175
+ if(${RUBY_VER} VERSION_LESS "3.1.0")
176
176
  set(OPENSSL_VER "1.1")
177
- else(${RUBY_VER} VERSION_LESS "3.2.0")
177
+ else(${RUBY_VER} VERSION_LESS "3.1.0")
178
178
  set(OPENSSL_VER "3")
179
- endif(${RUBY_VER} VERSION_LESS "3.2.0")
179
+ endif(${RUBY_VER} VERSION_LESS "3.1.0")
180
180
  set(BUILD_OPENSSL_ROOT_DIR "${BUILD_BREW_PREFIX}/opt/openssl@${OPENSSL_VER}")
181
181
  endif()
182
182
 
183
+ if(IS_DARWIN)
184
+ execute_process(
185
+ COMMAND "sysctl" "-n" "hw.ncpu"
186
+ RESULT_VARIABLE NCORES_RES
187
+ OUTPUT_VARIABLE NCORES
188
+ OUTPUT_STRIP_TRAILING_WHITESPACE
189
+ )
190
+ else(IS_DARWIN)
191
+ execute_process(
192
+ COMMAND "nproc" "--all"
193
+ RESULT_VARIABLE NCORES_RES
194
+ OUTPUT_VARIABLE NCORES
195
+ OUTPUT_STRIP_TRAILING_WHITESPACE
196
+ )
197
+ endif(IS_DARWIN)
198
+
199
+ if(NCORES_RES EQUAL 0)
200
+ message(STATUS "NCORES: ${NCORES}")
201
+ else(NCORES_RES EQUAL 0)
202
+ set(NCORES 4)
203
+ message(WARNING "Failed to detect NCORES, resetting to ${NCORES} (default)")
204
+ endif(NCORES_RES EQUAL 0)
205
+
183
206
  # Various locations for external projects
184
207
  set(DEPS ${CMAKE_CURRENT_SOURCE_DIR}/deps CACHE STRING "Dependencies' folder'")
185
208
  set(DEPS_INCLUDE_DIR ${DEPS}/include)
@@ -220,7 +243,7 @@ if(IS_MSYS)
220
243
  endif(IS_MSYS)
221
244
 
222
245
  def_ext_prj_g(INCBIN "348e36b")
223
- def_ext_prj_g(DWARFS_WR "v0.3.5")
246
+ def_ext_prj_g(DWARFS_WR "v0.4.0")
224
247
 
225
248
  if (DEFINED ENV{BUNDLER_VER})
226
249
  set(BUNDLER_VER $ENV{BUNDLER_VER})
@@ -363,7 +386,7 @@ ExternalProject_Add(${DWARFS_WR_PRJ}
363
386
  SOURCE_DIR ${DWARFS_WR_SOURCE_DIR}
364
387
  BINARY_DIR ${DWARFS_WR_BINARY_DIR}
365
388
  UPDATE_COMMAND ""
366
- BUILD_COMMAND ${CMAKE_COMMAND} --build ${DWARFS_WR_BINARY_DIR} --parallel 4
389
+ BUILD_COMMAND ${CMAKE_COMMAND} --build ${DWARFS_WR_BINARY_DIR} --parallel ${NCORES}
367
390
  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${DEPS}
368
391
  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
369
392
  -DWITH_TESTS:BOOL=OFF
@@ -418,15 +441,17 @@ if(IS_DARWIN)
418
441
  string(CONCAT RUBY_L_FLAGS ${RUBY_L_FLAGS} " -L${BUILD_BREW_PREFIX}/opt/openssl@${OPENSSL_VER}/lib -L${BUILD_BREW_PREFIX}/opt/zlib/lib -L${BUILD_BREW_PREFIX}/lib")
419
442
  set(OPENSSL_RUBY_OPTION "--with-openssl-dir=${BUILD_BREW_PREFIX}/opt/openssl@${OPENSSL_VER}")
420
443
  set(C_FLAGS_DEST cflags)
421
- endif(IS_DARWIN)
444
+ else(IS_DARWIN)
445
+ string(CONCAT RUBY_L_FLAGS ${RUBY_L_FLAGS} " -static-libgcc")
422
446
 
423
- if(IS_MUSL)
424
- string(CONCAT RUBY_C_FLAGS ${RUBY_C_FLAGS} " -DENABLE_PATH_CHECK=0")
425
- endif(IS_MUSL)
447
+ if(IS_MUSL)
448
+ string(CONCAT RUBY_C_FLAGS ${RUBY_C_FLAGS} " -DENABLE_PATH_CHECK=0")
449
+ endif(IS_MUSL)
426
450
 
427
- if(RB_W32)
428
- string(CONCAT RUBY_C_FLAGS ${RUBY_C_FLAGS} " -DRB_W32=1")
429
- endif(RB_W32)
451
+ if(RB_W32)
452
+ string(CONCAT RUBY_C_FLAGS ${RUBY_C_FLAGS} " -DRB_W32=1")
453
+ endif(RB_W32)
454
+ endif(IS_DARWIN)
430
455
 
431
456
  message(STATUS "Ruby build ${C_FLAGS_DEST}='${RUBY_C_FLAGS}'")
432
457
  message(STATUS "Ruby build LDFLAGS='${RUBY_L_FLAGS}'")
@@ -452,7 +477,7 @@ ExternalProject_Add(${RUBY_PRJ}
452
477
  --prefix=${DATA_SRC_DIR} \
453
478
  ${C_FLAGS_DEST}=\"${RUBY_C_FLAGS}\" \
454
479
  LDFLAGS=\"${RUBY_L_FLAGS}\""
455
- BUILD_COMMAND make ${RUBY_MAKEFILE}
480
+ BUILD_COMMAND make ${RUBY_MAKEFILE} -j${NCORES}
456
481
  INSTALL_COMMAND make ${RUBY_MAKEFILE} install
457
482
  COMMAND ruby ${EXE}/tebako-packager pass2 ${OSTYPE_TXT} ${RUBY_SOURCE_DIR} ${DEPS_LIB_DIR} ${DATA_SRC_DIR} ${RUBY_STASH_DIR} ${RUBY_VER}
458
483
  )
@@ -555,15 +580,14 @@ else (${SETUP_MODE})
555
580
  COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
556
581
  ${TBD}/bundle${CMD_SUFFIX} config set --local force_ruby_platform ${FORCE_RUBY_PLATFORM}
557
582
  COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
558
- ${TBD}/bundle${CMD_SUFFIX} install --jobs=4
583
+ ${TBD}/bundle${CMD_SUFFIX} install --jobs=${NCORES}
559
584
  # COMMAND_EXPAND_LISTS
560
585
  # [TODO] Open question - how to deploy a project to source filesystem
561
586
  # ruby packer does bundle install --deployment --binstubs
562
- # [TODO] --jobs=4 probably can be more intellectual
563
587
  # COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
564
588
  # ${TBD}/bundle lock
565
589
  # COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
566
- # ${TBD}/bundle install --deployment --jobs=4
590
+ # ${TBD}/bundle install --deployment --jobs=${NCORES}
567
591
  DEPENDS clean_filesystem
568
592
  )
569
593
  elseif(GLENGTH GREATER 0)
@@ -663,12 +687,12 @@ else (${SETUP_MODE})
663
687
 
664
688
  if (${RUBY_VER} VERSION_LESS "3.0.0")
665
689
  add_custom_target(patched_ruby
666
- COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ${RUBY_MAKEFILE}
690
+ COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ${RUBY_MAKEFILE} -j${NCORES}
667
691
  )
668
692
  else()
669
693
  add_custom_target(patched_ruby
670
- COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ruby ${RUBY_MAKEFILE}
671
- COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ${RUBY_MAKEFILE}
694
+ COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ruby ${RUBY_MAKEFILE} -j${NCORES}
695
+ COMMAND ${CMAKE_COMMAND} -E chdir ${RUBY_SOURCE_DIR} make ${RUBY_MAKEFILE} -j${NCORES}
672
696
  )
673
697
  endif()
674
698
 
data/Rakefile CHANGED
@@ -36,7 +36,7 @@ desc "Generate version.txt"
36
36
  task "generate_version_txt" do
37
37
  require_relative "lib/tebako/version"
38
38
  File.write(File.join(__dir__, "version.txt"), "#{Tebako::VERSION}\n")
39
- puts "Generating version.txt #{Tebako::VERSION} --> #{File.join(__dir__, "version.txt")}"
39
+ puts "Generating #{File.join(__dir__, "version.txt")}; version = #{Tebako::VERSION}"
40
40
  end
41
41
 
42
42
  task build: :generate_version_txt
data/common.env CHANGED
@@ -1,6 +1,6 @@
1
1
  BUILD_TYPE=Release
2
2
  DEPS=deps
3
3
  INCBIN_TAG=348e36b
4
- DWARFS_WR_TAG=v0.3.5
4
+ DWARFS_WR_TAG=v0.4.0
5
5
  BUNDLER_VER=2.3.22
6
6
  RUBY_VER=3.1.4
@@ -44,8 +44,6 @@ module Tebako
44
44
  else
45
45
  ENV.fetch("CXXFLAGS", nil)
46
46
  end
47
- # cc = ENV.fetch("CC", "gcc")
48
- # cxx = ENV.fetch("CXX", "g++")
49
47
  @b_env ||= { "CXXFLAGS" => u_flags }
50
48
  end
51
49
 
@@ -42,6 +42,7 @@ module Tebako
42
42
  patch_map.store("common.mk", COMMON_MK_PATCH) if PatchHelpers.ruby3x?(ruby_ver)
43
43
 
44
44
  ostype =~ /msys/ ? patch_map.merge!(MSYS_PATCHES) : patch_map
45
+ # patch_map.merge!(LINUX_PATCHES)
45
46
  end
46
47
 
47
48
  private
@@ -64,35 +65,51 @@ module Tebako
64
65
  end
65
66
 
66
67
  def process_brew_libs!(libs, brew_libs)
67
- brew_libs.each { |lib| libs << "#{PatchHelpers.get_prefix(lib[0]).chop}/lib/lib#{lib[1]}.a " }
68
+ brew_libs.each { |lib| libs << "#{PatchHelpers.get_prefix_macos(lib[0]).chop}/lib/lib#{lib[1]}.a " }
68
69
  end
69
70
 
70
71
  def darwin_libs(deps_lib_dir, ruby_ver)
71
72
  libs = String.new
73
+
74
+ process_brew_libs!(libs, PatchHelpers.ruby31?(ruby_ver) ? DARWIN_BREW_LIBS_31 : DARWIN_BREW_LIBS_PRE_31)
72
75
  process_brew_libs!(libs, DARWIN_BREW_LIBS)
73
- process_brew_libs!(libs, DARWIN_BREW_LIBS_32) if PatchHelpers.ruby32?(ruby_ver)
76
+
74
77
  DARWIN_DEP_LIBS.each { |lib| libs << "#{deps_lib_dir}/lib#{lib}.a " }
75
78
  <<~SUBST
76
- -ltebako-fs -ldwarfs-wr -ldwarfs -lfolly -lfsst -lmetadata_thrift -lthrift_light -lxxhash \
77
- -lzstd #{libs} -ljemalloc -lc++
79
+ -ltebako-fs -ldwarfs-wr -ldwarfs -force_load #{deps_lib_dir}/libdwarfs_compression.a -lfolly -lfsst -lmetadata_thrift -lthrift_light -lxxhash \
80
+ -lzstd #{libs} -ljemalloc -lc++ -lc++abi
78
81
  SUBST
79
82
  end
80
83
 
84
+ # .....................................................
85
+ # Notes re linux libraries
86
+ # 1) This order is important: -lgcc_eh -l:libunwind.a -l:liblzma.a lzma is used to process debug sections.
87
+ # gcc_eh shall be linked before unwind to avoid duplicate symbols.
88
+ # 2) -lgcc_eh assumes -static-libgcc (applied in CMakeLists.ext, RUBY_C_FLAGS)
89
+ # 3) -static-libstdc++ did not work, not sure why [TODO ?]
90
+ # 4) When clang is used linker links libraries specified in exensions in such way that they are linked shared
91
+ # (libz, libffi, libreadline, libncurses, libtinfo, ... )
92
+ # Using stuff like -l:libz.a does not help; there is a reference to libz.so anyway.
93
+ # This is fixed by ext/extmk.rb patch [TODO ?]
94
+ # .....................................................
95
+
81
96
  def linux_gnu_libs(ruby_ver)
82
97
  <<~SUBST
83
- -l:libtebako-fs.a -l:libdwarfs-wr.a -l:libdwarfs.a -l:libfolly.a -l:libfsst.a -l:libmetadata_thrift.a -l:libthrift_light.a -l:libxxhash.a \
84
- -l:libfmt.a -l:libdouble-conversion.a -l:libglog.a -l:libgflags.a -l:libevent.a -l:libiberty.a -l:libacl.a -l:libssl.a -l:libcrypto.a -l:liblz4.a -l:libz.a \
85
- -l:libzstd.a -l:libgdbm.a -l:libreadline.a -l:libtinfo.a -l:libffi.a -l:libncurses.a -l:libjemalloc.a -l:libunwind.a -l:libcrypt.a -l:libanl.a -l:liblzma.a \
86
- #{PatchHelpers.yaml_reference(ruby_ver)} -l:libboost_system.a -l:libstdc++.a -l:librt.a -ldl -lpthread
98
+ -l:libtebako-fs.a -l:libdwarfs-wr.a -l:libdwarfs.a -Wl,--push-state,--whole-archive -l:libdwarfs_compression.a -Wl,--pop-state -l:libfolly.a -l:libfsst.a \
99
+ -l:libmetadata_thrift.a -l:libthrift_light.a -l:libxxhash.a -l:libarchive.a -l:libfmt.a -l:libdouble-conversion.a -l:libglog.a -l:libgflags.a -l:libevent.a \
100
+ -l:libiberty.a -l:libacl.a -l:libssl.a -l:libcrypto.a -l:liblz4.a -l:libz.a -l:libzstd.a -l:libbrotlienc.a -l:libbrotlidec.a -l:libbrotlicommon.a -l:libgdbm.a \
101
+ -l:libreadline.a -l:libtinfo.a -l:libffi.a -l:libncurses.a -l:libjemalloc.a -l:libcrypt.a -l:libanl.a #{PatchHelpers.yaml_reference(ruby_ver)} \
102
+ -l:libboost_system.a -l:libboost_chrono.a -l:libutil.a -l:libstdc++.a -lgcc_eh -l:libunwind.a -l:liblzma.a -l:librt.a -ldl -lpthread -lm
87
103
  SUBST
88
104
  end
89
105
 
90
106
  def linux_musl_libs(ruby_ver)
91
107
  <<~SUBST
92
- -l:libtebako-fs.a -l:libdwarfs-wr.a -l:libdwarfs.a -l:libfolly.a -l:libfsst.a -l:libmetadata_thrift.a -l:libthrift_light.a -l:libxxhash.a \
93
- -l:libfmt.a -l:libdouble-conversion.a -l:libglog.a -l:libgflags.a -l:libevent.a -l:libiberty.a -l:libacl.a -l:libssl.a -l:libcrypto.a -l:liblz4.a -l:libz.a \
94
- -l:libzstd.a -l:libgdbm.a -l:libreadline.a -l:libffi.a -l:libncurses.a -l:libjemalloc.a -l:libunwind.a -l:libcrypt.a -l:liblzma.a \
95
- #{PatchHelpers.yaml_reference(ruby_ver)} -l:libboost_system.a -l:libstdc++.a -l:librt.a -ldl -lpthread
108
+ -l:libtebako-fs.a -l:libdwarfs-wr.a -l:libdwarfs.a -Wl,--push-state,--whole-archive -l:libdwarfs_compression.a -Wl,--pop-state -l:libfolly.a -l:libfsst.a \
109
+ -l:libmetadata_thrift.a -l:libthrift_light.a -l:libxxhash.a -l:libfmt.a -l:libdouble-conversion.a -l:libglog.a -l:libgflags.a -l:libevent.a -l:libiberty.a \
110
+ -l:libacl.a -l:libssl.a -l:libcrypto.a -l:liblz4.a -l:libz.a -l:libzstd.a -l:libbrotlienc.a -l:libbrotlidec.a -l:libbrotlicommon.a -l:libgdbm.a -l:libreadline.a \
111
+ -l:libffi.a -l:libncurses.a -l:libjemalloc.a -l:libcrypt.a #{PatchHelpers.yaml_reference(ruby_ver)} -l:libboost_system.a -l:libboost_chrono.a -l:librt.a \
112
+ -l:libstdc++.a -lgcc_eh -l:libunwind.a -l:liblzma.a -ldl -lpthread
96
113
  SUBST
97
114
  end
98
115
 
@@ -139,15 +156,14 @@ module Tebako
139
156
  end
140
157
 
141
158
  def template_makefile_in_patch(ostype, deps_lib_dir, ruby_ver)
142
- base_patch = TEMPLATE_MAKEFILE_IN_BASE_PATCH_ONE.merge(mlibs_subst(ostype, deps_lib_dir, ruby_ver))
143
- base_patch.merge!(template_makefile_in_patch_two(ruby_ver))
159
+ template_makefile_in_patch_two(ruby_ver).merge(mlibs_subst(ostype, deps_lib_dir, ruby_ver))
144
160
  end
145
161
 
146
162
  def template_makefile_in_patch_two(ruby_ver)
147
163
  if PatchHelpers.ruby31?(ruby_ver)
148
- { TEMPLATE_MAKEFILE_IN_BASE_PATTERN_TWO => TEMPLATE_MAKEFILE_IN_BASE_PATCH_TWO }
164
+ { TEMPLATE_MAKEFILE_IN_BASE_PATTERN => TEMPLATE_MAKEFILE_IN_BASE_PATCH }
149
165
  else
150
- { TEMPLATE_MAKEFILE_IN_BASE_PATTERN_TWO_PRE_3_1 => TEMPLATE_MAKEFILE_IN_BASE_PATCH_TWO_PRE_3_1 }
166
+ { TEMPLATE_MAKEFILE_IN_BASE_PATTERN_PRE_3_1 => TEMPLATE_MAKEFILE_IN_BASE_PATCH_PRE_3_1 }
151
167
  end
152
168
  end
153
169
  end
@@ -34,13 +34,23 @@ module Tebako
34
34
  # Ruby patching helpers (pass2)
35
35
  module PatchHelpers
36
36
  class << self
37
- def get_prefix(package)
37
+ def get_prefix_macos(package)
38
38
  out, st = Open3.capture2("brew --prefix #{package}")
39
39
  raise Tebako::Error, "brew --prefix #{package} failed with code #{st.exitstatus}" unless st.exitstatus.zero?
40
40
 
41
41
  out
42
42
  end
43
43
 
44
+ def get_prefix_linux(package)
45
+ out, st = Open3.capture2("pkg-config --variable=libdir #{package}")
46
+ unless st.exitstatus.zero?
47
+ raise Tebako::Error,
48
+ "pkg-config --variable=libdir #{package} failed with code #{st.exitstatus}"
49
+ end
50
+
51
+ out
52
+ end
53
+
44
54
  def ruby3x?(ruby_ver)
45
55
  ruby_ver[0] == "3"
46
56
  end
@@ -168,32 +168,24 @@ module Tebako
168
168
  ["dln.c", "static const char funcname_prefix[sizeof(FUNCNAME_PREFIX) - 1] = FUNCNAME_PREFIX;"]
169
169
  ].freeze
170
170
 
171
- TEMPLATE_MAKEFILE_IN_BASE_PATCH_ONE = {
172
- "LIBS = @LIBS@ $(EXTLIBS)" => <<~SUBST
173
- # -- Start of tebako patch --
174
- LIBS = $(MAINLIBS) @LIBS@
175
- # -- End of tebako patch --
176
- SUBST
177
- }.freeze
178
-
179
- TEMPLATE_MAKEFILE_IN_BASE_PATTERN_TWO_PRE_3_1 =
171
+ TEMPLATE_MAKEFILE_IN_BASE_PATTERN_PRE_3_1 =
180
172
  "\t\t$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) " \
181
173
  "$(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@"
182
174
 
183
- TEMPLATE_MAKEFILE_IN_BASE_PATCH_TWO_PRE_3_1 =
175
+ TEMPLATE_MAKEFILE_IN_BASE_PATCH_PRE_3_1 =
184
176
  "# -- Start of tebako patch --\n" \
185
177
  "\t\t$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) " \
186
- "$(EXTOBJS) $(LIBRUBYARG_STATIC) $(LIBS) $(OUTFLAG)$@\n" \
178
+ "$(EXTOBJS) $(LIBRUBYARG_STATIC) $(OUTFLAG)$@\n" \
187
179
  "# -- End of tebako patch --"
188
180
 
189
- TEMPLATE_MAKEFILE_IN_BASE_PATTERN_TWO =
190
- "\t\t$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) " \
191
- "$(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@"
181
+ TEMPLATE_MAKEFILE_IN_BASE_PATTERN =
182
+ "\t\t$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) " \
183
+ "$(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@"
192
184
 
193
- TEMPLATE_MAKEFILE_IN_BASE_PATCH_TWO =
185
+ TEMPLATE_MAKEFILE_IN_BASE_PATCH =
194
186
  "# -- Start of tebako patch --\n" \
195
187
  "\t\t$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) " \
196
- "$(EXTOBJS) $(LIBRUBYARG_STATIC) $(LIBS) $(OUTFLAG)$@\n" \
188
+ "$(EXTOBJS) $(LIBRUBYARG_STATIC) $(OUTFLAG)$@\n" \
197
189
  "# -- End of tebako patch --"
198
190
 
199
191
  C_FILE_SUBST = <<~SUBST
@@ -259,17 +251,28 @@ module Tebako
259
251
 
260
252
  }.freeze
261
253
 
254
+ LINUX_PATCHES = {
255
+ "ext/extmk.rb" => {
256
+ "mf.macro \"EXTLIBS\", $extlibs" => "# mf.macro \"EXTLIBS\", $extlibs tebako patched"
257
+ }
258
+ }.freeze
259
+
262
260
  # rubocop:disable Style/WordArray
261
+
262
+ # NOTE: folly provides build-in implementation of jemalloc
263
+
263
264
  DARWIN_BREW_LIBS = [
264
- ["openssl@1.1", "ssl"], ["openssl@1.1", "crypto"], ["zlib", "z"], ["gdbm", "gdbm"],
265
- ["readline", "readline"], ["libffi", "ffi"], ["ncurses", "ncurses"], ["fmt", "fmt"],
266
- ["lz4", "lz4"], ["xz", "lzma"], ["libyaml", "yaml"],
265
+ ["zlib", "z"], ["gdbm", "gdbm"], ["readline", "readline"], ["libffi", "ffi"],
266
+ ["ncurses", "ncurses"], ["fmt", "fmt"], ["lz4", "lz4"], ["xz", "lzma"],
267
+ ["libyaml", "yaml"], ["boost", "boost_chrono"],
267
268
  ["double-conversion", "double-conversion"]
268
269
  ].freeze
269
270
 
270
- DARWIN_BREW_LIBS_32 = [["libyaml", "yaml"]].freeze
271
+ DARWIN_BREW_LIBS_PRE_31 = [["openssl@1.1", "ssl"], ["openssl@1.1", "crypto"]].freeze
272
+
273
+ DARWIN_BREW_LIBS_31 = [["libyaml", "yaml"], ["openssl@3", "ssl"], ["openssl@3", "crypto"]].freeze
271
274
 
272
- DARWIN_DEP_LIBS = ["glog", "gflags"].freeze
275
+ DARWIN_DEP_LIBS = ["glog", "gflags", "brotlienc", "brotlidec", "brotlicommon"].freeze
273
276
  # rubocop:enable Style/WordArray
274
277
  end
275
278
  # rubocop:enable Metrics/ModuleLength
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.5.4"
29
+ VERSION = "0.5.5"
30
30
  end
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  *
3
- * Copyright (c) 2021-2022 [Ribose Inc](https://www.ribose.com).
3
+ * Copyright (c) 2021-2023 [Ribose Inc](https://www.ribose.com).
4
4
  * All rights reserved.
5
5
  * This file is a part of tebako
6
6
  *
@@ -34,4 +34,4 @@ namespace tebako {
34
34
  const char * fs_mount_point = "@FS_MOUNT_POINT@";
35
35
  const char * fs_entry_point = "@FS_ENTRY_POINT@";
36
36
  INCBIN(fs, "@DATA_BIN_FILE@");
37
- }
37
+ }
data/version.txt CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
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.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor