head	1.6;
access;
symbols
	RELEASE_4_10_0:1.5
	RELEASE_5_2_1:1.5
	RELEASE_5_2_0:1.5
	RELEASE_4_9_0:1.5
	RELEASE_5_1_0:1.5
	RELEASE_4_8_0:1.5
	RELEASE_5_0_0:1.5
	RELEASE_4_7_0:1.5
	RELEASE_4_6_2:1.5
	RELEASE_4_6_1:1.5
	RELEASE_4_6_0:1.5
	RELEASE_5_0_DP1:1.5
	RELEASE_4_5_0:1.5
	RELEASE_4_4_0:1.5
	RELEASE_4_3_0:1.5
	RELEASE_4_2_0:1.2
	RELEASE_4_1_1:1.2;
locks; strict;
comment	@# @;


1.6
date	2004.05.15.01.01.59;	author linimon;	state dead;
branches;
next	1.5;

1.5
date	2001.03.29.08.23.04;	author knu;	state Exp;
branches;
next	1.4;

1.4
date	2001.01.18.20.06.41;	author knu;	state Exp;
branches;
next	1.3;

1.3
date	2001.01.05.21.14.09;	author knu;	state Exp;
branches;
next	1.2;

1.2
date	2000.09.10.20.13.12;	author knu;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.07.06.09.18;	author knu;	state Exp;
branches;
next	;


desc
@@


1.6
log
@As previously announced, remove lang/ruby-python.  Its dependendencies are
broken, and it relies on an antique version of Python.  Per the manintainer,
"Ruby now has hundreds of native libraries, and no one would need or want
to use ruby-python to borrow libraries from python."
@
text
@--- extconf.rb.orig	Mon Sep 11 01:14:42 2000
+++ extconf.rb	Thu Mar 29 17:01:54 2001
@@@@ -1,35 +1,29 @@@@
 require 'mkmf'
 
-py_dir        = with_config("python-dir")
-if py_dir
-  dirs = [py_dir]
-else
-  dirs = ['/usr/local', '/usr']
-  if File.executable? `which python`.chomp
-    d = `python -c 'import sys; print sys.exec_prefix' < /dev/null`
-    d = d.split(/\n/).shift
-    dirs.unshift d if d and File.directory? d
-  end
-end
+python	= with_config("python", "python1.5")
+python	= `which #{python}`.chomp
 
-for py_dir in dirs
-  py_includedir = py_dir + "/include/python1.5"
-  py_libdir     = py_dir + "/lib/python1.5"
-  py_configdir  = py_libdir + "/config"
-  py_makefile   = py_configdir + "/Makefile"
+exit(1) unless File.executable? python
 
-  print "checking for #{py_makefile}... "
-  if File.exists? py_makefile
-    print "yes\n"
-    break
-  else
-    print "no\n"
-  end
-end
-exit(1) unless File.exists? py_makefile
+py_name	= File.basename(python)
+py_dir	= `#{python} -c 'import sys; print sys.exec_prefix' < /dev/null`.split(/\n/)[0]
+
+exit(1) unless File.directory? py_dir
 
-$CFLAGS  = "-I#{py_includedir}"
-$LDFLAGS = "-L#{py_configdir}"
+dir_config("python",
+	   py_dir + "/include/" + py_name,
+	   py_dir + "/lib/" + py_name + "/config")
+
+py_makefile  = with_config("python-makefile",
+			    py_dir + "/lib/" + py_name + "/config/Makefile")
+
+print "checking for #{py_makefile}... "
+if File.exists? py_makefile
+  print "yes\n"
+else
+  print "no\n"
+  exit(1)
+end
 
 # If python is linked with extra libraries (e.g. -lpthread on Linux,
 # -lsocket on Solaris, etc.), have_library test will fail and built
@@@@ -59,11 +53,13 @@@@
 end
 $LOCAL_LIBS << py_extralibs
 
