Skip to contentSkip to conversation

MokoTouch

PATCH In review David Lanzendörfer 5 participants 7 messages Oct 26, 2009 – Apr 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MokoTouch

Hi folks
I'd like to have mokotouch-recipes added to OE.

greatings
leviathan

Signature · 3 lines
David Lanzendörfer
OpenSourceSupport GmbH
Junior system engineer and supporter

commit ca215a1df93741a136a482c9f0af5bdad06bbd7a

Author: David Lanzend�rfer <[email protected]>
Date:   Mon Oct 26 19:36:17 2009 +0100

Added mokotouch recipes

recipes/mokotouch/mokotouch-apps-customtableview_2.bb new file +41 -0
new file mode 100644
index 0000000..e380af7
@@ -0,0 +1,41 @@
+require mokotouch.inc
+
+DEPENDS += "mokotouch-coreservices-mokotouch"
+RDEPENDS += "mokotouch-coreservices-mokotouch"
+
+PV = "2"
+PR = "r1"
+
+do_configure(){
+echo "Do nothing"
+}
+
+do_compile(){
+echo "Using qmake in location: ${OE_QMAKE_QMAKE}"
+cd ${S}/MokoTouch/Apps/CustomTableView
+${OE_QMAKE_QMAKE} CustomTableView.pro
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+make
+}
+
+do_install(){
+mkdir ${D}/usr
+mkdir ${D}/usr/local
+mkdir ${D}/usr/local/MokoTouch
+mkdir ${D}/usr/local/MokoTouch/Apps
+mkdir ${D}/usr/local/MokoTouch/Apps/CustomTableView.app
+cp "${S}/MokoTouch/Apps/CustomTableView/BUILD/App/libCustomTableView.so.1.0.0" "${D}/usr/local/MokoTouch/Apps/CustomTableView.app"
+}
+
+FILES_${PN} = "/usr/local/MokoTouch/Apps/CustomTableView.app/libCustomTableView.so.1.0.0"
+
+PACKAGES = "${PN}"
+
+pkg_postinst(){
+#!/bin/sh
+ln -fs /usr/local/MokoTouch/Apps/CustomTableView.app/libCustomTableView.so.1.0.0 /usr/lib/libCustomTableView.so.1.0.0
+ln -fs /usr/local/MokoTouch/Apps/CustomTableView.app/libCustomTableView.so.1.0.0 /usr/lib/libCustomTableView.so.1.0
+ln -fs /usr/local/MokoTouch/Apps/CustomTableView.app/libCustomTableView.so.1.0.0 /usr/lib/libCustomTableView.so.1
+ln -fs /usr/local/MokoTouch/Apps/CustomTableView.app/libCustomTableView.so.1.0.0 /usr/lib/libCustomTableView.so
+}
recipes/mokotouch/mokotouch-apps-helloworld_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch-apps-homescreen_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch-apps-testkeyboard_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch-apps-testtableview_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch-apps-webmobile_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch-coreservices-mokotouch_2.bb new file +34 -0
new file mode 100644
index 0000000..8594cc2
@@ -0,0 +1,34 @@
+require mokotouch.inc
+
+DEPENDS += "mokotouch-frameworks-uikit"
+RDEPENDS += "mokotouch-frameworks-uikit"
+
+PV = "2"
+PR = "r1"
+
+do_configure(){
+echo "Do nothing"
+}
+
+do_compile(){
+echo "Using qmake in location: ${OE_QMAKE_QMAKE}"
+cd ${S}/MokoTouch/CoreServices/MokoTouch
+${OE_QMAKE_QMAKE} MokoTouch.pro
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+make
+}
+
+do_install(){
+mkdir ${D}/usr
+mkdir ${D}/usr/local
+mkdir ${D}/usr/local/MokoTouch
+mkdir ${D}/usr/local/MokoTouch/bin/
+
+cp qte.env ${D}/usr/local/MokoTouch/
+cp ${S}/MokoTouch/CoreServices/MokoTouch/BUILD/Service/MokoTouch ${D}/usr/local/MokoTouch/bin/
+}
+
+FILES_${PN} = "/usr/local/MokoTouch/qte.env /usr/local/MokoTouch/bin/MokoTouch"
+
+PACKAGES = "${PN}"
recipes/mokotouch/mokotouch-frameworks-uikit_2.bb new file +41 -0

41 lines not on this page · raw message

