Subject: pkg/21806: pkgsrc/x11/gtk2 doesn't build on FreeBSD + fix
To: None <gnats-bugs@gnats.netbsd.org>
From: None <juan@xtraeme.unixbsd.org>
List: netbsd-bugs
Date: 06/05/2003 21:40:57
>Number:         21806
>Category:       pkg
>Synopsis:       pkgsrc/x11/gtk2 doesn't build on FreeBSD + fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 05 19:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Juan RP
>Release:        NetBSD 1.6T
>Organization:
Juan RP		jrp@hispabsd.org
--
>Environment:
System: NetBSD Nocturno 1.6T NetBSD 1.6T (Nocturno) #8: Thu May 29 15:13:29 CEST 2003 juan@Nocturno:/home/juan/current/obj/sys/arch/i386/compile/Nocturno i386
Architecture: i386
Machine: i386
>Description:

gtk2 cannot be build, because -pthread is not enough to compile
with threads support, you need add -lc_r. I fixed this add it to
LDFLAGS using an OPSYS variable.

>How-To-Repeat:
>Fix:


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/gtk2/Makefile,v
retrieving revision 1.27
diff -b -u -r1.27 Makefile
--- Makefile	2003/06/02 01:15:43	1.27
+++ Makefile	2003/06/05 19:33:08
@@ -49,6 +49,12 @@
 post-install:
 	${INSTALL_DATA_DIR} ${PREFIX}/lib/gtk-2.0/modules
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "FreeBSD"
+LDFLAGS+= -lc_r
+.endif
+
 .include "../../devel/atk/buildlink2.mk"
 .include "../../devel/gettext-lib/buildlink2.mk"
 .include "../../devel/glib2/buildlink2.mk"
>Release-Note:
>Audit-Trail:
>Unformatted: