Skip to content

Commit

Permalink
Ports: Add gnupg port
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarbeutner authored and awesomekling committed Apr 14, 2021
1 parent ba57108 commit 0a600a3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions Ports/AvailablePorts.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`git`](git/) | Git | 2.26.0 | https://git-scm.com/ |
| [`gmp`](gmp/) | GNU Multiple Precision Arithmetic Library | 6.2.1 | https://gmplib.org/ |
| [`gnucobol`](gnucobol/) | GnuCOBOL | 3.1.2 | https://gnucobol.sourceforge.io/ |
| [`gnupg`](gnupg/) | GnuPG | 2.3.0 | https://gnupg.org/software/index.html |
| [`gnuplot`](gnuplot/) | Gnuplot | 5.2.8 | http:https://www.gnuplot.info/ |
| [`grep`](grep/) | GNU Grep | 2.5.4 | https://www.gnu.org/software/grep/ |
| [`hatari`](hatari/) | Atari ST/STE/TT/Falcon emulator | 2.4.0-devel | https://hatari.tuxfamily.org/ |
Expand Down
22 changes: 22 additions & 0 deletions Ports/gnupg/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=gnupg
version=2.3.0
useconfigure=true
configopts="--with-libgpg-error-prefix=${SERENITY_BUILD_DIR}/Root/usr/local \
--with-libgcrypt-prefix=${SERENITY_BUILD_DIR}/Root/usr/local \
--with-libassuan-prefix=${SERENITY_BUILD_DIR}/Root/usr/local \
--with-ntbtls-prefix=${SERENITY_BUILD_DIR}/Root/usr/local \
--with-npth-prefix=${SERENITY_BUILD_DIR}/Root/usr/local \
--disable-dirmngr"
files="https://gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2 gnupg-${version}.tar.bz2"
depends="libiconv libgpg-error libgcrypt libassuan npth ntbtls"

pre_configure() {
export GPGRT_CONFIG="${SERENITY_BUILD_DIR}/Root/usr/local/bin/gpgrt-config"
export CFLAGS="-L${SERENITY_BUILD_DIR}/Root/usr/local/include"
export LDFLAGS="-L${SERENITY_BUILD_DIR}/Root/usr/local/lib -lm -liconv"
}

configure() {
run ./configure --host="${SERENITY_ARCH}-pc-serenity" --build="$($workdir/build-aux/config.guess)" $configopts
}
12 changes: 12 additions & 0 deletions Ports/gnupg/patches/configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -Naur gnupg-2.3.0/build-aux/config.sub gnupg-2.3.0.serenity/build-aux/config.sub
--- gnupg-2.3.0/build-aux/config.sub 2017-03-17 09:34:37.000000000 +0100
+++ gnupg-2.3.0.serenity/build-aux/config.sub 2021-04-14 01:12:00.264606451 +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* \

0 comments on commit 0a600a3

Please sign in to comment.