aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJeremy Messenger <mezz@FreeBSD.org>2005-02-25 00:17:28 +0000
committerJeremy Messenger <mezz@FreeBSD.org>2005-02-25 00:17:28 +0000
commit7df9b2b2b470b4d35404730b1e60f7cf6bbb4327 (patch)
tree0c16f45ccedaa1d5906c3b1a72f0d0a266455672 /lang
parentf7254e2cfb7735d132398eb800f17d82325c3365 (diff)
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/ruby18/Makefile22
-rw-r--r--lang/ruby18/files/extrapatch-eval.c13
2 files changed, 24 insertions, 11 deletions
diff --git a/lang/ruby18/Makefile b/lang/ruby18/Makefile
index bf8e79600436..e50c2d715ab7 100644
--- a/lang/ruby18/Makefile
+++ b/lang/ruby18/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ruby
PORTVERSION= ${RUBY_PORTVERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang ruby ipv6
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= ${MASTER_SITE_SUBDIR_RUBY}
@@ -42,10 +42,13 @@ RUBY_NO_BUILD_DEPENDS= yes
RUBY_NO_RUN_DEPENDS= yes
#USE_AUTOCONF= yes # does not work with 2.13; requires 2.53 or later
+USE_REINPLACE= yes
GNU_CONFIGURE= yes
WRKSRC= ${RUBY_WRKSRC}
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--enable-shared
+CONFIGURE_ENV= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
+ LIBS="${PTHREAD_LIBS}"
.if defined(DEBUG)
CFLAGS+= -g
@@ -58,16 +61,8 @@ MAN1= ${RUBY_NAME}.1
LATEST_LINK= ruby-devel
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502102 && ${ARCH} != "sparc64"
-RUBY_ENABLE_PTHREAD?= public demand
-.endif
-
-.if defined(RUBY_ENABLE_PTHREAD) && ${RUBY_ENABLE_PTHREAD} != "no"
-CONFIGURE_ARGS+= --enable-pthread
-
-# There seems to be a bug in either gcc or libpthread that gets
-# (mini)ruby to malfunction..
-CFLAGS:= ${CFLAGS:N-march=*}
+.if ${OSVERSION} < 502102
+EXTRA_PATCHES= ${PATCHDIR}/extrapatch-eval.c
.endif
.if ${ARCH} == "ia64"
@@ -134,6 +129,11 @@ post-extract:
${MV} ${WRKSRC}/ext/dl/h2rb ${WRKSRC}/bin/
post-patch:
+.if ${OSVERSION} < 502102 || ${ARCH} == "sparc64" || ${ARCH} == "alpha"
+ ${REINPLACE_CMD} -e 's|-lc"|"|g' ${WRKSRC}/configure
+.endif
+ ${REINPLACE_CMD} -e 's|-l$$pthread_lib|${PTHREAD_LIBS}|g' \
+ ${WRKSRC}/configure
${FIND} ${PATCH_WRKSRC} -name '*.orig' -delete
.for d in Win32API
${RM} -rf ${BUILD_WRKSRC}/ext/${d}
diff --git a/lang/ruby18/files/extrapatch-eval.c b/lang/ruby18/files/extrapatch-eval.c
new file mode 100644
index 000000000000..4d9785c75d7f
--- /dev/null
+++ b/lang/ruby18/files/extrapatch-eval.c
@@ -0,0 +1,13 @@
+--- eval.c.orig Wed Feb 23 15:54:03 2005
++++ eval.c Wed Feb 23 15:54:18 2005
+@@ -12,6 +12,10 @@
+
+ **********************************************************************/
+
++#ifdef _THREAD_SAFE
++#undef _THREAD_SAFE
++#endif
++
+ #include "ruby.h"
+ #include "node.h"
+ #include "env.h"