Merge pull request #13221 from yousong/oc
authorNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Sun, 30 Aug 2020 11:29:29 +0000 (13:29 +0200)
committerGitHub <noreply@github.com>
Sun, 30 Aug 2020 11:29:29 +0000 (13:29 +0200)
openconnect: allow disable dtls with bool option no_dtls

17 files changed:
devel/ninja/Makefile
lang/chicken-scheme/Makefile
libs/alsa-lib/Makefile
libs/libmatroska/Makefile
libs/p11-kit/Makefile
net/isc-dhcp/Makefile
net/isc-dhcp/files/dhcpd.init [changed mode: 0644->0755]
net/lftp/Makefile
net/lftp/patches/010-openssl-deprecated.patch [deleted file]
net/openfortivpn/Makefile
net/openfortivpn/files/openfortivpn.sh
net/wavemon/Makefile
utils/fuse3/Makefile
utils/lcd4linux/Makefile
utils/lcd4linux/patches/300-jpeg8.patch [new file with mode: 0644]
utils/pcsc-tools/Makefile
utils/uhubctl/Makefile [new file with mode: 0644]

index aa20fd9105ef6cb678fc10a222cbfedf48ad9cef..73a162fa1589b3bff37376c7b32aac74dd912c88 100644 (file)
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ninja
-PKG_VERSION:=1.10.0
+PKG_VERSION:=1.10.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ninja-build/ninja/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=3810318b08489435f8efc19c05525e80a993af5a55baa0dfeae0465a9d45f99f
+PKG_HASH:=a6b6f7ac360d4aabd54e299cc1d8fa7b234cd81b9401693da21221c62569a23e
 
 PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
 PKG_LICENSE:=Apache-2.0
index bdeb7d0c7d6dcde79e112ca2e9ce4ac6b2901d14..238fdd82208c204885687295853dd8eebafce444 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chicken-scheme
-PKG_VERSION=5.2.0
-PKG_RELEASE:=1
+PKG_VERSION:=5.2.0
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
 PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
@@ -53,10 +53,7 @@ define Package/chicken-scheme-interpreter/description
   For more information, please refer to the Chicken Scheme website at https://call-cc.org.
 endef
 
-
-# csc calls gcc with "-lm -ldl", but "-lm" doesn't work with musl,
-# so we set LIBRARIES=-lm
-MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)" LIBRARIES=-lm
+MAKE_FLAGS += PLATFORM=linux C_COMPILER=$(TARGET_CC) LINKER=$(TARGET_CC) PREFIX=/usr C_COMPILER_OPTIMIZATION_OPTIONS="$(TARGET_CFLAGS)"
 
 # not installed:
 # - csc and chicken, the compiler
index 82c4e2b0ff206eb059384745613f167261eb770a..074d0904ba3a63604c43bcd4e7309bffc7ce6044 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alsa-lib
-PKG_VERSION:=1.2.2
+PKG_VERSION:=1.2.3.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/lib/ \
                http://distfiles.gentoo.org/distfiles/
-PKG_HASH:=d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec
+PKG_HASH:=e81fc5b7afcaee8c9fd7f64a1e3043e88d62e9ad2c4cff55f578df6b0a9abe15
 
 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
                Peter Wagner <tripolar@gmx.at>
index bf270e6298b1fdf7c8732d70ff398d3da9c4d544..bf830429b38c1166dd0e281733cee92ec46def88 100644 (file)
@@ -6,12 +6,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libmatroska
-PKG_VERSION:=1.6.0
+PKG_VERSION:=1.6.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/Matroska-Org/libmatroska/tar.gz/release-$(PKG_VERSION)?
-PKG_HASH:=924e4fc769764fd5ba0f8efcea342a7dc0e6e6aa4c6d7b67c7efab14e75fd54f
+PKG_HASH:=62ff966c30c545450eefef49cf2774a1a281f25fb385c5b2ee4a603700ddf98a
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
 
 PKG_MAINTAINER:=
