Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to compile gpg2 on OS X Mavericks
# Depends: libgpg-error
curl -O ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.12.tar.bz2
tar xjf libgpg-error-1.12.tar.bz2
cd libgpg-error-1.12
./configure --prefix=/usr/local
make
sudo make install
# Depends: libgcrypt
curl -O ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.3.tar.bz2
tar xjf libgcrypt-1.5.3.tar.bz2
cd libgcrypt-1.5.3
./configure --disable-asm --prefix=/usr/local
make
sudo make install
# Depends: libksba
curl -O ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
tar xjf libksba-1.3.0.tar.bz2
cd libksba-1.3.0.tar.bz2
./configure --prefix=/usr/local
make
sudo make install
# Depends: libassuan
curl -O ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-2.1.1.tar.bz2
tar xjf libassuan-2.1.1.tar.bz2
cd libassuan-2.1.1
./configure --prefix=/usr/local
make
sudo make install
# gpg2
curl -O ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-2.0.22.tar.bz2
tar xjf gnupg-2.0.22.tar.bz2
cd gnupg-2.0.22
./configure --prefix=/usr/local
make
## Fix problem with XCode 5.0 and typedefs (in a hacky fashion). See:
## http://lists.gnupg.org/pipermail/gnupg-users/2013-October/047795.html and
## https://bugs.g10code.com/gnupg/issue1541
curl https://gist.github.com/andrewlkho/7369417/download |
tar -xO --strip-components=1 --include='*gistfile2.txt' |
patch -p0
make
sudo make install
# pinentry-curses
curl -O ftp://ftp.gnupg.org/gcrypt/pinentry-0.8.3.tar.bz2
tar xjf pinentry-0.8.3.tar.bz2
cd pinentry-0.8.3
./configure --prefix=/usr/local \
--enable-pinentry-curses \
--disable-pinentry-qt \
--disable-pinentry-qt4 \
--disable-pinentry-gtk \
--disable-pinentry-gtk2
make
sudo make install
# Handy extra: gpgsplit from gnupg 1.4. This is useful for combining secret
# subkeys: https://gist.github.com/andrewlkho/6777065
curl -O ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.15.tar.bz2
tar xjf gnupg-1.4.15.tar.bz2
cd gnupg-1.4.15
make
cp tools/gpgsplit ~/bin
--- gl/stdint-orig.h 2013-11-08 10:45:20.000000000 +0000
+++ gl/stdint.h 2013-11-08 10:46:53.000000000 +0000
@@ -44,6 +44,10 @@
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined. */
# include "///Library/Developer/CommandLineTools/usr/bin/../lib/clang/5.0/include/stdint.h"
+typedef long intptr_t;
+typedef long long intmax_t;
+typedef unsigned long uintptr_t;
+typedef unsigned long long uintmax_t;
#endif
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment