#libplist
git clone https://github.com/libimobiledevice/libplist.git
cd libplist
sed -ie 's/typedef volatile struct {/#elif 0/g' src/plist.c #dirty hack to make other projects, depending on this, work
./autogen.sh --host=x86_64-w64-mingw32.static -without-cython --enable-static --disable-shared  --prefix=/opt/mxe
make install
cd ..

#libusbmuxd
git clone https://github.com/libimobiledevice/libusbmuxd.git
cd libusbmuxd
sed -i '/AC_FUNC_MALLOC/d' configure.ac 
sed -i '/AC_FUNC_REALLOC/d' configure.ac 
./autogen.sh --host=x86_64-w64-mingw32.static --enable-static --disable-shared  --prefix=/opt/mxe
make install
cd ..

#libimobiledevice
git clone https://github.com/libimobiledevice/libimobiledevice.git
cd libimobiledevice
./autogen.sh --host=x86_64-w64-mingw32.static -without-cython --enable-static --disable-shared  --prefix=/opt/mxe
make install
cd ..

#libpartialzip
git clone https://github.com/tihmstar/libfragmentzip.git
cd libfragmentzip
./autogen.sh --host=x86_64-w64-mingw32.static --enable-static --disable-shared  --prefix=/opt/mxe
make install
cd ..

#libirecovery
git clone https://github.com/tihmstar/libirecovery.git
cd libirecovery
sed -i '/AC_FUNC_MALLOC/d' configure.ac
./autogen.sh --host=x86_64-w64-mingw32.static --prefix=/opt/mxe
make install
cd ..

#tsscheker
git clone https://github.com/tihmstar/tsschecker.git
cd tsschecker
sed -i '/AC_FUNC_MALLOC/d' configure.ac
sed -i '/AC_FUNC_REALLOC/d' configure.ac
./autogen.sh --host=x86_64-w64-mingw32.static --prefix=/opt/mxe
make install
cp tsschecker/tsschecker.exe .
