Remove the dependency on oath-toolkit.

This resolves issue #9.
master
Johan Ouwerkerk 2020-01-27 22:50:59 +01:00
parent f950526f8b
commit 8bd765e385
7 changed files with 0 additions and 9217 deletions

View File

@ -34,7 +34,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
################# Find dependencies #################
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Quick Gui Svg QuickControls2)
find_package(LibOath REQUIRED)
find_package(KF5Kirigami2 ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} REQUIRED)

View File

@ -1,83 +0,0 @@
#.rst:
# FindLibOath
# ---------
#
# Try to locate the liboath library.
# If found, this will define the following variables:
#
# ``LIBOATH_FOUND``
# True if the LibOath library is available
# ``LIBOATH_INCLUDE_DIRS``
# The LibOath include directories
# ``LIBOATH_LIBRARIES``
# The LibOath libraries for linking
# ``LIBOATH_INCLUDE_DIR``
# Deprecated, use ``LIBOATH_INCLUDE_DIRS``
# ``LIBOATH_LIBRARY``
# Deprecated, use ``LIBOATH_LIBRARIES``
#
# If ``LIBOATH_FOUND`` is TRUE, it will also define the following
# imported target:
#
# ``LIBOATH::LIBOATH``
# The LIBOATH library
#
#=============================================================================
# Copyright (c) 2019 Bhushan Shah, <bshah@kde.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
find_package(PkgConfig)
pkg_check_modules(PC_LIBOATH QUIET liboath)
find_path(LIBOATH_INCLUDE_DIRS
NAMES oath.h
HINTS ${PC_LIBOATH_INCLUDEDIR}
PATH_SUFFIXES liboath)
find_library(LIBOATH_LIBRARIES
NAMES oath
HINTS ${PC_LIBOATH_LIBDIR})
set(LIBOATH_INCLUDE_DIR "${LIBOATH_INCLUDE_DIRS}")
set(LIBOATH_LIBRARY "${LIBOATH_LIBRARIES}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBOATH DEFAULT_MSG LIBOATH_LIBRARIES LIBOATH_INCLUDE_DIRS)
if(LIBOATH_FOUND AND NOT TARGET LIBOATH::LIBOATH)
add_library(LIBOATH::LIBOATH UNKNOWN IMPORTED)
set_target_properties(LIBOATH::LIBOATH PROPERTIES
IMPORTED_LOCATION "${LIBOATH_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBOATH_INCLUDE_DIR}")
endif()
mark_as_advanced(LIBOATH_INCLUDE_DIRS LIBOATH_INCLUDE_DIR
LIBOATH_LIBRARIES LIBOATH_LIBRARY)
include(FeatureSummary)
set_package_properties(LIBOATH PROPERTIES
URL "https://www.nongnu.org/oath-toolkit/"
DESCRIPTION "Library for Open AuTHentication (OATH) HOTP etc support.")

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
diff --git a/liboath/gl/fseeko.c b/liboath/gl/fseeko.c
index 67bb9ec..6adb80e 100644
--- a/liboath/gl/fseeko.c
+++ b/liboath/gl/fseeko.c
@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence)
#endif
/* These tests are based on fpurge.c. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence)
return -1;
}
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__

View File

@ -18,38 +18,6 @@
"separate-locales": false,
"modules": [
{
"name": "xmlsec1",
"sources": [
{
"type": "archive",
"url": "https://www.aleksey.com/xmlsec/download/xmlsec1-1.2.27.tar.gz",
"sha256": "97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6"
}
]
},
{
"name": "oath-toolkit",
"sources": [
{
"type": "archive",
"url": "https://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.2.tar.gz",
"sha256": "b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536824aa0"
},
{
"type": "patch",
"path": "flatpak/2fffce2a471f74a585939c84cce16ef3015e5d3d.diff"
},
{
"type": "patch",
"path": "flatpak/oath-toolkit/fseeko.patch"
},
{
"type" : "shell",
"commands" : [ "autoreconf -vfi" ]
}
]
},
{
"name": "org.kde.keysmith",
"buildsystem": "cmake-ninja",

View File

@ -17,7 +17,6 @@ add_executable(keysmith ${keysmith_SRCS} ${RESOURCES})
target_link_libraries(keysmith
Qt5::Core Qt5::Qml Qt5::Quick Qt5::Svg
KF5::I18n
${LIBOATH_LIBRARIES}
${keysmith_internal_libs}
)
install(TARGETS keysmith ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})

View File

@ -1,30 +0,0 @@
/*****************************************************************************
* Copyright: 2019 Johan Ouwerkerk <jm.ouwerkerk@gmail.com> *
* *
* This project 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 3 of the License, or *
* (at your option) any later version. *
* *
* This project 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, see <http://www.gnu.org/licenses/>. *
* *
****************************************************************************/
#ifndef OATH_P_H
#define OATH_P_H
#ifndef SIZE_MAX
#define SIZE_MAX UINT_MAX
#endif
extern "C" {
#include <liboath/oath.h>
}
#endif