[ITA] libssh

2024-02-21 Thread Takashi Yano via Cygwin-apps
I would like to adopt libssh package.

-- 
Takashi Yano 
inherit cmake

NAME="libssh"
VERSION=0.10.6
RELEASE=1
LICENSE="LGPL-2.1-or-later"
CATEGORY="Net"
SUMMARY="SSH implementation library"
DESCRIPTION="The ssh library was designed to be used by programmers needing a
working SSH implementation by the mean of a library. The complete
control of the client is made by the programmer. With libssh, you can
remotely execute programs, transfer files, use a secure and transparent
tunnel for your remote programs. With its Secure FTP implementation, you
can play with remote files easily, without third-party programs others
than libcrypto (from openssl)."
HOMEPAGE="http://www.libssh.org/";
SRC_URI="https://www.libssh.org/files/${VERSION%.*}/libssh-${VERSION}.tar.xz";

PKG_NAMES="${NAME}4 ${NAME}-common ${NAME}-devel"
libssh4_REQUIRES="libssh-common"
libssh4_CONTENTS='usr/bin/*-4.dll'
libssh_common_CONTENTS='usr/share/doc/'
libssh_devel_CONTENTS='usr/include/ usr/lib/'

CYGCMAKE_ARGS="-DWITH_FPIC=FALSE -DWITH_VISIBILITY_HIDDEN=FALSE"


[ITA] nettle

2024-02-21 Thread Takashi Yano via Cygwin-apps
I would like to adopt nettle package.

-- 
Takashi Yano 
NAME="nettle"
VERSION=3.9.1
RELEASE=1
LICENSE="LGPL-3.0-or-later OR GPL-2.0-or-later"
CATEGORY="Libs"
SUMMARY="Low-level cryptographic library"
DESCRIPTION="Nettle is a cryptographic library that is designed to fit easily
in more or less any context: In crypto toolkits for object-oriented languages,
in applications like LSH or GNUPG, or even in kernel space."
HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/";
SRC_URI="http://www.lysator.liu.se/~nisse/archive/nettle-${VERSION}.tar.gz";
#sha512sum=9a5b4c316222f22feb692106ceae299c2b59229ef96cac1739095c65c9ddee4b1d542579e5b49d4863bd6a8c093611f0fdd1c7cb3251844c85b7e089e406ffc5
#SRC_URI="https://src.fedoraproject.org/repo/pkgs/nettle/nettle-${VERSION}-hobbled.tar.xz/sha512/${sha512sum}/nettle-${VERSION}-hobbled.tar.xz";

PKG_NAMES="nettle libnettle8 libhogweed6 libnettle-devel"
nettle_CONTENTS="usr/bin/*.exe usr/share/"
libnettle8_CONTENTS="usr/bin/cygnettle-8.dll"
libhogweed6_CONTENTS="usr/bin/cyghogweed-6.dll"
libnettle_devel_CONTENTS="usr/include/ usr/lib/"

DIFF_EXCLUDES=".test-rules.make"

CYGCONF_ARGS="--enable-fat"

src_test() {
cd ${B}
cygtest
}

src_install() {
cd ${B}
cyginstall

rm ${D}/usr/lib/lib{nettle,hogweed}.a
}


[ITA] unbound

2024-02-21 Thread Takashi Yano via Cygwin-apps
I would like to adopt unbound package.

-- 
Takashi Yano 
--- origsrc/unbound-1.6.2/libunbound/libunbound.c   2017-04-06 
08:13:06.0 -0500
+++ src/unbound-1.6.2/libunbound/libunbound.c   2017-05-02 10:21:56.184047100 
-0500
@@ -73,7 +73,7 @@
 #include 
 #endif
 
-#if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H)
+#if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H) || defined(__CYGWIN__)
 #include 
 #include 
 #endif /* UB_ON_WINDOWS */
@@ -1051,9 +1051,11 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, co
int r;
 
