diff options
Diffstat (limited to 'app-misc/lcd4linux')
-rw-r--r-- | app-misc/lcd4linux/Manifest | 2 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-r2.initd | 28 | ||||
-rw-r--r-- | app-misc/lcd4linux/lcd4linux-0.11.0_pre20170527-r2.ebuild | 186 |
3 files changed, 216 insertions, 0 deletions
diff --git a/app-misc/lcd4linux/Manifest b/app-misc/lcd4linux/Manifest index dc4736849d72..325da21ca114 100644 --- a/app-misc/lcd4linux/Manifest +++ b/app-misc/lcd4linux/Manifest @@ -1,5 +1,7 @@ AUX lcd4linux-r1.initd 775 BLAKE2B f1b4ee44d147e1ea191658edc2b7502acfc8d5a82e5b1af2deb74457cb3b20b32477d055cd24b7587019b711dfe55c7bb5dadd43d5a1d76d320e3ff6a2c19021 SHA512 471517952391880f3bcf85e21de56523ee40578fcf75b4e7256554498bbb691e8bbfe4add509d32dc99b409d7b7b3abd608a60326d883a43cb114b279a217213 +AUX lcd4linux-r2.initd 746 BLAKE2B a4e7ce0f6780fab205777c13c1e0dbe6d7d6a8b40c45995d248fd1553f4e967b59fba9e6a4c56a777e013693b743c7939b382dbe9bb1c3d856ca9ec23e1661be SHA512 8cc10e236dcf045f6da955fcbdfd1ecedf24cbe8a31dbb39c7b8830007de790e38b6af31549fa552cb35e63ed4ef75738b4b40f672ce05c72d28ec95c2580142 DIST lcd4linux-0.11.0_pre20170527.tar.bz2 478823 BLAKE2B 7b332e7262781dd0dc954a0576890dda78ecbeab9dc003d1d5b84a643ad522d57e32a04a2aa6fbe13b18e4699d07d88412e19c81739fafdf98ba327b151061a9 SHA512 c131b9cb04bb0ff4dc46c1e3ab8f5dcda309bbef89bcb670508f9afe7c515d6ccfe79a03782be4f4b2ba4aaf977cd13c0059805e5b7230216e39ee3421b0f143 EBUILD lcd4linux-0.11.0_pre20170527-r1.ebuild 5594 BLAKE2B 7833584b733ca61b452ae4786d29f0b10f1cbf463a1f845ff32a8a8b9977fc196adabb6a6d9335cda10231868d6e5ea79ec862509927bd2ac371cb97e92d4ab8 SHA512 6c44114cc4067457ef452fb5f9d80463056786ab36c467e9c13c98aecb98bce3cd1fa270a71d769006370640e3d3b9ede29368f600435cac5f5c74d455e38809 +EBUILD lcd4linux-0.11.0_pre20170527-r2.ebuild 5594 BLAKE2B 8c7741943295bab61cae7e2ec667b4c4c936248df0bba28ddea5b89bbe27b38312916db62c44a5f40e0918cfe5d209d0afec89ac2db50d4e6a9571e519c63422 SHA512 2ba802b021471bd0a36fa1a3b255dfabe7f93ed876a11d448597cdbd9fafb72f95a0d68a694ab00b8766cb53941be75eb17d5b8d4dd67eb035c8bad95971ab46 EBUILD lcd4linux-0.11.0_pre20170527.ebuild 5550 BLAKE2B d9488943d12768363e4fe26511e203856de5a7aa61d79c5668f3b39a7bd72b0b07486b90d2e15c277de8ef04a1b828ff6e77cfe6b8eee14a5a7af5c735ceb3cc SHA512 63191fa94067bf27955c830e24fe13c49b9217ef9eedbbd62fc1f0399c7242062696d076dbaff98fb9a0b33fab297fc94069ebae6610c0ad39467980d75f350c MISC metadata.xml 3555 BLAKE2B 507770da472d7befe06269d3b8ed52ca258467acb8d18892f47db3a630742c66f48f55f069c160ef0c889bc0fd31fbdd41b81fc6574ff4a51eea247373b8e25e SHA512 618885236669c7b9c28114d01f2f2f8c05638eb4eb85aca3d311d180cf82af01255f143ccdc0db2e890d42d2cb7fa3223638fcf4985d80322c95101e6c00e9fe diff --git a/app-misc/lcd4linux/files/lcd4linux-r2.initd b/app-misc/lcd4linux/files/lcd4linux-r2.initd new file mode 100644 index 000000000000..abed325fcfb9 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-r2.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +if [ "${SVCNAME}" = "lcd4linux" ]; then + config="/etc/lcd4linux/lcd4linux.conf" + name="LCD4Linux" + pidfile="/run/lcd4linux.pid" +else + config="/etc/lcd4linux/lcd4linux.${SVCNAME#lcd4linux.}.conf" + name="LCD4Linux (${SVCNAME#lcd4linux.})" + pidfile="/run/lcd4linux.${SVCNAME#lcd4linux.}.pid" +fi + +command="/usr/bin/lcd4linux" +command_args="-f ${config} -p ${pidfile}" +command_group="root" +command_user="root" + +start_pre() { + if [ ! -f "${config}" ]; then + eerror "Please create ${config} before starting LCD4Linux!" + return 1 + else + checkpath -f -m 600 -o "${command_user}:${command_group}" -q "${config}" + return 0 + fi +} diff --git a/app-misc/lcd4linux/lcd4linux-0.11.0_pre20170527-r2.ebuild b/app-misc/lcd4linux/lcd4linux-0.11.0_pre20170527-r2.ebuild new file mode 100644 index 000000000000..b13ecafe8c15 --- /dev/null +++ b/app-misc/lcd4linux/lcd4linux-0.11.0_pre20170527-r2.ebuild @@ -0,0 +1,186 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools flag-o-matic python-single-r1 + +DESCRIPTION="A small program that grabs information and displays it on an external LCD" +HOMEPAGE="https://lcd4linux.bulix.org/" +SRC_URI="https://www.bl4ckb0x.de/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dmalloc outb" +REQUIRED_USE=" + ?? ( lcd_devices_hd44780 lcd_devices_hd44780-i2c ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +# Define the list of valid lcd devices. +# Some drivers were removed from this list: +# - lcdlinux: It's an ancient driver, which needs app-misc/lcd-linux, that made it never to the portage tree. +# - lcdlinux: Besides, app-misc/lcd-linux won't compile on a modern linux kernel. +# - st2205: It's needs dev-libs/libst2205, which made it never to the portage tree and is quite outdated. +IUSE_LCD_DEVICES=( + ASTUSB BeckmannEgle BWCT CrystalFontz Curses Cwlinux D4D DPF EA232graphic EFN FutabaVFD + FW8888 G15 GLCD2USB HD44780 HD44780-I2C IRLCD LCD2USB LCDTerm LEDMatrix LPH7508 LUIse LW_ABP M50530 + MatrixOrbital MatrixOrbitalGX MilfordInstruments MDM166A Newhaven Noritake NULL Pertelian PHAnderson + PICGraphic picoLCD picoLCDGraphic PNG PPM RouterBoard Sample SamsungSPF serdisplib ShuttleVFD + SimpleLCD T6963 TeakLCM Trefon ULA200 USBHUB USBLCD VNC WincorNixdorf X11 +) + +# Define the list of valid lcd4linux plugins. +# Some plugins were removed from this list: +# - imon: Uses telmond, which is only available on a fli4l router or an eisfair server. +# - ppp: It has been replaced by the netdev plugin. +# - seti: SETI@home software was replaced by sci-misc/boinc, which is not compatible. +# - xmms: XMMS software was replaced by media-sound/xmms2, which is not compatible. +IUSE_LCD4LINUX_PLUGINS=( + apm asterisk button_exec cpuinfo dbus diskstats dvb exec event + fifo file gps hddtemp huawei i2c_sensors iconv isdn kvv + loadavg meminfo mpd mpris_dbus mysql netdev netinfo pop3 + proc_stat python qnaplog raspi sample statfs uname uptime + w1retap wireless +) + +# Add supported drivers from 'IUSE_LCD_DEVICES' to 'IUSE' and 'REQUIRED_USE' +REQUIRED_USE+=" || ( " +for LCD_DEVICE in "${IUSE_LCD_DEVICES[@]}"; do + LCD_DEVICE=${LCD_DEVICE,,} + IUSE+=" lcd_devices_${LCD_DEVICE} " + REQUIRED_USE+=" lcd_devices_${LCD_DEVICE} " +done +REQUIRED_USE+=" ) " +unset LCD_DEVICE + +# Add supported plugins from 'IUSE_LCD4LINUX_PLUGINS' to 'IUSE' and 'REQUIRED_USE' +IUSE+=" ${IUSE_LCD4LINUX_PLUGINS[*]} " +REQUIRED_USE+=" || ( ${IUSE_LCD4LINUX_PLUGINS[*]} ) " + +# Define dependencies for all drivers in 'IUSE_LCD_DEVICES' +DEPEND_LCD_DEVICES=" + lcd_devices_astusb? ( virtual/libusb:0= ) + lcd_devices_bwct? ( virtual/libusb:0= ) + lcd_devices_curses? ( sys-libs/ncurses:0= ) + lcd_devices_dpf? ( virtual/libusb:0= ) + lcd_devices_g15? ( virtual/libusb:0= ) + lcd_devices_glcd2usb? ( virtual/libusb:0= ) + lcd_devices_irlcd? ( virtual/libusb:0= ) + lcd_devices_lcd2usb? ( virtual/libusb:0= ) + lcd_devices_ledmatrix? ( virtual/libusb:0= ) + lcd_devices_luise? ( + dev-libs/luise-bin + virtual/libusb:0= + ) + lcd_devices_matrixorbitalgx? ( virtual/libusb:0= ) + lcd_devices_mdm166a? ( virtual/libusb:0= ) + lcd_devices_picolcd? ( virtual/libusb:0= ) + lcd_devices_picolcdgraphic? ( virtual/libusb:0= ) + lcd_devices_png? ( + media-libs/gd[png] + media-libs/libpng:0= + ) + lcd_devices_ppm? ( media-libs/gd ) + lcd_devices_samsungspf? ( virtual/libusb:0= ) + lcd_devices_serdisplib? ( dev-libs/serdisplib ) + lcd_devices_shuttlevfd? ( virtual/libusb:0= ) + lcd_devices_trefon? ( virtual/libusb:0= ) + lcd_devices_ula200? ( + dev-embedded/libftdi:1= + virtual/libusb:0= + ) + lcd_devices_usbhub? ( virtual/libusb:0= ) + lcd_devices_usblcd? ( virtual/libusb:0= ) + lcd_devices_vnc? ( net-libs/libvncserver ) + lcd_devices_x11? ( x11-libs/libX11 ) +" + +# Define dependencies for all plugins in 'IUSE_LCD4LINUX_PLUGINS' +DEPEND_LCD4LINUX_PLUGINS=" + asterisk? ( net-misc/asterisk ) + dbus? ( sys-apps/dbus ) + gps? ( dev-libs/nmeap ) + hddtemp? ( app-admin/hddtemp ) + iconv? ( virtual/libiconv ) + mpd? ( media-libs/libmpd ) + mpris_dbus? ( sys-apps/dbus ) + mysql? ( + || ( + dev-db/mariadb-connector-c + dev-db/mysql-connector-c + ) + ) + python? ( ${PYTHON_DEPS} ) + wireless? ( + || ( + net-wireless/iw + net-wireless/wireless-tools + ) + ) +" + +RDEPEND=" + dmalloc? ( dev-libs/dmalloc ) + ${DEPEND_LCD_DEVICES} + ${DEPEND_LCD4LINUX_PLUGINS}" + +DEPEND="${RDEPEND}" + +pkg_setup() { + if use python; then + python-single-r1_pkg_setup + fi +} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + # Enable all users enabled lcd devices + local myeconfargs_lcd_devices + for lcd_device in "${IUSE_LCD_DEVICES[@]}"; do + if use "lcd_devices_${lcd_device,,}"; then + myeconfargs_lcd_devices+=",${lcd_device}" + fi + done + + # Enable all users enabled lcd4linux plugins + local myeconfargs_lcd4linux_plugins + for lcd4linux_plugin in "${IUSE_LCD4LINUX_PLUGINS[@]}"; do + if use "${lcd4linux_plugin}"; then + myeconfargs_lcd4linux_plugins+=",${lcd4linux_plugin}" + fi + done + + local myeconfargs=( + --disable-rpath + $(use_with dmalloc) + $(use_with outb) + $(use_with python) + $(use_with lcd_devices_x11 x) + --with-drivers="${myeconfargs_lcd_devices#,}" + --with-plugins="${myeconfargs_lcd4linux_plugins#,}" + --x-include="/usr/include" + --x-libraries="/usr/$(get_libdir)" + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # Install sample config, and must have 600, as lcd4linux checks this. + insinto /etc/lcd4linux + insopts -m 0600 + doins lcd4linux.conf.sample + + newinitd "${FILESDIR}/lcd4linux-r2.initd" lcd4linux +} |