From 184767869e742dbf13a800e480c9df7cd4f76b3d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Jul 2020 17:35:40 +0200 Subject: use DTS 7 on EL-7 improve pkg-config fix --- dlib.spec | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'dlib.spec') diff --git a/dlib.spec b/dlib.spec index e68672c..8e9b565 100644 --- a/dlib.spec +++ b/dlib.spec @@ -17,15 +17,24 @@ Name: %{gh_project} Summary: A toolkit for making real world machine learning and data analysis Version: 19.20 -Release: 1%{?dist} +Release: 2%{?dist} License: Boost URL: https://github.com/%{gh_owner}/%{gh_project}/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +# only really needed libraries, not using full path +Patch0: %{gh_project}-pc.patch + %if 0%{?rhel} == 6 || 0%{?rhel} == 7 BuildRequires: cmake3 +%if 0%{?rhel} == 7 +%global dtsenable source /opt/rh/devtoolset-7/enable +BuildRequires: devtoolset-7-toolchain +%else +%global dtsenable source /opt/rh/devtoolset-7/enable BuildRequires: devtoolset-6-toolchain +%endif %else BuildRequires: cmake BuildRequires: gcc @@ -54,15 +63,7 @@ See http://dlib.net for the main project documentation and API reference. Summary: Header files and development libraries for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: openblas-devel -Requires: libpng-devel -Requires: libtiff-devel -Requires: libjpeg-turbo-devel Requires: giflib-devel -Requires: sqlite-devel -Requires: zlib-devel -Requires: libX11-devel -Requires: libXext-devel %description devel @@ -72,6 +73,7 @@ for %{libname}. %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 -b .fixpc %build @@ -79,7 +81,7 @@ mkdir build cd build %if 0%{?rhel} == 6 || 0%{?rhel} == 7 -source /opt/rh/devtoolset-6/enable +%{dtsenable} %cmake3 \ %else @@ -94,7 +96,7 @@ make %{_smp_mflags} cd build %if 0%{?rhel} == 6 || 0%{?rhel} == 7 -source /opt/rh/devtoolset-6/enable +%{dtsenable} %endif make install DESTDIR="%{buildroot}" @@ -123,6 +125,10 @@ sed -e 's:%{_libdir}/lib:-l:g;s/\.so//g' \ %changelog +* Wed Jul 1 2020 Remi Collet - 19.20-2 +- use DTS 7 on EL-7 +- improve pkg-config fix + * Mon Jun 22 2020 Remi Collet - 19.20-1 - initial package - open https://github.com/davisking/dlib/issues/2111 broken pkg-config file -- cgit