Skip to content

Commit

Permalink
fixes for debian and osgeo4w packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 27, 2015
1 parent a9c8a01 commit 212a924
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 23 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -312,8 +312,10 @@ FIND_PACKAGE(QScintilla REQUIRED)
FIND_PACKAGE(QCA REQUIRED)
# Check for runtime dependency of qca-ossl plugin
# REQUIRED if unit tests are to be run from build directory
IF(NOT MSVC)
include(QCAMacros)
FIND_QCAOSSL_PLUGIN_CPP(ENABLE_TESTS)
ENDIF(NOT MSVC)

# ModelTest
SET(ENABLE_MODELTEST FALSE CACHE BOOL "Enable QT ModelTest (not for production)")
Expand Down
1 change: 1 addition & 0 deletions debian/control.in
Expand Up @@ -41,6 +41,7 @@ Build-Depends:
#sid stretch jessie wheezy precise saucy trusty utopic vivid# python-qt4 (>= 4.1.0), python-qt4-dev,
#sid stretch jessie# pyqt4.qsci-dev,
#sid stretch jessie trusty utopic vivid# python-pyspatialite,
#sid stretch# dh-python,
python-sip (>= 4.5.0),
python-sip-dev (>= 4.5.0),
libosgearth-dev,
Expand Down
4 changes: 4 additions & 0 deletions debian/qgis-providers.install.in
Expand Up @@ -11,4 +11,8 @@ usr/lib/qgis/plugins/libspatialiteprovider.so
usr/lib/qgis/plugins/libwfsprovider.so
usr/lib/qgis/plugins/libwmsprovider.so
usr/lib/qgis/plugins/libwcsprovider.so
usr/lib/qgis/plugins/libbasicauthmethod.so
usr/lib/qgis/plugins/libidentcertauthmethod.so
usr/lib/qgis/plugins/libpkcs12authmethod.so
usr/lib/qgis/plugins/libpkipathsauthmethod.so
{QT_PLUGIN_DIR}/sqldrivers/libqsqlspatialite.so
2 changes: 2 additions & 0 deletions debian/qgis.install
Expand Up @@ -13,6 +13,8 @@ usr/lib/qgis/plugins/libroadgraphplugin.so
usr/lib/qgis/plugins/libzonalstatisticsplugin.so
usr/lib/qgis/plugins/libheatmapplugin.so
usr/lib/qgis/plugins/libtopolplugin.so
usr/lib/qgis/plugins/libgeometrycheckerplugin.so
usr/lib/qgis/plugins/libgeometrysnapperplugin.so
usr/lib/qgis/qgis_help
usr/lib/libqgis_app.so
usr/share/pixmaps/
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Expand Up @@ -74,7 +74,7 @@ CMAKE_OPTS := \

ifeq ($(GRASSVER),7)
CMAKE_OPTS += \
-DWITH_GRASS=FALSE \
-DWITH_GRASS=TRUE \
-DWITH_GRASS7=TRUE \
-DGRASS_PREFIX7=/usr/lib/$(GRASS)
else
Expand Down
7 changes: 7 additions & 0 deletions ms-windows/osgeo4w/package.cmd
Expand Up @@ -311,6 +311,10 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-common/%PACKAGENAME
"apps/%PACKAGENAME%/plugins/wcsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/wfsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/wmsprovider.dll" ^
"apps/%PACKAGENAME%/plugins/basicauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/identcertauthmethod.dll" ^
"apps/%PACKAGENAME%/plugins/pkcs12authmethod.dll" ^
"apps/%PACKAGENAME%/plugins/pkipathsauthmethod.dll" ^
"apps/%PACKAGENAME%/resources/qgis.db" ^
"apps/%PACKAGENAME%/resources/spatialite.db" ^
"apps/%PACKAGENAME%/resources/srs.db" ^
Expand Down Expand Up @@ -366,6 +370,7 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
"bin/%PACKAGENAME%-browser-bin.exe" ^
"bin/%PACKAGENAME%-bin.exe" ^
"bin/python-%PACKAGENAME%.bat.tmpl" ^
"apps/%PACKAGENAME%/bin/qgis_app.dll" ^
"apps/%PACKAGENAME%/bin/qgis.reg.tmpl" ^
"apps/%PACKAGENAME%/i18n/" ^
"apps/%PACKAGENAME%/icons/" ^
Expand All @@ -385,6 +390,8 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
"apps/%PACKAGENAME%/plugins/spitplugin.dll" ^
"apps/%PACKAGENAME%/plugins/topolplugin.dll" ^
"apps/%PACKAGENAME%/plugins/zonalstatisticsplugin.dll" ^
"apps/%PACKAGENAME%/plugins/geometrycheckerplugin.dll" ^
"apps/%PACKAGENAME%/plugins/geometrysnapperplugin.dll" ^
"apps/%PACKAGENAME%/qgis_help.exe" ^
"apps/%PACKAGENAME%/qtplugins/sqldrivers/qsqlspatialite.dll" ^
"apps/%PACKAGENAME%/qtplugins/designer/" ^
Expand Down
10 changes: 6 additions & 4 deletions src/app/CMakeLists.txt
Expand Up @@ -418,9 +418,11 @@ QT4_ADD_RESOURCES(TEST_RCC_SRCS ${TEST_RCCS})

