Andreas Wacknitz
2024-04-04 8590298b09ebad29af56370cd23105cd0931b389
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2017, Andreas Wacknitz
# Copyright (c) 2019, Michal Nowak
#
 
BUILD_BITS= 64_and_32
include ../../../make-rules/shared-macros.mk
 
PATH= $(PATH.illumos)
 
COMPONENT_NAME=        unixODBC
COMPONENT_VERSION=    2.3.12
COMPONENT_SUMMARY=    The UnixODBC Subsystem and SDK
COMPONENT_DESCRIPTION= An Open Source implementation of the ODBC Standard providing a Library Framework for Software Development
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL=    https://www.unixodbc.org/
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:f210501445ce21bf607ba51ef8c125e10e22dffdffec377646462df5f01915ec
COMPONENT_ARCHIVE_URL=    ftp://ftp.unixodbc.org/pub/unixODBC/$(COMPONENT_ARCHIVE)
COMPONENT_FMRI=        library/unixodbc
COMPONENT_CLASSIFICATION=    Development/Databases
COMPONENT_LICENSE=    LGPLv2.1, GPLv2
 
TEST_TARGET= $(NO_TESTS)
include $(WS_MAKE_RULES)/common.mk
 
COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf -fi )
 
CFLAGS += $(CPP_LARGEFILES)
CFLAGS += $(XPG6MODE)
CFLAGS += $(CPP_POSIX)
 
GSED= /usr/gnu/bin/sed
 
X11LIB.32= $(CONFIGURE_PREFIX)/lib
X11LIB.64= $(CONFIGURE_PREFIX)/lib/$(MACH64)
 
PKG_CONFIG_PATH_32= /usr/lib/pkgconfig
PKG_CONFIG_PATH_64= /usr/lib/$(MACH64)/pkgconfig
 
LD_OPTIONS += -lsocket -lresolv -lnsl -lgen
 
CONFIGURE_OPTIONS += --includedir=$(CONFIGURE_PREFIX)/include/odbc
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --sysconfdir=/etc/odbc
CONFIGURE_OPTIONS += --x-includes="$(CONFIGURE_PREFIX)/include"
CONFIGURE_OPTIONS += --x-libraries="$(X11LIB.$(BITS))"
CONFIGURE_OPTIONS += --enable-shared
CONFIGURE_OPTIONS += --disable-static
CONFIGURE_OPTIONS += --disable-libtool-lock
CONFIGURE_OPTIONS += --enable-threads
CONFIGURE_OPTIONS += --disable-gnuthreads
CONFIGURE_OPTIONS += --enable-readline
CONFIGURE_OPTIONS += --enable-inicaching
CONFIGURE_OPTIONS += --enable-drivers=yes
CONFIGURE_OPTIONS += --enable-driver-conf=yes
CONFIGURE_OPTIONS += --enable-fdb
CONFIGURE_OPTIONS += --enable-odbctrace
CONFIGURE_OPTIONS += --enable-iconv
CONFIGURE_OPTIONS += --enable-stats
CONFIGURE_OPTIONS += --enable-rtldgroup
CONFIGURE_OPTIONS += --disable-ltdllib
CONFIGURE_OPTIONS += --without-pth
CONFIGURE_OPTIONS += --without-pth-test
CONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --disable-ltdl-install
CONFIGURE_OPTIONS += --with-pic
CONFIGURE_OPTIONS += MAKE="$(GMAKE)"
 
CONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
CONFIGURE_ENV += INSTALL="$(INSTALL)"
 
# Auto-generated dependencies
REQUIRED_PACKAGES += library/libtool/libltdl
REQUIRED_PACKAGES += library/readline
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math