uhttpmock: new package.

This commit is contained in:
Andrea Zagli
2014-08-10 18:43:03 +02:00
parent 43fa565b8c
commit 451f3fe91b
2 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
_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
}

View File

@@ -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 <glib/gi18n.h>
#include <libsoup/soup.h>
#include <string.h>
+#ifdef G_OS_WIN32
+#include <winsock2.h>
+#else
#include <arpa/inet.h>
+#endif
#include <sys/types.h>
+#ifndef G_OS_WIN32
#include <netinet/in.h>
#include <sys/socket.h>
+#endif
#include "uhm-default-tls-certificate.h"
#include "uhm-resolver.h"