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-3.51.26_p1127-r1.ebuild
Date: Sat, 01 Nov 2008 10:00:10
Message-Id: E1KwDH7-0005SL-0i@stork.gentoo.org
1 robbat2 08/11/01 10:00:09
2
3 Modified: ChangeLog
4 Added: myodbc-3.51.26_p1127-r1.ebuild
5 Log:
6 Bring in slotted myodbc in preparation for 5.1. Also fix bug #159026 with $FILESDIR usage during pkg_config. Use sed instead of m4. Driver name for DSN also includes SLOT value.
7 (Portage version: 2.2_rc12/cvs/Linux 2.6.26-hardened-r4 x86_64)
8
9 Revision Changes Path
10 1.17 dev-db/myodbc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.17&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?rev=1.17&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/ChangeLog?r1=1.16&r2=1.17
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v
19 retrieving revision 1.16
20 retrieving revision 1.17
21 diff -p -w -b -B -u -u -r1.16 -r1.17
22 --- ChangeLog 1 Nov 2008 09:15:25 -0000 1.16
23 +++ ChangeLog 1 Nov 2008 10:00:08 -0000 1.17
24 @@ -1,6 +1,14 @@
25 # ChangeLog for dev-db/myodbc
26 # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.16 2008/11/01 09:15:25 robbat2 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/ChangeLog,v 1.17 2008/11/01 10:00:08 robbat2 Exp $
29 +
30 +*myodbc-3.51.26_p1127-r1 (01 Nov 2008)
31 +
32 + 01 Nov 2008; Robin H. Johnson <robbat2@g.o>
33 + +myodbc-3.51.26_p1127-r1.ebuild:
34 + Bring in slotted myodbc in preparation for 5.1. Also fix bug #159026 with
35 + $FILESDIR usage during pkg_config. Use sed instead of m4. Driver name for
36 + DSN also includes SLOT value.
37
38 *myodbc-3.51.26_p1127 (01 Nov 2008)
39
40
41
42
43 1.1 dev-db/myodbc/myodbc-3.51.26_p1127-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/myodbc-3.51.26_p1127-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/myodbc/myodbc-3.51.26_p1127-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: myodbc-3.51.26_p1127-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-db/myodbc/myodbc-3.51.26_p1127-r1.ebuild,v 1.1 2008/11/01 10:00:08 robbat2 Exp $
53
54 inherit eutils versionator
55
56 MAJOR="$(get_version_component_range 1-2 $PV)"
57 MY_PN="mysql-connector-odbc"
58 MY_P="${MY_PN}-${PV/_p/r}"
59 DESCRIPTION="ODBC driver for MySQL"
60 HOMEPAGE="http://www.mysql.com/products/myodbc/"
61 SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
62 RESTRICT="primaryuri"
63 LICENSE="GPL-2"
64 SLOT="${MAJOR}"
65 KEYWORDS="~amd64 ~ppc ~x86"
66 IUSE="debug doc static"
67 RDEPEND=">=virtual/mysql-4.0
68 dev-db/unixODBC"
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_compile() {
78 local myconf="--enable-static"
79 use static \
80 && myconf="${myconf} --disable-shared" \
81 || myconf="${myconf} --enable-shared"
82
83 myconf="${myconf} $(use_with doc docs) $(use_with debug)"
84 myconf="${myconf} --disable-gui"
85 #TODO: the configure test against qt 4 enter in an endless loop
86 #myconf="${myconf} $(use_enable qt gui)"
87
88 econf \
89 --libexecdir=/usr/sbin \
90 --sysconfdir=/etc/myodbc \
91 --localstatedir=/var/lib/myodbc \
92 --with-mysql-libs=/usr/lib/mysql \
93 --with-mysql-includes=/usr/include/mysql \
94 --with-odbc-ini=/etc/unixODBC/odbc.ini \
95 --with-unixODBC=/usr \
96 --enable-myodbc3i \
97 --enable-myodbc3m \
98 --disable-test \
99 --without-samples \
100 ${myconf} || die "econf failed"
101
102 emake || die "emake failed"
103 }
104
105 src_install() {
106 into /usr
107 einstall \
108 libexecdir="${D}"/usr/sbin \
109 sysconfdir="${D}"/etc/myodbc \
110 localstatedir="${D}"/var/lib/myodbc \
111 pkgdatadir="${D}"/usr/share/doc/${PF}
112 dodoc INSTALL README
113 prepalldocs
114 dodir /usr/share/${PN}-${SLOT}
115 for i in odbc.ini odbcinst.ini; do
116 einfo "Building $i"
117 sed \
118 -e "s,__PN__,${DRIVER_NAME},g" \
119 -e "s,__PF__,${PF},g" \
120 -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}.so,g" \
121 >"${D}"/usr/share/${PN}-${SLOT}/${i} \
122 <"${FILESDIR}"/${i}.m4 \
123 || die "Failed to build $i"
124 done;
125 }
126
127 pkg_config() {
128 [ "${ROOT}" != "/" ] && \
129 die 'Sorry, non-standard ROOT setting is not supported :-('
130
131 local msg='MySQL ODBC driver'
132 local drivers=$(/usr/bin/odbcinst -q -d)
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 elog "If this is a new install, please run the following command"
158 elog "to configure the MySQL ODBC drivers and sources:"
159 elog "emerge --config =${CATEGORY}/${PF}"
160 elog "Please note that the driver name used to form the DSN now includes the SLOT."
161 }