summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-09-21 16:30:10 +0200
committerThomas Deutschmann <whissi@gentoo.org>2016-09-21 16:30:32 +0200
commit2574a982584646c67e6abc8c4429acbf8a5dc047 (patch)
tree811235a3c9d17873a5ab3c5addafb4fc5d04c813 /sys-fs
parent4270f55c320a9af75d93a579ef651fde216d109a (diff)
downloadgentoo-2574a982584646c67e6abc8c4429acbf8a5dc047.tar.gz
gentoo-2574a982584646c67e6abc8c4429acbf8a5dc047.tar.xz
sys-fs/owfs: Bump to v3.1.p4
Changes: ======== - Disabled autodetection of libftdi and libavahi; These configure flags will now only be enabled when the user has the the appropriate USE flags. - Fixed missing sys/sysmacros.h includes (bug #580922) - Fixed systemd detection (bug #576648) Gentoo-Bug: https://bugs.gentoo.org/580922 Gentoo-Bug: https://bugs.gentoo.org/576648 Package-Manager: portage-2.3.1
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/owfs/Manifest1
-rw-r--r--sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch78
-rw-r--r--sys-fs/owfs/metadata.xml5
-rw-r--r--sys-fs/owfs/owfs-3.1_p4.ebuild191
4 files changed, 275 insertions, 0 deletions
diff --git a/sys-fs/owfs/Manifest b/sys-fs/owfs/Manifest
index cb7f4e36f5a..549445dd52c 100644
--- a/sys-fs/owfs/Manifest
+++ b/sys-fs/owfs/Manifest
@@ -1,2 +1,3 @@
DIST owfs-2.7p21.tar.gz 1247466 SHA256 070a3368e9400e900618f8a704f487baf3671f6764715b4de04b151c66d3306d SHA512 ec6d372d32ebf59278c2c68d5fbed42664f52bc1702f4ea8e5506457594943413e37801d341102029cb48a9d8c3d6b3d68615a1dd517c93aa0a475a1bb06c4cf WHIRLPOOL 31901ae07a7431a368cdb4fa0a30a1885da29f55187dc601b53f2e9ebf4e11aba73de93d7f6308671ecb3afa8433548b41a2e79a9a0cc4771adee93a5a6a1ddd
DIST owfs-3.1p1.tar.gz 1400962 SHA256 e69421ae534565c1f8530a2447f583401f4d0d4b1cf3cb8cf399a57133ed7f81 SHA512 f5c2694ce1076969cf4a6970a07b2c2edee42cfbc6886c1790d777d650cc0afe42cf3282328f8832d5286a0aa5827c48e3d4657412ba3391db5e26adfa890cf5 WHIRLPOOL 2a3a4ebeb3eebaf0d370a7dcc8a9a5fb95defa3e218039f9203b996e4ac2272c2a16323bb8e43da39df9a389dbd057e49c936f40bdc08de201076fbd8d2fdba4
+DIST owfs-3.1p4.tar.gz 1455420 SHA256 83ea34ede9f44665c5bef4e46fd9bbc087ad8a76c533bcbf03b436b7601e1e54 SHA512 9d04b466fc64761f53dc5fb11b4eb71d10154be5eb335174e8a9002a944bb3f2fbfe1cea3cf5962aa794486830e78d7ba5a7a87c68e3a4d32ab1a95e7ca59cdb WHIRLPOOL 0a1790e111e01bd66237899311ae348bd347f6446094fe7a33d36f2f86db5c18211abd13f76c7e080398f3daf3f20184542f083c818f028ec6f2ca695accebd4
diff --git a/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch b/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch
new file mode 100644
index 00000000000..dcb67a6d19c
--- /dev/null
+++ b/sys-fs/owfs/files/owfs-3.1p4-sysmacros.patch
@@ -0,0 +1,78 @@
+From 6565314e775232cf1682b35720b8b1b207a16f3e Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Wed, 21 Sep 2016 15:38:52 +0200
+Subject: [PATCH] configure: Add AC_HEADER_MAJOR to find where major() is
+ defined
+
+glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
+change in a future release.
+
+https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+
+Gentoo-Bug: https://bugs.gentoo.org/580922
+---
+ configure.ac | 4 +++-
+ module/owlib/src/include/ow.h | 7 +++++--
+ module/ownet/c/src/include/ow.h | 8 ++++++--
+ 3 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c1e3d77..3b32fbe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -180,10 +180,12 @@ m4_include([src/scripts/m4/acx_pthread.m4])
+ # Checks for header files.
+ AC_HEADER_DIRENT
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/mkdev.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
++AC_CHECK_HEADERS([asm/types.h arpa/inet.h sys/ioctl.h sys/socket.h sys/time.h sys/times.h sys/types.h sys/param.h sys/uio.h feature_tests.h fcntl.h netinet/in.h stdlib.h string.h strings.h sys/file.h syslog.h termios.h unistd.h limits.h stdint.h features.h getopt.h resolv.h semaphore.h])
+ AC_CHECK_HEADERS([linux/limits.h linux/types.h netdb.h dlfcn.h])
+ AC_CHECK_HEADERS(sys/event.h sys/inotify.h)
+
++AC_HEADER_MAJOR
++
+ # Test if debugging out enabled
+ ENABLE_DEBUG="true"
+ AC_MSG_CHECKING([if debug-output is enabled])
+diff --git a/module/owlib/src/include/ow.h b/module/owlib/src/include/ow.h
+index 9dbec5f..2a6050d 100644
+--- a/module/owlib/src/include/ow.h
++++ b/module/owlib/src/include/ow.h
+@@ -188,9 +188,12 @@
+ #include <netdb.h> /* for getaddrinfo */
+ #endif /* HAVE_NETDB_H */
+
+-#ifdef HAVE_SYS_MKDEV_H
++#ifdef MAJOR_IN_MKDEV
+ #include <sys/mkdev.h> /* for major() */
+-#endif /* HAVE_SYS_MKDEV_H */
++#endif /* MAJOR_IN_MKDEV */
++#ifdef MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h> /* for major() */
++#endif /* MAJOR_IN_MKDEV */
+
+ #include <stddef.h> // for offsetof()
+
+diff --git a/module/ownet/c/src/include/ow.h b/module/ownet/c/src/include/ow.h
+index c157a7c..aeeba8e 100644
+--- a/module/ownet/c/src/include/ow.h
++++ b/module/ownet/c/src/include/ow.h
+@@ -118,9 +118,13 @@
+
+ #include <netdb.h> /* addrinfo */
+
+-#ifdef HAVE_SYS_MKDEV_H
++#ifdef MAJOR_IN_MKDEV
+ #include <sys/mkdev.h> /* for major() */
+-#endif /* HAVE_SYS_MKDEV_H */
++#endif /* MAJOR_IN_MKDEV */
++#ifdef MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h> /* for major() */
++#endif /* MAJOR_IN_MKDEV */
++
+
+ /* Can't include search.h when compiling owperl on Fedora Core 1. */
+ #ifndef SKIP_SEARCH_H
+--
+2.10.0
+
diff --git a/sys-fs/owfs/metadata.xml b/sys-fs/owfs/metadata.xml
index b78f39c9c69..0b9818389ae 100644
--- a/sys-fs/owfs/metadata.xml
+++ b/sys-fs/owfs/metadata.xml
@@ -8,14 +8,19 @@
physical environment. You can write scripts to read temperature, flash
lights, write to an LCD, log and graph, ...
</longdescription>
+ <slots>
+ <subslots>Reflect ABI of libow.so.</subslots>
+ </slots>
<upstream>
<remote-id type="sourceforge">owfs</remote-id>
</upstream>
<use>
+ <flag name="ftdi">Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag>
<flag name="ftpd">Enable building the OWFS FTP server (owftpd)</flag>
<flag name="fuse">Enable building the FUSE-based OWFS client (owfs)</flag>
<flag name="httpd">Enable building the OWFS web server (owhttpd)</flag>
<flag name="parport">Enable support for the DS1410E parallel port adapter</flag>
<flag name="server">Enable building the OWFS server (owserver)</flag>
+ <flag name="zeroconf">Enables support for zero-configuration networking via <pkg>net-dns/avahi</pkg></flag>
</use>
</pkgmetadata>
diff --git a/sys-fs/owfs/owfs-3.1_p4.ebuild b/sys-fs/owfs/owfs-3.1_p4.ebuild
new file mode 100644
index 00000000000..149c87cb102
--- /dev/null
+++ b/sys-fs/owfs/owfs-3.1_p4.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools distutils-r1 eutils linux-info perl-functions systemd user
+
+MY_P=${P/_/}
+
+DESCRIPTION="Access 1-Wire devices like a filesystem"
+SRC_URI="mirror://sourceforge/owfs/${MY_P}.tar.gz"
+HOMEPAGE="http://owfs.org/ https://sourceforge.net/projects/owfs/"
+
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0/4.0.0"
+LICENSE="GPL-2"
+
+RDEPEND="
+ ftdi? ( dev-embedded/libftdi:0 )
+ fuse? ( sys-fs/fuse )
+ perl? ( dev-lang/perl:= )
+ parport? ( sys-kernel/linux-headers )
+ php? ( dev-lang/php:=[cli] )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:0= )
+ usb? ( virtual/libusb:0 )
+ zeroconf? ( net-dns/avahi[mdnsresponder-compat] )"
+
+DEPEND="${RDEPEND}
+ perl? ( dev-lang/swig )
+ php? ( dev-lang/swig )
+ python? ( dev-lang/swig )"
+
+IUSE="debug ftdi ftpd fuse httpd parport perl php python tcl usb zeroconf"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.1-vendordir.patch
+ "${FILESDIR}"/${PN}-3.1p4-sysmacros.patch
+)
+
+S=${WORKDIR}/${MY_P}
+
+OWUID=${OWUID:-owfs}
+OWGID=${OWGID:-owfs}
+
+pkg_setup() {
+ if use kernel_linux; then
+ linux-info_pkg_setup
+
+ if linux_config_exists; then
+ if ! linux_chkconfig_present W1; then
+ ewarn "CONFIG_W1 isn't set. You will not be able to use 1-wire bus on this system!"
+ fi
+ else
+ elog "Cannot find a linux kernel configuration. Continuing anyway."
+ fi
+ fi
+
+ use perl && perl_set_version
+
+ enewgroup ${OWGID} 150
+ enewuser ${OWUID} 150 -1 -1 ${OWGID}
+}
+
+src_prepare() {
+ default
+
+ # Support user's CFLAGS and LDFLAGS.
+ sed -i "s/@CPPFLAGS@/@CPPFLAGS@ ${CFLAGS}/" \
+ module/swig/perl5/OW/Makefile.linux.in || die
+ sed -i "s/@LIBS@/@LIBS@ ${LDFLAGS}/" \
+ module/swig/perl5/OW/Makefile.linux.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # disable owpython since we can build python anyway
+ # and without it, we don't have to fix the build ;)
+ local myeconf=(
+ $(use_enable debug)
+ $(use_enable fuse owfs)
+ $(use_enable ftdi)
+ $(use_enable ftpd owftpd)
+ $(use_enable httpd owhttpd)
+ $(use_enable parport)
+ $(use_enable perl owperl)
+ $(use_enable php owphp)
+ --disable-owpython
+ $(use_enable tcl owtcl)
+ $(use_enable zeroconf avahi)
+ $(use_enable zeroconf zero)
+ $(use_enable usb)
+ --with-systemdsystemunitdir=$(systemd_get_systemunitdir)
+ )
+
+ if use httpd || use ftpd || use fuse; then
+ myeconf+=( --enable-owserver )
+ else
+ myeconf+=( --disable-owserver )
+ fi
+
+ econf ${myeconf[@]}
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ local CFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+ pushd module/ownet/python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+
+ pushd module/swig/python > /dev/null || die
+ emake ow_wrap.c
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ default
+
+ if use httpd || use ftpd || use fuse; then
+ newinitd "${FILESDIR}"/owserver.initd-r1 owserver
+ newconfd "${FILESDIR}"/owserver.confd owserver
+
+ for i in httpd ftpd; do
+ if use ${i}; then
+ newinitd "${FILESDIR}"/ow${i}.initd-r1 ow${i}
+ newconfd "${FILESDIR}"/ow${i}.confd ow${i}
+ fi
+ done
+
+ if use fuse; then
+ dodir /var/lib/owfs
+ dodir /var/lib/owfs/mnt
+ newinitd "${FILESDIR}"/owfs.initd-r1 owfs
+ newconfd "${FILESDIR}"/owfs.confd owfs
+ fi
+ fi
+
+ use perl && perl_delete_localpod
+
+ if use python; then
+ pushd module/ownet/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+
+ pushd module/swig/python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if use httpd || use ftpd || use fuse; then
+ echo
+ if [[ ${OWUID} != root ]]; then
+ ewarn
+ ewarn "In order to allow the OWFS daemon user '${OWUID}' to read"
+ ewarn "from and/or write to a 1 wire bus controller device, make"
+ ewarn "sure the user has appropriate permission to access the"
+ ewarn "corresponding device node/path (e.g. /dev/ttyS0), for example"
+ ewarn "by adding the user to the group 'uucp' (for serial devices)"
+ ewarn "or 'usb' (for USB devices accessed via usbfs on /proc/bus/usb),"
+ ewarn "or install an appropriate UDEV rules (see http://owfs.org/index.php?page=udev-and-usb"
+ ewarn "for more information)."
+ ewarn
+ if use fuse; then
+ ewarn "In order to allow regular users to read from and/or write to"
+ ewarn "1 wire bus devices accessible via the owfs FUSE filesystem"
+ ewarn "client and its filesystem mountpoint, make sure the user is"
+ ewarn "a member of the group '${OWGID}'."
+ ewarn
+ fi
+ echo
+ fi
+ fi
+}