1 |
commit: 67634e37a1c9647fa1b31e51d8c4d3a5b7402077 |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 26 17:26:50 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 26 17:27:45 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67634e37 |
7 |
|
8 |
app-misc/lcd4linux: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
.../lcd4linux/files/lcd4linux-0.10.1_rc2.initd | 4 +- |
15 |
app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild | 175 +++++++++++++++++++++ |
16 |
2 files changed, 177 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd |
19 |
index 1e8be0c..ea7829d 100644 |
20 |
--- a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd |
21 |
+++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2.initd |
22 |
@@ -1,5 +1,5 @@ |
23 |
-#!/sbin/runscript |
24 |
-# Copyright 1999-2007 Gentoo Foundation |
25 |
+#!/sbin/openrc-run |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
# $Id$ |
29 |
|
30 |
|
31 |
diff --git a/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..ca611b3 |
34 |
--- /dev/null |
35 |
+++ b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r4.ebuild |
36 |
@@ -0,0 +1,175 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=5 |
42 |
+PYTHON_COMPAT=( python2_7 ) |
43 |
+WANT_AUTOMAKE="1.9" |
44 |
+inherit eutils multilib autotools python-single-r1 |
45 |
+ |
46 |
+MY_P=${P/_rc/-RC} |
47 |
+ |
48 |
+DESCRIPTION="Shows system and ISDN information on an external display or in a X11 window" |
49 |
+HOMEPAGE="http://ssl.bulix.org/projects/lcd4linux" |
50 |
+SRC_URI="mirror://gentoo/${MY_P}.tar.gz" |
51 |
+ |
52 |
+LICENSE="GPL-2" |
53 |
+SLOT="0" |
54 |
+KEYWORDS="amd64 ppc x86" |
55 |
+ |
56 |
+IUSE="mysql python iconv mpd" |
57 |
+ |
58 |
+# The following array holds the USE_EXPANDed keywords |
59 |
+IUSE_LCD_DEVICES=(beckmannegle bwct cfontz ncurses cwlinux |
60 |
+ ea232 g15 hd44780 hd44780i2c lcd2usb |
61 |
+ lcdlinux lcdterm ledmatrix lph7508 m50530 |
62 |
+ mtxorb milfordbpk noritake null picolcd |
63 |
+ png ppm routerboard serdisplib simplelcd |
64 |
+ t6963 trefon usbhub usblcd wincor |
65 |
+ X luise) |
66 |
+ |
67 |
+# Iterate through the array and add the lcd_devices_* that we support |
68 |
+NUM_DEVICES=${#IUSE_LCD_DEVICES[@]} |
69 |
+index=0 |
70 |
+while [ "${index}" -lt "${NUM_DEVICES}" ] ; do |
71 |
+ IUSE="${IUSE} lcd_devices_${IUSE_LCD_DEVICES[$index]}" |
72 |
+ let "index = ${index} + 1" |
73 |
+done |
74 |
+ |
75 |
+DEPEND=" |
76 |
+ mysql? ( virtual/mysql ) |
77 |
+ iconv? ( virtual/libiconv ) |
78 |
+ mpd? ( media-libs/libmpd ) |
79 |
+ |
80 |
+ lcd_devices_bwct? ( =virtual/libusb-0* ) |
81 |
+ lcd_devices_g15? ( =virtual/libusb-0* ) |
82 |
+ lcd_devices_lcd2usb? ( =virtual/libusb-0* ) |
83 |
+ lcd_devices_picolcd? ( =virtual/libusb-0* ) |
84 |
+ lcd_devices_trefon? ( =virtual/libusb-0* ) |
85 |
+ lcd_devices_usbhub? ( =virtual/libusb-0* ) |
86 |
+ lcd_devices_usblcd? ( =virtual/libusb-0* ) |
87 |
+ lcd_devices_luise? ( dev-libs/luise-bin ) |
88 |
+ lcd_devices_ncurses? ( sys-libs/ncurses ) |
89 |
+ lcd_devices_noritake? ( media-libs/gd ) |
90 |
+ lcd_devices_t6963? ( media-libs/gd ) |
91 |
+ lcd_devices_png? ( media-libs/libpng media-libs/gd ) |
92 |
+ lcd_devices_X? ( x11-libs/libX11 media-libs/gd ) |
93 |
+ lcd_devices_serdisplib? ( dev-libs/serdisplib media-libs/gd ) |
94 |
+" |
95 |
+RDEPEND="${DEPEND} |
96 |
+ python? ( ${PYTHON_DEPS} ) |
97 |
+" |
98 |
+ |
99 |
+S="${WORKDIR}/${MY_P}" |
100 |
+ |
101 |
+pkg_setup() { |
102 |
+ elog "If you wish to compile only specific plugins, please use" |
103 |
+ elog "the LCD4LINUX_PLUGINS environment variable. Plugins must be comma separated and can be either of:" |
104 |
+ elog "apm cpuinfo diskstats dvb exec file i2c_sensors imon isdn kvv loadavg meminfo netdev pop3 ppp proc_stat seti statfs uname uptime wireless" |
105 |
+ |
106 |
+ use python && python-single-r1_pkg_setup |
107 |
+} |
108 |
+ |
109 |
+src_prepare() { |
110 |
+ epatch "${FILESDIR}/${P}-warnings.patch" |
111 |
+ epatch "${FILESDIR}/${P}-mpd.patch" |
112 |
+ epatch "${FILESDIR}/${P}-nordtsc.patch" |
113 |
+ epatch "${FILESDIR}/${P}-autoconf-2.65.patch" |
114 |
+ epatch "${FILESDIR}/${P}-missing-header.patch" |
115 |
+ epatch "${FILESDIR}/${P}-usbdebug.patch" |
116 |
+ eautoreconf |
117 |
+} |
118 |
+ |
119 |
+src_configure() { |
120 |
+ # This array contains the driver names required by configure --with-drivers= |
121 |
+ # The positions must be the same as the corresponding use_expand flags |
122 |
+ local DEVICE_DRIVERS=(BeckmannEgle BWCT CrystalFontz Curses Cwlinux |
123 |
+ EA232graphic G15 HD44780 HD44780-I2C LCD2USB |
124 |
+ LCDLinux LCDTerm LEDMatrix LPH7508 M50530 |
125 |
+ MatrixOrbital MilfordInstruments Noritake NULL picoLCD |
126 |
+ PNG PPM RouterBoard serdisplib SimpleLCD |
127 |
+ T6963 Trefon USBHUB USBLCD WincorNixdorf |
128 |
+ X11 LUIse) |
129 |
+ |
130 |
+ local myconf myp |
131 |
+ |
132 |
+ # plugins |
133 |
+ if [ -n "$LCD4LINUX_PLUGINS" ]; then |
134 |
+ myp="$LCD4LINUX_PLUGINS" |
135 |
+ else |
136 |
+ myp="all,!xmms" |
137 |
+ fi |
138 |
+ use iconv || myp="${myp},!iconv" |
139 |
+ use mpd || myp="${myp},!mpd" |
140 |
+ use mysql || myp="${myp},!mysql" |
141 |
+ use python || myp="${myp},!python" |
142 |
+ elog "Active plugins: ${myp}" |
143 |
+ |
144 |
+ # Generate comma separated list of drivers |
145 |
+ local COMMA_DRIVERS |
146 |
+ local FIRST_DRIVER |
147 |
+ local index=0 |
148 |
+ local driver |
149 |
+ |
150 |
+ while [ "${index}" -lt "${NUM_DEVICES}" ] ; do |
151 |
+ if use "lcd_devices_${IUSE_LCD_DEVICES[$index]}" ; then |
152 |
+ driver=${DEVICE_DRIVERS[$index]} |
153 |
+ if [ -z ${COMMA_DRIVERS} ] ; then |
154 |
+ # First in the list |
155 |
+ COMMA_DRIVERS="${driver}" |
156 |
+ FIRST_DRIVER="${driver}" |
157 |
+ else |
158 |
+ # Second, third, ... include a comma at the front |
159 |
+ COMMA_DRIVERS="${COMMA_DRIVERS},${driver}" |
160 |
+ fi |
161 |
+ fi |
162 |
+ let "index = ${index} + 1" |
163 |
+ done |
164 |
+ |
165 |
+ # activate at least one driver |
166 |
+ if [ -z ${COMMA_DRIVERS} ] ; then |
167 |
+ COMMA_DRIVERS="NULL" |
168 |
+ fi |
169 |
+ |
170 |
+ # workaround the build failing because of b0rked settings |
171 |
+ if use lcd_devices_hd44780 && use lcd_devices_hd44780i2c ; then |
172 |
+ echo |
173 |
+ ewarn "Disabling hd44780 LCD_DEVICE as hd44780i2c is set!" |
174 |
+ echo |
175 |
+ COMMA_DRIVERS="${COMMA_DRIVERS},!HD44780" |
176 |
+ fi |
177 |
+ |
178 |
+ # avoid package brokenness |
179 |
+ if use lcd_devices_X ; then |
180 |
+ myconf="--x-libraries=/usr/$(get_libdir) --x-include=/usr/include" |
181 |
+ else |
182 |
+ myconf="--without-x" |
183 |
+ fi |
184 |
+ |
185 |
+ econf \ |
186 |
+ --sysconfdir=/etc/lcd4linux \ |
187 |
+ --with-drivers="${COMMA_DRIVERS}" \ |
188 |
+ --with-plugins="${myp}" \ |
189 |
+ $(use_with python) \ |
190 |
+ ${myconf} |
191 |
+ |
192 |
+ sed -i.orig -e 's/-L -lX11/ -lX11 /g' Makefile || die "sed fixup failed" |
193 |
+} |
194 |
+ |
195 |
+src_install() { |
196 |
+ default |
197 |
+ |
198 |
+ newinitd "${FILESDIR}/${P}.initd" ${PN} |
199 |
+ |
200 |
+ insinto /etc |
201 |
+ insopts -o root -g root -m 0600 |
202 |
+ newins lcd4linux.conf.sample lcd4linux.conf |
203 |
+} |
204 |
+ |
205 |
+pkg_postinst() { |
206 |
+ if use lcd_devices_lcdlinux; then |
207 |
+ ewarn "To actually use the lcd-linux devices, you will need to install the lcd-linux kernel module." |
208 |
+ ewarn "You can either do that yourself, see http://lcd-linux.sf.net or " |
209 |
+ ewarn "checkout https://overlays.gentoo.org/dev/jokey/browser/trunk and emerge app-misc/lcd-linux" |
210 |
+ fi |
211 |
+} |