On 01/14 10:12, Vadim Zhukov wrote: > 14.01.2014 6:46 ???????????????????????? "Jeremy Evans" <jer...@openbsd.org> > ??????????????: > > -# All ruby C extensions are dependent on libc and ruby's library, and > almost > > -# all are also dependment on libm, so include c, m, and ruby's library by > > -# default, but let the port maintainer opt out of libm by setting > > -# MODRUBY_WANTLIB_m=No. > > -WANTLIB+= c ${MODRUBY_WANTLIB} > > -MODRUBY_WANTLIB_m?= Yes > > -. if ${MODRUBY_WANTLIB_m:L:Myes} > > -WANTLIB+= m > > -. endif > > -. if ${MODRUBY_REV} == 1.9 > > + > > +# Add appropriate libraries to WANTLIB depending on ruby version and > > +# implementation > > +WANTLIB+= c m ${MODRUBY_WANTLIB} > > This is bad. It's MODRUBY_WANTLIB that should contain all libraries, and > WANTLIB line should be just: > > WANTLIB+=${MODRUBY_WANTLIB} > > This way subpackages could be handled gracefully, if needed. This is how > other port modules work, and diverging is not a good idea here.
This is only done for ruby gem ext ports, none of which have subpackages (or will have subpackages in the future). But for consistency with other port modules, would you prefer the following diff for ruby.port.mk? Thanks, Jeremy Index: lang/ruby/ruby.port.mk =================================================================== RCS file: /cvs/ports/lang/ruby/ruby.port.mk,v retrieving revision 1.71 diff -u -p -r1.71 ruby.port.mk --- lang/ruby/ruby.port.mk 14 Jan 2014 00:59:07 -0000 1.71 +++ lang/ruby/ruby.port.mk 14 Jan 2014 15:41:56 -0000 @@ -276,18 +276,17 @@ MODRUBY_pre-configure += ${MODRUBY_ADJ_R ERRORS+= "Fatal: Should not have PKG_ARCH=* when compiling extensions" . endif SHARED_ONLY= Yes -# All ruby C extensions are dependent on libc and ruby's library, and almost -# all are also dependment on libm, so include c, m, and ruby's library by -# default, but let the port maintainer opt out of libm by setting -# MODRUBY_WANTLIB_m=No. -WANTLIB+= c ${MODRUBY_WANTLIB} -MODRUBY_WANTLIB_m?= Yes -. if ${MODRUBY_WANTLIB_m:L:Myes} -WANTLIB+= m + +# Add appropriate libraries to WANTLIB depending on ruby version and +# implementation +MODRUBY_WANTLIB+= c m +. if ${MODRUBY_REV} != 1.8 +MODRUBY_WANTLIB+= pthread . endif -. if ${MODRUBY_REV} == 1.9 -WANTLIB+= pthread +. if ${MODRUBY_REV} == 2.1 +MODRUBY_WANTLIB+= gmp . endif +WANTLIB+= ${MODRUBY_WANTLIB} LIB_DEPENDS+= ${MODRUBY_LIB_DEPENDS} .endif