mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
Merged in james-duley/librepilot/ppa-osgearth (pull request #240)
LP-306 Update Ubuntu PPA to build with osgearth
This commit is contained in:
commit
56d86099e0
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -32,3 +32,8 @@
|
||||
/Makefile text eol=lf
|
||||
|
||||
# More attributes are defined in per-directory .gitattributes which override this file
|
||||
|
||||
# Not needed in source distribution for building GCS
|
||||
/artwork/ export-ignore
|
||||
/flight/ export-ignore
|
||||
/hardware/ export-ignore
|
||||
|
15
Makefile
15
Makefile
@ -235,7 +235,8 @@ endif
|
||||
FLIGHT_OUT_DIR := $(BUILD_DIR)/firmware
|
||||
DIRS += $(FLIGHT_OUT_DIR)
|
||||
|
||||
include $(ROOT_DIR)/flight/Makefile
|
||||
# Might not be here in source package
|
||||
-include $(ROOT_DIR)/flight/Makefile
|
||||
|
||||
##############################
|
||||
#
|
||||
@ -382,12 +383,13 @@ $(DIST_TAR): $(DIST_VER_INFO) .git/index | $(DIST_DIR)
|
||||
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR))"
|
||||
$(V1) git archive --prefix="$(PACKAGE_NAME)/" -o "$(DIST_TAR)" HEAD
|
||||
$(V1) tar --append --file="$(DIST_TAR)" \
|
||||
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
|
||||
--transform='s,.*version-info.json,$(PACKAGE_NAME)/version-info.json,' \
|
||||
$(call toprel, "$(DIST_VER_INFO)")
|
||||
|
||||
$(DIST_TAR_GZ): $(DIST_TAR)
|
||||
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_TAR_GZ))"
|
||||
$(V1) gzip -kf "$(DIST_TAR)"
|
||||
$(V1) gzip -knf "$(DIST_TAR)"
|
||||
|
||||
.PHONY: dist_tar_gz
|
||||
dist_tar_gz: $(DIST_TAR_GZ)
|
||||
@ -399,12 +401,13 @@ dist: dist_tar_gz
|
||||
$(FW_DIST_TAR): $(PACKAGE_FW_TARGETS) | $(DIST_DIR)
|
||||
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR))"
|
||||
$(V1) tar -c --file="$(FW_DIST_TAR)" --directory=$(FLIGHT_OUT_DIR) \
|
||||
--owner=root --group=root --mtime="`git show -s --format=%ci`" \
|
||||
--transform='s,^,firmware/,' \
|
||||
$(foreach fw_targ,$(PACKAGE_FW_TARGETS),$(fw_targ)/$(fw_targ).opfw)
|
||||
|
||||
$(FW_DIST_TAR_GZ): $(FW_DIST_TAR)
|
||||
@$(ECHO) " FIRMWARE FOR DISTRIBUTION $(call toprel, $(FW_DIST_TAR_GZ))"
|
||||
$(V1) gzip -kf "$(FW_DIST_TAR)"
|
||||
$(V1) gzip -knf "$(FW_DIST_TAR)"
|
||||
|
||||
.PHONY: fw_dist_tar_gz
|
||||
fw_dist_tar_gz: $(FW_DIST_TAR_GZ)
|
||||
@ -493,8 +496,10 @@ build-info: | $(BUILD_DIR)
|
||||
#
|
||||
##############################
|
||||
|
||||
CONFIG_OPTS := $(addsuffix \n,$(MAKEOVERRIDES))
|
||||
CONFIG_OPTS := $(addprefix override$(SPACE),$(CONFIG_OPTS))
|
||||
CONFIG_OPTS := $(subst \$(SPACE),%SPACE_PLACEHOLDER%,$(MAKEOVERRIDES))
|
||||
CONFIG_OPTS := $(addprefix override%SPACE_PLACEHOLDER%,$(CONFIG_OPTS))
|
||||
CONFIG_OPTS := $(subst $(SPACE),\n,$(CONFIG_OPTS))\n
|
||||
CONFIG_OPTS := $(subst %SPACE_PLACEHOLDER%,$(SPACE),$(CONFIG_OPTS))
|
||||
|
||||
.PHONY: config_new
|
||||
config_new:
|
||||
|
@ -607,11 +607,27 @@ QtKeyboardMap OSGViewport::Hidden::keyMap = QtKeyboardMap();
|
||||
OSGViewport::OSGViewport(QQuickItem *parent) : Inherited(parent), h(new Hidden(this))
|
||||
{
|
||||
// setClearBeforeRendering(false);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
setMirrorVertically(true);
|
||||
#endif
|
||||
setAcceptHoverEvents(true);
|
||||
setAcceptedMouseButtons(Qt::AllButtons);
|
||||
}
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
|
||||
QSGNode *OSGViewport::updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNodeData *nodeData)
|
||||
{
|
||||
if (!node) {
|
||||
node = QQuickFramebufferObject::updatePaintNode(node, nodeData);
|
||||
QSGSimpleTextureNode *n = static_cast<QSGSimpleTextureNode *>(node);
|
||||
if (n)
|
||||
n->setTextureCoordinatesTransform(QSGSimpleTextureNode::MirrorVertically);
|
||||
return node;
|
||||
}
|
||||
return QQuickFramebufferObject::updatePaintNode(node, nodeData);
|
||||
}
|
||||
#endif
|
||||
|
||||
OSGViewport::~OSGViewport()
|
||||
{
|
||||
delete h;
|
||||
|
@ -93,6 +93,9 @@ signals:
|
||||
void busyChanged(bool busy);
|
||||
|
||||
protected:
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
|
||||
QSGNode *updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNodeData *nodeData) override;
|
||||
#endif
|
||||
// QQuickItem
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
|
@ -28,7 +28,7 @@ OPT_QT := qt56
|
||||
TRUSTY_DEPS_SED := s/qml-module-.*/$(OPT_QT)quickcontrols/g; \
|
||||
s/qt5-default.*/$(OPT_QT)-meta-minimal, $(OPT_QT)svg, $(OPT_QT)script, $(OPT_QT)serialport, $(OPT_QT)multimedia, $(OPT_QT)translations, $(OPT_QT)tools/g;
|
||||
|
||||
# Leave off Qt and ARM compiler dependencies if calling package target under the assumption that
|
||||
# Leave off Qt and OSG dependencies if calling package target under the assumption that
|
||||
# OP is providing them or the user already has them installed because OP is already built.
|
||||
PACKAGE_DEPS_SED := s/python.*/python/;s/{misc:Depends}.*/{misc:Depends}/;
|
||||
|
||||
@ -37,15 +37,16 @@ package: debian
|
||||
@$(ECHO) "Building Linux package, please wait..."
|
||||
$(V1) sed -i -e "$(PACKAGE_DEPS_SED)" debian/control
|
||||
$(V1) sed -i -e 's,config_new.*, --help > /dev/null,' debian/rules
|
||||
$(V1) dpkg-buildpackage -b -us -uc -nc
|
||||
$(V1) dpkg-buildpackage -b -us -uc -nc $(DPKG_BUILDPACKAGE_OPTS)
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)
|
||||
$(V1) rm -r debian
|
||||
|
||||
DEBIAN_DIR_FILES := changelog compat control copyright rules source/format
|
||||
.PHONY: debian
|
||||
debian: $(DEB_DIR)
|
||||
$(V1) rm -rf debian
|
||||
$(V1) cp -r $(DEB_DIR) debian
|
||||
$(V1) rm -rf debian && mkdir debian
|
||||
$(V1) cd $(DEB_DIR) $(foreach file,$(DEBIAN_DIR_FILES), && cp --parents $(file) $(ROOT_DIR)/debian)
|
||||
$(V1) cp -T package/linux/45-uav.rules debian/$(DEB_NAME).udev
|
||||
$(V1) $(SED_SCRIPT) debian/changelog debian/control
|
||||
ifeq ($(DEB_DIST), trusty)
|
||||
@ -56,7 +57,7 @@ endif
|
||||
|
||||
.PHONY: package_src
|
||||
package_src: $(DEB_ORIG_SRC_NAME) $(DEB_PACKAGE_DIR)
|
||||
$(V1) cd $(DEB_PACKAGE_DIR) && dpkg-buildpackage -S -us -uc
|
||||
$(V1) cd $(DEB_PACKAGE_DIR) && dpkg-buildpackage -S -us -uc $(DPKG_BUILDPACKAGE_OPTS)
|
||||
|
||||
$(DEB_ORIG_SRC): $(DIST_TAR_GZ) | $(PACKAGE_DIR)
|
||||
$(V1) cp $(DIST_TAR_GZ) $(DEB_ORIG_SRC)
|
||||
|
@ -10,5 +10,5 @@ Vcs-Browser: <GITWEB_URL>
|
||||
|
||||
Package: <NAME>
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, qml-module-qtquick-controls, qml-module-qtquick-dialogs, qml-module-qtquick-xmllistmodel, qml-module-qtquick-localstorage, qml-module-qtquick-particles2, qml-module-qtquick-window2, qml-module-qtquick2
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, openscenegraph-plugin-osgearth, qml-module-qtquick-controls, qml-module-qtquick-dialogs, qml-module-qtquick-xmllistmodel, qml-module-qtquick-localstorage, qml-module-qtquick-particles2, qml-module-qtquick-window2, qml-module-qtquick2
|
||||
Description: <DESCRIPTION>
|
||||
|
@ -12,7 +12,7 @@ export DH_OPTIONS
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
$(MAKE) config_new GCS_EXTRA_CONF=osg WITH_PREBUILT_FW=$(CURDIR)/firmware
|
||||
$(MAKE) config_new GCS_EXTRA_CONF='osg osgearth' WITH_PREBUILT_FW=$(CURDIR)/firmware
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- opfw_resource gcs
|
||||
|
Loading…
x
Reference in New Issue
Block a user