tebako 0.7.0 → 0.7.1

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: a0c260fa919b77603c20cc5db12e51595c0a0fd0da649dd6f64d2022bebc50dc
4
- data.tar.gz: 1bd24a7fa0d74fb44b95f0b5f41f736323553725741327b130cfadc36cb45cb6
3
+ metadata.gz: edab24288967cc4085b927ef069adab649b24282a6cc320a595bc2b20cb636e9
4
+ data.tar.gz: 7964a2bcf62cf28d4cd34ee1f1744afe21980e934a4fa1a649f0b854b15b1ca3
5
5
  SHA512:
6
- metadata.gz: 145fe0a5fe1cb275c21db9e9d4b9092e7c7b342ee43e232d1a6e61a5bc606c62329c9a6a0082843a8b7c017667fda09317c1faa2f3371687e5e64c4a49a176b2
7
- data.tar.gz: 4708ff850fc763b41d7e1d8e84bee81d4c6a17f1653ac6f697f39e7146fe8acb60ca7922ac1ff7693086fae3f5216d82d83bd1cb97b596c9607769ce022c00f0
6
+ metadata.gz: 1a77dc3a2c810aad7597cab4a3d5a8f3c6378d2f9313e129edf17097700a0210eb9008b73bb5402921af53e5cccf450602865b4cc1518e5f8a2fd0e34e15163c
7
+ data.tar.gz: 40b417b5bb8e13e40618015d04f5f3c085bc08325d798bba5fb1cf6c43c0e44daef392755473f2110cb21c95134dcee24c6559933226eee0f41a5f9fc074d602
data/CMakeLists.txt CHANGED
@@ -117,6 +117,7 @@ set(IS_MSYS OFF)
117
117
  set(IS_DARWIN OFF)
118
118
  set(RB_W32 OFF)
119
119
  set(FORCE_RUBY_PLATFORM "false")
120
+ set(NOKOGIRI_OPTION "--no-use-system-libraries")
120
121
  set(RUBY_WITHOUT_EXT "dbm,win32,win32ole")
121
122
  set(RUBY_NAME "ruby")
122
123
  set(RUBY_SUFFIX "")
@@ -132,6 +133,7 @@ if("${OSTYPE_TXT}" MATCHES "^linux-musl.*")
132
133
  elseif("${OSTYPE_TXT}" MATCHES "^msys*")
133
134
  set(IS_MSYS ON)
134
135
  set(FORCE_RUBY_PLATFORM "true")
136
+ set(NOKOGIRI_OPTION "--use-system-libraries")
135
137
  # set(DWARFS_PRELOAD ON)
136
138
  set(RB_W32 ON)
137
139
  set(RUBY_WITHOUT_EXT "dbm,syslog,pty,gdbm,readline")
@@ -368,6 +370,7 @@ message(STATUS "Ruby build ${C_FLAGS_DEST}='${RUBY_C_FLAGS}'")
368
370
  message(STATUS "Ruby build LDFLAGS='${RUBY_L_FLAGS}'")
369
371
  message(STATUS "openssl Ruby option='${OPENSSL_RUBY_OPTION}'")
370
372
  message(STATUS "libyaml Ruby option='${LIBYAML_RUBY_OPTION}'")
373
+ message(STATUS "nokogiri build option='${NOKOGIRI_OPTION}'")
371
374
 
