diff options
-rw-r--r-- | packages/libopie/libopie2/ipaq-2.6-sys-class-backlight-support.patch | 144 | ||||
-rw-r--r-- | packages/libopie/libopie2/keyboardless-buttonmap.patch | 176 | ||||
-rw-r--r-- | packages/libopie/libopie2_cvs.bb | 7 | ||||
-rw-r--r-- | packages/xserver-common/files/Makefile.dpkg_ipkg | 114 | ||||
-rw-r--r-- | packages/xserver-common/files/Makefile.translation | 107 | ||||
-rw-r--r-- | packages/xserver-common/files/keyboardless-buttonmap.patch | 56 | ||||
-rw-r--r-- | packages/xserver-common/files/svn_makefiles.patch | 11 | ||||
-rw-r--r-- | packages/xserver-common/xserver-common_svn.bb | 24 |
8 files changed, 638 insertions, 1 deletions
diff --git a/packages/libopie/libopie2/ipaq-2.6-sys-class-backlight-support.patch b/packages/libopie/libopie2/ipaq-2.6-sys-class-backlight-support.patch new file mode 100644 index 0000000000..4095502c32 --- /dev/null +++ b/packages/libopie/libopie2/ipaq-2.6-sys-class-backlight-support.patch @@ -0,0 +1,144 @@ +Index: libopie2/opiecore/device/odevice_ipaq.cpp +=================================================================== +RCS file: /cvs/opie/libopie2/opiecore/device/odevice_ipaq.cpp,v +retrieving revision 1.26 +diff -u -r1.26 odevice_ipaq.cpp +--- libopie2/opiecore/device/odevice_ipaq.cpp 2 Aug 2006 19:12:39 -0000 1.26 ++++ libopie2/opiecore/device/odevice_ipaq.cpp 11 Oct 2006 00:46:38 -0000 +@@ -408,45 +408,19 @@ + if ( bright < 0 ) + bright = 0; + +- QString cmdline; +- +- switch ( model()) { +- case Model_iPAQ_H191x: +- case Model_iPAQ_H4xxx: +- { +- QDir sysClass( "/sys/class/backlight/pxafb/" ); +- sysClass.setFilter(QDir::Dirs); +- int fd; +- if ( sysClass.exists() ) { +- QString sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/power" ); +- fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); +- if ( fd ) { +- char buf[10]; +- buf[0] = bright ? 0 : 4; +- buf[1] = '\0'; +- res = ( ::write( fd, &buf[0], 2 ) == 0 ); +- ::close( fd ); +- } +- sysClassPath = sysClass.absFilePath( "/sys/class/backlight/pxafb/brightness" ); +- fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); +- if ( fd ) { +- char buf[100]; +- int len = ::snprintf( &buf[0], sizeof buf, "%d", bright ); +- res = ( ::write( fd, &buf[0], len ) == 0 ); +- ::close( fd ); +- } +- } +- } +- break; +- +- case Model_iPAQ_HX4700: +- cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright ); +- // No Global::shellQuote as we gurantee it to be sane +- res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); +- break; +- +- +- default: ++ QDir sysClass( "/sys/class/backlight/" ); ++ sysClass.setFilter(QDir::Dirs); ++ if ( sysClass.exists() && sysClass.count() > 2 ) { ++ QString sysClassPath = sysClass.absFilePath( sysClass[2] + "/brightness" ); ++ int fd = ::open( sysClassPath, O_WRONLY|O_NONBLOCK ); ++ if ( fd ) { ++ char buf[100]; ++ int val = bright * displayBrightnessResolution() / 255; ++ int len = ::snprintf( &buf[0], sizeof buf, "%d", val ); ++ res = ( ::write( fd, &buf[0], len ) == 0 ); ++ ::close( fd ); ++ } ++ } else { + if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { + FLITE_IN bl; + bl. mode = 1; +@@ -456,11 +430,28 @@ + ::close ( fd ); + } + } ++ + return res; + } + + int iPAQ::displayBrightnessResolution() const + { ++ int res = 16; ++ ++ QDir sysClass( "/sys/class/backlight/" ); ++ sysClass.setFilter(QDir::Dirs); ++ if ( sysClass.exists() && sysClass.count() > 2 ) { ++ QString sysClassPath = sysClass.absFilePath( sysClass[2] + "/max_brightness" ); ++ int fd = ::open( sysClassPath, O_RDONLY|O_NONBLOCK ); ++ if ( fd ) { ++ char buf[100]; ++ if ( ::read( fd, &buf[0], sizeof buf ) ) ++ ::sscanf( &buf[0], "%d", &res ); ++ ::close( fd ); ++ } ++ return res; ++ } ++ + switch ( model()) { + case Model_iPAQ_H31xx: + case Model_iPAQ_H36xx: +@@ -489,27 +480,22 @@ + + QString cmdline; + +- if ( model() == Model_iPAQ_H191x ) { +- QDir sysClass( "/sys/class/lcd/pxafb/" ); +- sysClass.setFilter(QDir::Dirs); +- if ( sysClass.exists() ) { +- QString sysClassPath = sysClass.absFilePath( "/sys/class/lcd/pxafb/power" ); +- int fd = ::open( sysClassPath, O_WRONLY | O_NONBLOCK ); +- if ( fd ) { +- char buf[10]; +- buf[0] = on ? 0 : 4; +- buf[1] = '\0'; +- res = ( ::write( fd, &buf[0], 2 ) == 0 ); +- ::close( fd ); +- } +- } +- return res; ++ QDir sysClass( "/sys/class/lcd/" ); ++ sysClass.setFilter(QDir::Dirs); ++ if ( sysClass.exists() && sysClass.count() > 2 ) { ++ QString sysClassPath = sysClass.absFilePath( sysClass[2] + "/power" ); ++ int fd = ::open( sysClassPath, O_WRONLY|O_NONBLOCK ); ++ if ( fd ) { ++ char buf[10]; ++ buf[0] = on ? 0 : 4; ++ buf[1] = '\0'; ++ res = ( ::write( fd, &buf[0], 2 ) == 0 ); ++ ::close( fd ); ++ } + } else { +- return OAbstractMobileDevice::setDisplayStatus(on); ++ res = OAbstractMobileDevice::setDisplayStatus(on); + } + +- res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); +- + return res; + } + +@@ -517,6 +503,7 @@ + { + switch (model()) { + case Model_iPAQ_H191x: ++ case Model_iPAQ_H22xx: + case Model_iPAQ_H4xxx: + return false; + default: diff --git a/packages/libopie/libopie2/keyboardless-buttonmap.patch b/packages/libopie/libopie2/keyboardless-buttonmap.patch new file mode 100644 index 0000000000..288f28a68a --- /dev/null +++ b/packages/libopie/libopie2/keyboardless-buttonmap.patch @@ -0,0 +1,176 @@ +Index: libopie2/opiecore/device/odevice_ipaq.cpp +=================================================================== +RCS file: /cvs/opie/libopie2/opiecore/device/odevice_ipaq.cpp,v +retrieving revision 1.26 +diff -u -r1.26 odevice_ipaq.cpp +--- libopie2/opiecore/device/odevice_ipaq.cpp 2 Aug 2006 19:12:39 -0000 1.26 ++++ libopie2/opiecore/device/odevice_ipaq.cpp 10 Oct 2006 15:07:21 -0000 +@@ -84,76 +84,68 @@ + #define LED_ON OD_IOW( 'f', 5, LED_IN ) + #define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) + ++#define Model_Keyboardless_2_6 (Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx) ++ + struct i_button ipaq_buttons [] = { +- { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx, ++ ++ // Common button map for all keyboardless devices with 2.6 kernel ++ { Model_Keyboardless_2_6, + Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), + "devicebuttons/ipaq_calendar", + "datebook", "nextView()", + "today", "raise()" }, +- { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H22xx | Model_iPAQ_HX4700 | Model_iPAQ_H4xxx, ++ { Model_Keyboardless_2_6, + Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), + "devicebuttons/ipaq_contact", + "addressbook", "raise()", + "addressbook", "beamBusinessCard()" }, +- { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, +- Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), +- "devicebuttons/ipaq_menu", +- "QPE/TaskBar", "toggleMenu()", +- "QPE/TaskBar", "toggleStartMenu()" }, +- { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, +- Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), ++ { Model_Keyboardless_2_6, ++ Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), + "devicebuttons/ipaq_mail", + "opiemail", "raise()", + "opiemail", "newMail()" }, +- { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x | Model_iPAQ_H4xxx, ++ { Model_Keyboardless_2_6, + Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), + "devicebuttons/ipaq_home", + "QPE/Launcher", "home()", + "buttonsettings", "raise()" }, +- { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ { Model_Keyboardless_2_6, + Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), + "devicebuttons/ipaq_record", + "QPE/VMemo", "toggleRecord()", + "sound", "raise()" }, + +- { Model_iPAQ_H191x | Model_iPAQ_H4xxx, +- Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), +- "devicebuttons/ipaq_mail", +- "opiemail", "raise()", +- "opiemail", "newMail()" }, +- { Model_iPAQ_H191x | Model_iPAQ_H4xxx, +- Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), +- "devicebuttons/ipaq_record", +- "QPE/VMemo", "toggleRecord()", +- "sound", "raise()" }, +- +- //h2200 has different button mapping +- { Model_iPAQ_H22xx, +- Qt::Key_NumLock, QT_TRANSLATE_NOOP("Button", "Mail Button"), +- "devicebuttons/ipaq_mail", +- "opiemail", "raise()", +- "opiemail", "newMail()" }, +- { Model_iPAQ_H22xx, +- Qt::Key_ScrollLock, QT_TRANSLATE_NOOP("Button", "Menu Button"), ++ // Devices with 2.4 kernel ++ { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), ++ "devicebuttons/ipaq_calendar", ++ "datebook", "nextView()", ++ "today", "raise()" }, ++ { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), ++ "devicebuttons/ipaq_contact", ++ "addressbook", "raise()", ++ "addressbook", "beamBusinessCard()" }, ++ { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, ++ Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), + "devicebuttons/ipaq_menu", + "QPE/TaskBar", "toggleMenu()", + "QPE/TaskBar", "toggleStartMenu()" }, +- // and hx4700 has different button mapping still +- { Model_iPAQ_HX4700, +- Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), ++ { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), + "devicebuttons/ipaq_mail", + "opiemail", "raise()", + "opiemail", "newMail()" }, +- { Model_iPAQ_HX4700, +- Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"), +- "devicebuttons/ipaq_record", +- "QPE/VMemo", "toggleRecord()", +- "sound", "raise()" }, +- { Model_iPAQ_HX4700, +- Qt::Key_Home, QT_TRANSLATE_NOOP("Button", "Home Button"), ++ { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), + "devicebuttons/ipaq_home", + "QPE/Launcher", "home()", + "buttonsettings", "raise()" }, ++ { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, ++ Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), ++ "devicebuttons/ipaq_record", ++ "QPE/VMemo", "toggleRecord()", ++ "sound", "raise()" }, + + }; + +@@ -346,11 +338,8 @@ + break; + } + +- // map Power Button short/long press to F6 for h191x +- case Key_F6: +- if ( d->m_model != Model_iPAQ_H191x && d->m_model != Model_iPAQ_H4xxx ) +- break; + // map Power Button short/long press to F34/F35 ++ case HardKey_Suspend: // Hope we don't have infinite recursion here + case Key_SysReq: { + if ( isPress ) { + if ( m_power_timer ) +Index: libopie2/opiecore/device/odevice_mypal.cpp +=================================================================== +RCS file: /cvs/opie/libopie2/opiecore/device/odevice_mypal.cpp,v +retrieving revision 1.4 +diff -u -r1.4 odevice_mypal.cpp +--- libopie2/opiecore/device/odevice_mypal.cpp 9 Jun 2006 08:27:01 -0000 1.4 ++++ libopie2/opiecore/device/odevice_mypal.cpp 10 Oct 2006 15:07:21 -0000 +@@ -60,29 +60,32 @@ + using namespace Opie::Core; + using namespace Opie::Core::Internal; + ++#define Model_Keyboardless_2_6 (Model_MyPal_716) ++ + struct m_button mypal_buttons [] = { +- { Model_MyPal_716, ++ // Common button map for all keyboardless devices with 2.6 kernel ++ { Model_Keyboardless_2_6, + Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), + "devicebuttons/ipaq_calendar", + "datebook", "nextView()", + "today", "raise()" }, +- { Model_MyPal_716, ++ { Model_Keyboardless_2_6, + Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), + "devicebuttons/ipaq_contact", + "addressbook", "raise()", + "addressbook", "beamBusinessCard()" }, +- { Model_MyPal_716, +- Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), ++ { Model_Keyboardless_2_6, ++ Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Mail Button"), + "devicebuttons/ipaq_mail", + "opiemail", "raise()", + "opiemail", "newMail()" }, +- { Model_MyPal_716, ++ { Model_Keyboardless_2_6, + Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), + "devicebuttons/ipaq_home", + "QPE/Launcher", "home()", + "buttonsettings", "raise()" }, +- { Model_MyPal_716, +- Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), ++ { Model_Keyboardless_2_6, ++ Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), + "devicebuttons/ipaq_record", + "QPE/VMemo", "toggleRecord()", + "sound", "raise()" }, diff --git a/packages/libopie/libopie2_cvs.bb b/packages/libopie/libopie2_cvs.bb index da84cc40eb..78cc00e619 100644 --- a/packages/libopie/libopie2_cvs.bb +++ b/packages/libopie/libopie2_cvs.bb @@ -1,8 +1,13 @@ require ${PN}.inc -PV = "${OPIE_CVS_PV}" +PV = "1.2.2+cvs${SRCDATE}" +PR = "r1" + +DEFAULT_PREFERENCE = "-1" SRC_URI = "${HANDHELDS_CVS};module=opie/libopie2 \ + file://ipaq-2.6-sys-class-backlight-support.patch;patch=1 \ + file://keyboardless-buttonmap.patch;patch=1 \ file://include.pro" SRC_URI_append_poodle = " file://poodle-2.6-hotkeys.patch;patch=1" diff --git a/packages/xserver-common/files/Makefile.dpkg_ipkg b/packages/xserver-common/files/Makefile.dpkg_ipkg new file mode 100644 index 0000000000..76c532154f --- /dev/null +++ b/packages/xserver-common/files/Makefile.dpkg_ipkg @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this +## Makefile snippet + +# Let's use whatever clean target the specific app provides + +CONTROL = `if test -e familiar/control1; then echo control1; else echo control; fi` + +# URL to source tarball +SOURCE = http://gpe.linuxtogo.org/download/source/$(PACKAGE)-$(VERSION).tar.gz + +# can change this to e.g. /var/tmp/deb +DEB_PATH = ../deb + +ifeq ($(CVSBUILD),yes) +LIBGPEWIDGET_PC = libgpewidget-uninstalled +PC_EXTRA=PKG_CONFIG_PATH=../../base/libgpewidget +else +LIBGPEWIDGET_PC = libgpewidget +endif + +ifeq ($(IN_LIBGPEWIDGET),) +GPECFLAGS = $(shell $(PC_EXTRA) pkg-config --cflags $(LIBGPEWIDGET_PC)) +GPELIBS = $(shell $(PC_EXTRA) pkg-config --libs $(LIBGPEWIDGET_PC)) +endif + +GTKCFLAGS = $(shell pkg-config --cflags gtk+-2.0) +GTKLIBS = $(shell pkg-config --libs gtk+-2.0) + +STANDARD_CPPFLAGS = -D_GNU_SOURCE -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\" +STANDARD_CFLAGS = -MD -Wall + +ifeq ($(DEBUG),yes) +CFLAGS += -O2 -g +LDFLAGS = -g +else +CFLAGS += -Os -fomit-frame-pointer +endif + +dist: check-source clean dist-prep + rm -rf ../$(PACKAGE)-$(VERSION) + mkdir ../$(PACKAGE)-$(VERSION) + ( tar cf - --exclude "*/CVS" --exclude CVS --exclude "*~" --exclude "#*#" --exclude "debian" --exclude ".*" --exclude "*.ipk" --exclude "*.ipk.*" --exclude "*.mo" --exclude "*.batch" --exclude "translation-ipkgs.txt" * ) | (cd ../$(PACKAGE)-$(VERSION); tar xf -) + ( if [ -f linguas ]; then LINGUAS=`cat linguas`; PATCH_LINGUAS="s:^LINGUAS =.*:LINGUAS = $${LINGUAS}:"; fi; cd ../$(PACKAGE)-$(VERSION) && mkdir build && cp $(BUILD)/Makefile.dpkg_ipkg $(BUILD)/Makefile.translation build/ && sed "s:^CVSBUILD =.*:CVSBUILD = no:;s:^DEBUG =.*:DEBUG = no:;s:Makefile.translation-auto-linguas:Makefile.translation:;$${PATCH_LINGUAS}" < Makefile > Makefile.new && mv Makefile.new Makefile ) + ( cd .. ; tar cf - $(PACKAGE)-$(VERSION) | gzip -9 >$(PACKAGE)-$(VERSION).tar.gz ) + rm -rf ../$(PACKAGE)-$(VERSION) + $(MAKE) printinfo + +dist-upload: dist + scp ../$(PACKAGE)-$(VERSION).tar.gz $(USER)@linuxtogo.org:/media/data/projects/gpe/source/ + +dist-prep: +ipkg-prep: +install-mo: +# empty, can be filled in Makefile.translation + +install: install-program install-mo + +clean-dist: + rm -rf familiar/dist familiar/dist.list + +clean: clean-dist + +check-source: + @if [ -f familiar/$(CONTROL) ] && ! grep -q '^Source:' familiar/$(CONTROL); then echo -e "\nNo Source: field in control file. Aborting.\n"; exit 1; fi + +ipkg: check-source ipkg-prep clean + rm -rf familiar/dist + mkdir -p familiar/dist/CONTROL + sed 's:VERSION:$(VERSION):;s$$SOURCE$$$(SOURCE)$$' < familiar/$(CONTROL) > familiar/dist/CONTROL/control + if test -e familiar/conffiles; then install -m 644 familiar/conffiles familiar/dist/CONTROL; fi + if test -e familiar/preinst; then install familiar/preinst familiar/dist/CONTROL; fi + if test -e familiar/postinst; then install familiar/postinst familiar/dist/CONTROL; fi + if test -e familiar/prerm; then install familiar/prerm familiar/dist/CONTROL; fi + if test -e familiar/postrm; then install familiar/postrm familiar/dist/CONTROL; fi + $(MAKE) DESTDIR=`pwd`/familiar/dist PREFIX=/usr prefix=/usr DEBUG=no install-program + rm -rf familiar/dist.list + ipkg-build -o 0 -g 0 familiar/dist | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> familiar/dist.list + if [ "x$(LINGUAS)" != "x" ]; then make translation-ipkg; tr ' ' '\n' < translation-ipkgs.txt >> familiar/dist.list; fi + md5sum `cat familiar/dist.list` > $(PACKAGE)_$(VERSION).batch + rm -rf familiar/dist familiar/dist.list + $(MAKE) printinfo + +dpkg: dist + mkdir -p $(DEB_PATH) + ( olddir=`pwd`; cd $(DEB_PATH); rm -rf $(PACKAGE)-$(VERSION); ln -s $$olddir/../$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz ; tar xzf $(PACKAGE)_$(VERSION).orig.tar.gz ) + mkdir -p $(DEB_PATH)/$(PACKAGE)-$(VERSION)/debian + for i in debian/*; do if test -f $$i; then cp $$i $(DEB_PATH)/$(PACKAGE)-$(VERSION)/debian/; fi; done + +CVSTAG := $(shell echo $(PACKAGE)-$(VERSION) | tr [a-z.] [A-Z_]) +printinfo: + @printf '-------------------------------------------------------------------------------\n' + @printf "If this becomes a package release, please add a CVS tag.\n" + @printf "You can use 'make tag' for that, it will execute\n" + @printf " cvs tag %s\n" $(CVSTAG) + @printf "Please upload a tarball (created with 'make dist') to\n" + @printf " ftp://ftp.handhelds.org/pub/projects/gpe/\n" + @printf " (handhelds.org:~ftp/pub/projects/gpe/source)\n" + @printf "You can use 'make dist-upload' to do that.\n" + @printf "You are currently known as USER %s.\n" $(USER) + @printf '-------------------------------------------------------------------------------\n' + +tag: check-source + cvs tag $(CVSTAG) + +retag: check-source + cvs tag -F $(CVSTAG) + +source: tag dist-upload + +%.pc: %.pc.in + sed 's:PREFIX:$(PREFIX):;s:BUILDDIR:$(shell pwd):;s:VERSION:$(VERSION):' < $< > $@ + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ diff --git a/packages/xserver-common/files/Makefile.translation b/packages/xserver-common/files/Makefile.translation new file mode 100644 index 0000000000..1ca7d648fd --- /dev/null +++ b/packages/xserver-common/files/Makefile.translation @@ -0,0 +1,107 @@ +.SUFFIXES: .mo .po .pot .po8 + +CONTROL = `if test -e familiar/control1; then echo control1; else echo control; fi` + +# use ipkg-build or ipkg-deb-build +IPKG_BUILD := ipkg-build + +TRANSLATION_SITE := http://www.iro.umontreal.ca/~gnutra/maint + +ifeq ($(DIR_PO),) +DIR_PO := po +endif + +ifeq ($(BINPACKAGE),) +BINPACKAGE := $(PACKAGE) +endif + +mo-files = $(patsubst %,$(DIR_PO)/%.mo,$(LINGUAS)) +po-files = $(patsubst %,$(DIR_PO)/%.po,$(LINGUAS)) + +ifeq ($(shell if [ -f $(PACKAGE).desktop.in ]; then echo present; fi;),present) +desktop-files += $(PACKAGE).desktop +endif + +ifneq ($(EXTRA_DESKTOPS),) +desktop-files += $(patsubst %.desktop.in,%.desktop,$(EXTRA_DESKTOPS)) +endif + +all-mo: $(mo-files) + +all-desktop: $(desktop-files) + +install-mo: all-mo + if [ "$(ENABLE_NLS)" != "no" ]; then \ + if [ "x$(LINGUAS)" != "x" ]; then \ + for i in $(LINGUAS); do mkdir -p $(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES; install -m 644 $(DIR_PO)/$$i.mo $(DESTDIR)$(PREFIX)/share/locale/$$i/LC_MESSAGES/$(PACKAGE).mo; done \ + fi; \ + fi; + +.po8.mo:; + if [ "$(ENABLE_NLS)" != "no" ]; then \ + msgfmt -o $@ $<; \ + fi; + +.po.po8:; + CTYPE=`grep "^\"Content-Type:" $< | sed 's/^.*charset=//;s/\\\\.*//'`; sed "s/\(Content-Type: .*=\)$$CTYPE/\1UTF-8/" < $< | iconv -f $${CTYPE} -t UTF-8 >$@ + +update-po: $(po-files) extract-po + +dist-prep: update-po freshen-po +# empty + +ifeq ($(CVSBUILD),yes) +ipkg-prep: freshen-po +# empty +endif + +extract-po: + mkdir -p $(DIR_PO) + ( SOURCES="$(SOURCES)"; for DESK in $(PACKAGE).desktop.in $(EXTRA_DESKTOPS); do if [ -f $$DESK ]; then intltool-extract --type=gettext/ini $$DESK; SOURCES="$$SOURCES $${DESK}.h"; fi; done; if [ "x$$SOURCES" != "x" ]; then xgettext --add-comments=TRANSLATORS: -k_ -kN_ -o $(DIR_PO)/$(PACKAGE).pot.new $$SOURCES; fi ) + if [ -f $(DIR_PO)/$(PACKAGE).pot.new ]; then if cmp -s $(DIR_PO)/$(PACKAGE).pot.new $(PACKAGE).pot; then rm $(DIR_PO)/$(PACKAGE).pot.new; else mv $(DIR_PO)/$(PACKAGE).pot.new $(DIR_PO)/$(PACKAGE).pot; fi; fi + +clean: clean-po clean-dist-translation + +clean-po: + rm -rf $(DIR_PO)/*.mo + for i in $(desktop-files); do if [ -f $$i.in ]; then rm -f $$i; rm -f $$i.in.h; fi; done + +%.desktop: %.desktop.in $(patsubst %,$(DIR_PO)/%.po,$(LINGUAS)) + intltool-merge -u -d $(DIR_PO) $< $@ + +freshen-po: + rm -rf tmp-po + mkdir tmp-po + cd tmp-po; for LANG in $(LINGUAS); do wget $(TRANSLATION_SITE)/$(PACKAGE)/$$LANG.po; done + for LANG in $(LINGUAS); do if [ ! -f $(DIR_PO)/$$LANG.po ] || ! cmp -s $(DIR_PO)/$$LANG.po tmp-po/$$LANG.po ; then mv tmp-po/$$LANG.po $(DIR_PO)/$$LANG.po; echo "Updated $$LANG translation"; fi; done + rm -rf tmp-po + +# ------------------------------------------------------------------------ + +MAINTAINER = $(shell grep 'Maintainer: ' familiar/$(CONTROL) | cut -d ' ' -f 2-) + +ifndef BUILD +BUILD = ../build +endif + +transdist := familiar/dist-translation +templates := $(BUILD)/familiar +ipkglist := translation-ipkgs.txt + +clean-dist-translation: + rm -rf $(transdist) $(ipkglist) + +real-translation-package: all-mo + rm -rf $(transdist) $(ipkglist) + for LINGUA in $(LINGUAS); do \ + i=$$(echo $$LINGUA | tr '[A-Z_]' '[a-z+]'); \ + mkdir -p $(transdist)/$$i/CONTROL; \ + mkdir -p $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES; \ + install -m 644 po/$$LINGUA.mo $(transdist)/$$i$(PREFIX)/share/locale/$$LINGUA/LC_MESSAGES/$(PACKAGE).mo; \ + sed -e "s/<maintainer>/$(MAINTAINER)/;s/<package>/$(BINPACKAGE)/;s/<version>/$(VERSION)/;s/<language>/$$i/;s!<source>!$(SOURCE)!" $(templates)/control.translation > $(transdist)/$$i/CONTROL/control; \ + install $(templates)/postinst.translation $(transdist)/$$i/CONTROL/postinst; \ + $(IPKG_BUILD) -g 0 -o 0 $(transdist)/$$i | sed 's/^Packaged .*into //; t 1; d; : 1; s:.*/::' >> $(ipkglist); \ + done + +translation-ipkg: + make PREFIX=/usr real-translation-package diff --git a/packages/xserver-common/files/keyboardless-buttonmap.patch b/packages/xserver-common/files/keyboardless-buttonmap.patch new file mode 100644 index 0000000000..214cb38678 --- /dev/null +++ b/packages/xserver-common/files/keyboardless-buttonmap.patch @@ -0,0 +1,56 @@ +Index: ChangeLog +=================================================================== +--- a/ChangeLog (revision 8846) ++++ a/ChangeLog (working copy) +@@ -1,3 +1,11 @@ ++2006-11-18 Paul Sokolovsky <pmiscml@gmail.com> ++ ++ * X11/keyboardless.xmodmap: New common keymap for all ++ keyboardless PDA devices. (actually, a copy of h2200.xmodmap). ++ * X11/Xinit.d/12keymap: Use keyboardless.xmodmap as default for ++ all HP iPaq, Asus MyPal devices (which don't have need for adhoc ++ modmap). ++ + 2006-11-11 Florian Boor <florian@kernelconcepts.de> + + * Release version 1.12 +Index: X11/keyboardless.xmodmap +=================================================================== +--- a/X11/keyboardless.xmodmap (revision 0) ++++ a/X11/keyboardless.xmodmap (revision 0) +@@ -0,0 +1,6 @@ ++keycode 75 = XF86Calendar ++keycode 76 = telephone ++keycode 95 = XF86Mail ++keycode 96 = XF86Start ++keycode 97 = XF86AudioRecord ++keycode 124 = XF86PowerDown +Index: X11/Xinit.d/12keymap +=================================================================== +--- a/X11/Xinit.d/12keymap (revision 8846) ++++ a/X11/Xinit.d/12keymap (working copy) +@@ -26,20 +26,12 @@ + "Simpad") + xmodmap - < /etc/X11/simpad.xmodmap + ;; +- "HP iPAQ H2200") +- xmodmap - < /etc/X11/h2200.xmodmap +- ;; +- "HP iPAQ HX4700") +- xmodmap - < /etc/X11/hx4700.xmodmap +- ;; +- "HP iPAQ H1910" | "HP iPAQ H4000") +- xmodmap - < /etc/X11/h1910.xmodmap +- ;; +- "Asus MyPal A716") +- xmodmap - < /etc/X11/a716.xmodmap +- ;; + "HP iPAQ h6300") + xmodmap - < /etc/X11/h6300.xmodmap + ;; ++ # All the rest of keyboardless PDA machines use common buttonmap ++ "HP iPAQ"* | "Asus MyPal"*) ++ xmodmap - < /etc/X11/keyboardless.xmodmap ++ ;; + esac + diff --git a/packages/xserver-common/files/svn_makefiles.patch b/packages/xserver-common/files/svn_makefiles.patch new file mode 100644 index 0000000000..79916b4f46 --- /dev/null +++ b/packages/xserver-common/files/svn_makefiles.patch @@ -0,0 +1,11 @@ +--- xserver-common-1.7/Makefile.org 2006-06-14 21:36:04.000000000 +0000 ++++ xserver-common-1.7/Makefile 2006-08-28 20:02:47.000000000 +0000 +@@ -7,7 +7,7 @@ + LINGUAS = + + ifeq ($(CVSBUILD),yes) +-BUILD = ../build ++BUILD = .. + else + BUILD = build + endif diff --git a/packages/xserver-common/xserver-common_svn.bb b/packages/xserver-common/xserver-common_svn.bb new file mode 100644 index 0000000000..ca9f3a7be6 --- /dev/null +++ b/packages/xserver-common/xserver-common_svn.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Common X11 scripts and support files" +LICENSE = "GPL" +SECTION = "x11" +PV = "1.12+svn${SRCDATE}" +PR = "r0" + +PACKAGE_ARCH = "all" + +DEFAULT_PREFERENCE = "-1" + +DEPENDS = "xmodmap xrandr xdpyinfo xtscal" +RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo xtscal" + + +# we are using a gpe-style Makefile +inherit gpe + +S = "${WORKDIR}/xserver-common" + +SRC_URI = "${GPE_SVN} \ + file://Makefile.translation \ + file://Makefile.dpkg_ipkg \ + file://svn_makefiles.patch;patch=1 \ + file://keyboardless-buttonmap.patch;patch=1" |