Skip to content
Permalink
Browse files

Merge branch 'master' into bugfix_18902

  • Loading branch information
lbartoletti committed Oct 25, 2018
2 parents a091e64 + 6fc36dc commit 94ce3b92a94df344684752bd23abae3111069b6a
Showing 1,423 changed files with 39,428 additions and 10,296 deletions.
@@ -47,6 +47,7 @@ cmake \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_MODELTEST=ON \
-DENABLE_PGTEST=ON \
-DENABLE_MSSQLTEST=ON \
-DWITH_QSPATIALITE=ON \
-DWITH_QWTPOLAR=OFF \
-DWITH_APIDOC=OFF \
@@ -107,6 +108,36 @@ pushd /root/QGIS > /dev/null
/root/QGIS/tests/testdata/provider/testdata_pg.sh
popd > /dev/null # /root/QGIS

##############################
# Restore SQL Server test data
##############################

echo "Importing SQL Server test data..."

export SQLUSER=sa
export SQLHOST=mssql
export SQLPORT=1433
export SQLPASSWORD='<YourStrong!Passw0rd>'
export SQLDATABASE=qgis_test

export PATH=$PATH:/opt/mssql-tools/bin

pushd /root/QGIS > /dev/null
/root/QGIS/tests/testdata/provider/testdata_mssql.sh
popd > /dev/null # /root/QGIS

echo "Setting up DSN for test SQL Server"

cat <<EOT > /etc/odbc.ini
[ODBC Data Sources]
testsqlserver = ODBC Driver 17 for SQL Server
[testsqlserver]
Driver = ODBC Driver 17 for SQL Server
Description = Test SQL Server
Server = mssql
EOT

###########
# Run tests
###########
@@ -5,6 +5,12 @@ services:
environment:
- ALLOW_IP_RANGE="172.18.0.0/16"

mssql:
image: microsoft/mssql-server-linux:2017-latest
environment:
ACCEPT_EULA: Y
SA_PASSWORD: <YourStrong!Passw0rd>

qgis-deps:
tty: true
image: qgis/qgis3-build-deps:${DOCKER_TAG}
@@ -13,6 +19,7 @@ services:
- $HOME/.ccache:/root/.ccache # if changed, also change env var
links:
- postgres
- mssql
environment:
- CCACHE_DIR=/root/.ccache
- CTEST_BUILD_DIR=/root/QGIS
@@ -7,10 +7,12 @@ LABEL Description="Docker container with QGIS dependencies" Vendor="QGIS.org" Ve
# && echo "deb-src http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu xenial main" >> /etc/apt/sources.list \
# && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160 \


RUN apt-get update \
&& apt-get install -y software-properties-common \
&& apt-get update \
&& apt-get install -y \
apt-transport-https \
bison \
ca-certificates \
ccache \
@@ -40,6 +42,7 @@ RUN apt-get update \
libqt5quick5 \
libqt5quickcontrols2-5 \
libqt5scintilla2-dev \
libqt5sql5-odbc \
libqt5sql5-sqlite \
libqt5svg5-dev \
libqt5webkit5-dev \
@@ -112,6 +115,19 @@ RUN apt-get update \
pyopenssl \
&& apt-get clean


# MSSQL: client side
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools

# Avoid sqlcmd termination due to locale -- see https://github.com/Microsoft/mssql-docker/issues/163
RUN echo "nb_NO.UTF-8 UTF-8" > /etc/locale.gen
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN locale-gen


RUN echo "alias python=python3" >> ~/.bash_aliases

