Ports: Add libgpg-error port

This commit is contained in:
Gunnar Beutner 2021-04-14 04:32:34 +02:00 committed by Andreas Kling
parent c3aac8cbe7
commit 45f1170691
6 changed files with 70 additions and 0 deletions

View file

@ -45,6 +45,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`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/ |
| [`libgpg-error`](libgpg-error/)| libgpg-error | 1.42 | https://gnupg.org/software/libgpg-error/index.html |
| [`libiconv`](libiconv/) | GNU libiconv | 1.16 | https://www.gnu.org/software/libiconv/ |
| [`libksba`](libksba/) | libksba | 1.5.1 | https://gnupg.org/software/libksba/index.html |
| [`libjpeg`](libjpeg/) | libjpeg | 9d | https://ijg.org/ |

14
Ports/libgpg-error/package.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=libgpg-error
version=1.42
useconfigure=true
configopts="--disable-tests --disable-threads"
files="https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-${version}.tar.bz2 libgpg-error-${version}.tar.bz2"
pre_configure() {
export gcry_cv_gcc_has_f_visibility=no
}
configure() {
run ./configure --host="${SERENITY_ARCH}-pc-serenity" --build="$($workdir/build-aux/config.guess)" $configopts
}

View file

@ -0,0 +1,12 @@
diff -Naur libgpg-error-1.42/build-aux/config.sub libgpg-error-1.42.serenity/build-aux/config.sub
--- libgpg-error-1.42/build-aux/config.sub 2018-10-24 10:00:20.000000000 +0200
+++ libgpg-error-1.42.serenity/build-aux/config.sub 2021-04-14 01:15:34.040231143 +0200
@@ -1333,7 +1333,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* | esix* | aix* | cnk* | sunos | sunos[34]*\
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \

View file

@ -0,0 +1,11 @@
diff -Naur libgpg-error-1.42/src/mkerrcodes.c libgpg-error-1.42.serenity/src/mkerrcodes.c
--- libgpg-error-1.42/src/mkerrcodes.c 2016-11-16 13:22:03.000000000 +0100
+++ libgpg-error-1.42.serenity/src/mkerrcodes.c 2021-04-14 01:38:44.112242487 +0200
@@ -22,6 +22,7 @@
system, while this file will be run on the build system. */
#include <stdio.h>
+#include <errno.h>
#include "mkerrcodes.h"

View file

@ -0,0 +1,11 @@
diff -Naur libgpg-error-1.42/src/gen-lock-obj.sh libgpg-error-1.42.serenity/src/gen-lock-obj.sh
--- libgpg-error-1.42/src/gen-lock-obj.sh 2021-03-04 11:05:29.000000000 +0100
+++ libgpg-error-1.42.serenity/src/gen-lock-obj.sh 2021-04-14 02:17:50.977517154 +0200
@@ -124,7 +124,6 @@
fi
cat <<'EOF'
-}}}
##
## Local Variables:
## mode: c

View file

@ -0,0 +1,21 @@
diff -Naur libgpg-error-1.42/src/syscfg/lock-obj-pub.i686-pc-serenity.h libgpg-error-1.42.serenity/src/syscfg/lock-obj-pub.i686-pc-serenity.h
--- libgpg-error-1.42/src/syscfg/lock-obj-pub.i686-pc-serenity.h 1970-01-01 01:00:00.000000000 +0100
+++ libgpg-error-1.42.serenity/src/syscfg/lock-obj-pub.i686-pc-serenity.h 2021-04-14 01:24:29.444700685 +0200
@@ -0,0 +1,17 @@
+## lock-obj-pub.i686-pc-serenity.h - NO LOCK SUPPORT
+## File created by gen-posix-lock-obj - DO NOT EDIT
+## To be included by mkheader into gpg-error.h
+
+/* Dummy object - no locking available. */
+typedef struct
+{
+ long _vers;
+} gpgrt_lock_t;
+
+#define GPGRT_LOCK_INITIALIZER {-1}
+##
+## Local Variables:
+## mode: c
+## buffer-read-only: t
+## End:
+##