QT4_WRAP_CPP(QGIS_APP_MOC_SRCS ${QGIS_APP_MOC_HDRS})

SET (QGIS_APPMAIN_SRCS main.cpp)

IF (WIN32)
IF (MSVC)
SET (QGIS_APP_SRCS ${QGIS_APP_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/qgis_win32.rc)
SET (QGIS_APPMAIN_SRCS ${QGIS_APPMAIN_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/qgis_win32.rc)
ELSE(MSVC)

# Icon for windows MINGW
Expand All @@ -439,7 +441,7 @@ IF (WIN32)
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/icon.o
COMMAND ${WINDRES} -I${CMAKE_CURRENT_SOURCE_DIR} -i${CMAKE_CURRENT_SOURCE_DIR}/qgis_win32.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/icon.o )
SET(QGIS_APP_SRCS ${QGIS_APP_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
SET(QGIS_APPMAIN_SRCS ${QGIS_APPMAIN_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
ENDIF (MSVC)
ENDIF (WIN32)

Expand Down Expand Up @@ -514,9 +516,9 @@ ENDIF (POSTGRES_FOUND)

#############
IF (ANDROID)
ADD_LIBRARY(${QGIS_APP_NAME} SHARED main.cpp ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_LIBRARY(${QGIS_APP_NAME} SHARED ${QGIS_APPMAIN_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ELSE (ANDROID)
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 main.cpp ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 ${QGIS_APPMAIN_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ENDIF (ANDROID)

IF (NOT MSVC)
Expand Down
7 changes: 6 additions & 1 deletion src/app/main.cpp
Expand Up @@ -15,6 +15,11 @@
* *
***************************************************************************/

#ifdef _MSC_VER
#undef APP_EXPORT
#define APP_EXPORT __declspec(dllimport)
#endif

//qt includes
#include <QBitmap>
#include <QDir>
Expand Down Expand Up @@ -382,7 +387,7 @@ void myMessageOutput( QtMsgType type, const char *msg )
}
}

APP_EXPORT int main( int argc, char *argv[] )
int main( int argc, char *argv[] )
{
#ifdef Q_OS_MACX
// Increase file resource limits (i.e., number of allowed open files)
Expand Down
2 changes: 1 addition & 1 deletion src/auth/basic/qgsauthbasicedit.h
Expand Up @@ -24,7 +24,7 @@
#include "qgsauthconfig.h"


class GUI_EXPORT QgsAuthBasicEdit : public QgsAuthMethodEdit, private Ui::QgsAuthBasicEdit
class QgsAuthBasicEdit : public QgsAuthMethodEdit, private Ui::QgsAuthBasicEdit
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/auth/identcert/qgsauthidentcertedit.h
Expand Up @@ -24,7 +24,7 @@
#include "qgsauthconfig.h"


class GUI_EXPORT QgsAuthIdentCertEdit : public QgsAuthMethodEdit, private Ui::QgsAuthIdentCertEdit
class QgsAuthIdentCertEdit : public QgsAuthMethodEdit, private Ui::QgsAuthIdentCertEdit
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/auth/pkipaths/qgsauthpkipathsedit.h
Expand Up @@ -24,7 +24,7 @@
#include "qgsauthconfig.h"


class GUI_EXPORT QgsAuthPkiPathsEdit : public QgsAuthMethodEdit, private Ui::QgsAuthPkiPathsEdit
class QgsAuthPkiPathsEdit : public QgsAuthMethodEdit, private Ui::QgsAuthPkiPathsEdit
{
Q_OBJECT

Expand Down
2 changes: 1 addition & 1 deletion src/auth/pkipkcs12/qgsauthpkcs12edit.h
Expand Up @@ -24,7 +24,7 @@
#include "qgsauthconfig.h"


class GUI_EXPORT QgsAuthPkcs12Edit : public QgsAuthMethodEdit, private Ui::QgsAuthPkcs12Edit
class QgsAuthPkcs12Edit : public QgsAuthMethodEdit, private Ui::QgsAuthPkcs12Edit
{
Q_OBJECT

Expand Down
8 changes: 4 additions & 4 deletions src/core/CMakeLists.txt
Expand Up @@ -2,9 +2,6 @@
# sources

SET(QGIS_CORE_SRCS

geosextra/geos_c_extra.cpp

gps/qgsgpsconnection.cpp
gps/qgsgpsconnectionregistry.cpp
gps/qgsnmeaconnection.cpp
Expand Down Expand Up @@ -877,14 +874,17 @@ TARGET_LINK_LIBRARIES(qgis_core

${PROJ_LIBRARY}
${GEOS_LIBRARY}
${GEOS_CPP_LIBRARY}
${GDAL_LIBRARY}
${SPATIALINDEX_LIBRARY}
${EXPAT_LIBRARY}
${SQLITE3_LIBRARY}
${SPATIALITE_LIBRARY}
)

IF(GEOS_CPP_LIBRARY)
TARGET_LINK_LIBRARIES(qgis_core ${GEOS_CPP_LIBRARY})
ENDIF(GEOS_CPP_LIBRARY)

IF (Qt5Positioning_FOUND)
TARGET_LINK_LIBRARIES(qgis_core
Qt5::Positioning
Expand Down
8 changes: 4 additions & 4 deletions src/core/geometry/qgsgeos.cpp
Expand Up @@ -116,7 +116,7 @@ class GEOSGeomScopedPtr

QgsGeos::QgsGeos( const QgsAbstractGeometryV2* geometry, int precision ): QgsGeometryEngine( geometry ), mGeos( 0 ), mGeosPrepared( 0 )
{
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) || defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
double prec = qPow( 10, -precision );
mPrecisionModel = GEOSPrecisionModel_createFixed( 1.f / prec );
mPrecisionReducer = GEOSGeometryPrecisionReducer_create( mPrecisionModel );
Expand All @@ -128,7 +128,7 @@ QgsGeos::QgsGeos( const QgsAbstractGeometryV2* geometry, int precision ): QgsGeo

QgsGeos::~QgsGeos()
{
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) || defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
GEOSGeom_destroy_r( geosinit.ctxt, mGeos );
GEOSPreparedGeom_destroy_r( geosinit.ctxt, mGeosPrepared );
GEOSGeometryPrecisionReducer_destroy( mPrecisionReducer );
Expand All @@ -138,7 +138,7 @@ QgsGeos::~QgsGeos()

inline GEOSGeometry* QgsGeos::getReducedGeometry( GEOSGeometry* geom ) const
{
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) || defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
//reduce precision
GEOSGeometry* reduced = GEOSGeometryPrecisionReducer_reduce( mPrecisionReducer, geom );
GEOSGeom_destroy_r( geosinit.ctxt, geom );
Expand Down Expand Up @@ -175,7 +175,7 @@ void QgsGeos::cacheGeos() const
}

GEOSGeometry* g = asGeos( mGeometry );
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) || defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
if ( g )
{
mGeos = GEOSGeometryPrecisionReducer_reduce( mPrecisionReducer, g );
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsgeos.h
Expand Up @@ -19,7 +19,7 @@ email : marco.hugentobler at sourcepole dot com
#include "qgsgeometryengine.h"
#include "qgspointv2.h"
#include <geos_c.h>
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) && !defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
#include "geosextra/geos_c_extra.h"
#endif

Expand Down Expand Up @@ -92,7 +92,7 @@ class CORE_EXPORT QgsGeos: public QgsGeometryEngine
private:
mutable GEOSGeometry* mGeos;
const GEOSPreparedGeometry* mGeosPrepared;
#ifdef HAVE_GEOS_CPP
#if defined(HAVE_GEOS_CPP) || defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
//precision reducer
GEOSPrecisionModel* mPrecisionModel;
GEOSGeometryPrecisionReducer* mPrecisionReducer;
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/geometry_checker/checks/qgsgeometrycheck.h
Expand Up @@ -14,7 +14,10 @@
#include "qgsvectorlayer.h"
#include "geometry/qgsgeometry.h"
#include "../utils/qgsgeomutils.h"
#include "geos_c.h"
#if defined(HAVE_GEOS_CPP) || !defined(HAVE_GEOS_CAPI_PRECISION_MODEL)
#include <geosextra/geos_c_extra.h>
#endif
#include <QApplication>

class QgsGeometryCheckError;
Expand Down
Expand Up @@ -154,7 +154,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError* err, Chan
{
double maxVal = 0.;
QgsFeature mergeFeature;
int mergePartIdx;
int mergePartIdx = -1;

QgsAbstractGeometryV2* errGeometry = QgsGeomUtils::getGeomPart( err->geometry(), 0 );

Expand Down
4 changes: 2 additions & 2 deletions src/providers/grass/qgsgrassfeatureiterator.h
Expand Up @@ -24,7 +24,7 @@
//class QgsGrassProvider;
class QgsGrassVectorMapLayer;

class QgsGrassFeatureSource : public QgsAbstractFeatureSource
class GRASS_LIB_EXPORT QgsGrassFeatureSource : public QgsAbstractFeatureSource
{
public:
QgsGrassFeatureSource( const QgsGrassProvider* provider );
Expand Down Expand Up @@ -70,7 +70,7 @@ class QgsGrassFeatureSource : public QgsAbstractFeatureSource
};


class QgsGrassFeatureIterator : public QObject, public QgsAbstractFeatureIteratorFromSource<QgsGrassFeatureSource>
class GRASS_LIB_EXPORT QgsGrassFeatureIterator : public QObject, public QgsAbstractFeatureIteratorFromSource<QgsGrassFeatureSource>
{
Q_OBJECT
public:
Expand Down

0 comments on commit 212a924

Please sign in to comment.