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
This commit is contained in:
Dave Plater 2019-12-08 09:41:50 +00:00 committed by Git OBS Bridge
parent 1aa9da4948
commit 0df3dca97e
2 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Dec 8 09:36:46 UTC 2019 - Dave Plater <davejplater@gmail.com>
- Build Leap with python2
-------------------------------------------------------------------
Wed Dec 4 08:05:16 UTC 2019 - Dave Plater <davejplater@gmail.com>

View File

@ -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}'