diff options
-rw-r--r-- | devel/linuxthreads/Makefile | 40 | ||||
-rw-r--r-- | devel/linuxthreads/files/Makefile.libgcc_r | 8 | ||||
-rw-r--r-- | devel/linuxthreads/files/patch-aa | 14 | ||||
-rw-r--r-- | devel/linuxthreads/pkg-plist | 20 |
4 files changed, 56 insertions, 26 deletions
diff --git a/devel/linuxthreads/Makefile b/devel/linuxthreads/Makefile index 6b202dfe88f9..01536d536d71 100644 --- a/devel/linuxthreads/Makefile +++ b/devel/linuxthreads/Makefile @@ -7,7 +7,7 @@ PORTNAME= linuxthreads PORTVERSION= 2.2.3 -PORTREVISION= 22 +PORTREVISION= 23 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITE_SUBDIR= glibc @@ -25,9 +25,12 @@ USE_PERL5_BUILD=true # This port only works on i386 right now. ONLY_FOR_ARCHS= i386 -.if ${OSVERSION} >= 500035 -USING_GCC3=true -MAKE_ENV+= USING_GCC3=true +.if ${OSVERSION} >= 700042 +USING_GCC4= true +MAKE_ENV+= USING_GCC4=true +.elif ${OSVERSION} >= 500035 +USING_GCC3= true +MAKE_ENV+= USING_GCC3=true .endif .if defined(LINUXTHREADS_INSTALL_LIBLTHREAD_PIC_ARCHIVE) MAKE_ENV+= INSTALL_LIBLTHREAD_PIC_ARCHIVE=yes @@ -120,7 +123,7 @@ pre-fetch: ${ECHO_MSG} ">>Please install FreeBSD source code in /usr/src"; \ ${FALSE}; \ fi -.if defined(USING_GCC3) +.if defined(USING_GCC3) || defined(USING_GCC4) @if ${TEST} -f /usr/src/gnu/lib/libstdc++/Makefile; then \ : ; \ else \ @@ -156,12 +159,13 @@ post-extract: @${TEST} -f ${WRKSRC}/libgcc_r/Makefile || \ ${LN} -s ${FILESDIR}/Makefile.libgcc_r ${WRKSRC}/libgcc_r/Makefile @${SED} -e 's/^LIB=[ ]*gcc$$/LIB= lgcc_r/;' \ + -e 's/^SHLIB_NAME=[ ]*libgcc_s\.so\./SHLIB_NAME= liblgcc_s.so./' \ -e 's=$${.CURDIR}=/usr/src/gnu/lib/libgcc=g' \ /usr/src/gnu/lib/libgcc/Makefile \ > ${WRKSRC}/libgcc_r/Makefile.inc.tmp && \ ${MV} ${WRKSRC}/libgcc_r/Makefile.inc.tmp \ ${WRKSRC}/libgcc_r/Makefile.inc -.if defined(USING_GCC3) +.if defined(USING_GCC3) || defined(USING_GCC4) @${MKDIR} ${WRKSRC}/libstdc++ @${TEST} -f ${WRKSRC}/libstdc++/Makefile || \ ${LN} -s ${FILESDIR}/Makefile.libstdc++ ${WRKSRC}/libstdc++/Makefile @@ -201,7 +205,7 @@ post-patch: pre-build: @cd ${WRKSRC}/libgcc_r ; \ ${SETENV} ${MAKE_ENV} ${MAKE} -.if defined(USING_GCC3) +.if defined(USING_GCC3) || defined(USING_GCC4) cd ${WRKSRC}/libstdc++ ; \ ${SETENV} ${MAKE_ENV} ${MAKE} @cd ${WRKSRC}/libsupc++ ; \ @@ -212,7 +216,7 @@ pre-su-install: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 ${PREFIX}/lib @cd ${WRKSRC}/libgcc_r ; \ ${SETENV} ${MAKE_ENV} ${MAKE} install -.if defined(USING_GCC3) +.if defined(USING_GCC3) || defined(USING_GCC4) @cd ${WRKSRC}/libstdc++ ; \ ${SETENV} ${MAKE_ENV} ${MAKE} install @cd ${WRKSRC}/libsupc++ ; \ @@ -251,22 +255,34 @@ PLIST_SUB+= LIBLTHREADPICARCHIVE:="" .else PLIST_SUB+= LIBLTHREADPICARCHIVE:="@comment " .endif -.if defined(USING_GCC3) -PLIST_SUB+= GCC3ONLY:="" +.if defined(USING_GCC4) +PLIST_SUB+= GCC3OR4ONLY:="" +PLIST_SUB+= GCC4ONLY:="" +.if defined(LINUXTHREADS_WRAP_API) +PLIST_SUB+= LTHREADSHMAJOR:="7" +.else +PLIST_SUB+= LTHREADSHMAJOR:="6" +.endif +.elif defined(USING_GCC3) +PLIST_SUB+= GCC3OR4ONLY:="" +PLIST_SUB+= GCC4ONLY:="@comment " .if defined(LINUXTHREADS_WRAP_API) PLIST_SUB+= LTHREADSHMAJOR:="5" .else PLIST_SUB+= LTHREADSHMAJOR:="3" .endif .else -PLIST_SUB+= GCC3ONLY:="@comment " +PLIST_SUB+= GCC3OR4ONLY:="@comment " +PLIST_SUB+= GCC4ONLY:="@comment " .if defined(LINUXTHREADS_WRAP_API) PLIST_SUB+= LTHREADSHMAJOR:="4" .else PLIST_SUB+= LTHREADSHMAJOR:="2" .endif .endif -.if ${OSVERSION} >= 600033 +.if ${OSVERSION} >= 700042 +PLIST_SUB+= LIBSTDCPPMAJOR:="6" +.elif ${OSVERSION} >= 600033 PLIST_SUB+= LIBSTDCPPMAJOR:="5" .else PLIST_SUB+= LIBSTDCPPMAJOR:="4" diff --git a/devel/linuxthreads/files/Makefile.libgcc_r b/devel/linuxthreads/files/Makefile.libgcc_r index 19bafdd4cb46..d6ec9cd3c9a9 100644 --- a/devel/linuxthreads/files/Makefile.libgcc_r +++ b/devel/linuxthreads/files/Makefile.libgcc_r @@ -1,9 +1,13 @@ -# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libgcc_r,v 1.5 2003-06-09 00:25:04 tegge Exp $ +# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libgcc_r,v 1.6 2007-07-03 08:38:00 pav Exp $ PREFIX?= ${DESTDIR}/usr/local LIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib +SHLIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib +.if defined(USING_GCC4) +INSTALL_PIC_ARCHIVE=yes +.endif -CFLAGS+=-D_PTHREADS -I../ +CFLAGS+=-D_PTHREADS -I../ -D__USE_UNIX98 CFLAGS+=-I../sysdeps/i386 -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux CXXFLAGS= ${CXXINCLUDES} ${CFLAGS:C/-std=[a-z:0-9]+//} diff --git a/devel/linuxthreads/files/patch-aa b/devel/linuxthreads/files/patch-aa index 38e9402ebbf2..b6c0af1834c8 100644 --- a/devel/linuxthreads/files/patch-aa +++ b/devel/linuxthreads/files/patch-aa @@ -13,18 +13,22 @@ diff -ru ../../work/linuxthreads-2.2.3/Examples/Makefile ./Examples/Makefile diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile --- ../../work/linuxthreads-2.2.3/Makefile Wed Apr 25 21:50:59 2001 +++ ./Makefile Thu Jun 7 23:13:52 2001 -@@ -1,128 +1,143 @@ +@@ -1,128 +1,149 @@ -# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. -# This file is part of the GNU C Library. +LIB=lthread +.if defined(LINUXTHREADS_WRAP_API) -+.if defined(USING_GCC3) ++.if defined(USING_GCC4) ++SHLIB_MAJOR= 7 ++.elif defined(USING_GCC3) +SHLIB_MAJOR= 5 +.else +SHLIB_MAJOR= 4 +.endif +.else -+.if defined(USING_GCC3) ++.if defined(USING_GCC4) ++SHLIB_MAJOR= 6 ++.elif defined(USING_GCC3) +SHLIB_MAJOR= 3 +.else +SHLIB_MAJOR= 2 @@ -98,7 +102,9 @@ diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile + specific.c spinlock.c uthread_file.c wraputhread.c wrapsyscall.c \ + barrier.c localtime.c getlogin.c telldir.c ttyname.c strptime.c + -+.if defined(USING_GCC3) ++.if defined(USING_GCC4) ++SOBJS += libgcc_r/unwind-sjlj.o libgcc_r/unwind-dw2.o libgcc_r/unwind-dw2-fde-glibc.o ++.elif defined(USING_GCC3) +SOBJS += libgcc_r/unwind-sjlj.o libgcc_r/unwind-dw2.o libgcc_r/unwind-dw2-fde.o +.else +SOBJS += libgcc_r/frame.o libgcc_r/_eh.o diff --git a/devel/linuxthreads/pkg-plist b/devel/linuxthreads/pkg-plist index 62ef67876ee8..aaed48a8cd0a 100644 --- a/devel/linuxthreads/pkg-plist +++ b/devel/linuxthreads/pkg-plist @@ -4,16 +4,20 @@ lib/liblthread.a %%PIC:%%lib/liblthread.so %%PIC:%%lib/liblthread.so.%%LTHREADSHMAJOR:%% lib/liblgcc_r.a +%%GCC4ONLY:%%lib/liblgcc_r_eh.a +%%GCC4ONLY:%%lib/liblgcc_r_eh_p.a %%PROFILE:%%lib/liblgcc_r_p.a +%%GCC4ONLY:%%lib/liblgcc_s.so +%%GCC4ONLY:%%lib/liblgcc_s.so.1 %%LIBLGCC_R_PICARCHIVE:%%lib/liblgcc_r_pic.a -%%GCC3ONLY:%%lib/liblstdc++.a -%%GCC3ONLY:%%%%PROFILE:%%lib/liblstdc++_p.a -%%GCC3ONLY:%%%%PICARCHIVE:%%lib/liblstdc++_pic.a -%%GCC3ONLY:%%%%PIC:%%lib/liblstdc++.so -%%GCC3ONLY:%%%%PIC:%%lib/liblstdc++.so.%%LIBSTDCPPMAJOR:%% -%%GCC3ONLY:%%lib/liblsupc++.a -%%GCC3ONLY:%%%%PROFILE:%%lib/liblsupc++_p.a -%%GCC3ONLY:%%%%PICARCHIVE:%%lib/liblsupc++_pic.a +%%GCC3OR4ONLY:%%lib/liblstdc++.a +%%GCC3OR4ONLY:%%%%PROFILE:%%lib/liblstdc++_p.a +%%GCC3OR4ONLY:%%%%PICARCHIVE:%%lib/liblstdc++_pic.a +%%GCC3OR4ONLY:%%%%PIC:%%lib/liblstdc++.so +%%GCC3OR4ONLY:%%%%PIC:%%lib/liblstdc++.so.%%LIBSTDCPPMAJOR:%% +%%GCC3OR4ONLY:%%lib/liblsupc++.a +%%GCC3OR4ONLY:%%%%PROFILE:%%lib/liblsupc++_p.a +%%GCC3OR4ONLY:%%%%PICARCHIVE:%%lib/liblsupc++_pic.a include/pthread/linuxthreads/pthread.h include/pthread/linuxthreads/semaphore.h include/pthread/linuxthreads/pt-machine.h |