Preliminary support for GnuPG2

This commit is contained in:
Duncan Guthrie 2018-01-05 21:09:07 +00:00 committed by Thierry Laurion
parent 760429601a
commit 7f1288b89c
No known key found for this signature in database
GPG Key ID: 79C78E6659DB658F
8 changed files with 190 additions and 5 deletions

58
modules/gpg2 Normal file
View File

@ -0,0 +1,58 @@
modules-$(CONFIG_GPG2) += gpg2
gpg2_version := 2.2.4
gpg2_dir := gnupg-$(gpg2_version)
gpg2_tar := gnupg-$(gpg2_version).tar.bz2
gpg2_url := https://www.gnupg.org/ftp/gcrypt/gnupg/$(gpg2_tar)
gpg2_hash := 401a3e64780fdfa6d7670de0880aa5c9d589b3db7a7098979d7606cec546f2ec
# For reproducibility reasons we have to override the exec_prefix
# and datarootdir on the configure line so that the Makefiles will
# be generated with the correct paths, but then re-write them when
# we use the install target so that they will be copied to the correct
# location.
gpg2_configure := ./configure \
$(CROSS_TOOLS) \
--host x86_64-linux-musl \
--with-libusb="$(INSTALL)" \
--with-libgpg-error-prefix="$(INSTALL)" \
--with-libgcrypt-prefix="$(INSTALL)" \
--with-libassuan-prefix="$(INSTALL)" \
--with-ksba-prefix="$(INSTALL)" \
--with-npth-prefix="$(INSTALL)" \
--prefix "/" \
--enable-scdaemon \
--enable-ccid-driver \
--disable-tofu \
--disable-rpath \
--disable-regex \
--disable-doc \
--disable-bzip2 \
--disable-asm \
--disable-exec \
--disable-photo-viewers \
--disable-keyserver-helpers \
--disable-ldap \
--disable-hkp \
--disable-finger \
--disable-dns-srv \
--disable-dns-cert \
--disable-regex \
--disable-nls \
--disable-all-tests \
--disable-wks-server \
--disable-wks-tools \
--disable-gnutls \
--disable-dirmgnr \
# Run one build to generate the executables with the pre-defined
# exec_prefix and datarootdir, then a second make to install the binaries
# into our actual target location
gpg2_target := $(MAKE_JOBS) \
&& $(MAKE) -C $(build)/$(gpg2_dir) \
DESTDIR="$(INSTALL)" \
install
gpg2_output := g10/gpg
gpg2_depends := libgpg-error libgcrypt libksba libassuan npth libusb-compat $(musl_dep)

24
modules/libassuan Normal file
View File

@ -0,0 +1,24 @@
modules-$(CONFIG_GPG2) += libassuan
libassuan_version := 2.5.1
libassuan_dir := libassuan-$(libassuan_version)
libassuan_tar := libassuan-$(libassuan_version).tar.bz2
libassuan_url := https://gnupg.org/ftp/gcrypt/libassuan/$(libassuan_tar)
libassuan_hash := 47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449
libassuan_configure := ./configure \
$(CROSS_TOOLS) \
--host x86_64-linux-musl \
--prefix "/" \
--disable-static \
--disable-nls \
--with-libgpg-error-prefix="$(INSTALL)" \
--disable-asm \
libassuan_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \
install \
libassuan_libraries := src/.libs/libassuan.so
libassuan_depends := libgpg-error $(musl_dep)

24
modules/libgcrypt Normal file
View File

@ -0,0 +1,24 @@
modules-$(CONFIG_GPG2) += libgcrypt
libgcrypt_version := 1.8.2
libgcrypt_dir := libgcrypt-$(libgcrypt_version)
libgcrypt_tar := libgcrypt-$(libgcrypt_version).tar.bz2
libgcrypt_url := https://gnupg.org/ftp/gcrypt/libgcrypt/$(libgcrypt_tar)
libgcrypt_hash := c8064cae7558144b13ef0eb87093412380efa16c4ee30ad12ecb54886a524c07
libgcrypt_configure := ./configure \
$(CROSS_TOOLS) \
--host=x86_64-linux-musl \
--prefix "/" \
--disable-static \
--with-libgpg-error-prefix="$(INSTALL)" \
--disable-asm \
--disable-nls \
libgcrypt_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \
install \
libgcrypt_libraries := src/.libs/libgcrypt.so
libgcrypt_depends := libgpg-error $(musl_dep)

26
modules/libgpg-error Normal file
View File

