Skip to content

Commit

Permalink
Update to Crystal 1.8 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke authored Apr 19, 2023
1 parent 61849b8 commit fca904f
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
run: brew update && brew install crystal meson openssl@3

- name: Install dependencies
run: shards install
Expand All @@ -41,7 +41,7 @@ jobs:

- name: Install crystal and tool dependencies
run: |
sudo apt install -y crystal libevent-dev libpcre3-dev libssl-dev ninja-build
sudo apt install -y crystal libevent-dev libpcre2-dev libssl-dev ninja-build
sudo apt purge meson
sudo pip3 install meson
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
run: brew update && brew install crystal meson openssl@3

- name: Install dependencies
run: shards install
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:

- name: Install crystal and tool dependencies
run: |
sudo apt install -y crystal libevent-dev libpcre3-dev libssl-dev \
sudo apt install -y crystal libevent-dev libpcre2-dev libssl-dev \
curl ninja-build \
ruby ruby-bundler
sudo apt purge meson
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/checkout@v3

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
run: brew update && brew install crystal meson openssl@3

- name: Install gon via homebrew for code signing and app notarization
run: |
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
uses: actions/checkout@v3

- name: Install crystal and tool dependencies
run: brew install crystal meson openssl@3
run: brew update && brew install crystal meson openssl@3

- name: Install gon via homebrew for code signing and app notarization
run: |
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crystal 1.7.2
crystal 1.8.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Please refer to the [documentation site](https://mstrap.dev) for documentation
## Development

1. Install dependencies
* macOS: `brew install crystal meson libevent pcre openssl`
* macOS: `brew install crystal meson libevent pcre2 openssl`
* Debian/Ubuntu:
1. [Install Crystal](https://crystal-lang.org/install/)
2. `sudo apt install libevent-dev libpcre3-dev libssl-dev patchelf`
2. `sudo apt install meson libevent-dev libpcre2-dev libssl-dev patchelf`
2. `git clone [email protected]:maxfierke/mstrap.git`
3. `make`
4. `bin/mstrap` will be created
Expand Down
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if target_system == 'linux'
add_global_link_arguments('-static', language : 'c')
endif
elif target_system == 'darwin'
macos_abi = meson.get_external_property('macos_version', '11')
macos_abi = meson.get_external_property('macos_version', '12')
macos_arch = target_arch == 'aarch64' ? 'arm64' : target_arch

target_triple = macos_arch + '-apple-macos' + macos_abi
Expand All @@ -43,7 +43,7 @@ shards = find_program(get_option('shards'), required : true)
# Basics
libiconv_dep = dependency('iconv', static : is_static and not is_darwin)
libm_dep = cc.find_library('m', required : false, static : is_static)
libpcre_dep = dependency('libpcre', static : is_static)
libpcre2_dep = dependency('libpcre2-8', static : is_static)
thread_dep = dependency('threads', static : is_static)
zlib_dep = dependency('zlib', static : is_static and not is_darwin)

Expand Down Expand Up @@ -178,7 +178,7 @@ executable(
libgc_dep,
libiconv_dep,
libm_dep,
libpcre_dep,
libpcre2_dep,
libssl_dep,
zlib_dep,
thread_dep
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ development_dependencies:

libraries:
libevent: "*"
libpcre: "*"
libpcre2: "*"
openssl: "*"

targets:
Expand Down
17 changes: 9 additions & 8 deletions subprojects/openssl.wrap
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[wrap-file]
directory = openssl-3.0.7
source_url = https://www.openssl.org/source/openssl-3.0.7.tar.gz
source_filename = openssl-3.0.72.tar.gz
source_hash = 83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e
patch_filename = openssl_3.0.7-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.7-1/get_patch
patch_hash = 8f04d911dc22d1dddc6a192ab27d6d8275976a252bd9c73e09f95f1f927e42b5
wrapdb_version = 3.0.7-1
directory = openssl-3.0.8
source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz
source_filename = openssl-3.0.8.tar.gz
source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e
patch_filename = openssl_3.0.8-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-1/get_patch
patch_hash = 12d9c884174a91ccd1aa9230e9567c019f8a582ce46c98736f99a5200b4f2514
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-1/openssl-3.0.8.tar.gz
wrapdb_version = 3.0.8-1

[provide]
libcrypto = libcrypto_dep
Expand Down
12 changes: 0 additions & 12 deletions subprojects/pcre.wrap

This file was deleted.

16 changes: 16 additions & 0 deletions subprojects/pcre2.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[wrap-file]
directory = pcre2-10.42
source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2
source_filename = pcre2-10.42.tar.bz2
source_hash = 8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840
patch_filename = pcre2_10.42-5_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.42-5/get_patch
patch_hash = 7ba1730a3786c46f41735658a9884b09bc592af3840716e0ccc552e7ddf5630c
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.42-5/pcre2-10.42.tar.bz2
wrapdb_version = 10.42-5

[provide]
libpcre2-8 = libpcre2_8
libpcre2-16 = libpcre2_16
libpcre2-32 = libpcre2_32
libpcre2-posix = libpcre2_posix
9 changes: 5 additions & 4 deletions subprojects/zlib.wrap
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[wrap-file]
directory = zlib-1.2.13
source_url = http://zlib.net/fossils/zlib-1.2.13.tar.gz
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.2.13-3/zlib-1.2.13.tar.gz
source_filename = zlib-1.2.13.tar.gz
source_hash = b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30
patch_filename = zlib_1.2.13-2_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-2/get_patch
patch_hash = a7abea3ad65dc2c291ad5fbbf5355d0585a7f7b8c935d4a74335b8fe18684506
wrapdb_version = 1.2.13-2
patch_filename = zlib_1.2.13-3_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.13-3/get_patch
patch_hash = 49d1afd719a8e4e52cf1dd1f6ca94bcd085b96eac55d1ccf6f336a8280c02bd3
wrapdb_version = 1.2.13-3

[provide]
zlib = zlib_dep

0 comments on commit fca904f

Please sign in to comment.