Merge branch 'develop' into features/boost-additive-libs

This commit is contained in:
Peter Scheibel
2016-01-19 17:27:18 -08:00
505 changed files with 21970 additions and 1228 deletions

View File

@@ -1,12 +0,0 @@
compilers:
all:
clang@3.3:
cc: /path/to/clang
cxx: /path/to/clang++
f77: None
fc: None
gcc@4.5.0:
cc: /path/to/gcc
cxx: /path/to/g++
f77: /path/to/gfortran
fc: /path/to/gfortran

View File

@@ -1,33 +0,0 @@
from spack import *
class R(Package):
"""R is 'GNU S', a freely available language and environment for
statistical computing and graphics which provides a wide va
riety of statistical and graphical techniques: linear and
nonlinear modelling, statistical tests, time series analysis,
classification, clustering, etc. Please consult the R project
homepage for further information."""
homepage = "http://www.example.com"
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74')
depends_on("readline")
depends_on("ncurses")
depends_on("icu")
depends_on("glib")
depends_on("zlib")
depends_on("libtiff")
depends_on("jpeg")
depends_on("cairo")
depends_on("pango")
depends_on("freetype")
depends_on("tcl")
depends_on("tk")
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--enable-R-shlib",
"--enable-BLAS-shlib")
make()
make("install")

View File

