Skip to content

Commit

Permalink
egt-launcher: Use c++17 standard for filesystem feature
Browse files Browse the repository at this point in the history
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Oct 12, 2022
1 parent 6e6b5d5 commit f3e74c6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes-egt/apps/egt-launcher_1.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ DEPENDS = "libegt"
RDEPENDS:${PN} = "evtest"

SRC_URI = "git://github.com/linux4sam/egt-launcher.git;protocol=https;branch=master \
file://0001-launch.sh-Use-start-stop-daemon-to-restart-egt.patch"
file://0001-launch.sh-Use-start-stop-daemon-to-restart-egt.patch \
file://0001-launcher-Switch-to-using-c-17.patch \
"

PV = "1.1+git${SRCPV}"
SRCREV = "d1559803806bba26fe3a4b3f7aff2ddaa439534d"
Expand Down
53 changes: 53 additions & 0 deletions recipes-egt/apps/files/0001-launcher-Switch-to-using-c-17.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 83b22292d9ff862706d785916be773e2a25b17e2 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sun, 14 Aug 2022 08:55:49 -0700
Subject: [PATCH] launcher: Switch to using c++17

experimental/filesystem is removed by some compilers e.g. libcxx with
llvm 15.x

Upstream-Status: Pending
Signed-off-by: Khem Raj <[email protected]>
---
configure.ac | 2 +-
src/launcher.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3dc9994..9df5ab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_LANG(C++)
AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX([14], [noext])
+AX_CXX_COMPILE_STDCXX([17], [noext])
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_UINT32_T
diff --git a/src/launcher.cpp b/src/launcher.cpp
index dd961b0..0aa3c63 100644
--- a/src/launcher.cpp
+++ b/src/launcher.cpp
@@ -12,7 +12,7 @@
#include <cmath>
#include <egt/detail/filesystem.h>
#include <egt/ui>
-#include <experimental/filesystem>
+#include <filesystem>
#include <fstream>
#include <iostream>
#include <memory>
@@ -121,7 +121,7 @@ private:
SwipeCallback m_callback;
};

-namespace filesys = std::experimental::filesystem;
+namespace filesys = std::filesystem;

/*
* Execute a command.
--
2.37.2

0 comments on commit f3e74c6

Please sign in to comment.