Skip to content

Commit

Permalink
debian packaging: include Qt53DExtra headers removed on debian/ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 4, 2018
1 parent d449d41 commit 1f91858
Show file tree
Hide file tree
Showing 90 changed files with 4,035 additions and 19 deletions.
29 changes: 14 additions & 15 deletions debian/control.in
Expand Up @@ -40,8 +40,7 @@ Build-Depends:
graphviz,
xvfb, xauth,
xfonts-base, xfonts-100dpi, xfonts-75dpi, xfonts-scalable,
#sid buster bionic cosmic# libosgearth-dev,
#bionic# qt3d5-dev, qt3d-assimpsceneimport-plugin, qt3d-defaultgeometryloader-plugin, qt3d-gltfsceneio-plugin, qt3d-scene2d-plugin,
#sid buster bionic cosmic# libosgearth-dev, qt3d5-dev, qt3d-assimpsceneimport-plugin, qt3d-defaultgeometryloader-plugin, qt3d-gltfsceneio-plugin, qt3d-scene2d-plugin,
#oracle# oracle-instantclient12.1-devel, oracle-instantclient12.1-basiclite,
locales, ca-certificates, ninja-build
Build-Conflicts: libqgis-dev, qgis-dev
Expand Down Expand Up @@ -148,19 +147,19 @@ Description: QGIS - shared native gui library
.
This package contains the shared native gui library.

#bionic#Package: libqgis-3d{QGIS_ABI}
#bionic#Architecture: any
#bionic#Section: libs
#bionic#Depends:
#bionic# qt3d-assimpsceneimport-plugin, qt3d-defaultgeometryloader-plugin, qt3d-gltfsceneio-plugin, qt3d-scene2d-plugin,
#bionic# ${shlibs:Depends},
#bionic# ${misc:Depends}
#bionic#Description: QGIS - shared 3d library
#bionic# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#bionic# display databases of geographic information.
#bionic# .
#bionic# This package contains the shared 3d library.
#bionic#
#sid buster bionic cosmic#Package: libqgis-3d{QGIS_ABI}
#sid buster bionic cosmic#Architecture: any
#sid buster bionic cosmic#Section: libs
#sid buster bionic cosmic#Depends:
#sid buster bionic cosmic# qt3d-assimpsceneimport-plugin, qt3d-defaultgeometryloader-plugin, qt3d-gltfsceneio-plugin, qt3d-scene2d-plugin,
#sid buster bionic cosmic# ${shlibs:Depends},
#sid buster bionic cosmic# ${misc:Depends}
#sid buster bionic cosmic#Description: QGIS - shared 3d library
#sid buster bionic cosmic# QGIS is a Geographic Information System (GIS) which manages, analyzes and
#sid buster bionic cosmic# display databases of geographic information.
#sid buster bionic cosmic# .
#sid buster bionic cosmic# This package contains the shared 3d library.
#sid buster bionic cosmic#
Package: libqgisgrass{GRASSVER}-{QGIS_ABI}
Architecture: any
Section: libs
Expand Down
2 changes: 1 addition & 1 deletion debian/libqgis-dev.install.in
Expand Up @@ -8,4 +8,4 @@ usr/lib/libqgis_server.so
usr/lib/libqgisgrass{GRASSVER}.so
usr/lib/libqgispython.so
usr/share/qgis/FindQGIS.cmake
#artful bionic#usr/lib/libqgis_3d.so
#sid buster bionic cosmic#usr/lib/libqgis_3d.so
11 changes: 9 additions & 2 deletions debian/rules
Expand Up @@ -104,11 +104,18 @@ ifneq (,$(findstring $(DISTRIBUTION),"sid buster stretch"))
CMAKE_OPTS += -DPOSTGRES_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libpq.so
endif

ifneq (,$(findstring $(DISTRIBUTION),"bionic"))
# Only on bionic - Qt3DExtras intentionally removed from debian (#895386) and in turn ubuntu
ifneq (,$(findstring $(DISTRIBUTION),"sid buster bionic cosmic"))
CMAKE_OPTS += \
-DWITH_3D=TRUE \
-DGEOS_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libgeos_c.so

ifneq (,$(findstring $(DISTRIBUTION),"sid buster cosmic"))
# Qt3DExtras intentionally removed from debian (#895386) and in turn ubuntu
CMAKE_OPTS += \
-DCMAKE_PREFIX_PATH=$(realpath external/qt3dextra-headers/cmake) \
-DQT5_3DEXTRA_INCLUDE_DIR=$(realpath external/qt3dextra-headers) \
-DQT5_3DEXTRA_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libQt53DExtras.so
endif
endif

