summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrás Wacha2016-11-04 11:21:33 +0100
committerAndrás Wacha2016-11-04 11:21:33 +0100
commita56c279ab8aaca514e65159b6c02d1efe23d06c4 (patch)
tree21b1b125ba7151d25b39c8c6d86843489a31c787
downloadaur-a56c279ab8aaca514e65159b6c02d1efe23d06c4.tar.gz
First commit
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD50
-rw-r--r--sasfit.patch535
4 files changed, 613 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e1cfa2fb0ef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = sasfit
+ pkgdesc = A program for fitting structural models to small angle scattering data
+ pkgver = 0.94.7
+ pkgrel = 1
+ url = https://kur.web.psi.ch/sans1/SANSSoft/sasfit.html
+ arch = x86_64
+ license = GPL
+ makedepends = cmake>=2.8.0
+ depends = gsl
+ depends = tcl>=8.4
+ depends = libxrender
+ depends = libxfixes
+ depends = f2c
+ depends = fftw
+ depends = sundials
+ options = !strip
+ source = https://github.com/SASfit/SASfit/releases/download/v0.94.7/SASfit-0.94.7_source.tar.gz
+ source = sasfit.patch
+ md5sums = d563765b90c2826cda5b912e10d699e9
+ md5sums = 7c09381e4207bc93dda90448e7d6890d
+
+pkgname = sasfit
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..d6ae6e1c53b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+SASfit*.tar.gz
+*.pkg.tar.xz
+*~ \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b4145e9a43d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# SASfit: a program for fitting structural models to small angle scattering data
+
+# Maintainer: András Wacha <awacha@gmail.com>
+pkgname=sasfit
+pkgver=0.94.7
+pkgrel=1
+pkgdesc="A program for fitting structural models to small angle scattering data"
+arch=('x86_64')
+url="https://kur.web.psi.ch/sans1/SANSSoft/sasfit.html"
+license=('GPL')
+makedepends=('cmake>=2.8.0')
+depends=('gsl' 'tcl>=8.4' 'libxrender' 'libxfixes' 'f2c' 'fftw' 'sundials')
+# don't strip the executables, it breaks them.
+options=("!strip")
+
+source=("https://github.com/SASfit/SASfit/releases/download/v${pkgver}/SASfit-${pkgver}_source.tar.gz"
+ "sasfit.patch")
+md5sums=('d563765b90c2826cda5b912e10d699e9'
+ '7c09381e4207bc93dda90448e7d6890d')
+
+prepare() {
+ cd "${srcdir}/SASfit-${pkgver}"
+ patch -p1 -i ../sasfit.patch
+}
+
+build() {
+ cd "${srcdir}/SASfit-${pkgver}"
+ cmake src
+ make
+}
+
+
+package() {
+ distdir="${srcdir}/${pkgname}_${pkgver}_linux_${CARCH}"
+# rm $distdir/lib -R
+ mkdir -p "$pkgdir/usr/share/doc/sasfit"
+# mkdir -p "$pkgdir/usr/include/sasfit"
+ mkdir -p "$pkgdir/usr/lib/sasfit/plugins"
+ mkdir -p "$pkgdir/usr/bin"
+ cp ${distdir}/*.so "$pkgdir/usr/lib/sasfit/plugins"
+ cp ${distdir}/*.h "$pkgdir/usr/lib/sasfit/plugins"
+ cp ${distdir}/sasfit "$pkgdir/usr/lib/sasfit"
+ cp ${distdir}/{CHANGES.txt,KNOWN_BUGS.txt,Readme.txt,sasfit.bib,sasfit.pdf,test.dat,groups_example.def,config.ini} "$pkgdir/usr/share/doc/sasfit"
+ cat >${pkgdir}/usr/bin/sasfit <<EOF
+#!/bin/sh
+cd /usr/lib/sasfit
+./sasfit \$*
+EOF
+ chmod +x ${pkgdir}/usr/bin/sasfit
+}
diff --git a/sasfit.patch b/sasfit.patch
new file mode 100644
index 00000000000..fee59cc4f39
--- /dev/null
+++ b/sasfit.patch
@@ -0,0 +1,535 @@
+diff -aurN SASfit-0.94.7.pristine/src/cmake/CPackConfig.cmake SASfit-0.94.7/src/cmake/CPackConfig.cmake
+--- SASfit-0.94.7.pristine/src/cmake/CPackConfig.cmake 1970-01-01 01:00:00.000000000 +0100
++++ SASfit-0.94.7/src/cmake/CPackConfig.cmake 2016-11-04 09:06:20.235958749 +0100
+@@ -0,0 +1,40 @@
++# src/cmake/CPackConfig.cmake
++#
++# Copyright (c) 2008-2011, Paul Scherrer Institute (PSI)
++#
++# This file is part of SASfit.
++#
++# SASfit 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, either version 3 of the License, or
++# (at your option) any later version.
++#
++# SASfit 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
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with SASfit. If not, see <http://www.gnu.org/licenses/>.
++
++# Author(s) of this file:
++# Ingo Bressler (ingo.bressler@bam.de)
++
++SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
++set(CPACK_PACKAGE_DESCRIPTION_FILE "../Readme.txt")
++set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SASfit is a SAS tool")
++set(CPACK_PACKAGE_EXECUTABLES "sasfit")
++set(CPACK_PACKAGE_INSTALL_DIRECTORY "sasfit 0.94.7")
++set(CPACK_PACKAGE_NAME "SASfit")
++set(CPACK_PACKAGE_VENDOR "PSI")
++set(CPACK_PACKAGE_VERSION "0.94.7")
++set(CPACK_PACKAGE_VERSION_MAJOR "0")
++set(CPACK_PACKAGE_VERSION_MINOR "94.7")
++set(CPACK_INSTALLED_DIRECTORIES "/home/wachaandras/aur/sasfit/src/sasfit_0.94.7_linux_x86_64;.")
++set(CPACK_PACKAGE_FILE_NAME "sasfit_0.94.7_linux_x86_64")
++if(NOT WIN32)
++ set(CPACK_GENERATOR "TBZ2")
++else(NOT WIN32)
++ set(CPACK_GENERATOR "ZIP")
++endif(NOT WIN32)
++
+diff -aurN SASfit-0.94.7.pristine/src/cmake/create_source_package.list SASfit-0.94.7/src/cmake/create_source_package.list
+--- SASfit-0.94.7.pristine/src/cmake/create_source_package.list 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/create_source_package.list 2016-11-04 09:05:58.046930712 +0100
+@@ -178,183 +178,6 @@
+ doc/images/missing.png
+ src/doc/footer.html
+ src/doc/mainpage.h
+-src/f2c/CMakeLists.txt
+-src/f2c/abort_.c
+-src/f2c/arith.h
+-src/f2c/arithchk.c
+-src/f2c/backspac.c
+-src/f2c/c_abs.c
+-src/f2c/c_cos.c
+-src/f2c/c_div.c
+-src/f2c/c_exp.c
+-src/f2c/c_log.c
+-src/f2c/c_sin.c
+-src/f2c/c_sqrt.c
+-src/f2c/cabs.c
+-src/f2c/close.c
+-src/f2c/COPYRIGHT
+-src/f2c/d_abs.c
+-src/f2c/d_acos.c
+-src/f2c/d_asin.c
+-src/f2c/d_atan.c
+-src/f2c/d_atn2.c
+-src/f2c/d_cnjg.c
+-src/f2c/d_cos.c
+-src/f2c/d_cosh.c
+-src/f2c/d_dim.c
+-src/f2c/d_exp.c
+-src/f2c/d_imag.c
+-src/f2c/d_int.c
+-src/f2c/d_lg10.c
+-src/f2c/d_log.c
+-src/f2c/d_mod.c
+-src/f2c/d_nint.c
+-src/f2c/d_prod.c
+-src/f2c/d_sign.c
+-src/f2c/d_sin.c
+-src/f2c/d_sinh.c
+-src/f2c/d_sqrt.c
+-src/f2c/d_tan.c
+-src/f2c/d_tanh.c
+-src/f2c/derf_.c
+-src/f2c/derfc_.c
+-src/f2c/dfe.c
+-src/f2c/dolio.c
+-src/f2c/dtime_.c
+-src/f2c/due.c
+-src/f2c/ef1asc_.c
+-src/f2c/ef1cmc_.c
+-src/f2c/endfile.c
+-src/f2c/erf_.c
+-src/f2c/erfc_.c
+-src/f2c/err.c
+-src/f2c/etime_.c
+-src/f2c/exit_.c
+-src/f2c/f2c.h
+-src/f2c/f2c.lib
+-src/f2c/f2c_math.h
+-src/f2c/f77_aloc.c
+-src/f2c/f77vers.c
+-src/f2c/fio.h
+-src/f2c/fmt.c
+-src/f2c/fmt.h
+-src/f2c/fmtlib.c
+-src/f2c/fp.h
+-src/f2c/ftell64_.c
+-src/f2c/ftell_.c
+-src/f2c/getarg_.c
+-src/f2c/getenv_.c
+-src/f2c/h_abs.c
+-src/f2c/h_dim.c
+-src/f2c/h_dnnt.c
+-src/f2c/h_indx.c
+-src/f2c/h_len.c
+-src/f2c/h_mod.c
+-src/f2c/h_nint.c
+-src/f2c/h_sign.c
+-src/f2c/hl_ge.c
+-src/f2c/hl_gt.c
+-src/f2c/hl_le.c
+-src/f2c/hl_lt.c
+-src/f2c/i77vers.c
+-src/f2c/i_abs.c
+-src/f2c/i_dim.c
+-src/f2c/i_dnnt.c
+-src/f2c/i_indx.c
+-src/f2c/i_len.c
+-src/f2c/i_mod.c
+-src/f2c/i_nint.c
+-src/f2c/i_sign.c
+-src/f2c/iargc_.c
+-src/f2c/iio.c
+-src/f2c/ilnw.c
+-src/f2c/inquire.c
+-src/f2c/l_ge.c
+-src/f2c/l_gt.c
+-src/f2c/l_le.c
+-src/f2c/l_lt.c
+-src/f2c/lbitbits.c
+-src/f2c/lbitshft.c
+-src/f2c/lio.h
+-src/f2c/lread.c
+-src/f2c/lwrite.c
+-src/f2c/main.c
+-src/f2c/open.c
+-src/f2c/pow_ci.c
+-src/f2c/pow_dd.c
+-src/f2c/pow_di.c
+-src/f2c/pow_hh.c
+-src/f2c/pow_ii.c
+-src/f2c/pow_qq.c
+-src/f2c/pow_ri.c
+-src/f2c/pow_zi.c
+-src/f2c/pow_zz.c
+-src/f2c/qbitbits.c
+-src/f2c/qbitshft.c
+-src/f2c/r_abs.c
+-src/f2c/r_acos.c
+-src/f2c/r_asin.c
+-src/f2c/r_atan.c
+-src/f2c/r_atn2.c
+-src/f2c/r_cnjg.c
+-src/f2c/r_cos.c
+-src/f2c/r_cosh.c
+-src/f2c/r_dim.c
+-src/f2c/r_exp.c
+-src/f2c/r_imag.c
+-src/f2c/r_int.c
+-src/f2c/r_lg10.c
+-src/f2c/r_log.c
+-src/f2c/r_mod.c
+-src/f2c/r_nint.c
+-src/f2c/r_sign.c
+-src/f2c/r_sin.c
+-src/f2c/r_sinh.c
+-src/f2c/r_sqrt.c
+-src/f2c/r_tan.c
+-src/f2c/r_tanh.c
+-src/f2c/rawio.h
+-src/f2c/rdfmt.c
+-src/f2c/rewind.c
+-src/f2c/rsfe.c
+-src/f2c/rsli.c
+-src/f2c/rsne.c
+-src/f2c/s_cat.c
+-src/f2c/s_cmp.c
+-src/f2c/s_copy.c
+-src/f2c/s_paus.c
+-src/f2c/s_rnge.c
+-src/f2c/s_stop.c
+-src/f2c/sfe.c
+-src/f2c/sig_die.c
+-src/f2c/signal1.h
+-src/f2c/signal_.c
+-src/f2c/signbit.c
+-src/f2c/sue.c
+-src/f2c/sysdep1.h
+-src/f2c/system_.c
+-src/f2c/typesize.c
+-src/f2c/uio.c
+-src/f2c/uninit.c
+-src/f2c/util.c
+-src/f2c/wref.c
+-src/f2c/wrtfmt.c
+-src/f2c/wsfe.c
+-src/f2c/wsle.c
+-src/f2c/wsne.c
+-src/f2c/xwsne.c
+-src/f2c/z_abs.c
+-src/f2c/z_cos.c
+-src/f2c/z_div.c
+-src/f2c/z_exp.c
+-src/f2c/z_log.c
+-src/f2c/z_sin.c
+-src/f2c/z_sqrt.c
+-src/f2c/sasfit_wofz.c
+-src/fftw/CMakeLists.txt
+-src/fftw/fftw-3.3.3.tar.gz
+-src/gsl/gsl-1.16.tar.gz
+-src/tcl/tcl-8.4.13.tar.gz
+ src/sasfit_common/CMakeLists.txt
+ src/sasfit_common/include/bool.h
+ src/sasfit_common/include/sasfit_common.h
+diff -aurN SASfit-0.94.7.pristine/src/cmake/Findf2c.cmake SASfit-0.94.7/src/cmake/Findf2c.cmake
+--- SASfit-0.94.7.pristine/src/cmake/Findf2c.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/Findf2c.cmake 2016-11-04 09:05:58.046930712 +0100
+@@ -36,35 +36,7 @@
+ # against.
+ # f2c_FOUND - Do not attempt to use if "no" or undefined.
+
+-GET_FILENAME_COMPONENT(CURRENT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+-GET_FILENAME_COMPONENT(CURRENT_DIR "${CURRENT_DIR}/.." ABSOLUTE)
+-
+-FIND_PATH(f2c_INCLUDE_DIR f2c.h
+- ${CURRENT_DIR}/f2c/
+- NO_DEFAULT_PATH
+-)
+-
+-FIND_LIBRARY(f2c_LIBRARY f2c
+- ${CURRENT_DIR}/f2c/lib/
+- ${CURRENT_DIR}/f2c/lib/debug/
+- ${CURRENT_DIR}/f2c/lib/release/
+-)
+-
+-SET(f2c_INCLUDE_DIRS ${f2c_INCLUDE_DIR})
+-SET(f2c_LIBRARIES ${f2c_LIBRARY})
+-
+-IF(f2c_INCLUDE_DIR)
+- SET(f2c_FOUND "YES")
+- IF(NOT f2c_LIBRARY)
+- MESSAGE(STATUS "f2c library not found!")
+- ENDIF(NOT f2c_LIBRARY)
+-ELSE(f2c_INCLUDE_DIR)
+- MESSAGE(STATUS "f2c include dir not found!")
+-ENDIF(f2c_INCLUDE_DIR)
+-
+-MESSAGE(STATUS "found f2c inc: ${f2c_INCLUDE_DIRS}")
+-
+-IF(NOT f2c_FOUND)
+- MESSAGE(SEND_ERROR "The f2c library was not found. For adjustments use ${CMAKE_CURRENT_LIST_FILE}.")
+-ENDIF(NOT f2c_FOUND)
++set(f2c_FOUND TRUE)
++set(f2c_INCLUDE_DIRS /usr/include)
++set(f2c_LIBRARIES /usr/lib/libf2c.so)
+
+diff -aurN SASfit-0.94.7.pristine/src/cmake/FindFFTW.cmake SASfit-0.94.7/src/cmake/FindFFTW.cmake
+--- SASfit-0.94.7.pristine/src/cmake/FindFFTW.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/FindFFTW.cmake 2016-11-04 09:05:58.046930712 +0100
+@@ -45,32 +45,6 @@
+ # FFTW_EXE_LINKER_FLAGS = rpath on Unix
+
+ message("find FFTW")
+-get_package_dir(${SASFIT_ROOT_DIR}/src/fftw)
+-
+-# file include dir of custom build library
+-FIND_PATH(FFTW_INCLUDE_DIRS
+- NAMES fftw3.h
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES include
+- NO_DEFAULT_PATH
+- DOC "FFTW header include dir"
+-)
+-
+-# get library dirs
+-FIND_FILE(FFTW_STATIC_LIB
+- NAMES libfftw3.a
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "FFTW static library"
+-)
+-
+-if(FFTW_STATIC_LIB)
+- set(FFTW_LIBRARIES ${FFTW_STATIC_LIB})
+-endif()
+-
+-set(FFTW_FOUND FALSE)
+-if(IS_DIRECTORY ${FFTW_INCLUDE_DIRS} AND FFTW_LIBRARIES)
+- set(FFTW_FOUND TRUE)
+-endif()
+-
++set(FFTW_FOUND TRUE)
++set(FFTW_LIBRARIES /usr/lib/libfftw3.so)
++set(FFTW_INCLUDE_DIRS /usr/include)
+diff -aurN SASfit-0.94.7.pristine/src/cmake/FindGSL.cmake SASfit-0.94.7/src/cmake/FindGSL.cmake
+--- SASfit-0.94.7.pristine/src/cmake/FindGSL.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/FindGSL.cmake 2016-11-04 09:05:58.056930272 +0100
+@@ -20,71 +20,6 @@
+ #
+ # GSL_INCLUDE_DIRS = where to find headers
+
+-get_package_dir(${SASFIT_ROOT_DIR}/src/gsl)
+-
+-# file include dir of custom build library
+-FIND_PATH(GSL_INCLUDE_DIRS
+- NAMES gsl/gsl_math.h
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES include
+- NO_DEFAULT_PATH
+- DOC "GSL header include dir"
+-)
+-
+-# get library dirs
+-FIND_LIBRARY(GSL_LIBRARY
+- NAMES gsl libgsl
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "GSL library dir"
+-)
+-
+-FIND_FILE(GSL_STATIC_LIBRARY
+- NAMES gsl.a libgsl.a
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "GSL static library dir"
+-)
+-
+-IF(NOT GSL_LIBRARY)
+- SET(GSL_LIBRARY ${GSL_STATIC_LIBRARY})
+-ENDIF()
+-
+-FIND_LIBRARY(GSLCBLAS_LIBRARY
+- NAMES gslcblas libgslcblas
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "GSL cblas library dir"
+-)
+-
+-FIND_FILE(GSLCBLAS_STATIC_LIBRARY
+- NAMES gslcblas.a libgslcblas.a
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "GSL cblas static library dir"
+-)
+-
+-IF(NOT GSLCBLAS_LIBRARY)
+- SET(GSLCBLAS_LIBRARY ${GSLCBLAS_STATIC_LIBRARY})
+-ENDIF()
+-
+-SET(GSL_LIBRARIES
+- ${GSL_LIBRARY}
+- ${GSLCBLAS_LIBRARY}
+-)
+-SET(GSL_STATIC_LIBRARIES
+- ${GSL_STATIC_LIBRARY}
+- ${GSLCBLAS_STATIC_LIBRARY}
+-)
+-
+-set(GSL_FOUND FALSE)
+-if(IS_DIRECTORY ${GSL_INCLUDE_DIRS} AND GSL_LIBRARIES)
+- set(GSL_FOUND TRUE)
+-endif()
+-message("GSL_FOUND: '${GSL_FOUND}'")
+-
+-# vim: set ts=4 sw=4 sts=4 tw=0:
++set(GSL_INCLUDE_DIRS /usr/include)
++set(GSL_LIBRARIES /usr/lib/libgsl.so /usr/lib/libgslcblas.so /usr/lib/libm.so)
++set(GSL_FOUND TRUE)
+diff -aurN SASfit-0.94.7.pristine/src/cmake/Findsundials.cmake SASfit-0.94.7/src/cmake/Findsundials.cmake
+--- SASfit-0.94.7.pristine/src/cmake/Findsundials.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/Findsundials.cmake 2016-11-04 09:05:58.056930272 +0100
+@@ -42,31 +42,15 @@
+ # sundials_LINK_DIRECTORIES = link directories, useful for rpath on Unix
+ # sundials_EXE_LINKER_FLAGS = rpath on Unix
+
+-message("find sundials")
+-get_package_dir(${SASFIT_ROOT_DIR}/src/sundials)
+-
+-set(sundials_INCLUDE_DIRS ${SOURCE_DIR}/include)
+-
+-# search build directory
+-file(GLOB sundials_BUILD_DIRS ${SOURCE_DIR}/*/CMakeCache.txt)
+-list(LENGTH sundials_BUILD_DIRS NUM_DIRS)
+-if(NUM_DIRS GREATER 0)
+- list(GET sundials_BUILD_DIRS 0 sundials_BUILD_DIR)
+- get_filename_component(sundials_BUILD_DIR
+- "${sundials_BUILD_DIR}" DIRECTORY)
+-# message("sundials_BUILD_DIR: '${sundials_BUILD_DIR}'")
+- list(APPEND sundials_INCLUDE_DIRS ${sundials_BUILD_DIR}/include)
+-endif()
+-
+-file(GLOB sundials_STATIC_LIBS ${sundials_BUILD_DIR}/src/*/*.a)
+-
+-if(sundials_STATIC_LIBS)
+- set(sundials_LIBRARIES ${sundials_STATIC_LIBS})
+-endif()
+-
+-list(LENGTH sundials_INCLUDE_DIRS NUM_INC_DIRS)
+-set(sundials_FOUND FALSE)
+-if(NUM_INC_DIRS EQUAL 2 AND sundials_LIBRARIES)
+- set(sundials_FOUND TRUE)
+-endif()
+
++set(sundials_INCLUDE_DIRS /usr/include)
++set(sundials_LIBRARIES /usr/lib/libsundials_arkode.so
++ /usr/lib/libsundials_cvode.so
++ /usr/lib/libsundials_cvodes.so
++ /usr/lib/libsundials_ida.so
++ /usr/lib/libsundials_idas.so
++ /usr/lib/libsundials_kinsol.so
++ /usr/lib/libsundials_nvecparallel.so
++ /usr/lib/libsundials_nvecserial.so
++ /usr/lib/liblapack.so)
++set(sundials_FOUND TRUE)
+diff -aurN SASfit-0.94.7.pristine/src/cmake/FindTCL.cmake SASfit-0.94.7/src/cmake/FindTCL.cmake
+--- SASfit-0.94.7.pristine/src/cmake/FindTCL.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/FindTCL.cmake 2016-11-04 09:05:58.056930272 +0100
+@@ -9,53 +9,9 @@
+ # TCL_LIBRARIES = full path to the libraries
+ # TCL_INCLUDE_DIRS = where to find headers
+
+-message("find TCL")
+-get_package_dir(${SASFIT_ROOT_DIR}/src/tcl)
+-
+-# file include dir of custom build library
+-FIND_PATH(TCL_INCLUDE_DIRS
+- NAMES tcl.h
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES include
+- NO_DEFAULT_PATH
+- DOC "TCL include dir"
+-)
+-
+-FIND_FILE(TCL_STATIC_LIB
+- NAMES libtcl8.4.a libtcl84s.a
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "TCL static library"
+-)
+-
+-FIND_FILE(TCL_STATIC_STUBS_LIB
+- NAMES libtclstub8.4.a libtclstub84s.a
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES lib
+- NO_DEFAULT_PATH
+- DOC "TCL static stubs library"
+-)
+
+-find_program(TCL_SH
+- NAMES tclsh tclsh84 tclsh84s tclsh8.4
+- PATHS ${SOURCE_DIR}
+- PATH_SUFFIXES bin
+- NO_DEFAULT_PATH
+- DOC "TCL interpreter program"
+-)
+-
+-if(TCL_LIBRARY OR TCL_STATIC_LIB OR TCL_STATIC_STUBS_LIB)
+- SET(TCL_LIBRARIES
+- ${TCL_LIBRARY}
+- ${TCL_STATIC_LIB}
+- ${TCL_STATIC_STUBS_LIB}
+- )
+-endif()
+-
+-set(TCL_FOUND FALSE)
+-if(IS_DIRECTORY "${TCL_INCLUDE_DIRS}" AND TCL_LIBRARIES AND TCL_SH)
+- set(TCL_FOUND TRUE)
+-endif()
++message("find TCL")
+
+-# vim: set ts=4 sw=4 sts=4 tw=0:
++set(TCL_INCLUDE_DIRS /usr/include)
++set(TCL_LIBRARIES /usr/lib/libtcl.so /usr/lib/libtclstub8.6.a)
++set(TCL_FOUND TRUE)
+diff -aurN SASfit-0.94.7.pristine/src/cmake/SasfitCmakeUtils.cmake SASfit-0.94.7/src/cmake/SasfitCmakeUtils.cmake
+--- SASfit-0.94.7.pristine/src/cmake/SasfitCmakeUtils.cmake 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/cmake/SasfitCmakeUtils.cmake 2016-11-04 09:05:58.056930272 +0100
+@@ -496,10 +496,10 @@
+ # avoid modifying LD_LIBRARY_PATH,
+ # using dyn.lib.loader in sasfit.sh instead
+ list(APPEND PREREQ
+- "/lib/*-linux-gnu/ld-[0-9].[0-9][0-9].so"
+- "/lib/*-linux-gnu/libpthread.so.[0-9]"
+- "/usr/lib/*-linux-gnu/libXrender.so.[0-9]"
+- "/usr/lib/*-linux-gnu/libXfixes.so.[0-9]"
++ "/lib/ld-[0-9].[0-9][0-9].so"
++ "/lib/libpthread.so.[0-9]"
++ "/usr/lib/libXrender.so.[0-9]"
++ "/usr/lib/libXfixes.so.[0-9]"
+ )
+ elseif(WIN32)
+ find_library(pthread_LIB pthread-2)
+diff -aurN SASfit-0.94.7.pristine/src/CMakeLists.txt SASfit-0.94.7/src/CMakeLists.txt
+--- SASfit-0.94.7.pristine/src/CMakeLists.txt 2016-04-25 09:27:08.000000000 +0200
++++ SASfit-0.94.7/src/CMakeLists.txt 2016-11-04 09:05:58.056930272 +0100
+@@ -1,5 +1,7 @@
+ cmake_minimum_required(VERSION 2.6.2)
+
++set(CMAKE_C_FLAGS "-fPIC")
++
+ if(CMAKE_HOST_APPLE)
+ set(CMAKE_C_COMPILER /usr/bin/gcc)
+ set(CMAKE_CXX_COMPILER /usr/bin/g++)
+@@ -234,7 +236,7 @@
+
+ target_link_libraries(sasfit
+ ${TCL_LIBRARIES}
+- ${GSL_STATIC_LIBRARIES}
++ ${GSL_LIBRARIES}
+ ${FFTW_LIBRARIES}
+ ${sundials_LIBRARIES}
+ ${OpenMP_LIB}