Lines 15-21
Link Here
|
15 |
RDEPEND=">=virtual/mysql-4.0 dev-db/unixODBC sys-devel/m4" |
15 |
RDEPEND=">=virtual/mysql-4.0 dev-db/unixODBC sys-devel/m4" |
16 |
# perl is required for building docs |
16 |
# perl is required for building docs |
17 |
DEPEND="${RDEPEND} doc? ( dev-lang/perl )" |
17 |
DEPEND="${RDEPEND} doc? ( dev-lang/perl )" |
18 |
S=${WORKDIR}/${MY_P} |
18 |
S="${WORKDIR}/${MY_P}" |
19 |
|
19 |
|
20 |
src_compile() { |
20 |
src_compile() { |
21 |
local myconf="--enable-static" |
21 |
local myconf="--enable-static" |
Lines 48-57
Link Here
|
48 |
src_install() { |
48 |
src_install() { |
49 |
into /usr |
49 |
into /usr |
50 |
einstall \ |
50 |
einstall \ |
51 |
libexecdir=${D}/usr/sbin \ |
51 |
libexecdir="${D}/usr/sbin" \ |
52 |
sysconfdir=${D}/etc/myodbc \ |
52 |
sysconfdir="${D}/etc/myodbc" \ |
53 |
localstatedir=${D}/var/lib/myodbc |
53 |
localstatedir="${D}/var/lib/myodbc" |
54 |
dodoc INSTALL RELEASE-NOTES README |
54 |
dodoc INSTALL RELEASE-NOTES README |
|
|
55 |
dodir /usr/share/${P} |
56 |
insinto /usr/share/${P}/ |
57 |
doins "${FILESDIR}/odbc.ini.m4" "${FILESDIR}/odbcinst.ini.m4" |
58 |
|
59 |
|
55 |
} |
60 |
} |
56 |
|
61 |
|
57 |
pkg_config() { |
62 |
pkg_config() { |
Lines 60-73
Link Here
|
60 |
|
65 |
|
61 |
for i in odbc.ini odbcinst.ini; do |
66 |
for i in odbc.ini odbcinst.ini; do |
62 |
einfo "Building $i" |
67 |
einfo "Building $i" |
63 |
/usr/bin/m4 -D__PN__=${PN} -D__PF__=${PF} ${FILESDIR}/${i}.m4 >${T}/${i} |
68 |
/usr/bin/m4 -D__PN__=${PN} -D__PF__=${PF} /usr/share/${P}/${i}.m4 >"${T}/${i}" |
64 |
done; |
69 |
done; |
65 |
|
70 |
|
66 |
local msg='MySQL ODBC driver' |
71 |
local msg='MySQL ODBC driver' |
67 |
local drivers=$(/usr/bin/odbcinst -q -d) |
72 |
local drivers=$(/usr/bin/odbcinst -q -d) |
68 |
if echo $drivers | grep -vq "^\[${PN}\]$" ; then |
73 |
if echo $drivers | grep -vq "^\[${PN}\]$" ; then |
69 |
ebegin "Installing ${msg}" |
74 |
ebegin "Installing ${msg}" |
70 |
/usr/bin/odbcinst -i -d -f ${T}/odbcinst.ini |
75 |
/usr/bin/odbcinst -i -d -f "${T}/odbcinst.ini" |
71 |
rc=$? |
76 |
rc=$? |
72 |
eend $rc |
77 |
eend $rc |
73 |
[ $rc -ne 0 ] && die |
78 |
[ $rc -ne 0 ] && die |
Lines 79-85
Link Here
|
79 |
msg='sample MySQL ODBC DSN' |
84 |
msg='sample MySQL ODBC DSN' |
80 |
if echo $sources | grep -vq "^\[${PN}-test\]$"; then |
85 |
if echo $sources | grep -vq "^\[${PN}-test\]$"; then |
81 |
ebegin "Installing ${msg}" |
86 |
ebegin "Installing ${msg}" |
82 |
/usr/bin/odbcinst -i -s -l -f ${T}/odbc.ini |
87 |
/usr/bin/odbcinst -i -s -l -f "${T}/odbc.ini" |
83 |
rc=$? |
88 |
rc=$? |
84 |
eend $rc |
89 |
eend $rc |
85 |
[ $rc -ne 0 ] && die |
90 |
[ $rc -ne 0 ] && die |
Lines 93-95
Link Here
|
93 |
elog "to configure the MySQL ODBC drivers and sources:" |
98 |
elog "to configure the MySQL ODBC drivers and sources:" |
94 |
elog "emerge --config =${CATEGORY}/${PF}" |
99 |
elog "emerge --config =${CATEGORY}/${PF}" |
95 |
} |
100 |
} |
|
|
101 |
|