2013-03-08 15:00:30 +01:00
|
|
|
# Created by: Emanuel Haupt <ehaupt@critical.ch>
|
2005-07-19 00:12:49 +02:00
|
|
|
|
|
|
|
PORTNAME= penguinsap
|
|
|
|
PORTVERSION= 0.1
|
|
|
|
CATEGORIES= audio
|
2015-01-06 10:36:21 +01:00
|
|
|
MASTER_SITES= LOCAL/ehaupt
|
2005-07-19 00:12:49 +02:00
|
|
|
|
2005-10-06 13:57:11 +02:00
|
|
|
MAINTAINER= ehaupt@FreeBSD.org
|
2013-03-08 15:00:30 +01:00
|
|
|
COMMENT= Command-line Atari(TM) .sap player
|
2005-07-19 00:12:49 +02:00
|
|
|
|
2013-12-18 12:54:56 +01:00
|
|
|
USES= compiler dos2unix
|
2011-06-21 13:07:55 +02:00
|
|
|
|
2005-07-19 00:12:49 +02:00
|
|
|
SOURCES= sapPokey pokey1 sapCpu sapEngine main pokey0
|
|
|
|
|
|
|
|
.if defined(WITH_OPTIMIZED_CFLAGS)
|
|
|
|
EXTRAFLAGS= -ffast-math -malign-double -finline-limit-1000000 \
|
|
|
|
-funroll-loops -fstrength-reduce -finline-functions
|
|
|
|
.endif
|
|
|
|
|
|
|
|
PLIST_FILES= bin/sap
|
|
|
|
|
2011-06-21 13:07:55 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
audio/xmms-sapp, audio/penguinsap: Rework exception flags
The wrong C++ flag, --no-exceptions, was being passed to these ports. The
correct flag is "-fno-exceptions". Apparently gcc accepts the former, but
clang does not.
The current code states that clang version 3.2 will accept --no-exceptions,
but this isn't the case either. However, both of these ports will build
without a no-exceptions flag with clang. GCC still requires it.
Rework the clang detection code. If code is not detected, -fno-exceptions
is added to CXXFLAGS, otherwise nothing is done. Besides fixing the flag
handling, this implemention avoids the bmake errors that _CLANG!= was
generating.
Approved by: bapt (mentor), maintainer
2013-07-25 11:38:40 +02:00
|
|
|
# clang can build this without -fno-exceptions
|
2013-11-12 16:59:47 +01:00
|
|
|
.if ${COMPILER_TYPE} == "gcc"
|
audio/xmms-sapp, audio/penguinsap: Rework exception flags
The wrong C++ flag, --no-exceptions, was being passed to these ports. The
correct flag is "-fno-exceptions". Apparently gcc accepts the former, but
clang does not.
The current code states that clang version 3.2 will accept --no-exceptions,
but this isn't the case either. However, both of these ports will build
without a no-exceptions flag with clang. GCC still requires it.
Rework the clang detection code. If code is not detected, -fno-exceptions
is added to CXXFLAGS, otherwise nothing is done. Besides fixing the flag
handling, this implemention avoids the bmake errors that _CLANG!= was
generating.
Approved by: bapt (mentor), maintainer
2013-07-25 11:38:40 +02:00
|
|
|
CXXFLAGS+= -fno-exceptions
|
2013-05-22 20:39:37 +02:00
|
|
|
.endif
|
2011-06-21 13:07:55 +02:00
|
|
|
|
2005-07-19 00:12:49 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|linux/soundcard\.h|sys/soundcard\.h|' \
|
|
|
|
${WRKSRC}/main.cpp
|
2011-06-21 13:07:55 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|--no-exceptions||' ${WRKSRC}/build.inc
|
2005-07-19 00:12:49 +02:00
|
|
|
|
|
|
|
do-build:
|
|
|
|
.for f in ${SOURCES}
|
|
|
|
${CXX} ${CXXFLAGS} ${EXTRAFLAGS} -c ${WRKSRC}/${f}.cpp \
|
|
|
|
-o ${WRKSRC}/${f}.o
|
|
|
|
.endfor
|
|
|
|
${CC} ${CFLAGS} ${EXTRAFLAGS} ${SOURCES:C/(.*)/${WRKSRC}\/\1.o/} \
|
|
|
|
-o ${WRKSRC}/sap
|
|
|
|
|
|
|
|
do-install:
|
2013-10-23 22:30:50 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/sap ${STAGEDIR}${PREFIX}/bin
|
2005-07-19 00:12:49 +02:00
|
|
|
|
2011-06-21 13:07:55 +02:00
|
|
|
.include <bsd.port.post.mk>
|