ruby18-10.6 stable port information

Package: ruby18
Version: 1.8.7-p174
Revision: 201
Description: Interpreted, object-oriented language
License: GPL
Homepage: http://www.ruby-lang.org/
Maintainer: Benjamin Reed
# Earlier version by Michal Suchanek

Distribution: 10.6

# Dependencies.
Depends: %N-shlibs (= %v-%r), gdbm3-shlibs, libiconv, libncurses5-shlibs (>= 5.4-20041023-1006), readline5-shlibs (>= 5.0-1004)
BuildDepends: autoconf, bison, fink (>= 0.24.12), gdbm3, libncurses5 (>= 5.4-20041023-1006), libiconv-dev, readline5 (>= 5.0-1004), system-openssl-dev, texinfo (>= 4.1-3)
Conflicts: %N-ssl (<< 1.8.3-4)
Replaces: %N-ssl (<< 1.8.3-4)

# Unpack Phase.
Source: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-%v.tar.bz2
Source-MD5: 88c45aaf627b4404e5e4273cb03ba2ee
Source2: http://rubyidentity.org/ruby-logo-kit.zip
Source2-MD5: c80f11569f8a841d4bb2ff5fd8a8ff95
SourceDirectory: ruby-%v

# Patch Phase.
PatchFile: %n-1.8.7.patch
PatchFile-MD5: d120d5f6bf2242ff21fc6feea627a9f1
PatchScript: <<
#!/bin/sh -ex
sed 's|@PREFIX@|%p|g' < %{PatchFile} > ruby18.patch
patch -p1 < ruby18.patch
rm -r ruby18.patch ext/tk
#mv ext/etc ext/0etc
<<

# Compile Phase.
SetCPPFLAGS: -I%p/lib/system-openssl/include
SetCFLAGS: -g -Os -fno-schedule-insns2
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --program-suffix=1.8 --mandir='${prefix}/share/man' --enable-shared --with-default-kcode=none --with-dbm-type=gdbm_compat --with-bundled-md5 --with-bundled-rmd160 --with-bundled-sha1
CompileScript: <<
#!/bin/sh -ex
autoconf
./configure %c
make
make test
<<

# Install Phase.
InstallScript: <<
make -j1 install DESTDIR=%d #MINIRUBY="DYLD_LIBRARY_PATH=. ./ruby1.8 -I."
make -j1 install-doc DESTDIR=%d #MINIRUBY="DYLD_LIBRARY_PATH=. ./ruby1.8 -I."
ln -s erb1.8 %i/bin/erb
ln -s irb1.8 %i/bin/irb
ln -s libruby-static.a %i/lib/libruby.a
ln -s rdoc1.8 %i/bin/rdoc
ln -s ri1.8 %i/bin/ri
ln -s ruby1.8 %i/bin/ruby
ln -s ruby1.8.1 %i/share/man/man1/ruby.1
ln -s testrb1.8 %i/bin/testrb
cp %i/bin/ruby1.8 %i/bin/ruby-aqua1.8
ln -s ruby-aqua1.8 %i/bin/rubyw1.8
ln -s ruby-aqua1.8 %i/bin/ruby-aqua
ln -s rubyw1.8 %i/bin/rubyw
mkdir -p %i/share/doc/%n
cp -r sample %i/share/doc/%n/sample
mkdir %i/share/doc/%n/logo
cp ../ruby-kit/ruby.png ../ruby-kit/LICENSE %i/share/doc/%n/logo
<<
PostInstScript: <<
/Developer/Tools/Rez -t APPL Carbon.r -o %p/bin/ruby-aqua1.8 || true
sips -i %p/share/doc/%n/logo/ruby.png || true
mv %p/bin/ruby-aqua1.8 %p/bin/ruby-aqua1.8_exe
/bin/cp %p/share/doc/%n/logo/ruby.png %p/bin/ruby-aqua1.8
/bin/cp -X %p/bin/ruby-aqua1.8_exe %p/bin/ruby-aqua1.8 || true
rm %p/bin/ruby-aqua1.8_exe
<<
DocFiles: COPYING COPYING.ja ChangeLog GPL LEGAL LGPL README README.EXT README.EXT.ja README.ja ToDo

