summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-03-13 03:07:14 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-21 16:42:23 +0100
commit9f92d9d3fed93b2052d4e2a1a4e5e73f34f2f44a (patch)
tree9800b6d0d7c22f1572175ca36ad99322fca32baf /meta-oe
parentccd12ac24cf41d483738a01dc4accae4bca7cddd (diff)
downloadmeta-openembedded-9f92d9d3fed93b2052d4e2a1a4e5e73f34f2f44a.tar.gz
soci: Add recipe
Define PACKAGECONFIG to enable a given backend of choice by default its 'empty' Change-Id: Ie1123af658ca94d2fe22a3ca1a32dfb47d58979e Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/soci/soci/soci_libdir.patch28
-rw-r--r--meta-oe/recipes-support/soci/soci_3.2.2.bb48
2 files changed, 76 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/soci/soci/soci_libdir.patch b/meta-oe/recipes-support/soci/soci/soci_libdir.patch
new file mode 100644
index 000000000..00a1a5c86
--- /dev/null
+++ b/meta-oe/recipes-support/soci/soci/soci_libdir.patch
@@ -0,0 +1,28 @@
1Define SOCI_LIBDIR only if its not passed via environemnt. In OE we
2want to set it per our choice since we use 'lib' for 64bit unless we
3are using multilib
4
5-Khem
6
7Index: soci-3.2.2/CMakeLists.txt
8===================================================================
9--- soci-3.2.2.orig/CMakeLists.txt
10+++ soci-3.2.2/CMakeLists.txt
11@@ -69,11 +69,12 @@ include(SociDependencies)
12 ###############################################################################
13 # Installation
14 ###############################################################################
15-
16-if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
17- set(SOCI_LIBDIR "lib")
18-else()
19- set(SOCI_LIBDIR "lib64")
20+if(NOT DEFINED SOCI_LIBDIR)
21+ if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4)
22+ set(SOCI_LIBDIR "lib")
23+ else()
24+ set(SOCI_LIBDIR "lib")
25+ endif()
26 endif()
27
28 set(BINDIR "bin" CACHE PATH "The directory to install binaries into.")
diff --git a/meta-oe/recipes-support/soci/soci_3.2.2.bb b/meta-oe/recipes-support/soci/soci_3.2.2.bb
new file mode 100644
index 000000000..887f5a2b2
--- /dev/null
+++ b/meta-oe/recipes-support/soci/soci_3.2.2.bb
@@ -0,0 +1,48 @@
1# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "The C++ Database Access Library"
5HOMEPAGE = "http://soci.sourceforge.net"
6LICENSE = "BSL-1.0"
7LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
8SECTION = "libs"
9DEPENDS = "boost"
10
11
12SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${P}/${P}.tar.gz \
13 file://soci_libdir.patch \
14 "
15SRC_URI[md5sum] = "bc3c35f6cd3f80a1be19fe30b3c111bf"
16SRC_URI[sha256sum] = "30ea2f4d26639ef5b5cdc24fb300b3896746243dbb77b743582de2ff443ccb1c"
17
18TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \
19 -DSOCI_TEST_POSTGRESQL_CONNSTR:STRING="dbname=soci_test" \
20 -DSOCI_TEST_MYSQL_CONNSTR:STRING="db=soci_test user=oe password=oe"'
21
22OBASEDIR ?= "/opt/oracle"
23OINCDIR = "rdbms/public"
24OLIBDIR = "lib"
25
26PACKAGECONFIG[sqlite3] = "-DSOCI_SQLITE3=ON,-DSOCI_SQLITE3=OFF,sqlite3,"
27PACKAGECONFIG[mysql] = "-DSOCI_MYSQL=ON,-DSOCI_MYSQL=OFF,mariadb,"
28PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgresql,"
29PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,,"
30PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,,"
31PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,,"
32PACKAGECONFIG[ptest] = "${TESTCONFIG},,,"
33
34# enable your backend by default we enable 'empty'
35PACKAGECONFIG ??= "empty"
36
37# Take the flags added by PACKAGECONFIG and pass them to cmake.
38EXTRA_OECMAKE = "${EXTRA_OECONF} -DSOCI_LIBDIR=${libdir}"
39
40inherit cmake
41
42PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle"
43
44FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*"
45FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*"
46FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*"
47FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*"
48FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*"