# HG changeset patch # User David Demelier # Date 1573845600 -3600 # Node ID 38fb7d4d03354282584a13aeb65806a12d2c69fa # Parent 4cc6011ced79dfbaa1756519636bc56c7afcaa2b security/pinentry: initial import, closes #2310 diff -r 4cc6011ced79 -r 38fb7d4d0335 security/pinentry/pinentry.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/pinentry/pinentry.sh Fri Nov 15 20:20:00 2019 +0100 @@ -0,0 +1,105 @@ +#!/bin/sh +# +# Copyright (c) 2019 David Demelier +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=pinentry +PKGVERSION=1.1.0 +PKGREVISION=1 +PKGLICENSE="GPLv20" +PKGSUMMARY="collection of PIN or passphrase entry dialogs" +PKGWWW="https://gnupg.org/index.html" +PKGDOWNLOAD="https://gnupg.org/ftp/gcrypt/$PKGNAME/$PKGNAME-$PKGVERSION.tar.bz2" +PKGDEPENDS="libassuan" +PKGOPTIONS="FLTK GTK LIBSECRET NCURSES QT" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${CXX:=clang++} +: ${CXXFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} +: ${FLTK:=no} +: ${GTK:=yes} +: ${LIBSECRET:=yes} +: ${NCURSES:=yes} +: ${QT:=yes} + +if [ "$FLTK" = "yes" ]; then + PKGDEPENDS="fltk $PKGDEPENDS" + with_fltk="--enable-pinentry-fltk" +else + with_fltk="--disable-pinentry-fltk" +fi + +if [ "$GTK" = "yes" ]; then + PKGDEPENDS="gtk $PKGDEPENDS" + with_gtk="--enable-pinentry-gnome3" +else + with_gtk="--disable-pinentry-gnome3" +fi + +if [ "$LIBSECRET" = "yes" ]; then + PKGDEPENDS="libsecret $PKGDEPENDS" + with_libsecret="--enable-libsecret" +else + with_libsecret="--disable-libsecret" +fi + +if [ "$NCURSES" = "yes" ]; then + PKGDEPENDS="ncurses $PKGDEPENDS" + with_ncurses="--enable-pinentry-curses --enable-fallback-curses" +else + with_ncurses="--disable-pinentry-curses --disable-fallback-curses" +fi + +if [ "$QT" = "yes" ]; then + PKGDEPENDS="qtbase $PKGDEPENDS" + with_qt="--enable-pinentry-qt5" +else + with_qt="--disable-pinentry-qt5" +fi + +build() +{ + rm -rf $PKGNAME-$PKGVERSION + tar -xvf $PKGNAME-$PKGVERSION.tar.bz2 + cd $PKGNAME-$PKGVERSION + + # --disable-pinentry-gtk2: Gtk 2 is deprecated in Vanilla Linux. + CC="$CC" \ + CFLAGS="$CFLAGS" \ + CXX="$CXX" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix= \ + --disable-pinentry-gtk2 \ + $with_fltk \ + $with_gtk \ + $with_libsecret \ + $with_ncurses \ + $with_qt + make + make install DESTDIR=$DESTDIR + + cd .. + rm -rf $PKGNAME-$PKGVERSION +} diff -r 4cc6011ced79 -r 38fb7d4d0335 security/pinentry/pinentry.sha1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/pinentry/pinentry.sha1 Fri Nov 15 20:20:00 2019 +0100 @@ -0,0 +1,1 @@ +693bdf9f48dfb3e040d92f50b1bb464e268b9fb0 pinentry-1.1.0.tar.bz2 diff -r 4cc6011ced79 -r 38fb7d4d0335 security/pinentry/pinentry.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/pinentry/pinentry.txt Fri Nov 15 20:20:00 2019 +0100 @@ -0,0 +1,7 @@ +Depending on your pinentry build options you may have different frontends +available. Change /bin/pinentry symlink to your liking: + + /bin/pinentry-curses (if NCURSES option was set) + /bin/pinentry-qt (if QT option was set) + /bin/pinentry-fltk (if FLTK option was set) + /bin/pinentry-gnome (if GTK option was set)