[packages] lcd4linux: rework drivers/plugins configuration and dependencies (closes...
authorNicolas Thill <nico@openwrt.org>
Thu, 15 Apr 2010 22:58:05 +0000 (22:58 +0000)
committerNicolas Thill <nico@openwrt.org>
Thu, 15 Apr 2010 22:58:05 +0000 (22:58 +0000)
SVN-Revision: 20891

utils/lcd4linux/Config.in
utils/lcd4linux/Makefile

index 99f0387..03d1393 100644 (file)
+config LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       bool
+
+config LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       bool
+
+config LCD4LINUX_NEEDS_libdbus
+       bool
+       select PACKAGE_libdbus
+
+#config LCD4LINUX_NEEDS_libftdi
+#      bool
+#      select PACKAGE_libftdi
+
+config LCD4LINUX_NEEDS_libgd
+       bool
+       select PACKAGE_libgd
+       default y if !LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
+config LCD4LINUX_NEEDS_libiconv
+       bool
+       select PACKAGE_libiconv
+
+config LCD4LINUX_NEEDS_libmysqlclient
+       bool
+       select PACKAGE_libmysqlclient
+
+config LCD4LINUX_NEEDS_libncurses
+       bool
+       select PACKAGE_libncurses
+
+config LCD4LINUX_NEEDS_libnmeap
+       bool
+       select PACKAGE_libnmeap
+
+config LCD4LINUX_NEEDS_libsqlite3
+       bool
+       select PACKAGE_libsqlite3
+
+config LCD4LINUX_NEEDS_libusb
+       bool
+       select PACKAGE_libusb
+
+config LCD4LINUX_NEEDS_libvncserver
+       bool
+       select PACKAGE_libvncserver
+
+#config LCD4LINUX_NEEDS_libX11
+#      bool
+#      select PACKAGE_libX11
+
+config LCD4LINUX_NEEDS_ppp
+       bool
+       select PACKAGE_ppp
+
+config LCD4LINUX_NEEDS_python
+       bool
+       select PACKAGE_python
+
+config LCD4LINUX_NEEDS_serdisplib
+       bool
+       select PACKAGE_serdisplib
+
+config LCD4LINUX_NEEDS_st2205tool
+       bool
+       select PACKAGE_st2205tool
+
+
 comment "LCD4Linux Drivers ---"
 
+comment "WARNING: no drivers selected, the 'Sample' driver will be used !!!"
+       depends !LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
 config LCD4LINUX_DRV_BeckmannEgle
        bool
        prompt "BeckmannEgle"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_BWCT
        bool
        prompt "BWCT"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_CrystalFontz
        bool
        prompt "CrystalFontz"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_Curses
        bool
        prompt "Curses"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libncurses
 
 config LCD4LINUX_DRV_Cwlinux
        bool
        prompt "Cwlinux"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_D4D
        bool
        prompt "D4D"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
+config LCD4LINUX_DRV_EA232graphic
+       bool
+       prompt "EA232graphic"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_G15
        bool
        prompt "G15"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_GLCD2USB
        bool
        prompt "GLCD2USB"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_HD44780
        bool
        prompt "HD44780"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       depends BROKEN
+
+config LCD4LINUX_DRV_HD44780-I2C
+       bool
+       prompt "HD44780-I2C"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       depends BROKEN
 
 config LCD4LINUX_DRV_IRLCD
        bool
        prompt "IRLCD"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_LCD2USB
        bool
        prompt "LCD2USB"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_LCDLinux
        bool
        prompt "LCDLinux"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       depends BROKEN
 
 config LCD4LINUX_DRV_LCDTerm
        bool
        prompt "LCDTerm"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
+config LCD4LINUX_DRV_LEDMatrix
+       bool
+       prompt "LEDMatrix"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_LPH7508
        bool
        prompt "LPH7508"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_LUIse
        bool
        prompt "LUIse"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       #select LCD4LINUX_NEEDS_libluise
+       depends BROKEN
+
+config LCD4LINUX_DRV_LW_ABP
+       bool
+       prompt "LW_ABP"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_M50530
        bool
        prompt "M50530"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_MatrixOrbital
        bool
        prompt "MatrixOrbital"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_MatrixOrbitalGX
        bool
        prompt "MatrixOrbitalGX"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_MilfordInstruments
        bool
        prompt "MilfordInstruments"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_Noritake
        bool
        prompt "Noritake"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_NULL
        bool
        prompt "NULL"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
        default y
 
-config LCD4LINUX_DRV_PNG
-       bool
-       prompt "PNG"
-
-config LCD4LINUX_DRV_PPM
-       bool
-       prompt "PPM"
-
 config LCD4LINUX_DRV_Pertelian
        bool
        prompt "Pertelian"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_PHAnderson
        bool
        prompt "PHAnderson"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
+config LCD4LINUX_DRV_PICGraphic
+       bool
+       prompt "PICGraphic"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_picoLCD
        bool
        prompt "picoLCD"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_picoLCDGraphic
        bool
        prompt "picoLCDGraphic"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       select LCD4LINUX_NEEDS_libusb
+
+config LCD4LINUX_DRV_PNG
+       bool
+       prompt "PNG"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+
+config LCD4LINUX_DRV_PPM
+       bool
+       prompt "PPM"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_RouterBoard
        bool
-       depends on TARGET_rb532
        prompt "RouterBoard"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       depends on TARGET_rb532
 
 config LCD4LINUX_DRV_serdisplib
        bool
        prompt "serdisplib"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       select LCD4LINUX_NEEDS_serdisplib
 
 config LCD4LINUX_DRV_ShuttleVFD
        bool
        prompt "ShuttleVFD"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_SimpleLCD
        bool
        prompt "SimpleLCD"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
 
 config LCD4LINUX_DRV_st2205
        bool
        prompt "st2205"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
+       select LCD4LINUX_NEEDS_st2205tool
 
 config LCD4LINUX_DRV_T6963
        bool
        prompt "T6963"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libgd
 
 config LCD4LINUX_DRV_Trefon
        bool
        prompt "Trefon"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
-config LCD4LINUX_DRV_USBLCD
-       bool
-       prompt "USBLCD"
+#config LCD4LINUX_DRV_ULA200
+#      bool
+#      prompt "ULA200"
+#      select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+#      select LCD4LINUX_NEEDS_libftdi
+#      select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_USBHUB
        bool
        prompt "USBHUB"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
-config LCD4LINUX_DRV_ULA200
+config LCD4LINUX_DRV_USBLCD
        bool
-       prompt "ULA200"
+       prompt "USBLCD"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libusb
 
 config LCD4LINUX_DRV_VNC
        bool
        prompt "VNC"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+       select LCD4LINUX_NEEDS_libvncserver
 
 config LCD4LINUX_DRV_WincorNixdorf
        bool
        prompt "WincorNixdorf"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+
+#config LCD4LINUX_DRV_X11
+#      bool
+#      prompt "X11"
+#      select LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER
+#      select LCD4LINUX_NEEDS_libgd
+#      select LCD4LINUX_NEEDS_libX11
 
-config LCD4LINUX_DRV_X11
-       bool
-       prompt "X11"
 
 comment "LCD4Linux Plugins ---"
 
+comment "WARNING: no plugins selected, the 'sample' plugin will be used !!!"
+       depends !LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+
 config LCD4LINUX_PLUGIN_apm
        bool
        prompt "apm"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_asterisk
        bool
        prompt "asterisk"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_button_exec
        bool
        prompt "button_exec"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_cpuinfo
        bool
        prompt "cpuinfo"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       default y
+
+config LCD4LINUX_PLUGIN_dbus
+       bool
+       prompt "dbus"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libdbus
 
 config LCD4LINUX_PLUGIN_diskstats
        bool
        prompt "diskstats"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_dvb
        bool
        prompt "dvb"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+
+config LCD4LINUX_PLUGIN_event
+       bool
+       prompt "event"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_exec
        bool
        prompt "exec"
-
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       
 config LCD4LINUX_PLUGIN_fifo
        bool
        prompt "fifo"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_file
        bool
        prompt "file"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_gps
        bool
        prompt "gps"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libnmeap
 
 config LCD4LINUX_PLUGIN_hddtemp
        bool
        prompt "hddtemp"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_huawei
        bool
        prompt "huawei"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_i2c_sensors
        bool
        prompt "i2c_sensors"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_iconv
        bool
        prompt "iconv"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libiconv
 
 config LCD4LINUX_PLUGIN_imon
        bool
        prompt "imon"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_isdn
        bool
        prompt "isdn"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_kvv
        bool
        prompt "kvv"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_loadavg
        bool
        prompt "loadavg"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       default y
 
 config LCD4LINUX_PLUGIN_meminfo
        bool
        prompt "meminfo"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       default y
 
 config LCD4LINUX_PLUGIN_mpd
        bool
        prompt "mpd"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_mpris_dbus
        bool
        prompt "mpris_dbus"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libdbus
 
 config LCD4LINUX_PLUGIN_mysql
        bool
        prompt "mysql"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libmysqlclient
 
 config LCD4LINUX_PLUGIN_netdev
        bool
        prompt "netdev"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_netinfo
        bool
        prompt "netinfo"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_pop3
        bool
        prompt "pop3"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_ppp
        bool
        prompt "ppp"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_ppp
 
 config LCD4LINUX_PLUGIN_proc_stat
        bool
        prompt "proc_stat"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       default y
 
-config LCD4LINUX_PLUGIN_python
-       bool
-       prompt "python"
+#config LCD4LINUX_PLUGIN_python
+#      bool
+#      prompt "python"
+#      select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+#      select LCD4LINUX_NEEDS_python
 
 config LCD4LINUX_PLUGIN_qnaplog
        bool
        prompt "qnaplog"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       select LCD4LINUX_NEEDS_libsqlite3
 
 config LCD4LINUX_PLUGIN_seti
        bool
        prompt "seti"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_statfs
        bool
        prompt "statfs"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_uname
        bool
        prompt "uname"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_uptime
        bool
        prompt "uptime"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       default y
 
 config LCD4LINUX_PLUGIN_w1retap
        bool
        prompt "w1retap"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
 
 config LCD4LINUX_PLUGIN_wireless
        bool
        prompt "wireless"
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
+       depends BROKEN
 
 config LCD4LINUX_PLUGIN_xmms
        bool
        prompt "xmms"
-
+       select LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN
index 653f9b3..55e112d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2009 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=lcd4linux
 PKG_REV:=1116
 PKG_VERSION:=r$(PKG_REV)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/
@@ -21,12 +21,44 @@ PKG_SOURCE_PROTO:=svn
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
 
+PKG_BUILD_DEPENDS:= \
+       libdbus \
+       libgd \
+       libiconv \
+       libmysqlclient \
+       libncurses \
+       libnmeap \
+       libsqlite3 \
+       libvncserver \
+       ppp \
+       serdisplib \
+       st2205tool \
+#      libftdi \
+#      libmpdclient \
+#      libX11 \
+#      python \
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/lcd4linux
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libusb
+  DEPENDS:= \
+       +LCD4LINUX_NEEDS_libdbus:libdbus \
+       +LCD4LINUX_NEEDS_libgd:libgd \
+       +LCD4LINUX_NEEDS_libiconv:libiconv \
+       +LCD4LINUX_NEEDS_libmysqlclient:libmysqlclient \
+       +LCD4LINUX_NEEDS_libncurses:libncurses \
+       +LCD4LINUX_NEEDS_libnmeap:libnmeap \
+       +LCD4LINUX_NEEDS_libsqlite3:libsqlite3 \
+       +LCD4LINUX_NEEDS_libusb:libusb \
+       +LCD4LINUX_NEEDS_libvncserver:libvncserver \
+       +LCD4LINUX_NEEDS_serdisplib:serdisplib \
+       +LCD4LINUX_NEEDS_st2205tool:st2205tool \
+#      +LCD4LINUX_NEEDS_libftdi:libftdi \
+#      +LCD4LINUX_NEEDS_libmpdclient:libmpdclient \
+#      +LCD4LINUX_NEEDS_libX11:libX11 \
+#      +LCD4LINUX_NEEDS_python:python
   TITLE:=LCD display utility
   URL:=http://lcd4linux.bulix.org/
   MENU:=1
@@ -34,14 +66,14 @@ endef
 
 define Package/lcd4linux/config
        menu "Configuration"
-       depends on PACKAGE_lcd4linux
-       source "$(SOURCE)/Config.in"
+               depends on PACKAGE_lcd4linux
+               source "$(SOURCE)/Config.in"
        endmenu
 endef
 
 define Package/lcd4linux/description
      LCD4Linux is a small program that grabs information from the kernel and 
      some subsystems and displays it on an external liquid crystal display.
+ LCD4Linux is a small program that grabs information from the kernel and 
+ some subsystems and displays it on an external liquid crystal display.
 endef
 
 define Package/lcd4linux/conffiles
@@ -55,27 +87,32 @@ LCD4LINUX_DRIVERS:= \
        Curses \
        Cwlinux \
        D4D \
+       EA232graphic \
        G15 \
        GLCD2USB \
        IRLCD \
        HD44780 \
+       HD44780-I2C \
        LCD2USB \
        LCDLinux \
        LCDTerm \
+       LEDMatrix \
        LPH7508 \
        LUIse \
+       LW_ABP \
        M50530 \
        MatrixOrbital \
        MatrixOrbitalGX \
        MilfordInstruments \
        Noritake \
        NULL \
-       PNG \
-       PPM \
        Pertelian \
        PHAnderson \
+       PICGraphic \
        picoLCD \
        picoLCDGraphic \
+       PNG \
+       PPM \
        RouterBoard \
        serdisplib \
        ShuttleVFD \
@@ -83,9 +120,9 @@ LCD4LINUX_DRIVERS:= \
        st2205 \
        T6963 \
        Trefon \
-       USBLCD \
-       USBHUB \
        ULA200 \
+       USBHUB \
+       USBLCD \
        VNC \
        WincorNixdorf \
        X11 \
@@ -95,8 +132,10 @@ LCD4LINUX_PLUGINS:= \
        asterisk \
        button_exec \
        cpuinfo \
+       dbus \
        diskstats \
        dvb \
+       event \
        exec \
        fifo \
        file \
@@ -139,98 +178,53 @@ LCD4LINUX_CONFIGURE_PLUGINS:= \
            $(if $(CONFIG_LCD4LINUX_PLUGIN_$(c)),$(c),) \
        )
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_PNG),)
-PKG_BUILD_DEPENDS += libgd
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_PPM),)
-PKG_BUILD_DEPENDS += libgd
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_G15),)
-PKG_BUILD_DEPENDS += libgd
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_LPH7508),)
-PKG_BUILD_DEPENDS += libgd
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_LUIse),)
-PKG_BUILD_DEPENDS += libgd
+ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_DRIVER),)
+  LCD4LINUX_CONFIGURE_DRIVERS:=Sample
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_Noritake),)
-PKG_BUILD_DEPENDS += libgd
+ifeq ($(CONFIG_LCD4LINUX_HAS_AT_LEAST_ONE_PLUGIN),)
+  LCD4LINUX_CONFIGURE_PLUGINS:=sample
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_serdisplib),)
-PKG_BUILD_DEPENDS += libgd, serdisplib
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_st2205),)
-PKG_BUILD_DEPENDS += libgd, st2205tool
-endif
-
-ifneq ($(CONFIG_LCD4LINUX_DRV_T6963),)
-PKG_BUILD_DEPENDS += libgd
-endif
+CONFIGURE_ARGS+= \
+       --disable-rpath \
+       --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
+       --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_Curses),)
-PKG_BUILD_DEPENDS += libncurses
-endif
+EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_VNC),)
-PKG_BUILD_DEPENDS += libvncserver
+ifneq ($(CONFIG_LCD4LINUX_NEEDS_libiconv),)
+  CONFIGURE_ARGS+= \
+       --with-libiconv-prefix="$(STAGING_DIR)/usr/lib/libiconv"
+else
+  CONFIGURE_ARGS+= \
+       --without-libiconv-prefix
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_DRV_X11),)
-PKG_BUILD_DEPENDS += libgd, libX11
+ifneq ($(CONFIG_LCD4LINUX_NEEDS_libmysqlclient),)
+  EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_PLUGIN_gps),)
-PKG_BUILD_DEPENDS += libnmeap
+ifneq ($(CONFIG_LCD4LINUX_NEEDS_python),)
+  CONFIGURE_ARGS+= --with-python
+else
+  CONFIGURE_ARGS+= --without-python
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_PLUGIN_iconv),)
-PKG_BUILD_DEPENDS += libiconv
+ifneq ($(CONFIG_LCD4LINUX_NEEDS_libX11),)
+  CONFIGURE_ARGS+= --with-x
+else
+  CONFIGURE_ARGS+= --without-x
 endif
 
