Skip to content

Commit

Permalink
Ports: Add gpgme
Browse files Browse the repository at this point in the history
  • Loading branch information
fdellwing authored and timschumi committed Mar 29, 2024
1 parent fdff0db commit 6cd09cc
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ports/AvailablePorts.md
Expand Up @@ -108,6 +108,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`gnupg`](gnupg/) | GnuPG | 2.4.5 | https://gnupg.org/software/index.html |
| [`gnuplot`](gnuplot/) | Gnuplot | 5.4.8 | http://www.gnuplot.info/ |
| [`gperf`](gperf/) | GNU gperf | 3.1 | https://www.gnu.org/software/gperf/ |
| [`gpgme`](gpgme/) | GnuPG Made Easy (GPGME) | 1.23.2 | https://gnupg.org/software/gpgme/index.html |
| [`grep`](grep/) | GNU Grep | 3.11 | https://www.gnu.org/software/grep/ |
| [`grepcidr`](grepcidr/) | grepcidr | 2.0 | http://www.pc-tools.net/unix/grepcidr/ |
| [`griffon`](griffon/) | The Griffon Legend | 1.0 | https://www.scummvm.org/games/#games-griffon |
Expand Down
20 changes: 20 additions & 0 deletions Ports/gpgme/package.sh
@@ -0,0 +1,20 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='gpgme'
version='1.23.2'
useconfigure='true'
use_fresh_config_sub='true'
config_sub_paths=(
'build-aux/config.sub'
)
files=(
"https://gnupg.org/ftp/gcrypt/gpgme/gpgme-${version}.tar.bz2#9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224"
)
depends=(
'gnupg'
)
configopts=(
'--disable-gpg-test'
"--with-libgpg-error-prefix=${SERENITY_INSTALL_ROOT}/usr/local"
"--with-libassuan-prefix=${SERENITY_INSTALL_ROOT}/usr/local"
"--with-sysroot=${SERENITY_INSTALL_ROOT}"
)
@@ -0,0 +1,92 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Sun, 29 May 2022 15:01:28 +0200
Subject: [PATCH] libtool: Enable shared library support for SerenityOS

For some odd reason, libtool handles the configuration for shared
libraries entirely statically and in its configure script. If no
shared library support is "present", building shared libraries is
disabled entirely.

Fix that by just adding the appropriate configuration options for
`serenity`. This allows us to finally create dynamic libraries
automatically using libtool, without having to manually link the
static library into a shared library.
---
configure | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

diff --git a/configure b/configure
index 0b45739345232edb5ac0a145cb704ff9ad0836d6..913b10eedb6196448a14cf017bff4ec3518e23aa 100755
--- a/configure
+++ b/configure
@@ -8773,6 +8773,11 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;

+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -11990,6 +11995,10 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-Bstatic'
;;

+ serenity*)
+ lt_prog_compiler_can_build_shared=yes
+ ;;
+
*)
lt_prog_compiler_can_build_shared=no
;;
@@ -13418,6 +13427,10 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
hardcode_shlibpath_var=no
;;

+ serenity*)
+ ld_shlibs=yes
+ ;;
+
*)
ld_shlibs=no
;;
@@ -14437,6 +14450,17 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;

+serenity*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}${major}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
*)
dynamic_linker=no
;;
@@ -18318,6 +18342,17 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;

+serenity*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}${versuffix} ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}${major}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
*)
dynamic_linker=no
;;
16 changes: 16 additions & 0 deletions Ports/gpgme/patches/ReadMe.md
@@ -0,0 +1,16 @@
# Patches for gpgme on SerenityOS

## `0001-libtool-Enable-shared-library-support-for-SerenityOS.patch`

libtool: Enable shared library support for SerenityOS

For some odd reason, libtool handles the configuration for shared
libraries entirely statically and in its configure script. If no
shared library support is "present", building shared libraries is
disabled entirely.

Fix that by just adding the appropriate configuration options for
`serenity`. This allows us to finally create dynamic libraries
automatically using libtool, without having to manually link the
static library into a shared library.

0 comments on commit 6cd09cc

Please sign in to comment.