aboutsummaryrefslogtreecommitdiffstats
path: root/community/openpgm
diff options
context:
space:
mode:
Diffstat (limited to 'community/openpgm')
-rw-r--r--community/openpgm/APKBUILD43
-rw-r--r--community/openpgm/libpgm-fix-pkgconfig.patch21
-rw-r--r--community/openpgm/openpgm-fix-includes.patch30
-rw-r--r--community/openpgm/python3.patch28
4 files changed, 122 insertions, 0 deletions
diff --git a/community/openpgm/APKBUILD b/community/openpgm/APKBUILD
new file mode 100644
index 0000000000..e75f66485f
--- /dev/null
+++ b/community/openpgm/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Timo Teräs <timo.teras@iki.fi>
+# Maintainer: Timo Teräs <timo.teras@iki.fi>
+pkgname=openpgm
+pkgver=5.2.122
+pkgrel=3
+pkgdesc="An implementation of the PGM reliable multicast protocol"
+url="https://www.freshports.org/net/openpgm/"
+arch="all"
+license="LGPL-2.1-or-later"
+makedepends="python3 perl"
+subpackages="$pkgname-dev"
+source="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/openpgm/libpgm-$pkgver.tar.bz2
+ openpgm-fix-includes.patch
+ python3.patch
+ libpgm-fix-pkgconfig.patch
+ "
+
+builddir="$srcdir"/libpgm-$pkgver/openpgm/pgm/
+prepare() {
+ default_prepare
+ update_config_sub
+}
+
+build() {
+ CFLAGS="$CFLAGS -D_GNU_SOURCE" \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-shared \
+ --disable-static \
+ PYTHON=python3
+ make
+}
+
+package() {
+ make install DESTDIR="$pkgdir"
+}
+
+sha512sums="dddd5c30f7ae9a6a2ca9738010d4e6a1b856f3d7e1636bb43ef697a0b07ad6f058978d6f21cc3f6efe0c21b48d71d496d1e914bd05e33ed6cfbda8b96821fa2f libpgm-5.2.122.tar.bz2
+6689ccafa00a9d436fb6074b6454df4443daa2e62db47c64a962dfb105ce2d0f85c79059aa27ac9834572cd30112e7f0407e24dfd995285fa7ac921d70214229 openpgm-fix-includes.patch
+51378950af33062339b49019a9fe78a07ff60bda0ed08905cc6bd4a5a4b3ff2347e10a11c50355e7f03422325f2834e054db1e44afa5c3b02c54a7a9963a04b8 python3.patch
+c49e1fec9b96e7b9228bf46671f74138d19bf938282bda20dd7be3f27ff49103ed5ec033b09f11b259740781e1652023d7286066e206495a173bed87f5b948dd libpgm-fix-pkgconfig.patch"
diff --git a/community/openpgm/libpgm-fix-pkgconfig.patch b/community/openpgm/libpgm-fix-pkgconfig.patch
new file mode 100644
index 0000000000..64272f44e1
--- /dev/null
+++ b/community/openpgm/libpgm-fix-pkgconfig.patch
@@ -0,0 +1,21 @@
+From ee25ff3d13f2639b4c3a42125e79f77f921c3320 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <bluca@debian.org>
+Date: Wed, 23 Jan 2019 10:37:37 +0000
+Subject: [PATCH] pkg-config: do not add -I to non-existing directory
+
+foo/lib/pgm-5.2/include does not exist, so applications using strict
+compiler flags will fail to build due to this -I flag
+---
+ openpgm/pgm/openpgm-5.2.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/openpgm/pgm/openpgm-5.2.pc.in b/openpgm/pgm/openpgm-5.2.pc.in
+index 1e56d944..9e30a6da 100644
+--- a/openpgm-5.2.pc.in
++++ b/openpgm-5.2.pc.in
+@@ -9,4 +9,4 @@ Version: @PACKAGE_VERSION@
+ # packagers may wish to move @LIBS@ to Libs.private for platforms with
+ # versions of pkg-config that support static linking.
+ Libs: -L${libdir} -lpgm @LIBS@
+-Cflags: -I${includedir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@ -I${libdir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@/include
++Cflags: -I${includedir}/pgm-@VERSION_MAJOR@.@VERSION_MINOR@
diff --git a/community/openpgm/openpgm-fix-includes.patch b/community/openpgm/openpgm-fix-includes.patch
new file mode 100644
index 0000000000..6f1e5901fc
--- /dev/null
+++ b/community/openpgm/openpgm-fix-includes.patch
@@ -0,0 +1,30 @@
+--- ./include/pgm/types.h
++++ ./include/pgm/types.h
+@@ -27,6 +27,7 @@
+
+ #ifndef _MSC_VER
+ # include <sys/param.h>
++# include <sys/types.h>
+ #endif
+ #include <pgm/macros.h>
+
+--- ./include/impl/security.h
++++ ./include/impl/security.h
+@@ -33,7 +33,6 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <sys/types.h>
+-#include <sys/timeb.h>
+ #include <impl/i18n.h>
+ #include <impl/errno.h>
+ #include <impl/string.h>
+@@ -41,6 +40,8 @@
+ PGM_BEGIN_DECLS
+
+ #ifdef HAVE_FTIME
++#include <sys/timeb.h>
++
+ static inline
+ errno_t
+ # if !defined( _WIN32 )
+
diff --git a/community/openpgm/python3.patch b/community/openpgm/python3.patch
new file mode 100644
index 0000000000..f1ae79772c
--- /dev/null
+++ b/community/openpgm/python3.patch
@@ -0,0 +1,28 @@
+diff --git a/version_generator.py b/version_generator.py
+index b2f8f9a..0143d67 100755
+--- a/version_generator.py
++++ b/version_generator.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+
+ import os
+ import platform
+@@ -8,7 +8,7 @@ build_date = time.strftime ("%Y-%m-%d")
+ build_time = time.strftime ("%H:%M:%S")
+ build_rev = filter (str.isdigit, "$Revision: 1487 $")
+
+-print """
++print("""
+ /* vim:ts=8:sts=8:sw=4:noai:noexpandtab
+ *
+ * OpenPGM version.
+@@ -50,6 +50,6 @@ const char* pgm_build_revision = "%s";
+
+
+ /* eof */
+-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev)
++"""%(build_date, build_time, platform.system(), platform.machine(), build_rev))
+
+ # end of file
+