Here's a new version of this port. Since nobody thinks we should use -lpthread to get a version that works on ruby 1.8, this defaults to building a ruby 1.9 version if no FLAVOR is given (use the empty FLAVOR for a ruby 1.8 version). ruby 1.9 requires pthread to work and so there are no issues if a ruby 1.9 extension requires pthread.
I previously had this building with -lpthread on ruby 1.8 and without -lpthread on 1.9, with conflict markers added in PFRAG-* since a lot of files are installed to the same location. I've removed the -lpthread code, but left the conflict markers in. If there is an objection to allowing a ruby 1.8 version to be built, even if it is not built by default, since it would require LD_PRELOAD to run, I can remove the PFRAG-* files and make it always use ruby 1.9. This requires the attached patch to ruby.port.mk. MODRUBY_HANDLE_FLAVORS can be defined to enable the special FLAVOR handling even for non gem and extconf ports (which ruby-qt4 is). MODRUBY_INCLUDE is the location of the ruby headers for that ruby version, and MODRUBY_SOFILE is the path to the ruby .so file (ugly, but required by ruby-qt4). Tested on amd64. Similar version tested on i386. Looking for OKs. Jeremy Index: ruby.port.mk =================================================================== RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v retrieving revision 1.43 diff -u -p -r1.43 ruby.port.mk --- ruby.port.mk 18 Mar 2011 23:04:22 -0000 1.43 +++ ruby.port.mk 20 Mar 2011 22:57:59 -0000 @@ -11,7 +11,8 @@ CATEGORIES+= lang/ruby # version. For example, JDBC gem ports want to set MODRUBY_REV=jruby, # since they don't work on ruby 1.8 or ruby 1.9. .if !defined(MODRUBY_REV) -. if ${CONFIGURE_STYLE:L:Mgem} || ${CONFIGURE_STYLE:L:Mextconf} +. if ${CONFIGURE_STYLE:L:Mgem} || ${CONFIGURE_STYLE:L:Mextconf} \ + || defined(MODRUBY_HANDLE_FLAVORS) . if !defined(FLAVORS) FLAVORS?= ruby19 rbx jruby . endif @@ -83,6 +84,8 @@ MODRUBY_BINREV= 18 MODRUBY_PKG_PREFIX= ruby MODRUBY_FLAVOR = GEM_MAN_SUFFIX = +MODRUBY_INCLUDE = ${LOCALBASE}/lib/ruby/${MODRUBY_LIBREV}/${MODRUBY_ARCH} +MODRUBY_SOFILE = ${LOCALBASE}/lib/libruby${MODRUBY_BINREV}.so.0.0 .elif ${MODRUBY_REV} == 1.9 MODRUBY_LIBREV= 1.9.1 MODRUBY_BINREV= 19 @@ -90,6 +93,8 @@ MODRUBY_FLAVOR = ruby19 GEM_BIN_SUFFIX= 19 # Have the ruby 1.9 manpage match the binary name. GEM_MAN_SUFFIX = ${GEM_BIN_SUFFIX} +MODRUBY_INCLUDE = ${LOCALBASE}/include/ruby-${MODRUBY_LIBREV} +MODRUBY_SOFILE = ${LOCALBASE}/lib/libruby${MODRUBY_BINREV}.so.0.0 .elif ${MODRUBY_REV} == jruby MODRUBY_LIBREV= 1.8
ruby-qt4.tar.gz
Description: application/tar-gz