Skip to contentSkip to conversation

owfs: new package

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 3 messages Feb 22, 2016 – Oct 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
v2: Remove redundant part of the patch + improved its commit message.

---
 package/Config.in                                  |  1 +
 .../0001-configure.ac-check-for-localtime_r.patch  | 33 +++++++++++
 package/owfs/Config.in                             | 16 +++++
 package/owfs/owfs.hash                             |  4 ++
 package/owfs/owfs.mk                               | 69 ++++++++++++++++++++++
 5 files changed, 123 insertions(+)
 create mode 100644 package/owfs/0001-configure.ac-check-for-localtime_r.patch
 create mode 100644 package/owfs/Config.in
 create mode 100644 package/owfs/owfs.hash
 create mode 100644 package/owfs/owfs.mk
package/Config.in +1 -0
index dc68184..70b0ee5 100644
@@ -984,6 +984,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"
package/owfs/0001-configure.ac-check-for-localtime_r.patch new file +33 -0
new file mode 100644
index 0000000..c4c3844
@@ -0,0 +1,33 @@
+From 75e92438bcdb78a90912366b07bf503646806686 Mon Sep 17 00:00:00 2001
+From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
+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) <[email protected]>
+---
+ 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
+
package/owfs/Config.in new file +16 -0
new file mode 100644
index 0000000..802d1e4
@@ -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
package/owfs/owfs.hash new file +4 -0
new file mode 100644
index 0000000..3991eec
@@ -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
package/owfs/owfs.mk new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 1/1 owfs: new package

Hello,

Quoted 8 lines · Arnout Vandecappelle (Essensium/Mind)

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.

Fails to build with some compilers due to the usage of #pragma:

http://autobuild.buildroot.org/results/d5d/d5d57843d0bf0060eb77028434d7313e2095c255/build-end.log

Could you have a look? Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 owfs: new package

In reply to Arnout Vandecappelle (Essensium/Mind)

Arnout,

Quoted 4 lines · Arnout Vandecappelle (Essensium/Mind)
package/owfs/owfs.mk new file +4 -0
+# setup.py isn't python3 compliant
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+OWFS_CONF_OPTS += \
+	--enable-owpython \

package/owfs/owfs.mk line 60

Quoted 10 lines
package/owfs/owfs.mk new file +10 -0
+	--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

The Python support is broken, as it installs the Python modules is the wrong directory:

output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/ output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7 output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet-0.3-py2.7.egg-info output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet/connection.pyc output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet/__init__.py output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet/connection.py output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ownet/__init__.pyc output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ow output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ow/_OW.so output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ow/__init__.py output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ow/__init__.pyc output/host/usr/arm-buildroot-linux-gnueabi/sysroot/home/thomas/projets/buildroot/output/host/usr/lib/python2.7/site-packages/ow-3.1p1-py2.7.egg-info

This causes a build failure with the recent check added by Yann:

http://autobuild.buildroot.net/results/1fd/1fd7e3ae15a039f88fe010a1298e28a2fcb6bb0e/build-end.log

This problem is due to how PYSITEDIR is calculated in module/swig/python/python.m4:

PYSITEDIR=($PYTHON -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=1)") 2>/dev/null

Unfortunately, the logic doesn't seem to allow overriding PYSITEDIR at configure time.

Could you have a look? If you don't care about owfs Python support, I'm fine with a patch simply disabling it.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com