From 0df3dca97e6d4ad26315f91baa6da9f77532c8fa84d22ac68455901675943b37 Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Sun, 8 Dec 2019 09:41:50 +0000 Subject: [PATCH] Accepting request 755048 from home:plater - Build Leap with python2 OBS-URL: https://build.opensuse.org/request/show/755048 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lv2?expand=0&rev=26 --- lv2.changes | 5 +++++ lv2.spec | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lv2.changes b/lv2.changes index 663ce57..9ff75b0 100644 --- a/lv2.changes +++ b/lv2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 8 09:36:46 UTC 2019 - Dave Plater + +- Build Leap with python2 + ------------------------------------------------------------------- Wed Dec 4 08:05:16 UTC 2019 - Dave Plater diff --git a/lv2.spec b/lv2.spec index 21448a3..16f87a2 100644 --- a/lv2.spec +++ b/lv2.spec @@ -16,14 +16,13 @@ # -# Documentation doesn't build for less than Tumbleweed -%if 0%{suse_version} > 1320 %define asciidocs 1 -%else -%define asciidocs 0 -%endif -# TODO:build Leap:15 with python2 +# build Leap:15 with python2 it fails with 3 +%if 0%{?suse_version} > 1500 %define _waf python3 waf +%else +%define _waf python2 waf +%endif Name: lv2 Version: 1.16.0 @@ -37,7 +36,11 @@ Source1: lv2-rpmlintrc # Patch-Fix-Upstream lv2pkgconfig.patch davejplater@gmail.com -- Add "/" to end of -I directory because otherwise pkg-config outputs nothing. Patch0: lv2pkgconfig.patch BuildRequires: pkg-config +%if 0%{?suse_version} > 1500 BuildRequires: python3-rdflib +%else +BuildRequires: python-rdflib +%endif BuildRequires: pkgconfig(gtk+-2.0) >= 2.18.0 BuildRequires: pkgconfig(sndfile) >= 1.0.0 %if %{asciidocs} == 1 @@ -45,7 +48,11 @@ BuildRequires: pkgconfig(sndfile) >= 1.0.0 BuildRequires: asciidoc BuildRequires: doxygen BuildRequires: graphviz +%if 0%{?suse_version} > 1500 BuildRequires: python3-Pygments +%else +BuildRequires: python-Pygments +%endif %endif %description @@ -172,7 +179,9 @@ This package contains the LV2 API documentation. %autopatch -p1 %build +%if 0%{?suse_version} > 1500 for i in `grep -rl "/usr/bin/env python"`;do sed -i '1s/^#!.*/#!\/usr\/bin\/python3/' ${i} ;done +%endif export CFLAGS='%{optflags}' export CXXFLAGS='%{optflags}'