Message ID | 1346230869-4926-4-git-send-email-sho@relinux.de |
---|---|
State | Superseded |
Headers | show |
Le Wed, 29 Aug 2012 11:01:09 +0200, Stephan Hoffmann <sho@relinux.de> a écrit : > new file mode 100644 > index 0000000..dfea228 > --- /dev/null > +++ b/package/qtuio/Config.in > @@ -0,0 +1,18 @@ > +config BR2_PACKAGE_QTUIO > + bool "qtuio" > + select BR2_PACKAGE_MTDEF2TUIO Shouldn't this be MTDEV2TUIO ? > + depends on BR2_PACKAGE_QT The code of qtuio also suggests it requires GUI support in Qt, so I guess some other dependencies are needed here. > + help > + Implementation of an interface connecting TUIO messages > + and QT events > + > + https://github.com/x29a/qTUIO > + > +comment "qtuio depends on QT" > + depends on !BR2_PACKAGE_QT This comment should be below the examples config option in order to make sure that the examples config option gets "indented" under the main qtuio config option. > + > +config BR2_QTUIO_EXAMPLES > + bool "qtuio_examples" Make this "qtuio examples". > + depends on BR2_PACKAGE_QTUIO > + help > + Build and install qtuio examples > diff --git a/package/qtuio/qtuio.mk b/package/qtuio/qtuio.mk > new file mode 100644 > index 0000000..efaeae8 > --- /dev/null > +++ b/package/qtuio/qtuio.mk > @@ -0,0 +1,68 @@ > +############################################################# > +# > +# qTUIO > +# > +############################################################# > +QTUIO_VERSION = abe4973ff6 > +QTUIO_SITE = git://github.com/x29a/qTUIO.git > +QTUIO_DEPENDENCIES = qt mtdev2tuio Is mtdev2tuio really a build-time dependency? I don't think so. If it isn't, then keep the select in the Config.in file, but remove the build-time dependency here. Add a comment above the select in Config.in that explicitly says that it is a runtime dependency only. > +QTUIO_LICENSE = GPLv3+ > +QTUIO_LICENSE_FILES = COPYING > + > +ifeq ($(BR2_QTUIO_EXAMPLES),y) > +define QTUIO_CONFIGURE_EXAMPLES > +cd $(@D)/examples/dials && $(QT_QMAKE) > +cd $(@D)/examples/fingerpaint && $(QT_QMAKE) > +cd $(@D)/examples/knobs && $(QT_QMAKE) > +cd $(@D)/examples/pinchzoom && $(QT_QMAKE) > +## pong depends on QtOpenGL cd $(@D)/examples/pong && $(QT_QMAKE) > +endef > +endif Mention the pong thing as a comment somewhere, only once, and don't include the compile line if it isn't supported. Also, you could simplify this as follows: for example in dials fingerpaint knobs pinchzoom ; do \ (cd $(@D)/examples/$${examples} && $(QT_QMAKE)) ; \ done And indent the code with one tab. > +define QTUIO_CONFIGURE_CMDS > +cd $(@D)/src && $(QT_QMAKE) > +$(QTUIO_CONFIGURE_EXAMPLES) > +endef Indent with one tab. > +ifeq ($(BR2_QTUIO_EXAMPLES),y) > +define QTUIO_BUILD_EXAMPLES > +$(MAKE) -C $(@D)/examples/dials > +$(MAKE) -C $(@D)/examples/fingerpaint > +$(MAKE) -C $(@D)/examples/knobs > +$(MAKE) -C $(@D)/examples/pinchzoom > +## pong depends on QtOpenGL $(MAKE) -C $(@D)/examples/pong > +endef > +endif Ditto: use a for loop + indent with one tab. > +define QTUIO_BUILD_CMDS > +$(MAKE) -C $(@D)/src > +$(QTUIO_BUILD_EXAMPLES) > +endef > + > +ifeq ($(BR2_QTUIO_EXAMPLES),y) > +define QTUIO_INSTALL_EXAMPLES > +$(INSTALL) -D -m 0755 $(@D)/examples/dials/dials $(TARGET_DIR)/usr/share/qtuio/dials > +$(INSTALL) -D -m 0755 $(@D)/examples/fingerpaint/fingerpaint $(TARGET_DIR)/usr/share/qtuio/fingerpaint > +$(INSTALL) -D -m 0755 $(@D)/examples/knobs/knobs $(TARGET_DIR)/usr/share/qtuio/knobs > +$(INSTALL) -D -m 0755 $(@D)/examples/pinchzoom/pinchzoom $(TARGET_DIR)/usr/share/qtuio/pinchzoom > +## pong depends on QtOpenGL $(INSTALL) -D -m 0755 $(@D)/examples/pong/pong $(TARGET_DIR)/usr/share/qtuio/pong > +endef > +endif > + > +define QTUIO_INSTALL_TARGET_CMDS > +$(INSTALL) -D -m 0755 $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib Normally, install -D requires the complete destination filename as second argument. We usually use cp when multiple files need to be copied at once. Doesn't the qtuio package has a usable 'make install' ? Thomas
Hi Thomas, thanks for the comments! Am 30.08.2012 05:53, schrieb Thomas Petazzoni: > Le Wed, 29 Aug 2012 11:01:09 +0200, > Stephan Hoffmann <sho@relinux.de> a écrit : > >> + select BR2_PACKAGE_MTDEF2TUIO > Shouldn't this be MTDEV2TUIO ? Stupid typo;.) >> + depends on BR2_PACKAGE_QT > The code of qtuio also suggests it requires GUI support in Qt, so I > guess some other dependencies are needed here. That's right > > +QTUIO_DEPENDENCIES = qt mtdev2tuio > Is mtdev2tuio really a build-time dependency? I don't think so. If it > isn't, then keep the select in the Config.in file, but remove the > build-time dependency here. Add a comment above the select in Config.in > that explicitly says that it is a runtime dependency only. Thinking about it, it is not a dependency at all, since one may use a real TUIO capable touch device. > +define QTUIO_INSTALL_TARGET_CMDS >> +$(INSTALL) -D -m 0755 $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib > Normally, install -D requires the complete destination filename as > second argument. We usually use cp when multiple files need to be > copied at once. > > Doesn't the qtuio package has a usable 'make install' ? Doesn't seem so. Fixed patch coming soon Regards Stephan > Thomas
diff --git a/package/Config.in b/package/Config.in index a4da3c1..1c7b221 100644 --- a/package/Config.in +++ b/package/Config.in @@ -133,6 +133,9 @@ source "package/efl/Config.in" source "package/qt/Config.in" source "package/x11r7/Config.in" +comment "QT libraries and helper libraries" +source "package/qtuio/Config.in" + comment "X libraries and helper libraries" source "package/liberation/Config.in" source "package/libsexy/Config.in" diff --git a/package/qtuio/Config.in b/package/qtuio/Config.in new file mode 100644 index 0000000..dfea228 --- /dev/null +++ b/package/qtuio/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_QTUIO + bool "qtuio" + select BR2_PACKAGE_MTDEF2TUIO + depends on BR2_PACKAGE_QT + help + Implementation of an interface connecting TUIO messages + and QT events + + https://github.com/x29a/qTUIO + +comment "qtuio depends on QT" + depends on !BR2_PACKAGE_QT + +config BR2_QTUIO_EXAMPLES + bool "qtuio_examples" + depends on BR2_PACKAGE_QTUIO + help + Build and install qtuio examples diff --git a/package/qtuio/qtuio.mk b/package/qtuio/qtuio.mk new file mode 100644 index 0000000..efaeae8 --- /dev/null +++ b/package/qtuio/qtuio.mk @@ -0,0 +1,68 @@ +############################################################# +# +# qTUIO +# +############################################################# +QTUIO_VERSION = abe4973ff6 +QTUIO_SITE = git://github.com/x29a/qTUIO.git +QTUIO_DEPENDENCIES = qt mtdev2tuio + +QTUIO_LICENSE = GPLv3+ +QTUIO_LICENSE_FILES = COPYING + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_CONFIGURE_EXAMPLES +cd $(@D)/examples/dials && $(QT_QMAKE) +cd $(@D)/examples/fingerpaint && $(QT_QMAKE) +cd $(@D)/examples/knobs && $(QT_QMAKE) +cd $(@D)/examples/pinchzoom && $(QT_QMAKE) +## pong depends on QtOpenGL cd $(@D)/examples/pong && $(QT_QMAKE) +endef +endif + +define QTUIO_CONFIGURE_CMDS +cd $(@D)/src && $(QT_QMAKE) +$(QTUIO_CONFIGURE_EXAMPLES) +endef + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_BUILD_EXAMPLES +$(MAKE) -C $(@D)/examples/dials +$(MAKE) -C $(@D)/examples/fingerpaint +$(MAKE) -C $(@D)/examples/knobs +$(MAKE) -C $(@D)/examples/pinchzoom +## pong depends on QtOpenGL $(MAKE) -C $(@D)/examples/pong +endef +endif + +define QTUIO_BUILD_CMDS +$(MAKE) -C $(@D)/src +$(QTUIO_BUILD_EXAMPLES) +endef + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_INSTALL_EXAMPLES +$(INSTALL) -D -m 0755 $(@D)/examples/dials/dials $(TARGET_DIR)/usr/share/qtuio/dials +$(INSTALL) -D -m 0755 $(@D)/examples/fingerpaint/fingerpaint $(TARGET_DIR)/usr/share/qtuio/fingerpaint +$(INSTALL) -D -m 0755 $(@D)/examples/knobs/knobs $(TARGET_DIR)/usr/share/qtuio/knobs +$(INSTALL) -D -m 0755 $(@D)/examples/pinchzoom/pinchzoom $(TARGET_DIR)/usr/share/qtuio/pinchzoom +## pong depends on QtOpenGL $(INSTALL) -D -m 0755 $(@D)/examples/pong/pong $(TARGET_DIR)/usr/share/qtuio/pong +endef +endif + +define QTUIO_INSTALL_TARGET_CMDS +$(INSTALL) -D -m 0755 $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib +$(QTUIO_INSTALL_EXAMPLES) +endef + +define QTUIO_CLEAN_CMDS +$(MAKE) -C $(@D)/src clean +$(MAKE) -C $(@D)/examples/dials clean +$(MAKE) -C $(@D)/examples/fingerpaint clean +$(MAKE) -C $(@D)/examples/knobs clean +$(MAKE) -C $(@D)/examples/pinchzoom clean +$(MAKE) -C $(@D)/examples/pong clean +endef + + +$(eval $(generic-package))
Implementation of an interface connecting TUIO messages and QT events https://github.com/x29a/qTUIO Signed-off-by: Stephan Hoffmann <sho@relinux.de> --- package/Config.in | 3 ++ package/qtuio/Config.in | 18 ++++++++++++ package/qtuio/qtuio.mk | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 0 deletions(-) create mode 100644 package/qtuio/Config.in create mode 100644 package/qtuio/qtuio.mk