diff --git a/math/dlib/Portfile b/math/dlib/Portfile index b616648aa66a2..cc5cde63ed7ad 100644 --- a/math/dlib/Portfile +++ b/math/dlib/Portfile @@ -5,25 +5,30 @@ PortGroup github 1.0 PortGroup cmake 1.1 PortGroup compiler_blacklist_versions 1.0 -github.setup davisking dlib 19.20 v -homepage http://dlib.net +github.setup davisking dlib 19.21 v categories math platforms darwin maintainers nomaintainer license MIT -description Modern C++ toolkit for machine learning, image processing, and more. -long_description \ - Dlib is a modern C++ toolkit containing machine learning algorithms and\ - tools for creating complex software in C++ to solve real world problems. It \ - is used in both industry and academia in a wide range of domains including \ - robotics, embedded devices, mobile phones, and large high performance \ - computing environments. Dlib's open source licensing allows you to use it\ - in any application, free of charge. +description Modern C++ toolkit for machine learning, image \ + processing, and more. + +long_description Dlib is a modern C++ toolkit containing machine \ + learning algorithms and tools for creating \ + complex software in C++ to solve real world \ + problems. It is used in both industry and \ + academia in a wide range of domains including \ + robotics, embedded devices, mobile phones, and \ + large high performance computing \ + environments. Dlib's open source licensing allows \ + you to use it in any application, free of charge. + +homepage http://dlib.net -checksums rmd160 d9eb9b0e1c40df807f58df5fdee7bdb7cdad56cb \ - sha256 733a844f1fa645597d30d8b03d0eee91d7ee066c9f516b12e1a792950fffff68 \ - size 10583402 +checksums rmd160 58abe0906d68ee92936360e8c4c57076bacee75a \ + sha256 5895369a1625f833b41bafaf18a5587cbc293eb2f60a1905315441fbd83ecc23 \ + size 10587515 compiler.cxx_standard 2011 compiler.thread_local_storage yes @@ -33,3 +38,47 @@ compiler.blacklist-append {clang < 800} configure.cxxflags-append -fvisibility=hidden -fvisibility-inlines-hidden cmake.build_type Release + +# create Python subports +set python_versions {37 38} +foreach v ${python_versions} { + subport py${v}-${github.project} { + PortGroup python 1.0 + python.default_version ${v} + } +} + +# Python bindings for supported Python versions +if {[string match "py*" ${subport}]} { + categories-append math + description Python ${python.branch} bindings for ${description} + long_description\ + This package provides Python ${python.branch}\ + bindings, modules, and scripts. + + depends_lib-append \ + port:sqlite3 + + depends_build-append \ + port:py${python.version}-setuptools + + depends_test-append \ + port:py${python.version}-pytest + + build.dir ${worksrcpath} + build.post_args + + destroot.target install + + post-destroot { + set docdir ${prefix}/share/doc/${subport} + xinstall -d ${destroot}${docdir} + xinstall -m 0644 -W ${worksrcpath} README.md \ + ${destroot}${docdir} + } + + test.run yes + test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*] + + livecheck.type none +}