Skip to content

Commit

Permalink
Fix grass build on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering committed Mar 21, 2018
1 parent d579747 commit 49182bc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
6 changes: 5 additions & 1 deletion 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 {
Expand All @@ -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"
Expand Down
37 changes: 37 additions & 0 deletions 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

0 comments on commit 49182bc

Please sign in to comment.