audio/zita-jclient: Make march=native conditional on the new option NATIVE, and remove -O2

PR:		258480
Reported by:	mikael (submitted original patch)
This commit is contained in:
Yuri Victorovich 2021-09-13 10:20:46 -07:00
parent 0ef0899d8e
commit 129d59283f
2 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= zita-jclient
DISTVERSION= 0.4.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= https://kokkinizita.linuxaudio.org/linuxaudio/downloads/
@ -23,6 +23,11 @@ PLIST_FILES= include/zita-jclient.h \
lib/libzita-jclient.so \
lib/libzita-jclient.so.${PORTVERSION}
OPTIONS_DEFINE= NATIVE
NATIVE_DESC= Build with native optimizations (-march=native)
NATIVE_MAKE_ARGS= FREEBSD_CXXFLAGS_EXTRA="-march=native"
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libzita-jclient.so.${PORTVERSION}

View File

@ -1,4 +1,4 @@
--- Makefile.orig 2021-07-27 18:24:41 UTC
--- Makefile.orig 2018-08-24 18:41:55 UTC
+++ Makefile
@@ -20,7 +20,7 @@
@ -9,6 +9,17 @@
PREFIX ?= /usr/local
INCDIR ?= $(PREFIX)/include
LIBDIR ?= $(PREFIX)/lib$(SUFFIX)
@@ -31,8 +31,8 @@ VERSION = $(MAJVERS).$(MINVERS)
CPPFLAGS += -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-CXXFLAGS += -Wall -fPIC -O2 -ffast-math
-CXXFLAGS += -march=native
+CXXFLAGS += -Wall -fPIC -ffast-math
+CXXFLAGS += ${FREEBSD_CXXFLAGS_EXTRA}
LDFLAGS +=
LDLIBS +=
@@ -56,7 +56,7 @@ install: $(ZITA-JCLIENT_MIN)
install -d $(DESTDIR)$(LIBDIR)
install -m 644 $(ZITA-JCLIENT_H) $(DESTDIR)$(INCDIR)