[mingw] Reinstate win32 cross-compiling with autotools instructions
Was removed in favor of meson in 6058ede3ae
.
However, those fail to build for me.
This commit is contained in:
parent
881ad720fe
commit
e05e56061c
@ -42,6 +42,7 @@ EXTRA_DIST = \
|
||||
perf/texts/fa-thelittleprince.txt \
|
||||
meson-cc-tests/intel-atomic-primitives-test.c \
|
||||
meson-cc-tests/solaris-atomic-operations.c \
|
||||
mingw-configure.sh \
|
||||
$(NULL)
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
|
@ -4,17 +4,33 @@ implementation and that specially is important where OpenType specification
|
||||
is or wasn't that clear. For having access to Uniscribe on Linux/macOS these
|
||||
steps are recommended:
|
||||
|
||||
1. Install Wine from your favorite package manager. On Fedora that's `dnf install wine`.
|
||||
You want to follow the 32bit instructions. The 64bit equivalents are included
|
||||
for reference.
|
||||
|
||||
2. And `mingw-w64` compiler.
|
||||
With `brew` on macOS, you can have it like `brew install mingw-w64`.
|
||||
On Fedora, with `dnf install mingw32-gcc-c++`, or `dnf install mingw64-gcc-c++` for the
|
||||
64-bit Windows. Use `apt install g++-mingw-w64` on Debian.
|
||||
1. Install Wine.
|
||||
- Fedora: `dnf install wine`.
|
||||
|
||||
3. See how `.ci/build-win32.sh` uses meson or run that script anyway.
|
||||
2. Install `mingw-w64` compiler.
|
||||
- Fedora, 32bit: `dnf install mingw32-gcc-c++`
|
||||
- Fedora, 64bit: `dnf install mingw64-gcc-c++`
|
||||
- Debian: `apt install g++-mingw-w64`
|
||||
- Mac: `brew install mingw-w64`
|
||||
|
||||
Now you can use hb-shape by `(cd win32build/harfbuzz-win32 && wine hb-shape.exe)`
|
||||
but if you like to shape with the Microsoft Uniscribe,
|
||||
3. If you have drank the `meson` koolaid, look at `.ci/build-win32.sh` to see how to
|
||||
invoke `meson` now, or just run that script. Otherwise, here's how to use the
|
||||
old trusty autotools instead:
|
||||
|
||||
a) Install dependencies.
|
||||
- Fedora, 32bit: `dnf install mingw32-glib2 mingw32-cairo mingw32-freetype`
|
||||
- Fedora, 64bit: `dnf install mingw64-glib2 mingw64-cairo mingw64-freetype`
|
||||
|
||||
b) Configure:
|
||||
- `NOCONFIGURE=1 ./autogen.sh && mkdir winbuild && cd winbuild`
|
||||
- 32bit: `../mingw-configure.sh i686`
|
||||
- 64bit: `../mingw-configure.sh x86_64`
|
||||
|
||||
Now you can use `hb-shape` by `(cd win32build/util && wine hb-shape.exe)`
|
||||
but if you like to shape with the Microsoft Uniscribe:
|
||||
|
||||
4. Bring a 32bit version of `usp10.dll` for yourself from `C:\Windows\SysWOW64\usp10.dll` of your
|
||||
Windows installation (assuming you have a 64-bit installation, otherwise
|
||||
|
28
mingw-configure.sh
Executable file
28
mingw-configure.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $1 in
|
||||
i686 | x86_64) ;;
|
||||
*) echo "Usage: $0 i686|x86_64" >&2; exit 1 ;;
|
||||
esac
|
||||
|
||||
target=$1-w64-mingw32
|
||||
shift
|
||||
|
||||
exec "$(dirname "$0")"/configure \
|
||||
--build=`../config.guess` \
|
||||
--host=$target \
|
||||
--prefix=$HOME/.local/$target \
|
||||
CC= \
|
||||
CXX= \
|
||||
CPP= \
|
||||
LD= \
|
||||
CFLAGS="-static-libgcc" \
|
||||
CXXFLAGS="-static-libgcc -static-libstdc++" \
|
||||
CPPFLAGS="-I$HOME/.local/$target/include" \
|
||||
LDFLAGS=-L$HOME/.local/$target/lib \
|
||||
PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig:/usr/$target/sys-root/mingw/lib/pkgconfig/ \
|
||||
PKG_CONFIG_PATH=$HOME/.local/$target/share/pkgconfig:/usr/$target/sys-root/mingw/share/pkgconfig/ \
|
||||
PATH=$HOME/.local/$target/bin:/usr/$target/sys-root/mingw/bin:/usr/$target/bin:$PATH \
|
||||
--without-icu \
|
||||
--with-uniscribe \
|
||||
"$@"
|
Loading…
Reference in New Issue
Block a user