summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD11
-rw-r--r--phreeqc.el20
3 files changed, 25 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1961df3a1115..094005e9f74c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Tue Dec 15 19:19:22 UTC 2015
+# Sat Jan 16 09:19:03 UTC 2016
pkgbase = phreeqc
- pkgdesc = PHREEQC - A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations
+ pkgdesc = A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations
pkgver = 3.3.3
- pkgrel = 3
+ pkgrel = 5
url = http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/
install = install.sh
arch = i686
@@ -16,7 +16,7 @@ pkgbase = phreeqc
source = https://raw.githubusercontent.com/jaalto/project-emacs--folding-mode/master/folding.el
md5sums = b4b1f11e5855d3b034473ec51c76f7cc
md5sums = 8facd6e784cd1985b2c57c092b753002
- md5sums = 81a6827b2d0d1d2675cbf4e117095208
+ md5sums = 98b0c08bd9bc4adb2ffe6706d4411b4e
md5sums = d262512bd4a19a68805914d35f8f9019
pkgname = phreeqc
diff --git a/PKGBUILD b/PKGBUILD
index afada06d5e8c..ea5211c85550 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=phreeqc
pkgver=3.3.3
_pkgsvn=10424
-pkgrel=3
-pkgdesc="PHREEQC - A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations"
+pkgrel=5
+pkgdesc="A Computer Program for Speciation, Batch-Reaction, One-Dimensional Transport, and Inverse Geochemical Calculations"
arch=('i686' 'x86_64')
url="http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/"
license=('custom')
@@ -25,7 +25,7 @@ source=("ftp://brrftp.cr.usgs.gov/pub/charlton/phreeqc/phreeqc-$pkgver-$_pkgsvn.
"https://raw.githubusercontent.com/jaalto/project-emacs--folding-mode/master/folding.el")
md5sums=('b4b1f11e5855d3b034473ec51c76f7cc'
'8facd6e784cd1985b2c57c092b753002'
- '81a6827b2d0d1d2675cbf4e117095208'
+ '98b0c08bd9bc4adb2ffe6706d4411b4e'
'd262512bd4a19a68805914d35f8f9019')
build() {
@@ -39,6 +39,11 @@ package() {
make DESTDIR="${pkgdir}" install
+ # move database and example files into previous location
+ mkdir -p ${pkgdir}/usr/share/phreeqc/
+ mv ${pkgdir}/usr/share/doc/phreeqc/database ${pkgdir}/usr/share/phreeqc/
+ mv ${pkgdir}/usr/share/doc/phreeqc/examples ${pkgdir}/usr/share/phreeqc/
+
# install supplementary files
mkdir -p ${pkgdir}/usr/share/emacs/site-lisp/$pkgname
diff --git a/phreeqc.el b/phreeqc.el
index 93366e4708da..6fdb9c6463df 100644
--- a/phreeqc.el
+++ b/phreeqc.el
@@ -461,13 +461,19 @@ with no args, if that value is non-nil."
(if (re-search-forward "^DATABASE \\(.*.dat\\)" nil t)
(setq database (match-string 1))))
- (with-temp-file ctrlfile
- (insert infile "\n"
- outfile "\n"
- database "\n"))
-
- (call-process phreeqc-compile-command ctrlfile "*phreeqc*" nil)
- (delete-file ctrlfile)))
+ ;; make sure that the database file is readable
+ (if (not (file-readable-p database))
+ (progn (goto-char 0)
+ (re-search-forward "^DATABASE \\(.*.dat\\)" nil t)
+ (message "Database file \"%s\" not found, please check your input file."
+ database))
+ (with-temp-file ctrlfile
+ (insert infile "\n"
+ outfile "\n"
+ database "\n"))
+
+ (call-process phreeqc-compile-command ctrlfile "*phreeqc*" nil)
+ (delete-file ctrlfile))))
(defun phreeqc-visit-output ()