-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build QGIS and dependencies on darwin #36902
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
49182bc
Fix grass build on darwin
mpickering f0a8f1f
Refine libspatialindex platforms attribute
mpickering de6360b
Build qca2 on darwin
mpickering 3391006
Fix qscintilla qt5 darwin build
mpickering ef4bce8
Build qwt6 on darwin
mpickering 2c6cd5b
Build qscintilla on darwin
mpickering 4a4478b
Add additional darwin dependency for qca2
mpickering 92f76df
Add darwin to qwt platforms attribute
mpickering 7842e5d
Package QGIS 2.18 for darwin
mpickering 9031300
Remove darwin specific patch
mpickering File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
{ stdenv, fetchurl, fetchpatch, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl | ||
, qwt, fcgi, python2Packages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper | ||
, qjson, qca2, txt2tags, openssl | ||
, withGrass ? false, grass | ||
, qjson, qca2, txt2tags, openssl, darwin, pkgconfig | ||
, withGrass ? false, grass, IOKit, ApplicationServices | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "qgis-2.18.16"; | ||
|
||
buildInputs = [ gdal qt4 flex openssl bison proj geos xlibsWrapper sqlite gsl qwt qscintilla | ||
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++ | ||
fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags pkgconfig ] | ||
++ | ||
(stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices]) | ||
++ | ||
(stdenv.lib.optional withGrass grass) ++ | ||
(stdenv.lib.optional (stdenv.isDarwin && withGrass) darwin.apple_sdk.libs.utmp) ++ | ||
(with python2Packages; [ jinja2 numpy psycopg2 pygments requests python2Packages.qscintilla sip ]); | ||
|
||
nativeBuildInputs = [ cmake makeWrapper ]; | ||
nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; | ||
|
||
# `make -f src/providers/wms/CMakeFiles/wmsprovider_a.dir/build.make src/providers/wms/CMakeFiles/wmsprovider_a.dir/qgswmssourceselect.cpp.o`: | ||
# fatal error: ui_qgsdelimitedtextsourceselectbase.h: No such file or directory | ||
enableParallelBuilding = false; | ||
|
||
preConfigure = '' | ||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libspatialindex)" | ||
''; | ||
|
||
# To handle the lack of 'local' RPATH; required, as they call one of | ||
# their built binaries requiring their libs, in the build process. | ||
preBuild = '' | ||
|
@@ -29,19 +37,44 @@ stdenv.mkDerivation rec { | |
sha256 = "0d880m013kzi4qiyr27yjx6hzpb652slp66gyqgw9ziw03wy12c9"; | ||
}; | ||
|
||
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; | ||
# CMAKE_FIND_FRAMEWORK=never stops the installer choosing system | ||
# installed frameworks | ||
# QGIS_MACAPP_BUNDLE=0 stops the installer copying the Qt binaries into the | ||
# installation which causes havoc | ||
# Building RelWithDebInfo allows QGIS_DEBUG to print debugging information | ||
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}" | ||
++ stdenv.lib.optional stdenv.isDarwin | ||
(["-DCMAKE_FIND_FRAMEWORK=never"] | ||
++ ["-DQGIS_MACAPP_BUNDLE=0"]); | ||
# ++ ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"]; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/qgis \ | ||
--prefix PYTHONPATH : $PYTHONPATH \ | ||
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]} | ||
''; | ||
|
||
|
||
postInstall = | ||
(stdenv.lib.optionalString stdenv.isLinux '' | ||
wrapProgram $out/bin/qgis \ | ||
--set PYTHONPATH $PYTHONPATH \ | ||
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ openssl ]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While it already existed, this is really ugly. We should aim at patching references over using LD_LIBRARY_PATH |
||
'') + | ||
(stdenv.lib.optionalString stdenv.isDarwin '' | ||
# Necessary for QGIS to find the correct default GRASS path | ||
${stdenv.lib.optionalString withGrass "ln -sf ${grass} $out/QGIS.app/Contents/MacOS/grass"} | ||
for file in $(find $out -type f -name "QGIS"); do | ||
wrapProgram "$file" \ | ||
--prefix DYLD_LIBRARY_PATH : "${qwt}/lib" \ | ||
--prefix DYLD_LIBRARY_PATH : "${qscintilla}/lib" \ | ||
${stdenv.lib.optionalString withGrass "--prefix PATH : ${grass}/bin"} \ | ||
--set PYTHONPATH $PYTHONPATH | ||
done | ||
mkdir -p $out/bin | ||
ln -s $out/QGIS.app/Contents/MacOS/QGIS $out/bin/qgis | ||
''); | ||
|
||
meta = { | ||
description = "User friendly Open Source Geographic Information System"; | ||
homepage = http://www.qgis.org; | ||
license = stdenv.lib.licenses.gpl2Plus; | ||
platforms = with stdenv.lib.platforms; linux; | ||
platforms = with stdenv.lib.platforms; unix; | ||
maintainers = with stdenv.lib.maintainers; [viric]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this left in intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was unsure whether to leave it in or not as it's very useful to see the terminal output when running the application. Like I said, the derivation is currently not perfect but much better than what is currently in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release type affects the terminal output? 🤦♂️ ah well, maybe add a comment clarifying how it's useful then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it's a graphical application. Building with debug info makes the terminal output very verbose as you use the gui.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the actual thing that debug info refers to is the debugging symbols that map the machine code sections back to source code. Terminal output should not usually be affected, but it's up to the application developer whether that's actually the case.