pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
opencv: cleanup, fix protobuf usage by switching to c++17
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Fri Feb 7 22:29:40 2025 +0100
Changeset: c03303c7c13b8f4a6bf6ac84bde00777894a8236
Modified Files:
opencv/Makefile
opencv/Makefile.common
Removed Files:
opencv/hacks.mk
Log Message:
opencv: cleanup, fix protobuf usage by switching to c++17
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c03303c7c13b8f4a6bf6ac84bde00777894a8236
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
opencv/Makefile | 6 ------
opencv/Makefile.common | 9 ++++-----
opencv/hacks.mk | 19 -------------------
3 files changed, 4 insertions(+), 30 deletions(-)
diffs:
diff --git a/opencv/Makefile b/opencv/Makefile
index 39eabad7d7..62d3612240 100644
--- a/opencv/Makefile
+++ b/opencv/Makefile
@@ -7,15 +7,9 @@ DISTNAME= opencv-${OPENCV_VERSION}
MAINTAINER= anthony.mallet%laas.fr@localhost
COMMENT= Library for computer vision problems
-PKGCONFIG_OVERRIDE+= build/unix-install/opencv.pc
-PKGCONFIG_OVERRIDE_STAGE= post-configure
-
PY_PATCHPLIST= yes
REPLACE_PYTHON+= samples/python/*.py
-# includes configure output and paths to gmake etc.
-CHECK_WRKREF_SKIP= ${PREFIX}/lib/libopencv_core.*
-
.include "options.mk"
TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR}/lib
diff --git a/opencv/Makefile.common b/opencv/Makefile.common
index 10ca3016b4..4ee8f88b2a 100644
--- a/opencv/Makefile.common
+++ b/opencv/Makefile.common
@@ -14,7 +14,7 @@ HOMEPAGE= https://opencv.org/
LICENSE= modified-bsd
USE_LANGUAGES= c c++
-USE_CXX_FEATURES= c++11
+USE_CXX_FEATURES= c++17
USE_TOOLS+= gmake pkg-config
CHECK_PORTABILITY_SKIP+= platforms/ios/cmake/Toolchains/xcodebuild_wrapper.in
@@ -28,15 +28,14 @@ CMAKE_CONFIGURE_ARGS+= -DOPENCV_GENERATE_SETUPVARS=OFF
CMAKE_CONFIGURE_ARGS+= -DPROTOBUF_UPDATE_FILES=ON
CMAKE_CONFIGURE_ARGS+= -DWITH_EIGEN=OFF
CMAKE_CONFIGURE_ARGS+= -DZLIB_ROOT=${BUILDLINK_PREFIX.zlib}
-# doesn't build on NetBSD with libva-2.17.0
+# needed by protobuf
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_CXX_STANDARD=17
+# doesn't build on NetBSD with libva-2.22.0
CMAKE_CONFIGURE_ARGS+= -DWITH_VA=OFF
#.include "../../multimedia/libva/buildlink3.mk"
CMAKE_CONFIGURE_ARGS.SunOS+= -DENABLE_PRECOMPILED_HEADERS=OFF
CMAKE_CONFIGURE_ARGS.SunOS+= -DOPENCV_PYTHON_SKIP_LINKER_EXCLUDE_LIBS=ON
-BUILDLINK_TRANSFORM+= rm:-Werror=address
-BUILDLINK_TRANSFORM+= rm:-Werror=non-virtual-dtor
-
BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--as-needed
BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--gc-sections
diff --git a/opencv/hacks.mk b/opencv/hacks.mk
deleted file mode 100644
index 35bb662e9a..0000000000
--- a/opencv/hacks.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# $NetBSD: hacks.mk,v 1.3 2021/10/06 21:10:24 adam Exp $
-
-.if !defined(OPENCV_HACKS_MK)
-OPENCV_HACKS_MK= defined
-
-.include "../../mk/bsd.fast.prefs.mk"
-.include "../../mk/compiler.mk"
-
-# PR toolchain/47051: gcc-4.5.4 breaks opencv on amd64
-.if !empty(PKGSRC_COMPILER:Mgcc) && ${CC_VERSION:Mgcc-4.5.4*} && ${MACHINE_PLATFORM:M*-*-x86_64}
-PKG_HACKS+= tree-pre
-SUBST_CLASSES+= opt-hack
-SUBST_STAGE.opt-hack= post-configure
-SUBST_MESSAGE.opt-hack= Working around gcc-4.5.4 bug.
-SUBST_FILES.opt-hack= modules/calib3d/CMakeFiles/opencv_calib3d.dir/build.make
-SUBST_SED.opt-hack= -e '/stereosgbm.cpp.o/s/-o /-fno-tree-pre -o /'
-.endif
-
-.endif # OPENCV_HACKS_MK
Home |
Main Index |
Thread Index |
Old Index