• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3set -e
4
5# just in case...
6unset CC
7unset CXX
8
9#PREFIX=i686-w64-mingw32
10PREFIX=x86_64-w64-mingw32
11
12#export PATH="/usr/$PREFIX/bin:$PATH"
13export INSTALLDIR="$PWD/$PREFIX"
14export PKG_CONFIG_PATH=$INSTALLDIR/lib/pkgconfig:/usr/$PREFIX/lib/pkgconfig
15export CPPFLAGS="-I$INSTALLDIR/include"
16export LDFLAGS="-L$INSTALLDIR/lib"
17
18# let mingw compiler be less verbose
19export CFLAGS="-O2 -Wall -Wno-format"
20
21# build libunistring
22if [ ! -d libunistring ]; then
23  git clone https://git.savannah.gnu.org/git/libunistring.git
24  cd libunistring
25else
26  cd libunistring
27  git pull
28fi
29./autogen.sh
30./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --prefix=$INSTALLDIR
31make clean
32make -j$(nproc)
33make install
34cd ..
35
36# build libidn2
37if [ ! -d libidn2 ]; then
38  git clone https://gitlab.com/libidn/libidn2.git
39  cd libidn2
40else
41  cd libidn2
42  git pull
43fi
44./bootstrap
45./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --disable-doc --disable-gcc-warnings --prefix=$INSTALLDIR
46make clean
47make -j$(nproc)
48make install
49cd ..
50
51# build libpsl
52export WINEPATH="$INSTALLDIR/bin;$INSTALLDIR/lib;/usr/$PREFIX/bin;/usr/$PREFIX/lib;$PWD/libpsl/.libs;$GCCLIB"
53./autogen.sh
54./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --disable-gtk-doc --enable-runtime=libidn2 --enable-builtin=libidn2 --prefix=$INSTALLDIR
55make clean
56make -j$(nproc)
57make check -j$(nproc) LOG_COMPILER=wine
58