Ports: Add libassuan port

This commit is contained in:
Gunnar Beutner 2021-04-14 04:32:19 +02:00 committed by Andreas Kling
parent 700cad4508
commit c3aac8cbe7
Notes: sideshowbarker 2024-07-18 20:23:06 +09:00
5 changed files with 55 additions and 0 deletions

View file

@ -42,6 +42,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`klong`](klong/) | Klong | 20190926 | http://t3x.org/klong/ |
| [`less`](less/) | less | 530 | http://www.greenwoodsoftware.com/less/ |
| [`libarchive`](libarchive/) | libarchive | 3.4.0 | https://libarchive.org/ |
| [`libassuan`](libassuan/) | libassuan | 2.5.5 | https://gnupg.org/software/libassuan/index.html |
| [`libexpat`](libexpat/) | Expat | 2.2.9 | https://libexpat.github.io/ |
| [`libffi`](libffi/) | libffi | 3.3 | https://www.sourceware.org/libffi/ |
| [`libiconv`](libiconv/) | GNU libiconv | 1.16 | https://www.gnu.org/software/libiconv/ |

15
Ports/libassuan/package.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=libassuan
version=2.5.5
useconfigure=true
#configopts="--with-libgpg-error-prefix=${SERENITY_BUILD_DIR}/Root/usr/local"
files="https://gnupg.org/ftp/gcrypt/libassuan/libassuan-${version}.tar.bz2 libassuan-${version}.tar.bz2"
pre_configure() {
export gcry_cv_gcc_has_f_visibility=no
export ac_cv_lib_pthread_pthread_create=no
}
configure() {
run ./configure --host="${SERENITY_ARCH}-pc-serenity" --build="$($workdir/build-aux/config.guess)" $configopts
}

View file

@ -0,0 +1,12 @@
diff -Naur libassuan-2.5.5/build-aux/config.sub libassuan-2.5.5.serenity/build-aux/config.sub
--- libassuan-2.5.5/build-aux/config.sub 2016-07-13 19:01:14.000000000 +0200
+++ libassuan-2.5.5.serenity/build-aux/config.sub 2021-04-14 02:35:26.315797397 +0200
@@ -1381,7 +1381,7 @@
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* | -serenity* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \

View file

@ -0,0 +1,11 @@
diff -Naur libassuan-2.5.5/src/assuan-socket.c libassuan-2.5.5.serenity/src/assuan-socket.c
--- libassuan-2.5.5/src/assuan-socket.c 2021-04-14 02:38:16.911542870 +0200
+++ libassuan-2.5.5.serenity/src/assuan-socket.c 2021-04-14 02:37:37.497571703 +0200
@@ -34,6 +34,7 @@
#endif
#else
# include <sys/types.h>
+# include <sys/time.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>

View file

@ -0,0 +1,16 @@
diff -Naur libassuan-2.5.5/src/system-posix.c libassuan-2.5.5.serenity/src/system-posix.c
--- libassuan-2.5.5/src/system-posix.c 2021-04-14 02:40:14.020341296 +0200
+++ libassuan-2.5.5.serenity/src/system-posix.c 2021-04-14 02:39:56.823341349 +0200
@@ -412,7 +412,12 @@
__assuan_socketpair (assuan_context_t ctx, int namespace, int style,
int protocol, assuan_fd_t filedes[2])
{
+#ifndef __serenity__
return socketpair (namespace, style, protocol, filedes);
+#else
+ errno = ENOTSUP;
+ return -1;
+#endif
}