[macports-ports] branch master updated: qgis3: workaround a typo (?) in a file that prevented compiling

Ryan Schmidt ryandesign at macports.org
Fri Dec 8 11:41:02 UTC 2017


On Dec 8, 2017, at 04:53, Vincent wrote:

> Vincent (Veence) pushed a commit to branch master
> in repository macports-ports.
> 
> 
> https://github.com/macports/macports-ports/commit/a2fa081e674a9c1df022ed2aa67f0170546f7010
> 
> The following commit(s) were added to refs/heads/master by this push:
> 
>      new a2fa081  qgis3: workaround a typo (?) in a file that prevented compiling
> 
> a2fa081 is described below
> 
> 
> commit a2fa081e674a9c1df022ed2aa67f0170546f7010
> 
> Author: Veence
> AuthorDate: Fri Dec 8 11:52:27 2017 +0100
> 
> 
>     qgis3: workaround a typo (?) in a file that prevented compiling

Probably not a typo... 

According to [1] "Q_OS_MAC" is a synonym for "Q_OS_DARWIN" and means any OS based on Darwin, such as macOS or iOS. Conversely, "Q_OS_MACX" means specifically macOS, not any other Darwin derivative.

The specific #ifdef you've modified the reinplace to leave alone is:

#ifdef Q_OS_MACX
#include <ApplicationServices/ApplicationServices.h>
#endif

ApplicationServices is a macOS-specific framework, not available on iOS, so the use of Q_OS_MACX seems correct here.

[1] https://git.merproject.org/mer-core/qtbase/commit/bf10f2be19640bc398cd38b1fefcf58d4dcecd68


> ---
>  gis/qgis3/Portfile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gis/qgis3/Portfile b/gis/qgis3/Portfile
> index 7dc6d30..aee1dfd 100644
> --- a/gis/qgis3/Portfile
> +++ b/gis/qgis3/Portfile
> @@ -73,7 +73,7 @@ post-patch {
>          ${worksrcpath}/cmake/FindPyQt5.py
> 
>      # Handle QGIS Fix #11399 which doesn’t seem to work anymore
> -    reinplace -E "s|#ifdef Q_OS_MAC|#if 0|" \
> +    reinplace -E "s|#ifdef Q_OS_MAC$|#if 0|" \
>          ${worksrcpath}/src/app/layout/qgslayoutdesignerdialog.cpp 
>      # Handle legacy OS/XCode
> 


You may want to change this reinplace to a normal patchfile to avoid other surprises down the road as upstream makes further changes to the file. You don't know for certain that upstream won't in the future add other "#ifdef Q_OS_MAC"-bracketed code to this file, and if they do, who knows at this point whether you'll want to exclude it too to leave it included.




More information about the macports-dev mailing list