From ccc722b7ed330198d82a3cf28ead76d6d107a70a Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 6 Jun 2022 21:25:48 +0000 Subject: added java --- repo/openpgm/libpgm-fix-pkgconfig.patch | 21 +++++++++++++++++++ repo/openpgm/openpgm-fix-includes.patch | 30 ++++++++++++++++++++++++++ repo/openpgm/openpgm.xibuild | 37 +++++++++++++++++++++++++++++++++ repo/openpgm/python3.patch | 28 +++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 repo/openpgm/libpgm-fix-pkgconfig.patch create mode 100644 repo/openpgm/openpgm-fix-includes.patch create mode 100644 repo/openpgm/openpgm.xibuild create mode 100644 repo/openpgm/python3.patch (limited to 'repo/openpgm') diff --git a/repo/openpgm/libpgm-fix-pkgconfig.patch b/repo/openpgm/libpgm-fix-pkgconfig.patch new file mode 100644 index 0000000..64272f4 --- /dev/null +++ b/repo/openpgm/libpgm-fix-pkgconfig.patch @@ -0,0 +1,21 @@ +From ee25ff3d13f2639b4c3a42125e79f77f921c3320 Mon Sep 17 00:00:00 2001 +From: Luca Boccassi +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/repo/openpgm/openpgm-fix-includes.patch b/repo/openpgm/openpgm-fix-includes.patch new file mode 100644 index 0000000..6f1e590 --- /dev/null +++ b/repo/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 ++# include + #endif + #include + +--- ./include/impl/security.h ++++ ./include/impl/security.h +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -41,6 +40,8 @@ + PGM_BEGIN_DECLS + + #ifdef HAVE_FTIME ++#include ++ + static inline + errno_t + # if !defined( _WIN32 ) + diff --git a/repo/openpgm/openpgm.xibuild b/repo/openpgm/openpgm.xibuild new file mode 100644 index 0000000..e38ac42 --- /dev/null +++ b/repo/openpgm/openpgm.xibuild @@ -0,0 +1,37 @@ +#!/bin/sh + +NAME="openpgm" +DESC="An implementation of the PGM reliable multicast protocol" + +MAKEDEPS="python perl" + +PKG_VER=5.2.122 +SOURCE="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/openpgm/libpgm-$PKG_VER.tar.bz2" + +ADDITIONAL=" +libpgm-fix-pkgconfig.patch +openpgm-fix-includes.patch +python3.patch +" + +prepare() { + cd openpgm/pgm + for p in $BUILD_ROOT/*.patch; do + patch -Np1 -i $p + done +} + +build() { + CFLAGS="$CFLAGS -D_GNU_SOURCE" \ + ./configure \ + --prefix=/usr \ + --enable-shared \ + --disable-static \ + PYTHON=python3 + make +} + +package() { + make install DESTDIR="$PKG_DEST" +} + diff --git a/repo/openpgm/python3.patch b/repo/openpgm/python3.patch new file mode 100644 index 0000000..f1ae797 --- /dev/null +++ b/repo/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 + -- cgit v1.2.1