]> saetta.ns0.it Git - msys2/commitdiff
libstrophe: nuovo pacchetto WIP.
authorAndrea Zagli <azagli@libero.it>
Thu, 7 May 2015 19:57:26 +0000 (21:57 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 21 Apr 2018 13:14:26 +0000 (15:14 +0200)
packages/mingw-w64-libstrophe/001-win.patch [new file with mode: 0644]
packages/mingw-w64-libstrophe/PKGBUILD [new file with mode: 0644]

diff --git a/packages/mingw-w64-libstrophe/001-win.patch b/packages/mingw-w64-libstrophe/001-win.patch
new file mode 100644 (file)
index 0000000..98aee3f
--- /dev/null
@@ -0,0 +1,57 @@
+--- ./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
diff --git a/packages/mingw-w64-libstrophe/PKGBUILD b/packages/mingw-w64-libstrophe/PKGBUILD
new file mode 100644 (file)
index 0000000..34a5418
--- /dev/null
@@ -0,0 +1,56 @@
+# 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"
+}