if(fname == NULL) {
-#if !defined(UB_ON_WINDOWS) || !defined(HAVE_WINDOWS_H)
fname = "/etc/resolv.conf";
-#else
+   }
+   in = fopen(fname, "r");
+   if(!in) {
+#if defined(UB_ON_WINDOWS) || defined(HAVE_WINDOWS_H) || defined(__CYGWIN__)
FIXED_INFO *info;
ULONG buflen = sizeof(*info);
IP_ADDR_STRING *ptr;
@@ -1087,11 +1089,7 @@ ub_ctx_resolvconf(struct ub_ctx* ctx, co
return UB_NOERROR;
}
free(info);
-   return UB_READFILE;
-#endif /* WINDOWS */
-   }
-   in = fopen(fname, "r");
-   if(!in) {
+#endif
/* error in errno! perror(fname) */
return UB_READFILE;
}
--- origsrc/unbound-1.6.2/smallapp/unbound-control.c2017-04-11 
08:37:39.0 -0500
+++ src/unbound-1.6.2/smallapp/unbound-control.c2017-05-02 
02:25:52.44700 -0500
@@ -68,6 +68,11 @@
 #endif
 #ifdef HAVE_SYS_SHM_H
 #include "sys/shm.h"
+#ifndef SHM_R
+#include 
+#define SHM_R S_IRUSR|S_IRGRP|S_IROTH
+#define SHM_W S_IWUSR|S_IWGRP|S_IWOTH
+#endif
 #endif
 #ifdef HAVE_SYS_UN_H
 #include 
--- origsrc/unbound-1.6.2/util/shm_side/shm_main.c  2017-04-12 
10:01:11.0 -0500
+++ src/unbound-1.6.2/util/shm_side/shm_main.c  2017-05-02 02:02:17.720319200 
-0500
@@ -47,6 +47,10 @@
 #endif
 #ifdef HAVE_SYS_SHM_H
 #include 
+#ifndef SHM_R
+#include 
+#define SHM_R S_IRUSR|S_IRGRP|S_IROTH
+#endif
 #endif
 #include 
 #include 
inherit python3

NAME="unbound"
VERSION=1.19.1
RELEASE=1
LICENSE="BSD-3-Clause"
CATEGORY="Libs"
SUMMARY="DNS resolver"
DESCRIPTION="Unbound is a validating, recursive, and caching DNS resolver.
Unbound is designed as a set of modular components, so that also DNSSEC
validation and stub-resolvers (that do not run as a server, but are linked
into an application) are easily possible."
HOMEPAGE="http://www.unbound.net/";
SRC_URI="
http://www.unbound.net/downloads/unbound-${VERSION}.tar.gz
https://src.fedoraproject.org/rpms/unbound/raw/f40/f/root.anchor
https://src.fedoraproject.org/rpms/unbound/raw/f40/f/icannbundle.pem
"
PATCH_URI="
1.6.2-resolvconf-cygwin.patch
1.6.2-shmget-cygwin.patch
"

