From 0292d02ce697e4fa4bfff4bb8c2f5defddcd77c6 Mon Sep 17 00:00:00 2001
From: Mirko Vukovic <mirko.vukovic@gmail.com>
Date: Sun, 22 Nov 2015 16:09:31 -0500
Subject: [PATCH 2/3] Load msys2 GSL, remove dependency on osicat, bugfix

GSLL can load GSL provided by MSYS2.  For this to work, user needs
to set the feature :MSYS2-MINGW64 and place the DLL's into the
Windows's PATH.  Modifications:
- Loading of libgsl-unix in gsll.asd
- Options for loading libraries in init/init.lisp

GSLL was using the library Osicat to get path to temporary directory.
UIOP library provides the same functionality and is available as
part of ASDF.  Changes made to GSLL.ASD and histogram/ntuple.lisp

GSLL would not compile the file BASIS-SPLINES.LISP.  I removed it
from GSLL.ASD.  There may be a more sensible fix.
---
 gsll.asd              | 8 +++-----
 histogram/ntuple.lisp | 4 ++--
 init/init.lisp        | 4 +++-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gsll.asd b/gsll.asd
index 43db296..fe9a03e 100644
--- a/gsll.asd
+++ b/gsll.asd
@@ -1,6 +1,6 @@
 ;; Definition of GSLL system 
 ;; Liam Healy
-;; Time-stamp: <2013-11-24 19:18:07EST gsll.asd>
+;; Time-stamp: <2015-11-22 15:57:52Eastern Standard Time gsll.asd>
 ;;
 ;; Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013 Liam M. Healy
 ;; Distributed under the terms of the GNU General Public License
@@ -32,14 +32,13 @@
 	       #:cffi-grovel
 	       #:trivial-garbage
 	       #:alexandria
-	       #:metabang-bind
-	       #:osicat)
+	       #:metabang-bind)
   :components
   ((:module init
 	    :components
 	    ((:file "init")
 	     (cffi-grovel:grovel-file
-	      "libgsl" :pathname #+unix "libgsl-unix" #-unix "nothing-here"
+	      "libgsl" :pathname #+unix "libgsl-unix" #+msys2-mingw64 "libgsl-unix"
 	      :depends-on ("init"))
 	     (:file "utility" :depends-on ("init"))
 	     (:file "forms" :depends-on ("init"))
@@ -263,7 +262,6 @@
 		    :depends-on ("generic" "solver-struct"))
 	     #+fsbv
 	     (:file "simulated-annealing")))
-   (:file "basis-splines" :depends-on (init data random))
    (:module physical-constants
 	    :depends-on (init)
 	    :components
diff --git a/histogram/ntuple.lisp b/histogram/ntuple.lisp
index facc5d8..6aa5a2c 100644
--- a/histogram/ntuple.lisp
+++ b/histogram/ntuple.lisp
@@ -1,6 +1,6 @@
 ;; N-tuples
 ;; Liam Healy Sat Feb  3 2007 - 12:53
-;; Time-stamp: <2012-01-13 12:01:27EST ntuple.lisp>
+;; Time-stamp: <2015-11-12 13:31:47Eastern Standard Time ntuple.lisp>
 ;;
 ;; Copyright 2007, 2008, 2009, 2011 Liam M. Healy
 ;; Distributed under the terms of the GNU General Public License
@@ -159,7 +159,7 @@
 
 (defparameter *ntuple-example-data-file*
   (namestring
-   (merge-pathnames  "ntuple-example.dat" osicat::*temporary-directory*))
+   (merge-pathnames  "ntuple-example.dat" uiop:*temporary-directory*))
    ;;(asdf:system-relative-pathname :gsll #p"histogram/ntuple-example.dat")
   "The full path string of the ntuple example data file.  This can be created
    with the function #'make-ntuple-example-data.")
diff --git a/init/init.lisp b/init/init.lisp
index 92e0787..6e884c4 100644
--- a/init/init.lisp
+++ b/init/init.lisp
@@ -1,6 +1,6 @@
 ;; Load GSL
 ;; Liam Healy Sat Mar  4 2006 - 18:53
-;; Time-stamp: <2015-08-23 11:23:16EDT init.lisp>
+;; Time-stamp: <2015-11-22 15:55:27Eastern Standard Time init.lisp>
 ;;
 ;; Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2015 Liam M. Healy
 ;; Distributed under the terms of the GNU General Public License
@@ -83,6 +83,7 @@
   (:darwin #+ccl #.(ccl:native-translated-namestring
 		    (gsl-config-pathname "libgslcblas.dylib"))
            #-ccl #.(gsl-config-pathname "libgslcblas.dylib"))
+  (:msys2-mingw64 "libgslcblas-0.dll")
   (:cygwin "cyggslcblas-0.dll")
   (:unix (:or "libgslcblas.so.0" "libgslcblas.so"))
   (t (:default "libgslcblas")))
@@ -99,6 +100,7 @@
   (:darwin #+ccl #.(ccl:native-translated-namestring
                      (gsl-config-pathname "libgsl.dylib"))
            #-ccl #.(gsl-config-pathname "libgsl.dylib"))
+  (:msys2-mingw64 "libgsl-0.dll")
   (:cygwin "cyggsl-0.dll")
   (:unix (:or "libgsl.so.0" "libgsl.so"))
   (t (:default "libgsl")))
-- 
2.6.2

