diff options
Diffstat (limited to 'meta/packages/irda-utils')
| -rwxr-xr-x | meta/packages/irda-utils/files/init | 72 | ||||
| -rw-r--r-- | meta/packages/irda-utils/irda-utils/configure.patch | 25 | ||||
| -rw-r--r-- | meta/packages/irda-utils/irda-utils/m4.patch | 204 | ||||
| -rw-r--r-- | meta/packages/irda-utils/irda-utils_0.9.16.bb | 32 |
4 files changed, 333 insertions, 0 deletions
diff --git a/meta/packages/irda-utils/files/init b/meta/packages/irda-utils/files/init new file mode 100755 index 0000000000..9becfcc0ed --- /dev/null +++ b/meta/packages/irda-utils/files/init | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | |||
| 3 | module_id() { | ||
| 4 | awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo | ||
| 5 | } | ||
| 6 | |||
| 7 | if [ ! -f /etc/sysconfig/irda ]; then | ||
| 8 | |||
| 9 | case `module_id` in | ||
| 10 | "HP iPAQ H2200" | "HP iPAQ HX4700") | ||
| 11 | IRDA=yes | ||
| 12 | DEVICE=/dev/ttyS2 | ||
| 13 | DONGLE= | ||
| 14 | DISCOVERY= | ||
| 15 | ;; | ||
| 16 | *) | ||
| 17 | IRDA=yes | ||
| 18 | DEVICE=/dev/ttyS1 | ||
| 19 | DONGLE= | ||
| 20 | DISCOVERY= | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | |||
| 24 | mkdir -p /etc/sysconfig | ||
| 25 | echo "IRDA=$IRDA" > /etc/sysconfig/irda | ||
| 26 | if [ $IRDA = "yes" ]; then | ||
| 27 | echo "DEVICE=$DEVICE" >> /etc/sysconfig/irda | ||
| 28 | echo "DONGLE=$DONGLE" >> /etc/sysconfig/irda | ||
| 29 | echo "DISCOVERY=$DISCOVERY" >> /etc/sysconfig/irda | ||
| 30 | fi | ||
| 31 | fi | ||
| 32 | |||
| 33 | . /etc/sysconfig/irda | ||
| 34 | |||
| 35 | # Check that irda is up. | ||
| 36 | [ ${IRDA} = "no" ] && exit 0 | ||
| 37 | |||
| 38 | [ -f /usr/sbin/irattach ] || exit 0 | ||
| 39 | |||
| 40 | ARGS= | ||
| 41 | if [ $DONGLE ]; then | ||
| 42 | ARGS="$ARGS -d $DONGLE" | ||
| 43 | fi | ||
| 44 | if [ "$DISCOVERY" = "yes" ];then | ||
| 45 | ARGS="$ARGS -s" | ||
| 46 | fi | ||
| 47 | |||
| 48 | case "$1" in | ||
| 49 | start) | ||
| 50 | echo -n "Starting IrDA: " | ||
| 51 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | ||
| 52 | echo "$NAME." | ||
| 53 | ;; | ||
| 54 | stop) | ||
| 55 | echo -n "Stopping IrDA: " | ||
| 56 | killall irattach > /dev/null 2>&1 | ||
| 57 | echo "$NAME." | ||
| 58 | ;; | ||
| 59 | restart|force-reload) | ||
| 60 | echo -n "Restarting IrDA: " | ||
| 61 | irattach ${DEVICE} ${ARGS} > /dev/null 2>&1 & | ||
| 62 | sleep 1 | ||
| 63 | killall irattach > /dev/null 2>&1 | ||
| 64 | echo "$NAME." | ||
| 65 | ;; | ||
| 66 | *) | ||
| 67 | N=/etc/init.d/$NAME | ||
| 68 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 | ||
| 69 | exit 1 | ||
| 70 | ;; | ||
| 71 | esac | ||
| 72 | |||
diff --git a/meta/packages/irda-utils/irda-utils/configure.patch b/meta/packages/irda-utils/irda-utils/configure.patch new file mode 100644 index 0000000000..a36afe2188 --- /dev/null +++ b/meta/packages/irda-utils/irda-utils/configure.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
| 4 | # | ||
| 5 | |||
| 6 | --- irda-utils-0.9.15/./irdadump/configure.in~configure | ||
| 7 | +++ irda-utils-0.9.15/./irdadump/configure.in | ||
| 8 | @@ -1,5 +1,6 @@ | ||
| 9 | dnl Process this file with autoconf to produce a configure script. | ||
| 10 | -AC_INIT(configure.in) | ||
| 11 | +AC_INIT | ||
| 12 | +AC_CONFIG_SRCDIR([configure.in]) | ||
| 13 | AM_INIT_AUTOMAKE(libirdadump, 0.1) | ||
| 14 | AM_CONFIG_HEADER(config.h) | ||
| 15 | |||
| 16 | @@ -18,7 +19,8 @@ | ||
| 17 | |||
| 18 | dnl Checks for library functions. | ||
| 19 | |||
| 20 | -AC_OUTPUT([ | ||
| 21 | +AC_CONFIG_FILES([ | ||
| 22 | Makefile | ||
| 23 | src/Makefile | ||
| 24 | shell/Makefile]) | ||
| 25 | +AC_OUTPUT | ||
diff --git a/meta/packages/irda-utils/irda-utils/m4.patch b/meta/packages/irda-utils/irda-utils/m4.patch new file mode 100644 index 0000000000..9c077bb24b --- /dev/null +++ b/meta/packages/irda-utils/irda-utils/m4.patch | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
| 4 | # | ||
| 5 | |||
| 6 | --- /dev/null | ||
| 7 | +++ irda-utils-0.9.15/irdadump/m4/glib.m4 | ||
| 8 | @@ -0,0 +1,196 @@ | ||
| 9 | +# Configure paths for GLIB | ||
| 10 | +# Owen Taylor 97-11-3 | ||
| 11 | + | ||
| 12 | +dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
| 13 | +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or | ||
| 14 | +dnl gthread is specified in MODULES, pass to glib-config | ||
| 15 | +dnl | ||
| 16 | +AC_DEFUN(AM_PATH_GLIB, | ||
| 17 | +[dnl | ||
| 18 | +dnl Get the cflags and libraries from the glib-config script | ||
| 19 | +dnl | ||
| 20 | +AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], | ||
| 21 | + glib_config_prefix="$withval", glib_config_prefix="") | ||
| 22 | +AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], | ||
| 23 | + glib_config_exec_prefix="$withval", glib_config_exec_prefix="") | ||
| 24 | +AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], | ||
| 25 | + , enable_glibtest=yes) | ||
| 26 | + | ||
| 27 | + if test x$glib_config_exec_prefix != x ; then | ||
| 28 | + glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" | ||
| 29 | + if test x${GLIB_CONFIG+set} != xset ; then | ||
| 30 | + GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config | ||
| 31 | + fi | ||
| 32 | + fi | ||
| 33 | + if test x$glib_config_prefix != x ; then | ||
| 34 | + glib_config_args="$glib_config_args --prefix=$glib_config_prefix" | ||
| 35 | + if test x${GLIB_CONFIG+set} != xset ; then | ||
| 36 | + GLIB_CONFIG=$glib_config_prefix/bin/glib-config | ||
| 37 | + fi | ||
| 38 | + fi | ||
| 39 | + | ||
| 40 | + for module in . $4 | ||
| 41 | + do | ||
| 42 | + case "$module" in | ||
| 43 | + gmodule) | ||
| 44 | + glib_config_args="$glib_config_args gmodule" | ||
| 45 | + ;; | ||
| 46 | + gthread) | ||
| 47 | + glib_config_args="$glib_config_args gthread" | ||
| 48 | + ;; | ||
| 49 | + esac | ||
| 50 | + done | ||
| 51 | + | ||
| 52 | + AC_PATH_PROG(GLIB_CONFIG, glib-config, no) | ||
| 53 | + min_glib_version=ifelse([$1], ,0.99.7,$1) | ||
| 54 | + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) | ||
| 55 | + no_glib="" | ||
| 56 | + if test "$GLIB_CONFIG" = "no" ; then | ||
| 57 | + no_glib=yes | ||
| 58 | + else | ||
| 59 | + GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` | ||
| 60 | + GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` | ||
| 61 | + glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
| 62 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
| 63 | + glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
| 64 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
| 65 | + glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
| 66 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
| 67 | + if test "x$enable_glibtest" = "xyes" ; then | ||
| 68 | + ac_save_CFLAGS="$CFLAGS" | ||
| 69 | + ac_save_LIBS="$LIBS" | ||
| 70 | + CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
| 71 | + LIBS="$GLIB_LIBS $LIBS" | ||
| 72 | +dnl | ||
| 73 | +dnl Now check if the installed GLIB is sufficiently new. (Also sanity | ||
| 74 | +dnl checks the results of glib-config to some extent | ||
| 75 | +dnl | ||
| 76 | + rm -f conf.glibtest | ||
| 77 | + AC_TRY_RUN([ | ||
| 78 | +#include <glib.h> | ||
| 79 | +#include <stdio.h> | ||
| 80 | +#include <stdlib.h> | ||
| 81 | + | ||
| 82 | +int | ||
| 83 | +main () | ||
| 84 | +{ | ||
| 85 | + int major, minor, micro; | ||
| 86 | + char *tmp_version; | ||
| 87 | + | ||
| 88 | + system ("touch conf.glibtest"); | ||
| 89 | + | ||
| 90 | + /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
| 91 | + tmp_version = g_strdup("$min_glib_version"); | ||
| 92 | + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
| 93 | + printf("%s, bad version string\n", "$min_glib_version"); | ||
| 94 | + exit(1); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + if ((glib_major_version != $glib_config_major_version) || | ||
| 98 | + (glib_minor_version != $glib_config_minor_version) || | ||
| 99 | + (glib_micro_version != $glib_config_micro_version)) | ||
| 100 | + { | ||
| 101 | + printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", | ||
| 102 | + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, | ||
| 103 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
| 104 | + printf ("*** was found! If glib-config was correct, then it is best\n"); | ||
| 105 | + printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); | ||
| 106 | + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
| 107 | + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
| 108 | + printf("*** required on your system.\n"); | ||
| 109 | + printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); | ||
| 110 | + printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); | ||
| 111 | + printf("*** before re-running configure\n"); | ||
| 112 | + } | ||
| 113 | + else if ((glib_major_version != GLIB_MAJOR_VERSION) || | ||
| 114 | + (glib_minor_version != GLIB_MINOR_VERSION) || | ||
| 115 | + (glib_micro_version != GLIB_MICRO_VERSION)) | ||
| 116 | + { | ||
| 117 | + printf("*** GLIB header files (version %d.%d.%d) do not match\n", | ||
| 118 | + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | ||
| 119 | + printf("*** library (version %d.%d.%d)\n", | ||
| 120 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
| 121 | + } | ||
| 122 | + else | ||
| 123 | + { | ||
| 124 | + if ((glib_major_version > major) || | ||
| 125 | + ((glib_major_version == major) && (glib_minor_version > minor)) || | ||
| 126 | + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | ||
| 127 | + { | ||
| 128 | + return 0; | ||
| 129 | + } | ||
| 130 | + else | ||
| 131 | + { | ||
| 132 | + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", | ||
| 133 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
| 134 | + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", | ||
| 135 | + major, minor, micro); | ||
| 136 | + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | ||
| 137 | + printf("***\n"); | ||
| 138 | + printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
| 139 | + printf("*** probably means that the wrong copy of the glib-config shell script is\n"); | ||
| 140 | + printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
| 141 | + printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); | ||
| 142 | + printf("*** correct copy of glib-config. (In this case, you will have to\n"); | ||
| 143 | + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
| 144 | + printf("*** so that the correct libraries are found at run-time))\n"); | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + return 1; | ||
| 148 | +} | ||
| 149 | +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
| 150 | + CFLAGS="$ac_save_CFLAGS" | ||
| 151 | + LIBS="$ac_save_LIBS" | ||
| 152 | + fi | ||
| 153 | + fi | ||
| 154 | + if test "x$no_glib" = x ; then | ||
| 155 | + AC_MSG_RESULT(yes) | ||
| 156 | + ifelse([$2], , :, [$2]) | ||
| 157 | + else | ||
| 158 | + AC_MSG_RESULT(no) | ||
| 159 | + if test "$GLIB_CONFIG" = "no" ; then | ||
| 160 | + echo "*** The glib-config script installed by GLIB could not be found" | ||
| 161 | + echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" | ||
| 162 | + echo "*** your path, or set the GLIB_CONFIG environment variable to the" | ||
| 163 | + echo "*** full path to glib-config." | ||
| 164 | + else | ||
| 165 | + if test -f conf.glibtest ; then | ||
| 166 | + : | ||
| 167 | + else | ||
| 168 | + echo "*** Could not run GLIB test program, checking why..." | ||
| 169 | + CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
| 170 | + LIBS="$LIBS $GLIB_LIBS" | ||
| 171 | + AC_TRY_LINK([ | ||
| 172 | +#include <glib.h> | ||
| 173 | +#include <stdio.h> | ||
| 174 | +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], | ||
| 175 | + [ echo "*** The test program compiled, but did not run. This usually means" | ||
| 176 | + echo "*** that the run-time linker is not finding GLIB or finding the wrong" | ||
| 177 | + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | ||
| 178 | + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
| 179 | + echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
| 180 | + echo "*** is required on your system" | ||
| 181 | + echo "***" | ||
| 182 | + echo "*** If you have an old version installed, it is best to remove it, although" | ||
| 183 | + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" | ||
| 184 | + echo "***" | ||
| 185 | + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" | ||
| 186 | + echo "*** came with the system with the command" | ||
| 187 | + echo "***" | ||
| 188 | + echo "*** rpm --erase --nodeps gtk gtk-devel" ], | ||
| 189 | + [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
| 190 | + echo "*** exact error that occured. This usually means GLIB was incorrectly installed" | ||
| 191 | + echo "*** or that you have moved GLIB since it was installed. In the latter case, you" | ||
| 192 | + echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) | ||
| 193 | + CFLAGS="$ac_save_CFLAGS" | ||
| 194 | + LIBS="$ac_save_LIBS" | ||
| 195 | + fi | ||
| 196 | + fi | ||
| 197 | + GLIB_CFLAGS="" | ||
| 198 | + GLIB_LIBS="" | ||
| 199 | + ifelse([$3], , :, [$3]) | ||
| 200 | + fi | ||
| 201 | + AC_SUBST(GLIB_CFLAGS) | ||
| 202 | + AC_SUBST(GLIB_LIBS) | ||
| 203 | + rm -f conf.glibtest | ||
| 204 | +]) | ||
diff --git a/meta/packages/irda-utils/irda-utils_0.9.16.bb b/meta/packages/irda-utils/irda-utils_0.9.16.bb new file mode 100644 index 0000000000..db56a7044d --- /dev/null +++ b/meta/packages/irda-utils/irda-utils_0.9.16.bb | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | DESCRIPTION = "Provides common files needed to use IrDA. \ | ||
| 2 | IrDA allows communication over Infrared with other devices \ | ||
| 3 | such as phones and laptops." | ||
| 4 | SECTION = "base" | ||
| 5 | LICENSE = "GPL" | ||
| 6 | PR = "r5" | ||
| 7 | |||
| 8 | SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \ | ||
| 9 | file://configure.patch;patch=1 \ | ||
| 10 | file://m4.patch;patch=1 \ | ||
| 11 | file://init" | ||
| 12 | |||
| 13 | export SYS_INCLUDES="-I${STAGING_INCDIR}" | ||
| 14 | |||
| 15 | inherit autotools update-rc.d | ||
| 16 | |||
| 17 | INITSCRIPT_NAME = "irattach" | ||
| 18 | INITSCRIPT_PARAMS = "defaults 20" | ||
| 19 | |||
| 20 | do_compile () { | ||
| 21 | oe_runmake -e -C irattach | ||
| 22 | oe_runmake -e -C irdaping | ||
| 23 | } | ||
| 24 | |||
| 25 | do_install () { | ||
| 26 | install -d ${D}${sbindir} | ||
| 27 | oe_runmake -C irattach ROOT="${D}" install | ||
| 28 | oe_runmake -C irdaping ROOT="${D}" install | ||
| 29 | |||
| 30 | install -d ${D}${sysconfdir}/init.d | ||
| 31 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/irattach | ||
| 32 | } | ||
