aboutsummaryrefslogtreecommitdiffstats
path: root/net/avahi
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2006-01-30 02:47:31 +0800
committermarcus <marcus@FreeBSD.org>2006-01-30 02:47:31 +0800
commit95f470a252b873e5a164148be142e004ce200108 (patch)
tree1035f60e290d2f2fe9ffd0a8bc67fc5cbbb69281 /net/avahi
parent47ed7a8f56304f7e7a05e6abfb93c7862faca2a9 (diff)
downloadfreebsd-ports-gnome-95f470a252b873e5a164148be142e004ce200108.tar.gz
freebsd-ports-gnome-95f470a252b873e5a164148be142e004ce200108.tar.zst
freebsd-ports-gnome-95f470a252b873e5a164148be142e004ce200108.zip
In trying to solve a problem with inconsistencies when linking with -shared
and ${PTHREAD_LIBS}, avahi linked its binaries with -lc_r on FreeBSD. This caused nasty runtime failures on i386, and build failures on alpha, amd64, and other platforms where libc_r no longer exists. To fix this, don't go through the song and dance of trying to solve the -shared/${PTHREAD_LIBS} problem, and just link with ${PTHREAD_LIBS} as usual. Of course, ports that depend on avahi's libraries will break by doing this, so add ${PTHREAD_{LIBS,CFLAGS}} to the right pkg-config files to make sure dependencies will pick them up. Patch adapted from: Yasuda Keisuke <kysd@po.harenet.ne.jp>
Diffstat (limited to 'net/avahi')
-rw-r--r--net/avahi/Makefile5
-rw-r--r--net/avahi/files/patch-Makefile.in11
-rw-r--r--net/avahi/files/patch-avahi-compat-howl.pc.in10
-rw-r--r--net/avahi/files/patch-avahi-compat-libdns_sd.pc.in10
-rw-r--r--net/avahi/files/patch-avahi-core.pc.in10
-rw-r--r--net/avahi/files/patch-configure11
6 files changed, 56 insertions, 1 deletions
diff --git a/net/avahi/Makefile b/net/avahi/Makefile
index 7c2be562587b..f322477d4fec 100644
--- a/net/avahi/Makefile
+++ b/net/avahi/Makefile
@@ -7,6 +7,7 @@
PORTNAME= avahi
PORTVERSION= 0.6.5
+PORTREVISION= 1
CATEGORIES= net dns
MASTER_SITES= http://www.avahi.org/download/
@@ -33,7 +34,9 @@ CONFIGURE_ARGS= --with-distro=freebsd \
--disable-doxygen-dot \
--localstatedir=/var
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
+ LDFLAGS="-L${LOCALBASE}/lib" \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
USE_RC_SUBR= yes
diff --git a/net/avahi/files/patch-Makefile.in b/net/avahi/files/patch-Makefile.in
new file mode 100644
index 000000000000..8467b3b3eca8
--- /dev/null
+++ b/net/avahi/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Sun Jan 29 13:36:41 2006
++++ Makefile.in Sun Jan 29 13:37:37 2006
+@@ -1037,6 +1037,8 @@
+ avahi-core.pc: avahi-core.pc.in
+ sed -e 's,@prefix\@,$(prefix),g' \
+ -e 's,@libdir\@,$(libdir),g' \
++ -e 's,@PTHREAD_LIBS\@,$(PTHREAD_LIBS),g' \
++ -e 's,@PTHREAD_CFLAGS\@,$(PTHREAD_CFLAGS),g' \
+ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+
+ @HAVE_DBUS_TRUE@avahi-client.pc: avahi-client.pc.in
diff --git a/net/avahi/files/patch-avahi-compat-howl.pc.in b/net/avahi/files/patch-avahi-compat-howl.pc.in
new file mode 100644
index 000000000000..f101cc1da5e3
--- /dev/null
+++ b/net/avahi/files/patch-avahi-compat-howl.pc.in
@@ -0,0 +1,10 @@
+--- avahi-compat-howl.pc.in.orig Sun Jan 29 13:32:39 2006
++++ avahi-compat-howl.pc.in Sun Jan 29 13:32:56 2006
+@@ -6,5 +6,5 @@
+ Name: avahi-compat-howl
+ Description: Avahi Multicast DNS Responder (HOWL Compatibility)
+ Version: @HOWL_COMPAT_VERSION@
+-Libs: -L${libdir} -lhowl
+-Cflags: -D_REENTRANT -I${includedir}
++Libs: -L${libdir} -lhowl @PTHREAD_LIBS@
++Cflags: -D_REENTRANT @PTHREAD_CFLAGS@ -I${includedir}
diff --git a/net/avahi/files/patch-avahi-compat-libdns_sd.pc.in b/net/avahi/files/patch-avahi-compat-libdns_sd.pc.in
new file mode 100644
index 000000000000..8487c1b5a298
--- /dev/null
+++ b/net/avahi/files/patch-avahi-compat-libdns_sd.pc.in
@@ -0,0 +1,10 @@
+--- avahi-compat-libdns_sd.pc.in.orig Sun Jan 29 13:33:21 2006
++++ avahi-compat-libdns_sd.pc.in Sun Jan 29 13:33:40 2006
+@@ -6,5 +6,5 @@
+ Name: avahi-compat-libdns_sd
+ Description: Avahi Multicast DNS Responder (libdns_sd Compatibility)
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ldns_sd
+-Cflags: -D_REENTRANT -I${includedir}
++Libs: -L${libdir} -ldns_sd @PTHREAD_LIBS@
++Cflags: -D_REENTRANT @PTHREAD_CFLAGS@ -I${includedir}
diff --git a/net/avahi/files/patch-avahi-core.pc.in b/net/avahi/files/patch-avahi-core.pc.in
new file mode 100644
index 000000000000..fdde41be9c53
--- /dev/null
+++ b/net/avahi/files/patch-avahi-core.pc.in
@@ -0,0 +1,10 @@
+--- avahi-core.pc.in.orig Sun Jan 29 13:31:30 2006
++++ avahi-core.pc.in Sun Jan 29 13:31:48 2006
+@@ -6,5 +6,5 @@
+ Name: avahi-core
+ Description: Avahi Multicast DNS Responder (Embeddable Stack)
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lavahi-common -lavahi-core
+-Cflags: -D_REENTRANT -I${includedir}
++Libs: -L${libdir} -lavahi-common -lavahi-core @PTHREAD_LIBS@
++Cflags: -D_REENTRANT @PTHREAD_CFLAGS@ -I${includedir}
diff --git a/net/avahi/files/patch-configure b/net/avahi/files/patch-configure
new file mode 100644
index 000000000000..d745fcb6b214
--- /dev/null
+++ b/net/avahi/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Sun Jan 29 13:24:39 2006
++++ configure Sun Jan 29 13:25:12 2006
+@@ -19304,7 +19304,7 @@
+ # this is useful
+ echo "$as_me:$LINENO: checking whether to check for GCC pthread/shared inconsistencies" >&5
+ echo $ECHO_N "checking whether to check for GCC pthread/shared inconsistencies... $ECHO_C" >&6
+- if test x"" = x1; then
++ if test x"1" = x1; then
+ echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+ else