--UugvWAfsgieZRqgk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 30, 2010 at 08:00:19AM +0900, NARUSE, Yui wrote:
> (2010/03/30 6:19), Aaron Patterson wrote:
> > On Tue, Mar 30, 2010 at 06:04:59AM +0900, Michael Graff wrote:
> >> Bug #3051: psych is too osx-specifc
> >> http://redmine.ruby-lang.org/issues/show/3051
> >>
> >> Author: Michael Graff
> >> Status: Open, Priority: Normal
> >> ruby -v: ruby 1.9.2dev (2010-03-26 trunk 27055) [i386-netbsdelf5.0.]
> >>
> >> ext/psych/extconf.rb only looks in Macports' directories for libyaml, =
and will not look in places other OSs may use (such as /usr/pkg for NetBSD.)
> >=20
> > I can't make the extconf look in every directory for every system.  If
> > it can't be found under /opt/local, it will look under system paths.  Do
> > you have a suggestion for a fix?
>=20
> You can give additional search path
>=20
>   ./configure --with-opt-dir=3D/usr/pkg
>=20
> This also applied to /opt/local for macports.
>=20
> So following patch seems correct for bundled psych:
>=20
> diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
> index 673b950..cb74776 100644
> --- a/ext/psych/extconf.rb
> +++ b/ext/psych/extconf.rb
> @@ -2,16 +2,10 @@ require 'mkmf'
>=20
>  # :stopdoc:
>=20
> -RbConfig::MAKEFILE_CONFIG['CC'] =3D ENV['CC'] if ENV['CC']
> -
> -INCLUDEDIR =3D Config::CONFIG['includedir']
> -LIBDIR     =3D Config::CONFIG['libdir']
> -LIB_DIRS   =3D ['/opt/local/lib', '/usr/local/lib', LIBDIR, '/usr/lib']
> -libyaml    =3D dir_config 'libyaml', '/opt/local/include', '/opt/local/l=
ib'
> +dir_config('libyaml')
>=20
>  def asplode missing
> -  abort "#{missing} is missing. Try 'port install libyaml +universal' " +
> -        "or 'yum install libyaml-devel'"
> +  abort "#{missing} is missing. libyaml required."
>  end
>=20
>  asplode('yaml.h')  unless find_header  'yaml.h'
>=20
>=20
> >> Additionally, the message displayed is very OSX specific.
> >=20
> > The error message displays installation instructions to use macports or
> > yum.  Again, I don't know every packaging system for every operating
> > system.  Should I make the message more generic, and in my opinion less
> > helpful?
>=20
> Other bundled libraries doesn't show such specific message.
> So psych should follow them.

Sounds fine.  I've made these changes.

--=20
Aaron Patterson
http://tenderlovemaking.com/

--UugvWAfsgieZRqgk
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iQEcBAEBAgAGBQJLsT70AAoJEJUxcLy0/6/GxyEH/At5D6jME+zJzNzPVV8KEQMq
LVIyDIX2S5vslKHoP1uaV9BXNVTO+Ds+tRupsGZhuYk+O/v33cKuYa3wKIpHVBsG
Mm6VzprqT8QBz3tI6Xf9EfyTlimb0vXfo8bRkUc+P6i92KqyZU2DShkjm+046Eui
VBxKOUo8AIWFQBTJ+HJfa1GTMF5xSr6W7lZw+umFhSeYCIcJT1jZM/fI9vXfWhDa
KagQUij7k/y6nCMVmrV5eOeG5AywK+vFTob4sIU+u4zUC6y8B7YoJgM25FWc0YCR
wT5QQ7OYdE9458uCHwyR1SawJc8TkvxJoAqL8Rj1PwIweZIp0UYxmjlScnM+lJM=
=AsI2
-----END PGP SIGNATURE-----

--UugvWAfsgieZRqgk--

On Tue, Mar 30, 2010 at 08:00:19AM +0900, NARUSE, Yui wrote:
> (2010/03/30 6:19), Aaron Patterson wrote:
> > On Tue, Mar 30, 2010 at 06:04:59AM +0900, Michael Graff wrote:
> >> Bug #3051: psych is too osx-specifc
> >> http://redmine.ruby-lang.org/issues/show/3051
> >>
> >> Author: Michael Graff
> >> Status: Open, Priority: Normal
> >> ruby -v: ruby 1.9.2dev (2010-03-26 trunk 27055) [i386-netbsdelf5.0.]
> >>
> >> ext/psych/extconf.rb only looks in Macports' directories for libyaml, =
and will not look in places other OSs may use (such as /usr/pkg for NetBSD.)
> >=20
> > I can't make the extconf look in every directory for every system.  If
> > it can't be found under /opt/local, it will look under system paths.  Do
> > you have a suggestion for a fix?
>=20
> You can give additional search path
>=20
>   ./configure --with-opt-dir=3D/usr/pkg
>=20
> This also applied to /opt/local for macports.
>=20
> So following patch seems correct for bundled psych:
>=20
> diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
> index 673b950..cb74776 100644
> --- a/ext/psych/extconf.rb
> +++ b/ext/psych/extconf.rb
> @@ -2,16 +2,10 @@ require 'mkmf'
>=20
>  # :stopdoc:
>=20
> -RbConfig::MAKEFILE_CONFIG['CC'] =3D ENV['CC'] if ENV['CC']
> -
> -INCLUDEDIR =3D Config::CONFIG['includedir']
> -LIBDIR     =3D Config::CONFIG['libdir']
> -LIB_DIRS   =3D ['/opt/local/lib', '/usr/local/lib', LIBDIR, '/usr/lib']
> -libyaml    =3D dir_config 'libyaml', '/opt/local/include', '/opt/local/l=
ib'
> +dir_config('libyaml')
>=20
>  def asplode missing
> -  abort "#{missing} is missing. Try 'port install libyaml +universal' " +
> -        "or 'yum install libyaml-devel'"
> +  abort "#{missing} is missing. libyaml required."
>  end
>=20
>  asplode('yaml.h')  unless find_header  'yaml.h'
>=20
>=20
> >> Additionally, the message displayed is very OSX specific.
> >=20
> > The error message displays installation instructions to use macports or
> > yum.  Again, I don't know every packaging system for every operating
> > system.  Should I make the message more generic, and in my opinion less
> > helpful?
>=20
> Other bundled libraries doesn't show such specific message.
> So psych should follow them.

Sounds fine.  I've made these changes.

--=20
Aaron Patterson
http://tenderlovemaking.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)

iQEcBAEBAgAGBQJLsT70AAoJEJUxcLy0/6/GxyEH/At5D6jME+zJzNzPVV8KEQMq
LVIyDIX2S5vslKHoP1uaV9BXNVTO+Ds+tRupsGZhuYk+O/v33cKuYa3wKIpHVBsG
Mm6VzprqT8QBz3tI6Xf9EfyTlimb0vXfo8bRkUc+P6i92KqyZU2DShkjm+046Eui
VBxKOUo8AIWFQBTJ+HJfa1GTMF5xSr6W7lZw+umFhSeYCIcJT1jZM/fI9vXfWhDa
KagQUij7k/y6nCMVmrV5eOeG5AywK+vFTob4sIU+u4zUC6y8B7YoJgM25FWc0YCR
wT5QQ7OYdE9458uCHwyR1SawJc8TkvxJoAqL8Rj1PwIweZIp0UYxmjlScnM+lJM=
=AsI2
-----END PGP SIGNATURE-----