Skip to content

Commit

Permalink
efl: Add an EFL-based pinentry.
Browse files Browse the repository at this point in the history
* NEWS: Update.
* Makefile.am: Add new efl subdirectory.
* configure.ac: Add --enable-pinentry-efl option.
* efl/Makefile.am: New file.
* efl/pinentry-efl.c: New file.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
  • Loading branch information
wltjr authored and gouttegd committed May 29, 2018
1 parent fa817f0 commit 948105b
Show file tree
Hide file tree
Showing 6 changed files with 716 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -20,6 +20,8 @@ doc/Makefile
doc/pinentry.info
doc/stamp-vti
doc/version.texi
efl/Makefile.in
efl/Makefile
fltk/Makefile.in
fltk/Makefile
gtk+-2/Makefile.in
Expand Down
8 changes: 7 additions & 1 deletion Makefile.am
Expand Up @@ -82,10 +82,16 @@ else
pinentry_fltk =
endif

if BUILD_PINENTRY_EFL
pinentry_efl = efl
else
pinentry_efl =
endif

SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \
${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \
${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \
${pinentry_fltk} doc
${pinentry_fltk} ${pinentry_efl} doc


install-exec-local:
Expand Down
3 changes: 3 additions & 0 deletions NEWS
@@ -1,6 +1,9 @@
Noteworthy changes in version 1.1.1 (unreleased)
------------------------------------------------

* A EFL-based pinentry has been contributed.


Noteworthy changes in version 1.1.0 (2017-12-03)
------------------------------------------------

Expand Down
44 changes: 43 additions & 1 deletion configure.ac
Expand Up @@ -418,6 +418,42 @@ fi



dnl
dnl Check for EFL pinentry programs.
dnl
AC_ARG_ENABLE(pinentry-efl,
AC_HELP_STRING([--enable-pinentry-efl], [build EFL pinentry]),
pinentry_efl=$enableval, pinentry_efl=maybe)

dnl check for pkg-config
if test "$pinentry_efl" != "no"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x"${PKG_CONFIG}" = xno ; then
pinentry_efl=no
fi
fi

if test "$pinentry_efl" != "no"; then
AC_MSG_CHECKING([for efl])
"${PKG_CONFIG}" --exists 'elementary >= 1.18'
if test $? -ne 0 ; then
AC_MSG_RESULT([no])
AC_MSG_WARN([efl >= 1.18 is required for efl pinentry])
pinentry_efl=no
else
AC_MSG_RESULT([yes])
EFL_CFLAGS=`"${PKG_CONFIG}" --cflags ecore-x elementary`
EFL_LIBS=`"${PKG_CONFIG}" --libs ecore-x elementary`
AC_SUBST(EFL_CFLAGS)
AC_SUBST(EFL_LIBS)
if test "$pinentry_efl" != "no"
then
pinentry_efl=yes
fi
fi
fi
AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes")

dnl
dnl Check for GTK+-2 / GNOME3 pinentry programs.
dnl
Expand Down Expand Up @@ -645,7 +681,11 @@ else
if test "$pinentry_tqt" = "yes"; then
PINENTRY_DEFAULT=pinentry-tqt
else
AC_MSG_ERROR([[No pinentry enabled.]])
if test "$pinentry_efl" = "yes"; then
PINENTRY_DEFAULT=pinentry-efl
else
AC_MSG_ERROR([[No pinentry enabled.]])
fi
fi
fi
fi
Expand Down Expand Up @@ -721,6 +761,7 @@ secmem/Makefile
pinentry/Makefile
curses/Makefile
tty/Makefile
efl/Makefile
emacs/Makefile
gtk+-2/Makefile
gnome3/Makefile
Expand All @@ -744,6 +785,7 @@ AC_MSG_NOTICE([
Curses Pinentry ..: $pinentry_curses
TTY Pinentry .....: $pinentry_tty
Emacs Pinentry ...: $pinentry_emacs
EFL Pinentry .....: $pinentry_efl
GTK+-2 Pinentry ..: $pinentry_gtk_2
GNOME 3 Pinentry .: $pinentry_gnome_3
Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version
Expand Down
38 changes: 38 additions & 0 deletions efl/Makefile.am
@@ -0,0 +1,38 @@
# Makefile.am - PIN entry EFL frontend.
# Copyright (C) 2017 Obsidian-Studios, Inc.
# Author William L. Thomson Jr. <wlt@o-sinc.com>
#
# This file is part of PINENTRY.
#
# PINENTRY is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PINENTRY is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

## Process this file with automake to produce Makefile.in

bin_PROGRAMS = pinentry-efl

if FALLBACK_CURSES
ncurses_include = $(NCURSES_INCLUDE)
libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV)
else
ncurses_include =
libcurses =
endif

AM_CPPFLAGS = $(COMMON_CFLAGS) $(EFL_CFLAGS) $(ncurses_include) \
-I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \
$(COMMON_LIBS) $(LIBCAP) $(EFL_LIBS) $(libcurses)

pinentry_efl_SOURCES = pinentry-efl.c

0 comments on commit 948105b

Please sign in to comment.