ENV CC=/usr/lib/ccache/clang
@@ -12,4 +12,4 @@ Include a few sentences describing the overall goals for this PR (pull request).
- [ ] I have read the [QGIS Coding Standards](https://docs.qgis.org/testing/en/docs/developers_guide/codingstandards.html) and this PR complies with them
- [ ] This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
- [ ] New unit tests have been added for core changes
- [ ] I have run [the `scripts/prepare-commit.sh` script](https://github.com/qgis/QGIS/blob/master/.github/CONTRIBUTE.md#contributing-to-qgis) before each commit
- [ ] I have run [the `scripts/prepare-commit.sh` script](https://github.com/qgis/QGIS/blob/master/.github/CONTRIBUTING.md#contributing-to-qgis) before each commit
@@ -52,6 +52,7 @@ qgis.kdev4
qgis.supp
qgis-test.ctest
qtcreator-build/
resources/themes/*/style.qss.auto
scripts/astyle.exe
scripts/Debug
scripts/qgisstyle*
@@ -30,15 +30,27 @@ MESSAGE(STATUS "QGIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSIO
#############################################################
# Configure OpenCL if available
SET(HAVE_OPENCL FALSE)
IF (APPLE OR ${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
IF (${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
OPTION(USE_OPENCL "Use OpenCL" OFF)
ELSE (APPLE OR ${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
ELSE (${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
OPTION(USE_OPENCL "Use OpenCL" ON)
ENDIF (APPLE OR ${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
ENDIF (${CMAKE_HOST_SYSTEM_NAME} MATCHES "BSD$")
IF (USE_OPENCL)
FIND_PACKAGE(OpenCL)
IF(${OpenCL_FOUND})
SET(HAVE_OPENCL TRUE)
# Fixup for standard FindOpenCL module not assinging proper framework headers directory
IF (APPLE AND "${OpenCL_INCLUDE_DIR}" MATCHES "OpenCL\\.framework/?$")
SET(OpenCL_INCLUDE_DIR "${OpenCL_INCLUDE_DIR}/Headers" CACHE PATH "" FORCE)
SET(OpenCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIR})
ENDIF ()
FIND_PACKAGE(OpenCLhpp)
IF(NOT OPENCL_HPP_FOUND)
# Use internal headers copied from OpenCL-CLHPP project
SET(OPENCL_HPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external/opencl-clhpp/include CACHE PATH "" FORCE)
MESSAGE(STATUS "Couldn't find OpenCL C++ headers, using internal: ${OPENCL_HPP_INCLUDE_DIR}")
ENDIF(NOT OPENCL_HPP_FOUND)
SET(OpenCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS} ${OPENCL_HPP_INCLUDE_DIR})
ELSE(${OpenCL_FOUND})
MESSAGE(STATUS "Couldn't find OpenCL: support DISABLED")
ENDIF(${OpenCL_FOUND})
59 INSTALL
@@ -1,10 +1,10 @@
QGIS
Building QGIS from source - step by step
Wednesday August 22, 2018
Sunday October 14, 2018


Last Updated: Wednesday August 22, 2018
Last Change : Wednesday August 22, 2018
Last Updated: Sunday October 14, 2018
Last Change : Sunday October 14, 2018


1. Introduction
@@ -317,16 +317,11 @@ Build and install with ninja:
ninja (uses all cores by default; also supports the above described -jX option)
ninja install

You can build just the targets you need using, for example :
You can build just the targets you need using, for example:

ninja qgis
ninja pycore

You can build just the targets you need using, for example:

- ninja qgis
- ninja pycore


3.8. Building Debian packages
=============================
@@ -462,7 +457,7 @@ For the QGIS build you need to install following packages from cygwin:

and from OSGeo4W (select Advanced Installation):

- qgis-rel-deps
- qgis-dev-deps

This will also select packages the above packages depend on.

@@ -1046,37 +1041,53 @@ of space and it's not necessary at all.
4.4. Building on Linux with mxe
===============================

With this approach you can build a windows binary on Linux using mxe MXE (M cross environment).
You can find the build script and a README file in the ms-windows/mxe directory.
With this approach you can cross build a Windows binary on Linux using MXE (M cross environment).
You can find the build script and a README.md file in the ms-windows/mxe directory.

For now, Python buildings cannot be built with mxe.


4.4.1. Initial setup
====================
4.4.1. Building with Docker
===========================

This is the simplest way, but you need to have Docker installed
on your system.

You can use a Docker image to cross build QGIS by calling
the script ms-windows/mxe/build.sh from the root directory of QGIS repository.

=== Building without Docker ====

This requires to install mxe toolchain on your system and build
all dependencies by yourself.


4.4.1.1. Initial setup
======================

Please follow the instructions on mxe website to setup your building toolchain http://mxe.cc/,
take note of the path where you have installed mxe.


4.4.2. Building the dependencies
================================
4.4.1.2. Building the dependencies
==================================

Please see the README under ms-windows/mxe for a list of the dependencies that need to be
built in mxe before attempting to build QGIS.
Please see README.md under ms-windows/mxe for detailed instructions and for the
list of dependencies that need to be built in mxe before attempting to build QGIS.


4.4.3. Cross-Building QGIS
==========================
4.4.1.3. Cross-Building QGIS
============================

Edit the build-mxe.sh script and change the path where your mxe installation is located, you
can also change the build and release directory.
Edit the build-mxe.sh script and optionally adjust the path where your mxe installation is located, you
can also change the build and release directories.


4.4.4. Testing QGIS
4.4.2. Testing QGIS
===================

Copy and unzip the release package on a Windows machine and launch it!
Copy and unzip on the Windows machine package produced by the build and launch the qgis binary: no installation
is required.


5. Building on MacOS X
@@ -0,0 +1,48 @@
# Find OpenCLhpp
# ~~~~~~~~~~~~~~~
# CMake module to search for OpenCL headers for C++ bindings from:
# https://github.com/KhronosGroup/OpenCL-CLHPP
#
# Specifically, it finds the cpl2 header.
#
# If it's found it sets OPENCL_HPP_FOUND to TRUE
# and following variables are set:
# OPENCL_HPP_INCLUDE_DIR
#
# Copyright (c) 2018, Boundless Spatial
# Author: Larry Shaffer <lshaffer (at) boundlessgeo (dot) com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if (OPENCL_HPP_INCLUDE_DIR)
SET(OPENCL_HPP_FOUND TRUE)
else ()
find_path(OPENCL_HPP_INCLUDE_DIR
NAMES CL/cl2.hpp
PATHS
${LIB_DIR}/include
"$ENV{LIB_DIR}/include"
$ENV{INCLUDE}
/usr/local/include
/usr/include
)
if (OPENCL_HPP_INCLUDE_DIR)
SET(OPENCL_HPP_FOUND TRUE)
else ()
SET(OPENCL_HPP_FOUND FALSE)
endif ()
endif ()


if (OPENCL_HPP_FOUND)
if (NOT OPENCLHPP_FIND_QUIETLY)
message(STATUS "Found OpenCL C++ headers: ${OPENCL_HPP_INCLUDE_DIR}")
endif ()
else ()
if (OPENCLHPP_FIND_REQUIRED)
message(FATAL_ERROR "Could not find OpenCL C++ headers")
endif ()
endif ()

mark_as_advanced(OPENCL_HPP_INCLUDE_DIR)
@@ -42,7 +42,7 @@ ELSE(EXISTS PYQT5_VERSION)
ENDIF(EXISTS ${PYQT5_SIP_DIR}/Qt5)
STRING(REGEX REPLACE ".*\npyqt_sip_flags:([^\n]+).*$" "\\1" PYQT5_SIP_FLAGS ${pyqt_config})
STRING(REGEX REPLACE ".*\npyqt_bin_dir:([^\n]+).*$" "\\1" PYQT5_BIN_DIR ${pyqt_config})

STRING(REGEX REPLACE ".*\npyqt_sip_module:([^\n]+).*$" "\\1" PYQT5_SIP_IMPORT ${pyqt_config})
SET(PYQT5_FOUND TRUE)
ENDIF(pyqt_config)

@@ -79,3 +79,9 @@
print("pyqt_sip_dir:%s" % pyqtcfg.pyqt_sip_dir)
print("pyqt_sip_flags:%s" % pyqtcfg.pyqt_sip_flags)
print("pyqt_bin_dir:%s" % pyqtcfg.pyqt_bin_dir)

try:
import PyQt5.sip
print("pyqt_sip_module:PyQt5.sip")
except:
print("pyqt_sip_module:sip")
@@ -56,6 +56,7 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR)
"${QT_INCLUDE_DIR}"
/usr/local/include
/usr/include
PATH_SUFFIXES qt
)

IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
@@ -22,7 +22,7 @@ ENDIF(EXISTS "${CMAKE_BINARY_DIR}/python/qgis.gui.api")
# add qgis.core.NULL attribute defined in <src>/python/__init__.py for QPyNullVariant
FILE(APPEND "${QGIS_PYTHON_API_FILE}" "qgis.core.NULL?7\n")

FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api)
FOREACH(apiFile qgis.core.api qgis.gui.api qgis.analysis.api qgis.server.api qgis.qgis3d.api)
SET(api "${CMAKE_BINARY_DIR}/python/${apiFile}")
IF(EXISTS "${api}")
FILE(READ "${api}" FILE_CONTENT)
@@ -85,6 +85,7 @@ IF(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/layout
${CMAKE_SOURCE_DIR}/src/gui/locator
${CMAKE_SOURCE_DIR}/src/gui/processing
${CMAKE_SOURCE_DIR}/src/gui/raster

0 comments on commit 94ce3b9

Please sign in to comment.
You can’t perform that action at this time.