summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-07-01 17:35:40 +0200
committerRemi Collet <remi@remirepo.net>2020-07-01 17:35:40 +0200
commit184767869e742dbf13a800e480c9df7cd4f76b3d (patch)
tree81b19d7a059a41067ed715655814d4b4582cc361
parent8387ffb5a2f8675284dd9a0dcf36dfb56f7d5425 (diff)
use DTS 7 on EL-7
improve pkg-config fix
-rw-r--r--dlib-pc.patch11
-rw-r--r--dlib.spec28
2 files changed, 28 insertions, 11 deletions
diff --git a/dlib-pc.patch b/dlib-pc.patch
new file mode 100644
index 0000000..a0f32ba
--- /dev/null
+++ b/dlib-pc.patch
@@ -0,0 +1,11 @@
+diff -up ./dlib/cmake_utils/dlib.pc.in.old ./dlib/cmake_utils/dlib.pc.in
+--- ./dlib/cmake_utils/dlib.pc.in.old 2020-07-01 17:28:39.020626797 +0200
++++ ./dlib/cmake_utils/dlib.pc.in 2020-07-01 17:28:57.555572710 +0200
+@@ -4,5 +4,6 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDI
+ Name: @PROJECT_NAME@
+ Description: Numerical and networking C++ library
+ Version: @VERSION@
+-Libs: -L${libdir} -ldlib @pkg_config_dlib_needed_libraries@
++Libs: -L${libdir} -ldlib -lgif
++Libs.private: @pkg_config_dlib_needed_libraries@
+ Cflags: -I${includedir} @pkg_config_dlib_needed_includes@
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 <remi@remirepo.net> - 19.20-2
+- use DTS 7 on EL-7
+- improve pkg-config fix
+
* Mon Jun 22 2020 Remi Collet <remi@remirepo.net> - 19.20-1
- initial package
- open https://github.com/davisking/dlib/issues/2111 broken pkg-config file