From 0df8d006f641bc86f2883e28c8d96fbdcfc59bd9 Mon Sep 17 00:00:00 2001 From: Muhammad Moinur Rahman Date: Thu, 17 Aug 2023 20:32:30 +0200 Subject: graphics/opendx: Fix build on 14 - Utilize USES=localbase - Pet portclippy Approved by: portmgr (blanket) Sponsored by: The FreeBSD Foundation --- graphics/opendx/Makefile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/graphics/opendx/Makefile b/graphics/opendx/Makefile index 835c6ba1c545..dde4473f5487 100644 --- a/graphics/opendx/Makefile +++ b/graphics/opendx/Makefile @@ -19,20 +19,24 @@ BROKEN_aarch64= fails to link: undefined symbol: sbrk LIB_DEPENDS= libtiff.so:graphics/tiff \ libcdf.so:science/cdf -MAKE_JOBS_UNSAFE= yes -USES= bison compiler:c++17-lang gl gmake libtool magick:6 motif xorg -USE_XORG= x11 xt xinerama xext xpm xmu sm ice +USES= bison compiler:c++17-lang gl gmake libtool localbase:ldflags magick:6 motif xorg USE_GL= gl glu +USE_LDCONFIG= yes +USE_XORG= x11 xt xinerama xext xpm xmu sm ice + GNU_CONFIGURE= yes CONFIGURE_ARGS= --enable-shared -USE_LDCONFIG= yes CONFIGURE_ENV= ARCH=freebsd -CPPFLAGS+= ${CXXFLAGS} -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib + +MAKE_JOBS_UNSAFE= yes + +CPPFLAGS+= ${CXXFLAGS} + NO_MTREE= yes -PLIST_SUB= ARCH=freebsd + PKGMESSAGE= ${WRKDIR}/pkg-message +PLIST_SUB= ARCH=freebsd .if defined(WITH_HDF) && !defined(WITHOUT_NETCDF) IGNORE= HDF and NETCDF are conflicting .endif @@ -66,6 +70,17 @@ PLIST_SUB+= JAVA="@comment " PLIST_SUB+= UNAMEP=${ARCH} +.include + +.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) +USES+= llvm:max=15 +CC= clang${LLVM_VERSION} +CPP= clang-cpp${LLVM_VERSION} +CXX= clang++${LLVM_VERSION} +CONFIGURE_ENV+= ac_cv_requires_lstdcxx=yes +CFLAGS+= -Wno-error=incompatible-function-pointer-types +.endif + .include post-patch: -- cgit v1.2.3