diff options
author | Ashish SHUKLA <ashish@FreeBSD.org> | 2017-10-03 08:26:06 +0000 |
---|---|---|
committer | Ashish SHUKLA <ashish@FreeBSD.org> | 2017-10-03 08:26:06 +0000 |
commit | 5d06007d1b5b3b1d97736f41845a0e49628caf4b (patch) | |
tree | 1c6fda3c865d0e10dcd3594a759547cadd154a62 /lang/sagittarius-scheme | |
parent | df038b797ff22b9c166cbcd48ec5433ff8b023bc (diff) | |
download | freebsd-ports-5d06007d1b5b3b1d97736f41845a0e49628caf4b.zip |
- Update to 0.8.7
- Add SIMD option (off by default) to control compilation with SIMD
flags
- Add program to generate cpuinfo required for SIMD support detection
Diffstat (limited to 'lang/sagittarius-scheme')
-rw-r--r-- | lang/sagittarius-scheme/Makefile | 9 | ||||
-rw-r--r-- | lang/sagittarius-scheme/distinfo | 6 | ||||
-rw-r--r-- | lang/sagittarius-scheme/files/cpuid.c | 42 | ||||
-rw-r--r-- | lang/sagittarius-scheme/files/patch-CMakeLists.txt | 4 | ||||
-rw-r--r-- | lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt | 2 | ||||
-rw-r--r-- | lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake | 68 | ||||
-rw-r--r-- | lang/sagittarius-scheme/files/patch-ext_termios_termios.c | 2 | ||||
-rw-r--r-- | lang/sagittarius-scheme/pkg-plist | 3 |
8 files changed, 127 insertions, 9 deletions
diff --git a/lang/sagittarius-scheme/Makefile b/lang/sagittarius-scheme/Makefile index a5d0ca03e994..478fe0ad299a 100644 --- a/lang/sagittarius-scheme/Makefile +++ b/lang/sagittarius-scheme/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= sagittarius -PORTVERSION= 0.8.6 +PORTVERSION= 0.8.7 CATEGORIES= lang MASTER_SITES= https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/ \ LOCAL/ashish @@ -23,12 +23,13 @@ USES= cmake pkgconfig ONLY_FOR_ARCHS= amd64 i386 MAKE_JOBS_UNSAFE= yes -OPTIONS_DEFINE= ODBC +OPTIONS_DEFINE= ODBC SIMD PLIST_SUB= PORTNAME=sagittarius PORTVERSION=${PORTVERSION} ODBC_LIB_DEPENDS= libiodbc.so:databases/libiodbc ODBC_CMAKE_ON= -DODBC_INCLUDE_DIR:STRING=${LOCALBASE}/include/libiodbc +SIMD_CMAKE_BOOL= USE_SSE OPTIONS_SUB= ODBC .include <bsd.port.pre.mk> @@ -42,6 +43,10 @@ PLIST_ARCH= x86_64 PLIST_SUB+= PLIST_ARCH=${PLIST_ARCH} +pre-configure: + @${CC} ${CFLAGS} -o ${WRKDIR}/cpuid ${FILESDIR}/cpuid.c + @${REINPLACE_CMD} -e 's,%%CPUID%%,${WRKDIR}/cpuid,' ${WRKSRC}/cmake/FindSSE.cmake + post-patch-ODBC-off: @${REINPLACE_CMD} -e '/odbc odbc/d' ${WRKSRC}/ext/CMakeLists.txt diff --git a/lang/sagittarius-scheme/distinfo b/lang/sagittarius-scheme/distinfo index bd511cedf6cb..e39177818c59 100644 --- a/lang/sagittarius-scheme/distinfo +++ b/lang/sagittarius-scheme/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1506268065 -SHA256 (sagittarius-0.8.6.tar.gz) = d15a604be5b414bf3c7f2bb101794cc01a05650c81fe889e39521c7c82398243 -SIZE (sagittarius-0.8.6.tar.gz) = 6749494 +TIMESTAMP = 1506920792 +SHA256 (sagittarius-0.8.7.tar.gz) = a7dbca62879c88b89b335557f781ecb98f584ea0e86d3b7a3f4dc649dbbc7b79 +SIZE (sagittarius-0.8.7.tar.gz) = 6798931 diff --git a/lang/sagittarius-scheme/files/cpuid.c b/lang/sagittarius-scheme/files/cpuid.c new file mode 100644 index 000000000000..4f446a239d32 --- /dev/null +++ b/lang/sagittarius-scheme/files/cpuid.c @@ -0,0 +1,42 @@ +#include <stdio.h> + +const char *s_edx[] = { "FPU", "VME", "DE", "PSE", "TSC", "MSR", + "PAE", "MCE", "CX8", "APIC", NULL, "SEP", + "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", + "PSN", "CLFLUSH", NULL, "DTS", "ACPI", "MMX", + "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", + "IA64", "PBE" }; + +const char *s_ecx[] = { "SSE3", "PCLMULQDQ", "DTES64", "MON", "DS_CPL", "VMX", + "SMX", "EST", "TM2", "SSSE3", "CNXT_ID", "SDBG", + "FMA", "CX16", "XTPTR", "PDCM", NULL, "PCID", "DCA", + "SSE4.1", "SSE4.2", "x2APIC", "MOVBE", "POPCNT", + "TSCDLT", "AESNI", "XSAVE", "OSXSAVE", "AVX", "F16C", + "RDRAND", "HYPERVISOR" }; + +#define PRINT_REG(reg) for (f = 1, i = 0; i < 32; i++, f <<= 1 ) { \ + if( NULL != s_##reg[i] ) { \ + if( (reg & f) == f) { \ + if( i !=0 ) \ + putchar(','); \ + printf( "%s", s_##reg[i] ); \ + } \ + } \ + } + + +int +main() +{ + int edx, ecx; + int i, f; + + __asm__("cpuid" : "=c"(ecx), "=d"(edx) : "a"(1)); + + printf( "Features=0x%x<", edx ); + PRINT_REG(edx); + puts(">"); + printf( "Features2=0x%x<", ecx ); + PRINT_REG(ecx); + puts(">"); +} diff --git a/lang/sagittarius-scheme/files/patch-CMakeLists.txt b/lang/sagittarius-scheme/files/patch-CMakeLists.txt index 04736d15aa89..9704d05fdbf3 100644 --- a/lang/sagittarius-scheme/files/patch-CMakeLists.txt +++ b/lang/sagittarius-scheme/files/patch-CMakeLists.txt @@ -1,6 +1,6 @@ ---- CMakeLists.txt.orig 2016-02-19 19:27:37 UTC +--- CMakeLists.txt.orig 2017-09-23 20:35:38 UTC +++ CMakeLists.txt -@@ -38,7 +38,7 @@ GET_PARAMETER(INCLUDE_DIR include) +@@ -42,7 +42,7 @@ GET_PARAMETER(INCLUDE_DIR include) GET_PARAMETER(SHARE_DIR share) # FreeBSD ports adds a patch for this directory # so make it configurable diff --git a/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt b/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt index d42b441f84ce..748a6bf91acf 100644 --- a/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt +++ b/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt @@ -1,4 +1,4 @@ ---- cmake/CMakeLists.txt.orig 2016-02-19 19:27:42 UTC +--- cmake/CMakeLists.txt.orig 2017-09-23 20:35:38 UTC +++ cmake/CMakeLists.txt @@ -1,5 +1,5 @@ # Post install script diff --git a/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake b/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake new file mode 100644 index 000000000000..0ca7520895a1 --- /dev/null +++ b/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake @@ -0,0 +1,68 @@ +--- cmake/FindSSE.cmake.orig 2017-09-23 20:35:38 UTC ++++ cmake/FindSSE.cmake +@@ -5,6 +5,7 @@ + MACRO (FindSSE) + # SSE is only for x86 and relatives + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR ++ CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CYGWIN) + EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) +@@ -122,6 +123,57 @@ MACRO (FindSSE) + set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") + set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") + set(AVX_FOUND false CACHE BOOL "AVX available on host") ++ ++ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") ++ EXEC_PROGRAM(%%CPUID%% OUTPUT_VARIABLE CPUINFO) ++ ++ STRING(REGEX REPLACE "^.*,(SSE2).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE) ++ IF (SSE2_TRUE) ++ set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") ++ ELSE (SSE2_TRUE) ++ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host") ++ ENDIF (SSE2_TRUE) ++ ++ STRING(REGEX REPLACE "^.*<(SSE3).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE) ++ ++ STRING(REGEX REPLACE "^.*,(SSSE3).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE) ++ IF (SSE3_TRUE OR SSSE3_TRUE) ++ set(SSE3_FOUND true CACHE BOOL "SSE3 available on host") ++ ELSE (SSE3_TRUE OR SSSE3_TRUE) ++ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") ++ ENDIF (SSE3_TRUE OR SSSE3_TRUE) ++ IF (SSSE3_TRUE) ++ set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host") ++ ELSE (SSSE3_TRUE) ++ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") ++ ENDIF (SSSE3_TRUE) ++ ++ STRING(REGEX REPLACE "^.*,(SSE4\\.1).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE) ++ IF (SSE41_TRUE) ++ set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host") ++ ELSE (SSE41_TRUE) ++ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") ++ ENDIF (SSE41_TRUE) ++ ++ STRING(REGEX REPLACE "^.*,(SSE4\\.2).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE) ++ IF (SSE42_TRUE) ++ set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host") ++ ELSE (SSE42_TRUE) ++ set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") ++ ENDIF (SSE42_TRUE) ++ ++ STRING(REGEX REPLACE "^.*,(AVX).*$" "\\1" SSE_THERE ${CPUINFO}) ++ STRING(COMPARE EQUAL "AVX" "${SSE_THERE}" AVX_TRUE) ++ IF (AVX_TRUE) ++ set(AVX_FOUND true CACHE BOOL "AVX available on host") ++ ELSE (AVX_TRUE) ++ set(AVX_FOUND false CACHE BOOL "AVX available on host") ++ ENDIF (AVX_TRUE) + ELSE() + set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") + set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") diff --git a/lang/sagittarius-scheme/files/patch-ext_termios_termios.c b/lang/sagittarius-scheme/files/patch-ext_termios_termios.c index f3dfd7f41bc9..5a6e979c5535 100644 --- a/lang/sagittarius-scheme/files/patch-ext_termios_termios.c +++ b/lang/sagittarius-scheme/files/patch-ext_termios_termios.c @@ -1,4 +1,4 @@ ---- ext/termios/termios.c.orig 2016-02-19 19:27:59 UTC +--- ext/termios/termios.c.orig 2017-09-23 20:35:41 UTC +++ ext/termios/termios.c @@ -457,29 +457,29 @@ SG_EXTENSION_ENTRY void Sg_Init_sagittar TERMIOS_VAR(OCRNL); diff --git a/lang/sagittarius-scheme/pkg-plist b/lang/sagittarius-scheme/pkg-plist index ffd4be33e0a3..2c87cf016976 100644 --- a/lang/sagittarius-scheme/pkg-plist +++ b/lang/sagittarius-scheme/pkg-plist @@ -546,6 +546,8 @@ libdata/pkgconfig/%%PORTNAME%%.pc %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a143/fixnums.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a144.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a144/flonums.scm +%%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a145.scm +%%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a145/assumptions.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a151.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a151/bitwise.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/%3a17.scm @@ -652,6 +654,7 @@ libdata/pkgconfig/%%PORTNAME%%.pc %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/142.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/143.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/144.scm +%%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/145.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/151.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/17.scm %%DATADIR%%/%%PORTVERSION%%/sitelib/srfi/2.scm |