Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-db/myodbc: ChangeLog myodbc-5.1.6.ebuild
Date: Sun, 31 Jan 2010 06:26:57
Message-Id: E1NbTGo-00060F-9c@stork.gentoo.org
1 robbat2 10/01/31 06:26:54
2
3 Modified: ChangeLog
4 Added: myodbc-5.1.6.ebuild
5 Log:
6 Version bump for 5.1 slot, now includes support for Qt Gui.
7 (Portage version: 2.2_rc61/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.21 dev-db/myodbc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.21&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.21&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?r1=1.20&r2=1.21
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v
19 retrieving revision 1.20
20 retrieving revision 1.21
21 diff -p -w -b -B -u -u -r1.20 -r1.21
22 --- ChangeLog 31 Jan 2010 05:25:46 -0000 1.20
23 +++ ChangeLog 31 Jan 2010 06:26:53 -0000 1.21
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-db/myodbc
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.20 2010/01/31 05:25:46 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.21 2010/01/31 06:26:53 robbat2 Exp $
29 +
30 +*myodbc-5.1.6 (31 Jan 2010)
31 +
32 + 31 Jan 2010; Robin H. Johnson <robbat2@g.o> +myodbc-5.1.6.ebuild,
33 + +files/myodbc-5.1.6-qt4-includedir.patch:
34 + Version bump for 5.1 slot, now includes support for Qt Gui.
35
36 *myodbc-3.51.27_p695 (31 Jan 2010)
37
38
39
40
41 1.1 dev-db/myodbc/myodbc-5.1.6.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/myodbc-5.1.6.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/myodbc-5.1.6.ebuild?rev=1.1&content-type=text/plain
45
46 Index: myodbc-5.1.6.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-5.1.6.ebuild,v 1.1 2010/01/31 06:26:53 robbat2 Exp $
51
52 EAPI=2
53 inherit eutils versionator autotools
54
55 MAJOR="$(get_version_component_range 1-2 $PV)"
56 MY_PN="mysql-connector-odbc"
57 MY_P="${MY_PN}-${PV/_p/r}"
58 DESCRIPTION="ODBC driver for MySQL"
59 HOMEPAGE="http://www.mysql.com/products/myodbc/"
60 SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
61 RESTRICT="primaryuri"
62 LICENSE="GPL-2"
63 SLOT="${MAJOR}"
64 KEYWORDS="~amd64 ~ppc ~x86"
65 IUSE="debug doc static qt4"
66 RDEPEND=">=virtual/mysql-4.0
67 dev-db/unixODBC
68 qt4? ( >=x11-libs/qt-gui-4 )"
69 # perl is required for building docs
70 DEPEND="${RDEPEND}
71 doc? ( dev-lang/perl )"
72 S=${WORKDIR}/${MY_P}
73
74 # Careful!
75 DRIVER_NAME="${PN}-${SLOT}"
76
77 src_unpack() {
78 unpack ${A}
79 epatch "${FILESDIR}"/myodbc-5.1.6-qt4-includedir.patch
80 }
81
82 src_prepare() {
83 eautoreconf
84 }
85
86 src_configure() {
87 local myconf="--enable-static"
88 use static \
89 && myconf="${myconf} --disable-shared" \
90 || myconf="${myconf} --enable-shared"
91
92 myconf="${myconf} $(use_with doc docs) $(use_with debug)"
93 #myconf="${myconf} --disable-gui"
94 #TODO: the configure test against qt 4 enter in an endless loop
95 myconf="${myconf}
96 $(use_enable qt4 gui)
97 $(use_with qt4 qt-libraries /usr/$(get_libdir)/qt4/)"
98
99 econf \
100 --libexecdir=/usr/sbin \
101 --sysconfdir=/etc/myodbc \
102 --localstatedir=/var/lib/myodbc \
103 --with-mysql-libs=/usr/lib/mysql \
104 --with-mysql-includes=/usr/include/mysql \
105 --with-odbc-ini=/etc/unixODBC/odbc.ini \
106 --with-unixODBC=/usr \
107 --enable-myodbc3i \
108 --enable-myodbc3m \
109 --disable-test \
110 --without-samples \
111 ${myconf} \
112 || die "econf failed"
113 }
114
115 src_compile() {
116 emake \
117 || die "emake failed"
118 }
119
120 src_install() {
121 into /usr
122 einstall \
123 libexecdir="${D}"/usr/sbin \
124 sysconfdir="${D}"/etc/myodbc \
125 localstatedir="${D}"/var/lib/myodbc \
126 pkgdatadir="${D}"/usr/share/doc/${PF}
127 dodoc INSTALL README
128 prepalldocs
129 dodir /usr/share/${PN}-${SLOT}
130 for i in odbc.ini odbcinst.ini; do
131 einfo "Building $i"
132 sed \
133 -e "s,__PN__,${DRIVER_NAME},g" \
134 -e "s,__PF__,${PF},g" \
135 -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}.so,g" \
136 >"${D}"/usr/share/${PN}-${SLOT}/${i} \
137 <"${FILESDIR}"/${i}.m4 \
138 || die "Failed to build $i"
139 done;
140 }
141
142 pkg_config() {
143 [ "${ROOT}" != "/" ] && \
144 die 'Sorry, non-standard ROOT setting is not supported :-('
145
146 local msg='MySQL ODBC driver'
147 local drivers=$(/usr/bin/odbcinst -q -d)
148 if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
149 ebegin "Installing ${msg}"
150 /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
151 rc=$?
152 eend $rc
153 [ $rc -ne 0 ] && die
154 else
155 einfo "Skipping already installed ${msg}"
156 fi
157
158 local sources=$(/usr/bin/odbcinst -q -s)
159 msg='sample MySQL ODBC DSN'
160 if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
161 ebegin "Installing ${msg}"
162 /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
163 rc=$?
164 eend $rc
165 [ $rc -ne 0 ] && die
166 else
167 einfo "Skipping already installed ${msg}"
168 fi
169 }
170
171 pkg_postinst() {
172 elog "If this is a new install, please run the following command"
173 elog "to configure the MySQL ODBC drivers and sources:"
174 elog "emerge --config =${CATEGORY}/${PF}"
175 elog "Please note that the driver name used to form the DSN now includes the SLOT."
176 }