Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 111820 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/app-misc/lirc/lirc-0.7.2.ebuild (-83 / +84 lines)
Lines 2-67 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.7.2.ebuild,v 1.1 2005/08/23 10:43:47 lanius Exp $
3
# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.7.2.ebuild,v 1.1 2005/08/23 10:43:47 lanius Exp $
4
4
5
inherit eutils linux-mod flag-o-matic
5
inherit eutils linux-mod flag-o-matic autotools
6
6
7
DESCRIPTION="LIRC is a package that allows you to decode and send infra-red \
7
DESCRIPTION="LIRC is a package that allows you to decode and send infra-red \
8
	signals of many (but not all) commonly used remote controls."
8
	signals of many (but not all) commonly used remote controls."
9
HOMEPAGE="http://www.lirc.org"
9
HOMEPAGE="http://www.lirc.org"
10
10
11
# LIRC_OPTS = ???? v
12
# This are the defaults. With this support for all supported remotes
13
# will be build.
14
# If you want other options then set the Environment variable to your needs.
15
16
# Note: If you don't specify the driver configure becomes interactiv.
17
18
# You have to know, which driver you want;
19
# --with-driver=X
20
21
# where X is one of:
22
# none, any, act200l, animax, atilibusb,
23
# atiusb, audio, avermedia, avermedia_vdomate,
24
# avermedia98, bestbuy, bestbuy2, breakoutbox,
25
# bte, caraca, chronos, comX,
26
# creative_infracd, dsp, cph03x, cph06x,
27
# creative, devinput, exaudio, flyvideo,
28
# gvbctv5pci, hauppauge, hauppauge_dvb,
29
# hercules_smarttv_stereo, igorplugusb, irdeo,
30
# irdeo_remote, irman, irreal, it87, knc_one,
31
# kworld, leadtek_0007, leadtek_0010,
32
# livedrive_midi, livedrive_seq, logitech,
33
# lptX, mceusb, mediafocusI, mp3anywhere,
34
# packard_bell, parallel, pcmak, pcmak_usb,
35
# pctv, pixelview_bt878, pixelview_pak,
36
# pixelview_pro, provideo, realmagic,
37
# remotemaster, sa1100, sasem, serial,
38
# silitek, sir, slinke, tekram, tekram_bt829,
39
# tira, tvbox, udp, uirt2, uirt2_raw"
40
# winfast_tv2000 is now leadtek_0010
41
# streamzap
42
43
# This could be usefull too
44
45
# --with-port=port	# port number for the lirc device.
46
# --with-irq=irq	# irq line for the lirc device.
47
# --with-timer=value	# timer value for the parallel driver
48
# --with-tty=file	# tty to use (Irman, RemoteMaster, etc.)
49
# --without-soft-carrier	# if your serial hw generates carrier
50
# --with-transmitter	# if you use a transmitter diode
51
52
SLOT="0"
11
SLOT="0"
53
LICENSE="GPL-2"
12
LICENSE="GPL-2"
54
IUSE="debug doc X"
13
IUSE="alsa debug doc X usb"
55
KEYWORDS="~x86 ~ppc ~alpha ~ia64 ~amd64 ~ppc64"
14
KEYWORDS="~x86 ~ppc ~alpha ~ia64 ~amd64 ~ppc64"
56
15
57
RDEPEND="virtual/libc
16
RDEPEND="virtual/libc
58
	X? ( virtual/x11 )"
17
	virtual/modutils
18
	sys-apps/coreutils
19
	alsa? ( media-libs/alsa-lib )
20
	usb? ( dev-libs/libusb )
21
	X? ( ||(	x11-libs/libX11
22
			x11-libs/libSM
23
			x11-libs/libICE )			
24
	virtual/x11 )"
59
25
60
DEPEND="virtual/linux-sources
26
DEPEND="${RDEPEND}
27
	sys-kernel/linux-headers
61
	sys-devel/autoconf
28
	sys-devel/autoconf
62
	${RDEPEND}"
29
	sys-devel/libtool"