PKG_NAMES="${NAME} lib${NAME}8 lib${NAME}-common lib${NAME}-devel 
python3-${NAME}"
unbound_CATEGORY="Net"
unbound_CONTENTS="
usr/sbin/unbound*
usr/share/man/man1/*
usr/share/man/man8/*
var/run/${NAME}
"
libunbound8_REQUIRES="libunbound-common"
libunbound8_CONTENTS="usr/bin/cygunbound-8.dll"
libunbound_common_CONTENTS="
etc/defaults/etc/${NAME}/
etc/defaults/var/lib/${NAME}/
etc/postinstall/${NAME}.sh
etc/preremove/${NAME}.sh
usr/share/doc/${NAME}/
usr/share/man/man5/*
"
libunbound_devel_CONTENTS="
usr/include/unbound*.h
usr/lib/libunbound.dll.a
usr/lib/pkgconfig/libunbound.pc
usr/share/man/man3/*
"
python3_unbound_CONTENTS="${PYTHON3_SITELIB#/}/*"

DIFF_EXCLUDES="ltmain.sh"

CPPFLAGS+=" -DFD_SETSIZE=1024"
LIBS=-liphlpapi
CYGCONF_ARGS="
--enable-shared --disable-static
--disable-flto
--with-libevent
--with-pthreads
--with-conf-file=/etc/${NAME}/unbound.conf
--with-pidfile=/var/run/${NAME}/unbound.pid
--with-rootkey-file=/var/lib/${NAME}/root.key
LEX=:
"

src_compile() {
cd ${S}
cygautoreconf

mkdir -p ${B}/lib-only
cd ${B}/lib-only
lndirs ${S}
cygconf \
--with-nettle \
--with-libunbound-only
cygmake

mkdir -p ${B}/py3
cd ${B}/py3
lndirs ${S}
cygconf \
--with-ssl \
--with-pythonmodule --with-pyunbound \
PYTHON=${PYTHON3} PYTHON_LDFLAGS=${LIBPYTHON3%% *}
cygmake
}

src_install() {
cd ${B}/py3
cyginstall

cd ${B}/lib-only
cyginstall unbound-event-install
dopkgconfig contrib/libunbound.pc

insinto /etc/${NAME}
doins ${S}/icannbundle.pem

insinto /var/lib/${NAME}
newins ${S}/root.anchor root.key

make_etc_defaults /etc/${NAME} /var/lib/${NAME}
keepdir /var/run/${NAME}
}

BUILD_REQUIRES="swig"
--- origsrc/unbound-1.19.1/libunbound/libunbound.c  2024-02-21 
10:06:14.070706000 +0900
+++ src/unbound-1.19.1/libunbound/libunbound.c  2024-

[ITA] gnutls

2024-02-21 Thread Takashi Yano via Cygwin-apps
I would like to adopt gnutls package.

-- 
Takashi Yano 
--- origsrc/gnutls-3.5.11/tests/Makefile.am 2017-04-07 00:52:07.0 
-0500
+++ src/gnutls-3.5.11/tests/Makefile.am 2017-05-02 16:32:16.729518900 -0500
@@ -57,8 +57,9 @@ COMMON_GNUTLS_LDADD = ../lib/libgnutls.l
 COMMON_DEPS_LDADD = $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB) 
$(LIBSECCOMP)
 COMMON_LDADD = $(COMMON_GNUTLS_LDADD) $(COMMON_DEPS_LDADD)
 
-LDADD = $(COMMON_GNUTLS_LDADD) \
+LDADD = \
libutils.la \
+   $(COMMON_GNUTLS_LDADD) \
$(COMMON_DEPS_LDADD)
 
 dane_LDADD = $(LDADD) ../libdane/libgnutls-dane.la
inherit gnome2

NAME="gnutls"
VERSION=3.8.3
RELEASE=1
LICENSE="LGPL-2.1-or-later"
CATEGORY="Libs"
SUMMARY="Library implementing TLS protocols"
DESCRIPTION="GnuTLS is a secure communications library implementing the SSL,
TLS and DTLS protocols and technologies around them. It provides a simple C
language application programming interface (API) to access the secure
communications protocols as well as APIs to parse and write X.509, PKCS#12,
OpenPGP and other required structures."
HOMEPAGE="https://gnutls.org/";
SRC_URI="ftp://ftp.gnutls.org/gcrypt/gnutls/v${VERSION%.*}/gnutls-${VERSION}.tar.xz";
PATCH_URI="
3.5.11-testsuite.patch
"

PKG_NAMES="${NAME} lib${NAME}30 lib${NAME}-dane0 lib${NAME}xx30 
lib${NAME}-devel lib${NAME}-doc" # guile-${NAME}
gnutls_SUMMARY="${SUMMARY} (utilities)"
gnutls_CONTENTS="
--exclude=usr/share/doc/${NAME}/${NAME}.*
usr/bin/*.exe
usr/share/doc/
usr/share/locale/
usr/share/man/man1/
"
libgnutls30_SUMMARY="${SUMMARY} (runtime)"
libgnutls30_REQUIRES="ca-certificates crypto-policies"
libgnutls30_CONTENTS="usr/bin/cyggnutls-30.dll"
libgnutls_dane0_SUMMARY="${SUMMARY} (DANE)"
libgnutls_dane0_CONTENTS="usr/bin/cyggnutls-dane-0.dll"
libgnutlsxx30_SUMMARY="${SUMMARY} (C++ bindings)"
libgnutlsxx30_CONTENTS="usr/bin/cyggnutlsxx-30.dll"
libgnutls_devel_SUMMARY="${SUMMARY} (development)"
libgnutls_devel_CONTENTS="
usr/include/gnutls/
usr/lib/lib*
usr/lib/pkgconfig/*
"
libgnutls_doc_SUMMARY="${SUMMARY}(documentation)"
libgnutls_doc_CONTENTS="
usr/share/doc/${NAME}/${NAME}.*
usr/share/gtk-doc/
usr/share/info/
usr/share/man/man3/*
"

DIFF_EXCLUDES="gnutls.info* m4 stamp-vti version.texi"

CYGCONF_ARGS="
  --enable-gtk-doc
  --enable-gtk-doc-html
  --enable-cxx
  --enable-libdane
  --disable-hardware-acceleration
  --enable-heartbeat-support
  --disable-non-suiteb-curves
  --disable-openssl-compatibility
  --with-system-priority-file=/etc/crypto-policies/back-ends/gnutls.config
  --with-default-priority-string=@SYSTEM
  --with-default-trust-store-pkcs11=pkcs11:
  --with-unbound-root-key-file=/var/lib/unbound/root.key
"

src_install() {
cd ${B}
cyginstall

rm -f ${D}/usr/{bin,lib}/*.def
}

DOCS="doc/gnutls.html doc/gnutls.pdf doc/README.* doc/TODO"

BUILD_REQUIRES="gtk-doc libnettle-devel libunbound-devel"


[PATCH cygport] Use correct wording if only one package is announced

2024-02-21 Thread Christian Franke via Cygwin-apps

Only cosmetic ...

--
Regards,
Christian

From f1381ebc872f3b099c257677e2b8d5bf2451bb23 Mon Sep 17 00:00:00 2001
From: Christian Franke 
Date: Wed, 21 Feb 2024 13:35:14 +0100
Subject: [PATCH] Use correct wording if only one package is announced

---
 lib/pkg_upload.cygpart | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/pkg_upload.cygpart b/lib/pkg_upload.cygpart
index dcae8e2c..8039ec5c 100644
--- a/lib/pkg_upload.cygpart
+++ b/lib/pkg_upload.cygpart
@@ -172,6 +172,9 @@ __pkg_announce() {
local msg=$(mktemp -t cygwin-announce-${PF}.XX)
local msgat=$(date +@%s)
local -i n=0
+   local s="s have"
+
+   [ $pkg_count != 1 ] || s=" has"
 
cat > ${msg} <<_EOF
 From cygwin-announce-${PF} $(date '+%a %b %d %H:%M:%S %Y' --date=${msgat})
@@ -181,7 +184,7 @@ Date: $(date -R --date=${msgat})
 Message-Id: <$(date "+%Y%m%d%H%M%S.$$" --date=${msgat})-1-$(echo 
${SMTP_SENDER} | sed 's|.*<\(.*\)>.*|\1|')>
 Subject: ${NAME} ${PVR}
 
-The following packages have been uploaded to the Cygwin distribution:
+The following package${s} been uploaded to the Cygwin distribution:
 
 _EOF
 
-- 
2.43.0



[PATCH cygport] Add customization support for announce command

2024-02-21 Thread Christian Franke via Cygwin-apps
The email generated by the cygport announce command is useful, but 
actual use cases are somewhat limited due to the hard-coded email 
submission.


The attached patch adds more flexibility. The patch is on top of the 
"Use correct wording if only one package is announced" patch.


Examples for cygport.conf settings:

ANNOUNCE_EDITOR='printf "\\nRegards,\\n$PN package maintainer\\n" >>"$1"'

ANNOUNCE_EDITOR='
n=$(wc -l <"$1") && cat >>"$1" <>> This is an update to the latest upstream release.
  >>> This is a bugfix release.
  <<< PLEASE EDIT >>>

Regards,
$PN package maintainer
EOF
vim +$((n+2)) "$1" && ! grep -E "<<<|>>>" "$1"
'

ANNOUNCE_TO_CMD='cat "$1" >/dev/clipboard'

ANNOUNCE_TO_CMD='
sed "1,/^\$/d" "$1" >$PF-announcement.txt &&
echo "Announcement placed here: $(pwd)/$PF-announcement.txt"
'

ANNOUNCE_TO_CMD='
/usr/local/sbin/custom-mailer \
  --sender="$SMTP_SENDER" \
  --smarthost="$SMTP_SERVER" \
  ...more...options... \
  cygwin-annou...@cygwin.com <"$1"
'

--
Regards,
Christian

From 1f13d54a40d639938fb67245eed4615be0a6e6c4 Mon Sep 17 00:00:00 2001
From: Christian Franke 
Date: Wed, 21 Feb 2024 15:14:53 +0100
Subject: [PATCH] Add customization support for announce command

Two new configuration settings allow to override the launch of
a text editor (ANNOUNCE_EDITOR) and the builtin email submission
(ANNOUNCE_TO_CMD).
---
 data/cygport.conf  | 23 +
 lib/pkg_upload.cygpart | 57 +-
 2 files changed, 74 insertions(+), 6 deletions(-)

diff --git a/data/cygport.conf b/data/cygport.conf
index 34ccd291..48dc7bfe 100644
--- a/data/cygport.conf
+++ b/data/cygport.conf
@@ -101,6 +101,29 @@
 #PAGER=
 
 
+#v* Configuration/ANNOUNCE_EDITOR
+#  DESCRIPTION
+#  Shell command string to process the email message created by cygport's
+#  announce command before sending the email.  If undefined, a text editor
+#  will be run, see EDITOR setting above.  If empty, nothing will be run.
+#  If not empty, '/bin/bash' will be launched with the command string passed
+#  with '-c' option and the path of the temporary email message file as '$1'.
+#  The working directory of the shell will be the directory of the cygport
+#  file.  The specified command string will be prepended by shell assignments
+#  of the cygport variables P, PF, PN, PR and PV and all SMTP_* settings
+#  described below.
+#ANNOUNCE_EDITOR=
+
+#v* Configuration/ANNOUNCE_TO_CMD
+#  DESCRIPTION
+#  Shell command string to process the email message created by cygport's
+#  announce command after editing.  If undefined, the email will be sent
+#  using the builtin perl-based SMTP support.  If empty, nothing will be run.
+#  If not empty, the command string will be handled similar to ANNOUNCE_EDITOR
+#  described above.
+#ANNOUNCE_TO_CMD=
+
+
 #v* Configuration/SMTP_SENDER
 #  DESCRIPTION
 #  Name and email address, in the form of "First Last " to be used
diff --git a/lib/pkg_upload.cygpart b/lib/pkg_upload.cygpart
index 8039ec5c..b81bf3d5 100644
--- a/lib/pkg_upload.cygpart
+++ b/lib/pkg_upload.cygpart
@@ -168,6 +168,28 @@ EOF
echo "Upload complete."
 }
 
+__pkg_announce_run_cmd_on_msg() {
+   local cmdvar=$1
+   local msg=$2
+   local cmd
+
+   eval cmd="\${${cmdvar}}"
+
+   (
+   cd ${top} && /bin/bash -c "\
+P=${P@Q}; PF=${PF@Q}; PN=${PN@Q}; PR=${PR@Q}; PV=(${PV[*]@Q})
+${SMTP_SENDER+SMTP_SENDER=${SMTP_SENDER@Q}}
+${SMTP_SERVER+SMTP_SERVER=${SMTP_SERVER@Q}}
+${SMTP_SERVER_PORT+SMTP_SERVER_PORT=${SMTP_SERVER_PORT@Q}}
+${SMTP_ENCRYPTION+SMTP_ENCRYPTION=${SMTP_ENCRYPTION@Q}}
+${SMTP_USER+SMTP_USER=${SMTP_USER@Q}}
+${SMTP_PASS+SMTP_PASS=${SMTP_PASS@Q}}
+${cmd}
+" \
+   $0 ${msg}
+   ) || error "Command '\${${cmdvar}} ${msg}' (cwd=${top}) failed"
+}
+
 __pkg_announce() {
local msg=$(mktemp -t cygwin-announce-${PF}.XX)
local msgat=$(date +@%s)
@@ -178,10 +200,10 @@ __pkg_announce() {
 
cat > ${msg} <<_EOF
 From cygwin-announce-${PF} $(date '+%a %b %d %H:%M:%S %Y' --date=${msgat})
-From: ${SMTP_SENDER}
-To: cygwin-annou...@cygwin.com
+${SMTP_SENDER:+From: ${SMTP_SENDER}
+}To: cygwin-annou...@cygwin.com
 Date: $(date -R --date=${msgat})
-Message-Id: <$(date "+%Y%m%d%H%M%S.$$" --date=${msgat})-1-$(echo 
${SMTP_SENDER} | sed 's|.*<\(.*\)>.*|\1|')>
+Message-Id: <$(date "+%Y%m%d%H%M%S.$$" --date=${msgat})-1-$(echo 
${SMTP_SENDER:-cygport} | sed 's|.*<\(.*\)>.*|\1|')>
 Subject: ${NAME} ${PVR}
 
 The following package${s} been uploaded to the Cygwin distribution:
@@ -199,7 +221,30 @@ _EOF
 ${DESCRIPTION}
 _EOF
 
-   ${EDITOR:-vi} $msg || error "Editor exited abormally, aborting 
annoucement"
+   if [ "${ANNOUNCE_EDITOR+y}" = "y" ]
+   then
+   echo
+   inform "Launching '\${ANNOUNCE_EDITOR} ${msg}'"
+   [ -z "${ANNOUNCE_EDITOR}" ] ||
+   __pkg_announce_run_cmd_on_msg ANNOUNCE_EDITOR ${msg}
+   else
+   ${EDITOR:-vi} ${msg} || 

[ITP] libvpl

2024-02-21 Thread Takashi Yano via Cygwin-apps
I would like to propose new package libvpl.

This is Intel GPU accelerator driver dispatcher, which has
the same function with mfx_dispatch package.

mfx_dispatch is used by ffmpeg package, however, recent
ffmpeg complains that libmfx is deprecated and use libvpl
instead.

-- 
Takashi Yano 
NAME="libvpl"
VERSION=2.10.2
RELEASE=1
LICENSE="MIT"
CATEGORY="Libs"
SUMMARY="Intel® Video Processing Library (Intel® VPL) dispatcher"
DESCRIPTION="This package provides the headers and the library which loads 
Intel MediaSDK dlls dynamically. The codec itself is implemented in the dlls 
and the Intel GPU."
HOMEPAGE="https://github.com/intel/libvpl/";
SRC_URI="https://github.com/intel/libvpl/archive/refs/tags/v${VERSION}.tar.gz";

inherit cmake

CYGCMAKE_ARGS="
-DBUILD_TOOLS=OFF
-DINSTALL_EXAMPLE_CODE=OFF
"

PKG_NAMES="libvpl libvpl-devel"
libvpl_CONTENTS="usr/bin usr/share"
libvpl_devel_CONTENTS="usr/include/ usr/lib/"
PKG_IGNORE="usr/etc/vpl/vars.sh"

src_install () {
cd ${B}
ninja_install
dosym ../bin/cygvpl-2.dll /usr/lib/libvpl.dll
}
--- origsrc/libvpl-2.10.2/cmake/CompileOptions.cmake2024-02-21 
06:41:06.0 +0900
+++ src/libvpl-2.10.2/cmake/CompileOptions.cmake2024-02-21 
16:11:27.826793000 +0900
@@ -51,16 +51,10 @@ else()
   add_compile_options("-Werror=format-security")
   if(NOT MINGW)
 string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
-if(NOT CMAKE_BUILD_TYPE MATCHES debug)
-  add_definitions("-D_FORTIFY_SOURCE=2")
-endif()
   endif()
   if(NOT MINGW)
 add_compile_options("-fstack-protector-strong")
   endif()
-  if(NOT MINGW)
-add_link_options("-Wl,-z,relro,-z,now,-z,noexecstack")
-  endif()
   add_compile_options("-Wall")
   if(ENABLE_WARNING_AS_ERROR)
 add_compile_options("-Werror")
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl.h   2024-02-21 
06:41:06.0 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl.h   2024-02-21 
15:44:48.647479800 +0900
@@ -48,7 +48,7 @@ typedef char CHAR_TYPE;
 #define MSDK_LIB_NAME L"libmfxhw64."
 #endif
 #define ONEVPL_PRIORITY_PATH_VAR L"ONEVPL_PRIORITY_PATH"
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__CYGWIN__)
 // Linux x64
 #define MSDK_LIB_NAME"libmfxhw64."
 #define ONEVPL_PRIORITY_PATH_VAR "ONEVPL_PRIORITY_PATH"
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_loader.cpp  
2024-02-21 06:41:06.0 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_loader.cpp  2024-02-21 
15:43:05.531476800 +0900
@@ -409,7 +409,7 @@ mfxU32 LoaderCtxVPL::GetSearchPathsLegac
 mfxU32 LoaderCtxVPL::GetSearchPathsSystemDefault(std::list 
&searchDirs) {
 searchDirs.clear();
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 // Add the standard path for libmfx1 install in Ubuntu
 searchDirs.push_back("/usr/lib/x86_64-linux-gnu");
 
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_lowlatency.cpp  
2024-02-21 06:41:06.0 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_lowlatency.cpp  
2024-02-21 15:46:45.692207300 +0900
@@ -18,6 +18,9 @@
 #define LIB_ONEVPL L"libmfx64-gen.dll"
 #define LIB_MSDK   L"libmfxhw64.dll"
 #endif
+#elif defined(__CYGWIN__)
+#define LIB_ONEVPL "libmfx64-gen.dll"
+#define LIB_MSDK   "libmfxhw64.dll"
 #elif defined(__linux__)
 // Linux x64
 #define LIB_ONEVPL "libmfx-gen.so.1.2"
@@ -191,7 +194,7 @@ mfxStatus LoaderCtxVPL::LoadLibsFromSyst
 }
 
 mfxStatus LoaderCtxVPL::LoadLibsFromMultipleDirs(LibType libType) {
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 // clang-format off
 
 // standard paths for RT installation on Linux
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_msdk.cpp
2024-02-21 06:41:06.0 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_msdk.cpp2024-02-21 
15:47:17.135104700 +0900
@@ -11,7 +11,7 @@
 #include "src/mfx_dispatcher_vpl_win.h"
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 #include 
 #define strncpy_s(dst, size, src, cnt) strncpy((dst), (src), (cnt)) // 
NOLINT
 #endif
@@ -97,7 +97,7 @@ static const mfxImplementedFunctions msd
 (mfxChar**)msdkImplFuncsNames
 };
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 // optional extBuf to limit threads created in MSDK session creation
 // to enable, set vplParam.NumExtParam and vplParam.ExtParam before calling 
MFXInitEx2()
 static const mfxExtThreadsParam extThreadParam = {
@@ -142,7 +142,7 @@ mfxStatus LoaderCtxMSDK::OpenSession(mfx
 mfxInitializationParam vplParam = {};
 vplParam.AccelerationMode   = accelMode;
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
 vplParam.ExtParam= (mfxExtBuffer **)&extParams;
 vplParam.NumExtParam = 1;
 #else
@@ -183,7 +183,7 @@ mfxAccelerationMode LoaderCtxMSDK::CvtAc
 }
 
 mfxStatus LoaderCtxMSDK::GetDefaultAccelT

Re: [PATCH cygport] Use correct wording if only one package is announced

2024-02-21 Thread Brian Inglis via Cygwin-apps

On 2024-02-21 07:25, Christian Franke via Cygwin-apps wrote:

Change variable name from $s to $has or $s_have as variable $s usually implies 
only the plural letter s or nothing; e.g.

...
+   local has="s have"
+
+   [ $pkg_count != 1 ] || has=" has"
...
+The following package${has} been uploaded to the Cygwin distribution:
...
--
Take care. Thanks, Brian Inglis  Calgary, Alberta, Canada

La perfection est atteinte   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry


Re: [ITP] libvpl

2024-02-21 Thread Marco Atzeri via Cygwin-apps

On 21/02/2024 17:41, Takashi Yano via Cygwin-apps wrote:

I would like to propose new package libvpl.

This is Intel GPU accelerator driver dispatcher, which has
the same function with mfx_dispatch package.

mfx_dispatch is used by ffmpeg package, however, recent
ffmpeg complains that libmfx is deprecated and use libvpl
instead.



+libvpl   Takashi Yano


your score is now:

$ grep Yano cygwin-pkg-maint |wc -l
63

:-)

Thanks
Marco


Re: [ITA] gnutls

2024-02-21 Thread Marco Atzeri via Cygwin-apps

On 21/02/2024 13:09, Takashi Yano via Cygwin-apps wrote:

I would like to adopt gnutls package.



$ git diff | grep -E "^\+|^-"
--- a/cygwin-pkg-maint
+++ b/cygwin-pkg-maint
-gnutls   ORPHANED (Yaakov Selkowitz)
+gnutls   Takashi Yano
-libssh   ORPHANED (Yaakov Selkowitz)
+libssh   Takashi Yano
+libvpl   Takashi Yano
-nettle   ORPHANED (Yaakov Selkowitz)
+nettle   Takashi Yano
-unbound  ORPHANED (Yaakov Selkowitz)
+unbound  Takashi Yano


Thanks
Marco