libsigrok: preliminary recipe

Needs glibmm to enable the C++ and other language bindings, which will
be needed for most uses.
This commit is contained in:
Adrien Destugues
2019-01-07 23:23:29 +01:00
parent 6c344cde2d
commit 61cdb682ad
2 changed files with 102 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
SUMMARY="Sigrok drivers for logic analyzers and IO file formats"
DESCRIPTION="Analysis software suite that supports various device types \
(e.g. logic analyzers, oscilloscopes, and many more).
* Broad hardware support. Supports many different devices (logic analyzers, \
oscilloscopes, multimeters, data loggers etc.) from various vendors.
* Scriptable protocol decoding. Extendable with stackable protocol decoders.
* Various input/output file formats.
This package contains libsigrok, the library with code shared between the
different frontends.
"
HOMEPAGE="https://sigrok.org"
COPYRIGHT="2011-2018 sigrok contributors"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="http://sigrok.org/download/source/libsigrok/libsigrok-$portVersion.tar.gz"
CHECKSUM_SHA256="e40fde7af98d29e922e9d3cbe0a6c0569889153fc31e47b8b1afe4d846292b9c"
PATCHES="libsigrok-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
lisigrok$secondaryArchSuffix = $portVersion
lib:libsigrok$secondaryArchSuffix = 4.1.0 compat >= 4
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libftdi1$secondaryArchSuffix
lib:libzip$secondaryArchSuffix
lib:libz$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
PROVIDES_devel="
lisigrok${secondaryArchSuffix}_devel = $portVersion
devel:libsigrok$secondaryArchSuffix = 4.1.0 compat >= 4
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libusb_1.0$secondaryArchSuffix
devel:libftdi1$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libzip$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:cmp
cmd:doxygen
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
"
BUILD()
{
export CFLAGS=-D_BSD_SOURCE
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
prepareInstalledDevelLib libsigrok
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -0,0 +1,25 @@
From 926c49b5a4e8828a687b9812e913df789407fbba Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 7 Jan 2019 23:19:59 +0100
Subject: Build fixes
diff --git a/src/hardware/beaglelogic/beaglelogic.h b/src/hardware/beaglelogic/beaglelogic.h
index 2150032..184f2e9 100644
--- a/src/hardware/beaglelogic/beaglelogic.h
+++ b/src/hardware/beaglelogic/beaglelogic.h
@@ -23,8 +23,10 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/ioctl.h>
+#include <sys/ioccom.h>
+#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
--
2.19.1