aboutsummaryrefslogtreecommitdiff
path: root/sysutils/apcupsd
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2009-03-12 14:10:54 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2009-03-12 14:10:54 +0000
commitec377f19f3c7368ada93fd278bbd09c6727b73a6 (patch)
tree0359860c84f24183765b096bd0bfa4d7880506bd /sysutils/apcupsd
parent3fb0477b1093ade6221e43ff0863f897aceeb908 (diff)
downloadports-ec377f19f3c7368ada93fd278bbd09c6727b73a6.tar.gz
ports-ec377f19f3c7368ada93fd278bbd09c6727b73a6.zip
- fix it to work with newusb on HEAD [1] [2]
- makefile cleanup and portlint petting. PR: ports/132548 [1] Submitted by: Ben Kelly [1], stass@ [2]
Notes
Notes: svn path=/head/; revision=229936
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r--sysutils/apcupsd/Makefile14
-rw-r--r--sysutils/apcupsd/files/patch-configure58
2 files changed, 68 insertions, 4 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 5d9cd7a5c706..36d7f8717f24 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= apcupsd
PORTVERSION= 3.14.5
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \
http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \
@@ -16,11 +17,12 @@ MASTER_SITE_SUBDIR= ${PORTNAME}/:src_sf
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src_sf,src_bk \
${PORTNAME}.pdf:doc_sf,doc_bk
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-IGNOREFILES= ${PORTNAME}.pdf
MAINTAINER= itetcu@FreeBSD.org
COMMENT= Set of programs for controlling APC UPS
+IGNOREFILES= ${PORTNAME}.pdf
+
USE_RC_SUBR= apcupsd
SUB_FILES= pkg-message
@@ -32,9 +34,9 @@ CONFIGURE_ARGS= --sbindir=${PREFIX}/sbin \
--sysconfdir=${ETCDIR} \
--with-serial-dev=/dev/usv
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
- CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
- LDFLAGS="-L${LOCALBASE}/lib"
+#CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
+# CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
+# LDFLAGS="-L${LOCALBASE}/lib"
MAN8= apcupsd.8
@@ -129,6 +131,10 @@ CONFIGURE_ARGS+= --enable-test
.include <bsd.port.pre.mk>
+.if defined(WITH_USB) && ${OSVERSION} >= 800069
+CONFIGURE_ARGS+= --with-generic-usb
+.endif
+
pre-configure:
.if defined(WITH_CLIENT_ONLY) && ( defined(WITH_APCSMART_DRV) || \
defined(WITH_APCDUMB_DRV) || defined(WITH_PCNET_DRV) || \
diff --git a/sysutils/apcupsd/files/patch-configure b/sysutils/apcupsd/files/patch-configure
new file mode 100644
index 000000000000..d3c85b00fc08
--- /dev/null
+++ b/sysutils/apcupsd/files/patch-configure
@@ -0,0 +1,58 @@
+--- configure.orig 2009-03-12 00:42:12.000000000 +0300
++++ configure 2009-03-12 00:43:17.000000000 +0300
+@@ -10623,53 +10623,8 @@
+ echo "${ECHO_T}Using BSD USB driver." >&6
+ ;;
+ *)
+- # Extract the first word of "libusb-config", so it can be a program name with args.
+-set dummy libusb-config; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_path_usbcfg+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- case $usbcfg in
+- [\\/]* | ?:[\\/]*)
+- ac_cv_path_usbcfg="$usbcfg" # Let the user override the test with a path.
+- ;;
+- *)
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_path_usbcfg="$as_dir/$ac_word$ac_exec_ext"
+- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+-done
+-
+- ;;
+-esac
+-fi
+-usbcfg=$ac_cv_path_usbcfg
+-
+-if test -n "$usbcfg"; then
+- echo "$as_me:$LINENO: result: $usbcfg" >&5
+-echo "${ECHO_T}$usbcfg" >&6
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+- if test x$usbcfg = x ; then
+- { { echo "$as_me:$LINENO: error: Cannot find libusb-config" >&5
+-echo "$as_me: error: Cannot find libusb-config" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+-
+- LIBUSB=`$usbcfg --libs`
+- LIBUSBH=`$usbcfg --prefix`/include/usb.h
++ LIBUSB=-lusb
++ LIBUSBH="/usr/include/usb.h"
+
+
+ LIBUSBHIDINC="-I\$(topdir)/src/libusbhid"