summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-10-26 13:35:24 -0700
committerArmin Kuster <akuster808@gmail.com>2018-03-01 16:10:35 -0800
commit6aa73bc881b0d52220e5a5869cc911dd974bab1e (patch)
tree72791861c42ab9ae9000524936e10fc7c74ce72b /meta-oe/recipes-dbs
parent3710a1ce7aa4cc30e830a6bf4570c83392fc930e (diff)
downloadmeta-openembedded-6aa73bc881b0d52220e5a5869cc911dd974bab1e.tar.gz
soci: move to recipes-dbs
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/soci/soci/soci_libdir.patch28
-rw-r--r--meta-oe/recipes-dbs/soci/soci_3.2.2.bb49
2 files changed, 77 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch b/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch
new file mode 100644
index 000000000..00a1a5c86
--- /dev/null
+++ b/meta-oe/recipes-dbs/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-dbs/soci/soci_3.2.2.bb b/meta-oe/recipes-dbs/soci/soci_3.2.2.bb
new file mode 100644
index 000000000..1f5a485a7
--- /dev/null
+++ b/meta-oe/recipes-dbs/soci/soci_3.2.2.bb
@@ -0,0 +1,49 @@
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}/${BP}/${BP}.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}"
39DISABLE_STATIC = ""
40
41inherit cmake
42
43PACKAGES += "${PN}-sqlite3 ${PN}-mysql ${PN}-postgresql ${PN}-odbc ${PN}-oracle"
44
45FILES_${PN}-sqlite3 = "${libdir}/lib${BPN}_sqlite3.so.*"
46FILES_${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*"
47FILES_${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*"
48FILES_${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*"
49FILES_${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*"