Skip to content

Commit

Permalink
dlib: update to 19.24.6
Browse files Browse the repository at this point in the history
  • Loading branch information
zlice committed Nov 1, 2024
1 parent 86fe900 commit 29e5f13
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
23 changes: 23 additions & 0 deletions srcpkgs/dlib/patches/pybind11cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- a/dlib/CMakeLists.txt
+++ b/dlib/CMakeLists.txt
@@ -49,6 +49,7 @@
endif()
endif()

+find_package(pybind11 REQUIRED)

if (COMMAND pybind11_add_module AND MSVC)
# True when building a python extension module using Visual Studio. We care
--- a/tools/python/CMakeLists.txt
+++ b/tools/python/CMakeLists.txt
@@ -35,7 +35,8 @@
include(${CMAKE_CURRENT_LIST_DIR}/../../dlib/cmake_utils/tell_visual_studio_to_use_static_runtime.cmake)
endif()

-add_subdirectory(../../dlib/external/pybind11 pybind11_build)
+#add_subdirectory(../../dlib/external/pybind11 pybind11_build)
+find_package(pybind11 REQUIRED)
add_subdirectory(../../dlib dlib_build)

add_definitions(-DDLIB_VERSION=${DLIB_VERSION})

25 changes: 21 additions & 4 deletions srcpkgs/dlib/template
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Template file for 'dlib'
pkgname=dlib
version=19.20
version=19.24.6
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON"
makedepends="libjpeg-turbo-devel libpng-devel zlib-devel
$(vopt_if openblas openblas-devel) $(vopt_if x11 libX11-devel)"
hostmakedepends="pkg-config python3-devel python3-setuptools python3-distutils-extra"
makedepends="libjpeg-turbo-devel libpng-devel zlib-devel ffmpeg6-devel cblas-devel
$(vopt_if openblas openblas-devel) $(vopt_if x11 libX11-devel) python3-pybind11"
short_desc="Modern C++ toolkit containing machine learning algorithms and tools"
maintainer="Felix Hanley <[email protected]>"
license="BSL-1.0"
homepage="http://dlib.net"
distfiles="https://github.com/davisking/${pkgname}/archive/v${version}.tar.gz"
checksum=fc3f0986350e8e53aceadf95a71d2f413f1eedc469abda99a462cb528741d411
checksum=22513c353ec9c153300c394050c96ca9d088e02966ac0f639e989e50318c82d6

build_options="openblas x11"
desc_option_x11="Enable X11 for GUI components"
Expand All @@ -22,6 +23,22 @@ post_extract() {
rm -rf ./dlib/external
}

post_build() {
python setup.py build --no DLIB_USE_CUDA
}

post_install() {
python setup.py install --skip-build --prefix=/usr --root="${DESTDIR}" --optimize=1
}

python3-dlib_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - python3"
pkg_install() {
vmove "usr/lib/python*"
}
}

dlib-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
Expand Down

0 comments on commit 29e5f13

Please sign in to comment.