owfs: new package

All modules are always enabled when their dependencies are satisfied.

tcl doesn't work because the tclConfig.sh installed by our tcl package
is wrong: it adds -I/usr/include.

perl doesn't work out of the box, I didn't investigate.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Arnout Vandecappelle 2016-02-23 00:07:51 +01:00 committed by Thomas Petazzoni
parent 35ab3a372f
commit f2e3851118
5 changed files with 123 additions and 0 deletions

View File

@ -987,6 +987,7 @@ menu "Hardware handling"
source "package/mtdev/Config.in"
source "package/ne10/Config.in"
source "package/neardal/Config.in"
source "package/owfs/Config.in"
source "package/pcsc-lite/Config.in"
source "package/tslib/Config.in"
source "package/urg/Config.in"

View File

@ -0,0 +1,33 @@
From 75e92438bcdb78a90912366b07bf503646806686 Mon Sep 17 00:00:00 2001
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Date: Sun, 21 Feb 2016 17:02:06 +0100
Subject: [PATCH] configure.ac: check for localtime_r
HAVE_LOCALTIME_R is used in owftp.c, so it should be checked for.
Without this, static build fails because localtime_r is defined twice.
Upstream-Status: Submitted
https://sourceforge.net/p/owfs/mailman/message/34873667/
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c22dde9..12fdd18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1529,7 +1529,7 @@ AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([accept daemon getaddrinfo freeaddrinfo gethostbyname2_r gethostbyaddr_r gethostbyname_r getservbyname_r getopt getopt_long gettimeofday inet_ntop inet_pton memchr memset select socket strcasecmp strchr strdup strncasecmp strtol strtoul twalk tsearch tfind tdelete tdestroy vasprintf strsep vsprintf vsnprintf writev getline])
+AC_CHECK_FUNCS([accept daemon getaddrinfo freeaddrinfo gethostbyname2_r gethostbyaddr_r gethostbyname_r getservbyname_r getopt getopt_long gettimeofday inet_ntop inet_pton memchr memset select socket strcasecmp strchr strdup strncasecmp strtol strtoul twalk tsearch tfind tdelete tdestroy vasprintf strsep vsprintf vsnprintf writev getline localtime_r])
if test "${ENABLE_ZERO}" = "true" ; then
AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen]))
--
2.7.0

16
package/owfs/Config.in Normal file
View File

@ -0,0 +1,16 @@
config BR2_PACKAGE_OWFS
bool "owfs"
depends on BR2_TOOLCHAIN_HAS_THREADS
help
OWFS is an easy way to use the powerful 1-wire system of
Dallas/Maxim.
OWFS is a simple and flexible program to monitor and control
the physical environment. You can write scripts to read
temperature, flash lights, write to an LCD, log and graph,
etc.
http://owfs.org/
comment "owfs needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS

4
package/owfs/owfs.hash Normal file
View File

@ -0,0 +1,4 @@
# From https://sourceforge.net/projects/owfs/files/owfs/3.1p1/
sha1 80892ca3e72fef2979b8f0a04db15fd24a2cbda6 owfs-3.1p1.tar.gz
# Locally calculated
sha256 e69421ae534565c1f8530a2447f583401f4d0d4b1cf3cb8cf399a57133ed7f81 owfs-3.1p1.tar.gz

69
package/owfs/owfs.mk Normal file
View File

@ -0,0 +1,69 @@
################################################################################
#
# owfs
#
################################################################################
OWFS_VERSION = 3.1p1
OWFS_SITE = http://downloads.sourceforge.net/project/owfs/owfs/$(OWFS_VERSION)
OWFS_DEPENDENCIES = host-pkgconf
OWFS_CONF_OPTS = --disable-owperl --without-perl5 --disable-owtcl --without-tcl
# 0001-configure.ac-check-for-localtime_r.patch touches configure.ac
OWFS_AUTORECONF = YES
# owtcl license is declared in module/ownet/c/src/include/ow_functions.h
OWFS_LICENSE = GPLv2+, LGPLv2 (owtcl)
OWFS_LICENSE_FILES = COPYING COPYING.LIB
ifeq ($(BR2_PACKAGE_LIBFUSE),y)
OWFS_CONF_OPTS += --enable-owfs
OWFS_DEPENDENCIES += libfuse
else
OWFS_CONF_OPTS += --disable-owfs
endif
ifeq ($(BR2_PACKAGE_LIBUSB),y)
OWFS_CONF_OPTS += --enable-usb
OWFS_DEPENDENCIES += libusb
else
OWFS_CONF_OPTS += --disable-usb
endif
ifeq ($(BR2_PACKAGE_AVAHI),y)
OWFS_CONF_OPTS += --enable-avahi
OWFS_DEPENDENCIES += avahi
else
OWFS_CONF_OPTS += --disable-avahi
endif
ifeq ($(BR2_PACKAGE_PHP),y)
OWFS_CONF_OPTS += --enable-owphp --with-php --with-phpconfig=$(STAGING_DIR)/usr/bin/php-config
OWFS_DEPENDENCIES += php host-swig
else
OWFS_CONF_OPTS += --disable-owphp --without-php
endif
# setup.py isn't python3 compliant
ifeq ($(BR2_PACKAGE_PYTHON),y)
OWFS_CONF_OPTS += \
--enable-owpython \
--with-python \
--with-pythonconfig=$(STAGING_DIR)/usr/bin/python-config
OWFS_MAKE_ENV += \
CC="$(TARGET_CC)" \
PYTHONPATH="$(PYTHON_PATH)" \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
OWFS_DEPENDENCIES += python host-swig
else
OWFS_CONF_OPTS += --disable-owpython --without-python
endif
ifeq ($(BR2_STATIC_LIBS),y)
# zeroconf support uses dlopen()
OWFS_CONF_OPTS += --disable-zero
endif
$(eval $(autotools-package))