Accepting request 902883 from devel:libraries:c_c++
OBS-URL: https://build.opensuse.org/request/show/902883 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openpgm?expand=0&rev=10
This commit is contained in:
commit
0b3216b2b8
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 28 17:37:10 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add use_python3.patch to allow use of Python3 instead of
|
||||||
|
Python2 for generating files.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 19 13:39:35 UTC 2020 - Cristian Rodríguez <crrodriguez@opensuse.org>
|
Mon Oct 19 13:39:35 UTC 2020 - Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||||
|
|
||||||
|
12
openpgm.spec
12
openpgm.spec
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package openpgm
|
# spec file for package openpgm
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -41,6 +41,9 @@ Patch1: libpgm-5.2.122-reproducible-architecture.patch
|
|||||||
Patch2: libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch
|
Patch2: libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch
|
||||||
# upstream pending patch https://github.com/steve-o/openpgm/pull/63
|
# upstream pending patch https://github.com/steve-o/openpgm/pull/63
|
||||||
Patch3: libpgm-5.2.122-configure-rdtsc-checking-chg.patch
|
Patch3: libpgm-5.2.122-configure-rdtsc-checking-chg.patch
|
||||||
|
# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com
|
||||||
|
# this patch makes things totally awesome
|
||||||
|
Patch4: use_python3.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -48,7 +51,7 @@ BuildRequires: glibc-devel
|
|||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python-devel
|
BuildRequires: python3-base
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenPGM is an implementation of the Pragmatic General Multicast (PGM)
|
OpenPGM is an implementation of the Pragmatic General Multicast (PGM)
|
||||||
@ -81,10 +84,7 @@ This subpackage contains the header files for OpenPGM.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n "%{name}-release-%{tarball_version}/openpgm/pgm"
|
%setup -q -n "%{name}-release-%{tarball_version}/openpgm/pgm"
|
||||||
%patch0 -p1
|
%autopatch -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export ac_cv_func_ftime=no
|
export ac_cv_func_ftime=no
|
||||||
|
71
use_python3.patch
Normal file
71
use_python3.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
---
|
||||||
|
SConscript.libpgm | 2 +-
|
||||||
|
version_generator.py | 23 ++++++++++++-----------
|
||||||
|
2 files changed, 13 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
--- a/SConscript.libpgm
|
||||||
|
+++ b/SConscript.libpgm
|
||||||
|
@@ -60,7 +60,7 @@ e.Append(CCFLAGS = '-DGETTEXT_PACKAGE=\'
|
||||||
|
e.Command ('galois_tables.c', 'galois_generator.pl', "perl $SOURCE > $TARGET");
|
||||||
|
|
||||||
|
# Version stamping
|
||||||
|
-e.Command ('version.c', 'version_generator.py', "python $SOURCE > $TARGET");
|
||||||
|
+e.Command ('version.c', 'version_generator.py', "python3 $SOURCE > $TARGET");
|
||||||
|
e.Depends ('version.c', src);
|
||||||
|
src += ['version.c'];
|
||||||
|
|
||||||
|
--- a/version_generator.py
|
||||||
|
+++ b/version_generator.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
@@ -7,19 +7,19 @@ import time
|
||||||
|
timestamp = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))
|
||||||
|
build_date = time.strftime ("%Y-%m-%d", timestamp)
|
||||||
|
build_time = time.strftime ("%H:%M:%S", timestamp)
|
||||||
|
-build_rev = filter (str.isdigit, "$Revision$")
|
||||||
|
+build_rev = ''.join (list (filter (str.isdigit, "$Revision$")))
|
||||||
|
build_system = platform.system()
|
||||||
|
build_machine = platform.machine()
|
||||||
|
if 'SOURCE_DATE_EPOCH' in os.environ:
|
||||||
|
build_system = 'BuildSystem'
|
||||||
|
build_machine = 'BuildMachine'
|
||||||
|
|
||||||
|
-print """
|
||||||
|
+print ("""
|
||||||
|
/* vim:ts=8:sts=8:sw=4:noai:noexpandtab
|
||||||
|
*
|
||||||
|
* OpenPGM version.
|
||||||
|
*
|
||||||
|
- * Copyright (c) 2006-2011 Miru Limited.
|
||||||
|
+ * Copyright (c) 2006-2014 Miru Limited.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@@ -47,15 +47,16 @@ print """
|
||||||
|
|
||||||
|
const unsigned pgm_major_version = 5;
|
||||||
|
const unsigned pgm_minor_version = 2;
|
||||||
|
-const unsigned pgm_micro_version = 122;
|
||||||
|
-const char* pgm_build_date = "%s";
|
||||||
|
-const char* pgm_build_time = "%s";
|
||||||
|
-const char* pgm_build_system = "%s";
|
||||||
|
-const char* pgm_build_machine = "%s";
|
||||||
|
-const char* pgm_build_revision = "%s";
|
||||||
|
+const unsigned pgm_micro_version = 128;
|
||||||
|
+const char* pgm_build_date = "{0}";
|
||||||
|
+const char* pgm_build_time = "{1}";
|
||||||
|
+const char* pgm_build_system = "{2}";
|
||||||
|
+const char* pgm_build_machine = "{3}";
|
||||||
|
+const char* pgm_build_revision = "{4}";
|
||||||
|
|
||||||
|
|
||||||
|
/* eof */
|
||||||
|
-"""%(build_date, build_time, build_system, build_machine, build_rev)
|
||||||
|
+""".format (build_date, build_time, build_system, build_machine, build_rev))
|
||||||
|
|
||||||
|
# end of file
|
||||||
|
+
|
Loading…
x
Reference in New Issue
Block a user