summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHironori-Yamaji <52182908+Hironori-Yamaji@users.noreply.github.com>2019-09-05 23:37:21 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2019-09-05 09:37:21 -0500
commited6a2f0ef9fd7db1f8313bccdbc91a2528150c5c (patch)
tree4283a6797f3494d18301c71aa02ba5c496d43424 /var
parentad93f47c8f6de0a58e471cae174a09681e1c2986 (diff)
downloadspack-ed6a2f0ef9fd7db1f8313bccdbc91a2528150c5c.tar.gz
spack-ed6a2f0ef9fd7db1f8313bccdbc91a2528150c5c.tar.bz2
spack-ed6a2f0ef9fd7db1f8313bccdbc91a2528150c5c.tar.xz
spack-ed6a2f0ef9fd7db1f8313bccdbc91a2528150c5c.zip
textparser: new package (#12713)
* textparser: new package * textparser: use 'parallel = False'
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/textparser/fix_compiler_options.patch55
-rw-r--r--var/spack/repos/builtin/packages/textparser/package.py57
2 files changed, 112 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/textparser/fix_compiler_options.patch b/var/spack/repos/builtin/packages/textparser/fix_compiler_options.patch
new file mode 100644
index 0000000000..3481ec32b8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/textparser/fix_compiler_options.patch
@@ -0,0 +1,55 @@
+diff -ruN TextParser.org/cmake/CompileOptionSelector.cmake TextParser.fix/cmake/CompileOptionSelector.cmake
+--- TextParser.org/cmake/CompileOptionSelector.cmake 2019-09-04 09:59:21.533841689 +0900
++++ TextParser.fix/cmake/CompileOptionSelector.cmake 2019-09-04 09:58:26.358051534 +0900
+@@ -25,8 +25,8 @@
+ endif()
+
+ elseif (USE_F_TCS STREQUAL "YES")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Kfast -Xg")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Kfast -Xg")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Kfast -Nclang")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Kfast -Nclang")
+ # -Xg : gcc compatible flag
+ # -fPIC : PIC flag
+ if(enable_fapi)
+diff -ruN TextParser.org/cmake/Toolchain_fx100.cmake TextParser.fix/cmake/Toolchain_fx100.cmake
+--- TextParser.org/cmake/Toolchain_fx100.cmake 2019-09-04 09:59:21.533841689 +0900
++++ TextParser.fix/cmake/Toolchain_fx100.cmake 2019-09-04 09:58:26.358051534 +0900
+@@ -3,18 +3,18 @@
+ include(CMakeForceCompiler)
+
+ if(with_MPI)
+- CMAKE_FORCE_C_COMPILER(mpifccpx GNU)
+- CMAKE_FORCE_CXX_COMPILER(mpiFCCpx GNU)
+- CMAKE_FORCE_Fortran_COMPILER(mpifrtpx GNU)
++ CMAKE_FORCE_C_COMPILER(mpicc GNU)
++ CMAKE_FORCE_CXX_COMPILER(mpicxx GNU)
++ CMAKE_FORCE_Fortran_COMPILER(mpifort GNU)
+
+ #CMAKE_FORCE_Fortran_Compiler is not supported ver. 2.6
+ #set(CMAKE_Fortran_COMPILER mpifrtpx GNU)
+ #set(CMAKE_Fortran_COMPILER_WORKS true)
+ #set(CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_CXX_COMPILER}")
+ else()
+- CMAKE_FORCE_C_COMPILER(fccpx GNU)
+- CMAKE_FORCE_CXX_COMPILER(FCCpx GNU)
+- CMAKE_FORCE_Fortran_COMPILER(frtpx GNU)
++ CMAKE_FORCE_C_COMPILER(fcc GNU)
++ CMAKE_FORCE_CXX_COMPILER(FCC GNU)
++ CMAKE_FORCE_Fortran_COMPILER(frt GNU)
+
+ #CMAKE_FORCE_Fortran_Compiler is not supported ver. 2.6
+ #set(CMAKE_Fortran_COMPILER frtpx GNU)
+@@ -22,9 +22,9 @@
+ #set(CMAKE_Fortran_LINK_EXECUTABLE "${CMAKE_CXX_COMPILER}")
+ endif()
+
+-set(CMAKE_FIND_ROOT_PATH /opt/FJSVfxlang/1.2.1)
+-set(CMAKE_INCLUDE_PATH /opt/FJSVfxlang/1.2.1/include)
+-set(CMAKE_LIBRARY_PATH /opt/FJSVfxlang/1.2.1/lib64)
++#set(CMAKE_FIND_ROOT_PATH /opt/FJSVfxlang/1.2.1)
++#set(CMAKE_INCLUDE_PATH /opt/FJSVfxlang/1.2.1/include)
++#set(CMAKE_LIBRARY_PATH /opt/FJSVfxlang/1.2.1/lib64)
+
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
diff --git a/var/spack/repos/builtin/packages/textparser/package.py b/var/spack/repos/builtin/packages/textparser/package.py
new file mode 100644
index 0000000000..3f38d21f85
--- /dev/null
+++ b/var/spack/repos/builtin/packages/textparser/package.py
@@ -0,0 +1,57 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Textparser(CMakePackage):
+ """Text Parser library allows us to describe and to parse JSON like
+ simple parameter structure."""
+
+ homepage = "https://github.com/avr-aics-riken/TextParser"
+ git = "https://github.com/avr-aics-riken/TextParser.git"
+
+ version('master', branch='master')
+ version('1.8.8', commit='31ec1f23df21611d0765c27a6458fdbbf4cde66d')
+
+ variant('mpi', default=True, description='Activate MPI support')
+ variant('fapi', default=False,
+ description='This option is for building Fortran API.')
+ variant('test', default=False,
+ description='This option turns on compiling sample codes and' +
+ ' execute the tests.')
+
+ patch('fix_compiler_options.patch')
+
+ depends_on('mpi', when='+mpi')
+
+ parallel = False
+
+ def cmake_args(self):
+ spec = self.spec
+ args = []
+ args.append('-DINSTALL_DIR={0}'.format(self.prefix))
+
+ if '+mpi' in spec:
+ args.append('-Dwith_MPI=yes')
+ args.append('-DCMAKE_CXX_COMPILER=' + spec['mpi'].mpicxx)
+ else:
+ args.append('-Dwith_MPI=no')
+
+ if '+fapi' in spec:
+ args.append('-Denable_fapi=yes')
+ else:
+ args.append('-Denable_fapi=no')
+
+ if '+test' in spec:
+ args.append('-Denable_test=yes')
+ else:
+ args.append('-Denable_test=no')
+
+ if '%fj' in spec:
+ args.append(
+ '-DCMAKE_TOOLCHAIN_FILE=./cmake/Toolchain_fx100.cmake')
+
+ return args