aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason W. Bacon <jwb@FreeBSD.org>2022-11-24 14:10:13 +0000
committerJason W. Bacon <jwb@FreeBSD.org>2022-11-24 14:10:13 +0000
commit4b987075629fc9516f81c5f2b94afe6c5f04f9d3 (patch)
tree106f05274bedc46f09d58a165b6654f4eb0bc736
parentbbdc4e71a8bf27e920b8dedb36846682ae3f397c (diff)
downloadports-4b987075629fc9516f81c5f2b94afe6c5f04f9d3.tar.gz
ports-4b987075629fc9516f81c5f2b94afe6c5f04f9d3.zip
biology/megahit: Add cmake patch to respect ports build flags
Removes agressive optimizations hard-coded upstream
-rw-r--r--biology/megahit/Makefile1
-rw-r--r--biology/megahit/files/patch-CMakeLists.txt17
2 files changed, 18 insertions, 0 deletions
diff --git a/biology/megahit/Makefile b/biology/megahit/Makefile
index 30080e9d2564..379440059baa 100644
--- a/biology/megahit/Makefile
+++ b/biology/megahit/Makefile
@@ -1,6 +1,7 @@
PORTNAME= megahit
DISTVERSIONPREFIX= v
DISTVERSION= 1.2.9
+PORTREVISION= 1
CATEGORIES= biology
MAINTAINER= jwb@FreeBSD.org
diff --git a/biology/megahit/files/patch-CMakeLists.txt b/biology/megahit/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d879052c7f02
--- /dev/null
+++ b/biology/megahit/files/patch-CMakeLists.txt
@@ -0,0 +1,17 @@
+--- CMakeLists.txt.orig 2019-10-15 02:51:03 UTC
++++ CMakeLists.txt
+@@ -42,13 +42,12 @@ find_package(OpenMP REQUIRED)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXXH_INLINE_ALL -ftemplate-depth=3000")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-function")
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprefetch-loop-arrays -funroll-loops")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__XROOT__='\"${CMAKE_SOURCE_DIR}/src\"'")
+ #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__XFILE__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
+
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ZLIB_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+
+-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
++set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb -O1 -D_LIBCPP_DEBUG -D_GLIBCXX_DEBUG")
+
+ if (COVERAGE)