Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Feb 2013 04:01:57 +0000
From:      Steve Wills <steve@mouf.net>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        ruby@freebsd.org
Subject:   Re: ruby-1.9.pc; strange/harmful entry
Message-ID:  <51186D35.8080207@mouf.net>
In-Reply-To: <5118488D.3080706@FreeBSD.org>
References:  <510FD6A0.2010303@FreeBSD.org> <5117FB5E.1000502@mouf.net> <51181185.1080802@FreeBSD.org> <5118488D.3080706@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050806010400040604050004
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 02/11/13 01:25, Steve Wills wrote:
> On 02/10/13 21:30, Andriy Gapon wrote:
>> on 10/02/2013 21:56 Steve Wills said the following:
>>> On 02/04/13 15:41, Andriy Gapon wrote:
>>>> $ pkgconf --libs ruby-1.9
>>>> -Wl,-soname,(.TARGET) -Wl,-R -Wl,/usr/local/lib -lruby19 -lexecinfo -lpthread
>>>> -lcrypt -lm -L/usr/local/lib  -Wl,-rpath=/usr/local/lib -pthread
>>>>
>>>> I am not sure if '(.TARGET)' is supposed to be expanded.  But I think that
>>>> -Wl,-soname should really have no place in pkgconf data.
>>>> As it is now, the entry causes confusion (e.g. for a shell) when the above line is
>>>> included verbatim into some compilation/link command like.
>>>>
>>>
>>> I suspect this could be bmake related. What version of FreeBSD are you
>>> using?
>>
>> This is recent-ish head (r244281).
>>
> 
> Actually, this isn't bmake related at all, I'll try to come up with a
> solution. Thanks for the report. If you have time, a PR would be handy,
> just in case I forget.

Replying to myself, but...

The more I look at it, the more I think this may be a bug in Ruby or
configure. the file is generated by config.status like so:

./config.status --file=ruby-1.9.pc:./template/ruby.pc.in

Try the attached patch, also available here:

http://meatwad.mouf.net/~swills/ruby_pc.diff.txt

It builds, but otherwise it's untested. Should be harmless. Let me know
if this fixes it for you and I'll get added on the next update to the port.

Steve


--------------050806010400040604050004
Content-Type: text/plain; charset=us-ascii;
 name="ruby_pc.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ruby_pc.diff.txt"

Index: Makefile
===================================================================
--- Makefile	(revision 311047)
+++ Makefile	(working copy)
@@ -142,6 +142,7 @@
 # Hack to allow modules to be installed into separate PREFIX and/or under user
 # privilegies
 #
+	@${REINPLACE_CMD} -e 's! -Wl,-soname,\$$(.TARGET)!!' ${WRKSRC}/ruby-1.9.pc
 	@${RB_SET_CONF_VAR} "prefix" "ENV['PREFIX'] || \3"
 	@${RB_SET_CONF_VAR} "INSTALL" "ENV['RB_USER_INSTALL'] ? '/usr/bin/install -c' : '/usr/bin/install -c ${_BINOWNGRP}'"
 	@${RB_SET_CONF_VAR} "INSTALL_PROGRAM" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}' : '${INSTALL_PROGRAM}'"

--------------050806010400040604050004--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51186D35.8080207>