diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-04-27 19:07:05 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-04-27 19:07:05 +0000 |
commit | 1eb4142e0acbea39737e4220b9528c0a8a1ca2da (patch) | |
tree | cd3377c5937ccdc9bd7209064362c8fb03a959d4 /sys-power/nut | |
parent | sparc stable wrt #360739 (diff) | |
download | gentoo-2-1eb4142e0acbea39737e4220b9528c0a8a1ca2da.tar.gz gentoo-2-1eb4142e0acbea39737e4220b9528c0a8a1ca2da.tar.bz2 gentoo-2-1eb4142e0acbea39737e4220b9528c0a8a1ca2da.zip |
old, punt desc for USE hal
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/nut')
-rw-r--r-- | sys-power/nut/files/nut-2.4.3-asneeded.patch | 587 | ||||
-rw-r--r-- | sys-power/nut/metadata.xml | 3 | ||||
-rw-r--r-- | sys-power/nut/nut-2.4.3-r2.ebuild | 235 |
3 files changed, 0 insertions, 825 deletions
diff --git a/sys-power/nut/files/nut-2.4.3-asneeded.patch b/sys-power/nut/files/nut-2.4.3-asneeded.patch deleted file mode 100644 index bd215c79c342..000000000000 --- a/sys-power/nut/files/nut-2.4.3-asneeded.patch +++ /dev/null @@ -1,587 +0,0 @@ ---- clients/Makefile.am -+++ clients/Makefile.am -@@ -3,7 +3,7 @@ - # by default, link programs in this directory with libcommon.a - LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) - if WITH_SSL -- LDADD += $(LIBSSL_LDFLAGS) -+ LDADD += $(LIBSSL_LIBS) - endif - - # Avoid per-target CFLAGS, because this will prevent re-use of object -@@ -38,7 +38,7 @@ - upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) - - upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h --upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) -+upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LIBS) - - upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h - upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \ -@@ -48,6 +48,6 @@ - libupsclient_la_SOURCES = upsclient.c upsclient.h - libupsclient_la_LIBADD = ../common/libparseconf.la - if WITH_SSL -- libupsclient_la_LIBADD += $(LIBSSL_LDFLAGS) -+ libupsclient_la_LIBADD += $(LIBSSL_LIBS) - endif - libupsclient_la_LDFLAGS = -version-info 1:0:0 ---- configure.in -+++ configure.in -@@ -194,7 +194,7 @@ - solaris2.1* ) - echo Checking for Solaris 10 / 11 specific configuration for usb drivers - AC_SEARCH_LIBS(nanosleep, rt) -- LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" -+ LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" - dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification) - dnl and need to call libusb close upon reconnexion - AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.]) -@@ -742,26 +742,26 @@ - - AC_SUBST(OS_NAME) - AC_SUBST(LIBSSL_CFLAGS) --AC_SUBST(LIBSSL_LDFLAGS) -+AC_SUBST(LIBSSL_LIBS) - AC_SUBST(LIBGD_CFLAGS) --AC_SUBST(LIBGD_LDFLAGS) -+AC_SUBST(LIBGD_LIBS) - AC_SUBST(LIBNETSNMP_CFLAGS) --AC_SUBST(LIBNETSNMP_LDFLAGS) -+AC_SUBST(LIBNETSNMP_LIBS) - AC_SUBST(LIBUSB_CFLAGS) --AC_SUBST(LIBUSB_LDFLAGS) -+AC_SUBST(LIBUSB_LIBS) - AC_SUBST(LIBNEON_CFLAGS) --AC_SUBST(LIBNEON_LDFLAGS) -+AC_SUBST(LIBNEON_LIBS) - AC_SUBST(LIBPOWERMAN_CFLAGS) --AC_SUBST(LIBPOWERMAN_LDFLAGS) -+AC_SUBST(LIBPOWERMAN_LIBS) - AC_SUBST(LIBWRAP_CFLAGS) --AC_SUBST(LIBWRAP_LDFLAGS) -+AC_SUBST(LIBWRAP_LIBS) - AC_SUBST(HAL_USER) - AC_SUBST(HAL_DEVICE_MATCH_KEY) - AC_SUBST(HAL_FDI_PATH) - AC_SUBST(HAL_CALLOUTS_PATH) - AC_SUBST(HAVE_GLIB_2_14) - AC_SUBST(LIBHAL_CFLAGS) --AC_SUBST(LIBHAL_LDFLAGS) -+AC_SUBST(LIBHAL_LIBS) - AC_SUBST(DRIVER_BUILD_LIST) - AC_SUBST(DRIVER_MAN_LIST) - AC_SUBST(DRIVER_INSTALL_TARGET) ---- drivers/Makefile.am -+++ drivers/Makefile.am -@@ -134,7 +134,7 @@ - dummy_ups_LDADD = $(LDADD_DRIVERS) ../clients/libupsclient.la - if WITH_SSL - dummy_ups_CFLAGS += $(LIBSSL_CFLAGS) -- dummy_ups_LDADD += $(LIBSSL_LDFLAGS) -+ dummy_ups_LDADD += $(LIBSSL_LIBS) - endif - - # Clone drivers -@@ -151,23 +151,23 @@ - liebert-hid.c mge-hid.c powercom-hid.c tripplite-hid.c - usbhid_ups_SOURCES = usbhid-ups.c libhid.c libusb.c hidparser.c \ - usb-common.c $(USBHID_UPS_SUBDRIVERS) --usbhid_ups_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -+usbhid_ups_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) - - tripplite_usb_SOURCES = tripplite_usb.c libusb.c usb-common.c --tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -lm -+tripplite_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm - - bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c usb-common.c --bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -+bcmxcp_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) - - megatec_usb_SOURCES = megatec.c megatec_usb.c libusb.c usb-common.c - megatec_usb_CFLAGS = $(AM_CFLAGS) -DMEGATEC_SUBDRV --megatec_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -+megatec_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) - - blazer_usb_SOURCES = blazer.c blazer_usb.c libusb.c usb-common.c --blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -lm -+blazer_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm - - richcomm_usb_SOURCES = richcomm_usb.c usb-common.c --richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LDFLAGS) -+richcomm_usb_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) - - # HID-over-serial - newmge_shut_SOURCES = usbhid-ups.c libshut.c libhid.c hidparser.c mge-hid.c -@@ -178,30 +178,30 @@ - # SNMP - snmp_ups_SOURCES = snmp-ups.c apc-mib.c baytech-mib.c compaq-mib.c eaton-mib.c \ - ietf-mib.c mge-mib.c netvision-mib.c powerware-mib.c raritan-pdu-mib.c --snmp_ups_LDADD = $(LDADD_DRIVERS) $(LIBNETSNMP_LDFLAGS) -+snmp_ups_LDADD = $(LDADD_DRIVERS) $(LIBNETSNMP_LIBS) - - # HAL - hald_addon_usbhid_ups_SOURCES = usbhid-ups.c libhid.c libusb.c hidparser.c \ - $(USBHID_UPS_SUBDRIVERS) --hald_addon_usbhid_ups_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LDFLAGS) $(LIBHAL_LDFLAGS) -+hald_addon_usbhid_ups_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) - - hald_addon_tripplite_usb_SOURCES = tripplite_usb.c libusb.c --hald_addon_tripplite_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LDFLAGS) $(LIBHAL_LDFLAGS) -lm -+hald_addon_tripplite_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) -lm - - hald_addon_bcmxcp_usb_SOURCES = bcmxcp_usb.c bcmxcp.c --hald_addon_bcmxcp_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LDFLAGS) $(LIBHAL_LDFLAGS) -+hald_addon_bcmxcp_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) - - hald_addon_megatec_usb_SOURCES = megatec.c megatec_usb.c libusb.c - hald_addon_megatec_usb_CFLAGS = $(AM_CFLAGS) -DMEGATEC_SUBDRV --hald_addon_megatec_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LDFLAGS) $(LIBHAL_LDFLAGS) -+hald_addon_megatec_usb_LDADD = $(LDADD_HAL_DRIVERS) $(LIBUSB_LIBS) $(LIBHAL_LIBS) - - # NEON XML/HTTP - netxml_ups_SOURCES = netxml-ups.c mge-xml.c --netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LDFLAGS) -+netxml_ups_LDADD = $(LDADD_DRIVERS) $(LIBNEON_LIBS) - - # Powerman - powerman_pdu_SOURCES = powerman-pdu.c --powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LDFLAGS) -+powerman_pdu_LDADD = $(LDADD) $(LIBPOWERMAN_LIBS) - - # ---------------------------------------------------------------------- - # List of header files. The purpose of this list is not dependency ---- m4/nut_check_libgd.m4 -+++ m4/nut_check_libgd.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBGD compiler flags. On success, set nut_have_libgd="yes" --dnl and set LIBGD_CFLAGS and LIBGD_LDFLAGS. On failure, set -+dnl and set LIBGD_CFLAGS and LIBGD_LIBS. On failure, set - dnl nut_have_libgd="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -9,14 +9,14 @@ - nut_have_libgd_seen=yes - - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - LIBS_ORIG="${LIBS}" - - dnl Initial defaults. These are only used if gdlib-config is - dnl unusable and the user fails to pass better values in --with - dnl arguments - CFLAGS="" -- LDFLAGS="-L/usr/X11R6/lib" -+ LIBS="-L/usr/X11R6/lib" - LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" - - AC_MSG_CHECKING(for gd version via gdlib-config) -@@ -37,7 +37,7 @@ - ;; - *) - CFLAGS="`gdlib-config --includes`" -- LDFLAGS="`gdlib-config --ldflags`" -+ LIBS="`gdlib-config --ldflags`" - LIBS="`gdlib-config --libs`" - ;; - esac -@@ -51,9 +51,9 @@ - - AC_MSG_CHECKING(for gd library flags) - AC_ARG_WITH(gd-libs, [ -- AC_HELP_STRING([--with-gd-libs=LDFLAGS], [linker flags for the gd library]) -- ], [LDFLAGS="${withval}" LIBS=""], []) -- AC_MSG_RESULT([${LDFLAGS} ${LIBS}]) -+ AC_HELP_STRING([--with-gd-libs=LIBS], [linker flags for the gd library]) -+ ], [LIBS="${withval}" LIBS=""], []) -+ AC_MSG_RESULT([${LIBS} ${LIBS}]) - - dnl check if gd is usable - AC_CHECK_HEADERS(gd.h gdfontmb.h, [nut_have_libgd=yes], [nut_have_libgd=no], [AC_INCLUDES_DEFAULT]) -@@ -62,12 +62,12 @@ - if test "${nut_have_libgd}" = "yes"; then - AC_DEFINE(HAVE_LIBGD, 1, [Define if you have Boutell's libgd installed]) - LIBGD_CFLAGS="${CFLAGS}" -- LIBGD_LDFLAGS="${LDFLAGS} ${LIBS}" -+ LIBGD_LIBS="${LIBS} ${LIBS}" - fi - - dnl put back the original versions - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - LIBS="${LIBS_ORIG}" - fi - ]) ---- m4/nut_check_libhal.m4 -+++ m4/nut_check_libhal.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBHAL compiler flags. On success, set nut_have_libhal="yes" --dnl and set LIBHAL_CFLAGS and LIBHAL_LDFLAGS. On failure, set -+dnl and set LIBHAL_CFLAGS and LIBHAL_LIBS. On failure, set - dnl nut_have_libhal="no". This macro can be run multiple times, but will - dnl do the checking only once. - dnl NUT requires HAL version 0.5.8 at least -@@ -10,7 +10,7 @@ - nut_have_libhal_seen=yes - - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - AC_MSG_CHECKING(for libhal version via pkg-config (0.5.8 minimum required)) - HAL_VERSION=`pkg-config --silence-errors --modversion hal` -@@ -31,9 +31,9 @@ - - dnl also get libs from glib-2.0 to workaround a bug in dbus-glib - AC_MSG_CHECKING(for libhal ldflags via pkg-config) -- LDFLAGS=`pkg-config --silence-errors --libs hal dbus-glib-1` -+ LIBS=`pkg-config --silence-errors --libs hal dbus-glib-1` - if test "$?" = "0"; then -- AC_MSG_RESULT(${LDFLAGS}) -+ AC_MSG_RESULT(${LIBS}) - else - AC_MSG_RESULT(not found) - nut_have_libhal=no -@@ -50,7 +50,7 @@ - dnl try again using defaults if pkg-config is not available - if test "${nut_have_libhal}" = "check"; then - CFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include" -- LDFLAGS="-lhal -ldbus-1 -lpthread" -+ LIBS="-lhal -ldbus-1 -lpthread" - - AC_CHECK_HEADERS(libhal.h, [nut_have_libhal=yes], [nut_have_libhal=no], [AC_INCLUDES_DEFAULT]) - AC_CHECK_FUNCS(libhal_device_new_changeset, [], [nut_have_libhal=no]) -@@ -58,7 +58,7 @@ - - if test "${nut_have_libhal}" = "yes"; then - LIBHAL_CFLAGS="${CFLAGS}" -- LIBHAL_LDFLAGS="${LDFLAGS}" -+ LIBHAL_LIBS="${LIBS}" - - dnl this will only work as of HAL 0.5.9 - AC_MSG_CHECKING(for libhal user via pkg-config) -@@ -124,7 +124,7 @@ - fi - - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - - dnl - test for g_timeout_add_seconds availability - AC_MSG_CHECKING([if GLib is version 2.14.0 or newer]) ---- m4/nut_check_libneon.m4 -+++ m4/nut_check_libneon.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBNEON compiler flags. On success, set nut_have_neon="yes" --dnl and set LIBNEON_CFLAGS and LIBNEON_LDFLAGS. On failure, set -+dnl and set LIBNEON_CFLAGS and LIBNEON_LIBS. On failure, set - dnl nut_have_neon="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -8,9 +8,9 @@ - if test -z "${nut_have_neon_seen}"; then - nut_have_neon_seen=yes - -- dnl save CFLAGS and LDFLAGS -+ dnl save CFLAGS and LIBS - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - dnl See which version of the neon library (if any) is installed - AC_MSG_CHECKING(for libneon version via pkg-config (0.25.0 minimum required)) -@@ -29,9 +29,9 @@ - - AC_MSG_CHECKING(for libneon ldflags) - AC_ARG_WITH(neon-libs, [ -- AC_HELP_STRING([--with-neon-libs=LDFLAGS], [linker flags for the neon library]) -- ], [LDFLAGS="${withval}"], [LDFLAGS="`pkg-config --silence-errors --libs neon`"]) -- AC_MSG_RESULT([${LDFLAGS}]) -+ AC_HELP_STRING([--with-neon-libs=LIBS], [linker flags for the neon library]) -+ ], [LIBS="${withval}"], [LIBS="`pkg-config --silence-errors --libs neon`"]) -+ AC_MSG_RESULT([${LIBS}]) - - dnl check if neon is usable - AC_CHECK_HEADERS(ne_xmlreq.h, [nut_have_neon=yes], [nut_have_neon=no], [AC_INCLUDES_DEFAULT]) -@@ -41,11 +41,11 @@ - dnl Check for connect timeout support in library (optional) - AC_CHECK_FUNCS(ne_set_connect_timeout ne_sock_connect_timeout) - LIBNEON_CFLAGS="${CFLAGS}" -- LIBNEON_LDFLAGS="${LDFLAGS}" -+ LIBNEON_LIBS="${LIBS}" - fi - -- dnl restore original CFLAGS and LDFLAGS -+ dnl restore original CFLAGS and LIBS - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - fi - ]) ---- m4/nut_check_libnetsnmp.m4 -+++ m4/nut_check_libnetsnmp.m4 -@@ -1,6 +1,6 @@ - dnl Check for LIBNETSNMP compiler flags. On success, set - dnl nut_have_libnetsnmp="yes" and set LIBNETSNMP_CFLAGS and --dnl LIBNETSNMP_LDFLAGS. On failure, set nut_have_libnetsnmp="no". -+dnl LIBNETSNMP_LIBS. On failure, set nut_have_libnetsnmp="no". - dnl This macro can be run multiple times, but will do the checking only - dnl once. - -@@ -9,9 +9,9 @@ - if test -z "${nut_have_libnetsnmp_seen}"; then - nut_have_libnetsnmp_seen=yes - -- dnl save CFLAGS and LDFLAGS -+ dnl save CFLAGS and LIBS - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - dnl See which version of the Net-SNMP library (if any) is installed - AC_MSG_CHECKING(for Net-SNMP version via net-snmp-config) -@@ -30,9 +30,9 @@ - - AC_MSG_CHECKING(for Net-SNMP libs) - AC_ARG_WITH(snmp-libs, [ -- AC_HELP_STRING([--with-snmp-libs=LDFLAGS], [linker flags for the Net-SNMP library]) -- ], [LDFLAGS="${withval}"], [LDFLAGS="`net-snmp-config --libs 2>/dev/null`"]) -- AC_MSG_RESULT([${LDFLAGS}]) -+ AC_HELP_STRING([--with-snmp-libs=LIBS], [linker flags for the Net-SNMP library]) -+ ], [LIBS="${withval}"], [LIBS="`net-snmp-config --libs 2>/dev/null`"]) -+ AC_MSG_RESULT([${LIBS}]) - - dnl Check if the Net-SNMP library is usable - AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [nut_have_libnetsnmp=yes], [nut_have_libnetsnmp=no], [AC_INCLUDES_DEFAULT]) -@@ -40,11 +40,11 @@ - - if test "${nut_have_libnetsnmp}" = "yes"; then - LIBNETSNMP_CFLAGS="${CFLAGS}" -- LIBNETSNMP_LDFLAGS="${LDFLAGS}" -+ LIBNETSNMP_LIBS="${LIBS}" - fi - -- dnl restore original CFLAGS and LDFLAGS -+ dnl restore original CFLAGS and LIBS - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - fi - ]) ---- m4/nut_check_libpowerman.m4 -+++ m4/nut_check_libpowerman.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBPOWERMAN compiler flags. On success, set nut_have_libpowerman="yes" --dnl and set LIBPOWERMAN_CFLAGS and LIBPOWERMAN_LDFLAGS. On failure, set -+dnl and set LIBPOWERMAN_CFLAGS and LIBPOWERMAN_LIBS. On failure, set - dnl nut_have_libpowerman="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -8,9 +8,9 @@ - if test -z "${nut_have_libpowerman_seen}"; then - nut_have_libpowerman_seen=yes - -- dnl save CFLAGS and LDFLAGS -+ dnl save CFLAGS and LIBS - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - AC_MSG_CHECKING(for libpowerman cflags) - AC_ARG_WITH(powerman-includes, [ -@@ -20,9 +20,9 @@ - - AC_MSG_CHECKING(for libpowerman libs) - AC_ARG_WITH(powerman-libs, [ -- AC_HELP_STRING([--with-powerman-libs=LDFLAGS], [linker flags for the libpowerman library]) -- ], [LDFLAGS="${withval}"], [LDFLAGS="`pkg-config --silence-errors --libs libpowerman`"]) -- AC_MSG_RESULT([${LDFLAGS}]) -+ AC_HELP_STRING([--with-powerman-libs=LIBS], [linker flags for the libpowerman library]) -+ ], [LIBS="${withval}"], [LIBS="`pkg-config --silence-errors --libs libpowerman`"]) -+ AC_MSG_RESULT([${LIBS}]) - - dnl check if libpowerman is usable - AC_CHECK_HEADERS(libpowerman.h, [nut_have_libpowerman=yes], [nut_have_libpowerman=no], [AC_INCLUDES_DEFAULT]) -@@ -30,12 +30,12 @@ - - if test "${nut_have_libpowerman}" = "yes"; then - LIBPOWERMAN_CFLAGS="${CFLAGS}" -- LIBPOWERMAN_LDFLAGS="${LDFLAGS}" -+ LIBPOWERMAN_LIBS="${LIBS}" - fi - -- dnl restore original CFLAGS and LDFLAGS -+ dnl restore original CFLAGS and LIBS - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - - fi - ]) ---- m4/nut_check_libssl.m4 -+++ m4/nut_check_libssl.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBSSL compiler flags. On success, set nut_have_libssl="yes" --dnl and set LIBSSL_CFLAGS and LIBSSL_LDFLAGS. On failure, set -+dnl and set LIBSSL_CFLAGS and LIBSSL_LIBS. On failure, set - dnl nut_have_libssl="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -8,20 +8,20 @@ - if test -z "${nut_have_libssl_seen}"; then - nut_have_libssl_seen=yes - -- dnl save CFLAGS and LDFLAGS -+ dnl save CFLAGS and LIBS - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - AC_MSG_CHECKING(for openssl version via pkg-config) - OPENSSL_VERSION=`pkg-config --silence-errors --modversion openssl` - if test "$?" = "0"; then - AC_MSG_RESULT(${OPENSSL_VERSION} found) - CFLAGS="`pkg-config --silence-errors --cflags openssl`" -- LDFLAGS="`pkg-config --silence-errors --libs openssl`" -+ LIBS="`pkg-config --silence-errors --libs openssl`" - else - AC_MSG_RESULT(not found) - CFLAGS="" -- LDFLAGS="-lssl -lcrypto" -+ LIBS="-lssl -lcrypto" - fi - - dnl allow overriding openssl settings if the user knows best -@@ -33,9 +33,9 @@ - - AC_MSG_CHECKING(for openssl ldflags) - AC_ARG_WITH(ssl-libs, [ -- AC_HELP_STRING([--with-ssl-libs=LDFLAGS], [linker flags for the OpenSSL library]) -- ], [LDFLAGS="${withval}"], []) -- AC_MSG_RESULT([${LDFLAGS}]) -+ AC_HELP_STRING([--with-ssl-libs=LIBS], [linker flags for the OpenSSL library]) -+ ], [LIBS="${withval}"], []) -+ AC_MSG_RESULT([${LIBS}]) - - dnl check if openssl is usable - AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_libssl=yes], [nut_have_libssl=no], [AC_INCLUDES_DEFAULT]) -@@ -44,11 +44,11 @@ - if test "${nut_have_libssl}" = "yes"; then - AC_DEFINE(HAVE_SSL, 1, [Define to enable SSL development code]) - LIBSSL_CFLAGS="${CFLAGS}" -- LIBSSL_LDFLAGS="${LDFLAGS}" -+ LIBSSL_LIBS="${LIBS}" - fi - -- dnl restore original CFLAGS and LDFLAGS -+ dnl restore original CFLAGS and LIBS - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - fi - ]) ---- m4/nut_check_libusb.m4 -+++ m4/nut_check_libusb.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBUSB compiler flags. On success, set nut_have_libusb="yes" --dnl and set LIBUSB_CFLAGS and LIBUSB_LDFLAGS. On failure, set -+dnl and set LIBUSB_CFLAGS and LIBUSB_LIBS. On failure, set - dnl nut_have_libusb="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -8,27 +8,27 @@ - if test -z "${nut_have_libusb_seen}"; then - nut_have_libusb_seen=yes - -- dnl save CFLAGS and LDFLAGS -+ dnl save CFLAGS and LIBS - CFLAGS_ORIG="${CFLAGS}" -- LDFLAGS_ORIG="${LDFLAGS}" -+ LIBS_ORIG="${LIBS}" - - AC_MSG_CHECKING(for libusb version via pkg-config) - LIBUSB_VERSION=`pkg-config --silence-errors --modversion libusb` - if test "$?" = "0"; then - AC_MSG_RESULT(${LIBUSB_VERSION} found) - CFLAGS="`pkg-config --silence-errors --cflags libusb`" -- LDFLAGS="`pkg-config --silence-errors --libs libusb`" -+ LIBS="`pkg-config --silence-errors --libs libusb`" - else - AC_MSG_CHECKING(via libusb-config) - LIBUSB_VERSION=`libusb-config --version 2>/dev/null` - if test "$?" = "0"; then - AC_MSG_RESULT(${LIBUSB_VERSION} found) - CFLAGS="`libusb-config --cflags 2>/dev/null`" -- LDFLAGS="`libusb-config --libs 2>/dev/null`" -+ LIBS="`libusb-config --libs 2>/dev/null`" - else - AC_MSG_RESULT(not found) - CFLAGS="" -- LDFLAGS="-lusb" -+ LIBS="-lusb" - fi - fi - -@@ -40,9 +40,9 @@ - - AC_MSG_CHECKING(for libusb ldflags) - AC_ARG_WITH(usb-libs, [ -- AC_HELP_STRING([--with-usb-libs=LDFLAGS], [linker flags for the libusb library]) -- ], [LDFLAGS="${withval}"], []) -- AC_MSG_RESULT([${LDFLAGS}]) -+ AC_HELP_STRING([--with-usb-libs=LIBS], [linker flags for the libusb library]) -+ ], [LIBS="${withval}"], []) -+ AC_MSG_RESULT([${LIBS}]) - - dnl check if libusb is usable - AC_CHECK_HEADERS(usb.h, [nut_have_libusb=yes], [nut_have_libusb=no], [AC_INCLUDES_DEFAULT]) -@@ -52,11 +52,11 @@ - dnl Check for libusb "force driver unbind" availability - AC_CHECK_FUNCS(usb_detach_kernel_driver_np) - LIBUSB_CFLAGS="${CFLAGS}" -- LIBUSB_LDFLAGS="${LDFLAGS}" -+ LIBUSB_LIBS="${LIBS}" - fi - -- dnl restore original CFLAGS and LDFLAGS -+ dnl restore original CFLAGS and LIBS - CFLAGS="${CFLAGS_ORIG}" -- LDFLAGS="${LDFLAGS_ORIG}" -+ LIBS="${LIBS_ORIG}" - fi - ]) ---- m4/nut_check_libwrap.m4 -+++ m4/nut_check_libwrap.m4 -@@ -1,5 +1,5 @@ - dnl Check for LIBWRAP compiler flags. On success, set nut_have_libwrap="yes" --dnl and set LIBWRAP_CFLAGS and LIBWRAP_LDFLAGS. On failure, set -+dnl and set LIBWRAP_CFLAGS and LIBWRAP_LIBS. On failure, set - dnl nut_have_libwrap="no". This macro can be run multiple times, but will - dnl do the checking only once. - -@@ -39,7 +39,7 @@ - if test "${nut_have_libwrap}" = "yes"; then - AC_DEFINE(HAVE_WRAP, 1, [Define to enable libwrap support]) - LIBWRAP_CFLAGS="" -- LIBWRAP_LDFLAGS="${LIBS}" -+ LIBWRAP_LIBS="${LIBS}" - fi - - dnl restore original LIBS ---- server/Makefile.am -+++ server/Makefile.am -@@ -12,10 +12,10 @@ - endif - LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS) - if WITH_WRAP -- LDADD += $(LIBWRAP_LDFLAGS) -+ LDADD += $(LIBWRAP_LIBS) - endif - if WITH_SSL -- LDADD += $(LIBSSL_LDFLAGS) -+ LDADD += $(LIBSSL_LIBS) - endif - - sbin_PROGRAMS = upsd diff --git a/sys-power/nut/metadata.xml b/sys-power/nut/metadata.xml index d82122ab5812..8db05406a86d 100644 --- a/sys-power/nut/metadata.xml +++ b/sys-power/nut/metadata.xml @@ -6,7 +6,4 @@ <email>robbat2@gentoo.org</email> <name>Robin H. Johnson</name> </maintainer> - <use> - <flag name='hal'>Enable obsolete <pkg>sys-apps/hal</pkg> support</flag> - </use> </pkgmetadata> diff --git a/sys-power/nut/nut-2.4.3-r2.ebuild b/sys-power/nut/nut-2.4.3-r2.ebuild deleted file mode 100644 index 9b7aff7d48b5..000000000000 --- a/sys-power/nut/nut-2.4.3-r2.ebuild +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.4.3-r2.ebuild,v 1.9 2011/02/25 08:44:44 xarthisius Exp $ - -EAPI="2" - -inherit eutils fixheadtails autotools bash-completion - -MY_P="${P/_/-}" - -DESCRIPTION="Network-UPS Tools" -HOMEPAGE="http://www.networkupstools.org/" -# Nut mirrors are presently broken -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" - -S="${WORKDIR}/${MY_P}" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd" -IUSE="cgi snmp usb ssl hal xml" - -RDEPEND="cgi? ( >=media-libs/gd-2[png] ) - snmp? ( net-analyzer/net-snmp ) - usb? ( =virtual/libusb-0* ) - hal? ( >=sys-apps/hal-0.5.11 ) - ssl? ( dev-libs/openssl ) - xml? ( >=net-libs/neon-0.25.0 ) - >=sys-fs/udev-114" -DEPEND="$RDEPEND - >=sys-apps/sed-4 - >=sys-devel/autoconf-2.58 - dev-util/pkgconfig" - -# public files should be 644 root:root -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" -# private files should be 640 root:nut - readable by nut, writeable by root, -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" -# public files should be 644 root:root, only installed if USE=cgi -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" - -pkg_setup() { - enewgroup nut 84 - enewuser nut 84 -1 /var/lib/nut nut,uucp - # As of udev-104, NUT must be in uucp and NOT in tty. - gpasswd -d nut tty 2>/dev/null - gpasswd -a nut uucp 2>/dev/null - use hal && gpasswd -a haldaemon nut 2>/dev/null - # in some cases on old systems it wasn't in the nut group either! - gpasswd -a nut nut 2>/dev/null - warningmsg ewarn -} - -src_prepare() { - ht_fix_file configure.in - - epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch - epatch "${FILESDIR}"/${PN}-2.4.3-lowspeed-buffer-size.patch - epatch "${FILESDIR}"/${PN}-2.4.3-asneeded.patch - - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ - -i configure.in || die "sed failed" - - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ - -i scripts/udev/Makefile.am || die "sed failed" - - rm -f ltmain.sh m4/lt* m4/libtool.m4 - - WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed" -} - -src_configure() { - local myconf - - if [ -n "${NUT_DRIVERS}" ]; then - myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" - fi - - econf \ - --with-user=nut \ - --with-group=nut \ - --with-drvpath=/lib/nut \ - --sysconfdir=/etc/nut \ - --with-logfacility=LOG_DAEMON \ - --with-statepath=/var/lib/nut \ - --with-htmlpath=/usr/share/nut/html \ - --datarootdir=/usr/share/nut \ - --datadir=/usr/share/nut \ - --with-dev \ - $(use_with xml neon) \ - $(use_with hal) \ - $(use_with ssl) \ - $(use_with usb) \ - $(use_with snmp) \ - $(use_with cgi) \ - $(use_with cgi cgipath /usr/share/nut/cgi) \ - ${myconf} || die "econf failed" - -} - -src_install() { - - emake DESTDIR="${D}" install || die "make install failed" - - dodir /sbin - dosym /lib/nut/upsdrvctl /sbin/upsdrvctl - # This needs to exist for the scripts - dosym /lib/nut/upsdrvctl /usr/sbin/upsdrvctl - - if use cgi; then - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." - elog "copy them to your web server's ScriptPath to activate (this is a" - elog "change from the old location)." - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." - fi - - # this must be done after all of the install phases - for i in "${D}"/etc/nut/*.sample ; do - mv "${i}" "${i/.sample/}" - done - - dodoc ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING \ - docs/{FAQ,*.txt} || die - - newdoc lib/README README.lib || die - - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die - - docinto cables - dodoc docs/cables/* || die - - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsd upsd \ - || die "newinitd failed" - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv \ - || die "newinitd failed" - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon \ - || die "newinitd failed" - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail \ - || die "newinitd failed" - - # This sets up permissions for nut to access a UPS - insinto /etc/udev/rules.d/ - newins scripts/udev/nut-usbups.rules 70-nut-usbups.rules - - keepdir /var/lib/nut - - einfo "Setting up permissions on files and directories" - fperms 0700 /var/lib/nut - fowners nut:nut /var/lib/nut - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0640 ${NUT_PRIVATE_FILES} - eval fowners root:nut ${NUT_PRIVATE_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - eval fperms 0644 ${NUT_PUBLIC_FILES} - eval fowners root:root ${NUT_PUBLIC_FILES} - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval fperms 0644 ${NUT_CGI_FILES} - eval fowners root:root ${NUT_CGI_FILES} - fi - - # this is installed for 2.4 and fbsd guys - if ! has_version sys-fs/udev; then - einfo "Installing non-udev hotplug support" - insinto /etc/hotplug/usb - insopts -m 755 - doins scripts/hotplug/nut-usbups.hotplug - fi - - if use hal; then - einfo "Installing HAL support" - insinto /usr/share/hal/fdi/information/20thirdparty/ - doins scripts/hal/20-ups-nut-device.fdi - insinto /usr/libexec - insopts -m 755 - doins drivers/hald-addon-* - rm "${D}"/lib/nut/hald-addon-* - fi - - dobashcompletion "${S}"/scripts/misc/nut.bash_completion -} - -pkg_postinst() { - # this is to ensure that everybody that installed old versions still has - # correct permissions - - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null - - # Do not remove eval here, because the variables contain shell expansions. - if use cgi; then - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null - fi - - warningmsg elog -} - -warningmsg() { - msgfunc="$1" - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" - ${msgfunc} "Please note that NUT now runs under the 'nut' user." - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" - ${msgfunc} "hotplug rules that are installed, and alter them suitably." - ${msgfunc} '' - ${msgfunc} "If you use hald, you may be able to skip the normal init scripts." - ${msgfunc} '' - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." - ${msgfunc} '' - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" - ${msgfunc} "have a service per UPS:" - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" - ${msgfunc} '' - ${msgfunc} 'If you want apcupsd to power off your UPS when it' - ${msgfunc} 'shuts down your system in a power failure, you must' - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' - ${msgfunc} '' - ${msgfunc} 'rc-update add nut.powerfail shutdown' - ${msgfunc} '' - -} |