summaryrefslogtreecommitdiff
path: root/community/libnatpmp
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-04-14 03:52:55 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-04-14 03:52:55 +0000
commit7c266ff5a9e1f533fd8bd8c2fbbcc05df350dcd3 (patch)
treea65448ff1236d65a3fea9015e7cd01e6483eb282 /community/libnatpmp
parent3d6877ee9ee7bba813a4b6be30a11d2b1942c656 (diff)
Mon Apr 14 03:47:31 UTC 2014
Diffstat (limited to 'community/libnatpmp')
-rw-r--r--community/libnatpmp/PKGBUILD15
-rw-r--r--community/libnatpmp/fix_header_issue.diff59
2 files changed, 69 insertions, 5 deletions
diff --git a/community/libnatpmp/PKGBUILD b/community/libnatpmp/PKGBUILD
index 89e5e3967..a3790c157 100644
--- a/community/libnatpmp/PKGBUILD
+++ b/community/libnatpmp/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 109133 2014-04-10 15:59:00Z anatolik $
+# $Id: PKGBUILD 109301 2014-04-12 23:46:12Z anatolik $
# Maintainer: Anatol Pomozov <anatol dot pomozov at gmail>
# Contributor: Gustavo Alvarez <s1pkn07@gmail.com>
# Contributor: Kristjan Reinloo <mail at kreinloo dot net>
@@ -6,17 +6,22 @@
pkgname=libnatpmp
pkgver=20140401
-pkgrel=1
+pkgrel=2
pkgdesc='A portable and fully compliant implementation of the NAT-PMP protocol'
arch=(i686 x86_64)
url='http://miniupnp.free.fr/libnatpmp.html'
license=(BSD)
depends=(glibc)
-source=(http://miniupnp.tuxfamily.org/files/libnatpmp-$pkgver.tar.gz)
-sha1sums=('e9511edecb9a75dbe8c9ed39c0469a18dc7e950b')
+source=(http://miniupnp.tuxfamily.org/files/libnatpmp-$pkgver.tar.gz
+ fix_header_issue.diff)
+sha1sums=('e9511edecb9a75dbe8c9ed39c0469a18dc7e950b'
+ '58baa3fe61edfc117ae92452fbc8176d095bd7d2')
prepare() {
- sed -e 's/CFLAGS = /CFLAGS += /' -i $pkgname-$pkgver/Makefile
+ cd $pkgname-$pkgver
+ sed -e 's/CFLAGS = /CFLAGS += /' -i Makefile
+ # The patch comes from upstream https://github.com/miniupnp/libnatpmp/commit/f376ab72bc4de0b45f4e10c9b287b7ffe2a1fcd1
+ patch -p1 < "$srcdir"/fix_header_issue.diff
}
build() {
diff --git a/community/libnatpmp/fix_header_issue.diff b/community/libnatpmp/fix_header_issue.diff
new file mode 100644
index 000000000..2e52886b0
--- /dev/null
+++ b/community/libnatpmp/fix_header_issue.diff
@@ -0,0 +1,59 @@
+commit f376ab72bc4de0b45f4e10c9b287b7ffe2a1fcd1
+Author: Thomas Bernard <miniupnp@free.fr>
+Date: Thu Apr 10 23:09:44 2014 +0200
+
+ remove declspec.h problems. still has to be fixed definitely
+
+diff --git a/getgateway.h b/getgateway.h
+index d868f80..b3e17c6 100644
+--- a/getgateway.h
++++ b/getgateway.h
+@@ -1,6 +1,6 @@
+ /* $Id: getgateway.h,v 1.7 2013/09/10 20:09:04 nanard Exp $ */
+ /* libnatpmp
+-Copyright (c) 2007-2013, Thomas BERNARD
++Copyright (c) 2007-2014, Thomas BERNARD
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+@@ -38,12 +38,12 @@ typedef unsigned short uint16_t;
+ #endif
+ #define in_addr_t uint32_t
+ #endif
+-#include "declspec.h"
++/* #include "declspec.h" */
+
+ /* getdefaultgateway() :
+ * return value :
+ * 0 : success
+ * -1 : failure */
+-LIBSPEC int getdefaultgateway(in_addr_t * addr);
++/* LIBSPEC */int getdefaultgateway(in_addr_t * addr);
+
+ #endif
+diff --git a/natpmp.h b/natpmp.h
+index 62d113f..2399afb 100644
+--- a/natpmp.h
++++ b/natpmp.h
+@@ -1,6 +1,6 @@
+ /* $Id: natpmp.h,v 1.19 2014/04/01 09:39:29 nanard Exp $ */
+ /* libnatpmp
+-Copyright (c) 2007-2013, Thomas BERNARD
++Copyright (c) 2007-2014, Thomas BERNARD
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+@@ -48,10 +48,12 @@ typedef unsigned short uint16_t;
+ #define in_addr_t uint32_t
+ #include "declspec.h"
+ #else /* WIN32 */
++#define LIBSPEC
+ #include <netinet/in.h>
+ #endif /* WIN32 */
+
+-#include "declspec.h"
++/* causes problem when installing. Maybe should it be inlined ? */
++/* #include "declspec.h" */
+
+ typedef struct {
+ int s; /* socket */