index 960c921267b585772c2fdc232c1ab5401d0ce69c..5114242b195b18a2a9b74e4ef7edc34dd07d074f 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p11-kit
-PKG_VERSION:=0.23.20
-PKG_RELEASE:=2
+PKG_VERSION:=0.23.21
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/p11-glue/p11-kit/releases/download/$(PKG_VERSION)
-PKG_HASH:=14d86024c3dfd6b967d9bc0b4ec7b2973014fe7423481f4d230a1a63b8aa6104
+PKG_HASH:=f1baa493f05ca0d867f06bcb54cbb5cdb28c756db07207b6e18de18a87b10627
 
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
index abed03e2daa55ec3b4879e65e18eb6921d5ef298..5f0f75652b3460af2dbaa46ffa8970c7d85bc37e 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=isc-dhcp
 UPSTREAM_NAME:=dhcp
 PKG_VERSION:=4.4.1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
old mode 100644 (file)
new mode 100755 (executable)
index 33e45ad..2a11116
@@ -131,6 +131,36 @@ typeof() {
 '
 }
 
+explode() {
+       local arg="$1"
+
+       echo "$arg" | sed -e 's/\./, /g'
+}
+
+append_routes() {
+       local tuple tuples="$1"
+       local string=
+
+       local IFS=','
+       for tuple in $tuples; do
+               local network prefix router save octets compacted
+
+               save="${tuple% *}"
+               router="${tuple#${save} }"
+
+               network="${save%/[0-9]*}"
+               prefix="${save##${network}}"
+               prefix="${prefix:1}"
+
+               octets=$((($prefix + 7) / 8))
+               compacted="$(echo "$network" | cut -d. -f1-$octets)"
+
+               string="${string:+, }$(explode "$prefix.$compacted.$router")"
+       done
+
+       echo " option classless-ipv4-route $string;"
+}
+
 append_dhcp_options() {
        local tuple="$1"
 
@@ -178,6 +208,7 @@ gen_dhcp_subnet() {
        fi
        echo " option routers $gateway;"
        echo " option domain-name-servers $DNS;"
+       config_list_foreach "$cfg" "routes" append_routes
        config_list_foreach "$cfg" "dhcp_option" append_dhcp_options
        echo "}"
 }
@@ -264,6 +295,8 @@ general_config() {
 
        [ -n "$domain" ] && echo "option domain-name \"$domain\";"
 
+       echo -e "\n# additional codes\noption classless-ipv4-route code 121 = array of { unsigned integer 8 };\n"
+
        rm -f /tmp/resolv.conf
        echo "# This file is generated by the DHCPD service" > /tmp/resolv.conf
        [ -n "$domain" ] && echo "domain $domain" >> /tmp/resolv.conf
index 4393500edd9b827e28740bf512410d37960d4b18..e0ed047df6ae9dd2758c856a12d585362062719a 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lftp
-PKG_VERSION:=4.9.1
+PKG_VERSION:=4.9.2
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://lftp.tech/ftp/ \
                https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/distfiles/
-PKG_HASH:=5969fcaefd102955dd882f3bcd8962198bc537224749ed92f206f415207a024b
+PKG_HASH:=c517c4f4f9c39bd415d7313088a2b1e313b2d386867fe40b7692b83a20f0670d
 
 PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
diff --git a/net/lftp/patches/010-openssl-deprecated.patch b/net/lftp/patches/010-openssl-deprecated.patch
deleted file mode 100644 (file)
index 1154cd7..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/src/lftp_ssl.cc
-+++ b/src/lftp_ssl.cc
-@@ -34,6 +34,9 @@
- #include "misc.h"
- #include "network.h"
- #include "buffer.h"
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject
-+#endif
- extern "C" {
- #include "c-ctype.h"
- #include "quotearg.h"
-@@ -833,11 +836,13 @@ lftp_ssl_openssl_instance::lftp_ssl_openssl_instance()
-    if(RAND_load_file(file,-1) && RAND_status()!=0)
-       atexit(lftp_ssl_write_rnd);
--#if SSLEAY_VERSION_NUMBER < 0x0800
-+#if OPENSSL_VERSION_NUMBER < 0x0800
-    ssl_ctx=SSL_CTX_new();
-    X509_set_default_verify_paths(ssl_ctx->cert);
- #else
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-    SSLeay_add_ssl_algorithms();
-+#endif
-    ssl_ctx=SSL_CTX_new(SSLv23_client_method());
-    long options=SSL_OP_ALL|SSL_OP_NO_TICKET|SSL_OP_NO_SSLv2;
-    const char *priority=ResMgr::Query("ssl:priority", 0);
-@@ -1075,7 +1080,9 @@ void lftp_ssl_openssl::copy_sid(const lftp_ssl_openssl *o)
- const char *lftp_ssl_openssl::strerror()
- {
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
-    SSL_load_error_strings();
-+#endif
-    int error=ERR_get_error();
-    const char *ssl_error=0;
-    if(ERR_GET_LIB(error)==ERR_LIB_SSL)
-@@ -1154,7 +1161,7 @@ int lftp_ssl_openssl::verify_crl(X509_STORE_CTX *ctx)
-     obj = X509_OBJECT_new();
-     store_ctx = X509_STORE_CTX_new();
-     X509_STORE_CTX_init(store_ctx, instance->crl_store, NULL, NULL);
--    rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
-+    rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj);
-     X509_STORE_CTX_free(store_ctx); store_ctx=0;
-     crl = X509_OBJECT_get0_X509_CRL(obj);
-     if (rc > 0 && crl != NULL) {
-@@ -1194,7 +1201,7 @@ int lftp_ssl_openssl::verify_crl(X509_STORE_CTX *ctx)
-     obj = X509_OBJECT_new();
-     store_ctx = X509_STORE_CTX_new();
-     X509_STORE_CTX_init(store_ctx, instance->crl_store, NULL, NULL);
--    rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
-+    rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj);
-     X509_STORE_CTX_free(store_ctx); store_ctx=0;
-     crl = X509_OBJECT_get0_X509_CRL(obj);
-     if (rc > 0 && crl != NULL) {
---- a/src/lftp_ssl.h
-+++ b/src/lftp_ssl.h
-@@ -28,6 +28,7 @@
- #  include <openssl/err.h>
- #  include <openssl/rand.h>
- #  include <openssl/x509v3.h>
-+#  include <openssl/x509_vfy.h>
- # endif
- #include "Ref.h"
index 5b6eceae7ad91d5c877dc4aa0e52399656eaa77b..e59a9657ea7d23f49689edd0e7afb3d5f30d9672 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openfortivpn
 PKG_VERSION:=1.14.1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/adrienverge/openfortivpn/tar.gz/v$(PKG_VERSION)?
index dedd56d8cdbee27479354acd95c94cd2dd83d4b6..14f613eab27ea9584aa0413fa425b7828eae1f98 100755 (executable)
@@ -12,9 +12,9 @@ append_args() {
 }
 
 proto_openfortivpn_init_config() {
-        proto_config_add_string "server"
+        proto_config_add_string "peeraddr"
         proto_config_add_int "port"
-        proto_config_add_string "iface_name"
+        proto_config_add_string "tunlink"
         proto_config_add_string "local_ip"
         proto_config_add_string "username"
         proto_config_add_string "password"
@@ -29,29 +29,29 @@ proto_openfortivpn_setup() {
 
        local msg ifname ip server_ip pwfile callfile
 
-       local host server port iface_name local_ip username password trusted_cert \
+       local host peeraddr port tunlink local_ip username password trusted_cert \
                      remote_status_check
-        json_get_vars host server port iface_name local_ip username password trusted_cert \
+        json_get_vars host peeraddr port tunlink local_ip username password trusted_cert \
                      remote_status_check
 
         ifname="vpn-$config"
 
 
-        [ -n "$iface_name" ] && {
-               network_get_device iface_device_name "$iface_name"
-               network_is_up "$iface_name"  || {
-               msg="$iface_name is not up $iface_device_up"
-               logger -t "openfortivpn" "$config: $msg"
-               proto_notify_error "$config" "$msg"
-               proto_block_restart "$config"
-               exit 1
-               }
+        [ -n "$tunlink" ] && {
+            network_get_device iface_device_name "$tunlink"
+            network_is_up "$tunlink"  || {
+                msg="$tunlink is not up $iface_device_up"
+                logger -t "openfortivpn" "$config: $msg"
+                proto_notify_error "$config" "$msg"
+                proto_block_restart "$config"
+                exit 1
+            }
        }
 
-       server_ip=$(resolveip -4 -t 10 "$server")
+       server_ip=$(resolveip -4 -t 10 "$peeraddr")
 
         [ $? -eq 0 ] || {
-            msg="$config: failed to resolve server ip for $server"
+            msg="$config: failed to resolve server ip for $peeraddr"
             logger -t "openfortivpn" "$msg"
             sleep 10
             proto_notify_error "$config" "$msg"
@@ -60,8 +60,8 @@ proto_openfortivpn_setup() {
         }
 
        [ "$remote_status_check" = "curl" ] && {
-            curl -k --head -s --connect-timeout 10 ${iface_name:+--interface} $iface_device_name https://$server_ip > /dev/null || {
-               msg="failed to reach https://${server_ip}${iface_name:+ on $iface_device_name}"
+            curl -k --head -s --connect-timeout 10 ${tunlink:+--interface} $iface_device_name https://$server_ip > /dev/null || {
+               msg="failed to reach https://${server_ip}${tunlink:+ on $iface_device_name}"
                logger -t "openfortivpn" "$config: $msg"
                sleep 10
                proto_notify_error "$config" "$msg"
@@ -70,7 +70,7 @@ proto_openfortivpn_setup() {
            }
        }
        [ "$remote_status_check" = "ping" ]  && {
-            ping ${iface_name:+-I} $iface_device_name -c 1 -w 10 $server_ip > /dev/null 2>&1 || {
+            ping ${tunlink:+-I} $iface_device_name -c 1 -w 10 $server_ip > /dev/null 2>&1 || {
                 msg="$config: failed to ping $server_ip on $iface_device_name"
                logger -t "openfortvpn" "$config: $msg"
                 sleep 10
@@ -80,30 +80,30 @@ proto_openfortivpn_setup() {
             }
        }
 
-        for ip in $(resolveip -4 -t 10 "$server"); do
-                logger -p 6 -t "openfortivpn" "$config: adding host dependency for $ip on $iface_name at $config"
-                proto_add_host_dependency "$config" "$ip" "$iface_name"
+        for ip in $(resolveip -4 -t 10 "$peeraddr"); do
+            logger -p 6 -t "openfortivpn" "$config: adding host dependency for $ip on $tunlink at $config"
+            proto_add_host_dependency "$config" "$ip" "$tunlink"
         done
 
 
 
         [ -n "$port" ] && port=":$port"
-        append_args "$server$port" --pppd-ifname="$ifname" --use-syslog  -c /dev/null
+        append_args "$peeraddr$port" --pppd-ifname="$ifname" --use-syslog  -c /dev/null
         append_args "--set-dns=0"
         append_args "--no-routes"
         append_args "--pppd-use-peerdns=1"
 
-        [ -n "$iface_name" ] && {
+        [ -n "$tunlink" ] && {
             append_args "--ifname=$iface_device_name"
         }
 
         [ -n "$trusted_cert" ] && append_args "--trusted-cert=$trusted_cert"
         [ -n "$username" ] && append_args -u "$username"
         [ -n "$password" ] && {
-                umask 077
-                mkdir -p '/var/etc/openfortivpn'
-                pwfile="/var/etc/openfortivpn/$config.passwd"
-                echo "$password" > "$pwfile"
+            umask 077
+            mkdir -p '/var/etc/openfortivpn'
+            pwfile="/var/etc/openfortivpn/$config.passwd"
+            echo "$password" > "$pwfile"
         }
 
         [ -n "$local_ip" ] || local_ip=$server_ip
index 3d74daf0eba931fc528411932e2c051eb286264f..7d2ef2ad1e580bdc3a558ec12950b0144a544132 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wavemon
 PKG_VERSION:=0.9.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/uoaerg/wavemon/tar.gz/v$(PKG_VERSION)?
@@ -43,6 +43,7 @@ endef
 CONFIGURE_ARGS += --without-libcap
 
 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3
+TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lpthread)
 
 define Package/wavemon/install
        $(INSTALL_DIR) $(1)/usr/bin
index 0d0855ab03acd2a0bb34df76f4ab1597fe9d6f48..6760ac504cf6a89aea9efb5cb54c72d11a18e54d 100644 (file)
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=fuse3
-PKG_VERSION:=3.9.2
+PKG_VERSION:=3.9.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=fuse-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION)
-PKG_HASH:=6999b6d48e7c0a79628fa901f6e66def3513cab4ffdd8097821e7dc3cdeae08a
+PKG_HASH:=cd45270a064d2ae14f17cfc914f1555106d6c5091025b0b2698b860399d4ede6
 PKG_BUILD_DIR:=$(BUILD_DIR)/fuse-$(PKG_VERSION)
 
 PKG_MAINTAINER:=
index f410994a2111135fde78134bd9b3613fdcbe3b8a..5f9edaa7456b316d0d49794f629f10d44c29c9b8 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lcd4linux
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/feckert/lcd4linux
diff --git a/utils/lcd4linux/patches/300-jpeg8.patch b/utils/lcd4linux/patches/300-jpeg8.patch
new file mode 100644 (file)
index 0000000..4a6bb48
--- /dev/null
@@ -0,0 +1,298 @@
+--- a/drv_SamsungSPF.c
++++ b/drv_SamsungSPF.c
+@@ -43,6 +43,7 @@
+ #include <usb.h>
+ #include <jpeglib.h>
++#include <jerror.h>
+ #include "debug.h"
+ #include "cfg.h"
+@@ -117,6 +118,287 @@ static struct {
+ /***  hardware dependant functions    ***/
+ /****************************************/
++/* libjpeg8 and later come with their own (API compatible) memory source
++   and dest */
++#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
++
++/* Expanded data source object for memory input */
++
++typedef struct {
++      struct jpeg_source_mgr pub; /* public fields */
++
++      JOCTET eoi_buffer[2]; /* a place to put a dummy EOI */
++} my_source_mgr;
++
++typedef my_source_mgr * my_src_ptr;
++
++
++/*
++* Initialize source --- called by jpeg_read_header
++* before any data is actually read.
++*/
++
++METHODDEF(void)
++init_source (j_decompress_ptr cinfo)
++{
++      /* No work, since jpeg_mem_src set up the buffer pointer and count.
++      * Indeed, if we want to read multiple JPEG images from one buffer,
++      * this *must* not do anything to the pointer.
++      */
++}
++
++
++/*
++* Fill the input buffer --- called whenever buffer is emptied.
++*
++* In this application, this routine should never be called; if it is called,
++* the decompressor has overrun the end of the input buffer, implying we
++* supplied an incomplete or corrupt JPEG datastream. A simple error exit
++* might be the most appropriate response.
++*
++* But what we choose to do in this code is to supply dummy EOI markers
++* in order to force the decompressor to finish processing and supply
++* some sort of output image, no matter how corrupted.
++*/
++
++METHODDEF(boolean)
++fill_input_buffer (j_decompress_ptr cinfo)
++{
++      my_src_ptr src = (my_src_ptr) cinfo->src;
++
++      WARNMS(cinfo, JWRN_JPEG_EOF);
++
++      /* Create a fake EOI marker */
++      src->eoi_buffer[0] = (JOCTET) 0xFF;
++      src->eoi_buffer[1] = (JOCTET) JPEG_EOI;
++      src->pub.next_input_byte = src->eoi_buffer;
++      src->pub.bytes_in_buffer = 2;
++
++      return TRUE;
++}
++
++
++/*
++* Skip data --- used to skip over a potentially large amount of
++* uninteresting data (such as an APPn marker).
++*
++* If we overrun the end of the buffer, we let fill_input_buffer deal with
++* it. An extremely large skip could cause some time-wasting here, but
++* it really isn't supposed to happen ... and the decompressor will never
++* skip more than 64K anyway.
++*/
++
++METHODDEF(void)
++skip_input_data (j_decompress_ptr cinfo, long num_bytes)
++{
++      my_src_ptr src = (my_src_ptr) cinfo->src;
++
++      if (num_bytes > 0) {
++              while (num_bytes > (long) src->pub.bytes_in_buffer) {
++                      num_bytes -= (long) src->pub.bytes_in_buffer;
++                      (void) fill_input_buffer(cinfo);
++                      /* note we assume that fill_input_buffer will never
++                      * return FALSE, so suspension need not be handled.
++                      */
++              }
++              src->pub.next_input_byte += (size_t) num_bytes;
++              src->pub.bytes_in_buffer -= (size_t) num_bytes;
++      }
++}
++
++
++/*
++* An additional method that can be provided by data source modules is the
++* resync_to_restart method for error recovery in the presence of RST markers.
++* For the moment, this source module just uses the default resync method
++* provided by the JPEG library. That method assumes that no backtracking
++* is possible.
++*/
++
++
++/*
++* Terminate source --- called by jpeg_finish_decompress
++* after all data has been read. Often a no-op.
++*
++* NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
++* application must deal with any cleanup that should happen even
++* for error exit.
++*/
++
++METHODDEF(void)
++term_source (j_decompress_ptr cinfo)
++{
++      /* no work necessary here */
++}
++
++
++/*
++* Prepare for input from a memory buffer.
++*/
++
++GLOBAL(void)
++jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
++      unsigned long bufsize)
++{
++      my_src_ptr src;
++
++      /* The source object is made permanent so that a series of JPEG images
++      * can be read from a single buffer by calling jpeg_mem_src
++      * only before the first one.
++      * This makes it unsafe to use this manager and a different source
++      * manager serially with the same JPEG object. Caveat programmer.
++      */
++      if (cinfo->src == NULL) { /* first time for this JPEG object? */
++              cinfo->src = (struct jpeg_source_mgr *)
++                      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo,
++                                                  JPOOL_PERMANENT,
++                                                  sizeof(my_source_mgr));
++      }
++
++      src = (my_src_ptr) cinfo->src;
++      src->pub.init_source = init_source;
++      src->pub.fill_input_buffer = fill_input_buffer;
++      src->pub.skip_input_data = skip_input_data;
++      src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
++      src->pub.term_source = term_source;
++
++      src->pub.next_input_byte = buffer;
++      src->pub.bytes_in_buffer = bufsize;
++}
++
++
++
++/* Memory destination source modelled after Thomas G. Lane's memory source
++   support and jdatadst.c
++
++   Copyright (C) 2010, Hans de Goede
++
++   This code may be used under the same conditions as Thomas G. Lane's memory
++   source (see the copyright header at the top of this file).
++ */
++
++typedef struct {
++      struct jpeg_destination_mgr pub; /* public fields */
++
++      JOCTET **buffer;              /* start of buffer */
++      unsigned long buf_size, *outsize;
++} my_destination_mgr;
++
++typedef my_destination_mgr * my_dest_ptr;
++
++#define OUTPUT_BUF_SIZE 32768   /* choose an efficiently fwrite'able size */
++
++
++/*
++ * Initialize destination --- called by jpeg_start_compress
++ * before any data is actually written.
++ */
++
++METHODDEF(void)
++init_destination (j_compress_ptr cinfo)
++{
++      /* No work, since jpeg_mem_dest set up the buffer pointer and count.
++      * Indeed, if we want to write multiple JPEG images to one buffer,
++      * this *must* not do anything to the pointer.
++      */
++}
++
++/*
++ * Empty the output buffer --- called whenever buffer fills up.
++ *
++ * In typical applications, this should write the entire output buffer
++ * (ignoring the current state of next_output_byte & free_in_buffer), 
++ * reset the pointer & count to the start of the buffer, and return TRUE
++ * indicating that the buffer has been dumped.
++ *
++ * In applications that need to be able to suspend compression due to output
++ * overrun, a FALSE return indicates that the buffer cannot be emptied now. 
++ * In this situation, the compressor will return to its caller (possibly with
++ * an indication that it has not accepted all the supplied scanlines).  The  
++ * application should resume compression after it has made more room in the  
++ * output buffer.  Note that there are substantial restrictions on the use of
++ * suspension --- see the documentation.
++ *
++ * When suspending, the compressor will back up to a convenient restart point
++ * (typically the start of the current MCU). next_output_byte & free_in_buffer
++ * indicate where the restart point will be if the current call returns FALSE.
++ * Data beyond this point will be regenerated after resumption, so do not
++ * write it out when emptying the buffer externally.
++ */
++
++METHODDEF(boolean)
++empty_output_buffer (j_compress_ptr cinfo)
++{
++      my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
++
++      *dest->buffer = realloc (*dest->buffer, dest->buf_size + OUTPUT_BUF_SIZE);
++      if (!*dest->buffer)
++              ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0);
++
++      dest->pub.next_output_byte = *dest->buffer + dest->buf_size;
++      dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
++      dest->buf_size += OUTPUT_BUF_SIZE;
++
++      return TRUE;
++}
++
++/*
++ * Terminate destination --- called by jpeg_finish_compress   
++ * after all data has been written.  Usually needs to flush buffer.
++ *
++ * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
++ * application must deal with any cleanup that should happen even
++ * for error exit.
++ */
++
++METHODDEF(void)
++term_destination (j_compress_ptr cinfo)
++{
++      my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
++
++      *dest->outsize = dest->buf_size - dest->pub.free_in_buffer;
++}
++
++GLOBAL(void)
++jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
++      unsigned long * outsize)
++{
++      my_dest_ptr dest;
++
++      /* The destination object is made permanent so that multiple JPEG images
++       * can be written to the same file without re-executing jpeg_stdio_dest.
++       * This makes it dangerous to use this manager and a different destination
++       * manager serially with the same JPEG object, because their private object
++       * sizes may be different.  Caveat programmer.
++       */
++      if (cinfo->dest == NULL) {  /* first time for this JPEG object? */
++              cinfo->dest = (struct jpeg_destination_mgr *)
++                      (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo,
++                                                  JPOOL_PERMANENT,
++                                                  sizeof(my_destination_mgr));
++      }
++
++      dest = (my_dest_ptr) cinfo->dest;
++      dest->pub.init_destination = init_destination;
++      dest->pub.empty_output_buffer = empty_output_buffer;
++      dest->pub.term_destination = term_destination;
++      dest->buffer = outbuffer;
++      dest->buf_size = *outsize;
++      dest->outsize = outsize;
++
++      if (*dest->buffer == NULL || dest->buf_size == 0) {
++              /* Allocate initial buffer */
++              *dest->buffer = malloc(OUTPUT_BUF_SIZE);
++              if (*dest->buffer == NULL)
++                      ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
++              dest->buf_size = OUTPUT_BUF_SIZE;
++      }
++
++      dest->pub.next_output_byte = *dest->buffer;
++      dest->pub.free_in_buffer = dest->buf_size;
++}
++
++#endif /* JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED) */
+ /* please note that in-memory compression doesn't work satisfactory */
+ int convert2JPG()
index 3d877467767f070b10bee05004c12f4ff9f593fc..76ad65888378ba90c7ac620a0e8449e69983a399 100644 (file)
@@ -8,17 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcsc-tools
-PKG_VERSION=1.5.4
+PKG_VERSION:=1.5.7
 PKG_RELEASE:=1
-PKG_MAINTAINER:=
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ludovic.rousseau.free.fr/softwares/pcsc-tools/
-PKG_HASH:=c39e6abba781895220c68df5e5d2f0f9547c7a676eebec3f1ddcff8794377c93
+PKG_HASH:=e0ea8f8496d5bcf5316da913869ba95b925d0405c2aaade801c0d6ce7697699d
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,7 +39,7 @@ endef
 
 define Package/pcsc-tools/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/pcsc_scan $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcsc_scan $(1)/usr/bin
 endef
 
 $(eval $(call BuildPackage,pcsc-tools))
diff --git a/utils/uhubctl/Makefile b/utils/uhubctl/Makefile
new file mode 100644 (file)
index 0000000..4bc5272
--- /dev/null
@@ -0,0 +1,36 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=uhubctl
+PKG_VERSION:=2.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/mvp/uhubctl/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=e5a722cb41967903bedbab4eea566ab332241a7f05fc7bc9c386b9a5e1762d8b
+
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING LICENSE
+
+PKG_MAINTAINER:=Steven Honson <steven@honson.id.au>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/uhubctl
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=USB hub per-port power control
+  URL:=https://github.com/mvp/uhubctl
+  DEPENDS:=+libusb-1.0
+endef
+
+define Package/uhubctl/description
+  uhubctl is a utility that allows you to control USB power on USB hubs that
+  implement per-port or ganged power switching.
+endef
+
+define Package/uhubctl/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/uhubctl $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,uhubctl))