Date: Sat, 5 Feb 2005 17:28:52 +0100 From: Michael Nottebrock <michaelnottebrock@gmx.net> To: "Jeremy Messenger" <mezz7@cox.net> Cc: ports-committers@freebsd.org Subject: Re: cvs commit: ports/Mk bsd.ruby.mk ports/lang Makefile ports UPDATING ports/lang/ruby18 Makefile pkg-plist ports/lang/ruby18_r Makefile ports/lang/ruby16 Makefile pkg-plist ports/lang/ruby16_r Makefile ports/devel/ruby-gnustep Makefile ... Message-ID: <200502051728.56341.michaelnottebrock@gmx.net> In-Reply-To: <opslpoept99aq2h7@mezz.mezzweb.com> References: <200502050459.j154xROQ094820@repoman.freebsd.org> <opslpoept99aq2h7@mezz.mezzweb.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1525737.2JVur8Z9uz Content-Type: multipart/mixed; boundary="Boundary-01=_FRPBCf8fw/sJ0Ty" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_FRPBCf8fw/sJ0Ty Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday, 5. February 2005 07:31, Jeremy Messenger wrote: > > Good news is that the pthread support of lang/ruby18 is now enabled by > > default for newer systems, which means the ruby interpreter is linked > > with libpthread. This will allow threaded extension libraries to run > > and work properly on those systems. > > Thanks! But there is a very simple problem is that it uses '-lpthread', > which it should be '-pthread' (${PTHREAD_LIBS}). Ruby's configure check to determine the pthread library/flags to use reliab= ly=20 ends up doing the wrong thing on every version of FreeBSD (except obsolete= =20 5-CURRENT). Please consider this patch, it circumvents ruby's pthread-stuff in configur= e=20 (it essentially does the same thing however, just with the correct librarie= s=20 & flags). This additionally makes thread support available on every version= =20 of FreeBSD that has threads, including 5.2.1-Release and 4.x. =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --Boundary-01=_FRPBCf8fw/sJ0Ty Content-Type: text/plain; charset="iso-8859-1"; name="ruby18.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="ruby18.diff" Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/pcvs/ports/lang/ruby18/Makefile,v retrieving revision 1.83 diff -u -r1.83 Makefile =2D-- Makefile 5 Feb 2005 04:59:24 -0000 1.83 +++ Makefile 5 Feb 2005 16:25:21 -0000 @@ -7,7 +7,7 @@ =20 PORTNAME=3D ruby PORTVERSION=3D ${RUBY_PORTVERSION} =2DPORTREVISION=3D 2 +PORTREVISION=3D 3 CATEGORIES=3D lang ruby ipv6 MASTER_SITES=3D ${MASTER_SITE_RUBY} MASTER_SITE_SUBDIR=3D ${MASTER_SITE_SUBDIR_RUBY} @@ -58,12 +58,10 @@ LATEST_LINK=3D ruby-devel =20 .include <bsd.port.pre.mk> =2D.if ${OSVERSION} >=3D 502102 RUBY_ENABLE_PTHREAD?=3D public demand =2D.endif =20 .if defined(RUBY_ENABLE_PTHREAD) && ${RUBY_ENABLE_PTHREAD} !=3D "no" =2DCONFIGURE_ARGS+=3D --enable-pthread +CONFIGURE_ENV+=3D CFLAGS=3D"${CFLAGS} ${PTHREAD_CFLAGS}" LDFLAGS=3D"${LDFL= AGS} ${PTHREAD_LIBS}" =20 # There seems to be a bug in either gcc or libpthread that gets # (mini)ruby to malfunction.. @@ -150,6 +148,9 @@ .endif ${TOUCH} ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} =20 +post-configure: + ${ECHO_CMD} -e "#define _REENTRANT 1\n#define _THREAD_SAFE 1\n#define HAV= E_LIBPTHREAD 1" >> ${WRKSRC}/config.h + post-install: .if defined(STRIP) && ${STRIP} =3D=3D -s ${STRIP_CMD} ${RUBY} --Boundary-01=_FRPBCf8fw/sJ0Ty-- --nextPart1525737.2JVur8Z9uz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCBPRIXhc68WspdLARAiz3AJ9f5hg04R3dAoYvw8L+X0TRjhAwTACbBNl4 q/NvklIufQjAfQB40/8iycg= =E4I+ -----END PGP SIGNATURE----- --nextPart1525737.2JVur8Z9uz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502051728.56341.michaelnottebrock>