OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 02-Nov-2006 22:55:45
Branch: HEAD Handle: 2006110221554500
Modified files:
openpkg-src/python python.patch python.spec
Log:
cleanup and fix the whole addon module building
Summary:
Revision Changes Path
1.11 +23 -12 openpkg-src/python/python.patch
1.72 +49 -19 openpkg-src/python/python.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/python/python.patch
============================================================================
$ cvs diff -u -r1.10 -r1.11 python.patch
--- openpkg-src/python/python.patch 11 Oct 2006 07:35:48 -0000 1.10
+++ openpkg-src/python/python.patch 2 Nov 2006 21:55:45 -0000 1.11
@@ -1,6 +1,6 @@
Index: Include/pyport.h
--- Include/pyport.h.orig 2006-06-10 14:23:46 +0200
-+++ Include/pyport.h 2006-10-11 09:29:21 +0200
++++ Include/pyport.h 2006-11-02 22:33:14 +0100
@@ -370,8 +370,12 @@
* config to #define Py_HUGE_VAL to something that works on your platform.
*/
@@ -14,9 +14,21 @@
/* Py_OVERFLOWED(X)
* Return 1 iff a libm function overflowed. Set errno to 0 before calling
+Index: Modules/_ctypes/libffi/configure
+--- Modules/_ctypes/libffi/configure.orig 2006-08-14 18:17:41 +0200
++++ Modules/_ctypes/libffi/configure 2006-11-02 22:33:57 +0100
+@@ -3516,7 +3516,7 @@
+ cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;;
+ s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
+ s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
+-x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
TARGET=X86_64; TARGETDIR=x86;;
++x86_64-*-linux* | amd64-*-freebsd* | x86_64-*-freebsd* |
x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;;
+ sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
+ sh-*-rtems*) TARGET=SH; TARGETDIR=sh;;
+ sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;
Index: configure
--- configure.orig 2006-09-05 04:54:42 +0200
-+++ configure 2006-10-11 09:29:21 +0200
++++ configure 2006-11-02 22:33:14 +0100
@@ -3800,11 +3800,11 @@
# debug builds.
OPT="-g -Wall $STRICT_PROTO"
@@ -42,7 +54,7 @@
then
Index: setup.py
--- setup.py.orig 2006-08-10 01:42:18 +0200
-+++ setup.py 2006-10-11 09:30:42 +0200
++++ setup.py 2006-11-02 22:35:54 +0100
@@ -244,8 +244,8 @@
def detect_modules(self):
@@ -54,39 +66,38 @@
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
-@@ -520,7 +520,7 @@
+@@ -520,8 +520,6 @@
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
- '/usr/local/ssl/include',
-+
- '/usr/contrib/ssl/include/'
+- '/usr/contrib/ssl/include/'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-@@ -532,7 +532,7 @@
+ search_for_ssl_incs_in
+@@ -532,8 +530,7 @@
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
+ [
- '/usr/contrib/ssl/lib/'
] )
-@@ -614,11 +614,11 @@
+ if (ssl_incs is not None and
+@@ -614,11 +611,9 @@
# top of the normal inc_dirs.
db_inc_paths = [
'/usr/include/db4',
- '/usr/local/include/db4',
-+
'/opt/sfw/include/db4',
'/sw/include/db4',
'/usr/include/db3',
- '/usr/local/include/db3',
-+
'/opt/sfw/include/db3',
'/sw/include/db3',
]
-@@ -1223,6 +1223,7 @@
+@@ -1223,6 +1218,7 @@
dotversion = dotversion[:-1] + '.' + dotversion[-1]
tcl_include_sub = []
tk_include_sub = []
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/python/python.spec
============================================================================
$ cvs diff -u -r1.71 -r1.72 python.spec
--- openpkg-src/python/python.spec 2 Nov 2006 20:54:16 -0000 1.71
+++ openpkg-src/python/python.spec 2 Nov 2006 21:55:45 -0000 1.72
@@ -36,15 +36,15 @@
Release: 20061102
# package options
-%option with_readline no
+%option with_readline yes
%option with_db no
-%option with_dbm no
-%option with_curses no
-%option with_bzip2 no
-%option with_xml no
-%option with_tkinter no
-%option with_locale no
-%option with_ssl no
+%option with_dbm yes
+%option with_curses yes
+%option with_zlib yes
+%option with_bzip2 yes
+%option with_xml yes
+%option with_locale yes
+%option with_ssl yes
# list of sources
Source0:
http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
@@ -73,6 +73,10 @@
BuildPreReq: ncurses
PreReq: ncurses
%endif
+%if "%{with_zlib}" == "yes"
+BuildPreReq: zlib
+PreReq: zlib
+%endif
%if "%{with_bzip2}" == "yes"
BuildPreReq: bzip2
PreReq: bzip2
@@ -81,10 +85,6 @@
BuildPreReq: expat
PreReq: expat
%endif
-%if "%{with_tkinter}" == "yes"
-BuildPreReq: tcl
-PreReq: tcl
-%endif
%if "%{with_locale}" == "yes"
BuildPreReq: gettext, libiconv
PreReq: gettext, libiconv
@@ -133,21 +133,51 @@
%build
echo "" >config.cache
- libs=""
+%if "%{with_readline}" == "yes"
+ ( echo "readline readline.c %{l_cppflags} %{l_ldflags} -lreadline
-ltermcap"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_db}" == "yes"
+ ( echo "_bsddb _bsddb.c %{l_cppflags} %{l_ldflags} -ldb"
+ ) >>Modules/Setup.local
+%endif
%if "%{with_dbm}" == "yes"
- libs="$libs -lndbm -lgdbm"
+ ( echo "dbm dbmmodule.c -DHAVE_NDBM_H %{l_cppflags} %{l_ldflags}
-lndbm -lgdbm"
+ echo "gdbm gdbmmodule.c -DHAVE_GDBM_H %{l_cppflags} %{l_ldflags}
-lgdbm"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_curses}" == "yes"
+ ( echo "_curses_panel _curses_panel.c %{l_cppflags} %{l_ldflags} -lpanel
-lncurses"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_zlib}" == "yes"
+ ( echo "zlib zlibmodule.c %{l_cppflags} %{l_ldflags} -lz"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_bzip2}" == "yes"
+ ( echo "bz2 bz2module.c %{l_cppflags} %{l_ldflags} -lbz2"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_xml}" == "yes"
+ ( echo "EXPAT_DIR=%{l_prefix}"
+ echo "pyexpat pyexpat.c -DHAVE_EXPAT_H %{l_cppflags} %{l_ldflags}
-lexpat"
+ ) >>Modules/Setup.local
%endif
%if "%{with_locale}" == "yes"
- echo 'ac_cv_lib_intl_textdomain=yes' >>config.cache
- %{l_shtool} subst -s \
- -e 's/locale_libs =.*intl.*/locale_libs = ["intl", "iconv"]/' \
- setup.py
+ ( echo "_locale _localemodule.c %{l_cppflags} %{l_ldflags} -lintl
-liconv"
+ ) >>Modules/Setup.local
+%endif
+%if "%{with_ssl}" == "yes"
+ ( echo "_socket socketmodule.c"
+ echo "SSL=%{l_prefix}"
+ echo "_ssl _ssl.c -DUSE_SSL %{l_cppflags openssl .} %{l_ldflags} -lssl
-lcrypto"
+ ) >>Modules/Setup.local
%endif
CC="%{l_cc}" \
CXX="%{l_cxx}" \
CFLAGS="%{l_cflags -O}" \
CXXFLAGS="%{l_cxxflags -O}" \
- LDFLAGS="%{l_ldflags} $libs" \
+ LDFLAGS="%{l_ldflags}" \
./configure \
--cache-file=./config.cache \
--prefix=%{l_prefix}
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]