diff --git a/common/shlibs b/common/shlibs index 64743fdec7c..e167dc925fd 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2818,3 +2818,7 @@ libmutter-cogl-pango-0.so mutter-3.24.0_1 libmozjs-.so mozjs38-38.8.0_1 libostree-1.so.1 libostree-2017.3_1 librhash.so.0 rhash-1.3.4_1 +libserialport.so.0 libserialport-0.1.1_1 +libsigrok.so.3 libsigrok-0.4.0_1 +libsigrokcxx.so.3 libsigrok-0.4.0_1 +libsigrokdecode.so.3 libsigrokdecode-0.4.1_1 diff --git a/srcpkgs/libserialport-devel b/srcpkgs/libserialport-devel new file mode 120000 index 00000000000..79777debf8a --- /dev/null +++ b/srcpkgs/libserialport-devel @@ -0,0 +1 @@ +libserialport \ No newline at end of file diff --git a/srcpkgs/libserialport/template b/srcpkgs/libserialport/template new file mode 100644 index 00000000000..3e75ad0e96d --- /dev/null +++ b/srcpkgs/libserialport/template @@ -0,0 +1,23 @@ +# Template file for 'libserialport' +pkgname=libserialport +version=0.1.1 +revision=1 +build_style=gnu-configure +short_desc="Cross-platform library for accessing serial ports" +maintainer="lemmi " +license="GPL-3" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" +checksum=4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d + +libserialport-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} + diff --git a/srcpkgs/libsigrok-devel b/srcpkgs/libsigrok-devel new file mode 120000 index 00000000000..1980042823e --- /dev/null +++ b/srcpkgs/libsigrok-devel @@ -0,0 +1 @@ +libsigrok/ \ No newline at end of file diff --git a/srcpkgs/libsigrok/patches/replace_stringify_macro.patch b/srcpkgs/libsigrok/patches/replace_stringify_macro.patch new file mode 100644 index 00000000000..6172d11c4d8 --- /dev/null +++ b/srcpkgs/libsigrok/patches/replace_stringify_macro.patch @@ -0,0 +1,12 @@ +--- src/hardware/beaglelogic/beaglelogic.h ++++ src/hardware/beaglelogic/beaglelogic.h +@@ -30,8 +30,7 @@ + + /* BeagleLogic device node name */ + #define BEAGLELOGIC_DEV_NODE "/dev/beaglelogic" +-#define BEAGLELOGIC_SYSFS_ATTR(a) "/sys/devices/virtual/misc/beaglelogic/"\ +- __STRING(a) ++#define BEAGLELOGIC_SYSFS_ATTR(a) "/sys/devices/virtual/misc/beaglelogic/" #a + + /* Reproduced verbatim from beaglelogic.h in the kernel tree until the kernel + * module hits the mainline. Contains the ABI, so DO NOT TOUCH this section */ diff --git a/srcpkgs/libsigrok/template b/srcpkgs/libsigrok/template new file mode 100644 index 00000000000..b31e7ee6b48 --- /dev/null +++ b/srcpkgs/libsigrok/template @@ -0,0 +1,30 @@ +# Template file for 'libsigrok' +pkgname=libsigrok +version=0.4.0 +revision=1 +build_style=gnu-configure +hostmakedepends="pkg-config doxygen python3" +_devicelibs="libserialport-devel libusb-devel libftdi1-devel" + +case $XBPS_TARGET_MACHINE in + i686* | x86_64*) _devicelibs+=" libieee1284-devel";; +esac + +makedepends="glib-devel libzip-devel glibmm-devel ${_devicelibs}" +short_desc="C library for talking to hardware" +maintainer="lemmi " +license="GPL-3" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" +checksum=5f291f3fee36e6dab1336f1c78596e50588831bc5ebd7cddc2a95fe8c71d669e + +libsigrok-devel_package() { + depends="${sourcepkg}>=${version}_${revision} ${_devicelibs}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libsigrokdecode-devel b/srcpkgs/libsigrokdecode-devel new file mode 120000 index 00000000000..5d1fb164d3b --- /dev/null +++ b/srcpkgs/libsigrokdecode-devel @@ -0,0 +1 @@ +libsigrokdecode \ No newline at end of file diff --git a/srcpkgs/libsigrokdecode/template b/srcpkgs/libsigrokdecode/template new file mode 100644 index 00000000000..260f7179728 --- /dev/null +++ b/srcpkgs/libsigrokdecode/template @@ -0,0 +1,24 @@ +# Template file for 'libsigrokdecode' +pkgname=libsigrokdecode +version=0.4.1 +revision=1 +build_style=gnu-configure +hostmakedepends="pkg-config python3" +makedepends="glib-devel python3-devel" +short_desc="C library provides basic API for running sigrok protocol decoders" +maintainer="lemmi " +license="GPL-3" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" +checksum=065f70c10971173d86e03a8cf5534e600c7a622775113997d8061572135d4a95 + +libsigrokdecode-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/pulseview/template b/srcpkgs/pulseview/template new file mode 100644 index 00000000000..52593413f35 --- /dev/null +++ b/srcpkgs/pulseview/template @@ -0,0 +1,22 @@ +# Template file for 'pulseview' +pkgname=pulseview +version=0.3.0 +revision=1 +build_style=cmake +configure_args="-DDISABLE_WERROR=TRUE" +hostmakedepends="pkg-config qt5-qmake" +makedepends="glib-devel libzip-devel glibmm-devel python3-devel qt5-devel + qt5-svg-devel boost-devel libsigrok-devel libsigrokdecode-devel" +depends="sigrok-firmware-fx2lafw qt5-svg" +short_desc="Qt-based LA/scope/MSO GUI for sigrok" +maintainer="lemmi " +license="GPL-3" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" +checksum=5ffe2cb7a602fcdc60933d400c77bcd66e6ce529bc4f6e97d6a5e5a86f2f530e + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" qt5-host-tools qt5-devel" +fi + +CXXFLAGS+=" -fext-numeric-literals" diff --git a/srcpkgs/sigrok-cli/template b/srcpkgs/sigrok-cli/template new file mode 100644 index 00000000000..0bd1161b2cb --- /dev/null +++ b/srcpkgs/sigrok-cli/template @@ -0,0 +1,14 @@ +# Template file for 'sigrok-cli' +pkgname=sigrok-cli +version=0.6.0 +revision=1 +build_style=gnu-configure +hostmakedepends="pkg-config" +makedepends="glib-devel libzip-devel libsigrok-devel libsigrokdecode-devel" +depends="sigrok-firmware-fx2lafw" +short_desc="Provide the basic sigrok functionality from the command-line" +maintainer="lemmi " +license="GPL-3" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/source/${pkgname}/${pkgname}-${version}.tar.gz" +checksum=ab2ede4e245f3987e19a89a530bd204e0d792c07474d9fed3345d4af4e84723c diff --git a/srcpkgs/sigrok-firmware-fx2lafw/template b/srcpkgs/sigrok-firmware-fx2lafw/template new file mode 100644 index 00000000000..70cce900a2a --- /dev/null +++ b/srcpkgs/sigrok-firmware-fx2lafw/template @@ -0,0 +1,19 @@ +# Template file for 'sigrok-firmware-fx2lafw' +pkgname=sigrok-firmware-fx2lafw +version=0.1.4 +revision=1 +build_style=fetch +noarch=yes +short_desc="Sigrok fx2lafw Firmware files" +maintainer="lemmi " +license="GPL-2 LGPL-2.1" +homepage="https://sigrok.org/" +distfiles="https://sigrok.org/download/binary/${pkgname}/${pkgname}-bin-${version}.tar.gz" +checksum=e48ae384fdcf3f552b91fb35d1a49fd211cfdadebbdbbb5b31befb8eb0f8a35a + +do_install() { + tar xf ${pkgname}-bin-${version}.tar.gz + for fw in ${pkgname}-bin-${version}/fx2lafw-*.fw; do + vinstall "$fw" 0644 /usr/share/sigrok-firmware + done +}