diff options
author | Gianfranco Costamagna <gianfranco.costamagna@abinsula.com> | 2019-07-10 10:13:28 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-07-10 09:34:20 -0700 |
commit | d62365c2b8fa244c57f5ae447405c0133f1f0cae (patch) | |
tree | 650562d9412b997ed575a106548928f529ac26ac | |
parent | 09710233145e43e175ef6a63f0c27a967933e890 (diff) | |
download | meta-openembedded-d62365c2b8fa244c57f5ae447405c0133f1f0cae.tar.gz |
iniparser: add initial recipe
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
Signed-off-by: Gianfranco Costamagna <locutusofborg@debian.org>
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch | 63 | ||||
-rw-r--r-- | meta-oe/recipes-support/iniparser/iniparser_4.1.bb | 17 |
2 files changed, 80 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch b/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch new file mode 100644 index 0000000000..b666f00f70 --- /dev/null +++ b/meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | Origin: Debian packaging | ||
2 | From: Klee Dienes <klee@mit.edu> | ||
3 | Date: Thu, 13 Feb 2014 07:03:26 -0500 | ||
4 | Subject: Add CMake support. | ||
5 | |||
6 | --- | ||
7 | CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ | ||
8 | 1 file changed, 44 insertions(+) | ||
9 | create mode 100644 CMakeLists.txt | ||
10 | |||
11 | --- /dev/null | ||
12 | +++ b/CMakeLists.txt | ||
13 | @@ -0,0 +1,50 @@ | ||
14 | +cmake_minimum_required (VERSION 2.8.8) | ||
15 | + | ||
16 | +project (iniparser) | ||
17 | +include (GNUInstallDirs) | ||
18 | + | ||
19 | +include_directories (src) | ||
20 | + | ||
21 | +set(INIPARSER_SRCS src/dictionary.c src/iniparser.c) | ||
22 | +set(INIPARSER_HDRS src/dictionary.h src/iniparser.h) | ||
23 | + | ||
24 | +add_library(iniparser-shared SHARED ${INIPARSER_SRCS} ${INIPARSER_HDRS}) | ||
25 | +add_library(iniparser-static STATIC ${INIPARSER_SRCS} ${INIPARSER_HDRS}) | ||
26 | + | ||
27 | +set_target_properties(iniparser-shared PROPERTIES SOVERSION 1) | ||
28 | +set_target_properties(iniparser-shared PROPERTIES OUTPUT_NAME iniparser) | ||
29 | +set_target_properties(iniparser-static PROPERTIES OUTPUT_NAME iniparser) | ||
30 | + | ||
31 | +install (TARGETS iniparser-shared | ||
32 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
33 | + DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
34 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
35 | + | ||
36 | +install (TARGETS iniparser-static | ||
37 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
38 | + DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
39 | + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
40 | + | ||
41 | +find_package(Doxygen) | ||
42 | +if (NOT DOXYGEN_FOUND) | ||
43 | +message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly") | ||
44 | +endif() | ||
45 | + | ||
46 | +file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/iniparser.dox | ||
47 | + "@INCLUDE = ${CMAKE_CURRENT_SOURCE_DIR}/doc/iniparser.dox\n" | ||
48 | + "OUTPUT_DIRECTORY = ${CMAKE_CURRENT_BINARY_DIR}\n" | ||
49 | + ) | ||
50 | + | ||
51 | +add_custom_target (doc ALL | ||
52 | + COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/iniparser.dox | ||
53 | + SOURCES doc/iniparser.dox) | ||
54 | + | ||
55 | +enable_testing() | ||
56 | + | ||
57 | +add_test(NAME testsuite | ||
58 | + COMMAND make | ||
59 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) | ||
60 | + | ||
61 | +install (FILES ${INIPARSER_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/iniparser) | ||
62 | + | ||
63 | +install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR}) | ||
diff --git a/meta-oe/recipes-support/iniparser/iniparser_4.1.bb b/meta-oe/recipes-support/iniparser/iniparser_4.1.bb new file mode 100644 index 0000000000..f4b553a578 --- /dev/null +++ b/meta-oe/recipes-support/iniparser/iniparser_4.1.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)." | ||
2 | SECTION = "libs" | ||
3 | HOMEPAGE = "https://github.com/ndevilla/iniparser" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e02baf71c76e0650e667d7da133379ac" | ||
6 | |||
7 | DEPENDS = "doxygen-native" | ||
8 | |||
9 | SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https \ | ||
10 | file://Add-CMake-support.patch" | ||
11 | |||
12 | # tag 4.1 | ||
13 | SRCREV= "0a38e85c9cde1e099ca3bf70083bd00f89c3e5b6" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit cmake | ||