# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {michaelld @michaelld} openmaintainer
description ${name} is used to interface to the Industrial Input/Output (IIO) Subsystem
long_description ${description}. The IIO subsystem is intended to provide support for devices that in some sense are analog to digital or digital to analog converters (ADCs, DACs). This includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, Capacitance to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors, Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis), PLLs (Phase Locked Loops), Variable/Programmable Gain Amplifiers (VGA, PGA), and RF transceivers. You can use libiio natively on an embedded Linux target (local mode), or use libiio to communicate remotely to that same target from a host Linux, Windows, or MAC over USB or Ethernet or Serial. Provides the GIT master branch version, which is typically updated every few days to week.
github.setup analogdevicesinc libiio 72feae0bca60e5c7803f5120e69edd287a419264
checksums rmd160 5b12981ed11bf1ebd7b81bb321fac8ca87f40040 \
sha256 37800225faa5da4dfc1acb9387116aa30c0286cf67e26febb22c6a751018f406 \
depends_lib-append port:libxml2 \
path:lib/libusb.dylib:libusb \
port:avahi port:xz port:zlib port:libiconv
depends_build-append port:pkgconfig \
port:python27 port:doxygen
# patch to fix install directory of the framework
patchfiles-append patch-fix_build.diff
# do VPATH (out of source tree) build
# remove top-level library path, such that internal libraries are used
# instead of any already-installed ones.
configure.ldflags-delete -L${prefix}/lib
# directory to install all CMake files; internal appends "uhd"
-DAVAHI_CLIENT_LIBRARIES=${prefix}/lib/libavahi-client.dylib \
-DAVAHI_COMMON_LIBRARIES=${prefix}/lib/libavahi-common.dylib \
-DLIBLZMA_INCLUDE_DIR:PATH=${prefix}/include \
-DLIBLZMA_LIBRARY:FILEPATH=${prefix}/lib/liblzma.dylib \
-DLIBUSB_INCLUDE_DIR:PATH=${prefix}/include \
-DLIBUSB_LIBRARIES:FILEPATH=${prefix}/lib/libusb-1.0.dylib \
-DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7 \
-DZLIB_INCLUDE_DIR:PATH=${prefix}/include \
-DZLIB_LIBRARY_RELEASE:FILEPATH=${prefix}/lib/libz.dylib \
-DCMAKE_INSTALL_MP_FRAMEWORKS_DIR=${frameworks_dir}
# move Python install to frameworks_dir for Python
set py_install_dir ${frameworks_dir}/Python.framework/Versions/2.7/lib
xinstall -m 755 -d ${destroot}${py_install_dir}
move ${destroot}${prefix}/lib/python2.7 ${destroot}${py_install_dir}
# link from iio.framework to normal
set iio_framework_version 0.15
set iio_framework_top ${frameworks_dir}/iio.framework
set iio_framework ${iio_framework_top}/Versions/${iio_framework_version}/iio
set iio_dr_framework_top ${destroot}${iio_framework_top}
# fix iio library & link it into .../lib
xinstall -m 755 -d ${destroot}${prefix}/lib
ln -s ${iio_framework_top}/Versions/${iio_framework_version}/iio ${destroot}${prefix}/lib/libiio.dylib
system "install_name_tool -id ${iio_framework} ${destroot}${iio_framework}"
# fix Tools, and link them into .../bin
xinstall -m 755 -d ${destroot}${prefix}/bin
foreach app [glob ${iio_dr_framework_top}/Tools/*] {
set non_dr_app [strsed ${app} "s@${destroot}@@"]
set lib_iio_framework [strsed ${iio_framework} "s@Library/Frameworks@lib@"]
system "install_name_tool -change ${lib_iio_framework} ${iio_framework} ${app}"
ln -s ${non_dr_app} ${destroot}${prefix}/bin
# link includes into .../include
xinstall -m 755 -d ${destroot}${prefix}/include
foreach header [glob ${iio_dr_framework_top}/Versions/${iio_framework_version}/Headers/*] {
ln -s [strsed ${header} "s@${destroot}@@"] ${destroot}${prefix}/include