summaryrefslogtreecommitdiff
path: root/lang/ruby18
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/ruby18
parentAdd a mirror (diff)
Disable threads again; it has caused the more troubles. This time, it has
${PTHREAD_CFLAGS} and ${PTHREAD_LIBS} include in the build to kill the headache of old '_r' and can't run with something like ruby-opengl, ruby-sdl, ruby-gtk2 and etc on FreeBSD 4.x or older 5.x. With this commit should solve those issues. It is recommend you to rebuild any apps that depend on lang/ruby18, so see the UPDATING for detail. Remove the 'BROKEN' on the other ports that knu has added them few weeks ago. Some of them have been tested, so if one of them is still broke then please let us know and one of us will re-add the 'BROKEN'. This changes was worked by lofi and me. lofi did everything on FreeBSD 4.x and I did others. lofi, thanks for help! Tested by: many people Tested on: i386 (FreeBSD 4.x, 5.x and 6.x), amd64 (FreeBSD 5.x and 6.x), and sparc64 (FreeBSD 5.x and 6.x) Not test on: ia64 and alpha Approved by: portmgr (kris)
Notes
Notes: svn path=/head/; revision=129708
Diffstat (limited to 'lang/ruby18')
-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"