summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/iniparser/iniparser/Add-CMake-support.patch63
-rw-r--r--meta-oe/recipes-support/iniparser/iniparser_4.1.bb17
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 @@
1Origin: Debian packaging
2From: Klee Dienes <klee@mit.edu>
3Date: Thu, 13 Feb 2014 07:03:26 -0500
4Subject: 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 @@
1SUMMARY = "The iniParser library is a simple C library offering INI file parsing services (both reading and writing)."
2SECTION = "libs"
3HOMEPAGE = "https://github.com/ndevilla/iniparser"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e02baf71c76e0650e667d7da133379ac"
6
7DEPENDS = "doxygen-native"
8
9SRC_URI = "git://github.com/ndevilla/iniparser.git;protocol=https \
10 file://Add-CMake-support.patch"
11
12# tag 4.1
13SRCREV= "0a38e85c9cde1e099ca3bf70083bd00f89c3e5b6"
14
15S = "${WORKDIR}/git"
16
17inherit cmake