--- /dev/null
+--- ./configure.ac.orig 2014-10-31 03:13:49.000000000 +0100
++++ ./configure.ac 2015-05-07 21:28:55.538589100 +0200
+@@ -76,15 +76,6 @@
+ AC_MSG_NOTICE([libstrophe will use the $with_parser XML parser])
+ AC_SEARCH_LIBS([socket], [socket])
+
+-if test "x$PLATFORM" != xfreebsd; then
+- AC_CHECK_LIB([resolv], [res_query], [],
+- [AC_CHECK_LIB([resolv], [__res_query], [],
+- [AC_MSG_ERROR([libresolv not found; libresolv required.])])])
+- PC_LIBS+=(-lresolv)
+-else
+- AC_MSG_NOTICE([skipping libresolv checks for freebsd])
+-fi
+-
+ AC_CHECK_HEADERS([arpa/nameser_compat.h])
+
+
+--- ./Makefile.am.orig 2014-10-31 03:13:49.000000000 +0100
++++ ./Makefile.am 2015-05-07 21:33:13.525516700 +0200
+@@ -15,7 +15,7 @@
+ lib_LTLIBRARIES = libstrophe.la
+
+ libstrophe_la_CFLAGS = $(STROPHE_FLAGS) $(PARSER_CFLAGS)
+-libstrophe_la_LDFLAGS = $(SSL_LIBS) $(PARSER_LIBS)
++libstrophe_la_LDFLAGS = $(SSL_LIBS) $(PARSER_LIBS) -lwsock32 -lws2_32 -lwinmm -no-undefined
+ # Export only public API
+ libstrophe_la_LDFLAGS += -export-symbols-regex '^xmpp_'
+ libstrophe_la_SOURCES = src/auth.c src/conn.c src/ctx.c \
+@@ -44,16 +44,16 @@
+ noinst_PROGRAMS = examples/active examples/roster examples/basic examples/bot
+ examples_active_SOURCES = examples/active.c
+ examples_active_CFLAGS = $(STROPHE_FLAGS)
+-examples_active_LDADD = $(STROPHE_LIBS)
++examples_active_LDADD = $(STROPHE_LIBS) -lwsock32 -lws2_32 -lwinmm
+ examples_roster_SOURCES = examples/roster.c
+ examples_roster_CFLAGS = $(STROPHE_FLAGS)
+-examples_roster_LDADD = $(STROPHE_LIBS)
++examples_roster_LDADD = $(STROPHE_LIBS) -lwsock32 -lws2_32 -lwinmm
+ examples_basic_SOURCES = examples/basic.c
+ examples_basic_CFLAGS = $(STROPHE_FLAGS)
+-examples_basic_LDADD = $(STROPHE_LIBS)
++examples_basic_LDADD = $(STROPHE_LIBS) -lwsock32 -lws2_32 -lwinmm
+ examples_bot_SOURCES = examples/bot.c
+ examples_bot_CFLAGS = $(STROPHE_FLAGS)
+-examples_bot_LDADD = $(STROPHE_LIBS)
++examples_bot_LDADD = $(STROPHE_LIBS) -lwsock32 -lws2_32 -lwinmm
+
+
+ ## Tests
+@@ -62,5 +62,5 @@
+ tests_check_parser_SOURCES = tests/check_parser.c tests/test.h
+ tests_check_parser_CFLAGS = @check_CFLAGS@ $(PARSER_CFLAGS) $(STROPHE_FLAGS) \
+ -I$(top_srcdir)/src
+-tests_check_parser_LDADD = @check_LIBS@ $(STROPHE_LIBS)
++tests_check_parser_LDADD = @check_LIBS@ $(STROPHE_LIBS) -lwsock32 -lws2_32 -lwinmm
+ tests_check_parser_LDFLAGS = -static
--- /dev/null
+# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
+
+_realname=libstrophe
+pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
+pkgver=0.8.7
+pkgrel=1
+arch=('any')
+pkgdesc="A simple, lightweight C library for writing XMPP clients (mingw-w64)"
+depends=("${MINGW_PACKAGE_PREFIX}-openssl"
+ "${MINGW_PACKAGE_PREFIX}-libxml2")
+makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
+ "doxygen")
+options=('strip' 'staticlibs')
+license=("GPL 3")
+url="http://strophe.im/libstrophe"
+source=(https://github.com/strophe/${_realname}/archive/${pkgver}.tar.gz
+ 001-win.patch)
+sha256sums=('368cd986378712f46838eda24d8d756934259fc8831e55cdd02ad68d53c21e5f'
+ '865836ecc1e500b8d0bc1f128209aa0cd54ecd33db2c13c1db6c74695471b9e4')
+noextract=(${pkgver}.tar.gz)
+
+prepare() {
+ tar --exclude=README -zxf ${pkgver}.tar.gz
+
+ cd "${srcdir}"/${_realname}-${pkgver}
+
+ patch -b -V simple -p1 -i ${srcdir}/001-win.patch
+
+ autoreconf -fiv
+
+ doxygen
+}
+
+build() {
+ mkdir -p build-${MINGW_CHOST}
+ cd build-${MINGW_CHOST}
+
+ ../${_realname}-${pkgver}/configure \
+ --host=${MINGW_CHOST} \
+ --target=${MINGW_CHOST} \
+ --build=${MINGW_CHOST} \
+ --prefix=${MINGW_PREFIX} \
+ --libexecdir=${MINGW_PREFIX}/lib \
+ --with-libxml2
+ make
+}
+
+package() {
+ cd "$srcdir/build-${MINGW_CHOST}"
+ make DESTDIR=$pkgdir install
+
+ mkdir -p ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/html
+ cp -rf ../${_realname}-${pkgver}/docs/html/* ${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/html
+
+ install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING"
+}