mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
dev-cpp/tiny-dnn: update EAPI 7 -> 8
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
123
dev-cpp/tiny-dnn/files/tiny-dnn-1.0.0_alpha3-system-libs.patch
Normal file
123
dev-cpp/tiny-dnn/files/tiny-dnn-1.0.0_alpha3-system-libs.patch
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
--- a/test/test_core.h
|
||||||
|
+++ b/test/test_core.h
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
#include "tiny_dnn/tiny_dnn.h"
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#endif // defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
|
||||||
|
namespace tiny_dnn {
|
||||||
|
--- a/tiny_dnn/core/framework/device.fwd.h
|
||||||
|
+++ b/tiny_dnn/core/framework/device.fwd.h
|
||||||
|
@@ -46,9 +46,9 @@
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
#ifdef USE_OPENCL
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#else
|
||||||
|
-#include "third_party/CLCudaAPI/cupp11.h"
|
||||||
|
+#include "CLCudaAPI/cupp11.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/tiny_dnn/core/framework/program.h
|
||||||
|
+++ b/tiny_dnn/core/framework/program.h
|
||||||
|
@@ -49,9 +49,9 @@
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
#ifdef USE_OPENCL
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#else
|
||||||
|
-#include "third_party/CLCudaAPI/cupp11.h"
|
||||||
|
+#include "CLCudaAPI/cupp11.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/tiny_dnn/core/framework/program_manager.h
|
||||||
|
+++ b/tiny_dnn/core/framework/program_manager.h
|
||||||
|
@@ -51,9 +51,9 @@
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
#ifdef USE_OPENCL
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#else
|
||||||
|
-#include "third_party/CLCudaAPI/cupp11.h"
|
||||||
|
+#include "CLCudaAPI/cupp11.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/tiny_dnn/core/framework/tensor.h
|
||||||
|
+++ b/tiny_dnn/core/framework/tensor.h
|
||||||
|
@@ -53,9 +53,9 @@
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
#ifdef USE_OPENCL
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#else
|
||||||
|
-#include "third_party/CLCudaAPI/cupp11.h"
|
||||||
|
+#include "CLCudaAPI/cupp11.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/tiny_dnn/core/kernels/tiny_quantized_matmul_kernel.h
|
||||||
|
+++ b/tiny_dnn/core/kernels/tiny_quantized_matmul_kernel.h
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
|
||||||
|
// Implements a quantized eight-bit version of the matmul operation.
|
||||||
|
|
||||||
|
-#include "third_party/gemmlowp/public/gemmlowp.h"
|
||||||
|
+#include "gemmlowp/public/gemmlowp.h"
|
||||||
|
#include "tiny_dnn/core/kernels/tiny_quantization_kernel.h"
|
||||||
|
|
||||||
|
namespace tiny_dnn {
|
||||||
|
--- a/tiny_dnn/util/image.h
|
||||||
|
+++ b/tiny_dnn/util/image.h
|
||||||
|
@@ -39,15 +39,15 @@
|
||||||
|
|
||||||
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
|
#define STB_IMAGE_INLINE // We need this define to avoid multiple definition
|
||||||
|
-#include "third_party/stb/stb_image.h"
|
||||||
|
+#include "stb/stb_image.h"
|
||||||
|
|
||||||
|
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||||
|
#define STB_IMAGE_RESIZE_INLINE
|
||||||
|
-#include "third_party/stb/stb_image_resize.h"
|
||||||
|
+#include "stb/stb_image_resize.h"
|
||||||
|
|
||||||
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||||
|
#define STB_IMAGE_WRITE_INLINE
|
||||||
|
-#include "third_party/stb/stb_image_write.h"
|
||||||
|
+#include "stb/stb_image_write.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace tiny_dnn {
|
||||||
|
--- a/tiny_dnn/util/util.h
|
||||||
|
+++ b/tiny_dnn/util/util.h
|
||||||
|
@@ -52,9 +52,9 @@
|
||||||
|
|
||||||
|
#if defined(USE_OPENCL) || defined(USE_CUDA)
|
||||||
|
#ifdef USE_OPENCL
|
||||||
|
-#include "third_party/CLCudaAPI/clpp11.h"
|
||||||
|
+#include "CLCudaAPI/clpp11.h"
|
||||||
|
#else
|
||||||
|
-#include "third_party/CLCudaAPI/cupp11.h"
|
||||||
|
+#include "CLCudaAPI/cupp11.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- a/.travis/cpplint_test.sh
|
||||||
|
+++ b/.travis/cpplint_test.sh
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
-python third_party/cpplint.py \
|
||||||
|
+cpplint.py \
|
||||||
|
--extensions=cpp,h \
|
||||||
|
--filter=-build/header_guard,-runtime/references \
|
||||||
|
tiny_dnn/*/* examples/*/* test/*/*/*/*
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=8
|
||||||
|
|
||||||
DOCS_BUILDER="sphinx"
|
DOCS_BUILDER="sphinx"
|
||||||
DOCS_DEPEND="dev-python/recommonmark"
|
DOCS_DEPEND="dev-python/recommonmark"
|
||||||
@@ -15,17 +15,16 @@ DESCRIPTION="header only, dependency-free deep learning framework in C++14"
|
|||||||
HOMEPAGE="https://github.com/tiny-dnn/tiny-dnn"
|
HOMEPAGE="https://github.com/tiny-dnn/tiny-dnn"
|
||||||
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${MYPV}.tar.gz -> ${P}.tar.gz"
|
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${MYPV}.tar.gz -> ${P}.tar.gz"
|
||||||
S="${WORKDIR}/${PN}-${MYPV}"
|
S="${WORKDIR}/${PN}-${MYPV}"
|
||||||
|
|
||||||
LICENSE="BSD"
|
LICENSE="BSD"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse double-precision opencl openmp +serialization tbb test"
|
IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_sse double-precision opencl openmp +serialization tbb test" # TODO: cuda
|
||||||
REQUIRED_USE="
|
|
||||||
?? ( openmp tbb )
|
|
||||||
"
|
|
||||||
RESTRICT="test" #tests doesn't build ...
|
|
||||||
|
|
||||||
# headers as rdepend because this is also an header only library
|
# headers as rdepend because this is also an header only library
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
|
dev-cpp/gemmlowp
|
||||||
|
dev-libs/stb
|
||||||
opencl? (
|
opencl? (
|
||||||
dev-util/opencl-headers
|
dev-util/opencl-headers
|
||||||
virtual/opencl
|
virtual/opencl
|
||||||
@@ -33,19 +32,26 @@ RDEPEND="
|
|||||||
serialization? ( dev-libs/cereal )
|
serialization? ( dev-libs/cereal )
|
||||||
tbb? ( dev-cpp/tbb )
|
tbb? ( dev-cpp/tbb )
|
||||||
"
|
"
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="
|
||||||
BDEPEND="
|
${RDEPEND}
|
||||||
test? ( dev-cpp/gtest )
|
test? (
|
||||||
|
dev-cpp/catch:0
|
||||||
|
dev-cpp/gtest
|
||||||
|
)
|
||||||
"
|
"
|
||||||
|
|
||||||
|
REQUIRED_USE="^^ ( openmp tbb )"
|
||||||
|
RESTRICT="test" #tests doesn't build ...
|
||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}/${PN}-add-sphinx-ext-autodoc-to-conf-py.patch"
|
"${FILESDIR}/${PN}-add-sphinx-ext-autodoc-to-conf-py.patch"
|
||||||
"${FILESDIR}/${PN}-disable-gtest-download.patch"
|
"${FILESDIR}/${PN}-disable-gtest-download.patch"
|
||||||
|
"${FILESDIR}/${P}-system-libs.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
#remove bundled cereal
|
#remove bundled cereal
|
||||||
rm -r cereal || die
|
rm -r cereal || die
|
||||||
|
rm -r third_party || die
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user