2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
11 # Copyright 2022, Friedrich Kink. All rights reserved.
15 include ..
/..
/..
/make-rules
/shared-macros.mk
17 COMPONENT_NAME
= opendbx
18 COMPONENT_VERSION
= 1.4.6
20 COMPONENT_SUMMARY
= OpenDBX is an extremely lightweight but extensible database access library
21 COMPONENT_DESCRIPTION
= OpenDBX is an extremely lightweight but extensible database access \
22 library written in C. It provides an abstraction layer to
all supported \
23 databases with a single
, clean and simple interface that leads to an \
24 elegant code design automatically. If you want your application to \
25 support different databases with little effort
, this is definitively \
26 the right thing for you
!
27 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
28 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
29 COMPONENT_ARCHIVE_HASH
= sha256
:2246a03812c7d90f10194ad01c2213a7646e383000a800277c6fb8d2bf81497c
30 COMPONENT_PROJECT_URL
= https
://www.linuxnetworks.de
/doc
/index.php?title
=OpenDBX
31 COMPONENT_ARCHIVE_URL
= https
://linuxnetworks.de
/$(COMPONENT_NAME
)/download
/$(COMPONENT_ARCHIVE
)
32 COMPONENT_FMRI
= library
/$(COMPONENT_NAME
)
33 COMPONENT_CLASSIFICATION
= Applications
/System Utilities
34 COMPONENT_LICENSE
= GPLv2.1
35 COMPONENT_LICENSE_FILE
= COPYING
37 TEST_TARGET
= $(NO_TESTS
)
38 include $(WS_MAKE_RULES
)/common.mk
40 CXXFLAGS
+= -std
=c
++11
42 # RPATH needed to make 'make REQUIRED_PACKAGES' happy
43 COMPONENT_POST_CONFIGURE_ACTION
= \
45 $(GSED
) -i
-e
's:^LDFLAGS = .*:LDFLAGS = -m64 -Wl,-rpath=$(MYSQL_LIBDIR):' backends
/mysql
/Makefile
; \
46 $(GSED
) -i
-e
's:^LDFLAGS = .*:LDFLAGS = -m64 -Wl,-rpath=$(PG_LIBDIR):' backends
/pgsql
/Makefile
)
48 CONFIGURE_OPTIONS
+= --enable-static
=no
49 CONFIGURE_OPTIONS
+= --enable-rpath
50 CONFIGURE_OPTIONS
+= --with-backends
="mysql odbc pgsql sqlite3"
51 CONFIGURE_OPTIONS
+= "CPPFLAGS=-I$(MYSQL_INCDIR) -I$(PG_INCDIR) -I/usr/include/odbc"
52 CONFIGURE_OPTIONS
+= "LIBS=-L$(MYSQL_LIBDIR) -L$(PG_LIBDIR)"
55 REQUIRED_PACKAGES
+= $(MYSQL_CLIENT_PKG
)
57 # Auto-generated dependencies
58 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
59 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
60 REQUIRED_PACKAGES
+= $(MYSQL_LIBRARY_PKG
)
61 REQUIRED_PACKAGES
+= $(PG_LIBRARY_PKG
)
62 REQUIRED_PACKAGES
+= $(READLINE_PKG
)
63 REQUIRED_PACKAGES
+= database
/sqlite-3
64 REQUIRED_PACKAGES
+= library
/unixodbc
65 REQUIRED_PACKAGES
+= system
/library