@@ -1,95 +0,0 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (as published by
# the Free Software Foundation) version 2.1 dated February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
import os
import os.path
class Clang(Package):
"""The goal of the Clang project is to create a new C, C++,
Objective C and Objective C++ front-end for the LLVM compiler.
"""
homepage = 'http://clang.llvm.org'
url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz'
depends_on('llvm@3.7.0', when='@3.7.0')
depends_on('llvm@3.6.2', when='@3.6.2')
depends_on('llvm@3.5.1', when='@3.5.1')
version('3.7.0', '8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz')
version('3.6.2', 'ff862793682f714bb7862325b9c06e20', url='http://llvm.org/releases/3.6.2/cfe-3.6.2.src.tar.xz')
version('3.5.1', '93f9532f8f7e6f1d8e5c1116907051cb', url='http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz')
##########
# @3.7.0
resource(name='clang-tools-extra',
url='http://llvm.org/releases/3.7.0/clang-tools-extra-3.7.0.src.tar.xz',
md5='d5a87dacb65d981a427a536f6964642e', destination='tools', when='@3.7.0')
##########
def install(self, spec, prefix):
env['CXXFLAGS'] = self.compiler.cxx11_flag
with working_dir('spack-build', create=True):
options = []
if '@3.7.0:' in spec:
options.append('-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp')
options.extend(std_cmake_args)
cmake('..',
'-DCLANG_PATH_TO_LLVM_BUILD:PATH=%s' % spec['llvm'].prefix,
'-DLLVM_MAIN_SRC_DIR:PATH=%s' % spec['llvm'].prefix,
*options)
make()
make("install")
# CLang doesn't look in llvm folders for system headers...
self.link_llvm_directories(spec)
def link_llvm_directories(self, spec):
def clang_include_dir_at(root):
return join_path(root, 'include')
def clang_lib_dir_at(root):
return join_path(root, 'lib/clang/', str(self.version), 'include')
def do_link(source_dir, destination_dir):
if os.path.exists(source_dir):
for name in os.listdir(source_dir):
source = join_path(source_dir, name)
link = join_path(destination_dir, name)
os.symlink(source, link)
# Link folder and files in include
llvm_dir = clang_include_dir_at(spec['llvm'].prefix)
clang_dir = clang_include_dir_at(self.prefix)
do_link(llvm_dir, clang_dir)
# Link folder and files in lib
llvm_dir = clang_lib_dir_at(spec['llvm'].prefix)
clang_dir = clang_lib_dir_at(self.prefix)
do_link(llvm_dir, clang_dir)

View File

@@ -1,72 +0,0 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by David Beckingsale, david@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (as published by
# the Free Software Foundation) version 2.1 dated February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Llvm(Package):
"""The LLVM Project is a collection of modular and reusable compiler and
toolchain technologies. Despite its name, LLVM has little to do with
traditional virtual machines, though it does provide helpful libraries
that can be used to build them. The name "LLVM" itself is not an acronym;
it is the full name of the project.
"""
homepage = 'http://llvm.org/'
url = 'http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz'
version('3.7.0', 'b98b9495e5655a672d6cb83e1a180f8e', url='http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz')
version('3.6.2', '0c1ee3597d75280dee603bae9cbf5cc2', url='http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz')
version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz')
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package
depends_on('python@2.7:')
variant('libcxx', default=False, description="Builds the LLVM Standard C++ library targeting C++11")
##########
# @3.7.0
resource(name='compiler-rt',
url='http://llvm.org/releases/3.7.0/compiler-rt-3.7.0.src.tar.xz', md5='383c10affd513026f08936b5525523f5',
destination='projects', when='@3.7.0')
resource(name='openmp',
url='http://llvm.org/releases/3.7.0/openmp-3.7.0.src.tar.xz', md5='f482c86fdead50ba246a1a2b0bbf206f',
destination='projects', when='@3.7.0')
resource(name='libcxx',
url='http://llvm.org/releases/3.7.0/libcxx-3.7.0.src.tar.xz', md5='46aa5175cbe1ad42d6e9c995968e56dd',
destination='projects', placement='libcxx', when='+libcxx@3.7.0')
resource(name='libcxxabi',
url='http://llvm.org/releases/3.7.0/libcxxabi-3.7.0.src.tar.xz', md5='5aa769e2fca79fa5335cfae8f6258772',
destination='projects', placement='libcxxabi', when='+libcxx@3.7.0')
##########
def install(self, spec, prefix):
env['CXXFLAGS'] = self.compiler.cxx11_flag
with working_dir('spack-build', create=True):
cmake('..',
'-DLLVM_REQUIRES_RTTI:BOOL=ON',
'-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix,
*std_cmake_args)
make()
make("install")

View File

@@ -1,27 +0,0 @@
from spack import *
class Metis(Package):
"""METIS is a set of serial programs for partitioning graphs,
partitioning finite element meshes, and producing fill reducing
orderings for sparse matrices. The algorithms implemented in
METIS are based on the multilevel recursive-bisection,
multilevel k-way, and multi-constraint partitioning schemes."""
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview"
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
version('5.1.0', '5465e67079419a69e0116de24fce58fe')
depends_on('mpi')
def install(self, spec, prefix):
cmake(".",
'-DGKLIB_PATH=%s/GKlib' % pwd(),
'-DSHARED=1',
'-DCMAKE_C_COMPILER=mpicc',
'-DCMAKE_CXX_COMPILER=mpicxx',
'-DSHARED=1',
*std_cmake_args)
make()
make("install")

View File

@@ -1,26 +0,0 @@
from spack import *
class Parmetis(Package):
"""ParMETIS is an MPI-based parallel library that implements a
variety of algorithms for partitioning unstructured graphs,
meshes, and for computing fill-reducing orderings of sparse
matrices."""
homepage = "http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview"
url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz"
version('4.0.3', 'f69c479586bf6bb7aff6a9bc0c739628')
depends_on('mpi')
def install(self, spec, prefix):
cmake(".",
'-DGKLIB_PATH=%s/metis/GKlib' % pwd(),
'-DMETIS_PATH=%s/metis' % pwd(),
'-DSHARED=1',
'-DCMAKE_C_COMPILER=mpicc',
'-DCMAKE_CXX_COMPILER=mpicxx',
'-DSHARED=1',
*std_cmake_args)
make()
make("install")

View File

@@ -0,0 +1,2 @@
repo:
namespace: builtin.mock

View File

@@ -0,0 +1,49 @@
from spack import *
class R(Package):
"""
R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a
wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series
analysis, classification, clustering, etc. Please consult the R project homepage for further information.
"""
homepage = "https://www.r-project.org"
url = "http://cran.cnr.berkeley.edu/src/base/R-3/R-3.1.2.tar.gz"
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
version('3.2.1', 'c2aac8b40f84e08e7f8c9068de9239a3')
version('3.2.0', '66fa17ad457d7e618191aa0f52fc402e')
version('3.1.3', '53a85b884925aa6b5811dfc361d73fc4')
version('3.1.2', '3af29ec06704cbd08d4ba8d69250ae74')
variant('external-lapack', default=False, description='Links to externally installed BLAS/LAPACK')
# Virtual dependencies
depends_on('blas', when='+external-lapack')
depends_on('lapack', when='+external-lapack')
# Concrete dependencies
depends_on('readline')
depends_on('ncurses')
depends_on('icu')
depends_on('glib')
depends_on('zlib')
depends_on('libtiff')
depends_on('jpeg')
depends_on('cairo')
depends_on('pango')
depends_on('freetype')
depends_on('tcl')
depends_on('tk')
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix,
'--enable-R-shlib',
'--enable-BLAS-shlib']
if '+external-lapack' in spec:
options.extend(['--with-blas', '--with-lapack'])
configure(*options)
make()
make('install')

View File

@@ -0,0 +1,26 @@
--- old/opcodes/cr16-dis.c 2014-10-14 03:32:04.000000000 -0400
+++ new/opcodes/cr16-dis.c 2016-01-14 21:54:26.000000000 -0500
@@ -78,7 +78,7 @@
REG_ARG_TYPE;
/* Current opcode table entry we're disassembling. */
-const inst *instruction;
+extern const inst *instruction;
/* Current instruction we're disassembling. */
ins cr16_currInsn;
/* The current instruction is read into 3 consecutive words. */
@@ -86,12 +86,12 @@
/* Contains all words in appropriate order. */
ULONGLONG cr16_allWords;
/* Holds the current processed argument number. */
-int processing_argument_number;
+extern int processing_argument_number;
/* Nonzero means a IMM4 instruction. */
int imm4flag;
/* Nonzero means the instruction's original size is
incremented (escape sequence is used). */
-int size_changed;
+extern int size_changed;
/* Print the constant expression length. */

View File

@@ -11,8 +11,11 @@ class Binutils(Package):
# Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
variant('krellpatch', default=False, description="build with openspeedshop based patch.")
variant('gold', default=True, description="build the gold linker")
patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
patch('cr16.patch')
variant('libiberty', default=False, description='Also install libiberty.')
def install(self, spec, prefix):
@@ -26,6 +29,9 @@ def install(self, spec, prefix):
'--enable-targets=all',
'--with-sysroot=/']
if '+gold' in spec:
configure_args.append('--enable-gold')
if '+libiberty' in spec:
configure_args.append('--enable-install-libiberty')

View File

@@ -14,6 +14,7 @@ class Cairo(Package):
def install(self, spec, prefix):
configure("--prefix=%s" % prefix,
"--disable-trace", # can cause problems with libiberty
"--enable-tee")
make()
make("install")

View File

@@ -0,0 +1,33 @@
--- old/sandbox/CMakeLists.txt
+++ new/sandbox/CMakeLists.txt
@@ -4,9 +4,11 @@
add_executable(sandbox_json sandbox_json.cpp)
add_executable(sandbox_rtti sandbox_rtti.cpp)
+if(Boost_FOUND)
add_executable(sandbox_vs sandbox_vs.cpp)
target_link_libraries(sandbox_vs sandbox_vs_dll)
include_directories(sandbox_shared_lib)
+endif(Boost_FOUND)
if(Boost_FOUND)
add_executable(performance performance.cpp)
--- old/include/cereal/types/common.hpp
+++ new/include/cereal/types/common.hpp
@@ -106,14 +106,16 @@
t = reinterpret_cast<typename common_detail::is_enum<T>::type const &>( value );
}
+#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION
//! Serialization for raw pointers
/*! This exists only to throw a static_assert to let users know we don't support raw pointers. */
template <class Archive, class T> inline
void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & )
{
static_assert(cereal::traits::detail::delay_static_assert<T>::value,
"Cereal does not support serializing raw pointers - please use a smart pointer");
}
+#endif
//! Serialization for C style arrays
template <class Archive, class T> inline

