mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
gloox: fix detection of res_query and other libnetwork functions
This commit is contained in:
@@ -3,7 +3,7 @@ DESCRIPTION="Rock-solid, full-featured Jabber/XMPP client library, written in cl
|
||||
HOMEPAGE="https://camaya.net/gloox/"
|
||||
COPYRIGHT="2002-2019 Jakob Schröter"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://camaya.net/download/gloox-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="97cb6a0c07e320ffa4a7c66e8ab06b2361086271dc87ed2398befef4e8435f8a"
|
||||
PATCHES="gloox-$portVersion.patchset"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 3adb58f29cf83ff50df3ca70da417928768b16fb Mon Sep 17 00:00:00 2001
|
||||
From 783751fbeb737cfe77cc2de445c60f07fc712226 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 28 Mar 2020 10:17:16 +0100
|
||||
Subject: Search for network functions in libnetwork
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3fa8d04..c97b431 100644
|
||||
index 3fa8d04..2400ecb 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -318,7 +282,7 @@ AC_ARG_ENABLE( getaddrinfo,
|
||||
@@ -318,7 +318,7 @@ AC_ARG_ENABLE( getaddrinfo,
|
||||
[do not use getaddrinfo for dns lookups [default use getaddrinfo]])],
|
||||
[getaddrinfo="no"])
|
||||
if test "x$getaddrinfo" = "xyes"; then
|
||||
@@ -17,7 +17,7 @@ index 3fa8d04..c97b431 100644
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to use getaddrinfo])
|
||||
AC_MSG_RESULT($getaddrinfo)
|
||||
@@ -327,6 +291,7 @@ dnl Checks for header files.
|
||||
@@ -327,6 +327,7 @@ dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(unistd.h strings.h errno.h arpa/nameser.h)
|
||||
AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)])
|
||||
@@ -28,3 +28,46 @@ index 3fa8d04..c97b431 100644
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From 731e87b80ac50bf884c15d234dc51c91762b95ac Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 28 Mar 2020 13:10:43 +0100
|
||||
Subject: Hack for detecting libnetwork internal functions
|
||||
|
||||
These functions are found indirectly through #defines in the headers.
|
||||
So a normal AC_SEARCH_LIBS does not work.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2400ecb..ae03ae3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -220,7 +220,7 @@ else
|
||||
else
|
||||
AC_MSG_CHECKING([for res_querydomain in -lresolv (alternate version)])
|
||||
save_libs="$LIBS"
|
||||
- LIBS="-lresolv $LIBS"
|
||||
+ LIBS="-lnetwork $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_querydomain(0,0,0,0,0,0)]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_RES_QUERYDOMAIN)
|
||||
@@ -248,7 +248,7 @@ else
|
||||
else
|
||||
AC_MSG_CHECKING([for dn_skipname in -lresolv (alternate version)])
|
||||
save_libs="$LIBS"
|
||||
- LIBS="-lresolv $LIBS"
|
||||
+ LIBS="-lnetwork $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>
|
||||
#include <resolv.h>]], [[dn_skipname(0,0)]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
@@ -277,7 +277,7 @@ else
|
||||
else
|
||||
AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
|
||||
save_libs="$LIBS"
|
||||
- LIBS="-lresolv $LIBS"
|
||||
+ LIBS="-lnetwork $LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_RES_QUERY)
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user