diff options
32 files changed, 380 insertions, 1187 deletions
diff --git a/packages/openmoko-apps/openmoko-calculator_svn.bb b/packages/openmoko-apps/openmoko-calculator_svn.bb new file mode 100644 index 0000000000..19f3ed9e45 --- /dev/null +++ b/packages/openmoko-apps/openmoko-calculator_svn.bb @@ -0,0 +1,9 @@ +DESCRIPTION = "The OpenMoko Calculator Application" +SECTION = "openmoko/applications" +AUTHOR = "Rodolphe Ortalo <rodolphe.ortalo@free.fr>" + +PV = "0.0.3+svn${SRCDATE}" +PR = "r0" + +inherit openmoko + diff --git a/packages/openmoko-base/files/.mtn2git_empty b/packages/openmoko-apps/openmoko-terminal/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/openmoko-base/files/.mtn2git_empty +++ b/packages/openmoko-apps/openmoko-terminal/.mtn2git_empty diff --git a/packages/openmoko-apps/openmoko-terminal/gtkterm2rc b/packages/openmoko-apps/openmoko-terminal/gtkterm2rc new file mode 100644 index 0000000000..d68f01ab57 --- /dev/null +++ b/packages/openmoko-apps/openmoko-terminal/gtkterm2rc @@ -0,0 +1,85 @@ +## +# 1=RIGHT, 2=TOP, 3=BOTTOM, 4=LEFT +## +notebookPanel=3 + +## +# 0=HIDDEN, 1=LEFT, 2=RIGHT +## +terminalScrollbar=2 + +## +# 0=NO SCROLLBAR +## +maxScrollbackBuffer=999 + +## +# 0=FALSE, 1=TRUE +## +quitPRGonExitLastTerminal=1 + +## +# 0=FALSE, 1=TRUE +## +showTabsByOneTerminal=0 + +## +#A Font name: use gnome-font-properties to look at available fonts +## +terminalFont=BitStream Vera Sans Mono 11 + +## +# Separator for marking with mouse +## +worldClass=-A-Za-z0-9/_:.,?+%= + +## +# 0=FALSE, 1=TRUE +## +scrollOnKeyStroke=1 + +## +# 0=FALSE, 1=TRUE +## +scrollOnOutput=0 + +## +# 0=FALSE, 1=TRUE +## +blink=1 + +## +# 0=FALSE, 1=TRUE +## +beep=1 + +## +# x y Default Terminal Size in pix +## +terminalSize=80 25 + +## +# NEW COLOR Definition +## +red=0x0000 0xcccc 0x0000 0xaaaa 0x0000 0xaaaa 0x6666 0xaaaa 0x0000 0xcccc 0x5555 0xffff 0x5555 0xffff 0x5555 0xffff 0x5555 0xffff +grn=0x0000 0xcccc 0x0000 0x0000 0xaaaa 0x5555 0x6666 0x0000 0xaaaa 0xcccc 0x5555 0x5555 0xffff 0xffff 0x5555 0x5555 0xffff 0xffff +blu=0x0000 0xcccc 0x0000 0x0000 0x0000 0x0000 0xffff 0xaaaa 0xaaaa 0xcccc 0x5555 0x5555 0x5555 0x5555 0xffff 0xffff 0xffff 0xffff + +## +# COLOR Definition +## + +## +# First section +## +[section] +match= +worldClass=-A-Za-z0-9/_:.,?+%= +scrollOnKeyStroke=1 +scrollOnOutput=0 +beep=1 +blink=1 +red=0x0000 0xcccc 0x0000 0xaaaa 0x0000 0xaaaa 0x6666 0xaaaa 0x0000 0x0000 0x5555 0xffff 0x5555 0xffff 0x5555 0xffff 0x5555 0xffff +grn=0x0000 0xcccc 0x0000 0x0000 0xaaaa 0x5555 0x6666 0x0000 0xaaaa 0xcccc 0x5555 0x5555 0xffff 0xffff 0x5555 0x5555 0xffff 0xffff +blu=0x0000 0xcccc 0x0000 0x0000 0x0000 0x0000 0xffff 0xaaaa 0xaaaa 0x0000 0x5555 0x5555 0x5555 0x5555 0xffff 0xffff 0xffff 0xffff + diff --git a/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.desktop b/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.desktop new file mode 100644 index 0000000000..ced7c0b8e2 --- /dev/null +++ b/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Terminal +Comment=Command Line Interface Terminal +Exec=gtkterm2 +Icon=openmoko-terminal +Terminal=false +Type=Application +Categories=GTK;Application;PIM;Office +MimeType=text/x-vcard; +SingleInstance=false +StartupNotify=true diff --git a/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.png b/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.png Binary files differnew file mode 100644 index 0000000000..56e8e59628 --- /dev/null +++ b/packages/openmoko-apps/openmoko-terminal/openmoko-terminal.png diff --git a/packages/openmoko-apps/openmoko-terminal_svn.bb b/packages/openmoko-apps/openmoko-terminal_svn.bb new file mode 100644 index 0000000000..9238bbd1eb --- /dev/null +++ b/packages/openmoko-apps/openmoko-terminal_svn.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "The OpenMoko Command Line Console" +SECTION = "openmoko/applications" +RDEPENDS += "gtkterm2" +PV = "1.0.0+svn${SRCDATE}" +PR = "r1" + +inherit openmoko + +SRC_URI = "file://openmoko-terminal.png \ + file://openmoko-terminal.desktop \ + file://gtkterm2rc" + +do_install() { + install -d ${D}${sysconfdir}/skel + install -d ${D}${datadir}/pixmaps + install -d ${D}${datadir}/applications + install -m 0644 ${WORKDIR}/openmoko-terminal.png ${D}${datadir}/pixmaps/ + install -m 0644 ${WORKDIR}/openmoko-terminal.desktop ${D}${datadir}/applications/ + install -m 0644 ${WORKDIR}/gtkterm2rc ${D}${sysconfdir}/skel/.gtkterm2rc +} + +pkg_postinst_openmoko-terminal() { +#!/bin/sh -e +if [ "x$D" != "x" ]; then + exit 1 # don't run at image generation time +else + if [ -e "$HOME/.gtkterm2rc" ]; then + echo "not overriding $HOME/.gtkterm2rc" + else + echo "installing $HOME/.gtkterm2rc from /etc/skel" + cp -f ${sysconfdir}/skel/.gtkterm2rc $HOME/ + fi +fi +} diff --git a/packages/openmoko-base/openmoko-icon-theme-standard_svn.bb b/packages/openmoko-base/openmoko-icon-theme-standard_svn.bb index 8be6211d68..a7f62b31c0 100644 --- a/packages/openmoko-base/openmoko-icon-theme-standard_svn.bb +++ b/packages/openmoko-base/openmoko-icon-theme-standard_svn.bb @@ -1,11 +1,19 @@ DESCRIPTION = "Standard Gtk+ icon theme for the OpenMoko distribution" SECTION = "openmoko/base" -PV = "0.0+svn${SRCDATE}" -PR = "r0" +PV = "0.1+svn${SRCDATE}" +PR = "r1" inherit openmoko-base autotools SRC_URI = "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/artwork;module=icons;proto=http" S = "${WORKDIR}/icons" +pkg_postinst_openmoko-icon-theme-standard () { +#!/bin/sh -e +if [ "x$D" != "x" ]; then + exit 1 +fi +gtk-update-icon-cache ${datadir}/icons/openmoko-standard/ +} + PACKAGE_ARCH = "all" diff --git a/packages/openmoko-base/openmoko-libs_svn.bb b/packages/openmoko-base/openmoko-libs_svn.bb index caa70363a2..a7b5387a99 100644 --- a/packages/openmoko-base/openmoko-libs_svn.bb +++ b/packages/openmoko-base/openmoko-libs_svn.bb @@ -2,8 +2,8 @@ DESCRIPTION = "openmoko-libs is a set of libraries implementing a Gtk+ based app SECTION = "openmoko/libs" LICENSE = "LGPL" DEPENDS += "gtk+ eds-dbus libgsmd libxosd" -PV = "0.0.1+svn${SRCDATE}" -PR = "r5" +PV = "0.4+svn${SRCDATE}" +PR = "r0" inherit openmoko @@ -11,12 +11,12 @@ do_stage() { autotools_stage_all } -PACKAGES =+ " \ - libmokojournal libmokojournal-dev libmokojournal-dbg \ - libmokogsmd libmokogsmd-dev libmokogsmd-dbg \ - libmokocore libmokocore-dev libmokocore-dbg \ - libmokoui libmokoui-dev libmokoui-dbg \ - " +PACKAGES =+ "\ + libmokojournal libmokojournal-dev libmokojournal-dbg \ + libmokogsmd libmokogsmd-dev libmokogsmd-dbg \ + libmokocore libmokocore-dev libmokocore-dbg \ + libmokoui libmokoui-dev libmokoui-dbg \ +" FILES_libmokojournal = "${libdir}/libmokojournal.so.*" FILES_libmokojournal-dev = "${libdir}/libmokojournal.so ${libdir}/libmokojournal.*a ${includedir}/${PN}/libmokojournal" diff --git a/packages/openmoko-pim/openmoko-contacts/.mtn2git_empty b/packages/openmoko-base/openmoko-session/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/openmoko-pim/openmoko-contacts/.mtn2git_empty +++ b/packages/openmoko-base/openmoko-session/.mtn2git_empty diff --git a/packages/openmoko-base/files/session b/packages/openmoko-base/openmoko-session/session index 91b38a0bea..c7a773efcb 100644 --- a/packages/openmoko-base/files/session +++ b/packages/openmoko-base/openmoko-session/session @@ -1,17 +1,24 @@ #!/bin/sh +export GTK_MODULES="libgtkstylus.so libgtkinput.so" SHOWCURSOR="no" matchbox-panel-2 \ - --start-applets=openmoko-panel-mainmenu,systray \ + --start-applets=openmoko-panel-mainmenu,systray,startup \ --end-applets=openmoko-panel-battery,openmoko-panel-gsm,openmoko-panel-gps,openmoko-panel-usb,openmoko-panel-bt,openmoko-panel-clock & -#start some old-style panel plugins to get a keyboard and battery status +# start old-style panel plugin to get a keyboard mbinputmgr & -mb-applet-startup-monitor & +# set default alsa configuration +alsactl restore 0 -f /etc/alsa/stereoout.state + +# start UI and dialer openmoko-footer & openmoko-today --desktop & openmoko-dialer & + +sleep 1 + exec matchbox-window-manager -use_titlebar no -use_cursor $SHOWCURSOR $@ diff --git a/packages/openmoko-base/openmoko-session_svn.bb b/packages/openmoko-base/openmoko-session_svn.bb index 18781493f6..7acc8fae1c 100644 --- a/packages/openmoko-base/openmoko-session_svn.bb +++ b/packages/openmoko-base/openmoko-session_svn.bb @@ -1,8 +1,8 @@ DESCRIPTION = "Matchbox session files for OpenMoko" SECTION = "openmoko/base" -RDEPENDS = "matchbox-panel-2 matchbox-wm openmoko-today gconf matchbox-applet-startup-monitor gtk-theme-clearlooks" -PV = "0.0+svn${SRCDATE}" -PR = "r11" +RDEPENDS = "matchbox-panel-2 matchbox-wm openmoko-today gconf" +PV = "0.1+svn${SRCDATE}" +PR = "r0" inherit openmoko-base @@ -15,7 +15,7 @@ do_install() { rm -fR ${D}/${sysconfdir}/.svn rm -fR ${D}/${sysconfdir}/matchbox/.svn chmod -R 755 ${D}/${sysconfdir} - # DEMO only! + # DEMO only. Need to handle this differently in actual production images install -m 0755 ${WORKDIR}/session ${D}/${sysconfdir}/matchbox/session } @@ -25,5 +25,8 @@ if [ "x$D" != "x" ]; then exit 1 fi -gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string --set /desktop/openmoko/interface/theme Clearlooks +gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type string --set /desktop/openmoko/interface/theme openmoko-standard } + +PACKAGE_ARCH = "all" + diff --git a/packages/openmoko-pim/openmoko-dates/.mtn2git_empty b/packages/openmoko-base/openmoko-sound-system/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/packages/openmoko-pim/openmoko-dates/.mtn2git_empty +++ b/packages/openmoko-base/openmoko-sound-system/.mtn2git_empty diff --git a/packages/openmoko-base/openmoko-sound-system/pulseaudio b/packages/openmoko-base/openmoko-sound-system/pulseaudio new file mode 100755 index 0000000000..76daacd3ae --- /dev/null +++ b/packages/openmoko-base/openmoko-sound-system/pulseaudio @@ -0,0 +1,46 @@ +#!/bin/sh +# +# pulseaudio This shell script starts and stops pulseaudio. +# +# chkconfig: 345 90 40 +# description: Pulseaudio manages the sound input/output +# processname: pulseaudio + +# Source function library. +#. /etc/rc.d/init.d/functions + +RETVAL=0 +prog="pulseaudio" + +start() { + echo -n "Starting the audio server..." + # FIXME once alsa/shm permissions have been fixed, supply --system + pulseaudio --resample-method=trivial -D -nF /etc/pulse/session + echo $prog +} + +stop() { + # Stop daemons. + echo -n "Shutting down $prog: " + killall pulseaudio + echo "done" +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $RETVAL diff --git a/packages/openmoko-base/openmoko-sound-system/session b/packages/openmoko-base/openmoko-sound-system/session new file mode 100644 index 0000000000..91267b672a --- /dev/null +++ b/packages/openmoko-base/openmoko-sound-system/session @@ -0,0 +1,26 @@ +#!/usr/bin/pulseaudio -nF + +# Create autoload entries for the device drivers +add-autoload-sink output module-alsa-sink fragment_size=2048 sink_name=output +add-autoload-source input module-alsa-source source_name=input + +# Load several protocols +load-module module-esound-protocol-unix +load-module module-simple-protocol-tcp +load-module module-native-protocol-unix +load-module module-cli-protocol-unix + +# Make some devices default +set-default-sink output +set-default-source input + +# Don't fail if the audio files referred to below don't exist +.nofail + +# Load an audio to the sample cache for usage with module-x11-bell +load-sample-lazy x11-bell /usr/share/openmoko/sounds/notify_doorbell.wav +load-module module-x11-bell sample=x11-bell + +# Load samples +load-sample startup /usr/share/openmoko/sounds/startup_openmoko.wav +load-sample touchscreen /usr/share/openmoko/sounds/touchscreen_click.wav diff --git a/packages/openmoko-base/openmoko-sound-system_0.1.0.bb b/packages/openmoko-base/openmoko-sound-system_0.1.0.bb new file mode 100644 index 0000000000..671ff37f45 --- /dev/null +++ b/packages/openmoko-base/openmoko-sound-system_0.1.0.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "OpenMoko Sound System" +SECTION = "openmoko/base" +RDEPENDS = "\ + pulseaudio-server \ + pulseaudio-module-alsa-sink \ + pulseaudio-module-alsa-source \ + pulseaudio-module-cli \ + pulseaudio-module-esound-protocol-unix \ + pulseaudio-module-simple-protocol-tcp \ + pulseaudio-module-native-protocol-unix \ + pulseaudio-module-cli-protocol-unix \ +" +PR = "r5" + +inherit openmoko-base update-rc.d + +INITSCRIPT_NAME = "pulseaudio" +INITSCRIPT_PARAMS = "defaults 35" + +SRC_URI = "file://pulseaudio \ + file://session" +S = "${WORKDIR}" + +do_install() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/pulseaudio ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/pulse + install -m 0755 ${WORKDIR}/session ${D}/${sysconfdir}/pulse/session +} + +PACKAGE_ARCH = "all" diff --git a/packages/openmoko-base/openmoko-sound-theme-standard_svn.bb b/packages/openmoko-base/openmoko-sound-theme-standard_svn.bb new file mode 100644 index 0000000000..39b1e8d143 --- /dev/null +++ b/packages/openmoko-base/openmoko-sound-theme-standard_svn.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Standard sound theme for the OpenMoko distribution" +SECTION = "openmoko/base" +PV = "0.1+svn${SRCDATE}" +PR = "r0" + +inherit openmoko-base autotools + +SRC_URI = "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/artwork;module=sounds;proto=http" +S = "${WORKDIR}/sounds" + +do_install() { + find ${WORKDIR} -name ".svn" | xargs rm -rf + install -d ${D}${datadir}/openmoko/sounds + for i in *.mp3; do + cp -fpPR ${S}/$i ${D}${datadir}/openmoko/sounds/ + done + for i in touchscreen_click.wav notify_doorbell.wav startup_openmoko.wav; do + cp -f ${S}/$i ${D}${datadir}/openmoko/sounds/ + done +} + +FILES_${PN} = "${datadir}" + diff --git a/packages/openmoko-panel-plugins/openmoko-panel-mainmenu_svn.bb b/packages/openmoko-panel-plugins/openmoko-panel-mainmenu_svn.bb index a6f90417c7..cc5d6c48d3 100644 --- a/packages/openmoko-panel-plugins/openmoko-panel-mainmenu_svn.bb +++ b/packages/openmoko-panel-plugins/openmoko-panel-mainmenu_svn.bb @@ -1,5 +1,7 @@ -DESCRIPTION = "Main menu for the OpenMoko panel" -PV = "0.0.1+svn${SRCDATE}" +DESCRIPTION = "Main menu applet for the OpenMoko panel" +DEPENDS += "pulseaudio startup-notification" +PV = "0.1.0+svn${SRCDATE}" +PR = "r1" inherit openmoko-panel-plugin diff --git a/packages/openmoko-pim/files/.mtn2git_empty b/packages/openmoko-pim/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/openmoko-pim/files/.mtn2git_empty diff --git a/packages/openmoko-pim/openmoko-contacts/index.theme b/packages/openmoko-pim/files/index.theme index 4e9cf67820..4e9cf67820 100644 --- a/packages/openmoko-pim/openmoko-contacts/index.theme +++ b/packages/openmoko-pim/files/index.theme diff --git a/packages/openmoko-pim/openmoko-contacts/intltool-update.in b/packages/openmoko-pim/files/intltool-update.in index 0342a2740c..0342a2740c 100644 --- a/packages/openmoko-pim/openmoko-contacts/intltool-update.in +++ b/packages/openmoko-pim/files/intltool-update.in diff --git a/packages/openmoko-pim/files/openmoko-dates.desktop b/packages/openmoko-pim/files/openmoko-dates.desktop new file mode 100644 index 0000000000..f13cadeb9a --- /dev/null +++ b/packages/openmoko-pim/files/openmoko-dates.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Dates +Comment=Dates +Exec=dates +Icon=openmoko-dates +Terminal=false +Type=Application +Categories=GTK;Application;PIM;Office +MimeType=text/x-vcard; +SingleInstance=false +StartupNotify=true diff --git a/packages/openmoko-pim/files/openmoko-dates.png b/packages/openmoko-pim/files/openmoko-dates.png Binary files differnew file mode 100644 index 0000000000..ebe04f4096 --- /dev/null +++ b/packages/openmoko-pim/files/openmoko-dates.png diff --git a/packages/openmoko-pim/openmoko-contacts/stock_contact.png b/packages/openmoko-pim/files/stock_contact.png Binary files differindex 123b4485ac..123b4485ac 100644 --- a/packages/openmoko-pim/openmoko-contacts/stock_contact.png +++ b/packages/openmoko-pim/files/stock_contact.png diff --git a/packages/openmoko-pim/openmoko-contacts/stock_person.png b/packages/openmoko-pim/files/stock_person.png Binary files differindex 2b1328b4e2..2b1328b4e2 100644 --- a/packages/openmoko-pim/openmoko-contacts/stock_person.png +++ b/packages/openmoko-pim/files/stock_person.png diff --git a/packages/openmoko-pim/openmoko-dates/compile-fix.patch b/packages/openmoko-pim/openmoko-dates/compile-fix.patch deleted file mode 100644 index 41b1f173c2..0000000000 --- a/packages/openmoko-pim/openmoko-dates/compile-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: omoko/src/dates_navigator.c -=================================================================== ---- omoko.orig/src/dates_navigator.c 2007-02-06 16:49:45.000000000 +0100 -+++ omoko/src/dates_navigator.c 2007-02-06 16:51:18.000000000 +0100 -@@ -18,7 +18,6 @@ - - #include <string.h> - --#include <libedataserver/e-data-server-util.h> - #include <libecal/e-cal.h> - #include <libecal/e-cal-time-util.h> - #include <libical/ical.h> diff --git a/packages/openmoko-pim/openmoko-dates/intltool-update.in b/packages/openmoko-pim/openmoko-dates/intltool-update.in deleted file mode 100644 index 661d8fe6ac..0000000000 --- a/packages/openmoko-pim/openmoko-dates/intltool-update.in +++ /dev/null @@ -1,1089 +0,0 @@ -#!@INTLTOOL_PERL@ -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Updater -# -# Copyright (C) 2000-2003 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 published by the Free Software Foundation. -# -# Intltool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Kenneth Christiansen <kenneth@gnu.org> -# Maciej Stachowiak -# Darin Adler <darin@bentspoon.com> - -## Release information -my $PROGRAM = "intltool-update"; -my $VERSION = "0.35.0"; -my $PACKAGE = "intltool"; - -## Loaded modules -use strict; -use Getopt::Long; -use Cwd; -use File::Copy; -use File::Find; - -## Scalars used by the option stuff -my $HELP_ARG = 0; -my $VERSION_ARG = 0; -my $DIST_ARG = 0; -my $POT_ARG = 0; -my $HEADERS_ARG = 0; -my $MAINTAIN_ARG = 0; -my $REPORT_ARG = 0; -my $VERBOSE = 0; -my $GETTEXT_PACKAGE = ""; -my $OUTPUT_FILE = ""; - -my @languages; -my %varhash = (); -my %po_files_by_lang = (); - -# Regular expressions to categorize file types. -# FIXME: Please check if the following is correct - -my $xml_support = -"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) -"ui|". # Bonobo specific - User Interface desc. files -"lang|". # ? -"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) -"scm(?:\\.in)*|". # ? (Note: .in is not required) -"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files -"etspec|". # ? -"server(?:\\.in)+|". # Bonobo specific -"sheet(?:\\.in)+|". # ? -"schemas(?:\\.in)+|". # GConf specific -"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. -"kbd(?:\\.in)+"; # GOK specific. - -my $ini_support = -"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"caves(?:\\.in)+|". # GNOME Games specific -"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"soundlist(?:\\.in)+|". # GNOME specific -"keys(?:\\.in)+|". # GNOME Mime database specific -"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"service(?:\\.in)+"; # DBus specific - -my $buildin_gettext_support = -"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; - -## Always flush buffer when printing -$| = 1; - -## Sometimes the source tree will be rooted somewhere else. -my $SRCDIR = "."; -my $POTFILES_in; - -$SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"}; -$POTFILES_in = "<$SRCDIR/POTFILES.in"; - -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); - -## Handle options -GetOptions -( - "help" => \$HELP_ARG, - "version" => \$VERSION_ARG, - "dist|d" => \$DIST_ARG, - "pot|p" => \$POT_ARG, - "headers|s" => \$HEADERS_ARG, - "maintain|m" => \$MAINTAIN_ARG, - "report|r" => \$REPORT_ARG, - "verbose|x" => \$VERBOSE, - "gettext-package|g=s" => \$GETTEXT_PACKAGE, - "output-file|o=s" => \$OUTPUT_FILE, - ) or &Console_WriteError_InvalidOption; - -&Console_Write_IntltoolHelp if $HELP_ARG; -&Console_Write_IntltoolVersion if $VERSION_ARG; - -my $arg_count = ($DIST_ARG > 0) - + ($POT_ARG > 0) - + ($HEADERS_ARG > 0) - + ($MAINTAIN_ARG > 0) - + ($REPORT_ARG > 0); - -&Console_Write_IntltoolHelp if $arg_count > 1; - -# --version and --help don't require a module name -my $MODULE = $GETTEXT_PACKAGE || &FindPackageName || "unknown"; - -if ($POT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; -} -elsif ($HEADERS_ARG) -{ - &GenerateHeaders; -} -elsif ($MAINTAIN_ARG) -{ - &FindLeftoutFiles; -} -elsif ($REPORT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; - &Console_Write_CoverageReport; -} -elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) -{ - my $lang = $ARGV[0]; - - ## Report error if the language file supplied - ## to the command line is non-existent - &Console_WriteError_NotExisting("$SRCDIR/$lang.po") - if ! -s "$SRCDIR/$lang.po"; - - if (!$DIST_ARG) - { - print "Working, please wait..." if $VERBOSE; - &GenerateHeaders; - &GeneratePOTemplate; - } - &POFile_Update ($lang, $OUTPUT_FILE); - &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); -} -else -{ - &Console_Write_IntltoolHelp; -} - -exit; - -######### - -sub Console_Write_IntltoolVersion -{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) $VERSION -Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. - -Copyright (C) 2000-2003 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -sub Console_Write_IntltoolHelp -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... LANGCODE -Updates PO template files and merge them with the translations. - -Mode of operation (only one is allowed): - -p, --pot generate the PO template only - -s, --headers generate the header files in POTFILES.in - -m, --maintain search for left out files from POTFILES.in - -r, --report display a status report for the module - -d, --dist merge LANGCODE.po with existing PO template - -Extra options: - -g, --gettext-package=NAME override PO template name, useful with --pot - -o, --output-file=FILE write merged translation to FILE - -x, --verbose display lots of feedback - --help display this help and exit - --version output version information and exit - -Examples of use: -${PROGRAM} --pot just create a new PO template -${PROGRAM} xy create new PO template and merge xy.po with it - -Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") -or send email to <xml-i18n-tools\@gnome.org>. -_EOF_ - exit; -} - -sub echo_n -{ - my $str = shift; - my $ret = `echo "$str"`; - - $ret =~ s/\n$//; # do we need the "s" flag? - - return $ret; -} - -sub POFile_DetermineType ($) -{ - my $type = $_; - my $gettext_type; - - my $xml_regex = "(?:" . $xml_support . ")"; - my $ini_regex = "(?:" . $ini_support . ")"; - my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; - - if ($type =~ /\[type: gettext\/([^\]].*)]/) - { - $gettext_type=$1; - } - elsif ($type =~ /schemas(\.in)+$/) - { - $gettext_type="schemas"; - } - elsif ($type =~ /glade2?(\.in)*$/) - { - $gettext_type="glade"; - } - elsif ($type =~ /scm(\.in)*$/) - { - $gettext_type="scheme"; - } - elsif ($type =~ /keys(\.in)+$/) - { - $gettext_type="keys"; - } - - # bucket types - - elsif ($type =~ /$xml_regex$/) - { - $gettext_type="xml"; - } - elsif ($type =~ /$ini_regex$/) - { - $gettext_type="ini"; - } - elsif ($type =~ /$buildin_regex$/) - { - $gettext_type="buildin"; - } - else - { - $gettext_type="unknown"; - } - - return "gettext\/$gettext_type"; -} - -sub TextFile_DetermineEncoding ($) -{ - my $gettext_code="ASCII"; # All files are ASCII by default - my $filetype=`file $_ | cut -d ' ' -f 2`; - - if ($? eq "0") - { - if ($filetype =~ /^(ISO|UTF)/) - { - chomp ($gettext_code = $filetype); - } - elsif ($filetype =~ /^XML/) - { - $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 - } - } - - return $gettext_code; -} - -sub isNotValidMissing -{ - my ($file) = @_; - - return if $file =~ /^\{arch\}\/.*$/; - return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; -} - -sub FindLeftoutFiles -{ - my (@buf_i18n_plain, - @buf_i18n_xml, - @buf_i18n_xml_unmarked, - @buf_i18n_ini, - @buf_potfiles, - @buf_potfiles_ignore, - @buf_allfiles, - @buf_allfiles_sorted, - @buf_potfiles_sorted - ); - - ## Search and find all translatable files - find sub { - push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; - push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; - push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, ".."; - - - open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; - @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>; - close POTFILES; - - foreach (@buf_potfiles) { - s/^\[.*]\s*//; - } - - print "Searching for missing translatable files...\n" if $VERBOSE; - - ## Check if we should ignore some found files, when - ## comparing with POTFILES.in - foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") - { - (-s $ignore) or next; - - if ("$ignore" eq "POTFILES.ignore") - { - print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". - "content of this file to POTFILES.skip.\n"; - } - - print "Found $ignore: Ignoring files...\n" if $VERBOSE; - open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n"; - - while (<FILE>) - { - push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; - } - close FILE; - - @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles); - } - - foreach my $file (@buf_i18n_plain) - { - my $in_comment = 0; - my $in_macro = 0; - - open FILE, "<$file"; - while (<FILE>) - { - # Handle continued multi-line comment. - if ($in_comment) - { - next unless s-.*\*/--; - $in_comment = 0; - } - - # Handle continued macro. - if ($in_macro) - { - $in_macro = 0 unless /\\$/; - next; - } - - # Handle start of macro (or any preprocessor directive). - if (/^\s*\#/) - { - $in_macro = 1 if /^([^\\]|\\.)*\\$/; - next; - } - - # Handle comments and quoted text. - while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy - { - my $match = $1; - if ($match eq "/*") - { - if (!s-/\*.*?\*/--) - { - s-/\*.*--; - $in_comment = 1; - } - } - elsif ($match eq "//") - { - s-//.*--; - } - else # ' or " - { - if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) - { - warn "mismatched quotes at line $. in $file\n"; - s-$match.*--; - } - } - } - - if (/\.GetString ?\(QUOTEDTEXT/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - ## Remove the first 3 chars and add newline - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - - if (/_\(QUOTEDTEXT/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - ## Remove the first 3 chars and add newline - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml) - { - open FILE, "<$file"; - - while (<FILE>) - { - # FIXME: share the pattern matching code with intltool-extract - if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_ini) - { - open FILE, "<$file"; - while (<FILE>) - { - if (/_(.*)=/) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml_unmarked) - { - if (defined isNotValidMissing (unpack("x3 A*", $file))) { - push @buf_allfiles, unpack("x3 A*", $file) . "\n"; - } - } - - - @buf_allfiles_sorted = sort (@buf_allfiles); - @buf_potfiles_sorted = sort (@buf_potfiles); - - my %in2; - foreach (@buf_potfiles_sorted) - { - $in2{$_} = 1; - } - - my @result; - - foreach (@buf_allfiles_sorted) - { - if (!exists($in2{$_})) - { - push @result, $_ - } - } - - my @buf_potfiles_notexist; - - foreach (@buf_potfiles_sorted) - { - chomp (my $dummy = $_); - if ("$dummy" ne "" and ! -f "../$dummy") - { - push @buf_potfiles_notexist, $_; - } - } - - ## Save file with information about the files missing - ## if any, and give information about this procedure. - if (@result + @buf_potfiles_notexist > 0) - { - if (@result) - { - print "\n" if $VERBOSE; - unlink "missing"; - open OUT, ">missing"; - print OUT @result; - close OUT; - warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". - "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; - print STDERR @result, "\n"; - warn "If some of these files are left out on purpose then please add them to\n". - "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". - "of left out files has been written in the current directory.\n"; - } - if (@buf_potfiles_notexist) - { - unlink "notexist"; - open OUT, ">notexist"; - print OUT @buf_potfiles_notexist; - close OUT; - warn "\n" if ($VERBOSE or @result); - warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; - warn @buf_potfiles_notexist, "\n"; - warn "Please remove them from POTFILES.in or POTFILES.skip. A file \e[1m'notexist'\e[0m\n". - "containing this list of absent files has been written in the current directory.\n"; - } - } - - ## If there is nothing to complain about, notify the user - else { - print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; - } -} - -sub Console_WriteError_InvalidOption -{ - ## Handle invalid arguments - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit 1; -} - -sub GenerateHeaders -{ - my $EXTRACT = "@INTLTOOL_EXTRACT@"; - chomp $EXTRACT; - - $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"}; - - ## Generate the .h header files, so we can allow glade and - ## xml translation support - if (! -x "$EXTRACT") - { - print STDERR "\n *** The intltool-extract script wasn't found!" - ."\n *** Without it, intltool-update can not generate files.\n"; - exit; - } - else - { - open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; - - while (<FILE>) - { - chomp; - next if /^\[\s*encoding/; - - ## Find xml files in POTFILES.in and generate the - ## files with help from the extract script - - my $gettext_type= &POFile_DetermineType ($1); - - if (/\.($xml_support|$ini_support)$/ || /^\[/) - { - s/^\[[^\[].*]\s*//; - - my $filename = "../$_"; - - if ($VERBOSE) - { - system ($EXTRACT, "--update", "--srcdir=$SRCDIR", - "--type=$gettext_type", $filename); - } - else - { - system ($EXTRACT, "--update", "--type=$gettext_type", - "--srcdir=$SRCDIR", "--quiet", $filename); - } - } - } - close FILE; - } -} - -# -# Generate .pot file from POTFILES.in -# -sub GeneratePOTemplate -{ - my $XGETTEXT = $ENV{"XGETTEXT"} || "@INTLTOOL_XGETTEXT@"; - my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; - chomp $XGETTEXT; - - if (! -x $XGETTEXT) - { - print STDERR " *** xgettext is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - print "Building $MODULE.pot...\n" if $VERBOSE; - - open INFILE, $POTFILES_in; - unlink "POTFILES.in.temp"; - open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); - - my $gettext_support_nonascii = 0; - - # checks for GNU gettext >= 0.12 - my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; - if ($? == 0) - { - $gettext_support_nonascii = 1; - } - else - { - # urge everybody to upgrade gettext - print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". - " strings. That means you should install a version of gettext\n". - " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". - " or have to let non-ASCII strings untranslated. (If there is any)\n"; - } - - my $encoding = "ASCII"; - my $forced_gettext_code; - my @temp_headers; - my $encoding_problem_is_reported = 0; - - while (<INFILE>) - { - next if (/^#/ or /^\s*$/); - - chomp; - - my $gettext_code; - - if (/^\[\s*encoding:\s*(.*)\s*\]/) - { - $forced_gettext_code=$1; - } - elsif (/\.($xml_support|$ini_support)$/ || /^\[/) - { - s/^\[.*]\s*//; - print OUTFILE "../$_.h\n"; - push @temp_headers, "../$_.h"; - $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - else - { - if ($SRCDIR eq ".") { - print OUTFILE "../$_\n"; - } else { - print OUTFILE "$SRCDIR/../$_\n"; - } - $gettext_code = &TextFile_DetermineEncoding ("../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - - next if (! $gettext_support_nonascii); - - if (defined $forced_gettext_code) - { - $encoding=$forced_gettext_code; - } - elsif (defined $gettext_code and "$encoding" ne "$gettext_code") - { - if ($encoding eq "ASCII") - { - $encoding=$gettext_code; - } - elsif ($gettext_code ne "ASCII") - { - # Only report once because the message is quite long - if (! $encoding_problem_is_reported) - { - print STDERR "WARNING: You should use the same file encoding for all your project files,\n". - " but $PROGRAM thinks that most of the source files are in\n". - " $encoding encoding, while \"$_\" is (likely) in\n". - " $gettext_code encoding. If you are sure that all translatable strings\n". - " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". - " line to POTFILES.in:\n\n". - " [encoding: UTF-8]\n\n". - " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". - "(such warning message will only be reported once.)\n"; - $encoding_problem_is_reported = 1; - } - } - } - } - - close OUTFILE; - close INFILE; - - unlink "$MODULE.pot"; - my @xgettext_argument=("$XGETTEXT", - "--add-comments", - "--directory\=\.", - "--output\=$MODULE\.pot", - "--files-from\=\.\/POTFILES\.in\.temp"); - my $XGETTEXT_KEYWORDS = &FindPOTKeywords; - push @xgettext_argument, $XGETTEXT_KEYWORDS; - my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; - push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS; - push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); - push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; - my $xgettext_command = join ' ', @xgettext_argument; - - # intercept xgettext error message - print "Running $xgettext_command\n" if $VERBOSE; - my $xgettext_error_msg = `$xgettext_command 2>\&1`; - my $command_failed = $?; - - unlink "POTFILES.in.temp"; - - print "Removing generated header (.h) files..." if $VERBOSE; - unlink foreach (@temp_headers); - print "done.\n" if $VERBOSE; - - if (! $command_failed) - { - if (! -e "$MODULE.pot") - { - print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; - } - else - { - print "Wrote $MODULE.pot\n" if $VERBOSE; - } - } - else - { - if ($xgettext_error_msg =~ /--from-code/) - { - # replace non-ASCII error message with a more useful one. - print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". - " string marked for translation. Please make sure that all strings marked\n". - " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". - " following line to POTFILES.in and rerun $PROGRAM:\n\n". - " [encoding: UTF-8]\n\n"; - } - else - { - print STDERR "$xgettext_error_msg"; - if (-e "$MODULE.pot") - { - # is this possible? - print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". - " Please consult error message above if there is any.\n"; - } - else - { - print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". - " error message above if there is any.\n"; - } - } - exit (1); - } -} - -sub POFile_Update -{ - -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; - - my $MSGMERGE = $ENV{"MSGMERGE"} || "@INTLTOOL_MSGMERGE@"; - my ($lang, $outfile) = @_; - - print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; - - my $infile = "$SRCDIR/$lang.po"; - $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); - - # I think msgmerge won't overwrite old file if merge is not successful - system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); -} - -sub Console_WriteError_NotExisting -{ - my ($file) = @_; - - ## Report error if supplied language file is non-existing - print STDERR "$PROGRAM: $file does not exist!\n"; - print STDERR "Try '$PROGRAM --help' for more information.\n"; - exit; -} - -sub GatherPOFiles -{ - my @po_files = glob ("./*.po"); - - @languages = map (&POFile_GetLanguage, @po_files); - - foreach my $lang (@languages) - { - $po_files_by_lang{$lang} = shift (@po_files); - } -} - -sub POFile_GetLanguage ($) -{ - s/^(.*\/)?(.+)\.po$/$2/; - return $_; -} - -sub Console_Write_TranslationStatus -{ - my ($lang, $output_file) = @_; - my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@"; - - $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); - - system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); -} - -sub Console_Write_CoverageReport -{ - my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@"; - - &GatherPOFiles; - - foreach my $lang (@languages) - { - print "$lang: "; - &POFile_Update ($lang, ""); - } - - print "\n\n * Current translation support in $MODULE \n\n"; - - foreach my $lang (@languages) - { - print "$lang: "; - system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); - } -} - -sub SubstituteVariable -{ - my ($str) = @_; - - # always need to rewind file whenever it has been accessed - seek (CONF, 0, 0); - - # cache each variable. varhash is global to we can add - # variables elsewhere. - while (<CONF>) - { - if (/^(\w+)=(.*)$/) - { - ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; - } - } - - if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) - { - my $rest = $3; - my $untouched = $1; - my $sub = ""; - # Ignore recursive definitions of variables - $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; - - return SubstituteVariable ("$untouched$sub$rest"); - } - - # We're using Perl backticks ` and "echo -n" here in order to - # expand any shell escapes (such as backticks themselves) in every variable - return echo_n ($str); -} - -sub CONF_Handle_Open -{ - my $base_dirname = getcwd(); - $base_dirname =~ s@.*/@@; - - my ($conf_in, $src_dir); - - if ($base_dirname =~ /^po(-.+)?$/) - { - if (-f "Makevars") - { - my $makefile_source; - - local (*IN); - open (IN, "<Makevars") || die "can't open Makevars: $!"; - - while (<IN>) - { - if (/^top_builddir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - if (-f "$src_dir" . "/configure.ac") { - $conf_in = "$src_dir" . "/configure.ac" . "\n"; - } else { - $conf_in = "$src_dir" . "/configure.in" . "\n"; - } - last; - } - } - close IN; - - $conf_in || die "Cannot find top_builddir in Makevars."; - } - elsif (-f "../configure.ac") - { - $conf_in = "../configure.ac"; - } - elsif (-f "../configure.in") - { - $conf_in = "../configure.in"; - } - else - { - my $makefile_source; - - local (*IN); - open (IN, "<Makefile") || return; - - while (<IN>) - { - if (/^top_srcdir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - $conf_in = "$src_dir" . "/configure.in" . "\n"; - - last; - } - } - close IN; - - $conf_in || die "Cannot find top_srcdir in Makefile."; - } - - open (CONF, "<$conf_in"); - } - else - { - print STDERR "$PROGRAM: Unable to proceed.\n" . - "Make sure to run this script inside the po directory.\n"; - exit; - } -} - -sub FindPackageName -{ - my $version; - my $domain = &FindMakevarsDomain; - my $name = $domain || "untitled"; - - &CONF_Handle_Open; - - my $conf_source; { - local (*IN); - open (IN, "<&CONF") || return $name; - seek (IN, 0, 0); - local $/; # slurp mode - $conf_source = <IN>; - close IN; - } - - # priority for getting package name: - # 1. GETTEXT_PACKAGE - # 2. first argument of AC_INIT (with >= 2 arguments) - # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) - - # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m - # the \s makes this not work, why? - if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) - { - ($name, $version) = ($1, $2); - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - } - - if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) - { - ($name, $version) = ($1, $2); - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - } - - # \s makes this not work, why? - $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; - - # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value - # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. - $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; - - $name = $domain if $domain; - - $name = SubstituteVariable ($name); - $name =~ s/^["'](.*)["']$/$1/; - - return $name if $name; -} - - -sub FindPOTKeywords -{ - - my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; - my $varname = "XGETTEXT_OPTIONS"; - my $make_source; { - local (*IN); - open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords; - seek (IN, 0, 0); - local $/; # slurp mode - $make_source = <IN>; - close IN; - } - - $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; - - return $keywords; -} - -sub FindMakevarsDomain -{ - - my $domain = ""; - my $makevars_source; { - local (*IN); - open (IN, "<Makevars") || return $domain; - seek (IN, 0, 0); - local $/; # slurp mode - $makevars_source = <IN>; - close IN; - } - - $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; - $domain =~ s/^\s+//; - $domain =~ s/\s+$//; - - return $domain; -} - -sub FindMakevarsBugAddress -{ - - my $address = ""; - my $makevars_source; { - local (*IN); - open (IN, "<Makevars") || return undef; - seek (IN, 0, 0); - local $/; # slurp mode - $makevars_source = <IN>; - close IN; - } - - $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; - $address =~ s/^\s+//; - $address =~ s/\s+$//; - - return $address; -} diff --git a/packages/openmoko-pim/openmoko-dates/om-dates-temp-buildfix_20070308.patch b/packages/openmoko-pim/openmoko-dates/om-dates-temp-buildfix_20070308.patch deleted file mode 100644 index 04d6b4b8c1..0000000000 --- a/packages/openmoko-pim/openmoko-dates/om-dates-temp-buildfix_20070308.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- openmoko/po/LINGUAS.orig 2007-03-08 11:07:44.000000000 +0000 -+++ openmoko/po/LINGUAS 2007-03-08 11:07:52.000000000 +0000 -@@ -1,5 +1,4 @@ - et - fr - nl --pl - ru diff --git a/packages/openmoko-pim/openmoko-dates/remove-bogus-include.patch b/packages/openmoko-pim/openmoko-dates/remove-bogus-include.patch deleted file mode 100644 index 4740612a8b..0000000000 --- a/packages/openmoko-pim/openmoko-dates/remove-bogus-include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- /tmp/dates_navigator.c 2007-02-15 13:36:27.000000000 +0100 -+++ omoko/src/dates_navigator.c 2007-02-15 13:36:35.435251000 +0100 -@@ -21,7 +21,6 @@ - #include <libecal/e-cal.h> - #include <libecal/e-cal-time-util.h> - #include <libical/ical.h> --#include <libedataserver/e-data-server-util.h> - - #include <gtk/gtk.h> - #include <glib/gi18n.h> diff --git a/packages/openmoko-pim/openmoko-dates_svn.bb b/packages/openmoko-pim/openmoko-dates_svn.bb index 58f07c7eb5..5d52871ecd 100644 --- a/packages/openmoko-pim/openmoko-dates_svn.bb +++ b/packages/openmoko-pim/openmoko-dates_svn.bb @@ -1,27 +1,29 @@ -DESCRIPTION = "Dates is a calendar application." +DESCRIPTION = "The OpenMoko Dates Application" SECTION = "openmoko/pim" LICENSE = "GPL" DEPENDS = "glib-2.0 gtk+ libglade eds-dbus openmoko-libs" RDEPENDS = "libedata-cal" -RCONFLICTS_${PN} = "dates" PV = "0.1+svn${SRCDATE}" -PR = "r8" +PR = "r9" inherit gnome autotools pkgconfig gtk-icon-cache SRC_URI = "svn://svn.o-hand.com/repos/dates/branches/;module=openmoko;proto=http \ - file://om-dates-temp-buildfix_20070308.patch;maxdate=20070406;patch=p1" + file://openmoko-dates.png \ + file://openmoko-dates.desktop" S = "${WORKDIR}/openmoko" EXTRA_OECONF = "--enable-omoko" do_install_append () { + rm -rf ${D}${datadir}/icons + rm -rf ${D}${datadir}/applications/dates.desktop install -d ${D}/${datadir}/pixmaps - install -m 0644 ${D}/${datadir}/icons/hicolor/48x48/apps/dates.png ${D}/${datadir}/pixmaps/ + install -m 0644 ${WORKDIR}/openmoko-dates.png ${D}/${datadir}/pixmaps/ + install -m 0644 ${WORKDIR}/openmoko-dates.desktop ${D}${datadir}/applications/ } -FILES_${PN} += "${datadir}/pixmaps/dates.png \ +FILES_${PN} += "${datadir}/pixmaps \ ${datadir}/dates/" -PRIVATE_LIBS = "libgtkdatesview.so.0" diff --git a/packages/openmoko-pim/openmoko-tasks_svn.bb b/packages/openmoko-pim/openmoko-tasks_svn.bb new file mode 100644 index 0000000000..b3c627e621 --- /dev/null +++ b/packages/openmoko-pim/openmoko-tasks_svn.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "The OpenMoko Tasks Application" +SECTION = "openmoko/pim" +LICENSE = "GPL" +DEPENDS = "glib-2.0 gtk+ libglade eds-dbus openmoko-libs" +RDEPENDS = "libedata-cal" +PV = "0.1+svn${SRCDATE}" +PR = "r0" + +inherit gnome autotools pkgconfig gtk-icon-cache + +SRC_URI = "svn://svn.o-hand.com/repos/tasks/;module=trunk;proto=http" +S = "${WORKDIR}/trunk" + +EXTRA_OECONF = "--enable-omoko --disable-gtk" + diff --git a/packages/openmoko-pim/openmoko-today_svn.bb b/packages/openmoko-pim/openmoko-today_svn.bb index 74e79b85f1..da5a961671 100644 --- a/packages/openmoko-pim/openmoko-today_svn.bb +++ b/packages/openmoko-pim/openmoko-today_svn.bb @@ -1,7 +1,7 @@ DESCRIPTION = "OpenMoko Today application." SECTION = "openmoko/pim" LICENSE = "GPL" -DEPENDS = "openmoko-libs eds-dbus" +DEPENDS = "openmoko-libs eds-dbus startup-notification" PV = "0.1+svn${SRCDATE}" inherit autotools pkgconfig gtk-icon-cache openmoko diff --git a/packages/tasks/task-openmoko.bb b/packages/tasks/task-openmoko.bb index d2d501c4f5..49dc6735a8 100644 --- a/packages/tasks/task-openmoko.bb +++ b/packages/tasks/task-openmoko.bb @@ -1,11 +1,11 @@ DESCRIPTION = "OpenMoko: Tasks for the OpenMoko Linux Distribution" SECTION = "openmoko/base" -ALLOW_EMPTY = "1" -PACKAGE_ARCH = "all" LICENSE = "MIT" PROVIDES = "task-openmoko-everything" +PR = "r46" -PR = "r35" +ALLOW_EMPTY = "1" +PACKAGE_ARCH = "all" PACKAGES = "\ task-openmoko-linux \ @@ -19,6 +19,7 @@ PACKAGES = "\ task-openmoko-demo \ task-openmoko-examples \ task-openmoko-debug \ + task-openmoko-native-sdk \ " RDEPENDS_task-openmoko-everything := "${PACKAGES}" @@ -29,31 +30,16 @@ RDEPENDS_task-openmoko-everything := "${PACKAGES}" DESCRIPTION_task-openmoko-linux = "OpenMoko: Linux Core Services" RDEPENDS_task-openmoko-linux = "\ task-base \ + netbase \ sysfsutils \ modutils-initscripts \ module-init-tools-depmod \ rsync \ + screen \ # update-alternatives \ " # -# task-openmoko-base -# -DESCRIPTION_task-openmoko-base = "OpenMoko: Main-Menu Launcher, and Panel" -RDEPENDS_task-openmoko-base = "\ -" - -# -# task-openmoko-phone -# -DESCRIPTION_task-openmoko-phone = "OpenMoko: GSM Phone Services" -RDEPENDS_task-openmoko-phone = "\ - gsmd \ - libgsmd-tools \ - openmoko-dialer \ -" - -# # task-openmoko-ui # DESCRIPTION_task-openmoko-ui = "OpenMoko: The X11/Gtk+2 based native User Interface" @@ -65,22 +51,26 @@ RDEPENDS_task-openmoko-ui = "\ pango-module-basic-x \ pango-module-basic-fc \ gtk+ \ + libgtkstylus \ + libgtkinput \ matchbox-common \ matchbox-wm \ - matchbox-panel-2 \ xserver-kdrive-fbdev \ xserver-kdrive-common \ xserver-nodm-init \ +# x11-c-locale \ ttf-bitstream-vera \ xauth \ xhost \ xset \ xrandr \ + settings-daemon \ openmoko-common \ openmoko-session \ openmoko-theme-standard \ openmoko-icon-theme-standard \ - settings-daemon \ + openmoko-sound-system \ + openmoko-sound-theme-standard \ # psplash \ " @@ -89,8 +79,13 @@ RDEPENDS_task-openmoko-ui = "\ # DESCRIPTION_task-openmoko-base = "OpenMoko: Main-Menu Launcher, Top Panel, and Footer" RDEPENDS_task-openmoko-base = "\ + openmoko-terminal \ openmoko-mainmenu \ matchbox-panel-2 \ + matchbox-panel-2-applets \ + matchbox-applet-inputmanager \ + openmoko-appmanager \ + openmoko-keyboard \ openmoko-footer \ openmoko-taskmanager \ openmoko-panel-mainmenu \ @@ -110,7 +105,7 @@ RDEPENDS_task-openmoko-phone = "\ libgsmd-tools \ openmoko-dialer \ openmoko-panel-gsm \ -# ppp \ +# ppp \ " # @@ -118,6 +113,7 @@ RDEPENDS_task-openmoko-phone = "\ # DESCRIPTION_task-openmoko-finger = "OpenMoko: Finger UI Applications" RDEPENDS_task-openmoko-finger = "\ + openmoko-calculator \ " # @@ -128,7 +124,10 @@ RDEPENDS_task-openmoko-pim = "\ eds-dbus \ openmoko-contacts \ openmoko-dates \ + openmoko-tasks \ openmoko-today \ + openmoko-messages \ + openmoko-rssreader \ " # @@ -137,6 +136,7 @@ RDEPENDS_task-openmoko-pim = "\ DESCRIPTION_task-openmoko-net = "OpenMoko: Linux Advanced Networking" RDEPENDS_task-openmoko-net = "\ bluez-utils \ + bridge-utils \ " # @@ -144,25 +144,12 @@ RDEPENDS_task-openmoko-net = "\ # DESCRIPTION_task-openmoko-demo = "OpenMoko: Demo Applications" RDEPENDS_task-openmoko-demo = "\ - matchbox-desktop \ + matchbox-desktop-2 \ matchbox-keyboard \ - openmoko-keyboard \ matchbox-stroke \ matchbox-config-gtk \ - matchbox-panel-2-applets \ - matchbox-themes-extra \ - matchbox-themes-gtk \ - openmoko-panel-battery \ - openmoko-panel-clock \ - openmoko-panel-gsm \ - openmoko-panel-mainmenu \ - openmoko-rssreader \ - openmoko-messages \ - openmoko-today \ xcursor-transparent-theme \ web \ - rxvt-unicode \ - gpe-terminal \ mtpaint \ " @@ -171,6 +158,11 @@ RDEPENDS_task-openmoko-demo = "\ # DESCRIPTION_task-openmoko-examples = "OpenMoko: Example Applications" RDEPENDS_task-openmoko-examples = "\ + openmoko-stylus-demo-simple \ + openmoko-stylus-demo \ + openmoko-finger-demo \ + openmoko-panel-demo-simple \ + openmoko-panel-demo \ openmoko-chordmaster" # @@ -178,6 +170,7 @@ RDEPENDS_task-openmoko-examples = "\ # DESCRIPTION_task-openmoko-debug = "OpenMoko: Debugging Tools" RDEPENDS_task-openmoko-debug = "\ + alsa-state \ alsa-utils-amixer \ alsa-utils-aplay \ alsa-utils-aconnect \ @@ -186,12 +179,13 @@ RDEPENDS_task-openmoko-debug = "\ madplay \ vorbis-tools \ strace \ -# ltrace \ + ltrace \ gdb \ gdbserver \ tcpdump \ tslib-calibrate \ tslib-tests \ + fbgrab \ fstests \ lsof \ lrzsz \ @@ -201,10 +195,13 @@ RDEPENDS_task-openmoko-debug = "\ cu \ # sensors-i2cdetect sensors-i2cdump sensors-i2cset \ xev \ + bonnie++ \ + memtester \ + dbench \ " # -# task-openmoko-sdk-native +# task-openmoko-native-sdk # DESCRIPTION_task-openmoko-native-sdk = "OpenMoko: Native SDK" RDEPENDS_task-openmoko-native-sdk = "\ @@ -214,9 +211,9 @@ RDEPENDS_task-openmoko-native-sdk = "\ gcc-symlinks \ cpp \ cpp-symlinks \ + cvs \ libc6-dev \ libgcc-dev \ - libgcc-s-dev \ glibc-utils \ ldd \ g++ \ |