diff --git a/misc/opennn/Makefile b/misc/opennn/Makefile index a48d5e4a8f5e..53724a28b276 100644 --- a/misc/opennn/Makefile +++ b/misc/opennn/Makefile @@ -1,49 +1,53 @@ PORTNAME= opennn DISTVERSIONPREFIX= v -DISTVERSION= 6.0.4 +DISTVERSION= 8.0.0 CATEGORIES= misc # machine-learning MAINTAINER= yuri@FreeBSD.org COMMENT= Open neural networks library -WWW= https://www.opennn.net/ +WWW= https://www.opennn.net/ \ + https://github.com/Artelnics/opennn LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt BROKEN_armv7= gcc13 fails: error: use of built-in trait '__remove_cvref(_InIter1)' in function signature, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278630 -USES= cmake:testing dos2unix +TEST_DEPENDS= googletest>0:devel/googletest + +USES= cmake:testing dos2unix localbase:ldflags USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= Artelnics DOS2UNIX_FILES= opennn/CMakeLists.txt CMAKE_ON= BUILD_SHARED_LIBS CMAKE_OFF= OpenNN_BUILD_EXAMPLES OpenNN_BUILD_TESTS +CMAKE_OFF+= OPENNN_WITH_CUDA CMAKE_TESTING_ON= OpenNN_BUILD_TESTS # some tests fail, see https://github.com/Artelnics/opennn/issues/229 -CMAKE_TESTING_TARGET= tests +CMAKE_TESTING_TARGET= CXXFLAGS_powerpc= -O1 CXXFLAGS_powerpc64= -mvsx LDFLAGS+= -pthread LDFLAGS_powerpc= -latomic .if !exists(/usr/include/omp.h) LDFLAGS+= -fopenmp USES+= compiler:gcc-c++11-lib .else LDFLAGS+= -lomp # https://github.com/Artelnics/opennn/issues/182 USES+= compiler:c++11-lang .endif do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME} && ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME} ${INSTALL_DATA} ${BUILD_WRKSRC}/${PORTNAME}/libopennn.so ${STAGEDIR}${PREFIX}/lib ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libopennn.so post-test: - @cd ${TEST_WRKSRC} && (${ECHO} suite | tests/tests) + @cd ${TEST_WRKSRC} && ${BUILD_WRKSRC}/bin/run_tests .include diff --git a/misc/opennn/distinfo b/misc/opennn/distinfo index 35a32c537960..b310c8e83e07 100644 --- a/misc/opennn/distinfo +++ b/misc/opennn/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1687057825 -SHA256 (Artelnics-opennn-v6.0.4_GH0.tar.gz) = 3f3bcf491198444d58ea099acf69b3a4e3703b321f3fb08ad9b32e832b400c34 -SIZE (Artelnics-opennn-v6.0.4_GH0.tar.gz) = 20311311 +TIMESTAMP = 1775624253 +SHA256 (Artelnics-opennn-v8.0.0_GH0.tar.gz) = 3f2326b4a85cc2c388baf00107a340ee91104ef5b8d7fa83b6add555e7d9ea90 +SIZE (Artelnics-opennn-v8.0.0_GH0.tar.gz) = 71452501 diff --git a/misc/opennn/files/patch-opennn_CMakeLists.txt b/misc/opennn/files/patch-opennn_CMakeLists.txt new file mode 100644 index 000000000000..16c74d1572da --- /dev/null +++ b/misc/opennn/files/patch-opennn_CMakeLists.txt @@ -0,0 +1,18 @@ +--- opennn/CMakeLists.txt.orig 2026-04-08 05:34:55 UTC ++++ opennn/CMakeLists.txt +@@ -5,7 +5,7 @@ file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS "*.h" + file(GLOB_RECURSE CPP_SOURCES CONFIGURE_DEPENDS "*.cpp") + file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS "*.h") + +-add_library(opennn STATIC ${CPP_SOURCES} ${HEADER_FILES}) ++add_library(opennn ${CPP_SOURCES} ${HEADER_FILES}) + + # Force linker to include all object files so that REGISTER() auto-registration + # in anonymous namespaces is not stripped from the final binary. +@@ -52,4 +52,4 @@ target_compile_options(opennn PRIVATE + target_compile_options(opennn PRIVATE + $<$:-O0 -g> + $<$>:-O2> +-) +\ No newline at end of file ++) diff --git a/misc/opennn/files/patch-opennn_data__set.h b/misc/opennn/files/patch-opennn_data__set.h deleted file mode 100644 index a784d1fe923b..000000000000 --- a/misc/opennn/files/patch-opennn_data__set.h +++ /dev/null @@ -1,11 +0,0 @@ ---- opennn/data_set.h.orig 2023-06-18 03:33:58 UTC -+++ opennn/data_set.h -@@ -30,7 +30,7 @@ - #include - #include - #include --#include -+//#include - - #include - #include diff --git a/misc/opennn/files/patch-opennn_pch.h b/misc/opennn/files/patch-opennn_pch.h new file mode 100644 index 000000000000..dc5d7f8488fe --- /dev/null +++ b/misc/opennn/files/patch-opennn_pch.h @@ -0,0 +1,11 @@ +--- opennn/pch.h.orig 2026-04-08 05:32:16 UTC ++++ opennn/pch.h +@@ -55,7 +55,7 @@ + #include "../eigen/unsupported/Eigen/CXX11/Tensor" + #include "../eigen/Eigen/src/Core/util/DisableStupidWarnings.h" + +-#define OPENNN_CUDA // Comment this line to disable cuda files ++//#define OPENNN_CUDA // Comment this line to disable cuda files + + #ifdef OPENNN_CUDA + diff --git a/misc/opennn/pkg-plist b/misc/opennn/pkg-plist index e18361a58466..f99796547d24 100644 --- a/misc/opennn/pkg-plist +++ b/misc/opennn/pkg-plist @@ -1,59 +1,56 @@ include/opennn/adaptive_moment_estimation.h -include/opennn/batch_normalization_layer.h -include/opennn/bounding_box_regressor_layer.h +include/opennn/addition_layer.h include/opennn/bounding_layer.h -include/opennn/codification.h -include/opennn/config.h -include/opennn/conjugate_gradient.h include/opennn/convolutional_layer.h include/opennn/correlations.h include/opennn/cross_entropy_error.h -include/opennn/data_set.h -include/opennn/filesystem.h +include/opennn/cross_entropy_error_3d.h +include/opennn/dataset.h +include/opennn/dense_layer.h +include/opennn/embedding_layer.h include/opennn/flatten_layer.h include/opennn/genetic_algorithm.h -include/opennn/gradient_descent.h include/opennn/growing_inputs.h include/opennn/growing_neurons.h +include/opennn/image_dataset.h +include/opennn/image_utilities.h include/opennn/inputs_selection.h -include/opennn/json_to_xml.h +include/opennn/kmeans.h +include/opennn/language_dataset.h include/opennn/layer.h -include/opennn/learning_rate_algorithm.h include/opennn/levenberg_marquardt_algorithm.h -include/opennn/long_short_term_memory_layer.h -include/opennn/loss_index.h +include/opennn/loss.h include/opennn/mean_squared_error.h include/opennn/minkowski_error.h +include/opennn/model_expression.h include/opennn/model_selection.h +include/opennn/multihead_attention_layer.h include/opennn/neural_network.h -include/opennn/neurons_selection.h -include/opennn/non_max_suppression_layer.h +include/opennn/neuron_selection.h +include/opennn/normalization_layer_3d.h include/opennn/normalized_squared_error.h -include/opennn/numerical_differentiation.h include/opennn/opennn.h -include/opennn/opennn_images.h -include/opennn/opennn_strings.h -include/opennn/optimization_algorithm.h -include/opennn/perceptron_layer.h +include/opennn/optimizer.h +include/opennn/pch.h include/opennn/pooling_layer.h -include/opennn/probabilistic_layer.h -include/opennn/pruning_inputs.h +include/opennn/pooling_layer_3d.h include/opennn/quasi_newton_method.h +include/opennn/random_utilities.h include/opennn/recurrent_layer.h -include/opennn/region_based_object_detector.h -include/opennn/region_proposal_layer.h +include/opennn/registry.h include/opennn/response_optimization.h include/opennn/scaling.h include/opennn/scaling_layer.h +include/opennn/standard_networks.h include/opennn/statistics.h include/opennn/stochastic_gradient_descent.h -include/opennn/sum_squared_error.h +include/opennn/string_utilities.h include/opennn/tensor_utilities.h include/opennn/testing_analysis.h -include/opennn/text_analytics.h +include/opennn/time_series_dataset.h include/opennn/tinyxml2.h include/opennn/training_strategy.h -include/opennn/unit_testing.h include/opennn/unscaling_layer.h +include/opennn/variable.h include/opennn/weighted_squared_error.h lib/libopennn.so