From 451f3fe91b930fbb36464d06e18b2762f207fe2d Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 10 Aug 2014 18:43:03 +0200 Subject: [PATCH] uhttpmock: new package. --- mingw-w64-uhttpmock/PKGBUILD | 49 +++++++++++++++++++++++++++++++++ mingw-w64-uhttpmock/wsock.patch | 19 +++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 mingw-w64-uhttpmock/PKGBUILD create mode 100644 mingw-w64-uhttpmock/wsock.patch diff --git a/mingw-w64-uhttpmock/PKGBUILD b/mingw-w64-uhttpmock/PKGBUILD new file mode 100644 index 0000000000..5434d4193b --- /dev/null +++ b/mingw-w64-uhttpmock/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Andrea Zagli + +_realname=uhttpmock +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=0.3.0 +pkgrel=1 +arch=('any') +pkgdesc="uhttpmock is a HTTP web service mocking project for projects which use libsoup (mingw-w64)" +depends=("${MINGW_PACKAGE_PREFIX}-glib2" + "${MINGW_PACKAGE_PREFIX}-libsoup") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "pkg-config" + "make" + "libtool" + "automake-wrapper" + "autoconf" + "patch") +options=('strip' 'staticlibs') +license=("LGPL 2.1") +url="http://tecnocode.co.uk/" +source=(http://tecnocode.co.uk/downloads/${_realname}/${_realname}-$pkgver.tar.xz + wsock.patch) +sha256sums=('d33cdf6c6852975162a9d758870edea17449db5ca9dc0e4e0a5831a47fbe8bfe' + '255c33830186382f1a2cf442ebf2ab8a797875fd11220eaf8cf82401b3955a23') + +prepare() { + cd ${_realname}-${pkgver} + patch -p1 -i ${srcdir}/wsock.patch + + autoreconf -fi +} + +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 + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install +} diff --git a/mingw-w64-uhttpmock/wsock.patch b/mingw-w64-uhttpmock/wsock.patch new file mode 100644 index 0000000000..e6f7317fda --- /dev/null +++ b/mingw-w64-uhttpmock/wsock.patch @@ -0,0 +1,19 @@ +--- uhttpmock-0.3.0-orig/libuhttpmock/uhm-server.c 2014-06-18 01:03:41.000000000 +0200 ++++ uhttpmock-0.3.0/libuhttpmock/uhm-server.c 2014-08-10 15:29:26.737015000 +0200 +@@ -49,10 +49,16 @@ + #include + #include + #include ++#ifdef G_OS_WIN32 ++#include ++#else + #include ++#endif + #include ++#ifndef G_OS_WIN32 + #include + #include ++#endif + + #include "uhm-default-tls-certificate.h" + #include "uhm-resolver.h"