[BACK]Return to Makefile.common CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / graphics / opencv

File: [cvs.NetBSD.org] / pkgsrc / graphics / opencv / Makefile.common (download)

Revision 1.15, Mon Nov 21 18:20:43 2022 UTC (2 months, 1 week ago) by jperkin
Branch: MAIN
Changes since 1.14: +4 -1 lines

*: Re-apply SunOS linker argument removals.

These are currently duplicated in mk/platform/SunOS.mk but the generic
removals will be removed soon in favour of per-package removals, due to
flags getting leaked into installed files.

# $NetBSD: Makefile.common,v 1.15 2022/11/21 18:20:43 jperkin Exp $
# used by graphics/opencv/Makefile
# used by graphics/opencv-contrib-face/Makefile
#
# DO NOT FORGET to regen graphics/opencv-contrib-face/distinfo!

OPENCV_VERSION=	3.4.16

CATEGORIES=	graphics devel
MASTER_SITES=	${MASTER_SITE_GITHUB:=opencv/}

HOMEPAGE=	https://opencv.org/
LICENSE=	modified-bsd

PATCHDIR=	${.CURDIR}/../../graphics/opencv/patches

USE_CMAKE=		yes
USE_LANGUAGES=		c c++11
USE_PKGLOCALEDIR=	yes
USE_TOOLS+=		gmake pkg-config
CONFIGURE_DIRS+=	build
CONFIGURE_ENV+=		MACHINE_ARCH=${MACHINE_ARCH}

CHECK_PORTABILITY_SKIP+=	platforms/ios/cmake/Toolchains/xcodebuild_wrapper.in
CHECK_PORTABILITY_SKIP+=	cmake/templates/xcode-*

CMAKE_ARG_PATH=		${WRKSRC}
CMAKE_ARGS+=		-DBUILD_JAVA=OFF
CMAKE_ARGS+=		-DBUILD_PROTOBUF=OFF
CMAKE_ARGS+=		-DCV_ENABLE_INTRINSICS=OFF # XXX: problematic
CMAKE_ARGS+=		-DENABLE_CCACHE=OFF
CMAKE_ARGS+=		-DOPENCV_GENERATE_SETUPVARS=OFF
CMAKE_ARGS+=		-DPROTOBUF_UPDATE_FILES=ON
CMAKE_ARGS+=		-DWITH_EIGEN=OFF
CMAKE_ARGS+=		-DZLIB_ROOT=${BUILDLINK_PREFIX.zlib}
CMAKE_ARGS.SunOS+=	-DENABLE_PRECOMPILED_HEADERS=OFF
CMAKE_ARGS.SunOS+=	-DOPENCV_PYTHON_SKIP_LINKER_EXCLUDE_LIBS=ON

BUILDLINK_TRANSFORM+=	rm:-Werror=non-virtual-dtor

BUILDLINK_TRANSFORM.SunOS+=	rm:-Wl,--as-needed
BUILDLINK_TRANSFORM.SunOS+=	rm:-Wl,--gc-sections

.include "../../mk/bsd.prefs.mk"

.if ${MACHINE_ARCH} == "i386"
# Disable SSE/SSE2 to avoid build errors from missing _mm_pause.
CMAKE_ARGS+=		-DCPU_BASELINE=""
.endif

PYTHON_VERSIONS_INCOMPATIBLE=	27	# avoid Python 2.7

pre-configure:
	${MKDIR} ${WRKSRC}/build

.include "../../mk/atomic64.mk"
.include "../../lang/python/pyversion.mk"