Skip to content

Commit 0490806

Browse files
committed
Revert directory name and version
1 parent 5882fea commit 0490806

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/scripts/build-macos-wxwidgets.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,34 @@
2222

2323
set -e
2424

25-
export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN)
25+
MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN)
26+
export MAKEFLAGS
2627

2728
if [ -z "$WXWIDGETS_VERSION" ]; then
2829
WXWIDGETS_VERSION=3.1.5
2930
fi
3031

3132
vsn=$WXWIDGETS_VERSION
33+
WXWIDGETS_BUILD_DIR=$(pwd)/wxWidgets
3234

33-
if [ -d "wxWidgets-build" ]; then
34-
echo "wxWidgets-build/ containing wxWidgets already exists; reusing it..."
35+
if [ -d "${WXWIDGETS_BUILD_DIR}" ]; then
36+
echo "${WXWIDGETS_BUILD_DIR}/ containing wxWidgets source already exists; reusing it..."
3537
else
36-
curl --fail -LO https://github.com/wxWidgets/wxWidgets/releases/download/v$vsn/wxWidgets-$vsn.tar.bz2
37-
tar -xf wxWidgets-$vsn.tar.bz2
38-
rm -rf wxWidgets-build && mv wxWidgets-$vsn/ wxWidgets-build
38+
curl --fail -LO https://github.com/wxWidgets/wxWidgets/releases/download/v"$vsn"/wxWidgets-"$vsn".tar.bz2
39+
tar -xf wxWidgets-"$vsn".tar.bz2
40+
rm -rf "${WXWIDGETS_BUILD_DIR}" && mv wxWidgets-"$vsn"/ "${WXWIDGETS_BUILD_DIR}"
3941

4042
# Replace #include <fp.h> in pngpriv.h to #include <math.h> for MacOS build.
4143
sed -i '' -E 's/^#[[:space:]]*include[[:space:]]*<fp\.h>/#include <math.h>/' "wxWidgets-build/src/png/pngpriv.h"
44+
4245
# Find and comment out #define fdopen NULL in zutil.h and let it use default MacOS impl
4346
sed -i '' -E 's/^([[:space:]]*#[[:space:]]*define[[:space:]]+fdopen.*)$//' "wxWidgets-build/src/zlib/zutil.h"
4447
fi
4548

46-
cd wxWidgets-build
49+
cd "${WXWIDGETS_BUILD_DIR}"
4750
./configure \
4851
--disable-shared \
49-
--prefix=$PWD/release \
52+
--prefix="$PWD"/release \
5053
--with-cocoa \
5154
--with-macosx-version-min=10.15 \
5255
--disable-sys-libs

0 commit comments

Comments
 (0)