SplitOff: <<
Package: ruby
Depends: ri18 (= %v-%r), %N (= %v-%r)
Conflicts: ri
Replaces: ri
Provides: ri
Description: Interpreted, object-oriented language (symlinks)
DocFiles: COPYING COPYING.ja ChangeLog GPL LEGAL LGPL README README.EXT README.EXT.ja README.ja ToDo
Files: <<
bin/erb
bin/irb
bin/rdoc
bin/ruby
bin/rubyw
bin/ruby-aqua
bin/testrb
bin/ri
share/man/man1/ruby.1
<<
<<

SplitOff2: <<
Package: %N-dev
Description: Interpreted, object-oriented language (mkmf.rb, *.h and *.dylib)
BuildDependsOnly: True
Depends: %N (= %v-%r)
Replaces: ruby16-dev
Conflicts: ruby16-dev, ruby (<= 1.6.6-1), ruby-dev (<< 1.8.0-1)
Files: <<
lib/libruby.dylib
lib/libruby-static.a
lib/libruby.a
lib/ruby/1.8/mkmf.rb
(%m = i386) lib/ruby/1.8/i686-darwin/*.h
(%m = powerpc) lib/ruby/1.8/powerpc-darwin/*.h
<<
DocFiles: COPYING COPYING.ja ChangeLog GPL LEGAL LGPL README README.EXT README.EXT.ja README.ja ToDo
<<

SplitOff3: <<
Package: ri18
Description: Interpreted, object-oriented language (documentation)
Depends: %N (= %v-%r)
Conflicts: %N (<< 1.8.3-3)
Files: <<
bin/ri1.8
share/ri/1.8
<<
DocFiles: COPYING COPYING.ja ChangeLog GPL LEGAL LGPL README README.EXT README.EXT.ja README.ja ToDo
<<

SplitOff4: <<
Package: %N-shlibs
Shlibs: %p/lib/libruby.1.8.dylib 1.8.0 %n (>= 1.8.0-1)
Description: Interpreted, object-oriented language (shared libraries)
Files: lib/libruby.*.dylib
DocFiles: COPYING COPYING.ja ChangeLog GPL LEGAL LGPL README README.EXT README.EXT.ja README.ja ToDo
<<

DescDetail: <<
- It has many features to process text files and to do system
management tasks (as in Perl).
- It is simple, straight-forward, extensible, and portable, and free.
- It has simple syntax, partially inspired by Eiffel and Ada.
- All data in Ruby is an object, not in the sense of Python or Perl,
but in the sense of Smalltalk: no exceptions.
<<
DescPackaging: <<
This package was updated to 1.8.7 in 10.6-only since there are concerns
about compatibility with previous ruby versions (1.8.7 made some changes
compared to 1.8.6 that have potential compatibility side-effects).

The 10.6/1.8.7 version was updated by Benjamin Reed with the blessing
of the primary maintainer, who doesn't have Snow Leopard yet.

The top level configure complains about extra parameters but it should pass them
to extensions anyway.

The Ruby tcltk extension is packaged separately and links against Fink's X11
version of tcltk. It could be replaced with a version linked against an Aqua
tcltk if someone packaged it.

The package now contains ruby-aqua which is able to run scripts that use the
aqua interface.

Packages should depend on ruby18 to run scripts. The shared library
does not provide many of the stdlib features, they are implemented in
the bundled extensions.

The extensions would link and probably run with Apple's libraries but
since Fink has its own version of ncurses, readline, etc. it should
always link with Fink's to get consistent results.

Move mkmf script into -dev to make extension configuration error out
instead of failing all tests.

To properly configure a ruby extension the interpreter of the right
version has to be executable as ruby, and the corresponding library
available as libruby (at least this is the easiest way). It is
possible to execute the extconf.rb script with an interpreter of
choice (i.e. ruby1.8) but extensions that use more complex
configuration scripts (i.e. autoconf) will usually try to execute just
ruby.

The config.guess script is modified so that extensions are installed
in %p/lib/ruby/r_maj.r_min/cpu-darwin (in contrast to
%p/lib/ruby/r_maj.r_min/cpu-darwin_os_maj.os_min which makes binary
extension packages useless when the interpreter package is recompiled
after a system upgrade).

With gcc 4.0.0 build 5026 from XCode 2.1 Ruby will randomly core dump
and with gcc 4.0.1 from XCode 2.2.1, Ruby will randomly have internal
errors. This appears to be ppc specific. --enable-pthread reportedly
fixes the problem.

The Debian ruby1.8_1.8.4-1 package was used as a source for this
package. Many of the same configure command line options and some
patches are used.
<<