-if have_library("python1.5", "Py_Initialize") && have_header("Python.h")
-  # If DEBUG defined, you need python compiled with Py_DEBUG defined,
-  # like as building python with "make OPT='-g -O2 -DPy_DEBUG'"
-  if have_func('_Py_NewReference')
-    $CFLAGS  += " -DDEBUG"
-  end
-  create_makefile("python")
+if !have_library(py_name, "Py_Initialize") || !have_header("Python.h")
+  exit(1)
+end
+
+# If DEBUG defined, you need python compiled with Py_DEBUG defined,
+# like as building python with "make OPT='-g -O2 -DPy_DEBUG'"
+if have_func('_Py_NewReference')
+  $CFLAGS  += " -DDEBUG"
 end
+create_makefile("python")
@


1.5
log
@Build and use libpython without threads support and make this work
fine on both 4-STABLE and 5-CURRENT.
@
text
@@


1.4
log
@The previous problem was found to be due to mkmf.rb's bug.  Now fixed.
@
text
@d2 2
a3 2
+++ extconf.rb	Fri Jan 19 04:43:51 2001
@@@@ -1,35 +1,41 @@@@
d9 1
a9 19
+python        = with_config("python", "python1.5")
+python        = `which #{python}`.chomp
+
+exit(1) unless File.executable? python
+
+py_name       = File.basename(python)
+py_dir        = `#{python} -c 'import sys; print sys.exec_prefix' < /dev/null`.split(/\n/)[0]
+
+exit(1) unless File.directory? py_dir
+
+py_includedir = py_dir + "/include/" + py_name
+py_libdir     = py_dir + "/lib/" + py_name
+py_configdir  = py_libdir + "/config"
+py_makefile   = py_configdir + "/Makefile"
+
+print "checking for #{py_makefile}... "
+if File.exists? py_makefile
+  print "yes\n"
 else
d16 3
a18 3
+  print "no\n"
+  exit(1)
 end
d25 1
a25 2
+$CFLAGS  += " -I#{py_includedir}"
+$LDFLAGS += " -L#{py_configdir}"
d33 5
a37 4
+if with_config("pthread")
+  if !have_library("pthread", "pthread_create")
+    $LDFLAGS += " -pthread"
+    $libs.sub!(/-lc\b/, '-lc_r')
d39 2
a40 7
+    if !have_func("pthread_create")
+      exit(1)
+    end
   end
 end
-exit(1) unless File.exists? py_makefile
-
d43 14
d60 1
a60 1
@@@@ -59,11 +65,13 @@@@
@


1.3
log
@Link against libreadline.  I wonder from when and why it came to
require linking libreadline... ?-(

Found by:	bento
@
text
@d2 1
a2 1
+++ extconf.rb	Sat Jan  6 06:11:27 2001
d69 1
a69 1
@@@@ -59,11 +65,15 @@@@
a79 2
+have_library("readline", "readline")
+
@


1.2
log
@Improve the configure script and add a knob to use another version of
Python than 1.5. (Currently this module only works with 1.5 though)

Feedback status:	submitted to the author
@
text
@d2 1
a2 1
+++ extconf.rb	Mon Sep 11 04:31:30 2000
d69 1
a69 1
@@@@ -59,11 +65,13 @@@@
d80 2
@


1.1
log
@Add Ruby related ports.

devel/ruby-property:
	Simple properties scheme for Ruby

lang/ruby-python:
	Ruby extension library for embedding Python in Ruby

math/ruby-bigfloat:
	Variable precision floating library for Ruby

Whipped on by:	ade	:>
@
text
@d1 4
a4 4
--- extconf.rb.orig	Sun Nov  7 15:38:30 1999
+++ extconf.rb	Mon Aug  7 12:34:46 2000
@@@@ -29,7 +30,7 @@@@
 exit(1) unless File.exists? py_makefile
d6 59
a64 1
 $CFLAGS  = "-I#{py_includedir}"
a65 1
+$LDFLAGS = "-L#{py_configdir} -pthread"
d69 21
@

