From ed84c00ece99a6e04a1d8bbed323bc007dfe3f28 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 13 Dec 2022 15:54:46 +0100 Subject: [PATCH] gasl, bump version (#7549) --- net-libs/libgsasl/libgsasl-1.8.0.recipe | 62 --------- net-misc/gsasl/gsasl-1.8.0.recipe | 71 ----------- net-misc/gsasl/gsasl-2.2.0.recipe | 132 ++++++++++++++++++++ net-misc/gsasl/patches/gsasl-1.8.0.patchset | 120 ------------------ 4 files changed, 132 insertions(+), 253 deletions(-) delete mode 100644 net-libs/libgsasl/libgsasl-1.8.0.recipe delete mode 100644 net-misc/gsasl/gsasl-1.8.0.recipe create mode 100644 net-misc/gsasl/gsasl-2.2.0.recipe delete mode 100644 net-misc/gsasl/patches/gsasl-1.8.0.patchset diff --git a/net-libs/libgsasl/libgsasl-1.8.0.recipe b/net-libs/libgsasl/libgsasl-1.8.0.recipe deleted file mode 100644 index 8f1a7f2c5..000000000 --- a/net-libs/libgsasl/libgsasl-1.8.0.recipe +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY="The GNU SASL library" -DESCRIPTION="GNU SASL is an implementation of the Simple Authentication and \ -Security Layer framework and a few common SASL mechanisms. SASL is used by \ -network servers (e.g., IMAP, SMTP) to request authentication from clients, \ -and in clients to authenticate against servers. - -Supported mechanisms are ANONYMOUS, EXTERNAL, LOGIN, PLAIN, SECURID, NTLM, \ -DIGEST-MD5, CRAM-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS, GS2-KRB5, GSSAPI." -HOMEPAGE="http://www.gnu.org/software/gsasl" -COPYRIGHT="2004-2012 Simon Josefsson" -LICENSE="GNU GPL v3 - GNU LGPL v3" -REVISION="3" -SOURCE_URI="ftp://ftp.gnu.org/gnu/gsasl/libgsasl-$portVersion.tar.gz" -CHECKSUM_SHA256="3adfb49f9c92a719dea855fd1840d698cde55d4648d332a69032ba8bea207720" - -ARCHITECTURES="all" -SECONDARY_ARCHITECTURES="x86_gcc2 x86" - -PROVIDES=" - libgsasl$secondaryArchSuffix = $portVersion - lib:libgsasl$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -PROVIDES_devel=" - libgsasl${secondaryArchSuffix}_devel = $portVersion - devel:libgsasl$secondaryArchSuffix = $portVersion - " -REQUIRES_devel=" - libgsasl$secondaryArchSuffix == $portVersion base - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - " -BUILD_PREREQUIRES=" - cmd:gcc$secondaryArchSuffix - cmd:ld$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix - cmd:make - " - -BUILD() -{ - runConfigure ./configure - make $jobArgs -} - -INSTALL() -{ - make install - - prepareInstalledDevelLibs libgsasl - fixPkgconfig - - # devel package - packageEntries devel \ - $developDir -} diff --git a/net-misc/gsasl/gsasl-1.8.0.recipe b/net-misc/gsasl/gsasl-1.8.0.recipe deleted file mode 100644 index aa9f92ca2..000000000 --- a/net-misc/gsasl/gsasl-1.8.0.recipe +++ /dev/null @@ -1,71 +0,0 @@ -SUMMARY="The GNU SASL tool" -DESCRIPTION="GNU SASL is an implementation of the Simple Authentication and \ -Security Layer framework and a few common SASL mechanisms. SASL is used by \ -network servers (e.g., IMAP, SMTP) to request authentication from clients, and \ -in clients to authenticate against servers. - -Supported mechanisms are ANONYMOUS, EXTERNAL, LOGIN, PLAIN, SECURID, NTLM, \ -DIGEST-MD5, CRAM-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS, GS2-KRB5, GSSAPI." -HOMEPAGE="https://www.gnu.org/software/gsasl/" -COPYRIGHT="2004-2012 Simon Josefsson" -LICENSE="GNU GPL v3 - GNU LGPL v3" -REVISION="1" -SOURCE_URI="https://ftp.gnu.org/gnu/gsasl/gsasl-$portVersion.tar.gz" -CHECKSUM_SHA256="310262d1ded082d1ceefc52d6dad265c1decae8d84e12b5947d9b1dd193191e5" -PATCHES="gsasl-$portVersion.patchset" - -ARCHITECTURES="all" - -PROVIDES=" - gsasl = $portVersion - cmd:gsasl = $portVersion - " -REQUIRES=" - haiku - lib:libgnutls - lib:libgsasl - lib:libiconv - lib:libintl - " - -BUILD_REQUIRES=" - haiku_devel - devel:libgnutls - devel:libgsasl - devel:libiconv - devel:libintl - " -BUILD_PREREQUIRES=" - cmd:aclocal - cmd:autoconf - cmd:autoheader - cmd:automake -# cmd:dia - cmd:gcc - cmd:ld - cmd:libtoolize - cmd:make - " - -defineDebugInfoPackage gsasl \ - $binDir/gsasl - -BUILD() -{ - runConfigure ./configure - - # ignore lack of dia - make -i $jobArgs -} - -INSTALL() -{ - # ignore lack of dia - make -i install - - rm -rf $libDir - rm -rf $includeDir - rm -rf $manDir/man3 - rm -rf $infoDir -} diff --git a/net-misc/gsasl/gsasl-2.2.0.recipe b/net-misc/gsasl/gsasl-2.2.0.recipe new file mode 100644 index 000000000..7965922f8 --- /dev/null +++ b/net-misc/gsasl/gsasl-2.2.0.recipe @@ -0,0 +1,132 @@ +SUMMARY="The GNU SASL tool" +DESCRIPTION="GNU SASL is an implementation of the Simple Authentication and \ +Security Layer framework and a few common SASL mechanisms. SASL is used by \ +network servers (e.g., IMAP, SMTP) to request authentication from clients, and \ +in clients to authenticate against servers. + +Supported mechanisms are ANONYMOUS, EXTERNAL, LOGIN, PLAIN, SECURID, NTLM, \ +DIGEST-MD5, CRAM-MD5, SCRAM-SHA-1, SCRAM-SHA-1-PLUS, GS2-KRB5, GSSAPI." +HOMEPAGE="https://www.gnu.org/software/gsasl/" +COPYRIGHT="2004-2012 Simon Josefsson" +LICENSE="GNU GPL v3 + GNU LGPL v3" +REVISION="1" +SOURCE_URI="https://ftp.gnu.org/gnu/gsasl/gsasl-$portVersion.tar.gz" +CHECKSUM_SHA256="79b868e3b9976dc484d59b29ca0ae8897be96ce4d36d32aed5d935a7a3307759" + +ARCHITECTURES="all" +SECONDARY_ARCHITECTURES="x86" + +commandBinDir=$binDir +commandSuffix=$secondaryArchSuffix +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +libVersion="18.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + gsasl$secondaryArchSuffix = $portVersion + lib:libgsasl$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libgnutls$secondaryArchSuffix + lib:libgcrypt$secondaryArchSuffix + lib:libgpg_error$secondaryArchSuffix + lib:libgssapi_krb5$secondaryArchSuffix + lib:libidn$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libk5crypto$secondaryArchSuffix + lib:libkrb5$secondaryArchSuffix + lib:libkrb5crypto$secondaryArchSuffix + lib:libreadline$secondaryArchSuffix + " + +PROVIDES_devel=" + gsasl${secondaryArchSuffix}_devel = $portVersion + devel:libgsasl$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + gsasl$secondaryArchSuffix == $portVersion base + " + +PROVIDES_tools=" + gsasl${secondaryArchSuffix}_tools = $portVersion + cmd:gsasl$commandSuffix = $portVersion + " +REQUIRES_tools=" + gsasl$secondaryArchSuffix == $portVersion base + haiku$secondaryArchSuffix + lib:libgnutls$secondaryArchSuffix + lib:libgcrypt$secondaryArchSuffix + lib:libgpg_error$secondaryArchSuffix + lib:libgssapi_krb5$secondaryArchSuffix + lib:libidn$secondaryArchSuffix + lib:libiconv$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + lib:libk5crypto$secondaryArchSuffix + lib:libkrb5$secondaryArchSuffix + lib:libkrb5crypto$secondaryArchSuffix + lib:libreadline$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgnutls$secondaryArchSuffix + devel:libgcrypt$secondaryArchSuffix + devel:libidn$secondaryArchSuffix + devel:libiconv$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + devel:libkrb5$secondaryArchSuffix + devel:libreadline$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:autoheader + cmd:automake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + " + +defineDebugInfoPackage gsasl$secondaryArchSuffix \ + $(getPackagePrefix tools)/bin/gsasl \ + $libDir/libgsasl.so.$libVersion + +BUILD() +{ + runConfigure --omit-dirs binDir ./configure \ + --bindir=$commandBinDir \ + --disable-static \ + --with-libgcrypt \ + --with-gssapi-impl=mit + + make -i $jobArgs +} + +INSTALL() +{ + make -i install + + # remove libtool file + rm $libDir/libgsasl.la + + prepareInstalledDevelLib libgsasl + + packageEntries devel \ + $developDir + + packageEntries tools \ + $commandBinDir +} + +TEST() +{ + make check +} diff --git a/net-misc/gsasl/patches/gsasl-1.8.0.patchset b/net-misc/gsasl/patches/gsasl-1.8.0.patchset deleted file mode 100644 index b18afc143..000000000 --- a/net-misc/gsasl/patches/gsasl-1.8.0.patchset +++ /dev/null @@ -1,120 +0,0 @@ -From 85194fab93ce2c243147cbc18516950562bc4099 Mon Sep 17 00:00:00 2001 -From: sfanxiang -Date: Mon, 15 Jan 2018 00:29:12 +0000 -Subject: port to Haiku - - -diff --git a/src/gsasl.c b/src/gsasl.c -index 11d45b5..a9ee590 100644 ---- a/src/gsasl.c -+++ b/src/gsasl.c -@@ -31,6 +31,8 @@ gnutls_session session; - bool using_tls = false; - #endif - -+#include -+ - char *b64cbtlsunique = NULL; - - struct gengetopt_args_info args_info; -@@ -713,20 +715,12 @@ main (int argc, char *argv[]) - /* Transfer application payload */ - if (args_info.application_data_flag) - { -- struct pollfd pfd[2]; -+ fd_set rfds, efds; -+ int nfds; - char *sockbuf = NULL; - /* we read chunks of 1000 bytes at a time */ - size_t sockpos = 0, sockalloc = 0, sockalloc1 = 1000; - -- /* Setup pollfd structs... */ -- pfd[0].fd = STDIN_FILENO; -- pfd[0].events = POLLIN; -- if (sockfd) -- { -- pfd[1].fd = sockfd; -- pfd[1].events = POLLIN; -- } -- - if (!args_info.quiet_given) - { - fprintf (stderr, -@@ -738,19 +732,32 @@ main (int argc, char *argv[]) - { - int rc; - -- pfd[0].revents = 0; -- pfd[1].revents = 0; -+ /* Setup fd_set structs... */ -+ FD_ZERO (&rfds); -+ FD_ZERO (&efds); -+ -+ FD_SET (STDIN_FILENO, &rfds); -+ FD_SET (STDIN_FILENO, &efds); -+ nfds = STDIN_FILENO + 1; - -- rc = poll (pfd, sockfd ? 2 : 1, -1); -+ if (sockfd) -+ { -+ FD_SET (sockfd, &rfds); -+ FD_SET (sockfd, &efds); -+ if (sockfd + 1 > nfds) nfds = sockfd + 1; -+ } -+ -+ rc = select (nfds, &rfds, NULL, &efds, NULL); - if (rc < 0 && errno == EINTR) - continue; - - /* Always check for errors */ - if (rc < 0) -- error (EXIT_FAILURE, errno, "poll"); -+ error (EXIT_FAILURE, errno, "select"); - - /* We got data to read from stdin.. */ -- if ((pfd[0].revents & (POLLIN | POLLERR)) == POLLIN) -+ if (FD_ISSET (STDIN_FILENO, &rfds) -+ && !FD_ISSET (STDIN_FILENO, &efds)) - { - char *line = NULL; - size_t n; -@@ -812,14 +819,15 @@ main (int argc, char *argv[]) - free (out); - } - /* If there was an error, quit. */ -- else if (pfd[0].revents & (POLLERR | POLLHUP)) -+ else if (FD_ISSET (STDIN_FILENO, &efds)) - { -- error (0, 0, "poll stdin"); -+ error (0, 0, "select stdin"); - break; - } - - /* We got data to read from the socket.. */ -- if (sockfd && (pfd[1].revents & (POLLIN | POLLERR)) == POLLIN) -+ if (sockfd && FD_ISSET (sockfd, &rfds) -+ && !FD_ISSET (sockfd, &efds)) - { - ssize_t len; - -@@ -862,10 +870,15 @@ main (int argc, char *argv[]) - printf ("%.*s", (int) output_len, out); - free (out); - } -+ else if (!sockfd) -+ { -+ error (0, 0, "select error"); -+ break; -+ } - /* If there was an error, quit. */ -- else if (pfd[1].revents & (POLLERR | POLLHUP)) -+ else if (FD_ISSET (sockfd, &efds)) - { -- error (0, 0, "poll socket"); -+ error (0, 0, "select socket"); - break; - } - } --- -2.15.0 -