372
375
  ExternalProject_Add(${RUBY_PRJ}
373
376
  PREFIX ${DEPS}
@@ -438,7 +441,7 @@ else (${SETUP_MODE})
438
441
  COMMAND ${CMAKE_COMMAND} -E chdir ${DATA_PRE_DIR} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
439
442
  ${TBD}/bundle${BAT_SUFFIX} config set --local build.ffi --disable-system-libffi
440
443
  COMMAND ${CMAKE_COMMAND} -E chdir ${DATA_PRE_DIR} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
441
- ${TBD}/bundle${BAT_SUFFIX} config set --local build.nokogiri --use-system-libraries
444
+ ${TBD}/bundle${BAT_SUFFIX} config set --local build.nokogiri ${NOKOGIRI_OPTION}
442
445
  COMMAND ${CMAKE_COMMAND} -E chdir ${DATA_PRE_DIR} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
443
446
  ${TBD}/bundle${BAT_SUFFIX} config set --local force_ruby_platform ${FORCE_RUBY_PLATFORM}
444
447
  COMMAND ${CMAKE_COMMAND} -E chdir ${DATA_PRE_DIR} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
@@ -480,16 +483,16 @@ else (${SETUP_MODE})
480
483
  COMMAND test -f ${FS_ROOT}/${FS_ENTRANCE} ||
481
484
  (${CMAKE_COMMAND} -E echo "Entry point ${FS_ROOT}/${FS_ENTRANCE} does not exist or is not accessible" &&
482
485
  ${CMAKE_COMMAND} -E false )
483
- COMMAND ${CMAKE_COMMAND} -E make_directory ${TLD}
484
- COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${FS_ROOT} -DTARGET_DIR=${TLD} -P ${CMAKE_SOURCE_DIR}/cmake/copy_dir.cmake
485
- COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
486
- ${TBD}/bundle${BAT_SUFFIX} config set --local build.ffi --disable-system-libffi
486
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${TLD}
487
+ COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${FS_ROOT} -DTARGET_DIR=${TLD} -P ${CMAKE_SOURCE_DIR}/cmake/copy_dir.cmake
488
+ COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
489
+ ${TBD}/bundle${BAT_SUFFIX} config set --local build.ffi --disable-system-libffi
490
+ COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
491
+ ${TBD}/bundle${BAT_SUFFIX} config set --local build.nokogiri ${NOKOGIRI_OPTION}
492
+ COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
493
+ ${TBD}/bundle${BAT_SUFFIX} config set --local force_ruby_platform ${FORCE_RUBY_PLATFORM}
487
494
  COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
488
- ${TBD}/bundle${BAT_SUFFIX} config set --local build.nokogiri --use-system-libraries
489
- COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
490
- ${TBD}/bundle${BAT_SUFFIX} config set --local force_ruby_platform ${FORCE_RUBY_PLATFORM}
491
- COMMAND ${CMAKE_COMMAND} -E chdir ${TLD} ${CMAKE_COMMAND} -E env --unset=GEM_HOME --unset=GEM_PATH TEBAKO_PASS_THROUGH=1
492
- ${TBD}/bundle${BAT_SUFFIX} install --jobs=${NCORES}
495
+ ${TBD}/bundle${BAT_SUFFIX} install --jobs=${NCORES}
493
496
  # COMMAND_EXPAND_LISTS
494
497
  # [TODO] Open question - how to deploy a project to source filesystem
495
498
  # ruby packer does bundle install --deployment --binstubs
data/README.adoc CHANGED
@@ -119,7 +119,7 @@ apk --no-cache --upgrade add build-base cmake git bash autoconf boost-static \
119
119
  brotli-static jemalloc-dev fmt-dev xz-static
120
120
  ----
121
121
 
122
- === macOS 12 (Monterey)
122
+ === macOS 12 (Monterey) through macOS 14 (Sonoma)
123
123
 
124
124
  [source,sh]
125
125
  ----
@@ -211,6 +211,23 @@ gem install tebako
211
211
  gem install tebako
212
212
  ----
213
213
 
214
+ === Tebako Root Folder (aka Prefix) Selection
215
+
216
+ The prefix in Tebako determines the base directory for the Tebako setup. It is an essential part of configuring how Tebako operates within your system.
217
+ The selection of the prefix follows a specific order of precedence to ensure flexibility and ease of use:
218
+
219
+ . *User-Specified Prefix*: The most direct way to set the root folder is by specifying it through an option. This can be done via command-line argument.
220
+
221
+ . *Current Working Directory (PWD)*: If the prefix option is explicitly set to "PWD", Tebako uses the current working directory as Tebako root folder.
222
+
223
+ . *Environment Variable (TEBAKO_PREFIX)*: In the absence of a user-specified option, Tebako looks for an environment variable named `TEBAKO_PREFIX`. If found, its value is used as the root folder.
224
+
225
+ . *Default Value*: If no prefix is specified and the `TEBAKO_DIR` environment variable is not set, Tebako defaults to using a directory named `.tebako` in the user's home directory.
226
+
227
+
228
+ Path Expansion: Regardless of the method used to set the prefix, Tebako expands the provided path to an absolute path. This expansion includes resolving relative paths based on the current working
229
+ directory and expanding user directory shortcuts like `~`.
230
+
214
231
  ==== Press
215
232
 
216
233
  This command "presses" a Ruby project using the Tebako setup from the Tebako root
@@ -227,7 +244,7 @@ cmmands below.
227
244
  ----
228
245
  tebako press \
229
246
  [-p|--prefix=<tebako-root-folder>] \
230
- [-R|--Ruby=<2.7.8|3.0.6|3.1.4|3.2.3>] \
247
+ [-R|--Ruby=<2.7.8|3.0.7|3.1.4|3.1.5|3.1.6|3.2.3|3.2.4>] \
231
248
  -r|--root=<project-root-folder> \
232
249
  -e|--entry-point=<entry-point> \
233
250
  [-o|--output=<packaged file name>] \
@@ -236,10 +253,9 @@ tebako press \
236
253
 
237
254
  Where:
238
255
 
239
- * `<tebako-root-folder>`, the Tebako setup folder (optional, defaults to current
240
- folder)
256
+ * `<tebako-root-folder>`, the Tebako root folder (see details in the Tebako Root Folder Selection section)
241
257
 
242
- * `Ruby` parameter defines Ruby version that will be packaged (optional, defaults to 3.1.4)
258
+ * `Ruby` parameter defines Ruby version that will be packaged (optional, defaults to 3.1.6)
243
259
 
244
260
  * `<project-root>`, a folder at the host source file system where project files
245
261
  are located
@@ -284,8 +300,7 @@ tebako setup \
284
300
 
285
301
  Where:
286
302
 
287
- * `<tebako-root-folder>`, the Tebako setup folder (optional, defaults to current
288
- folder)
303
+ * `<tebako-root-folder>`, the Tebako root folder (see details in the Tebako Root Folder Selection section)
289
304
 
290
305
  * `Ruby` parameter defines Ruby version that will be packaged (optional, defaults to 3.1.6)
291
306
 
@@ -302,8 +317,7 @@ tebako clean \
302
317
 
303
318
  Where:
304
319
 
305
- * `<tebako-root-folder>`, the Tebako setup folder (optional, defaults to current
306
- folder)
320
+ * `<tebako-root-folder>`, the Tebako root folder (see details in the Tebako Root Folder Selection section)
307
321
 
308
322
  [example]
309
323
  ====
@@ -322,7 +336,7 @@ Normally you do not need to do it since tebako packager optimizes artifacts life
322
336
  ----
323
337
  tebako clean_ruby
324
338
  [-p|--prefix=<tebako-root-folder>]
325
- [-R|--Ruby=<2.7.8|3.0.6|3.1.4|3.2.3>]
339
+ [-R|--Ruby=<2.7.8|3.0.7|3.1.4|3.1.5|3.1.6|3.2.3|3.2.4>]
326
340
  ----
327
341
 
328
342
  Where:
@@ -115,10 +115,20 @@ module Tebako
115
115
  end
116
116
  end
117
117
 
118
+ def handle_nil_prefix
119
+ env_prefix = ENV.fetch("TEBAKO_PREFIX", nil)
120
+ if env_prefix.nil?
121
+ puts "No prefix specified, using ~/.tebako"
122
+ File.expand_path("~/.tebako")
123
+ else
124
+ puts "Using TEBAKO_PREFIX environment variable as prefix"
125
+ File.expand_path(env_prefix)
126
+ end
127
+ end
128
+
118
129
  def prefix
119
130
  @prefix ||= if options["prefix"].nil?
120
- puts "No prefix specified, using ~/.tebako"
121
- File.expand_path("~/.tebako")
131
+ handle_nil_prefix
122
132
  elsif options["prefix"] == "PWD"
123
133
  Dir.pwd
124
134
  else
@@ -26,5 +26,5 @@
26
26
  # POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
28
  module Tebako
29
- VERSION = "0.7.0"
29
+ VERSION = "0.7.1"
30
30
  end
data/version.txt CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-28 00:00:00.000000000 Z
11
+ date: 2024-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor