grass: fix build on Darwin
* Drop patch related to documentation installation. It fails to apply because the change was made upstream as of 8.0; and * Convert the port to an `unsigned int` as expected by the MySQL API.
This commit is contained in:
parent
1d2d4ec8fa
commit
58f06c41b5
4 changed files with 29 additions and 42 deletions
21
pkgs/applications/gis/grass/clang-integer-conversion.patch
Normal file
21
pkgs/applications/gis/grass/clang-integer-conversion.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
diff -ur a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c
|
||||||
|
--- a/db/drivers/mysql/db.c 1969-12-31 19:00:01.000000000 -0500
|
||||||
|
+++ b/db/drivers/mysql/db.c 2023-11-09 23:26:25.329700495 -0500
|
||||||
|
@@ -52,9 +52,16 @@
|
||||||
|
|
||||||
|
db_get_login2("mysql", name, &user, &password, &host, &port);
|
||||||
|
|
||||||
|
+ const char* errstr;
|
||||||
|
+ unsigned int port_number = (unsigned int)strtonum(port, 0, 65536, &errstr);
|
||||||
|
+ if (errstr != NULL) {
|
||||||
|
+ db_d_append_error("%s", errstr);
|
||||||
|
+ return DB_FAILED;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
connection = mysql_init(NULL);
|
||||||
|
res = mysql_real_connect(connection, host, user, password,
|
||||||
|
- connpar.dbname, port, NULL, 0);
|
||||||
|
+ connpar.dbname, port_number, NULL, 0);
|
||||||
|
|
||||||
|
if (res == NULL) {
|
||||||
|
db_d_append_error("%s\n%s", _("Connection failed."),
|
|
@ -81,12 +81,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
# On Darwin the installer tries to symlink the help files into a system
|
patches = lib.optionals stdenv.isDarwin [
|
||||||
# directory
|
# Fix conversion of const char* to unsigned int.
|
||||||
patches = [ ./no_symbolic_links.patch ];
|
./clang-integer-conversion.patch
|
||||||
|
];
|
||||||
|
|
||||||
# Correct mysql_config query
|
# Correct mysql_config query
|
||||||
patchPhase = ''
|
postPatch = ''
|
||||||
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
|
substituteInPlace configure --replace "--libmysqld-libs" "--libs"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
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
|
|
|
@ -30254,7 +30254,9 @@ with pkgs;
|
||||||
|
|
||||||
dcw-gmt = callPackage ../applications/gis/gmt/dcw.nix { };
|
dcw-gmt = callPackage ../applications/gis/gmt/dcw.nix { };
|
||||||
|
|
||||||
grass = callPackage ../applications/gis/grass { };
|
grass = callPackage ../applications/gis/grass {
|
||||||
|
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
openorienteering-mapper = libsForQt5.callPackage ../applications/gis/openorienteering-mapper { };
|
openorienteering-mapper = libsForQt5.callPackage ../applications/gis/openorienteering-mapper { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue