Package dlib: Specfile

%define repo dlib
%define soname 19

Name: dlib
Version: 19.24.2
Release: alt3
Summary: C++ toolkit containing machine learning algorithms and tools
License: BSL-1.0
Group: Engineering

# Built from VCS.
# git merge -s ours tag --allow-unrelated-histories

# BEGIN SourceDeps(oneline):
BuildRequires: gcc-c++ libX11-devel libfftw3-devel libgif-devel libjpeg-devel libpng-devel libsqlite3-devel openmpi-devel python3-devel
# END SourceDeps(oneline)
BuildRequires: cmake rpm-build-python3 python3-module-setuptools python3-module-wheel
BuildRequires: liblapack-devel libopenblas-devel libavdevice-devel libavfilter-devel libavformat-devel libavcodec-devel libswresample-devel libswscale-devel libavutil-devel libpostproc-devel pybind11-devel python3-module-pybind11

Dlib is a general purpose cross-platform C++ library
designed using contract programming and modern C++ techniques.

%package -n lib%name%soname
Summary: Library for %name
Group: System/Libraries

%description -n lib%name%soname
This package provides library for %name.

%package devel
Summary: Development files for %name
Group: Development/C++

%description devel
This package provides development files for %name.

%ifnarch ppc64le
%package -n python3-module-%name
Summary: Python3-module for %name
Group: Development/Python3

%description -n python3-module-%name
This package provides python module for %name.

%setup -n %repo-%version
rm -rf dlib/external
sed -i 's|add_subdirectory(../../dlib/external/pybind11 pybind11_build)|find_package(pybind11 CONFIG)|' \
# don't apply cmake options for cmake into python's

%cmake \
  -DLIB_USE_CUDA=false \
  -DBLAS_LIBRARIES=%_libdir/ \
%ifnarch ppc64le

%ifnarch ppc64le

%files -n lib%name%soname
%doc LICENSE.txt

%files devel

%ifnarch ppc64le
%files -n python3-module-dlib

* Thu Nov 09 2023 Leontiy Volodin <> 19.24.2-alt3
- Built without SSE4 and AVX (ALT #48280).

* Mon Sep 11 2023 Leontiy Volodin <> 19.24.2-alt2
- Spec:
  + Updated BuildRequires.
  + Fixed build with new ffmpeg.

* Tue Jul 18 2023 Leontiy Volodin <> 19.24.2-alt1
- New version 19.24.2.
- Spec:
  + Added BuildRequires.

* Mon Dec 12 2022 Leontiy Volodin <> 19.24-alt2
- Built with system pybind11 instead built-in.

* Thu Dec 08 2022 Leontiy Volodin <> 19.24-alt1
- Initial build for ALT Sisyphus.
- Built as require for howdy.