recipes/mokotouch/mokotouch.inc new file +18 -0
new file mode 100644
index 0000000..cfc13e0
@@ -0,0 +1,18 @@
+DESCRIPTION = "MokoTouch a finger friendly QT4-based iphone like GUI for OpenMoko"
+HOMEPAGE = "http://th30z.netsons.org/mokotouch/"
+SECTION = "openmoko/applications"
+LICENSE = "GPL"
+DEPENDS = "gstreamer qt4-x11-free"
+RDEPENDS = "gstreamer qt4-x11-free"
+
+PV = "2"
+PR = "r1"
+
+SRC_URI = "http://th30z.netsons.org/mokotouch/data/mokotouch-2-aug-2009.tar.bz2"
+
+S = "${WORKDIR}/MokoTouch-Project"
+D = "${WORKDIR}/image"
+
+EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/Qt"
+
+inherit autotools qt4x11 distutils-base pkgconfig lib_package
#1 lore raw

Dnia poniedziałek, 26 października 2009 o 21:25:48 David Lanzendörfer napisał(a):

Quoted 1 line

I'd like to have mokotouch-recipes added to OE.

1. use "install -d" instead of "mkdir"
2. use "install" instead of "cp"
3. learn about DEPENDS and RDEPENDS and fix use of them
4. use "oe_runmake" instead of "make"
5. do not set PACKAGES
6. build to ${prefix} not /usr/local/
7. get rid of ugly symlinking of libraries
8. move common stuff to mokotouch.inc
9. consider changing a way of building mokotouch-* to do all from one recipe

Now I reject thinking about pushing that into repository.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#2 lore raw
Quoted 4 lines · Marcin Juszkiewicz

Dnia poniedziałek, 26 października 2009 o 21:25:48 David Lanzendörfer napisał(a):

Quoted 1 line

I'd like to have mokotouch-recipes added to OE.

Quoted 9 lines

1. use "install -d" instead of "mkdir"
2. use "install" instead of "cp"
3. learn about DEPENDS and RDEPENDS and fix use of them
4. use "oe_runmake" instead of "make"
5. do not set PACKAGES
6. build to ${prefix} not /usr/local/
7. get rid of ugly symlinking of libraries
8. move common stuff to mokotouch.inc
9. consider changing a way of building mokotouch-* to do all from one recipe

10. learn about qmake bbclasses

regards,

Koen

#4 lore raw
Quoted 1 line

Dear David,

Hi Mickey

Quoted 2 lines

let me encourage you to submit an updated patchset that takes into account the reviewer's comments.

Here is the corrected patch, which will bring the bitbake recipes for MokoTouch into OE.
I hope this will be somehow usefull for some of you.

Quoted 1 line

Cheers,

dito :)

Quoted 1 line

:M:

leviathan

commit dff8d20ceb4c304ba3140deefb80310ee92219b1

Author: David Lanzendörfer <[email protected]>
Date:   Thu Nov 5 23:11:19 2009 +0100

