freebsd-ports/astro/opencpn/Makefile
Piotr Kubaj ec567e3a1f astro/opencpn: fix build on powerpc64 elfv2
For some reason SSE support is misdetected on by clang:
-- Probing for compiler -msse support -- OK
-- Probing for compiler -msse2 support -- OK
-- Probing for compiler -msse3 support -- OK
-- Probing for compiler -mavx2 support -- OK

Later:
In file included from /wrkdirs/usr/ports/astro/opencpn/work/OpenCPN-5.2.0/libs/texcmp/squish/clusterfit.cpp:27:
In file included from /wrkdirs/usr/ports/astro/opencpn/work/OpenCPN-5.2.0/libs/texcmp/squish/clusterfit.h:32:
In file included from /wrkdirs/usr/ports/astro/opencpn/work/OpenCPN-5.2.0/libs/texcmp/squish/simd.h:34:
In file included from /wrkdirs/usr/ports/astro/opencpn/work/OpenCPN-5.2.0/libs/texcmp/squish/simd_sse.h:29:
In file included from /usr/lib/clang/11.0.0/include/xmmintrin.h:13:
/usr/lib/clang/11.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
2020-11-15 14:12:22 +00:00

60 lines
1.5 KiB
Makefile

# $FreeBSD$
PORTNAME= opencpn
PORTVERSION= 5.2.0
DISTVERSIONPREFIX= v
CATEGORIES= astro geography
MAINTAINER= ml@netfence.it
COMMENT= Concise ChartPlotter/Navigator
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING.gplv2
LIB_DEPENDS= libportaudio.so:audio/portaudio \
libcurl.so:ftp/curl \
libexpat.so:textproc/expat2 \
libtinyxml.so:textproc/tinyxml \
liblz4.so:archivers/liblz4
USES= cmake compiler:c++11-lang gettext-tools gl gnome \
localbase pkgconfig sqlite xorg
USE_CXXSTD= c++11
USE_GITHUB= yes
GH_ACCOUNT= ${GH_PROJECT}
GH_PROJECT= OpenCPN
USE_GL= gl
USE_GNOME= cairo gdkpixbuf2 gtk30 pango
INSTALLS_ICONS= yes
USE_LDCONFIG= ${PREFIX}/lib/opencpn
USE_WX= 3.0+
USE_XORG= ice sm x11 xext
CMAKE_ARGS= -DOCPN_BUNDLE_GSHHS=CRUDE
CMAKE_ON= OCPN_BUNDLE_TCDATA OCPN_FORCE_GTK3
CMAKE_OFF= OCPN_USE_NEWSERIAL
OPTIONS_DEFINE= DOCS
DOCS_CMAKE_ON= -DOCPN_BUNDLE_DOCS:STRING="ON"
DOCS_CMAKE_OFF= -DOCPN_BUNDLE_DOCS:STRING="OFF"
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc64
CMAKE_ARGS+= -DHAVE_MSSE=OFF -DHAVE_MSSE2=OFF -DHAVE_MSSE3=OFF -DHAVE_MAVX2=OFF -DHAVE_MFPU_NEON=OFF
.endif
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},' \
${WRKSRC}/libs/gdal/src/cpl_csv.cpp \
${WRKSRC}/libs/gdal/src/cpl_findfile.cpp \
${WRKSRC}/data/doc/help_en_US.html
.if ${ARCH} != amd64 && ${ARCH} != i386
@${REINPLACE_CMD} -e '/-msse/d' -e '/-mssse3/d' \
-e '/-mavx2/d' ${WRKSRC}/CMakeLists.txt
.endif
.include <bsd.port.post.mk>