30
31
#SRC_URI="mirror://sourceforge/lirc/${P/_pre/pre}.tar.bz2"
32
SRC_URI="http://lirc.sourceforge.net/software/snapshots/lirc-0.7.3pre1.tar.bz2"
33
34
S=${WORKDIR}/${P/_pre/pre}
63
35
64
SRC_URI="mirror://sourceforge/lirc/${P}.tar.bz2"
36
pkg_setup() {
37
	linux-mod_pkg_setup
38
	
39
	if [ "x${LIRC_OPTS}" = x ] ; then
40
		echo
41
		ewarn "By default this package will not compile a driver for your hardware"
42
		ewarn "unless you specify LIRC_OPTS. The best place to save this is in"
43
		ewarn "/etc/make.conf"
44
		ewarn "For example, PVR-x50 users should add the following to /etc/make.conf"
45
		ewarn "LIRC_OPTS=\"--with-driver=hauppauge\""
46
		echo
47
		ewarn "Possible options are listed below:"
48
		echo
49
		cat <<-EOF
50
# You have to know, which driver you want;
51
# --with-driver=X
52
53
# where X is one of:
54
# none, any, act200l, animax, atilibusb, atiusb, audio, avermedia, avermedia_vdomate,
55
# avermedia98, bestbuy, bestbuy2, breakoutbox, bte, caraca, chronos, comX,
56
# creative_infracd, dsp, cph03x, cph06x, creative, devinput, exaudio, flyvideo,
57
# gvbctv5pci, hauppauge, hauppauge_dvb, hercules_smarttv_stereo, igorplugusb, irdeo,
58
# irdeo_remote, irman, irreal, it87, knc_one, kworld, leadtek_0007, leadtek_0010,
59
# livedrive_midi, livedrive_seq, logitech, lptX, mceusb, mediafocusI, mp3anywhere,
60
# packard_bell, parallel, pcmak, pcmak_usb, pctv, pixelview_bt878, pixelview_pak,
61
# pixelview_pro, provideo, realmagic, remotemaster, sa1100, sasem, serial,
62
# silitek, sir, slinke, tekram, tekram_bt829, tira, tvbox, udp, uirt2, uirt2_raw
63
# winfast_tv2000 is now leadtek_0010, streamzap
64
65
# This could be useful too
66
67
# --with-port=port      # port number for the lirc device.
68
# --with-irq=irq        # irq line for the lirc device.
69
# --with-timer=value    # timer value for the parallel driver
70
# --with-tty=file       # tty to use (Irman, RemoteMaster, etc.)
71
# --without-soft-carrier        # if your serial hw generates carrier
72
73
# --with-port=port      # port number for the lirc device.
74
# --with-irq=irq        # irq line for the lirc device.
75
# --with-timer=value    # timer value for the parallel driver
76
# --with-tty=file       # tty to use (Irman, RemoteMaster, etc.)
77
# --without-soft-carrier        # if your serial hw generates carrier
78
# --with-transmitter    # if you use a transmitter diode
79
		EOF
80
		sleep 5
81
	fi
82
}
65
83
66
src_unpack() {
84
src_unpack() {
67
	unpack ${A}
85
	unpack ${A}
Lines 69-127 Link Here
69
	#epatch ${FILESDIR}/lirc-0.7.0-xbox.patch.bz2
87
	#epatch ${FILESDIR}/lirc-0.7.0-xbox.patch.bz2
70
88
71
	filter-flags -Wl,-O1
89
	filter-flags -Wl,-O1
72
	sed	-i -e "s:-O2 -g:${CFLAGS}:" configure configure.in
90
	sed -i -e 's:CFLAGS="-O2:CFLAGS=""\n#CFLAGS="-O2:' configure.in
73
91
74
	# fix bz878 compilation, bug #87505
92
	eautoreconf || "autoreconf failed"
75
	sed -i -e "s:lircd.conf.pixelview_bt878:lircd.conf.playtv_bt878:" configure configure.in
76
}
93
}
77
94
95
78
src_compile() {
96
src_compile() {
97
	get_version
98
79
	# set default configure options
99
	# set default configure options
80
	[ "x${LIRC_OPTS}" = x ] && [ "${PROFILE_ARCH}" == "xbox" ] && \
100
	[ "x${LIRC_OPTS}" = x ] && [ "${PROFILE_ARCH}" == "xbox" ] && \
81
		LIRC_OPTS="--with-driver=xboxusb"
101
		LIRC_OPTS="--with-driver=xboxusb"
82
	[ "x${LIRC_OPTS}" = x ] && LIRC_OPTS="--with-driver=serial \
102
	[ "x${LIRC_OPTS}" = x ] && LIRC_OPTS="--with-driver=none"
83
		--with-port=0x3f8 --with-irq=4"
84
103
85
	# remove parallel driver on SMP systems
104
	# remove parallel driver on SMP systems
86
	if linux_chkconfig_present SMP ; then
105
	if linux_chkconfig_present SMP ; then
87
		sed -i -e "s:lirc_parallel::" drivers/Makefile
106
		sed -i -e "s:lirc_parallel::" drivers/Makefile.in
88
	fi
107
	fi
89
108
90
	# Patch bad configure for /usr/src/linux
91
	libtoolize --copy --force || die "libtoolize failed"
92
	sed -si "s|/usr/src/kernel\-source\-\`uname \-r\` /usr/src/linux\-\`uname \-r\` ||" \
93
		acinclude.m4 aclocal.m4 configure || die "/usr/src/linux sed failed"
94
95
	get_version
96
	sed -si "s|\`uname \-r\`|${KV_FULL}|" configure configure.in setup.sh || \
97
		die "/lib/modules sed failed"
98
99
	unset ARCH
109
	unset ARCH
100
	export WANT_AUTOCONF=2.5
110
	export WANT_AUTOCONF=2.5
101
111
102
	econf \
112
	econf \
103
		--disable-manage-devices \
104
		--localstatedir=/var \
113
		--localstatedir=/var \
105
		--with-syslog=LOG_DAEMON \
114
		--with-syslog=LOG_DAEMON \
106
		--enable-sandboxed \
115
		--enable-sandboxed \
116
		--with-kerneldir=${ROOT}/usr/src/${KV_FULL} \
117
		--with-moduledir=${ROOT}/lib/modules/${KV_FULL}/misc \
107
		`use_enable debug` \
118
		`use_enable debug` \
108
		`use_with X` \
119
		`use_with X` \
109
		${LIRC_OPTS} || die "./configure failed"
120
		${LIRC_OPTS} || die "./configure failed"
110
121
111
	convert_to_m ${S}/Makefile
122
	emake || die "compile failed"
112
	emake || die
113
123
114
}
124
}
115
125
116
src_install() {
126
src_install() {
117
	make DESTDIR=${D} install || die
127
	make DESTDIR=${D} install || die "make install failed"
118
128
119
	exeinto /etc/init.d
129
	newinitd ${FILESDIR}/lircd lircd
120
	doexe ${FILESDIR}/lircd
130
	newinitd ${FILESDIR}/lircmd lircmd
121
	doexe ${FILESDIR}/lircmd
131
	newconfd ${FILESDIR}/lircd.conf lircd
122
123
	insinto /etc/conf.d
124
	newins ${FILESDIR}/lircd.conf lircd
125
132
126
	has_version sys-fs/udev && (
133
	has_version sys-fs/udev && (
127
		insinto /etc/udev/rules.d/;
134
		insinto /etc/udev/rules.d/;
Lines 135-153 Link Here
135
}
142
}
136
143
137
pkg_preinst() {
144
pkg_preinst() {
138
	cp ${ROOT}/etc/lircd.conf ${IMAGE}/etc
145
	[ -f "${ROOT}/etc/lircd.conf" ] && cp ${ROOT}/etc/lircd.conf ${IMAGE}/etc
139
}
146
}
140
147
141
pkg_postinst() {
148
pkg_postinst() {
142
	einfo
149
	linux-mod_pkg_postinst
150
	echo
143
	einfo "The lirc Linux Infrared Remote Control Package has been"
151
	einfo "The lirc Linux Infrared Remote Control Package has been"
144
	einfo "merged, please read the documentation, and if necessary"
152
	einfo "merged, please read the documentation at http://www.lirc.org"
145
	einfo "add what is needed to /etc/modules.autoload or"
153
	echo
146
	einfo "/etc/modules.d.  If you need special compile options"
147
	einfo "then read the comments at the begin of this"
148
	einfo "ebuild (source) and set the LIRC_OPTS environment"
149
	einfo "variable to your needs."
150
	einfo
151
152
	update_depmod
153
}
154
}

Return to bug 111820