From da8e6d479254199ad445a74f9d3074d31f554d8c Mon Sep 17 00:00:00 2001
From: Joe Marcus Clarke <marcus@FreeBSD.org>
Date: Sun, 11 May 2003 06:31:55 +0000
Subject: Add a patch to allow -lc_r to be linked in on -CURRENT.  Not having
 this caused gdm to lock up when started.

Special thanks goes to Glenn Johnson <gjohnson@srrc.ars.usda.gov> for
tracking this down.  Apparently, newer versions of libtool have code
to prevent -lc_r from being passed to the linker on _all_ versions of
FreeBSD.  Since ${PTHREAD_LIBS} is set to -lc_r for 5.x, this causes
massive problems with threaded applications.
---
 x11/gdm2/Makefile              |  1 +
 x11/gdm2/files/patch-ltmain.sh | 51 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 x11/gdm2/files/patch-ltmain.sh

(limited to 'x11/gdm2')

diff --git a/x11/gdm2/Makefile b/x11/gdm2/Makefile
index a1b0ae3038b3..e3fe64b509bc 100644
--- a/x11/gdm2/Makefile
+++ b/x11/gdm2/Makefile
@@ -7,6 +7,7 @@
 
 PORTNAME=	gdm2
 PORTVERSION=	2.4.1.4
+PORTREVISION=	1
 CATEGORIES=	x11 gnome
 MASTER_SITES=	${MASTER_SITE_GNOME}
 MASTER_SITE_SUBDIR=		sources/${PORTNAME:S/2$//}/2.4
diff --git a/x11/gdm2/files/patch-ltmain.sh b/x11/gdm2/files/patch-ltmain.sh
new file mode 100644
index 000000000000..8afc42e3986c
--- /dev/null
+++ b/x11/gdm2/files/patch-ltmain.sh
@@ -0,0 +1,51 @@
+--- ltmain.sh.orig	Fri Apr 25 15:18:44 2003
++++ ltmain.sh	Sun May 11 02:27:13 2003
+@@ -1061,7 +1061,7 @@
+ 	  esac
+ 	 elif test "X$arg" = "X-lc_r"; then
+ 	  case $host in
+-	 *-*-openbsd* | *-*-freebsd*)
++	 *-*-openbsd* | *-*-freebsd4*)
+ 	    # Do not include libc_r directly, use -pthread flag.
+ 	    continue
+ 	    ;;
+@@ -1071,8 +1071,16 @@
+ 	continue
+ 	;;
+ 
++      -pthread)
++      compile_command="$compile_command -pthread"
++      finalize_command="$finalize_command -pthread"
++      compiler_flags="$compiler_flags -pthread"
++      continue
++      ;;
++
+       -module)
+ 	module=yes
++	build_old_libs=no
+ 	continue
+ 	;;
+ 
+@@ -2471,6 +2479,9 @@
+ 	  *-*-openbsd* | *-*-freebsd*)
+ 	    # Do not include libc due to us having libc/libc_r.
+ 	    ;;
++	  *-*-freebsd*)
++	    # FreeBSD doesn't need this...
++	    ;;
+ 	  *)
+ 	    # Add libc to deplibs on all other systems if necessary.
+ 	    if test $build_libtool_need_lc = "yes"; then
+@@ -4280,10 +4291,12 @@
+ 	fi
+ 
+ 	# Install the pseudo-library for information purposes.
++	if /usr/bin/false; then
+ 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ 	instname="$dir/$name"i
+ 	$show "$install_prog $instname $destdir/$name"
+ 	$run eval "$install_prog $instname $destdir/$name" || exit $?
++	fi
+ 
+ 	# Maybe install the static library, too.
+ 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-- 
cgit v1.2.3