svn commit: r451116 - in head/lang/sagittarius-scheme: . files
Ashish SHUKLA
ashish at FreeBSD.org
Tue Oct 3 08:26:08 UTC 2017
Author: ashish
Date: Tue Oct 3 08:26:06 2017
New Revision: 451116
URL: https://svnweb.freebsd.org/changeset/ports/451116
Log:
- 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
Added:
head/lang/sagittarius-scheme/files/cpuid.c (contents, props changed)
head/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake (contents, props changed)
Modified:
head/lang/sagittarius-scheme/Makefile
head/lang/sagittarius-scheme/distinfo
head/lang/sagittarius-scheme/files/patch-CMakeLists.txt
head/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt
head/lang/sagittarius-scheme/files/patch-ext_termios_termios.c
head/lang/sagittarius-scheme/pkg-plist
Modified: head/lang/sagittarius-scheme/Makefile
==============================================================================
--- head/lang/sagittarius-scheme/Makefile Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/Makefile Tue Oct 3 08:26:06 2017 (r451116)
@@ -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>
@@ -41,6 +42,10 @@ PLIST_ARCH= x86_64
.endif
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
Modified: head/lang/sagittarius-scheme/distinfo
==============================================================================
--- head/lang/sagittarius-scheme/distinfo Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/distinfo Tue Oct 3 08:26:06 2017 (r451116)
@@ -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
Added: head/lang/sagittarius-scheme/files/cpuid.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/sagittarius-scheme/files/cpuid.c Tue Oct 3 08:26:06 2017 (r451116)
@@ -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(">");
+}
Modified: head/lang/sagittarius-scheme/files/patch-CMakeLists.txt
==============================================================================
--- head/lang/sagittarius-scheme/files/patch-CMakeLists.txt Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/files/patch-CMakeLists.txt Tue Oct 3 08:26:06 2017 (r451116)
@@ -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
Modified: head/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt
==============================================================================
--- head/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/files/patch-cmake_CMakeLists.txt Tue Oct 3 08:26:06 2017 (r451116)
@@ -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
Added: head/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/sagittarius-scheme/files/patch-cmake_FindSSE.cmake Tue Oct 3 08:26:06 2017 (r451116)
@@ -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")
Modified: head/lang/sagittarius-scheme/files/patch-ext_termios_termios.c
==============================================================================
--- head/lang/sagittarius-scheme/files/patch-ext_termios_termios.c Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/files/patch-ext_termios_termios.c Tue Oct 3 08:26:06 2017 (r451116)
@@ -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);
Modified: head/lang/sagittarius-scheme/pkg-plist
==============================================================================
--- head/lang/sagittarius-scheme/pkg-plist Tue Oct 3 08:11:15 2017 (r451115)
+++ head/lang/sagittarius-scheme/pkg-plist Tue Oct 3 08:26:06 2017 (r451116)
@@ -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
More information about the svn-ports-head
mailing list