freebsd-ports/devel/linuxthreads/Makefile
Tor Egge d48c47551a Handle internal race that caused pthread_cond_timedwait() to block
waiting for a signal that wasn't sent.
2001-09-13 16:01:44 +00:00

84 lines
2.1 KiB
Makefile

# New ports collection makefile for: linuxthreads
# Date created: 14 Jan 1999
# Whom: Richard Seaman, Jr. <dick@tar.com>
#
# $FreeBSD$
#
PORTNAME= linuxthreads
PORTVERSION= 2.2.3
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= glibc
DISTNAME= glibc-linuxthreads-${PORTVERSION}
MAINTAINER= tegge@freebsd.org
.include <bsd.port.pre.mk>
# This port only works on i386 right now.
ONLY_FOR_ARCHS= i386
.if ${OSVERSION} < 400015
BROKEN="Requires FreeBSD 4.0 or newer"
.endif
threads_files := README.FreeBSD clone.S clone.h freebsd-compat.h getgr_r.c \
gethostby_r.c getnetby_r.c getprotoby_r.c getpw_r.c getservby_r.c \
lclone.c libc_calls.c libc_thread.c sched.c uthread_file.c \
wraputhread.c localtime.c
WRKSRC= ${WRKDIR}/${PKGNAME}
SRC_BASE= /usr/src
LIBSRC_BASE= ${SRC_BASE}/lib
.if !defined(WITH_CONDWAIT_PATCH)
pre-fetch:
@${ECHO}
@${ECHO} You can use an experimental patch to reduce the number of
@${ECHO} condition variable triggered context switches by defining
@${ECHO} WITH_CONDWAIT_PATCH
.endif
post-extract:
@mv ${WRKDIR}/linuxthreads ${WRKSRC}
@mv ${WRKDIR}/linuxthreads_db ${WRKSRC}
.for src in lockfile.c no-tsd.c oldsemaphore.c weaks.c \
sysdeps/pthread/semaphore.h
@mv ${WRKSRC}/$(src) ${WRKSRC}/$(src).unused
.endfor
@cd ${FILESDIR} ; \
${CP} -p ${threads_files} ${WRKSRC}/.
@${MKDIR} -p ${WRKSRC}/libgcc_r
@test -f ${WRKSRC}/libgcc_r/Makefile || \
${LN} -s ${FILESDIR}/Makefile.libgcc_r ${WRKSRC}/libgcc_r/Makefile
.if defined(WITH_CONDWAIT_PATCH)
post-patch:
@${ECHO_MSG} "===> Applying experimental patch condwait-patch"
@if ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/condwait-patch; then \
${ECHO_MSG} "===> Patch condwait-patch applied successfully"; \
else \
${ECHO_MSG} ">>Patch condwait-patch failed to apply cleanly"; \
false ; \
fi
.endif
pre-build:
@cd ${WRKSRC}/libgcc_r ; \
${MAKE}
pre-install:
@cd ${WRKSRC}/libgcc_r ; \
${MAKE} install
post-install:
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m /usr/lib
${CAT} ${PKGMESSAGE}
# @sh ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>