Gentoo Archives: gentoo-commits

From: "Brian Evans (grknight)" <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/myodbc: myodbc-5.2.6.ebuild ChangeLog
Date: Sun, 04 May 2014 19:37:16
Message-Id: 20140504193713.B5ED82004E@flycatcher.gentoo.org
1 grknight 14/05/04 19:37:13
2
3 Modified: ChangeLog
4 Added: myodbc-5.2.6.ebuild
5 Log:
6 Version bump to 5.2.6.
7 Fixes bugs #380141, #442322, #462432, #474088
8
9 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 67C78E1D)
10
11 Revision Changes Path
12 1.34 dev-db/myodbc/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.34&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.34&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?r1=1.33&r2=1.34
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v
21 retrieving revision 1.33
22 retrieving revision 1.34
23 diff -u -r1.33 -r1.34
24 --- ChangeLog 10 May 2013 08:17:39 -0000 1.33
25 +++ ChangeLog 4 May 2014 19:37:13 -0000 1.34
26 @@ -1,6 +1,12 @@
27 # ChangeLog for dev-db/myodbc
28 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.33 2013/05/10 08:17:39 patrick Exp $
30 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.34 2014/05/04 19:37:13 grknight Exp $
32 +
33 +*myodbc-5.2.6 (04 May 2014)
34 +
35 + 04 May 2014; <grknight@g.o> +files/cmake-doc-path.patch,
36 + +myodbc-5.2.6.ebuild:
37 + Version bump to 5.2.6. Fixes bugs #380141, #442322, #462432, #474088
38
39 10 May 2013; Patrick Lauer <patrick@g.o> myodbc-5.1.6.ebuild:
40 Fix src_prepare
41
42
43
44 1.1 dev-db/myodbc/myodbc-5.2.6.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/myodbc-5.2.6.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/myodbc-5.2.6.ebuild?rev=1.1&content-type=text/plain
48
49 Index: myodbc-5.2.6.ebuild
50 ===================================================================
51 # Copyright 1999-2014 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-5.2.6.ebuild,v 1.1 2014/05/04 19:37:13 grknight Exp $
54
55 EAPI=5
56 inherit cmake-utils eutils flag-o-matic versionator
57
58 MAJOR="$(get_version_component_range 1-2 $PV)"
59 MY_PN="mysql-connector-odbc"
60 MY_P="${MY_PN}-${PV/_p/r}-src"
61
62 DESCRIPTION="ODBC driver for MySQL"
63 HOMEPAGE="http://www.mysql.com/products/myodbc/"
64 SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
65 RESTRICT="primaryuri"
66
67 LICENSE="GPL-2"
68 SLOT="${MAJOR}"
69 KEYWORDS="~amd64 ~ppc ~x86"
70 IUSE=""
71
72 RDEPEND="
73 dev-db/unixODBC
74 >=virtual/mysql-4.1
75 "
76 DEPEND="${DEPEND} ${RDEPEND}"
77 S=${WORKDIR}/${MY_P}
78
79 # Careful!
80 DRIVER_NAME="${PN}-${SLOT}"
81
82 src_prepare() {
83 # Remove Tests
84 sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
85 "${S}/CMakeLists.txt"
86
87 # Fix as-needed on the installer binary
88 echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt"
89
90 # Patch document path so it doesn't install files to /usr
91 epatch "${FILESDIR}/cmake-doc-path.patch"
92 }
93
94 src_configure() {
95 # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64"
96 # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB
97 mycmakeargs+=(
98 -DMYSQL_CXX_LINKAGE=0
99 -DWITH_UNIXODBC=1
100 -DRPM_BUILD=1
101 -DMYSQL_LIB="$(mysql_config --variable=pkglibdir)/libmysqlclient_r.so"
102 )
103
104 cmake-utils_src_configure
105 }
106
107 src_install() {
108 cmake-utils_src_install
109
110 dodir /usr/share/${PN}-${SLOT}
111 for i in odbc.ini odbcinst.ini; do
112 einfo "Building $i"
113 sed \
114 -e "s,__PN__,${DRIVER_NAME},g" \
115 -e "s,__PF__,${PF},g" \
116 -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}.so,g" \
117 >"${D}"/usr/share/${PN}-${SLOT}/${i} \
118 <"${FILESDIR}"/${i}.m4 \
119 || die "Failed to build $i"
120 done;
121 }
122
123 pkg_config() {
124
125 [ "${ROOT}" != "/" ] && \
126 die 'Sorry, non-standard ROOT setting is not supported :-('
127
128 local msg='MySQL ODBC driver'
129 local drivers=$(/usr/bin/odbcinst -q -d)
130
131 if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
132 ebegin "Installing ${msg}"
133 /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
134 rc=$?
135 eend $rc
136 [ $rc -ne 0 ] && die
137 else
138 einfo "Skipping already installed ${msg}"
139 fi
140
141 local sources=$(/usr/bin/odbcinst -q -s)
142 msg='sample MySQL ODBC DSN'
143 if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
144 ebegin "Installing ${msg}"
145 /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
146 rc=$?
147 eend $rc
148 [ $rc -ne 0 ] && die
149 else
150 einfo "Skipping already installed ${msg}"
151 fi
152 }
153
154 pkg_postinst() {
155
156 elog "If this is a new install, please run the following command"
157 elog "to configure the MySQL ODBC drivers and sources:"
158 elog "emerge --config =${CATEGORY}/${PF}"
159 elog "Please note that the driver name used to form the DSN now includes the SLOT."
160 }