aboutsummaryrefslogtreecommitdiff
path: root/math/pffft/Makefile
blob: ad486c97dd63f70ef06daf70bd9e7d8398fe04bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
PORTNAME=	pffft
PORTVERSION=	g20210806
CATEGORIES=	math

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Pretty Fast FFT (PFFFT) library
WWW=		https://github.com/marton78/pffft

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

USES=		cmake
USE_LDCONFIG=	yes

USE_GITHUB=	yes
GH_ACCOUNT=	marton78
GH_TAGNAME=	9603871

CMAKE_ON=	BUILD_SHARED_LIBS INSTALL_PFDSP INSTALL_PFFASTCONV

.include <bsd.port.pre.mk>

.if ${ARCH} == i386
CFLAGS+=	-msse2
CXXFLAGS+=	-msse2 # fixes error: always_inline function '_mm_unpacklo_ps' requires target feature 'sse', but would be inlined into function 'pffft_zreorder' that is compiled without support for 'sse'
.elif ${ARCH:Mpowerpc*}
CMAKE_ARGS+=	-DUSE_SIMD:BOOL=OFF #https://github.com/marton78/pffft/issues/55
.endif

post-install: # move headers into a dedicated directory
	cd ${STAGEDIR}${PREFIX} && \
		${MKDIR} include/${PORTNAME} && \
		${MV} include/*.h include/*.hpp include/${PORTNAME}

.include <bsd.port.post.mk>