diff options
Diffstat (limited to 'net-wireless/irda-utils')
17 files changed, 707 insertions, 0 deletions
diff --git a/net-wireless/irda-utils/Manifest b/net-wireless/irda-utils/Manifest new file mode 100644 index 000000000000..808ce66d3d6e --- /dev/null +++ b/net-wireless/irda-utils/Manifest @@ -0,0 +1,19 @@ +AUX irda-setup.sh 1637 SHA256 4392d4f26cec016fec315ab5090720633f736f4ee12ab80087ae5b77a612fc2c SHA512 662d328b1b117b7fda29d76a2b41b074fd571f9096c25b58e50ffe4b2bc39e6dd0fd10f10cb33d8ac169a9c7528d0438a513ee94c60615e6a01c9847be35beae WHIRLPOOL c4f58637a8f5c1c08fd5a4db524dce0d0714d3b8618030e347d5ac74bdd47cdd7fa9e52603e928da77ba3ed3e6632d3f68e02daf2cc8f52b1f4a3a7ff0231fc0 +AUX irda-usb.sh 1287 SHA256 3a7189528975249d1701e833f68f301d011150b3b7c0ff1e795bbffc0cf5fecf SHA512 f8fadaed51f72e13d6693aabc273408bb4d602972d04ce2c0eb71f68e626a6beea2534476aeaedc126970099701922ad38322117e66859be2d5f916ae7015936 WHIRLPOOL ffcaea22c2a254afa3ded6a33c2e96527e3daeea73b60ef10ac5482db1c5e258c8f774232d8747acab05cdbdb82a902c08412780adea419f0fd592d5389c0fb0 +AUX irda-utils-0.9.18-asneeded.patch 451 SHA256 f2a793a5941acf88317d896948f166fb2f52273374e724f22301ebbc7906a665 SHA512 5de17c6f8be2572770694a073fabb9b332345dd91ef9bb9d9ca2e3abb71c8c873c19fbae15c69ca5700e2d090586b8267df88ea30e1cf74a11d28c59a7219c72 WHIRLPOOL 4812bc73e058c77c468e279f80ba448ab4e6602cc8866d62c4435048f12d6e74c7b5e78aa8059d199a4705d3d0b39d4ca9b2852b115e5232b28647b5b7d71bc2 +AUX irda-utils-0.9.18-dofail.patch 770 SHA256 206deac43962b8240a1d1b898aac91418204c5deec8bd2a11c778bed01926b75 SHA512 f332bf54b8ddae349c6695e9e7f970e38a0a6afcf57e2aa8eac29e0e0fb00cb8c8e5d9c40002ccaa97cea6f67c7fe2ac392e68dc8aeeaa657f962c41dd8c4b33 WHIRLPOOL 952e5cfa38611c52567673721d70b9ff9be20ce2c81de48108857179aae80d450ce54d215f25e3bd13a3a2c9b501e03725ccaa31d2317a150153d84fef6d163f +AUX irda-utils-0.9.18-headers.patch 370 SHA256 ce86031e90370bef154bd5079064ba5f9e73c532e474e13f111c37caebda2cfb SHA512 2bdc43a0ea24d06d33f480a5840e9b73170db28d4f984eb473513132b48760c81562ebc3d44620130ed4254d399f6b9a7153e2302f42ed62a6ea1218ec4efeaa WHIRLPOOL bb7466abcdcc76e88343da37f973c3a27ca5f4ccbf7f1cd755c1cd50ee0b80b037647529e424de0e2d68974dac0b1ebbdde597ec4a839f5590ed36c75a8dac1a +AUX irda-utils-0.9.18-io.h.diff 1604 SHA256 41ad319946969d3ef3951894433420203666924d97c50acf571f89bd79adde99 SHA512 2dabf90735ca436d6214e24d14e32cf4588018dda2a7f189c49a23b9aa9c95a86277b08abb0cd4e3690238451193af6b5c5889ef1664e1e03a92d6c40db57cf6 WHIRLPOOL 5f901324c4bc67b64882e1a8040fbef9dd4303dd995dac63425a6e63f83b13f7aae91849686b43e9206b6426233884bb980d59f352e18f7cfc490125e8a41442 +AUX irda-utils-0.9.18-ldflags.patch 4537 SHA256 d89aafeaa0d7e19d0c8b9d35136ec298a864463d1ea0ca2a84d410727e57b3a2 SHA512 441a60b5d91caed0b5175a563f12cf64ab774276fec7277d7a15c63ac8063067200afdabe69c7799c2f64c82a4376471634d8d6ce62b6e514b0556106f643307 WHIRLPOOL d4ddf0c14274c5ed8e1463b0c7ef196ab77b35dc75fd395b1a00fa7e83fb83fd605a7ec8d77de847beff83b9ca306ddbd3ec25781e18b2e8ed95e5d613bf163b +AUX irda-utils-0.9.18-makefile.diff 298 SHA256 1ed15399f8b1b8bb92b0c7b7e263030382a8b9b743bcfcaf86e5babdb31c0174 SHA512 53f95bc93f66cf65c2dedcbcab2feb7b6de789df18ab0441f3ae0395eaa061a2187672c874e5c85b77589fae11bb8d778095cb9971f0fb6569997ca5396fdf6d WHIRLPOOL 1832344850cd9b552596b5ee3e07392740394b3c921560343e6029b5c4d46a7c2de97e6ceafa7fbe672775451fa133007a62bff8aac64698b43580465ddff1a6 +AUX irda-utils-0.9.18-smcinit.diff 545 SHA256 23f7344d0eeceac8db731b1bbbccae7e2a839d1ca6844f38f307c7e5e3639f3e SHA512 da1103a4a5197bd73e2771782e3f6cbe73203c90c6b404f5b8628ae3fbf3632f279edfae5544b6359e06043792d3e6133ab7cb2c2883e1ea971430620770d4de WHIRLPOOL d563e442012ef943d70b7597d78434026c5085e8d7efdfbd97ef8c98a5ad85a2cf4be7cf281a4ed9a542e35ae7af48e91620d480d1cd2a93ab1f36fb96812cf7 +AUX irda-utils-rh1.patch 444 SHA256 725cd43b05dfc9f05f49ee8d3a81050d3421639c8440092c4d9bed5de1c31b30 SHA512 ec52619c6157550dd53458f7d4c330d00f78a79c574a31ea555562ca865711cf291d37641aea8fa1b006d320f5c2930a5e00eb8a0d6bb788f053f845cbd8dd6d WHIRLPOOL 604d63db7508483a819e3f8f95adca39370b9cef7b759b70eeafe3d470685bdff6cd1bd62a812bcf5898cc2e3b88468a06532e17565a8115335458fa870c16e5 +AUX irda.confd 1087 SHA256 2c89b7884c7626919292c3b27f2a6f153239949d4bc9a1a4f8ddeaa0252cac39 SHA512 08391d36d2ff752f61e9afb6fc31a74e07df78efcf18a737fadd6b982b6f06dea3e482f1e37324c28240efb540f6d1bd7663c1e0664a1221c40dacebb01d34cc WHIRLPOOL 37c8bf28e185094450d4d700b3a06581cb0373897ec81e6a2cdbe19ebb403c41b1db6bb0586be21d9c520a57e5a711e32be3624ff2fc8ab57b60e4c33cf62d5e +AUX irda.initd 1885 SHA256 4c0ad9bb4e97470b2e1e272e49b8072b4e5e494ce946f65c33a5aa06f137288d SHA512 03c2c37e4104ad93edb8df755c517b33bc070770f6b71fac691c8d3d3eb733b3c5a4fcb5015d4a94461465a663185e5ea79368468bbe1fd5e7d5515a9d74bffd WHIRLPOOL d1b312ae1e3bef438f446918f9e45c3dc250acd29ffc7a841fd23fbf9b6465e6536ba5c154b94f1bb156425363a2db3cd09c65a1373a69bb5d2f71252ca721c1 +AUX irda.modsd 1976 SHA256 60043436833312f0756ea901cd18469015c793f208708be5fb1b9e012cacc8ef SHA512 b71eae4742ab0656ce45d570de6a461bddb7f547847efa887f2420cdfa809b2548aab61c49b50fc713ab9f3537cbae07c62938ebfb3092dadd6dda0b267258d2 WHIRLPOOL bf190e521db140eff0411e9de17067f7acf79a71e55ee3806384a5b0781e73046579975a18ed9463321bbc9ceddbbdff3a1b9e6f79a935a536600953beae780e +AUX irda.rules 683 SHA256 bdd65537e3cf460d750d595aeee06f52ca292ea6ac68e74784f8defb64dc9202 SHA512 d73aaa394447191d782661ee2a3f9333aa46838721958959d7732265a1608482a431c6b83218b68ac45ccbeafe96d95d9ec616d423f91aa6dc858f5709b0f0dd WHIRLPOOL d7514576e87cc36499a45d11a2d51b5611e7e6de1495bf190213af118f4fe8c8a71d3b5175a1e2be710f24a571b1e90c7098b6e7b670267daac903957564c976 +DIST irda-utils-0.9.18.tar.gz 168390 SHA256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6 SHA512 493360b5c03f93063265663b86c8ef3ade714c51edf804390c4e713cb0aeea204c5cd06c8ceffb99b1531fca7272422e53d52e03b66ddc4bceb5503f4ab5f3ad WHIRLPOOL 8282478bb9f96eb4def9f60bd7db9d6471b65bcddbb9ff6d4a63698940cc6a11062541ff2f3619d6f11928aedd172053d424698288e7a2bce9f13119078d83a6 +EBUILD irda-utils-0.9.18-r6.ebuild 2883 SHA256 b86c67732c222c568d7ff51ca1fd1797745322414a3de0448ecb01ae08b49401 SHA512 d7927c80e0fd5f8fb3180d085f2496b6460da4878fbdeffa357dd2d677cc989952600bce160375d07d0e0816db328a96ec92236e071b37318330b6d179030475 WHIRLPOOL 0b49ee8750a3fecfece732e1f2fd90a9399958a4f6bc5943123ebc0a3eb546cdb747b11d8af5c4ae4616aeb4ba2563b4415bd87affda72c33a80109b6e3a967e +MISC ChangeLog 4585 SHA256 4df6ac9f9003e394bd0a0d8fe1e93f130fb308baabf7d710ef032aad8ed27efe SHA512 43957c408467b92955162490bf7990ff028ddb77c9fe51fea94a2d73c44da9875b93b3c2d13aad09184c14ae87314019d6b2d8ce9629e4854a58f246ce2047d7 WHIRLPOOL 939cbc38b71f39ee9033c3eb8c3fa7a77430b124f90e8fca9cc65bc255d3974fe8acdeac68af06e05a74631d3f9a3b649191b52c21f141c3a4dad3476f47928f +MISC ChangeLog-2015 9062 SHA256 5edb2c461c664d43e58e5c17d306413f500de8565903f4460bf6657ae373e10a SHA512 e446b22a9569850de2d9e01c1ce0046261d7ac712df3d2328ab1e1d812f29203d34f547ee82f2b5d63b4d3c341c8907cfb98187c157a6210034111e9702f4411 WHIRLPOOL be68fdd319b1c5eeb7c5a30c94f6c6dca5d1e7e60f2f8749f7a29752c526a690a7f0a6f3a00dd4d72355ae37528b183f0291b1a7887a1412d972a72a9eab23ca +MISC metadata.xml 241 SHA256 d9969b9381a23f83d7393718f1f33cf536b1ad523c8119925b8b283cd3dc7f8e SHA512 8ee0154954d4a045299b6b948a8fa6fcd63e6457dd675837f38935b31adb868d8519aea90d7fb0f7bcfa6024d194abcfbf0c542626ff222252796956f8eef654 WHIRLPOOL 08141ab2a866d1f3257da5d26eb2205e09c0c04977beb25819b4328deb4217c115c7eaa3237ca334474b83b967a0dfc29f1e7130ad71a1631d3f8bf72e2fe70c 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..b678e6d6be44 --- /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 + +--- irda-utils-0.9.18/irdadump/Makefile ++++ irda-utils-0.9.18/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..a9814b3167ad --- /dev/null +++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-headers.patch @@ -0,0 +1,11 @@ +--- irda-utils-0.9.18/tekram/Makefile.orig 2010-11-02 22:41:43.000000000 +0100 ++++ irda-utils-0.9.18/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..bd4936259dc7 --- /dev/null +++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff @@ -0,0 +1,14 @@ +--- irda-utils-0.9.18/smcinit/smcinit.c.orig 2006-07-11 08:16:06.000000000 +0200 ++++ irda-utils-0.9.18/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..a66ac39ae276 --- /dev/null +++ b/net-wireless/irda-utils/files/irda.initd @@ -0,0 +1,85 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +# 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-r6.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r6.ebuild new file mode 100644 index 000000000000..63f5b009aebe --- /dev/null +++ b/net-wireless/irda-utils/irda-utils-0.9.18-r6.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs 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 +" + +PATCHES=( + "${FILESDIR}/${PN}-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" +) + +src_prepare() { + # TODO: switch to 'default' once udev.eclass is EAPI=6 clean + epatch -p1 "${PATCHES[@]}" + + append-flags "-fno-strict-aliasing" # bug???? + + # fix Bug 570488 by restoring pre-GCC5 inline semantics + append-cflags -std=gnu89 + + # 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 +} + +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..4a5b5a44c39b --- /dev/null +++ b/net-wireless/irda-utils/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="sourceforge">irda</remote-id> + </upstream> +</pkgmetadata> |