File horizon.spec of Package horizon
#
# 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.
Name: horizon
Version: 2.7.1
Release: 0
Summary: A free EDA package
License: GPL-3.0-only
Group: Productivity/Scientific/Electronics
Url: https://horizon-eda.org
Source0: https://github.com/horizon-eda/horizon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: binutils-gold
BuildRequires: cppzmq-devel
%if 0%{?suse_version} >= 1600
BuildRequires: gcc-c++
BuildRequires: libpodofo-0_10-devel
%else
BuildRequires: gcc11-c++
BuildRequires: libpodofo-devel
%endif
BuildRequires: git
BuildRequires: glm-devel
BuildRequires: gtkmm3-devel
BuildRequires: libcurl-devel
BuildRequires: libepoxy-devel
BuildRequires: libgit2-devel
BuildRequires: libopenssl-devel
BuildRequires: librsvg-devel
BuildRequires: libzip-devel
BuildRequires: libzmq5
BuildRequires: occt-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(zlib)
BuildRequires: boost-devel
BuildRequires: sqlite3-devel
BuildRequires: update-desktop-files
BuildRequires: yaml-cpp-devel
BuildRequires: libspnav-devel
BuildRequires: meson
%description
Horizon is a free EDA package.
%prep
%autosetup -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
%meson_build horizon-eda horizon-imp
%install
%meson_install
%suse_update_desktop_file -r org.horizon_eda.HorizonEDA Education Engineering
%check
%files
%doc CHANGELOG.md README.md SUPPORT.md doc/pool.pdf
%doc %{_mandir}/man1/horizon-eda.1.gz
%doc %{_mandir}/man1/horizon-imp.1.gz
%license LICENSE
%{_bindir}/horizon-*
%{_datadir}/icons/hicolor/*
%{_datadir}/applications/*
%{_datadir}/metainfo/*
%changelog