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.7.ebuild ChangeLog myodbc-5.2.6.ebuild
Date: Tue, 29 Jul 2014 03:35:36
Message-Id: 20140729033531.54D2E2004E@flycatcher.gentoo.org
1 grknight 14/07/29 03:35:31
2
3 Modified: ChangeLog
4 Added: myodbc-5.2.7.ebuild
5 Removed: myodbc-5.2.6.ebuild
6 Log:
7 Version bump, fix slotting of installer utility, and bump required mysql version. Remove old
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.36 dev-db/myodbc/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.36&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.36&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/ChangeLog?r1=1.35&r2=1.36
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v
21 retrieving revision 1.35
22 retrieving revision 1.36
23 diff -u -r1.35 -r1.36
24 --- ChangeLog 5 May 2014 03:03:50 -0000 1.35
25 +++ ChangeLog 29 Jul 2014 03:35:31 -0000 1.36
26 @@ -1,6 +1,13 @@
27 # ChangeLog for dev-db/myodbc
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.35 2014/05/05 03:03:50 grknight Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.36 2014/07/29 03:35:31 grknight Exp $
31 +
32 +*myodbc-5.2.7 (29 Jul 2014)
33 +
34 + 29 Jul 2014; Brian Evans <grknight@g.o> +myodbc-5.2.7.ebuild,
35 + -myodbc-5.2.6.ebuild:
36 + Version bump, fix slotting of installer utility, and bump required mysql
37 + version. Remove old
38
39 *myodbc-5.2.6 (04 May 2014)
40
41
42
43
44 1.1 dev-db/myodbc/myodbc-5.2.7.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/myodbc-5.2.7.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/myodbc/myodbc-5.2.7.ebuild?rev=1.1&content-type=text/plain
48
49 Index: myodbc-5.2.7.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.7.ebuild,v 1.1 2014/07/29 03:35:31 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-5.5
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 -DMYSQLCLIENT_LIB_NAME="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__,${MAJOR},g" \
116 -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \
117 >"${D}"/usr/share/${PN}-${SLOT}/${i} \
118 <"${FILESDIR}"/${i}.m4 \
119 || die "Failed to build $i"
120 done;
121 mv "${D}/usr/bin/myodbc-installer" \
122 "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
123 }
124
125 pkg_config() {
126
127 [ "${ROOT}" != "/" ] && \
128 die 'Sorry, non-standard ROOT setting is not supported :-('
129
130 local msg='MySQL ODBC driver'
131 local drivers=$(/usr/bin/odbcinst -q -d)
132
133 if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
134 ebegin "Installing ${msg}"
135 /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
136 rc=$?
137 eend $rc
138 [ $rc -ne 0 ] && die
139 else
140 einfo "Skipping already installed ${msg}"
141 fi
142
143 local sources=$(/usr/bin/odbcinst -q -s)
144 msg='sample MySQL ODBC DSN'
145 if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
146 ebegin "Installing ${msg}"
147 /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
148 rc=$?
149 eend $rc
150 [ $rc -ne 0 ] && die
151 else
152 einfo "Skipping already installed ${msg}"
153 fi
154 }
155
156 pkg_postinst() {
157
158 elog "If this is a new install, please run the following command"
159 elog "to configure the MySQL ODBC drivers and sources:"
160 elog "emerge --config =${CATEGORY}/${PF}"
161 elog "Please note that the driver name used to form the DSN now includes the SLOT."
162 elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
163 }