Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Too many changes since v1.26 to list here Changes: https://yanglab.westlake.edu.cn/software/gcta/#Download Reported by: pkg-fallout
- Loading branch information
Jason W. Bacon
authored and
Jason W. Bacon
committed
Oct 14, 2023
1 parent
8cab786
commit 9d8c5cb
Showing
14 changed files
with
218 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
PORTNAME= gcta | ||
DISTVERSION= 1.26.0 | ||
PORTREVISION= 4 | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 1.94.1 | ||
CATEGORIES= biology | ||
MASTER_SITES= https://cnsgenomics.com/software/gcta/pre_gcta/:main \ | ||
https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_VERSION}/:eigen | ||
DISTFILES= ${PORTNAME}_${DISTVERSION}_src${EXTRACT_SUFX}:main \ | ||
eigen-${EIGEN_VERSION}.tar.gz:eigen | ||
|
||
MAINTAINER= jwb@FreeBSD.org | ||
COMMENT= Genome-wide Complex Trait Analysis | ||
WWW= https://cnsgenomics.com/software/gcta/index.html | ||
|
||
LICENSE= GPLv3 | ||
LICENSE_FILE= ${WRKSRC}/GNU_General_Public_License_v3.txt | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
LIB_DEPENDS= libopenblas.so:math/openblas | ||
BUILD_DEPENDS= boost-libs>0:devel/boost-libs \ | ||
spectra>0:math/spectra | ||
LIB_DEPENDS= libgsl.so:math/gsl \ | ||
libopenblas.so:math/openblas \ | ||
libsqlite3.so:databases/sqlite3 \ | ||
libzstd.so:archivers/zstd | ||
|
||
USES= compiler:c++11-lang dos2unix gmake localbase:ldflags zip | ||
USES= cmake eigen:3 localbase:ldflags | ||
USE_GITHUB= yes | ||
|
||
CXXFLAGS+= -I${WRKDIR}/eigen-${EIGEN_VERSION} -fopenmp | ||
LDFLAGS+= -lopenblas | ||
GH_ACCOUNT= jianyangqt | ||
GH_TUPLE= zhilizheng:plink-ng:3744540:plink/submods/plink-ng | ||
|
||
INSTALL_TARGET= install-strip | ||
PLIST_FILES= bin/gcta | ||
CONFIGURE_ENV+= EIGEN3_INCLUDE_DIR=${LOCALBASE}/include/eigen3 \ | ||
BOOST_INCLUDE_DIR=${LOCALBASE}/include/boost \ | ||
OPENBLAS=${LOCALBASE} \ | ||
SPECTRA_INCLUDE_DIR=${LOCALBASE}/include/Spectra | ||
|
||
EIGEN_VERSION= 3.3.9 | ||
LDFLAGS+= -fopenmp | ||
|
||
do-extract: | ||
@${UNZIP_NATIVE_CMD} -d ${WRKSRC} ${DISTDIR}/${PORTNAME}_${DISTVERSION}_src${EXTRACT_SUFX} | ||
@cd ${WRKDIR} && \ | ||
${TAR} xzf ${DISTDIR}/eigen-${EIGEN_VERSION}.tar.gz | ||
PLIST_FILES= bin/gcta64 bin/gcta | ||
|
||
do-install: | ||
@${MKDIR} ${STAGEDIR}${PREFIX}/bin | ||
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gcta64 ${STAGEDIR}${PREFIX}/bin | ||
${RLN} ${STAGEDIR}${PREFIX}/bin/gcta64 ${STAGEDIR}${PREFIX}/bin/gcta | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
TIMESTAMP = 1657137653 | ||
SHA256 (gcta_1.26.0_src.zip) = 554c48f421c93cbaf64b1c300ca507d8e7a56086b5c7d857227fbd4048f42acf | ||
SIZE (gcta_1.26.0_src.zip) = 198045 | ||
SHA256 (eigen-3.3.9.tar.gz) = 7985975b787340124786f092b3a07d594b2e9cd53bbfe5f3d9b1daee7d55f56f | ||
SIZE (eigen-3.3.9.tar.gz) = 2142379 | ||
TIMESTAMP = 1697202096 | ||
SHA256 (jianyangqt-gcta-v1.94.1_GH0.tar.gz) = d38841587bef016d7885cc1b3287d7ed0373bd370674130e814e2c5e6a90bfbf | ||
SIZE (jianyangqt-gcta-v1.94.1_GH0.tar.gz) = 1101577 | ||
SHA256 (zhilizheng-plink-ng-3744540_GH0.tar.gz) = dfa4879bc6bcbe24411451748c7c5dc803e42cafa55b008134f0d123cd933222 | ||
SIZE (zhilizheng-plink-ng-3744540_GH0.tar.gz) = 3222588 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- CMakeLists.txt.orig 2022-08-03 06:01:52 UTC | ||
+++ CMakeLists.txt | ||
@@ -3,7 +3,7 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
SET(PROJECT_NAME_STR GCTA2) | ||
PROJECT(${PROJECT_NAME_STR} C CXX) | ||
SET(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
-SET(CMAKE_CXX_STANDARD 11) | ||
+SET(CMAKE_CXX_STANDARD 14) | ||
SET(CMAKE_C_STANDARD 11) | ||
|
||
# get system architecture | ||
@@ -16,8 +16,8 @@ endif() | ||
MESSAGE(FATAL_ERROR "Use the Visual Studio project file which located in gcta_win64 directory") | ||
endif() | ||
|
||
-if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") | ||
- MESSAGE("Linux and Mac are supported.") | ||
+if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") | ||
+ MESSAGE("FreeBSD, Linux and Mac are supported.") | ||
else() | ||
MESSAGE("Your system: ${CMAKE_SYSTEM_NAME}") | ||
MESSAGE(FATAL_ERROR "Only Linux and Mac are currently supported.") | ||
@@ -43,18 +43,18 @@ INCLUDE_DIRECTORIES("${EIGEN3_INCLUDE_DIR}") | ||
ENDIF() | ||
INCLUDE_DIRECTORIES("${EIGEN3_INCLUDE_DIR}") | ||
|
||
-SET(SPECTRA_LIB "$ENV{SPECTRA_LIB}") | ||
-IF(NOT SPECTRA_LIB) | ||
- MESSAGE(FATAL_ERROR "Specify environment variable SPECTRA_LIB to the location of Spectra package") | ||
+SET(SPECTRA_INCLUDE_DIR "$ENV{SPECTRA_INCLUDE_DIR}") | ||
+IF(NOT SPECTRA_INCLUDE_DIR) | ||
+ MESSAGE(FATAL_ERROR "Specify environment variable SPECTRA_INCLUDE_DIR to the location of Spectra package") | ||
ENDIF() | ||
-INCLUDE_DIRECTORIES("${SPECTRA_LIB}") | ||
+INCLUDE_DIRECTORIES("${SPECTRA_INCLUDE_DIR}") | ||
|
||
|
||
-SET(BOOST_LIB "$ENV{BOOST_LIB}") | ||
-IF(NOT BOOST_LIB) | ||
- MESSAGE(FATAL_ERROR "Specify environment variable BOOST_LIB to the location of BOOST library") | ||
+SET(BOOST_INCLUDE_DIR "$ENV{BOOST_INCLUDE_DIR}") | ||
+IF(NOT BOOST_INCLUDE_DIR) | ||
+ MESSAGE(FATAL_ERROR "Specify environment variable BOOST_INCLUDE_DIR to the location of BOOST headers") | ||
ENDIF() | ||
-INCLUDE_DIRECTORIES("${BOOST_LIB}") | ||
+INCLUDE_DIRECTORIES("${BOOST_INCLUDE_DIR}") | ||
|
||
|
||
# PLINK2.0 pgen library; | ||
@@ -63,13 +63,28 @@ message(STATUS "ARCHITECTURE:${CMAKE_LIBRARY_ARCHITECT | ||
|
||
|
||
message(STATUS "ARCHITECTURE:${CMAKE_LIBRARY_ARCHITECTURE}") | ||
-if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64") | ||
+if("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") | ||
SET(OPENBLAS "$ENV{OPENBLAS}") | ||
IF(NOT OPENBLAS) | ||
MESSAGE(FATAL_ERROR "Specify environment variable OPENBLAS to the location of OPENBLAS package") | ||
ENDIF() | ||
INCLUDE_DIRECTORIES("${OPENBLAS}/include") | ||
|
||
+ find_library(lib_openblas NAMES openblas PATHS "${OPENBLAS}" "${LOCALBASE}/lib") | ||
+ set(BLAS_LIB ${lib_openblas}) | ||
+ | ||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | ||
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") | ||
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g") | ||
+ add_compile_options(-fopenmp) | ||
+ | ||
+elseif(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64") | ||
+ SET(OPENBLAS "$ENV{OPENBLAS}") | ||
+ IF(NOT OPENBLAS) | ||
+ MESSAGE(FATAL_ERROR "Specify environment variable OPENBLAS to the location of OPENBLAS package") | ||
+ ENDIF() | ||
+ INCLUDE_DIRECTORIES("${OPENBLAS}/include") | ||
+ | ||
find_library(lib_openblas NAMES openblas PATHS "${OPENBLAS}" "${OPENBLAS}/lib") | ||
set(BLAS_LIB ${lib_openblas}) | ||
|
||
@@ -169,6 +184,8 @@ if(APPLE) | ||
if(APPLE) | ||
link_directories(${MKLROOT}/lib) | ||
link_directories(/usr/local/lib) | ||
+elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") | ||
+ link_directories(${LOCALBASE}/lib) | ||
else(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
#linux | ||
link_directories(${MKLROOT}/../../../lib/intel64) | ||
@@ -179,6 +196,9 @@ if(APPLE) | ||
if(APPLE) | ||
# iomp5 | ||
target_link_libraries(gcta64 ${libs_list} Pgenlib mainV1 z ${BLAS_LIB} sqlite3 zstd_s omp pthread m dl ) | ||
+elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") | ||
+ # FIXME: Clean this up | ||
+ target_link_libraries(gcta64 mainV1 ${libs_list} Pgenlib gsl z sqlite3 zstd -Wl,--start-group ${BLAS_LIB} -Wl,--end-group -Wl,--whole-archive -lpthread -Wl,--no-whole-archive m dl) | ||
else() | ||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# error keeps only |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- include/cpu.h.orig 2023-10-13 13:09:13 UTC | ||
+++ include/cpu.h | ||
@@ -13,7 +13,7 @@ | ||
#define GCTA_ARCH_i386 0 | ||
#endif | ||
|
||
-#if GCTA_ARCH_x86_64 || GCTA_ARCH_i386 | ||
+#if !defined(__FreeBSD__) && (GCTA_ARCH_x86_64 || GCTA_ARCH_i386) | ||
#define GCTA_CPU_x86 1 | ||
#else | ||
#define GCTA_CPU_x86 0 | ||
@@ -50,4 +50,4 @@ | ||
#include <lapack.h> | ||
#endif | ||
|
||
-#endif //END GCTA_CPU_H | ||
\ No newline at end of file | ||
+#endif //END GCTA_CPU_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- include/cpu_f77blas.h.orig 2023-10-13 13:10:15 UTC | ||
+++ include/cpu_f77blas.h | ||
@@ -13,7 +13,7 @@ | ||
#define GCTA_ARCH_i386 0 | ||
#endif | ||
|
||
-#if GCTA_ARCH_x86_64 || GCTA_ARCH_i386 | ||
+#if !defined(__FreeBSD__) && (GCTA_ARCH_x86_64 || GCTA_ARCH_i386) | ||
#define GCTA_CPU_x86 1 | ||
#else | ||
#define GCTA_CPU_x86 0 | ||
@@ -46,4 +46,4 @@ | ||
#include <f77blas.h> | ||
#endif | ||
|
||
-#endif //END GCTA_F77BLAS_CPU_H | ||
\ No newline at end of file | ||
+#endif //END GCTA_F77BLAS_CPU_H |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- main/option.cpp.orig 2023-10-13 13:49:25 UTC | ||
+++ main/option.cpp | ||
@@ -1112,10 +1112,10 @@ void option(int option_num, char* option_str[]) | ||
|
||
#ifdef _WIN32 | ||
if(chbuf != '\\') ref_ld_dirt = ref_ld_dirt + '\\'; | ||
-#elif defined __linux__ || defined __APPLE__ | ||
+#elif defined __FreeBSD__ || defined __linux__ || defined __APPLE__ | ||
if(chbuf != '/') ref_ld_dirt = ref_ld_dirt + '/'; | ||
#else | ||
-#error Only Windows, Mac and Linux are supported. | ||
+#error Only FreeBSD, Windows, Mac and Linux are supported. | ||
#endif | ||
LOGGER << "--ref-ld-chr " << ref_ld_dirt << endl; | ||
} else if (strcmp(argv[i], "--w-ld-chr") == 0) { | ||
@@ -1124,10 +1124,10 @@ void option(int option_num, char* option_str[]) | ||
chbuf = w_ld_dirt.back(); | ||
#ifdef _WIN32 | ||
if(chbuf != '\\') w_ld_dirt = w_ld_dirt + '\\'; | ||
-#elif defined __linux__ || defined __APPLE__ | ||
+#elif defined __FreeBSD__ || defined __linux__ || defined __APPLE__ | ||
if(chbuf != '/') w_ld_dirt = w_ld_dirt + '/'; | ||
#else | ||
-#error Only Windows, Mac and Linux are supported. | ||
+#error Only FreeBSD, Windows, Mac and Linux are supported. | ||
#endif | ||
|
||
LOGGER << "--w-ld-chr " << w_ld_dirt << endl; |
Oops, something went wrong.