From af3902fd44a54a094f928ff901130e75900df515 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Mon, 1 Jan 2018 13:46:43 +0100 Subject: [PATCH] Add KJS recipe While obsolete, it's still needed (indirectly) by Plasma. --- recipes-kf5/obsolete/kjs.inc | 26 ++++++++++++++++ .../kjs/0001-optional-kdoctools.patch | 31 +++++++++++++++++++ recipes-kf5/obsolete/kjs_5.41.0.bb | 2 ++ recipes-kf5/packagegroups/kde-frameworks5.bb | 2 ++ 4 files changed, 61 insertions(+) create mode 100644 recipes-kf5/obsolete/kjs.inc create mode 100644 recipes-kf5/obsolete/kjs/0001-optional-kdoctools.patch create mode 100644 recipes-kf5/obsolete/kjs_5.41.0.bb diff --git a/recipes-kf5/obsolete/kjs.inc b/recipes-kf5/obsolete/kjs.inc new file mode 100644 index 0000000..3a45328 --- /dev/null +++ b/recipes-kf5/obsolete/kjs.inc @@ -0,0 +1,26 @@ +DESCRIPTION = "KJS" +HOMEPAGE = "https://api.kde.org/frameworks/kjs/html/index.html" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + " +PR = "r0" + +DEPENDS = "qtbase kjs-native pcre" + +SRC_URI = " \ + git://anongit.kde.org/kjs;nobranch=1 \ + file://0001-optional-kdoctools.patch \ +" +S = "${WORKDIR}/git" + +inherit cmake_kf5 +inherit perlnative + +sysroot_stage_all_append_class-native () { + mkdir -p ${SYSROOT_DESTDIR}/${bindir} + cp ${B}/bin/icemaker ${SYSROOT_DESTDIR}/${bindir} +} + +FILES_${PN}-dev += " \ + ${datadir}/kf5/kjs/create_hash_table \ +" diff --git a/recipes-kf5/obsolete/kjs/0001-optional-kdoctools.patch b/recipes-kf5/obsolete/kjs/0001-optional-kdoctools.patch new file mode 100644 index 0000000..ce5b726 --- /dev/null +++ b/recipes-kf5/obsolete/kjs/0001-optional-kdoctools.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b3b319b..3f015c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,12 +51,14 @@ option(KJS_FORCE_DISABLE_PCRE "Force building of KJS without PCRE. Doing this wi + # TODO: Remove these + remove_definitions(-DQT_NO_CAST_FROM_ASCII) + +-find_package(KF5DocTools ${KF5_DEP_VERSION} REQUIRED) ++find_package(KF5DocTools ${KF5_DEP_VERSION}) + + add_subdirectory(src) + add_subdirectory(autotests) + add_subdirectory(tests) +-add_subdirectory(docs) ++if(KF5DocTools_FOUND) ++ add_subdirectory(docs) ++endif() + + # create a Config.cmake and a ConfigVersion.cmake file and install them + set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5JS") +@@ -77,6 +79,8 @@ install(EXPORT KF5JSTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5JST + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kjs_version.h DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel ) + +-kdoctools_install(po) ++if(KF5DocTools_FOUND) ++ kdoctools_install(po) ++endif() + + feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/recipes-kf5/obsolete/kjs_5.41.0.bb b/recipes-kf5/obsolete/kjs_5.41.0.bb new file mode 100644 index 0000000..56169bb --- /dev/null +++ b/recipes-kf5/obsolete/kjs_5.41.0.bb @@ -0,0 +1,2 @@ +require ${PN}.inc +SRCREV = "v${PV}" diff --git a/recipes-kf5/packagegroups/kde-frameworks5.bb b/recipes-kf5/packagegroups/kde-frameworks5.bb index bd4c835..73fbe7e 100644 --- a/recipes-kf5/packagegroups/kde-frameworks5.bb +++ b/recipes-kf5/packagegroups/kde-frameworks5.bb @@ -68,4 +68,6 @@ RDEPENDS_${PN} = " \ kxmlrpcclient \ plasma-framework \ qqc2-desktop-style \ + \ + kjs \ "