Added MokoTouch recipes (http://th30z.netsons.org/mokotouch/)

recipes/mokotouch/mokotouch-apps-customtableview_2.bb new file +24 -0
new file mode 100644
index 0000000..da9ff61
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/CustomTableView
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} CustomTableView.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/CustomTableView
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/CustomTableView/BUILD/App/libCustomTableView.so.1.0.0" "${D}/${libdir}/libCustomTableView.so.1.0.0"
+install "${S}/MokoTouch/Apps/CustomTableView/BUILD/App/libCustomTableView.so.1.0.0" "${D}/${libdir}/libCustomTableView.so.1.0"
+install "${S}/MokoTouch/Apps/CustomTableView/BUILD/App/libCustomTableView.so.1.0.0" "${D}/${libdir}/libCustomTableView.so.1"
+install "${S}/MokoTouch/Apps/CustomTableView/BUILD/App/libCustomTableView.so.1.0.0" "${D}/${libdir}/libCustomTableView.so"
+}
+
recipes/mokotouch/mokotouch-apps-helloworld_2.bb new file +24 -0
new file mode 100644
index 0000000..0d42682
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/HelloWorld
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} HelloWorld.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/HelloWorld
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0" "${D}/${libdir}/libHelloWorld.so.1.0.0"
+install "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0" "${D}/${libdir}/libHelloWorld.so.1.0"
+install "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0" "${D}/${libdir}/libHelloWorld.so.1"
+install "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0" "${D}/${libdir}/libHelloWorld.so"
+}
+
recipes/mokotouch/mokotouch-apps-homescreen_2.bb new file +23 -0
new file mode 100644
index 0000000..b58f278
@@ -0,0 +1,23 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/Homescreen
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} Homescreen.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/Homescreen
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/Homescreen/BUILD/App/libHomescreen.so.1.0.0" "${D}/${libdir}/libHomescreen.so.1.0.0"
+install "${S}/MokoTouch/Apps/Homescreen/BUILD/App/libHomescreen.so.1.0.0" "${D}/${libdir}/libHomescreen.so.1.0"
+install "${S}/MokoTouch/Apps/Homescreen/BUILD/App/libHomescreen.so.1.0.0" "${D}/${libdir}/libHomescreen.so.1"
+install "${S}/MokoTouch/Apps/Homescreen/BUILD/App/libHomescreen.so.1.0.0" "${D}/${libdir}/libHomescreen.so"
+}
recipes/mokotouch/mokotouch-apps-testkeyboard_2.bb new file +24 -0
new file mode 100644
index 0000000..6b6fb25
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/TestKeyboard
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} TestKeyboard.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/TestKeyboard
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/TestKeyboard/BUILD/App/libTestKeyboard.so.1.0.0" "${D}/${libdir}/libTestKeyboard.so.1.0.0"
+install "${S}/MokoTouch/Apps/TestKeyboard/BUILD/App/libTestKeyboard.so.1.0.0" "${D}/${libdir}/libTestKeyboard.so.1.0"
+install "${S}/MokoTouch/Apps/TestKeyboard/BUILD/App/libTestKeyboard.so.1.0.0" "${D}/${libdir}/libTestKeyboard.so.1"
+install "${S}/MokoTouch/Apps/TestKeyboard/BUILD/App/libTestKeyboard.so.1.0.0" "${D}/${libdir}/libTestKeyboard.so"
+}
+
recipes/mokotouch/mokotouch-apps-testtableview_2.bb new file +24 -0
new file mode 100644
index 0000000..247b051
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/TestTableView
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} TestTableView.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/TestTableView
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/TestTableView/BUILD/App/libTestTableView.so.1.0.0" "${D}/${libdir}/libTestTableView.so.1.0.0"
+install "${S}/MokoTouch/Apps/TestTableView/BUILD/App/libTestTableView.so.1.0.0" "${D}/${libdir}/libTestTableView.so.1.0"
+install "${S}/MokoTouch/Apps/TestTableView/BUILD/App/libTestTableView.so.1.0.0" "${D}/${libdir}/libTestTableView.so.1"
+install "${S}/MokoTouch/Apps/TestTableView/BUILD/App/libTestTableView.so.1.0.0" "${D}/${libdir}/libTestTableView.so"
+}
+
recipes/mokotouch/mokotouch-apps-webmobile_2.bb new file +24 -0
new file mode 100644
index 0000000..ec1b8f2
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/WebMobile
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} WebMobile.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/WebMobile
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/WebMobile/BUILD/App/libWebMobile.so.1.0.0" "${D}/${libdir}/libWebMobile.so.1.0.0"
+install "${S}/MokoTouch/Apps/WebMobile/BUILD/App/libWebMobile.so.1.0.0" "${D}/${libdir}/libWebMobile.so.1.0"
+install "${S}/MokoTouch/Apps/WebMobile/BUILD/App/libWebMobile.so.1.0.0" "${D}/${libdir}/libWebMobile.so.1"
+install "${S}/MokoTouch/Apps/WebMobile/BUILD/App/libWebMobile.so.1.0.0" "${D}/${libdir}/libWebMobile.so"
+}
+
recipes/mokotouch/mokotouch-coreservices-mokotouch_2.bb new file +25 -0
new file mode 100644
index 0000000..4796d25
@@ -0,0 +1,25 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-frameworks-uikit"
+
+do_configure(){
+cd ${S}/MokoTouch/CoreServices/MokoTouch
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} MokoTouch.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/CoreServices/MokoTouch
+oe_runmake
+}
+
+do_install(){
+install -d ${D}/${sysconfdir}
+install -d ${D}/${bindir}
+
+install qte.env ${D}/${sysconfdir}/mokotouch.env
+install "${S}/MokoTouch/CoreServices/MokoTouch/BUILD/Service/MokoTouch" "${D}/${bindir}/MokoTouch"
+}
+
+FILES_${PN} = "${bindir}/MokoTouch ${sysconfdir}/mokotouch.env"
recipes/mokotouch/mokotouch-frameworks-uikit_2.bb new file +26 -0
new file mode 100644
index 0000000..cbb3908
@@ -0,0 +1,26 @@
+require mokotouch.inc
+
+do_configure(){
+cd ${S}/MokoTouch/Frameworks/UIKit/
+${OE_QMAKE_QMAKE} UIKit.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Frameworks/UIKit/
+oe_runmake
+}
+
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${D}/${libdir}/libUIKit.so.1.0.0"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${D}/${libdir}/libUIKit.so.1.0"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${D}/${libdir}/libUIKit.so.1"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${D}/${libdir}/libUIKit.so"
+}
+
+do_stage() {
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${STAGING_LIBDIR}/libUIKit.so.1.0.0"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${STAGING_LIBDIR}/libUIKit.so.1.0"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${STAGING_LIBDIR}/libUIKit.so.1"
+install "${S}/MokoTouch/Frameworks/UIKit/BUILD/libs/libUIKit.so.1.0.0" "${STAGING_LIBDIR}/libUIKit.so"
+}
recipes/mokotouch/mokotouch.inc new file +16 -0
new file mode 100644
index 0000000..95cb176
@@ -0,0 +1,16 @@
+DESCRIPTION = "MokoTouch a finger friendly QT4-based iphone like GUI for OpenMoko"
+HOMEPAGE = "http://th30z.netsons.org/mokotouch/"
+SECTION = "openmoko/applications"
+LICENSE = "GPL"
+DEPENDS = "gstreamer qt4-x11-free"
+
+PR = "r1"
+
+SRC_URI = "http://th30z.netsons.org/mokotouch/data/mokotouch-2-aug-2009.tar.bz2"
+
+S = "${WORKDIR}/MokoTouch-Project"
+D = "${WORKDIR}/image"
+
+EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=${OE_QMAKE_INCDIR_QT}/Qt"
+
+inherit autotools qt4x11 distutils-base pkgconfig lib_package
#5 lore raw