ifneq (,$(WITH_ORACLE))
Expand Down
@@ -0,0 +1 @@
#include "qabstractcameracontroller.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QAbstractSpriteSheet
@@ -0,0 +1 @@
#include "qabstractspritesheet.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QConeGeometry
@@ -0,0 +1 @@
#include "qconegeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QConeMesh
@@ -0,0 +1 @@
#include "qconemesh.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QCuboidGeometry
@@ -0,0 +1 @@
#include "qcuboidgeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QCuboidMesh
@@ -0,0 +1 @@
#include "qcuboidmesh.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QCylinderGeometry
@@ -0,0 +1 @@
#include "qcylindergeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QCylinderMesh
@@ -0,0 +1 @@
#include "qcylindermesh.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QDiffuseMapMaterial
@@ -0,0 +1 @@
#include "qdiffusemapmaterial.h"
@@ -0,0 +1 @@
#include "qdiffusespecularmapmaterial.h"
@@ -0,0 +1 @@
#include "qdiffusespecularmaterial.h"
@@ -0,0 +1 @@
#include "qextrudedtextgeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QExtrudedTextMesh
@@ -0,0 +1 @@
#include "qextrudedtextmesh.h"
@@ -0,0 +1 @@
#include "qfirstpersoncameracontroller.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QForwardRenderer
@@ -0,0 +1 @@
#include "qforwardrenderer.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QGoochMaterial
@@ -0,0 +1 @@
#include "qgoochmaterial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QMetalRoughMaterial
@@ -0,0 +1 @@
#include "qmetalroughmaterial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QMorphPhongMaterial
@@ -0,0 +1 @@
#include "qmorphphongmaterial.h"
@@ -0,0 +1 @@
#include "qnormaldiffusemapalphamaterial.h"
@@ -0,0 +1 @@
#include "qnormaldiffusemapmaterial.h"
@@ -0,0 +1 @@
#include "qnormaldiffusespecularmapmaterial.h"
@@ -0,0 +1 @@
#include "qorbitcameracontroller.h"
@@ -0,0 +1 @@
#include "qpervertexcolormaterial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QPhongAlphaMaterial
@@ -0,0 +1 @@
#include "qphongalphamaterial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QPhongMaterial
@@ -0,0 +1 @@
#include "qphongmaterial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QPlaneGeometry
@@ -0,0 +1 @@
#include "qplanegeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QPlaneMesh
@@ -0,0 +1 @@
#include "qplanemesh.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSkyboxEntity
@@ -0,0 +1 @@
#include "qskyboxentity.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSphereGeometry
@@ -0,0 +1 @@
#include "qspheregeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSphereMesh
@@ -0,0 +1 @@
#include "qspheremesh.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSpriteGrid
@@ -0,0 +1 @@
#include "qspritegrid.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSpriteSheet
@@ -0,0 +1 @@
#include "qspritesheet.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QSpriteSheetItem
@@ -0,0 +1 @@
#include "qspritesheetitem.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QText2DEntity
@@ -0,0 +1 @@
#include "qtext2dentity.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QTextureMaterial
@@ -0,0 +1 @@
#include "qtexturematerial.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QTorusGeometry
@@ -0,0 +1 @@
#include "qtorusgeometry.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/QTorusMesh
@@ -0,0 +1 @@
#include "qtorusmesh.h"
44 changes: 44 additions & 0 deletions external/qt3dextra-headers/Qt3DExtras/Qt3DExtras
@@ -0,0 +1,44 @@
#ifndef QT_QT3DEXTRAS_MODULE_H
#define QT_QT3DEXTRAS_MODULE_H
#include <Qt3DExtras/Qt3DExtrasDepends>
#include "qabstractcameracontroller.h"
#include "qabstractspritesheet.h"
#include "qconegeometry.h"
#include "qconemesh.h"
#include "qcuboidgeometry.h"
#include "qcuboidmesh.h"
#include "qcylindergeometry.h"
#include "qcylindermesh.h"
#include "qdiffusemapmaterial.h"
#include "qdiffusespecularmapmaterial.h"
#include "qdiffusespecularmaterial.h"
#include "qextrudedtextgeometry.h"
#include "qextrudedtextmesh.h"
#include "qfirstpersoncameracontroller.h"
#include "qforwardrenderer.h"
#include "qgoochmaterial.h"
#include "qmetalroughmaterial.h"
#include "qmorphphongmaterial.h"
#include "qnormaldiffusemapalphamaterial.h"
#include "qnormaldiffusemapmaterial.h"
#include "qnormaldiffusespecularmapmaterial.h"
#include "qorbitcameracontroller.h"
#include "qpervertexcolormaterial.h"
#include "qphongalphamaterial.h"
#include "qphongmaterial.h"
#include "qplanegeometry.h"
#include "qplanemesh.h"
#include "qskyboxentity.h"
#include "qspheregeometry.h"
#include "qspheremesh.h"
#include "qspritegrid.h"
#include "qspritesheet.h"
#include "qspritesheetitem.h"
#include "qt3dwindow.h"
#include "qtext2dentity.h"
#include "qtexturedmetalroughmaterial.h"
#include "qtexturematerial.h"
#include "qtorusgeometry.h"
#include "qtorusmesh.h"
#include "qt3dextrasversion.h"
#endif
9 changes: 9 additions & 0 deletions external/qt3dextra-headers/Qt3DExtras/Qt3DExtrasDepends
@@ -0,0 +1,9 @@
/* This file was generated by qmake with the info from <root>/src/extras/extras.pro. */
#ifdef __cplusplus /* create empty PCH in C mode */
#include <QtCore/QtCore>
#include <QtGui/QtGui>
#include <Qt3DCore/Qt3DCore>
#include <Qt3DRender/Qt3DRender>
#include <Qt3DInput/Qt3DInput>
#include <Qt3DLogic/Qt3DLogic>
#endif
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/Qt3DExtrasVersion
@@ -0,0 +1 @@
#include "qt3dextrasversion.h"
1 change: 1 addition & 0 deletions external/qt3dextra-headers/Qt3DExtras/Qt3DWindow
@@ -0,0 +1 @@
#include "qt3dwindow.h"
127 changes: 127 additions & 0 deletions external/qt3dextra-headers/Qt3DExtras/qabstractcameracontroller.h
@@ -0,0 +1,127 @@
/****************************************************************************
**
** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt3D module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

#ifndef QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_H
#define QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_H

#include <Qt3DCore/QEntity>
#include <Qt3DExtras/qt3dextras_global.h>

QT_BEGIN_NAMESPACE

namespace Qt3DInput {
class QKeyboardDevice;
class QMouseDevice;
}

namespace Qt3DRender {
class QCamera;
}

namespace Qt3DExtras {

class QAbstractCameraControllerPrivate;

class QT3DEXTRASSHARED_EXPORT QAbstractCameraController : public Qt3DCore::QEntity
{
Q_OBJECT
Q_PROPERTY(Qt3DRender::QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged)
Q_PROPERTY(float linearSpeed READ linearSpeed WRITE setLinearSpeed NOTIFY linearSpeedChanged)
Q_PROPERTY(float lookSpeed READ lookSpeed WRITE setLookSpeed NOTIFY lookSpeedChanged)
Q_PROPERTY(float acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged)
Q_PROPERTY(float deceleration READ deceleration WRITE setDeceleration NOTIFY decelerationChanged)

public:
~QAbstractCameraController();

Qt3DRender::QCamera *camera() const;
float linearSpeed() const;
float lookSpeed() const;

float acceleration() const;
float deceleration() const;

void setCamera(Qt3DRender::QCamera *camera);
void setLinearSpeed(float linearSpeed);
void setLookSpeed(float lookSpeed);

void setAcceleration(float acceleration);
void setDeceleration(float deceleration);

Q_SIGNALS:
void cameraChanged();
void linearSpeedChanged();
void lookSpeedChanged();

void accelerationChanged(float acceleration);
void decelerationChanged(float deceleration);

protected:
explicit QAbstractCameraController(Qt3DCore::QNode *parent = nullptr);
QAbstractCameraController(QAbstractCameraControllerPrivate &dd, Qt3DCore::QNode *parent = nullptr);

Qt3DInput::QKeyboardDevice *keyboardDevice() const;
Qt3DInput::QMouseDevice *mouseDevice() const;

public:
struct InputState
{
float rxAxisValue;
float ryAxisValue;
float txAxisValue;
float tyAxisValue;
float tzAxisValue;

bool leftMouseButtonActive;
bool middleMouseButtonActive;
bool rightMouseButtonActive;

bool altKeyActive;
bool shiftKeyActive;
};

private:
virtual void moveCamera(const InputState &state, float dt) = 0;

private:
Q_DECLARE_PRIVATE(QAbstractCameraController)
};

} // Qt3DExtras

QT_END_NAMESPACE

#endif // QT3DEXTRAS_QABSTRACTCAMERACONTROLLER_H

5 comments on commit 1f91858

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 1f91858 Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n , oh great, I was waiting for that to update my system to ubuntu cosmic; thanks.

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 1f91858 Sep 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n , the Qt53DExtrasConfig.cmake seems to be malformed (this line:

), cmake complains, I suspect it's because of the mixed use of spaces and tabs alignment.

@jef-n
Copy link
Member Author

@jef-n jef-n commented on 1f91858 Sep 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n , the Qt53DExtrasConfig.cmake seems to be malformed

Did you set QT5_3DEXTRA_LIBRARY/QT5_3DEXTRA_INCLUDE_DIR (see debian/rules)?

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 1f91858 Sep 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n , that did it, thanks.

Is there a change that's required in our cmakefile so that cmake -DWITH_3D=On works without the need to manually set those variables?

@jef-n
Copy link
Member Author

@jef-n jef-n commented on 1f91858 Sep 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nirvn maybe, but this is just a workaround for debian where headers and cmake files that are usually available were removed.

Please sign in to comment.