Revert "Replace libxdg-basedir with Poco::Path."
This reverts commit d74b3cabfa
.
Poco::Path::dataHome() is only available in >= 1.9.
This commit is contained in:
parent
1d7153008a
commit
6d16b2598e
|
@ -57,7 +57,9 @@ only.
|
||||||
* C++ compiler (tested: https://gcc.gnu.org/[gcc] 5/6/8/9,
|
* C++ compiler (tested: https://gcc.gnu.org/[gcc] 5/6/8/9,
|
||||||
https://llvm.org/[clang] 3/7)
|
https://llvm.org/[clang] 3/7)
|
||||||
* https://cmake.org/[cmake] (at least: 3.2)
|
* https://cmake.org/[cmake] (at least: 3.2)
|
||||||
|
* https://pkgconfig.freedesktop.org/wiki/[pkgconfig] (tested: 0.29)
|
||||||
* https://github.com/badaix/popl[popl] (tested: 1.2)
|
* https://github.com/badaix/popl[popl] (tested: 1.2)
|
||||||
|
* http://repo.or.cz/w/libxdg-basedir.git[libxdg-basedir] (tested: 1.2)
|
||||||
* https://pocoproject.org/[POCO] (tested: 1.9 / 1.7)
|
* https://pocoproject.org/[POCO] (tested: 1.9 / 1.7)
|
||||||
* http://vsqlite.virtuosic-bytes.com/[vsqlite++] (tested: 0.3)
|
* http://vsqlite.virtuosic-bytes.com/[vsqlite++] (tested: 0.3)
|
||||||
* http://www.icu-project.org/[ICU] (tested: 64.2 / 57.1)
|
* http://www.icu-project.org/[ICU] (tested: 64.2 / 57.1)
|
||||||
|
@ -72,7 +74,8 @@ only.
|
||||||
[source,zsh]
|
[source,zsh]
|
||||||
----
|
----
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install g++-6 cmake libpoco-dev libvsqlitepp-dev libicu-dev asciidoc
|
apt-get install g++-6 cmake pkg-config libpoco-dev libxdg-basedir-dev \
|
||||||
|
libvsqlitepp-dev libboost-system-dev libboost-filesystem-dev libicu-dev asciidoc
|
||||||
# Inside the source directory:
|
# Inside the source directory:
|
||||||
wget -O src/cli/popl.hpp https://raw.githubusercontent.com/badaix/popl/v1.2.0/include/popl.hpp
|
wget -O src/cli/popl.hpp https://raw.githubusercontent.com/badaix/popl/v1.2.0/include/popl.hpp
|
||||||
export CXX="g++-6"
|
export CXX="g++-6"
|
||||||
|
|
|
@ -45,7 +45,7 @@ if (WITH_RPM)
|
||||||
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3")
|
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3")
|
||||||
set(CPACK_RPM_PACKAGE_URL "https://schlomp.space/tastytea/${PROJECT_NAME}")
|
set(CPACK_RPM_PACKAGE_URL "https://schlomp.space/tastytea/${PROJECT_NAME}")
|
||||||
set(CPACK_RPM_PACKAGE_REQUIRES
|
set(CPACK_RPM_PACKAGE_REQUIRES
|
||||||
"poco-netssl >= 1.6, vsqlite++ >= 0.3, libicu >= 50.1")
|
"poco-netssl >= 1.6.1, libxdg-basedir, vsqlite++ >= 0.3.13, libicu-devel")
|
||||||
set(CPACK_PACKAGE_FILE_NAME
|
set(CPACK_PACKAGE_FILE_NAME
|
||||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_PACKAGE_ARCHITECTURE}")
|
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-0.${CPACK_PACKAGE_ARCHITECTURE}")
|
||||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||||
|
|
|
@ -9,5 +9,5 @@ Description: @PROJECT_DESCRIPTION@
|
||||||
Version: @PROJECT_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
Libs: -L${libdir} -l${name} -lvsqlitepp -lstdc++fs
|
Libs: -L${libdir} -l${name} -lvsqlitepp -lstdc++fs
|
||||||
Requires.private: icu-uc, icu-i18n
|
Requires.private: libxdg-basedir, icu-uc, icu-i18n
|
||||||
Libs.private: -lPocoFoundation -lPocoNet -lPocoNetSSL
|
Libs.private: -lPocoNet -lPocoNetSSL -lPocoUtil
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(libxdg-basedir REQUIRED IMPORTED_TARGET libxdg-basedir)
|
||||||
find_package(ICU COMPONENTS uc i18n REQUIRED)
|
find_package(ICU COMPONENTS uc i18n REQUIRED)
|
||||||
# Some distributions do not contain Poco*Config.cmake recipes.
|
# Some distributions do not contain Poco*Config.cmake recipes.
|
||||||
find_package(Poco COMPONENTS Foundation Net NetSSL CONFIG)
|
find_package(Poco COMPONENTS Foundation Net NetSSL CONFIG)
|
||||||
|
@ -21,7 +23,7 @@ target_include_directories(${PROJECT_NAME}
|
||||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE ICU::uc ICU::i18n
|
PRIVATE PkgConfig::libxdg-basedir ICU::uc ICU::i18n
|
||||||
PUBLIC vsqlitepp stdc++fs)
|
PUBLIC vsqlitepp stdc++fs)
|
||||||
|
|
||||||
# If no Poco*Config.cmake recipes are found, look for headers in standard dirs.
|
# If no Poco*Config.cmake recipes are found, look for headers in standard dirs.
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <Poco/Path.h>
|
#include <basedir.h>
|
||||||
#include <sqlite/execute.hpp>
|
#include <sqlite/execute.hpp>
|
||||||
#include <sqlite/query.hpp>
|
#include <sqlite/query.hpp>
|
||||||
#include "time.hpp"
|
#include "time.hpp"
|
||||||
|
@ -33,7 +33,10 @@ namespace remwharead
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_dbpath = Poco::Path::dataHome() / fs::path("remwharead");
|
xdgHandle xdg;
|
||||||
|
xdgInitHandle(&xdg);
|
||||||
|
_dbpath = xdgDataHome(&xdg) / fs::path("remwharead");
|
||||||
|
xdgWipeHandle(&xdg);
|
||||||
|
|
||||||
if (!fs::exists(_dbpath))
|
if (!fs::exists(_dbpath))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue