1 |
commit: 7f08935d12c8200027654193664b91a6312d8d05 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 6 06:18:09 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 6 06:22:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f08935d |
7 |
|
8 |
net-analyzer/net-snmp: Use pkg-config to find libmysqlclient |
9 |
|
10 |
mysql_config --libs returns -L/.../$libdir which got half-heartedly |
11 |
fixed in its pkg-config files, so use that instead to prevent the linker |
12 |
from using a previously installed libnetsnmp. |
13 |
|
14 |
$ mysql_config --libs |
15 |
-L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl |
16 |
$ pkg-config --libs mysqlclient |
17 |
-lmysqlclient |
18 |
|
19 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
20 |
Bug: https://bugs.gentoo.org/686416 |
21 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
22 |
|
23 |
.../net-snmp/files/net-snmp-5.8.1-mysqlclient.patch | 19 +++++++++++++++++++ |
24 |
net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild | 2 ++ |
25 |
net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild | 3 ++- |
26 |
net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild | 3 ++- |
27 |
net-analyzer/net-snmp/net-snmp-99999999.ebuild | 1 + |
28 |
5 files changed, 26 insertions(+), 2 deletions(-) |
29 |
|
30 |
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.8.1-mysqlclient.patch b/net-analyzer/net-snmp/files/net-snmp-5.8.1-mysqlclient.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..08735d1be7c |
33 |
--- /dev/null |
34 |
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8.1-mysqlclient.patch |
35 |
@@ -0,0 +1,19 @@ |
36 |
+--- a/configure.d/config_os_libs2 |
37 |
++++ b/configure.d/config_os_libs2 |
38 |
+@@ -516,6 +516,8 @@ |
39 |
+ # mysql |
40 |
+ ## |
41 |
+ if test "x$with_mysql" = "xyes" ; then |
42 |
++ PKG_CHECK_MODULES([MYSQL],[mysqlclient],[MYSQL_INCLUDES="$MYSQL_CFLAGS"],) |
43 |
++ if test -x "$MYSQL_LIBS"; then |
44 |
+ AC_PATH_PROGS(MYSQLCONFIG,mysql_config) |
45 |
+ test -x "$MYSQLCONFIG" \ |
46 |
+ || AC_MSG_ERROR([Could not find mysql_config and was specifically asked to use MySQL support]) |
47 |
+@@ -523,6 +525,7 @@ |
48 |
+ MYSQL_INCLUDES=`$MYSQLCONFIG --include` |
49 |
+ _libs="${LIBS}" |
50 |
+ _cppflags="${CPPFLAGS}" |
51 |
++ fi |
52 |
+ LIBS="${LIBS} ${MYSQL_LIBS}" |
53 |
+ CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}" |
54 |
+ AC_CHECK_HEADER(mysql.h,, |
55 |
|
56 |
diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild |
57 |
index 0247614b974..48c7448ff41 100644 |
58 |
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild |
59 |
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild |
60 |
@@ -79,6 +79,8 @@ PATCHES=( |
61 |
"${FILESDIR}"/${PN}-5.8-pcap.patch |
62 |
"${FILESDIR}"/${PN}-5.8-tinfo.patch |
63 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
64 |
+ "${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
65 |
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
66 |
) |
67 |
|
68 |
pkg_setup() { |
69 |
|
70 |
diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild |
71 |
index 01b3f5ccf53..bff341a5bfc 100644 |
72 |
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild |
73 |
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild |
74 |
@@ -80,6 +80,7 @@ PATCHES=( |
75 |
"${FILESDIR}"/${PN}-5.8-tinfo.patch |
76 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
77 |
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
78 |
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
79 |
) |
80 |
|
81 |
pkg_setup() { |
82 |
@@ -146,7 +147,7 @@ src_compile() { |
83 |
use doc && emake docsdox |
84 |
} |
85 |
|
86 |
-src_install () { |
87 |
+src_install() { |
88 |
# bug #317965 |
89 |
emake -j1 DESTDIR="${D}" install |
90 |
|
91 |
|
92 |
diff --git a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild |
93 |
index 885006e7fa2..06778b74907 100644 |
94 |
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild |
95 |
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild |
96 |
@@ -79,6 +79,7 @@ PATCHES=( |
97 |
"${FILESDIR}"/${PN}-5.8-pcap.patch |
98 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
99 |
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
100 |
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
101 |
"${FILESDIR}"/${PN}-99999999-tinfo.patch |
102 |
) |
103 |
|
104 |
@@ -146,7 +147,7 @@ src_compile() { |
105 |
use doc && emake docsdox |
106 |
} |
107 |
|
108 |
-src_install () { |
109 |
+src_install() { |
110 |
# bug #317965 |
111 |
emake -j1 DESTDIR="${D}" install |
112 |
|
113 |
|
114 |
diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild |
115 |
index bc7fc206a2d..d75684cc5af 100644 |
116 |
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild |
117 |
+++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild |
118 |
@@ -78,6 +78,7 @@ PATCHES=( |
119 |
"${FILESDIR}"/${PN}-5.8-pcap.patch |
120 |
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch |
121 |
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch |
122 |
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch |
123 |
"${FILESDIR}"/${PN}-99999999-tinfo.patch |
124 |
) |