View File

@@ -0,0 +1,34 @@
from spack import *
import shutil
class Cereal(Package):
"""cereal is a header-only C++11 serialization library. cereal takes arbitrary data types and reversibly turns them into different representations, such as compact binary encodings, XML, or JSON. cereal was designed to be fast, light-weight, and easy to extend - it has no external dependencies and can be easily bundled with other code or used standalone."""
homepage = "http://uscilab.github.io/cereal/"
url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz"
version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9')
version('1.1.1', '0ceff308c38f37d5b5f6df3927451c27')
version('1.1.0', '9f2d5f72e935c54f4c6d23e954ce699f')
version('1.0.0', 'd1bacca70a95cec0ddbff68b0871296b')
version('0.9.1', '8872d4444ff274ce6cd1ed364d0fc0ad')
patch("Werror.patch")
depends_on("cmake @2.6.2:")
def install(self, spec, prefix):
# Don't use -Werror
filter_file(r'-Werror', '', 'CMakeLists.txt')
# configure
# Boost is only used for self-tests, which we are not running (yet?)
cmake('.', '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE', *std_cmake_args)
# Build
make()
# Install
shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True)
shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True)
shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True)
shutil.copytree('include', join_path(prefix, 'include'), symlinks=True)

View File

@@ -0,0 +1,73 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (as published by
# the Free Software Foundation) version 2.1 dated February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Cgal(Package):
"""
CGAL is a software project that provides easy access to efficient and reliable geometric algorithms in the form of
a C++ library. CGAL is used in various areas needing geometric computation, such as geographic information systems,
computer aided design, molecular biology, medical imaging, computer graphics, and robotics.
"""
homepage = 'http://www.cgal.org/'
url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz'
version('4.7', '4826714810f3b4c65cac96b90fb03b67')
version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d')
# Installation instructions : http://doc.cgal.org/latest/Manual/installation.html
variant('shared', default=True, description='Enables the build of shared libraries')
variant('debug', default=False, description='Builds a debug version of the libraries')
depends_on('boost')
depends_on('mpfr')
depends_on('gmp')
depends_on('zlib')
# FIXME : Qt5 dependency missing (needs Qt5 and OpenGL)
# FIXME : Optional third party libraries missing
def install(self, spec, prefix):
options = []
options.extend(std_cmake_args)
# CGAL supports only Release and Debug build type. Any other build type will raise an error at configure time
if '+debug' in spec:
options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
else:
options.append('-DCMAKE_BUILD_TYPE:STRING=Release')
if '+shared' in spec:
options.append('-DBUILD_SHARED_LIBS:BOOL=ON')
else:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make("install")

View File

@@ -31,15 +31,16 @@ class Cmake(Package):
version('2.8.10.2', '097278785da7182ec0aea8769d06860c',
url = 'http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz')
version('3.0.2', 'db4c687a31444a929d2fdc36c4dfb95f',
url = 'http://www.cmake.org/files/v3.0/cmake-3.0.2.tar.gz')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8',
url = 'https://cmake.org/files/v3.4/cmake-3.4.0.tar.gz')
# version('3.0.1', 'e2e05d84cb44a42f1371d9995631dcf5')
# version('3.0.0', '21a1c85e1a3b803c4b48e7ff915a863e')
version('3.4.0', 'cd3034e0a44256a0917e254167217fc8',
url = 'http://cmake.org/files/v3.4/cmake-3.4.0.tar.gz')
variant('ncurses', default=True, description='Enables the build of the ncurses gui')
depends_on('ncurses', when='+ncurses')
def install(self, spec, prefix):
configure('--prefix=' + prefix,

View File

@@ -0,0 +1,68 @@
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by David Beckingsale, david@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (as published by
# the Free Software Foundation) version 2.1 dated February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Eigen(Package):
"""
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms
"""
homepage = 'http://eigen.tuxfamily.org/'
url = 'http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2'
version('3.2.7', 'cc1bacbad97558b97da6b77c9644f184', url='http://bitbucket.org/eigen/eigen/get/3.2.7.tar.bz2')
variant('debug', default=False, description='Builds the library in debug mode')
variant('metis', default=True, description='Enables metis backend')
variant('scotch', default=True, description='Enables scotch backend')
variant('fftw', default=True, description='Enables FFTW backend')
# TODO : dependency on SuiteSparse, googlehash, superlu, adolc missing
depends_on('metis', when='+metis')
depends_on('scotch', when='+scotch')
depends_on('fftw', when='+fftw')
depends_on('mpfr@2.3.0:') # Eigen 3.2.7 requires at least 2.3.0
depends_on('gmp')
def install(self, spec, prefix):
options = []
options.extend(std_cmake_args)
build_directory = join_path(self.stage.path, 'spack-build')
source_directory = self.stage.source_path
if '+debug' in spec:
options.append('-DCMAKE_BUILD_TYPE:STRING=Debug')
with working_dir(build_directory, create=True):
cmake(source_directory, *options)
make()
make("install")

View File

@@ -0,0 +1,44 @@
Index: FL/x.H
===================================================================
--- a/FL/x.H (revision 10476)
+++ b/FL/x.H (working copy)
@@ -132,6 +132,7 @@
XFontStruct *ptr;
};
extern FL_EXPORT Fl_XFont_On_Demand fl_xfont;
+extern FL_EXPORT XFontStruct* fl_core_font();
// this object contains all X-specific stuff about a window:
// Warning: this object is highly subject to change!
Index: src/fl_font.cxx
===================================================================
--- a/src/fl_font.cxx (revision 10476)
+++ b/src/fl_font.cxx (working copy)
@@ -55,6 +55,14 @@
# include "fl_font_x.cxx"
#endif // WIN32
+#ifdef WIN32
+#elif defined(__APPLE__)
+#else
+XFontStruct *fl_core_font()
+{
+ return fl_xfont.value();
+}
+#endif
double fl_width(const char* c) {
if (c) return fl_width(c, (int) strlen(c));
Index: src/gl_draw.cxx
===================================================================
--- a/src/gl_draw.cxx (revision 10476)
+++ b/src/gl_draw.cxx (working copy)
@@ -84,7 +84,7 @@
* then sorting through them at draw time (for normal X rendering) to find which one can
* render the current glyph... But for now, just use the first font in the list for GL...
*/
- XFontStruct *font = fl_xfont;
+ XFontStruct *font = fl_core_font();
int base = font->min_char_or_byte2;
int count = font->max_char_or_byte2-base+1;
fl_fontsize->listbase = glGenLists(256);

View File

@@ -0,0 +1,58 @@
##############################################################################
# Copyright (c) 2013-2015, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (as published by
# the Free Software Foundation) version 2.1 dated February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Fltk(Package):
"""
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and
MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its
built-in GLUT emulation.
FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK
also includes an excellent UI builder called FLUID that can be used to create applications in minutes.
"""
homepage = 'http://www.fltk.org/'
url = 'http://fltk.org/pub/fltk/1.3.3/fltk-1.3.3-source.tar.gz'
version('1.3.3', '9ccdb0d19dc104b87179bd9fd10822e3')
patch('font.patch', when='@1.3.3')
variant('shared', default=True, description='Enables the build of shared libraries')
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix,
'--enable-localjpeg',
'--enable-localpng',
'--enable-localzlib']
if '+shared' in spec:
options.append('--enable-shared')
# FLTK needs to be built in-source
configure(*options)
make()
make('install')

Some files were not shown because too many files have changed in this diff Show More