@ -0,0 +1,26 @@
modules-$(CONFIG_GPG2) += libgpg-error
libgpg-error_version := 1.27
libgpg-error_dir := libgpg-error-$(libgpg-error_version)
libgpg-error_tar := libgpg-error-$(libgpg-error_version).tar.bz2
libgpg-error_url := https://gnupg.org/ftp/gcrypt/libgpg-error/$(libgpg-error_tar)
libgpg-error_hash := 4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2
libgpg-error_configure := ./configure \
$(CROSS_TOOLS) \
--prefix "/" \
--host=x86_64-linux-musl \
--disable-static \
--disable-nls \
--disable-languages \
--disable-doc \
--disable-tests \
--disable-asm \
libgpg-error_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \
install \
libgpg-error_libraries := src/.libs/libgpg-error.so
libgpg-error_depends := $(musl_dep)

24
modules/libksba Normal file
View File

@ -0,0 +1,24 @@
modules-$(CONFIG_GPG2) += libksba
libksba_version := 1.3.5
libksba_dir := libksba-$(libksba_version)
libksba_tar := libksba-$(libksba_version).tar.bz2
libksba_url := https://gnupg.org/ftp/gcrypt/libksba/$(libksba_tar)
libksba_hash := 41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340
libksba_configure := ./configure \
$(CROSS_TOOLS) \
--host x86_64-linux-musl \
--prefix "/" \
--disable-static \
--disable-nls \
--with-libgpg-error-prefix="$(INSTALL)" \
--disable-asm \
libksba_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \
install \
libksba_libraries := src/.libs/libksba.so
libksba_depends := libgpg-error $(musl_dep)

View File

@ -1,5 +1,6 @@
# GPG with Yubikey support requires libusb # GPG with Yubikey support requires libusb
modules-$(CONFIG_GPG) += libusb modules-$(CONFIG_GPG) += libusb
modules-$(CONFIG_GPG2) += libusb
libusb_version := 1.0.21 libusb_version := 1.0.21
libusb_dir := libusb-$(libusb_version) libusb_dir := libusb-$(libusb_version)
@ -7,15 +8,17 @@ libusb_tar := libusb-$(libusb_version).tar.bz2
libusb_url := https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-$(libusb_version)/$(libusb_tar) libusb_url := https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-$(libusb_version)/$(libusb_tar)
libusb_hash := 7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b libusb_hash := 7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b
libusb_configure := ./configure \ libusb_configure := ./configure\
$(CROSS_TOOLS) \ $(CROSS_TOOLS)\
--host i386-elf-linux \ --host i386-elf-linux\
--prefix "/" \ --prefix "/"\
--disable-udev \ --disable-udev\
--disable-tests\
# Run one build to generate the executables with the pre-defined # Run one build to generate the executables with the pre-defined
# exec_prefix and datarootdir, then a second make to install the binaries # exec_prefix and datarootdir, then a second make to install the binaries
# into our actual target location # into our actual target location
libusb_target := $(MAKE_JOBS) \ libusb_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \ DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \ $(CROSS_TOOLS) \

View File

@ -1,7 +1,9 @@
# GPG 1.4.21 uses an old version of libusb, which # GPG 1.4.21 uses an old version of libusb, which
# is emulated with the compatibility library. # is emulated with the compatibility library.
# This is a bit of a hack to set it up. # This is a bit of a hack to set it up.
modules-$(CONFIG_GPG) += libusb-compat modules-$(CONFIG_GPG) += libusb-compat
modules-$(CONFIG_GPG2) += libusb-compat
libusb-compat_version := 0.1.5 libusb-compat_version := 0.1.5
libusb-compat_dir := libusb-compat-$(libusb-compat_version) libusb-compat_dir := libusb-compat-$(libusb-compat_version)

24
modules/npth Normal file
View File

@ -0,0 +1,24 @@
modules-$(CONFIG_GPG2) += npth
npth_version := 1.5
npth_dir := npth-$(npth_version)
npth_tar := npth-$(npth_version).tar.bz2
npth_url := https://gnupg.org/ftp/gcrypt/npth/$(npth_tar)
npth_hash := 294a690c1f537b92ed829d867bee537e46be93fbd60b16c04630fbbfcd9db3c2
npth_configure := ./configure \
$(CROSS_TOOLS) \
--host x86_64-linux-musl \
--prefix "/" \
--disable-static \
--disable-nls \
--with-libgpg-error-prefix="$(INSTALL)" \
--disable-asm \
npth_target := $(MAKE_JOBS) \
DESTDIR="$(INSTALL)" \
$(CROSS_TOOLS) \
install \
npth_libraries := src/.libs/libnpth.so
npth_depends := libgpg-error $(musl_dep)