-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
@@ -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" | ||
|