On Sun, Jan 10, 2010 at 10:48:02PM +0100, Christian Rüb wrote:
> This package includes a patch to also compile for Qt installations without 
> session manager.
> For SHR there is also a stylesheet (used in desktop file Exec).
> To build the icons, inkscape has to be installed on the build host - I have 
> not found a way to mark this dependency.
> I am also not sure about eglibc-gconv-utf-16, which is needed to properly 
> display unicode - but some systems might not use eglibc though...
> 
> I have been running wpa_gui in this version for quite a while now.

Thanks for patch.. I'll try it later, now few small questions inline
(just what I noticed before build):

> ---
>  recipes/wpa-supplicant/wpa-gui-0.6.9/desktop.patch |   11 +++
>  .../wpa-gui-0.6.9/session_manager.patch            |   72 
> ++++++++++++++++++++
>  recipes/wpa-supplicant/wpa-gui-0.6.9/style         |    4 +
>  recipes/wpa-supplicant/wpa-gui_0.6.9.bb            |   49 +++++++++++++
>  4 files changed, 136 insertions(+), 0 deletions(-)
>  create mode 100644 recipes/wpa-supplicant/wpa-gui-0.6.9/desktop.patch
>  create mode 100644 recipes/wpa-supplicant/wpa-gui-0.6.9/session_manager.patch
>  create mode 100644 recipes/wpa-supplicant/wpa-gui-0.6.9/style
>  create mode 100644 recipes/wpa-supplicant/wpa-gui_0.6.9.bb
> 
> diff --git a/recipes/wpa-supplicant/wpa-gui-0.6.9/desktop.patch 
> b/recipes/wpa-supplicant/wpa-gui-0.6.9/desktop.patch
> new file mode 100644
> index 0000000..d83ecd9
> --- /dev/null
> +++ b/recipes/wpa-supplicant/wpa-gui-0.6.9/desktop.patch
> @@ -0,0 +1,11 @@
> +--- wpa_gui-qt4/wpa_gui.desktop      2009-03-23 15:06:28.000000000 +0100
> ++++ wpa_gui-qt4/wpa_gui.desktop      2009-11-14 18:46:09.000000000 +0100
> +@@ -2,7 +2,7 @@
> + Version=1.0
> + Name=wpa_gui
> + Comment=Graphical user interface for wpa_supplicant
> +-Exec=wpa_gui
> ++Exec=wpa_gui -stylesheet /usr/share/wpa_gui/style
> + Icon=wpa_gui
> + GenericName=wpa_supplicant user interface
> + Terminal=false
> diff --git a/recipes/wpa-supplicant/wpa-gui-0.6.9/session_manager.patch 
> b/recipes/wpa-supplicant/wpa-gui-0.6.9/session_manager.patch
> new file mode 100644
> index 0000000..23ea28c
> --- /dev/null
> +++ b/recipes/wpa-supplicant/wpa-gui-0.6.9/session_manager.patch
> @@ -0,0 +1,72 @@
> +diff -rup wpa_supplicant-0.6.9_orig/wpa_supplicant/wpa_gui-qt4/main.cpp 
> wpa_supplicant-0.6.9/wpa_supplicant/wpa_gui-qt4/main.cpp
> +--- wpa_gui-qt4/main.cpp     2009-03-23 15:06:28.000000000 +0100
> ++++ wpa_gui-qt4/main.cpp     2009-11-14 17:55:47.000000000 +0100
> +@@ -24,7 +24,9 @@ class WpaGuiApp : public QApplication
> + public:
> +     WpaGuiApp(int &argc, char **argv);
> + 
> ++#ifndef QT_NO_SESSIONMANAGER
> +     virtual void saveState(QSessionManager &manager);
> ++#endif
> + 
> +     WpaGui *w;
> + };
> +@@ -33,11 +35,13 @@ WpaGuiApp::WpaGuiApp(int &argc, char **a
> + {
> + }
> + 
> ++#ifndef QT_NO_SESSIONMANAGER
> + void WpaGuiApp::saveState(QSessionManager &manager)
> + {
> +     QApplication::saveState(manager);
> +     w->saveState();
> + }
> ++#endif
> + 
> + 
> + int main(int argc, char *argv[])
> +diff -rup wpa_supplicant-0.6.9_orig/wpa_supplicant/wpa_gui-qt4/wpagui.cpp 
> wpa_supplicant-0.6.9/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
> +--- wpa_gui-qt4/wpagui.cpp   2009-03-23 15:06:28.000000000 +0100
> ++++ wpa_gui-qt4/wpagui.cpp   2009-11-14 17:55:47.000000000 +0100
> +@@ -145,6 +145,7 @@ WpaGui::WpaGui(QApplication *_app, QWidg
> + 
> +     parse_argv();
> + 
> ++#ifndef QT_NO_SESSIONMANAGER
> +     if (app->isSessionRestored()) {
> +             QSettings settings("wpa_supplicant", "wpa_gui");
> +             settings.beginGroup("state");
> +@@ -153,6 +154,7 @@ WpaGui::WpaGui(QApplication *_app, QWidg
> +                     startInTray = settings.value("in_tray").toBool();
> +             settings.endGroup();
> +     }
> ++#endif
> + 
> +     if (QSystemTrayIcon::isSystemTrayAvailable())
> +             createTrayIcon(startInTray);
> +@@ -1689,6 +1691,7 @@ void WpaGui::addInterface()
> + }
> + 
> + 
> ++#ifndef QT_NO_SESSIONMANAGER
> + void WpaGui::saveState()
> + {
> +     QSettings settings("wpa_supplicant", "wpa_gui");
> +@@ -1697,3 +1700,4 @@ void WpaGui::saveState()
> +     settings.setValue("in_tray", inTray);
> +     settings.endGroup();
> + }
> ++#endif
> +diff -rup wpa_supplicant-0.6.9_orig/wpa_supplicant/wpa_gui-qt4/wpagui.h 
> wpa_supplicant-0.6.9/wpa_supplicant/wpa_gui-qt4/wpagui.h
> +--- wpa_gui-qt4/wpagui.h     2009-03-23 15:06:28.000000000 +0100
> ++++ wpa_gui-qt4/wpagui.h     2009-11-14 17:55:47.000000000 +0100
> +@@ -40,7 +40,9 @@ public:
> +     virtual void disableNetwork(const QString &sel);
> +     virtual int getNetworkDisabled(const QString &sel);
> +     void setBssFromScan(const QString &bssid);
> ++#ifndef QT_NO_SESSIONMANAGER
> +     void saveState();
> ++#endif
> + 
> + public slots:
> +     virtual void parse_argv();
> diff --git a/recipes/wpa-supplicant/wpa-gui-0.6.9/style 
> b/recipes/wpa-supplicant/wpa-gui-0.6.9/style
> new file mode 100644
> index 0000000..ffd1749
> --- /dev/null
> +++ b/recipes/wpa-supplicant/wpa-gui-0.6.9/style
> @@ -0,0 +1,4 @@
> +* {font-size: 16px;}
> +QPushButton {
> +     font-size: 20px;
> +}
> diff --git a/recipes/wpa-supplicant/wpa-gui_0.6.9.bb 
> b/recipes/wpa-supplicant/wpa-gui_0.6.9.bb
> new file mode 100644
> index 0000000..92f901c
> --- /dev/null
> +++ b/recipes/wpa-supplicant/wpa-gui_0.6.9.bb
> @@ -0,0 +1,49 @@
> +DESCRIPTION = "Qt interface for choosing which configured network to connect 
> \
> +to. It also provides a method for browsing 802.11 SSID scan results, an 
> event \
> +history log of messages generated by wpa_supplicant, and a method to add or \
> +edit wpa_supplicant networks."
> +SECTION = "network"
> +LICENSE = "GPL BSD"
> +HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/";
> +RDEPENDS = "wpa-supplicant"
> +RECOMMENDS = "eglibc-gconv-utf-16"

IIRC there is no RECOMMENDS.. just RRECOMMENDS, and those are
installed/build by default so for glibc based distro this will build
whole eglibc probably (try to use ${LIBC}-gconv-utf-16 here)

> +PR = "r1"
> +
> +SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
> +       file://session_manager.patch;patch=1"
> +
> +SRC_URI_shr = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz 
> \
> +            file://session_manager.patch;patch=1 \
> +            file://desktop.patch;patch=1 \
> +            file://style"

You can use SRC_URI_append_shr with only last 2 lines here.

> +S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant/wpa_gui-qt4"
> +
> +inherit qt4x11
> +ARM_INSTRUCTION_SET = "arm"
> +
> +#inkscape is needed to make icons

we have ie rsvg-native for svg->png (didn't check for what is inkscape
used here.. but for dependency like that you have to add inkscape-native
as dependency and create recipe for that if there is none :/.

> +do_compile_append() {
> +     pushd ${S}/icons
> +     make
> +     popd
> +}
> +
> +do_install () {
> +     install -d ${D}${bindir}
> +     install -d ${D}${datadir}/wpa_gui
> +     install -d ${D}${datadir}/applications
> +     install -d ${D}${datadir}/pixmaps
> +     install -m 644 icons/hicolor/128x128/apps/wpa_gui.png 
> ${D}${datadir}/pixmaps
> +     install -m 755 wpa_gui ${D}/${bindir}
> +     install -m 644 wpa_gui.desktop ${D}/${datadir}/applications
> +}
> +
> +do_install_append_shr() {
> +     install -m 644 ${WORKDIR}/style ${D}/${datadir}/wpa_gui
> +}
> +
> +FILES_${PN}_shr = "/usr/share/pixmaps/wpa_gui.png \
> +             /usr/share/wpa_gui/style \
> +             /usr/bin/wpa_gui \
> +             /usr/share/applications/wpa_gui.desktop"

is there _shr override needed? at if only additional style is used than
you can add it with _append_shr.

Regards,

-- 
uin:136542059                jid:[email protected]
Jansa Martin                 sip:[email protected] 
JaMa                         
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to