summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marvin Schmidt <marv@exherbo.org> 2017-06-12 12:17:17 +0200
committerAvatar Marvin Schmidt <marv@exherbo.org> 2017-06-26 12:50:06 +0200
commit5dafb685a31eb0f6558e2244d0e9afc44b71f61d (patch)
tree982a8885ffda2c2d4ccf4b3e6e66d1cac41bba0f
parent68cb32940b7d2b16923ca4963b6cb447eb3e1dbe (diff)
downloadscientific-5dafb685a31eb0f6558e2244d0e9afc44b71f61d.tar.gz
scientific-5dafb685a31eb0f6558e2244d0e9afc44b71f61d.tar.xz
libsigrok: Bump to 0.5.0
Change-Id: I5ef96e6a41369c6b07aee74e531c13e3d5207b4e Reviewed-on: https://galileo.mailstation.de/gerrit/9384 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Marvin Schmidt <marv@exherbo.org>
-rw-r--r--packages/sci-electronics/libsigrok/files/0001-build-Use-AX_RUBY_EXT-macro.patch229
-rw-r--r--packages/sci-electronics/libsigrok/files/0002-Makefile.am-Install-MIME-info-file-in-datadir-mime-p.patch27
-rw-r--r--packages/sci-electronics/libsigrok/files/ax_ruby_ext.m4144
-rw-r--r--packages/sci-electronics/libsigrok/libsigrok-0.5.0.exheres-0 (renamed from packages/sci-electronics/libsigrok/libsigrok-0.4.0.exheres-0)98
4 files changed, 471 insertions, 27 deletions
diff --git a/packages/sci-electronics/libsigrok/files/0001-build-Use-AX_RUBY_EXT-macro.patch b/packages/sci-electronics/libsigrok/files/0001-build-Use-AX_RUBY_EXT-macro.patch
new file mode 100644
index 0000000..9be6ee2
--- /dev/null
+++ b/packages/sci-electronics/libsigrok/files/0001-build-Use-AX_RUBY_EXT-macro.patch
@@ -0,0 +1,229 @@
+From 4823d82bde19adf923ea673651185b3bdfdf7011 Mon Sep 17 00:00:00 2001
+From: Marvin Schmidt <marv@exherbo.org>
+Date: Tue, 13 Jun 2017 14:38:52 +0200
+Subject: [PATCH 1/2] build: Use AX_RUBY_EXT macro
+
+The assumption made for the installation directory RBSIGROK_EXTDIR for
+the Ruby bindings only seems to be valid for Debian/Ubuntu based
+distributions. A more generic and flexible approach is to use the
+AX_RUBY_EXT macro from the autoconf-archive project, which determines
+the installation directory from the config variable
+`RbConfig::CONFIG['sitearchdir']` and allows to override it at
+configure-time using the RUBY_EXT_LIB variable.
+---
+ Makefile.am | 8 +--
+ configure.ac | 11 +----
+ m4/ax_ruby_ext.m4 | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 150 insertions(+), 13 deletions(-)
+ create mode 100644 m4/ax_ruby_ext.m4
+
+diff --git a/Makefile.am b/Makefile.am
+index c9842295..eb03582e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -733,7 +733,7 @@ RDIR = bindings/ruby
+ RDOC = $(RDIR)/doc.i
+ RWRAP = $(RDIR)/classes_wrap.cpp
+ ROBJ = $(RWRAP:.cpp=.o)
+-REXT = $(RDIR)/sigrok.$(RUBY_DLEXT)
++REXT = $(RDIR)/sigrok$(RUBY_EXT_DLEXT)
+
+ $(RDOC): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
+ $(AM_V_at)test -d $(RDIR) || $(MKDIR_P) $(RDIR)
+@@ -757,11 +757,11 @@ $(REXT): $(ROBJ) @ORDER@ bindings/cxx/libsigrokcxx.la
+ ruby-build: $(REXT)
+
+ ruby-install: $(REXT)
+- $(INSTALL) -d $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
+- $(INSTALL) $(REXT) $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)
++ $(INSTALL) -d $(DESTDIR)$(RUBY_EXT_LIB)
++ $(INSTALL) $(REXT) $(DESTDIR)$(RUBY_EXT_LIB)
+
+ ruby-uninstall:
+- rm -f $(DESTDIR)$(prefix)/$(RBSIGROK_EXTDIR)/sigrok.$(RUBY_DLEXT)
++ rm -f $(DESTDIR)$(RUBY_EXT_LIB)/sigrok$(RUBY_EXT_DLEXT)
+
+ ruby-clean:
+ -$(AM_V_at)rm -fr $(RDIR)/doc
+diff --git a/configure.ac b/configure.ac
+index 8282434b..093373b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -418,14 +418,7 @@ AS_IF([test "x$BINDINGS_CXX" = xyes],
+ [sr_ruby_missing=],
+ [sr_ruby_missing='C++ bindings'])
+
+-AC_PATH_PROGS(RUBY, ["${RUBY-ruby}"], [])
+-AS_IF([test "x$RUBY" != x],
+- AC_MSG_CHECKING([for Ruby version])
+- [RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`]
+- AC_MSG_RESULT([$RUBY_VERSION])
+- [RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["DLEXT"]]'`]
+- AC_SUBST(RUBY_DLEXT))
+-
++AX_RUBY_EXT
+ AS_IF([test "x$RUBY" = x],
+ [SR_APPEND([sr_ruby_missing], [', '], [Ruby])])
+
+@@ -520,7 +513,7 @@ PKG_CHECK_MODULES([TESTS], [$SR_PKGLIBS_TESTS glib-2.0 $SR_PKGLIBS])
+ AM_COND_IF([BINDINGS_CXX], [
+ PKG_CHECK_MODULES([LIBSIGROKCXX], [$SR_PKGLIBS_CXX])
+ PKG_CHECK_MODULES([PYSIGROK], [$SR_PKGLIBS_PYTHON $SR_PKGLIBS_CXX])
+- PKG_CHECK_MODULES([RBSIGROK], [$SR_PKGLIBS_RUBY $SR_PKGLIBS_CXX], [AC_SUBST(RBSIGROK_EXTDIR, "lib/$($PKG_CONFIG --variable=sitearch $SR_PKGLIBS_RUBY)/$($PKG_CONFIG --variable=RUBY_BASE_NAME $SR_PKGLIBS_RUBY)/vendor_ruby/$($PKG_CONFIG --variable=ruby_version $SR_PKGLIBS_RUBY)")])
++ PKG_CHECK_MODULES([RBSIGROK], [$SR_PKGLIBS_RUBY $SR_PKGLIBS_CXX])
+ ])
+
+ # Check for specific libusb features, now that we know the CFLAGS.
+diff --git a/m4/ax_ruby_ext.m4 b/m4/ax_ruby_ext.m4
+new file mode 100644
+index 00000000..277dd4ec
+--- /dev/null
++++ b/m4/ax_ruby_ext.m4
+@@ -0,0 +1,144 @@
++# ===========================================================================
++# https://www.gnu.org/software/autoconf-archive/ax_ruby_ext.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++# AX_RUBY_EXT
++#
++# DESCRIPTION
++#
++# Fetches the linker flags and C compiler flags for compiling and linking
++# Ruby binary extensions. The macro substitutes RUBY_VERSION,
++# RUBY_EXT_INC, RUBY_EXT_LIB, RUBY_EXT_CPPFLAGS, RUBY_EXT_LDFLAGS and
++# RUBY_EXT_DLEXT variables if Ruby executable has been found. It also
++# checks the same variables before trying to retrieve them from the Ruby
++# configuration.
++#
++# RUBY_VERSION: version of the Ruby interpreter
++# RUBY_EXT_INC: Ruby include directory
++# RUBY_EXT_LIB: Ruby extensions destination directory
++# RUBY_EXT_CPPFLAGS: C preprocessor flags to compile extensions
++# RUBY_EXT_LDFLAGS: linker flags to build extensions
++# RUBY_EXT_DLEXT: extensions suffix for ruby modules (e.g. "so")
++#
++# Examples:
++#
++# AX_RUBY_EXT
++# if test x"$RUBY" = x; then
++# AC_ERROR(["cannot find Ruby"])
++# fi
++#
++# LICENSE
++#
++# Copyright (c) 2011 Stanislav Sedov <stas@FreeBSD.org>
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions are
++# met:
++#
++# 1. Redistributions of source code must retain the above copyright
++# notice, this list of conditions and the following disclaimer.
++#
++# 2. Redistributions in binary form must reproduce the above copyright
++# notice, this list of conditions and the following disclaimer in the
++# documentation and/or other materials provided with the distribution.
++#
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
++# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
++# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
++# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
++# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
++# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
++# THE POSSIBILITY OF SUCH DAMAGE.
++
++#serial 4
++
++AC_DEFUN([AX_RUBY_EXT],[
++
++ #
++ # Check if ruby executable exists.
++ #
++ AC_PATH_PROGS(RUBY, ["${RUBY-ruby}"], [])
++
++ if test -n "$RUBY" ; then
++
++ AC_MSG_NOTICE([Ruby executable: '$RUBY'])
++
++ #
++ # Check Ruby version.
++ #
++ AC_MSG_CHECKING([for Ruby version])
++ [RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`];
++ AC_MSG_RESULT([$RUBY_VERSION])
++ AC_SUBST(RUBY_VERSION)
++
++ #
++ # Check for Ruby extensions include path.
++ #
++ AC_ARG_VAR(RUBY_EXT_INC, [Directory to include ruby headers from])
++ AC_MSG_CHECKING([for Ruby headers include path])
++ if test -z "$RUBY_EXT_INC" ; then
++ [RUBY_EXT_INC=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["archdir"]'`];
++ fi
++ AC_MSG_RESULT([$RUBY_EXT_INC])
++ AC_SUBST(RUBY_EXT_INC)
++
++ #
++ # Check for the extensions target directory.
++ #
++ AC_ARG_VAR(RUBY_EXT_LIB, [Directory to install ruby extensions into])
++ AC_MSG_CHECKING([for Ruby extensions target directory])
++ if test -z "$RUBY_EXT_LIB" ; then
++ [RUBY_EXT_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]'`];
++ fi
++ AC_MSG_RESULT([$RUBY_EXT_LIB])
++ AC_SUBST(RUBY_EXT_LIB)
++
++ #
++ # Check for Ruby CPP flags.
++ #
++ AC_ARG_VAR(RUBY_EXT_CPPFLAGS, [CPPFLAGS to compile Ruby extensions])
++ AC_MSG_CHECKING([for Ruby extensions C preprocessor flags])
++ if test -z "$RUBY_EXT_CPPFLAGS" ; then
++ [RUBY_EXT_CPPFLAGS=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["CPPFLAGS"]'`];
++ fi
++ AC_MSG_RESULT([$RUBY_EXT_CPPFLAGS])
++ AC_SUBST(RUBY_EXT_CPPFLAGS)
++
++ #
++ # Check for Ruby extensions link flags.
++ #
++ AC_ARG_VAR(RUBY_EXT_LDFLAGS, [LDFLAGS to build Ruby extensions])
++ AC_MSG_CHECKING([for Ruby extensions linker flags])
++ if test -z "$RUBY_EXT_LDFLAGS" ; then
++ [RUBY_EXT_LDFLAGS=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["LDFLAGS"]'`];
++ fi
++ # Fix LDFLAGS for OS X. We don't want any -arch flags here, otherwise
++ # linking might fail. We also including the proper flags to create a bundle.
++ case "$host" in
++ *darwin*)
++ RUBY_EXT_LDFLAGS=`echo ${RUBY_EXT_LDFLAGS} | sed -e "s,-arch [[^ ]]*,,g"`
++ RUBY_EXT_LDFLAGS="${RUBY_EXT_LDFLAGS} -bundle -undefined dynamic_lookup"
++ ;;
++ esac
++ AC_MSG_RESULT([$RUBY_EXT_LDFLAGS])
++ AC_SUBST(RUBY_EXT_LDFLAGS)
++
++ #
++ # Check for Ruby dynamic library extension.
++ #
++ AC_ARG_VAR(RUBY_EXT_DLEXT, [Ruby dynamic library extension])
++ AC_MSG_CHECKING([for Ruby dynamic library extension])
++ if test -z "$RUBY_EXT_DLEXT" ; then
++ [RUBY_EXT_DLEXT=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["DLEXT"]'`];
++ RUBY_EXT_DLEXT=".${RUBY_EXT_DLEXT}"
++ fi
++ AC_MSG_RESULT([$RUBY_EXT_DLEXT])
++ AC_SUBST(RUBY_EXT_DLEXT)
++ fi
++])
+--
+2.13.1
+
diff --git a/packages/sci-electronics/libsigrok/files/0002-Makefile.am-Install-MIME-info-file-in-datadir-mime-p.patch b/packages/sci-electronics/libsigrok/files/0002-Makefile.am-Install-MIME-info-file-in-datadir-mime-p.patch
new file mode 100644
index 0000000..c6a114a
--- /dev/null
+++ b/packages/sci-electronics/libsigrok/files/0002-Makefile.am-Install-MIME-info-file-in-datadir-mime-p.patch
@@ -0,0 +1,27 @@
+From 4cd46a8d6bb184c12113157618739321560a19e0 Mon Sep 17 00:00:00 2001
+From: Uwe Hermann <uwe@hermann-uwe.de>
+Date: Thu, 15 Jun 2017 18:46:14 +0200
+Subject: [PATCH 2/2] Makefile.am: Install MIME info file in
+ $(datadir)/mime/packages.
+
+This fixes bug #983.
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index eb03582e..93e1f31d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -544,7 +544,7 @@ noinst_HEADERS = src/libsigrok-internal.h
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libsigrok.pc
+
+-mimeappdir = $(datadir)/mime/application
++mimeappdir = $(datadir)/mime/packages
+ mimeapp_DATA = contrib/vnd.sigrok.session.xml
+
+ mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes
+--
+2.13.1
+
diff --git a/packages/sci-electronics/libsigrok/files/ax_ruby_ext.m4 b/packages/sci-electronics/libsigrok/files/ax_ruby_ext.m4
new file mode 100644
index 0000000..277dd4e
--- /dev/null
+++ b/packages/sci-electronics/libsigrok/files/ax_ruby_ext.m4
@@ -0,0 +1,144 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_ruby_ext.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_RUBY_EXT
+#
+# DESCRIPTION
+#
+# Fetches the linker flags and C compiler flags for compiling and linking
+# Ruby binary extensions. The macro substitutes RUBY_VERSION,
+# RUBY_EXT_INC, RUBY_EXT_LIB, RUBY_EXT_CPPFLAGS, RUBY_EXT_LDFLAGS and
+# RUBY_EXT_DLEXT variables if Ruby executable has been found. It also
+# checks the same variables before trying to retrieve them from the Ruby
+# configuration.
+#
+# RUBY_VERSION: version of the Ruby interpreter
+# RUBY_EXT_INC: Ruby include directory
+# RUBY_EXT_LIB: Ruby extensions destination directory
+# RUBY_EXT_CPPFLAGS: C preprocessor flags to compile extensions
+# RUBY_EXT_LDFLAGS: linker flags to build extensions
+# RUBY_EXT_DLEXT: extensions suffix for ruby modules (e.g. "so")
+#
+# Examples:
+#
+# AX_RUBY_EXT
+# if test x"$RUBY" = x; then
+# AC_ERROR(["cannot find Ruby"])
+# fi
+#
+# LICENSE
+#
+# Copyright (c) 2011 Stanislav Sedov <stas@FreeBSD.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+#serial 4
+
+AC_DEFUN([AX_RUBY_EXT],[
+
+ #
+ # Check if ruby executable exists.
+ #
+ AC_PATH_PROGS(RUBY, ["${RUBY-ruby}"], [])
+
+ if test -n "$RUBY" ; then
+
+ AC_MSG_NOTICE([Ruby executable: '$RUBY'])
+
+ #
+ # Check Ruby version.
+ #
+ AC_MSG_CHECKING([for Ruby version])
+ [RUBY_VERSION=`$RUBY -e 'puts RUBY_VERSION'`];
+ AC_MSG_RESULT([$RUBY_VERSION])
+ AC_SUBST(RUBY_VERSION)
+
+ #
+ # Check for Ruby extensions include path.
+ #
+ AC_ARG_VAR(RUBY_EXT_INC, [Directory to include ruby headers from])
+ AC_MSG_CHECKING([for Ruby headers include path])
+ if test -z "$RUBY_EXT_INC" ; then
+ [RUBY_EXT_INC=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["archdir"]'`];
+ fi
+ AC_MSG_RESULT([$RUBY_EXT_INC])
+ AC_SUBST(RUBY_EXT_INC)
+
+ #
+ # Check for the extensions target directory.
+ #
+ AC_ARG_VAR(RUBY_EXT_LIB, [Directory to install ruby extensions into])
+ AC_MSG_CHECKING([for Ruby extensions target directory])
+ if test -z "$RUBY_EXT_LIB" ; then
+ [RUBY_EXT_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]'`];
+ fi
+ AC_MSG_RESULT([$RUBY_EXT_LIB])
+ AC_SUBST(RUBY_EXT_LIB)
+
+ #
+ # Check for Ruby CPP flags.
+ #
+ AC_ARG_VAR(RUBY_EXT_CPPFLAGS, [CPPFLAGS to compile Ruby extensions])
+ AC_MSG_CHECKING([for Ruby extensions C preprocessor flags])
+ if test -z "$RUBY_EXT_CPPFLAGS" ; then
+ [RUBY_EXT_CPPFLAGS=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["CPPFLAGS"]'`];
+ fi
+ AC_MSG_RESULT([$RUBY_EXT_CPPFLAGS])
+ AC_SUBST(RUBY_EXT_CPPFLAGS)
+
+ #
+ # Check for Ruby extensions link flags.
+ #
+ AC_ARG_VAR(RUBY_EXT_LDFLAGS, [LDFLAGS to build Ruby extensions])
+ AC_MSG_CHECKING([for Ruby extensions linker flags])
+ if test -z "$RUBY_EXT_LDFLAGS" ; then
+ [RUBY_EXT_LDFLAGS=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["LDFLAGS"]'`];
+ fi
+ # Fix LDFLAGS for OS X. We don't want any -arch flags here, otherwise
+ # linking might fail. We also including the proper flags to create a bundle.
+ case "$host" in
+ *darwin*)
+ RUBY_EXT_LDFLAGS=`echo ${RUBY_EXT_LDFLAGS} | sed -e "s,-arch [[^ ]]*,,g"`
+ RUBY_EXT_LDFLAGS="${RUBY_EXT_LDFLAGS} -bundle -undefined dynamic_lookup"
+ ;;
+ esac
+ AC_MSG_RESULT([$RUBY_EXT_LDFLAGS])
+ AC_SUBST(RUBY_EXT_LDFLAGS)
+
+ #
+ # Check for Ruby dynamic library extension.
+ #
+ AC_ARG_VAR(RUBY_EXT_DLEXT, [Ruby dynamic library extension])
+ AC_MSG_CHECKING([for Ruby dynamic library extension])
+ if test -z "$RUBY_EXT_DLEXT" ; then
+ [RUBY_EXT_DLEXT=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG["DLEXT"]'`];
+ RUBY_EXT_DLEXT=".${RUBY_EXT_DLEXT}"
+ fi
+ AC_MSG_RESULT([$RUBY_EXT_DLEXT])
+ AC_SUBST(RUBY_EXT_DLEXT)
+ fi
+])
diff --git a/packages/sci-electronics/libsigrok/libsigrok-0.4.0.exheres-0 b/packages/sci-electronics/libsigrok/libsigrok-0.5.0.exheres-0
index 633c207..3ed295c 100644
--- a/packages/sci-electronics/libsigrok/libsigrok-0.4.0.exheres-0
+++ b/packages/sci-electronics/libsigrok/libsigrok-0.5.0.exheres-0
@@ -1,9 +1,12 @@
-# Copyright 2013, 2014 Marvin Schmidt <marv@exherbo.org>
+# Copyright 2013, 2014, 2017 Marvin Schmidt <marv@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
# python interpreter is needed to build python and C++ bindings,
# but requested by the build system even when bindings are not built
require python [ blacklist=none multibuild=false ]
+require ruby [ blacklist=none multibuild=false with_opt=true ]
+require freedesktop-mime
+require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ]
SUMMARY="Sigrok hardware driver library"
HOMEPAGE="https://sigrok.org"
@@ -14,58 +17,78 @@ SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS="
cxx [[ description = [ Build C++ bindings ] ]]
- python [[ requires = cxx description = [ Build Python bindings ] ]]
- java [[ requires = cxx description = [ Build Java bindings ] ]]
+ java [[
+ description = [ Build Java bindings ]
+ requires = cxx
+ ]]
+ python [[
+ description = [ Build Python bindings ]
+ requires = cxx
+ ]]
+ ruby [[
+ description = [ Build Ruby bindings ]
+ requires = cxx
+ ]]
+
asix-sigma [[ description = [ Add support for the ASIX Sigma logic analyzer ] ]]
chronovu-la [[ description = [ Add support for the ChronoVu LA ] ]]
- ikalogic-scanaplus [[ description = [ Add support for the Ikalogic ScanaPlus ] ]]
+ ftdi-la [[ description = [ Add support for FTDI chip based logic analyzers ] ]]
hung-chang-dso-2100 [[ description = [ Add support for the Hung-Chang DSO-2100 ] ]]
+ ikalogic-scanaplus [[ description = [ Add support for the Ikalogic ScanaPlus ] ]]
pipistrello-ols [[ description = [ Add support for the Pipistrello-OLS ] ]]
"
DEPENDENCIES="
build:
virtual/pkg-config[>=0.22]
- cxx? (
- app-doc/doxygen
- gnome-bindings/glibmm:2.4[>=2.32.0][-disable-deprecated]
- )
+ cxx? ( app-doc/doxygen )
+ java? ( dev-lang/swig )
python? (
dev-lang/swig[python]
- dev-python/numpy[python_abis:*(-)?]
dev-python/setuptools[python_abis:*(-)?]
- gnome-bindings/pygobject:3[>=3.0.0]
- )
- java? (
- dev-lang/swig
- virtual/jdk:=
)
+ ruby? ( dev-lang/swig[>=3.0.8][ruby][ruby_abis:*(-)?] )
build+run:
app-arch/libzip[>=0.10]
dev-libs/glib:2[>=2.32.0]
dev-libs/libserialport[>=0.1.1]
dev-libs/libusb:1[>=1.0.16]
- asix-sigma? (
- dev-libs/libftdi:0[>=0.16]
- sys-libs/zlib[>=1.2.3.1]
+ cxx? ( gnome-bindings/glibmm:2.4[>=2.32.0][-disable-deprecated] )
+ java? (
+ dev-lang/swig
+ virtual/jdk:=
)
- chronovu-la? ( dev-libs/libftdi:0[>=0.16] )
- ikalogic-scanaplus? ( dev-libs/libftdi:0[>=0.16] )
- hung-chang-dso-2100? ( sys-libs/libieee1284 )
- pipistrello-ols? ( dev-libs/libftdi:0[>=0.16] )
+ python? (
+ dev-python/numpy[python_abis:*(-)?]
+ gnome-bindings/pygobject:3[>=3.0.0][python_abis:*(-)?]
+ )
+ (
+ asix-sigma? (
+ dev-libs/libftdi:1[>=1.0]
+ sys-libs/zlib[>=1.2.3.1]
+ )
+ chronovu-la? ( dev-libs/libftdi:1[>=1.0] )
+ ftdi-la? ( dev-libs/libftdi:1[>=1.0] )
+ hung-chang-dso-2100? ( sys-libs/libieee1284 )
+ ikalogic-scanaplus? ( dev-libs/libftdi:1[>=1.0] )
+ pipistrello-ols? ( dev-libs/libftdi:1[>=1.0] )
+ ) [[ note = [ Device specific dependencies ] ]]
test:
dev-libs/check[>=0.9.4]
"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/0001-build-Use-AX_RUBY_EXT-macro.patch
+ "${FILES}"/0002-Makefile.am-Install-MIME-info-file-in-datadir-mime-p.patch
+)
DEFAULT_SRC_CONFIGURE_PARAMS=(
- # bindings/ruby missing from tarball
- '--disable-ruby'
-
# drivers with no external dependencies
'--enable-demo'
'--enable-baylibre-acme'
'--enable-beaglelogic'
+ '--enable-hp-3457a'
+ '--enable-lecroy-xstream'
'--enable-maynuo-m97'
'--enable-rigol-ds'
'--enable-scpi-pps'
@@ -74,13 +97,13 @@ DEFAULT_SRC_CONFIGURE_PARAMS=(
# drivers dependent on libserialport
'--enable-agilent-dmm'
'--enable-appa-55ii'
+ '--enable-arachnid-labs-re-load-pro'
'--enable-atten-pps3xxx'
'--enable-brymen-dmm'
'--enable-cem-dt-885x'
'--enable-center-3xx'
'--enable-colead-slm'
'--enable-conrad-digi-35-cpu'
- '--enable-deree-de5000'
'--enable-fluke-dmm'
'--enable-gmc-mh-1x-2x'
'--enable-gwinstek-gds-800'
@@ -92,13 +115,17 @@ DEFAULT_SRC_CONFIGURE_PARAMS=(
'--enable-motech-lps-30x'
'--enable-norma-dmm'
'--enable-openbench-logic-sniffer'
+ '--enable-pce-322a'
+ '--enable-rohde-schwarz-sme-0x'
'--enable-serial-dmm'
+ '--enable-serial-lcr'
'--enable-teleinfo'
'--enable-tondaj-sl-814'
# drivers dependent on libusb
'--enable-brymen-bm86x'
'--enable-fx2lafw'
+ '--enable-hantek-6xxx'
'--enable-hantek-dso'
'--enable-ikalogic-scanalogic2'
'--enable-kecheng-kc-330b'
@@ -115,12 +142,29 @@ DEFAULT_SRC_CONFIGURE_PARAMS=(
DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=(
'cxx'
- 'python'
'java'
+ 'python'
+ 'ruby'
+
'asix-sigma'
'chronovu-la'
- 'ikalogic-scanaplus'
+ 'ftdi-la'
'hung-chang-dso-2100'
+ 'ikalogic-scanaplus'
'pipistrello-ols'
)
+AT_M4DIR=( 'm4' )
+
+src_prepare() {
+ default
+
+ # We need version 4 of this macro which will be shipped
+ # with the next autoconf-archive release after v2017.03.21
+ edo cp "${FILES}"/ax_ruby_ext.m4 "${WORK}"/m4
+
+ eautoreconf
+
+ option ruby && export RUBY=ruby$(ruby_get_abi)
+}
+