Dnia czwartek, 5 listopada 2009 o 23:16:19 David Lanzendörfer napisał(a):

Quoted 18 lines

+++ b/recipes/mokotouch/mokotouch-apps-helloworld_2.bb

recipes/mokotouch/mokotouch-apps-helloworld_2.bb new file +16 -0
@@ -0,0 +1,24 @@
+require mokotouch.inc
+
+DEPENDS = "mokotouch-coreservices-mokotouch"
+
+do_configure(){
+cd ${S}/MokoTouch/Apps/HelloWorld
+rm UIKit.framework
+ln -s "${S}/MokoTouch/Frameworks/UIKit/" UIKit.framework
+${OE_QMAKE_QMAKE} HelloWorld.pro
+}
+
+do_compile(){
+cd ${S}/MokoTouch/Apps/HelloWorld
+oe_runmake
+}
+

recipes/mokotouch/mokotouch-apps-helloworld_2.bb

Quoted 10 lines
recipes/mokotouch/mokotouch-apps-helloworld_2.bb new file +3 -0
+do_install(){
+install -d "${D}/${libdir}"
+install "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0"
 "${D}/${libdir}/libHelloWorld.so.1.0.0" +install
 "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0"
 "${D}/${libdir}/libHelloWorld.so.1.0" +install
 "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0"
 "${D}/${libdir}/libHelloWorld.so.1" +install
 "${S}/MokoTouch/Apps/HelloWorld/BUILD/App/libHelloWorld.so.1.0.0"
 "${D}/${libdir}/libHelloWorld.so" +}

My version of that recipe:

=============================
require mokotouch.inc

MTCOMPONENT = "HelloWorld"
=============================

Rest of code should be in mokotouch.inc as you only change component name in all recipes. Each and each repeats same errors:

- no setting of ${S} but use of "cd somewhere to make it build"
- big duplication of code
- no use of qmake* bbclasses which remove need of do_configure/do_compile in your recipes
- again waste of space by strange installation of libraries (fix loader to use *.so maybe and skip all *.so.1.0.0 stuff?)

Still nack from me.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#6 lore raw

Hello.

Quoted 12 lines · Marcin Juszkiewicz

My version of that recipe:

=============================
require mokotouch.inc

MTCOMPONENT = "HelloWorld"
=============================

Rest of code should be in mokotouch.inc as you only change component name in all recipes. Each and each repeats same errors:

Quoted 8 lines

- no setting of ${S} but use of "cd somewhere to make it build"
- big duplication of code
- no use of qmake* bbclasses which remove need of do_configure/do_compile in your recipes
- again waste of space by strange installation of libraries (fix loader to use *.so maybe and skip all *.so.1.0.0 stuff?)

Still nack from me.

I agree. David, would you make the changes Marcin pointed out?

regards
Stefan Schmidt