summaryrefslogtreecommitdiffstats
path: root/meta-security/recipes-security/security-manager/security-manager_git.bb
blob: f438ea505bee9eb87217afc545d6540b127a2ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require security-manager.inc

PV = "1.0.2+git${SRCPV}"
SRCREV = "860305a595d681d650024ad07b3b0977e1fcb0a6"
SRC_URI += "git://github.com/Samsung/security-manager.git"
S = "${WORKDIR}/git"

SRC_URI += " \
   file://0001-systemd-stop-using-compat-libs.patch \
   file://0002-security-manager-policy-reload-do-not-depend-on-GNU-.patch \
   file://0003-Smack-rules-create-two-new-functions.patch \
   file://0004-app-install-implement-multiple-set-of-smack-rules.patch \
   file://0005-c-11-replace-deprecated-auto_ptr.patch \
   file://0006-socket-manager-removes-tizen-specific-call.patch \
   file://0007-removes-dependency-to-libslp-db-utils.patch \
   file://0008-Fix-gcc6-build.patch \
   file://0009-Fix-Cmake-conf-for-gcc6-build.patch \
   file://0010-gcc-7-requires-include-functional-for-std-function.patch \
   file://0011-Fix-gcc8-warning-error-Werror-catch-value.patch \
   file://0012-Avoid-casting-from-const-T-to-void.patch \
   file://0013-Removing-tizen-platform-config.patch \
   file://0014-Ensure-post-install-initialization-of-database.patch \
"

# Use make with cmake and not ninja
OECMAKE_GENERATOR = "Unix Makefiles"
ASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef TMCAGLWM_RESULT_HPP #define TMCAGLWM_RESULT_HPP #include <experimental/optional> #include <functional> namespace wm { using std::experimental::optional; using std::experimental::nullopt; // We only ever return a string as an error - so just parametrize // this over result type T template <typename T> struct result { char const *e; optional<T> t; bool is_ok() const { return this->t != nullopt; } bool is_err() const { return this->e != nullptr; } T unwrap() { if (this->e != nullptr) { throw std::logic_error(this->e); } return this->t.value(); } operator T() { return this->unwrap(); } char const *unwrap_err() { return this->e; } optional<T> const &ok() const { return this->t; } optional<char const *> err() const { return this->e ? optional<char const *>(this->e) : nullopt; } result<T> map_err(std::function<char const *(char const *)> f); }; template <typename T> struct result<T> Err(char const *e) { return result<T>{e, nullopt}; } template <typename T> struct result<T> Ok(T t) { return result<T>{nullptr, t}; } template <typename T> result<T> result<T>::map_err(std::function<char const *(char const *)> f) { if (this->is_err()) { return Err<T>(f(this->e)); } return *this; } } // namespace wm #endif // TMCAGLWM_RESULT_HPP