summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-wireless/irda-utils
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-wireless/irda-utils')
-rw-r--r--net-wireless/irda-utils/Manifest1
-rw-r--r--net-wireless/irda-utils/files/irda-setup.sh68
-rw-r--r--net-wireless/irda-utils/files/irda-usb.sh62
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch15
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch26
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch11
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff48
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch132
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff11
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff14
-rw-r--r--net-wireless/irda-utils/files/irda-utils-rh1.patch11
-rw-r--r--net-wireless/irda-utils/files/irda.confd27
-rw-r--r--net-wireless/irda-utils/files/irda.initd86
-rw-r--r--net-wireless/irda-utils/files/irda.modsd48
-rw-r--r--net-wireless/irda-utils/files/irda.rules18
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild94
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild96
-rw-r--r--net-wireless/irda-utils/metadata.xml10
18 files changed, 778 insertions, 0 deletions
diff --git a/net-wireless/irda-utils/Manifest b/net-wireless/irda-utils/Manifest
new file mode 100644
index 000000000000..e71346dcec9b
--- /dev/null
+++ b/net-wireless/irda-utils/Manifest
@@ -0,0 +1 @@
+DIST irda-utils-0.9.18.tar.gz 168390 SHA256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6 SHA512 493360b5c03f93063265663b86c8ef3ade714c51edf804390c4e713cb0aeea204c5cd06c8ceffb99b1531fca7272422e53d52e03b66ddc4bceb5503f4ab5f3ad WHIRLPOOL 8282478bb9f96eb4def9f60bd7db9d6471b65bcddbb9ff6d4a63698940cc6a11062541ff2f3619d6f11928aedd172053d424698288e7a2bce9f13119078d83a6
diff --git a/net-wireless/irda-utils/files/irda-setup.sh b/net-wireless/irda-utils/files/irda-setup.sh
new file mode 100644
index 000000000000..a7c781989c57
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-setup.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# irda-setup
+#
+# Initialize IrDA devices. Based on a Ubuntu init-script,
+# but adapted to be called directly from udev.
+#
+# params: sir/fir <module> <options>
+
+MODE="${1}"
+shift
+
+SYSFS="/sys"
+RESOURCES="${SYSFS}${DEVPATH}/resources"
+
+# Work out resource ranges, so we know which serial port to work with
+PORTS=$(/bin/sed -n 's/io \(.*\)-.*/\1/p' "${RESOURCES}")
+for PORT in ${PORTS}; do
+ case "${PORT}" in
+ 0x3f8)
+ PORT="/dev/ttyS0"
+ break;;
+ 0x2f8)
+ PORT="/dev/ttyS1"
+ break;;
+ 0x3e8)
+ PORT="/dev/ttyS2"
+ break;;
+ 0x2e8)
+ PORT="/dev/ttyS3"
+ break;;
+ default)
+ PORT="UNKNOWN";;
+ esac
+done
+
+# Handle FIR dongles
+if [ "${MODE}" = "fir" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ UART="unknown";
+ if [ "${PORT}" != "UNKNOWN" ]; then
+ # We should attempt to disable the UART. However, we need to store
+ # it - there's a chance that things could still go horribly wrong
+ UART=$(/bin/setserial ${PORT} | /bin/sed 's/.*UART: \(.*\), Port.*/\1/')
+ /bin/setserial ${PORT} uart none
+ fi
+
+ # Load FIR module
+ /sbin/modprobe -sq "${@}" && exit 0 # OK
+
+ # Try to recover
+ [ "${UART}" != "undefined" ] && /bin/setserial ${PORT} uart ${UART}
+fi
+
+# We'll only have got here if we have SIR or the FIR module has failed
+if [ "${PORT}" != "UNKNOWN" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ # The IRQ is not always set correctly, so try to deal with that
+ /bin/setserial ${PORT} $(/bin/grep -h '^irq ' "${RESOURCES}")
+fi
+
+exit 0 # never fail
diff --git a/net-wireless/irda-utils/files/irda-usb.sh b/net-wireless/irda-utils/files/irda-usb.sh
new file mode 100644
index 000000000000..d0250eab891f
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-usb.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# irda-usb
+#
+# Hotplug IrDA-USB devices. Only USB devices are handled!
+# To initialize normal SIR/FIR dongles, please use /etc/init.d/irda
+
+SYSFS="/sys"
+
+checkusb() {
+ # quick check, but not always available
+ [ "${PHYSDEVBUS}" = "usb" ] && return 0
+
+ # alternative check via modalias
+ /bin/grep -q '^usb:' "${SYSFS}${DEVPATH}/device/modalias" 2>/dev/null
+}
+
+checkconfig() {
+ . /etc/conf.d/irda
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+}
+
+case "${ACTION}" in
+ add)
+ # We handle USB only
+ checkusb || exit 0
+
+ # Load config
+ checkconfig
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${INTERFACE} ${DISCOVERY}
+ ;;
+
+ remove)
+ # Unconditionally kill irattach instance
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${INTERFACE} ?"
+ ;;
+esac
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch
new file mode 100644
index 000000000000..26937a042c2b
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-asneeded.patch
@@ -0,0 +1,15 @@
+Fixing as-needed issues
+
+http://bugs.gentoo.org/show_bug.cgi?id=318135
+
+--- irdadump/Makefile
++++ irdadump/Makefile
+@@ -40,7 +40,7 @@
+
+ irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) `pkg-config --libs glib-2.0` -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET)
++ $(ECMD)$(CC) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
+
+
+ .c.o:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch
new file mode 100644
index 000000000000..9c752407a362
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-dofail.patch
@@ -0,0 +1,26 @@
+--- a/Makefile
++++ b/Makefile
+@@ -31,19 +31,19 @@
+ CFLAGS= -O2 -W -Wall
+
+ all:
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ install:
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ clean:
+ $(prn_clean)
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
+
+ distclean:
+ $(prn_distclean)
+- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done)
+
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch
new file mode 100644
index 000000000000..1c40edc7cd7e
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch
@@ -0,0 +1,11 @@
+--- tekram/Makefile.orig 2010-11-02 22:41:43.000000000 +0100
++++ tekram/Makefile 2010-11-02 22:41:53.000000000 +0100
+@@ -38,7 +38,7 @@
+ #
+ # System stuff
+ #
+-SYS_INCLUDES = -I/usr/src/linux/include -I/usr/include -I../include
++SYS_INCLUDES = -I/usr/include -I../include
+ SYS_LIBRARIES =
+ SYS_LIBPATH = -L/usr/lib -L/usr/local/lib
+
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff
new file mode 100644
index 000000000000..13de1f944007
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-io.h.diff
@@ -0,0 +1,48 @@
+diff -Naur irda-utils-0.9.18-orig/findchip/nsc.c irda-utils-0.9.18/findchip/nsc.c
+--- irda-utils-0.9.18-orig/findchip/nsc.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/nsc.c 2007-09-25 01:34:32.000000000 +0200
+@@ -33,7 +33,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/findchip/smc.c irda-utils-0.9.18/findchip/smc.c
+--- irda-utils-0.9.18-orig/findchip/smc.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/smc.c 2007-09-25 01:34:32.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/findchip/winbond.c irda-utils-0.9.18/findchip/winbond.c
+--- irda-utils-0.9.18-orig/findchip/winbond.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/findchip/winbond.c 2007-09-25 01:34:32.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+
+ #include "findchip.h"
+
+diff -Naur irda-utils-0.9.18-orig/pcmcia/ircard_cs.c irda-utils-0.9.18/pcmcia/ircard_cs.c
+--- irda-utils-0.9.18-orig/pcmcia/ircard_cs.c 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/pcmcia/ircard_cs.c 2007-09-25 01:34:32.000000000 +0200
+@@ -41,7 +41,7 @@
+ #include <linux/timer.h>
+ #include <linux/delay.h>
+ #include <linux/ioport.h>
+-#include <asm/io.h>
++#include <sys/io.h>
+ #include <asm/system.h>
+
+ #include <net/irda/irda.h>
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch b/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch
new file mode 100644
index 000000000000..d8548ed79ff0
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-ldflags.patch
@@ -0,0 +1,132 @@
+diff -uNr irda-utils-0.9.18.ORIG/findchip/Makefile irda-utils-0.9.18/findchip/Makefile
+--- irda-utils-0.9.18.ORIG/findchip/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/findchip/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -47,7 +47,7 @@
+
+ findchip: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(OBJS) $(CFLAGS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(OBJS) $(CFLAGS) -o $@
+
+
+ clean:
+@@ -65,5 +65,5 @@
+
+ gfindchip: gfindchip.c
+ $(prn_cc)
+- $(ECMD))$(CC) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
++ $(ECMD))$(CC) $(LDFLAGS) $(CFLAGS) `gtk-config --cflags` $< -o $@ `gtk-config --libs`
+
+diff -uNr irda-utils-0.9.18.ORIG/irattach/Makefile irda-utils-0.9.18/irattach/Makefile
+--- irda-utils-0.9.18.ORIG/irattach/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irattach/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -49,13 +49,13 @@
+
+ irattach: irattach.o util.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) irattach.o util.o -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) irattach.o util.o -o $@
+
+
+
+ dongle_attach: dongle_attach.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) dongle_attach.o -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) dongle_attach.o -o $@
+
+
+ install: $(TARGETS)
+diff -uNr irda-utils-0.9.18.ORIG/irdadump/Makefile irda-utils-0.9.18/irdadump/Makefile
+--- irda-utils-0.9.18.ORIG/irdadump/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irdadump/Makefile 2010-10-17 14:31:31.000000000 +0100
+@@ -40,7 +40,7 @@
+
+ irdadump: $(IRDADUMP_OBJS) $(LIBIRDADUMP_TARGET)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) -o $(IRDADUMP_TARGET) $< $(LIBIRDADUMP_TARGET) `pkg-config --libs glib-2.0`
+
+
+ .c.o:
+diff -uNr irda-utils-0.9.18.ORIG/irdaping/Makefile irda-utils-0.9.18/irdaping/Makefile
+--- irda-utils-0.9.18.ORIG/irdaping/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irdaping/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -56,7 +56,7 @@
+
+ irdaping: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) -o $@
+
+
+ .c.o:
+diff -uNr irda-utils-0.9.18.ORIG/irnetd/Makefile irda-utils-0.9.18/irnetd/Makefile
+--- irda-utils-0.9.18.ORIG/irnetd/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irnetd/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -50,7 +50,7 @@
+
+ irnetd: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) -o $@
+
+
+ install: irnetd
+diff -uNr irda-utils-0.9.18.ORIG/irsockets/Makefile irda-utils-0.9.18/irsockets/Makefile
+--- irda-utils-0.9.18.ORIG/irsockets/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/irsockets/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -54,7 +54,7 @@
+
+ %: %.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS)
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS)
+
+
+ %.o: %.c
+diff -uNr irda-utils-0.9.18.ORIG/psion/Makefile irda-utils-0.9.18/psion/Makefile
+--- irda-utils-0.9.18.ORIG/psion/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/psion/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -25,4 +25,4 @@
+ CFLAGS += -g -I../include -Wall -Wstrict-prototypes $(RPM_OPT_FLAGS)
+ irpsion5:
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(CFLAGS) $(PSION_SRC) -o $@
+\ No newline at end of file
++ $(ECMD)$(CC) $(LDFLAGS) $(CFLAGS) $(PSION_SRC) -o $@
+diff -uNr irda-utils-0.9.18.ORIG/smcinit/Makefile irda-utils-0.9.18/smcinit/Makefile
+--- irda-utils-0.9.18.ORIG/smcinit/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/smcinit/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -26,17 +26,17 @@
+
+ smcinit: smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ tosh1800-smcinit: tosh1800-smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ tosh2450-smcinit: tosh2450-smcinit.o
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
++ $(ECMD)$(CC) $(LDFLAGS) $(XCFLAGS) -o $@ $^ $(LIBS) -lpci
+
+
+ %o: %c
+diff -uNr irda-utils-0.9.18.ORIG/tekram/Makefile irda-utils-0.9.18/tekram/Makefile
+--- irda-utils-0.9.18.ORIG/tekram/Makefile 2010-10-17 14:30:57.000000000 +0100
++++ irda-utils-0.9.18/tekram/Makefile 2010-10-17 14:31:21.000000000 +0100
+@@ -55,7 +55,7 @@
+
+ irkbd: $(OBJS)
+ $(prn_cc_o)
+- $(ECMD)$(CC) $(OBJS) -o $@
++ $(ECMD)$(CC) $(LDFLAGS) $(OBJS) -o $@
+
+
+ .c.o:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff
new file mode 100644
index 000000000000..02e3b8909db5
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-makefile.diff
@@ -0,0 +1,11 @@
+--- irda-utils-0.9.18-orig/irnetd/Makefile 2006-07-11 08:16:06.000000000 +0200
++++ irda-utils-0.9.18/irnetd/Makefile 2007-09-25 01:38:13.000000000 +0200
+@@ -55,7 +55,7 @@
+
+ install: irnetd
+ $(prn_install)
+- $(ECMD) install irnetd /usr/sbin/
++ $(ECMD) install irnetd $(ROOT)/usr/sbin/
+
+
+ clean:
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
new file mode 100644
index 000000000000..dd06efec02a8
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
@@ -0,0 +1,14 @@
+--- smcinit/smcinit.c.orig 2006-07-11 08:16:06.000000000 +0200
++++ smcinit/smcinit.c 2008-03-22 05:49:38.000000000 +0100
+@@ -292,9 +292,9 @@
+ }
+
+ twobyte = pci_read_word(dev, DID);
+- if ((twobyte != 0x24cc) & (twobyte != 0x248c)) {
++ if ((twobyte != 0x244c) & (twobyte != 0x24cc) & (twobyte != 0x248c)) {
+ fprintf(stderr,
+- "%s IO hub device %x not 82801CAM (0x248c or 0x24cc)\n",
++ "%s IO hub device %x not 82801BAM/82801CAM (0x24cc or 0x244c or 0x248c)\n",
+ PROGNAME, twobyte);
+ return 1;
+ }
diff --git a/net-wireless/irda-utils/files/irda-utils-rh1.patch b/net-wireless/irda-utils/files/irda-utils-rh1.patch
new file mode 100644
index 000000000000..6e4bfca618ae
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-rh1.patch
@@ -0,0 +1,11 @@
+--- irda-utils-0.9.15/irattach/irattach.c.rh1 2003-11-24 17:30:21.000000000 +0100
++++ irda-utils-0.9.15/irattach/irattach.c 2003-11-24 17:34:51.000000000 +0100
+@@ -614,7 +614,7 @@
+ /* First arg is device name. Save it now, because in some cases
+ * getopt() will remove it... */
+ strncpy(device, argv[1], 20);
+- device[20] = '\0';
++ device[19] = '\0';
+
+ /* Look for options */
+ /* Do this before processing device, to handle "-h" and -v"
diff --git a/net-wireless/irda-utils/files/irda.confd b/net-wireless/irda-utils/files/irda.confd
new file mode 100644
index 000000000000..6b6ac85413a6
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.confd
@@ -0,0 +1,27 @@
+# Set your startup settings for irattach, the IrDA-daemon, here.
+# please also look at /etc/modprobe.d/irda.conf
+
+# Set discovery mode which usually is a good idea for finding other devices.
+# If set 'yes' or 'no' irattach and sysctl are used to enable and disable
+# discovery mode. By default discover mode is disabled.
+DISCOVERY="yes"
+
+# Set IRDA device to access (e.g. /dev/ttyS1 or irda0). In case of irda0,
+# the proper module for FIR-mode has to be set in /etc/modprobe.d/irda.
+DEVICE="/dev/ttyS1"
+
+# Set dongle type, e.g. none, tekram, esi, actisys, actisys+, ep7211, girbil,
+# litelink, airport, old_belkin, mcp2120, act200l, ma600). You do not need
+# a dongle for FIR mode. See "man 8 irattach" for more information.
+DONGLE="none"
+
+# Set the serial device to quiet with setserial. This is only useful on some
+# machines in FIR-mode, so most people should leave it blank.
+#SETSERIAL="/dev/ttyS1"
+
+# Sets the maximum baud rate for the IrDA serial port.
+# Some devices (e.g. Nokia mobile phones) need this.
+#MAX_BAUD_RATE="115200"
+
+# Load extra modules
+#LOAD_MODULES="irlan irnet"
diff --git a/net-wireless/irda-utils/files/irda.initd b/net-wireless/irda-utils/files/irda.initd
new file mode 100644
index 000000000000..c515d12356e7
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.initd
@@ -0,0 +1,86 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Id$
+
+# Hint: We don't use start-stop-daemon, because pidfile is the same
+# for every irattach instance. So it isn't reliable if we have more
+# than one IrDA device (i.e. with IrDA-USB).
+
+depend() {
+ use serial
+}
+
+checkconfig() {
+ if [ -z "${DEVICE}" ]; then
+ DEVICE="/dev/ttyS1"
+ fi
+
+ if [ -z "${DONGLE}" -o "${DONGLE}" = "none" ]; then
+ DONGLE=""
+ else
+ DONGLE="-d ${DONGLE}"
+ fi
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+
+ # Ensure that SIR driver is loaded (needed for pmac_zilog)
+ case "${DEVICE}" in
+ /dev/ttyS*) LOAD_MODULES="${LOAD_MODULES} irtty-sir";;
+ esac
+}
+
+remove_module() {
+ local CNT=0
+ while ! /sbin/modprobe -sqr ${1}; do
+ [ $((CNT++)) -eq 10 ] && break
+ sleep 0.25
+ done
+}
+
+start() {
+ checkconfig
+ ebegin "Starting IrDA"
+
+ # Needed for some machines in FIR-mode
+ [ -n "${SETSERIAL}" ] && /bin/setserial ${SETSERIAL} uart none port 0x0 irq 0
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${DEVICE} ${DONGLE} ${DISCOVERY}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Shutting down IrDA"
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${DEVICE} ?"
+ eend ${?}
+
+ # Try to remove IrDA driver
+ case "${DEVICE}" in
+ /dev/ttyS*) remove_module irtty-sir;;
+ irda[0-9]*) remove_module ${DEVICE};;
+ esac
+ return 0 # never fail
+}
diff --git a/net-wireless/irda-utils/files/irda.modsd b/net-wireless/irda-utils/files/irda.modsd
new file mode 100644
index 000000000000..a32c9a6829f8
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.modsd
@@ -0,0 +1,48 @@
+# IrDA module configuration
+# please also look at /etc/conf.d/irda
+
+# IrDA over a normal serial port, or a serial port compatible IrDA port
+alias tty-ldisc-11 irtty
+
+# IrCOMM/IrLPT support (virtual serial/parallel over IrDA)
+alias char-major-161 ircomm-tty # Official allocation of IrCOMM
+
+# IrLAN support (Ethernet over IrDA)
+alias irlan0 irlan
+# Access type DIRECT=1, PEER=2, HOSTED=3 (int)
+#options irlan access=2
+
+# IrNET support (Synchronous PPP over IrDA)
+alias char-major-10-187 irnet # Official allocation of IrNET
+
+# Serial Dongles
+# These values are hard-coded in irattach (not instance order)
+alias irda-dongle-0 tekram # Tekram IrMate IR-210B
+alias irda-dongle-1 esi # ESI JetEye
+alias irda-dongle-2 actisys # Actisys IR-220L
+alias irda-dongle-3 actisys # Actisys IR-220L+
+alias irda-dongle-4 girbil # Greenwich GIrBIL
+alias irda-dongle-5 litelink # Parallax LiteLink (+ modern ESI)
+alias irda-dongle-6 airport # Adaptec Airport 1000 and 2000
+alias irda-dongle-7 old_belkin # Old Belkin (9600 baud only)
+alias irda-dongle-8 ep7211 # ???
+alias irda-dongle-9 mcp2120 # Crystal compatible chipset
+
+# To use the NSC driver on a Thinkpad laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x09
+
+# To use the NSC driver on a HP OB6000 laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x08
+
+# SMC driver
+#alias irda0 smsc-ircc2
+#options smsc-ircc2 ircc_dma=1 ircc_irq=10 ircc_fir=0x0130 ircc_sir=0x02f8
+
+# Some laptops (Toshiba Satellites and others with SMCS LPC47N227) require
+# running smcinit to initialize the irda device prior to use. If your device
+# is one of them, uncomment the required SMC-IRCC initializer.
+#install smsc-ircc2 /usr/sbin/smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh1800-smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh2450-smcinit && /sbin/modprobe -i smsc-ircc2
diff --git a/net-wireless/irda-utils/files/irda.rules b/net-wireless/irda-utils/files/irda.rules
new file mode 100644
index 000000000000..54dd3c2a4cfe
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.rules
@@ -0,0 +1,18 @@
+# IrDA-PNP (autodetect and setup some known SIR/FIR devices)
+# you need to run /etc/init./irda to activate your device
+
+ACTION!="add", GOTO="irda_pnp_end"
+SUBSYSTEM!="pnp", GOTO="irda_pnp_end"
+
+ATTR{id}=="PNP0510", RUN+="irda-setup sir"
+ATTR{id}=="PNP0511", RUN+="irda-setup sir"
+ATTR{id}=="NSC*", RUN+="irda-setup fir nsc-ircc"
+ATTR{id}=="IBM0071", RUN+="irda-setup fir nsc-ircc dongle_id=0x09"
+ATTR{id}=="SMC*", RUN+="irda-setup fir smsc-ircc2"
+ATTR{id}=="ALI5123", RUN+="irda-setup fir ali-ircc"
+ATTR{id}=="VIA3076", RUN+="irda-setup fir via-ircc"
+
+LABEL="irda_pnp_end"
+
+# IrDA-USB (start/stop irattach automatically)
+KERNEL=="irda[0-9]*", SUBSYSTEM=="net", RUN+="irda-usb"
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild
new file mode 100644
index 000000000000..3de48eaa2554
--- /dev/null
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r3.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs flag-o-matic udev
+
+DESCRIPTION="IrDA management and handling utilities"
+HOMEPAGE="http://irda.sourceforge.net"
+SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ~sh x86"
+IUSE=""
+
+RDEPEND="=dev-libs/glib-2*
+ >=sys-apps/pciutils-2.2.7-r1
+ sys-process/procps
+ sys-apps/setserial
+ sys-apps/grep
+ virtual/udev"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !app-laptop/smcinit"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}"/irda-utils-rh1.patch \
+ "${FILESDIR}"/${P}-makefile.diff \
+ "${FILESDIR}"/${P}-smcinit.diff \
+ "${FILESDIR}"/${P}-io.h.diff \
+ "${FILESDIR}"/${P}-dofail.patch \
+ "${FILESDIR}"/${P}-asneeded.patch
+
+ # fix crosscompile, respect CFLAGS (Bug 200295)
+ sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^LD/s:ld:$(tc-getLD):" \
+ -e "/^AR/s:ar:$(tc-getAR):" \
+ -e "/^RANLIB/s:ranlib:$(tc-getRANLIB):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile */Makefile
+
+ # fix compile when pciutils is compiled with USE=zlib (Bug 200295)
+ sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile
+
+ # disable etc subdir in Makefile
+ sed -i -e "s:^\(DIRS.*=.* \)etc \(.*\):\1\2:g" Makefile
+
+ # disable write_pid(), because we don't need it
+ sed -i -e "s:\(write_pid();\):/* \1 */:g" irattach/util.c
+
+ append-flags "-fno-strict-aliasing"
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS}" RPM_BUILD_ROOT="${D}" ROOT="${D}" \
+ || die "emake failed"
+}
+
+src_install () {
+ dodir /usr/bin
+ dodir /usr/sbin
+
+ emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
+ MANDIR="${D}usr/share/man" || die "emake install failed"
+
+ newdoc ethereal/README README.wireshark
+ newdoc irattach/README README.irattach
+ newdoc irdadump/README README.irdadump
+ newdoc irdaping/README README.irdaping
+ newdoc irsockets/README README.irsockets
+ newdoc tekram/README README.tekram
+ newdoc smcinit/README README.smcinit
+ newdoc smcinit/README.Peri README.smcinit.Peri
+ newdoc smcinit/README.Rob README.smcinit.Rob
+ newdoc smcinit/README.Tom README.smcinit.Tom
+ newdoc irattach/ChangeLog ChangeLog.irattach
+ newdoc irdadump/ChangeLog ChangeLog.irdadump
+ newdoc smcinit/ChangeLog ChangeLog.smcinit
+ dohtml smcinit/RobMiller-irda.html
+ dodoc README
+
+ newconfd "${FILESDIR}/irda.confd" irda
+ newinitd "${FILESDIR}/irda.initd" irda
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/irda.modsd" irda.conf
+
+ udev_newrules "${FILESDIR}/irda.rules" 53-irda.rules
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}/irda-setup.sh" irda-setup
+ newexe "${FILESDIR}/irda-usb.sh" irda-usb
+}
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild
new file mode 100644
index 000000000000..589574b4f553
--- /dev/null
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r4.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs flag-o-matic udev
+
+DESCRIPTION="IrDA management and handling utilities"
+HOMEPAGE="http://irda.sourceforge.net"
+SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib:2
+ >=sys-apps/pciutils-2.2.7-r1
+ sys-process/procps
+ sys-apps/setserial
+ sys-apps/grep
+ virtual/udev
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !app-laptop/smcinit
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/irda-utils-rh1.patch \
+ "${FILESDIR}"/${P}-makefile.diff \
+ "${FILESDIR}"/${P}-smcinit.diff \
+ "${FILESDIR}"/${P}-io.h.diff \
+ "${FILESDIR}"/${P}-dofail.patch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-headers.patch
+
+ # fix crosscompile, respect CFLAGS (Bug 200295)
+ sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^LD/s:ld:$(tc-getLD):" \
+ -e "/^AR/s:ar:$(tc-getAR):" \
+ -e "/^RANLIB/s:ranlib:$(tc-getRANLIB):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile */Makefile || die
+
+ # fix compile when pciutils is compiled with USE=zlib (Bug 200295)
+ sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile || die
+
+ # disable etc subdir in Makefile
+ sed -i -e "s:^\(DIRS.*=.* \)etc \(.*\):\1\2:g" Makefile || die
+
+ # disable write_pid(), because we don't need it
+ sed -i -e "s:\(write_pid();\):/* \1 */:g" irattach/util.c || die
+
+ append-flags "-fno-strict-aliasing" # bug????
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS}" RPM_BUILD_ROOT="${D}" ROOT="${D}"
+}
+
+src_install () {
+ dodir /usr/bin
+ dodir /usr/sbin
+
+ emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
+ MANDIR="${D}usr/share/man"
+
+ newdoc ethereal/README README.wireshark
+ newdoc irattach/README README.irattach
+ newdoc irdadump/README README.irdadump
+ newdoc irdaping/README README.irdaping
+ newdoc irsockets/README README.irsockets
+ newdoc tekram/README README.tekram
+ newdoc smcinit/README README.smcinit
+ newdoc smcinit/README.Peri README.smcinit.Peri
+ newdoc smcinit/README.Rob README.smcinit.Rob
+ newdoc smcinit/README.Tom README.smcinit.Tom
+ newdoc irattach/ChangeLog ChangeLog.irattach
+ newdoc irdadump/ChangeLog ChangeLog.irdadump
+ newdoc smcinit/ChangeLog ChangeLog.smcinit
+ dohtml smcinit/RobMiller-irda.html
+ dodoc README
+
+ newconfd "${FILESDIR}/irda.confd" irda
+ newinitd "${FILESDIR}/irda.initd" irda
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/irda.modsd" irda.conf
+
+ udev_newrules "${FILESDIR}/irda.rules" 53-irda.rules
+ exeinto "$(get_udevdir)"
+ newexe "${FILESDIR}/irda-setup.sh" irda-setup
+ newexe "${FILESDIR}/irda-usb.sh" irda-usb
+}
diff --git a/net-wireless/irda-utils/metadata.xml b/net-wireless/irda-utils/metadata.xml
new file mode 100644
index 000000000000..86b764ae9bc6
--- /dev/null
+++ b/net-wireless/irda-utils/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">irda</remote-id>
+ </upstream>
+</pkgmetadata>