-ifneq ($(CONFIG_LCD4LINUX_PLUGIN_mysql),)
-PKG_BUILD_DEPENDS += libmysqlclient
-endif
-
-# XXX: lcd4linux needs at least one driver and one plugin, if none are selected, build'em all
-ifeq ($(strip $(LCD4LINUX_CONFIGURE_DRIVERS)),)
-  LCD4LINUX_CONFIGURE_DRIVERS:=all
-endif  
-ifeq ($(strip $(LCD4LINUX_CONFIGURE_PLUGINS)),)
-  LCD4LINUX_CONFIGURE_PLUGINS:=all
-endif  
-  
-## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0'
-
-
-EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include
-EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib
-
-TARGET_CONFIGURE_OPTS+=\
-       CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)"
-
-CONFIGURE_ARGS += \
-       --without-x \
-       --without-python \
-       --disable-rpath \
-       --with-drivers="$(strip $(LCD4LINUX_CONFIGURE_DRIVERS))" \
-       --with-plugins="$(strip $(LCD4LINUX_CONFIGURE_PLUGINS))" \
-
 
 define Package/lcd4linux/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc
-       $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf
+       $(INSTALL_CONF) ./files/lcd4linux.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+       $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux
 endef
 
 $(eval $(call BuildPackage,lcd4linux))