summary refs log tree commit diff
path: root/pkgs/applications/gis/grass
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2018-03-13 09:04:18 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2018-03-21 08:27:57 +0000
commit49182bcd34a73d33fccb9a0e709bd9cc45bfa26f (patch)
tree9b28e84c6841b16163bf5f18f8685ccf67f80df8 /pkgs/applications/gis/grass
parentd5797472e25ec65d8e8120614c28dce647302add (diff)
downloadnixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar.gz
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar.bz2
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar.lz
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar.xz
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.tar.zst
nixlib-49182bcd34a73d33fccb9a0e709bd9cc45bfa26f.zip
Fix grass build on darwin
Diffstat (limited to 'pkgs/applications/gis/grass')
-rw-r--r--pkgs/applications/gis/grass/default.nix6
-rw-r--r--pkgs/applications/gis/grass/no_symbolic_links.patch37
2 files changed, 42 insertions, 1 deletions
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 987b544c5565..5b36c24ab10e 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw
 , cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
-, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages
+, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages, lib
 }:
 
 stdenv.mkDerivation {
@@ -15,6 +15,10 @@ stdenv.mkDerivation {
   readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ]
     ++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
 
+  # On Darwin the installer tries to symlink the help files into a system
+  # directory
+  patches = [] ++ lib.optional stdenv.isDarwin [ ./no_symbolic_links.patch ];
+
   configureFlags = [
     "--with-proj-share=${proj}/share/proj"
     "--without-opengl"
diff --git a/pkgs/applications/gis/grass/no_symbolic_links.patch b/pkgs/applications/gis/grass/no_symbolic_links.patch
new file mode 100644
index 000000000000..ef09b97b7037
--- /dev/null
+++ b/pkgs/applications/gis/grass/no_symbolic_links.patch
@@ -0,0 +1,37 @@
+diff --git a/include/Make/Install.make b/include/Make/Install.make
+index 0aba138..8ba74bc 100644
+--- a/include/Make/Install.make
++++ b/include/Make/Install.make
+@@ -116,11 +116,6 @@ real-install: | $(INST_DIR) $(UNIX_BIN)
+ 	-$(INSTALL) config.status $(INST_DIR)/config.status
+ 	-$(CHMOD) -R a+rX $(INST_DIR) 2>/dev/null
+ 
+-ifneq ($(findstring darwin,$(ARCH)),)
+-	@# enable OSX Help Viewer
+-	@/bin/ln -sfh "$(INST_DIR)/docs/html" /Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
+-endif
+-
+ $(INST_DIR) $(UNIX_BIN):
+ 	$(MAKE_DIR_CMD) $@
+ 
+diff --git a/macosx/app/build_html_user_index.sh b/macosx/app/build_html_user_index.sh
+index 04e63eb..c9d9c2c 100755
+--- a/macosx/app/build_html_user_index.sh
++++ b/macosx/app/build_html_user_index.sh
+@@ -140,7 +140,6 @@ else
+ #      echo "<tr><td valign=\"top\"><a href=\"$HTMLDIRG/$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
+       # make them local to user to simplify page links
+       echo "<tr><td valign=\"top\"><a href=\"global_$i\">$BASENAME</a></td> <td>$SHORTDESC</td></tr>" >> $FULLINDEX
+-      ln -sf "$HTMLDIRG/$i" global_$i
+     done
+   done
+ fi
+@@ -183,8 +182,3 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
+ </html>" > $i.html
+ done
+ 
+-# add Help Viewer links in user docs folder
+-
+-mkdir -p $HOME/Library/Documentation/Help/
+-ln -sfh ../../GRASS/$GRASS_MMVER/Modules/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER-addon
+-ln -sfh $GISBASE/docs/html $HOME/Library/Documentation/Help/GRASS-$GRASS_MMVER