Skip to content

Commit e6a73eb

Browse files
committed
releases: build gumbo with meson
closes #43
1 parent d1534c0 commit e6a73eb

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

.github/actions/build-hext-node-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
run: >
2020
sudo apt-get update > /dev/null
2121
&& sudo apt-get upgrade -y > /dev/null
22-
&& sudo apt-get install -y git curl libtool automake libicu-dev googletest libgtest-dev rapidjson-dev
22+
&& sudo apt-get install -y git curl meson libicu-dev googletest libgtest-dev rapidjson-dev
2323
2424
- name: Install gumbo
2525
shell: bash

.github/actions/build-hext-node-python-macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616

1717
- name: Install build dependencies
1818
shell: bash
19-
run: brew install rapidjson googletest autoconf automake libtool swig
19+
run: brew install rapidjson googletest meson swig
2020

2121
- name: Install gumbo
2222
shell: bash

.github/actions/build-hext-python-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
run: >
2020
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
2121
&& dnf install -y https://dl.fedoraproject.org/pub/epel/10/Everything/${{ env.HEXT_ARCH }}/Packages/r/rapidjson-devel-1.1.0-42.el10_0.${{ env.HEXT_ARCH }}.rpm
22-
&& yum install -y swig gtest-devel
22+
&& yum install -y swig gtest-devel meson
2323
2424
- name: Install gumbo
2525
shell: bash

scripts/github-actions/linux/install-gumbo.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set -x
55

66
perror_exit() { echo "$1" >&2 ; exit 1 ; }
77

8-
THREADS=2
9-
108
deps=(
119
"HEXT_GUMBO_VERSION"
1210
"HEXT_GUMBO_SHA256"
@@ -16,6 +14,8 @@ for dep in "${deps[@]}" ; do
1614
[[ -z "${!dep}" ]] && perror_exit "missing env var '$dep'"
1715
done
1816

17+
hash meson || perror_exit "missing dependency 'meson'"
18+
1919
[[ -f "$HEXT_GUMBO_INSTALL_PATH/include/gumbo.h" ]] \
2020
&& perror_exit "gumbo is already installed in $HEXT_GUMBO_INSTALL_PATH"
2121

@@ -45,8 +45,7 @@ hash gcc-14 && export CC=gcc-14 CXX=g++-14
4545
hash gcc-15 && export CC=gcc-15 CXX=g++-15
4646
$CXX --version
4747

48-
./autogen.sh
49-
CFLAGS="-fPIC" ./configure --enable-shared=no --prefix="$HEXT_GUMBO_INSTALL_PATH"
50-
make -j$THREADS
51-
make install
52-
48+
meson_dir=$(mktemp -d)
49+
meson setup "$meson_dir" -Dtests=false -Dc_args=-fPIC --prefix="$HEXT_GUMBO_INSTALL_PATH" -Ddefault_library=static
50+
meson compile -C "$meson_dir"
51+
meson install -C "$meson_dir"

scripts/github-actions/macos/install-gumbo.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set -x
55

66
perror_exit() { echo "$1" >&2 ; exit 1 ; }
77

8-
THREADS=2
9-
108
deps=(
119
"HEXT_GUMBO_VERSION"
1210
"HEXT_GUMBO_SHA256"
@@ -17,6 +15,8 @@ for dep in "${deps[@]}" ; do
1715
[[ -z "${!dep}" ]] && perror_exit "missing env var '$dep'"
1816
done
1917

18+
hash meson || perror_exit "missing dependency 'meson'"
19+
2020
[[ -f "$HEXT_GUMBO_INSTALL_PATH/include/gumbo.h" ]] \
2121
&& perror_exit "gumbo is already installed in $HEXT_GUMBO_INSTALL_PATH"
2222

@@ -32,10 +32,10 @@ shasum -a 256 -c <(echo "$HEXT_GUMBO_SHA256 gumbo.tar.gz")
3232
tar zxf gumbo.tar.gz
3333
cd */
3434

35-
./autogen.sh
36-
CFLAGS="-fPIC" ./configure --enable-shared=no --prefix="$HEXT_GUMBO_INSTALL_PATH"
37-
make -j$THREADS
38-
make install
35+
meson_dir=$(mktemp -d)
36+
meson setup "$meson_dir" -Dtests=false -Dc_args=-fPIC --prefix="$HEXT_GUMBO_INSTALL_PATH" -Ddefault_library=static
37+
meson compile -C "$meson_dir"
38+
meson install -C "$meson_dir"
3939

4040
ls -lah "$HEXT_GUMBO_INSTALL_PATH"
4141

0 commit comments

Comments
 (0)