forked from Jeffery186/wget2-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
105 lines (95 loc) · 3.1 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apt-get update && apt-get install --no-install-recommends -y \
git \
autoconf \
autoconf-archive \
autopoint \
automake \
autogen \
libtool \
make \
python \
wine \
wine-development \
flex \
bison \
gettext \
gperf \
mingw-w64 \
pkg-config-mingw-w64-x86-64 \
ca-certificates \
wget \
patch \
texinfo \
gengetopt \
curl \
lzip \
pandoc \
rsync \
ccache \
libhttp-daemon-perl \
libio-socket-ssl-perl \
python3 \
binfmt-support
set PREFIX="x86_64-w64-mingw32"
set INSTALLDIR="/usr/local/$PREFIX"
set PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:/usr/$PREFIX/lib/pkgconfig" \
PKG_CONFIG_LIBDIR="$INSTALLDIR/lib/pkgconfig" \
PKG_CONFIG="/usr/bin/${PREFIX}-pkg-config" \
CPPFLAGS="-I$INSTALLDIR/include" \
LDFLAGS="-L$INSTALLDIR/lib" \
CFLAGS="-O2 -Wall -Wno-format" \
WINEPATH="$INSTALLDIR/bin;$INSTALLDIR/lib;/usr/$PREFIX/bin;/usr/$PREFIX/lib"
git clone --recursive https://gitlab.com/gnuwget/gnulib-mirror.git gnulib
# GNULIB_SRCDIR /usr/local/gnulib
# GNULIB_TOOL /usr/local/gnulib/gnulib-tool
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz && tar xf libiconv-1.15.tar.gz
cd libiconv-1.15 && \
./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --prefix=$INSTALLDIR && \
make -j$(nproc) && make install
cd ..
git clone https://git.savannah.gnu.org/git/libunistring.git
cd libunistring && \
./autogen.sh && \
./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --prefix=$INSTALLDIR && \
make -j$(nproc) && make install
cd ..
git clone https://gitlab.com/libidn/libidn2.git
cd libidn2 && \
./bootstrap && \
./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-shared --disable-doc --disable-gcc-warnings --prefix=$INSTALLDIR && \
make -j$(nproc) && make install
cd ..
git clone https://git.lysator.liu.se/nettle/nettle.git
cd nettle && \
bash .bootstrap && \
./configure --build=x86_64-pc-linux-gnu --host=$PREFIX --enable-mini-gmp --enable-shared --disable-documentation --prefix=$INSTALLDIR && \
make -j$(nproc) && make install
cd ..
git clone --depth=1 https://gitlab.com/gnutls/gnutls.git
cd gnutls && \
SKIP_PO=1 ./bootstrap && \
./configure --build=x86_64-pc-linux-gnu --host=$PREFIX \
--with-nettle-mini --enable-gcc-warnings --enable-shared --disable-static --with-included-libtasn1 \
--with-included-unistring --without-p11-kit --disable-doc --disable-tests --disable-tools --disable-cxx \
--disable-maintainer-mode --disable-libdane --prefix=$INSTALLDIR --disable-hardware-acceleration \
--disable-full-test-suite && \
make -j$(nproc) && make install
cd ..
git clone --depth=1 https://github.com/dlfcn-win32/dlfcn-win32.git
cd dlfcn-win32 && \
./configure --prefix=$PREFIX --cc=$PREFIX-gcc && \
make && \
cp -p libdl.a $INSTALLDIR/lib/ && \
cp -p src/dlfcn.h $INSTALLDIR/include/
cd ..
git clone --recursive https://gnunet.org/git/libmicrohttpd.git
cd libmicrohttpd && git checkout `git tag|tail -1` && \
./bootstrap && \
./configure --build=x86_64-pc-linux-gnu \
--host=$PREFIX \
--prefix=$INSTALLDIR \
--disable-doc \
--disable-examples \
--enable-shared && \
make -j$(nproc) && make install
cd ..