File python-horizon-next.spec of Package horizon-next
#
# spec file for package horizon
#
# Copyright (c) 2020 Frank Kunz
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
%define appname horizon
Name: python-%{appname}-next
Version: 0.0
Release: 0
Summary: Python module for %{appname}
Group: Development/Libraries/Python
License: GPL-3.0-only
Url: https://horizon-eda.org
Source0: %{appname}-%{version}.tar
Patch0: 0001-enable-python-module-build.patch
BuildRequires: binutils-gold
BuildRequires: cppzmq-devel
%if 0%{?suse_version} >= 1600
BuildRequires: gcc-c++
BuildRequires: pkgconfig(libpodofo)
BuildRequires: %{python_module cairo-common-devel}
%else
BuildRequires: gcc11-c++
BuildRequires: libpodofo-devel
BuildRequires: %{python_module cairo-devel}
%endif
BuildRequires: git
BuildRequires: glm-devel
BuildRequires: gtkmm3-devel
BuildRequires: libcurl-devel
BuildRequires: libepoxy-devel
BuildRequires: libgit2-devel
BuildRequires: librsvg-devel
BuildRequires: libzmq5
BuildRequires: occt-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libarchive)
BuildRequires: boost-devel
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pycairo}
BuildRequires: sqlite3-devel
BuildRequires: meson
###zypper in -y git make gcc gcc-c++ pkg-config cppzmq-devel occt-devel gtkmm3-devel libgit2-devel libuuid-devel sqlite3-devel librsvg-devel cairomm-devel glm-devel boost-devel libcurl-devel libpodofo-devel binutils-gold libarchive-devel libspnav-devel python3 meson cmake
###zypper in -y Mesa-devel python3-pycairo-devel python3-PyYAML
%python_subpackages
%description
Python support module for %{appname}.
%prep
%setup -q -n %{appname}-%{version}
%patch 0 -p1
%build
%if 0%{?suse_version} < 1600
export CC=gcc-11
export CXX=g++-11
# patching legacy libpodofo mess
cp -r /usr/lib64/pkgconfig /tmp
export PKG_CONFIG_PATH=/tmp/pkgconfig
sed -i 's/-lpodofo-0/-lpodofo/g' /tmp/pkgconfig/libpodofo-0.pc
sed -i "s/podofo = dependency('libpodofo')/podofo = dependency('libpodofo-0')/g" meson.build
%endif
%meson
#ninja -C x86_64-suse-linux horizon.so
%{python_expand find .
%meson_build horizon
}
%install
%python_expand install -D -t %{buildroot}/%{$python_sitelib} %{_target_cpu}-suse-linux/horizon.so
%files %{python_files}
%license LICENSE
%{python_sitelib}/horizon.so
%changelog