tebako 0.7.2.rc5 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tebako/version.rb +1 -1
- data/tools/.github/workflows/test.yml +25 -4
- data/tools/cmake-scripts/macos-environment.cmake +25 -36
- data/tools/tests/cmake/CMakeLists.txt +81 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97605b16776ccfa3d1b92dba5ced54dd84181fab77d36be7e3c9bcc5badbc4ba
|
4
|
+
data.tar.gz: e6844adde257c9029eaf90545a2bdb3dd2de700fcd87be84181868e7eb51c691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 041c4f6a0e0ce0ff89260ef1c0663d096d16756e7f05f0361db238725fe6fc95f7714ffc757454a0a6fe36680e9c7f2748a53ecae912e622468b3c407dbbc058
|
7
|
+
data.tar.gz: 0a240ef7aa055f123f7342cb662c45b3996c74542258623c3b00f469bf60fe81c2fb4434e70563239bb6afa04a393b9f438d8563bd37756367c0d590c5dfd914
|
data/lib/tebako/version.rb
CHANGED
@@ -42,7 +42,7 @@ jobs:
|
|
42
42
|
strategy:
|
43
43
|
fail-fast: false
|
44
44
|
matrix:
|
45
|
-
os: [ ubuntu-20.04, macos-
|
45
|
+
os: [ ubuntu-20.04, macos-12 ]
|
46
46
|
steps:
|
47
47
|
- name: Checkout
|
48
48
|
uses: actions/checkout@v4
|
@@ -67,7 +67,7 @@ jobs:
|
|
67
67
|
strategy:
|
68
68
|
fail-fast: false
|
69
69
|
matrix:
|
70
|
-
os: [ ubuntu-20.04, macos-
|
70
|
+
os: [ ubuntu-20.04, macos-12 ]
|
71
71
|
steps:
|
72
72
|
- name: Checkout
|
73
73
|
uses: actions/checkout@v4
|
@@ -89,7 +89,7 @@ jobs:
|
|
89
89
|
strategy:
|
90
90
|
fail-fast: false
|
91
91
|
matrix:
|
92
|
-
os: [ ubuntu-20.04, macos-
|
92
|
+
os: [ ubuntu-20.04, macos-12 ]
|
93
93
|
steps:
|
94
94
|
- name: Checkout
|
95
95
|
uses: actions/checkout@v4
|
@@ -106,7 +106,7 @@ jobs:
|
|
106
106
|
|
107
107
|
test-cross-brew-install:
|
108
108
|
name: test arm-brew-setup/install
|
109
|
-
runs-on: macos-
|
109
|
+
runs-on: macos-12
|
110
110
|
steps:
|
111
111
|
- name: Checkout
|
112
112
|
uses: actions/checkout@v4
|
@@ -122,3 +122,24 @@ jobs:
|
|
122
122
|
set -o errexit -o pipefail -o noclobber -o nounset
|
123
123
|
test -f $PWD/arm-homebrew/lib/libgflags.dylib
|
124
124
|
test -f $PWD/arm-homebrew/lib/libglog.dylib
|
125
|
+
|
126
|
+
test-macos-environment-script:
|
127
|
+
name: test macos-environment.cmake on ${{ matrix.os }}
|
128
|
+
runs-on: ${{ matrix.os }}
|
129
|
+
strategy:
|
130
|
+
fail-fast: false
|
131
|
+
matrix:
|
132
|
+
os: [ macos-12, macos-13, macos-14 ]
|
133
|
+
|
134
|
+
steps:
|
135
|
+
- name: Checkout
|
136
|
+
uses: actions/checkout@v4
|
137
|
+
|
138
|
+
- name: Checkout
|
139
|
+
uses: actions/checkout@v4
|
140
|
+
|
141
|
+
- name: Install packages
|
142
|
+
run: brew install flex bison bash
|
143
|
+
|
144
|
+
- name: Run CMake test
|
145
|
+
run: cmake -B test.build -S tests/cmake
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2021-
|
1
|
+
# Copyright (c) 2021-2024, [Ribose Inc](https://www.ribose.com).
|
2
2
|
# All rights reserved.
|
3
3
|
# This file is a part of tamatebako
|
4
4
|
#
|
@@ -25,14 +25,32 @@
|
|
25
25
|
#
|
26
26
|
|
27
27
|
if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
|
28
|
+
|
29
|
+
function(find_and_set_homebrew_prefix package_name pkg_name executable_name)
|
30
|
+
execute_process(
|
31
|
+
COMMAND brew --prefix ${package_name}
|
32
|
+
RESULT_VARIABLE BREW_${pkg_name}_RESULT
|
33
|
+
OUTPUT_VARIABLE BREW_${pkg_name}_PREFIX_TMP
|
34
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
35
|
+
)
|
36
|
+
if (BREW_${pkg_name}_RESULT EQUAL 0 AND EXISTS "${BREW_${pkg_name}_PREFIX_TMP}")
|
37
|
+
set(BREW_${pkg_name}_PREFIX "${BREW_${pkg_name}_PREFIX_TMP}" CACHE PATH "${package_name} prefix")
|
38
|
+
message(STATUS "Found ${package_name} keg installed by Homebrew at ${BREW_${pkg_name}_PREFIX}")
|
39
|
+
set(${executable_name} "${BREW_${pkg_name}_PREFIX}/bin/${package_name}" CACHE FILEPATH "${executable_name} executable")
|
40
|
+
endif()
|
41
|
+
endfunction()
|
42
|
+
|
43
|
+
|
28
44
|
execute_process(
|
29
45
|
COMMAND brew --prefix
|
30
46
|
RESULT_VARIABLE BREW_PREFIX_RES
|
31
|
-
OUTPUT_VARIABLE
|
47
|
+
OUTPUT_VARIABLE BREW_PREFIX_TMP
|
32
48
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
33
49
|
)
|
34
|
-
if(NOT (BREW_PREFIX_RES EQUAL 0 AND EXISTS ${
|
50
|
+
if(NOT (BREW_PREFIX_RES EQUAL 0 AND EXISTS ${BREW_PREFIX_TMP}))
|
35
51
|
message(FATAL "Could not find build brew setup")
|
52
|
+
else()
|
53
|
+
set(BREW_PREFIX "${BREW_PREFIX_TMP}" CACHE PATH "Brew installation prefix")
|
36
54
|
endif()
|
37
55
|
|
38
56
|
message(STATUS "Using brew environment at ${BREW_PREFIX}")
|
@@ -40,41 +58,12 @@ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
|
|
40
58
|
set(OPENSSL_ROOT_DIR "${BREW_PREFIX}/opt/openssl@3")
|
41
59
|
set(CMAKE_PREFIX_PATH "${BREW_PREFIX}")
|
42
60
|
include_directories("${OPENSSL_ROOT_DIR}/include")
|
43
|
-
include_directories("${
|
61
|
+
include_directories("${BREW_PREFIX}/include")
|
44
62
|
|
45
63
|
# https://stackoverflow.com/questions/53877344/cannot-configure-cmake-to-look-for-homebrew-installed-version-of-bison
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
OUTPUT_VARIABLE BREW_BISON_PREFIX
|
50
|
-
OUTPUT_STRIP_TRAILING_WHITESPACE
|
51
|
-
)
|
52
|
-
if (BREW_BISON EQUAL 0 AND EXISTS "${BREW_BISON_PREFIX}")
|
53
|
-
message(STATUS "Found Bison keg installed by Homebrew at ${BREW_BISON_PREFIX}")
|
54
|
-
set(BISON_EXECUTABLE "${BREW_BISON_PREFIX}/bin/bison")
|
55
|
-
endif()
|
56
|
-
|
57
|
-
execute_process(
|
58
|
-
COMMAND brew --prefix flex
|
59
|
-
RESULT_VARIABLE BREW_FLEX
|
60
|
-
OUTPUT_VARIABLE BREW_FLEX_PREFIX
|
61
|
-
OUTPUT_STRIP_TRAILING_WHITESPACE
|
62
|
-
)
|
63
|
-
if (BREW_FLEX EQUAL 0 AND EXISTS "${BREW_FLEX_PREFIX}")
|
64
|
-
message(STATUS "Found Flex keg installed by Homebrew at ${BREW_FLEX_PREFIX}")
|
65
|
-
set(FLEX_EXECUTABLE "${BREW_FLEX_PREFIX}/bin/flex")
|
66
|
-
endif()
|
67
|
-
|
68
|
-
execute_process(
|
69
|
-
COMMAND brew --prefix bash
|
70
|
-
RESULT_VARIABLE BREW_BASH
|
71
|
-
OUTPUT_VARIABLE BREW_BASH_PREFIX
|
72
|
-
OUTPUT_STRIP_TRAILING_WHITESPACE
|
73
|
-
)
|
74
|
-
if (BREW_BASH EQUAL 0 AND EXISTS "${BREW_BASH_PREFIX}")
|
75
|
-
message(STATUS "Found GNU bash keg installed by Homebrew at ${BREW_BASH_PREFIX}")
|
76
|
-
set(GNU_BASH "${BREW_BASH_PREFIX}/bin/bash")
|
77
|
-
endif()
|
64
|
+
find_and_set_homebrew_prefix("bison" "BISON" "BISON_EXECUTABLE")
|
65
|
+
find_and_set_homebrew_prefix("flex" "FLEX" "FLEX_EXECUTABLE")
|
66
|
+
find_and_set_homebrew_prefix("bash" "BASH" "GNU_BASH")
|
78
67
|
|
79
68
|
# Suppress superfluous randlib warnings about "*.a" having no symbols on MacOSX.
|
80
69
|
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
@@ -0,0 +1,81 @@
|
|
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.15)
|
27
|
+
project(cmake-tests)
|
28
|
+
|
29
|
+
|
30
|
+
# Adjust the path to where your macos-environment.cmake is located
|
31
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake-scripts/macos-environment.cmake")
|
32
|
+
|
33
|
+
# Function to check if a variable is set (not empty)
|
34
|
+
function(check_variable_set VAR_NAME)
|
35
|
+
if(NOT ${VAR_NAME})
|
36
|
+
message(FATAL_ERROR "${VAR_NAME} is not set.")
|
37
|
+
endif()
|
38
|
+
endfunction()
|
39
|
+
|
40
|
+
# Function to check if a file/directory exists at the path specified by a variable
|
41
|
+
function(check_exists VAR_NAME TYPE)
|
42
|
+
if(NOT EXISTS "${${VAR_NAME}}")
|
43
|
+
if(TYPE STREQUAL "FILE")
|
44
|
+
message(FATAL_ERROR "The file specified in ${VAR_NAME} does not exist: ${${VAR_NAME}}")
|
45
|
+
elseif(TYPE STREQUAL "DIRECTORY")
|
46
|
+
message(FATAL_ERROR "The directory specified in ${VAR_NAME} does not exist: ${${VAR_NAME}}")
|
47
|
+
endif()
|
48
|
+
endif()
|
49
|
+
endfunction()
|
50
|
+
|
51
|
+
message(STATUS "BREW_PREFIX: ${BREW_PREFIX}")
|
52
|
+
check_variable_set(BREW_PREFIX)
|
53
|
+
check_exists(BREW_PREFIX DIRECTORY)
|
54
|
+
|
55
|
+
message(STATUS "OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}")
|
56
|
+
check_variable_set(OPENSSL_ROOT_DIR)
|
57
|
+
check_exists(OPENSSL_ROOT_DIR DIRECTORY)
|
58
|
+
|
59
|
+
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
|
60
|
+
check_variable_set(CMAKE_PREFIX_PATH)
|
61
|
+
check_exists(CMAKE_PREFIX_PATH DIRECTORY)
|
62
|
+
|
63
|
+
message(STATUS "BREW_BISON_PREFIX: ${BREW_BISON_PREFIX}")
|
64
|
+
check_variable_set(BREW_BISON_PREFIX)
|
65
|
+
check_exists(BREW_BISON_PREFIX DIRECTORY)
|
66
|
+
|
67
|
+
message(STATUS "BREW_FLEX_PREFIX: ${BREW_FLEX_PREFIX}")
|
68
|
+
check_variable_set(BREW_FLEX_PREFIX)
|
69
|
+
check_exists(BREW_FLEX_PREFIX DIRECTORY)
|
70
|
+
|
71
|
+
message(STATUS "FLEX_EXECUTABLE: ${FLEX_EXECUTABLE}")
|
72
|
+
check_variable_set(FLEX_EXECUTABLE)
|
73
|
+
check_exists(FLEX_EXECUTABLE FILE)
|
74
|
+
|
75
|
+
message(STATUS "BREW_BASH_PREFIX: ${BREW_BASH_PREFIX}")
|
76
|
+
check_variable_set(BREW_BASH_PREFIX)
|
77
|
+
check_exists(BREW_BASH_PREFIX DIRECTORY)
|
78
|
+
|
79
|
+
message(STATUS "GNU_BASH: ${GNU_BASH}")
|
80
|
+
check_variable_set(GNU_BASH)
|
81
|
+
check_exists(GNU_BASH FILE)
|
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.2
|
4
|
+
version: 0.7.2
|
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-07-
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- tools/cmake-scripts/setup-openssl.cmake
|
105
105
|
- tools/cmake-scripts/version.cmake
|
106
106
|
- tools/include/pro-statvfs.h
|
107
|
+
- tools/tests/cmake/CMakeLists.txt
|
107
108
|
- tools/tests/setup-libhowardhinnerdate/CMakeLists.txt
|
108
109
|
- tools/tests/setup-librachive/CMakeLists.txt
|
109
110
|
- tools/tests/setup-libutfcpp/CMakeLists.txt
|