summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-08-06 08:18:09 +0200
committerJeroen Roovers <jer@gentoo.org>2020-08-06 08:22:58 +0200
commit7f08935d12c8200027654193664b91a6312d8d05 (patch)
tree43ff0cfd3370af742c4507cee53752d74ced9588 /net-analyzer
parentnet-analyzer/net-snmp: Remove libdir from net-snmp-config/pkg-config (diff)
downloadgentoo-7f08935d12c8200027654193664b91a6312d8d05.tar.gz
gentoo-7f08935d12c8200027654193664b91a6312d8d05.tar.bz2
gentoo-7f08935d12c8200027654193664b91a6312d8d05.zip
net-analyzer/net-snmp: Use pkg-config to find libmysqlclient
mysql_config --libs returns -L/.../$libdir which got half-heartedly fixed in its pkg-config files, so use that instead to prevent the linker from using a previously installed libnetsnmp. $ mysql_config --libs -L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl $ pkg-config --libs mysqlclient -lmysqlclient Package-Manager: Portage-3.0.1, Repoman-2.3.23 Bug: https://bugs.gentoo.org/686416 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.8.1-mysqlclient.patch19
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.8.1_pre1-r1.ebuild2
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild3
-rw-r--r--net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild3
-rw-r--r--net-analyzer/net-snmp/net-snmp-99999999.ebuild1
5 files changed, 26 insertions, 2 deletions
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
new file mode 100644
index 000000000000..08735d1be7c0
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.8.1-mysqlclient.patch
@@ -0,0 +1,19 @@
+--- a/configure.d/config_os_libs2
++++ b/configure.d/config_os_libs2
+@@ -516,6 +516,8 @@
+ # mysql
+ ##
+ if test "x$with_mysql" = "xyes" ; then
++ PKG_CHECK_MODULES([MYSQL],[mysqlclient],[MYSQL_INCLUDES="$MYSQL_CFLAGS"],)
++ if test -x "$MYSQL_LIBS"; then
+ AC_PATH_PROGS(MYSQLCONFIG,mysql_config)
+ test -x "$MYSQLCONFIG" \
+ || AC_MSG_ERROR([Could not find mysql_config and was specifically asked to use MySQL support])
+@@ -523,6 +525,7 @@
+ MYSQL_INCLUDES=`$MYSQLCONFIG --include`
+ _libs="${LIBS}"
+ _cppflags="${CPPFLAGS}"
++ fi
+ LIBS="${LIBS} ${MYSQL_LIBS}"
+ CPPFLAGS="${CPPFLAGS} ${MYSQL_INCLUDES}"
+ AC_CHECK_HEADER(mysql.h,,
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
index 0247614b9748..48c7448ff414 100644
--- 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
@@ -79,6 +79,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.8-pcap.patch
"${FILESDIR}"/${PN}-5.8-tinfo.patch
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
+ "${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
)
pkg_setup() {
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
index 01b3f5ccf53a..bff341a5bfc4 100644
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_pre2.ebuild
@@ -80,6 +80,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.8-tinfo.patch
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
)
pkg_setup() {
@@ -146,7 +147,7 @@ src_compile() {
use doc && emake docsdox
}
-src_install () {
+src_install() {
# bug #317965
emake -j1 DESTDIR="${D}" install
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
index 885006e7fa27..06778b749074 100644
--- a/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-5.8.1_rc1.ebuild
@@ -79,6 +79,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.8-pcap.patch
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
"${FILESDIR}"/${PN}-99999999-tinfo.patch
)
@@ -146,7 +147,7 @@ src_compile() {
use doc && emake docsdox
}
-src_install () {
+src_install() {
# bug #317965
emake -j1 DESTDIR="${D}" install
diff --git a/net-analyzer/net-snmp/net-snmp-99999999.ebuild b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
index bc7fc206a2d0..d75684cc5afe 100644
--- a/net-analyzer/net-snmp/net-snmp-99999999.ebuild
+++ b/net-analyzer/net-snmp/net-snmp-99999999.ebuild
@@ -78,6 +78,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.8-pcap.patch
"${FILESDIR}"/${PN}-5.8.1-pkg-config.patch
"${FILESDIR}"/${PN}-5.8.1-net-snmp-config-libdir.patch
+ "${FILESDIR}"/${PN}-5.8.1-mysqlclient.patch
"${FILESDIR}"/${PN}-99999999-tinfo.patch
)