diff --git a/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch b/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch new file mode 100644 index 0000000..4756e76 --- /dev/null +++ b/libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch @@ -0,0 +1,13 @@ +Author: Luca Boccassi +Description: 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 +Origin: https://github.com/steve-o/openpgm/pull/57 +--- pgm.orig/openpgm-5.2.pc.in ++++ pgm/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/libpgm-5.2.122-reproducible-architecture.patch b/libpgm-5.2.122-reproducible-architecture.patch new file mode 100644 index 0000000..95b0c4b --- /dev/null +++ b/libpgm-5.2.122-reproducible-architecture.patch @@ -0,0 +1,29 @@ +Author: Luca Boccassi +Description: version_generator.py: make build reproducible + If SOURCE_DATE_EPOCH is defined then the user is most likely interested + in building the library in a reproducible way. So in that case use fixed + "BuildSystem" and "BuildMachine" strings instead of the operating system + and architecture. +Origin: https://github.com/steve-o/openpgm/pull/58 +--- pgm.orig/version_generator.py ++++ pgm/version_generator.py +@@ -8,6 +8,11 @@ timestamp = time.gmtime (int (os.getenv + build_date = time.strftime ("%Y-%m-%d", timestamp) + build_time = time.strftime ("%H:%M:%S", timestamp) + build_rev = 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 """ + /* vim:ts=8:sts=8:sw=4:noai:noexpandtab +@@ -51,6 +56,6 @@ const char* pgm_build_revision = "%s"; + + + /* eof */ +-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev) ++"""%(build_date, build_time, build_system, build_machine, build_rev) + + # end of file diff --git a/openpgm.spec b/openpgm.spec index dd5d652..a87574a 100644 --- a/openpgm.spec +++ b/openpgm.spec @@ -35,6 +35,10 @@ Source: https://github.com/steve-o/openpgm/archive/release-5-2-122.tar.g Source99: baselibs.conf # PATCH-FIX-UPSTREAM bmwiedemann https://github.com/steve-o/openpgm/pull/48 Patch0: libpgm-5.2.122-reproducible.patch +# PATCH-FIX-UPSTREAM bluca https://github.com/steve-o/openpgm/pull/58 +Patch1: libpgm-5.2.122-reproducible-architecture.patch +# PATCH-FIX-UPSTREAM bluca https://github.com/steve-o/openpgm/pull/57 +Patch2: libpgm-5.2.122-pkg-config-do-not-add-I-to-non-existing-directory.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -76,6 +80,8 @@ This subpackage contains the header files for OpenPGM. %prep %setup -q -n "%{name}-release-%{tarball_version}/openpgm/pgm" %patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build mkdir -p m4