mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
Initial .bep and .patch files for Python-3.2 alpha3
This commit is contained in:
127
dev-lang/python/patches/python-3.2a3.patch
Normal file
127
dev-lang/python/patches/python-3.2a3.patch
Normal file
@@ -0,0 +1,127 @@
|
||||
diff -urN Python-3.2a3/Lib/plat-haiku/regen Python-3.2a3-haiku/Lib/plat-haiku/regen
|
||||
--- Python-3.2a3/Lib/plat-haiku/regen 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ Python-3.2a3-haiku/Lib/plat-haiku/regen 2010-10-25 12:04:00.000000000 -0700
|
||||
@@ -0,0 +1,3 @@
|
||||
+#! /bin/sh
|
||||
+set -v
|
||||
+python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /boot/develop/headers/posix/netinet/in.h
|
||||
diff -urN Python-3.2a3/Python/bltinmodule.c Python-3.2a3-haiku/Python/bltinmodule.c
|
||||
--- Python-3.2a3/Python/bltinmodule.c 2010-09-27 14:08:38.054788096 -0700
|
||||
+++ Python-3.2a3-haiku/Python/bltinmodule.c 2010-10-25 13:10:52.010747904 -0700
|
||||
@@ -22,7 +22,7 @@
|
||||
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
|
||||
const char *Py_FileSystemDefaultEncoding = "mbcs";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
-#elif defined(__APPLE__)
|
||||
+#elif defined(__APPLE__) || defined(__HAIKU__)
|
||||
const char *Py_FileSystemDefaultEncoding = "utf-8";
|
||||
int Py_HasFileSystemDefaultEncoding = 1;
|
||||
#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
|
||||
diff -urN Python-3.2a3/configure.in Python-3.2a3-haiku/configure.in
|
||||
--- Python-3.2a3/configure.in 2010-10-10 01:10:16.033554432 -0700
|
||||
+++ Python-3.2a3-haiku/configure.in 2010-10-25 13:47:17.305135616 -0700
|
||||
@@ -292,6 +292,7 @@
|
||||
case $MACHDEP in
|
||||
cygwin*) MACHDEP="cygwin";;
|
||||
darwin*) MACHDEP="darwin";;
|
||||
+ haiku*) MACHDEP="haiku";;
|
||||
irix646) MACHDEP="irix6";;
|
||||
'') MACHDEP="unknown";;
|
||||
esac
|
||||
@@ -733,7 +734,7 @@
|
||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
||||
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||
;;
|
||||
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
|
||||
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Haiku*)
|
||||
LDLIBRARY='libpython$(VERSION).so'
|
||||
BLDLIBRARY='-L. -lpython$(VERSION)'
|
||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
||||
@@ -818,6 +819,7 @@
|
||||
if test -z "$LN" ; then
|
||||
case $ac_sys_system in
|
||||
CYGWIN*) LN="ln -s";;
|
||||
+ Haiku*) LN="ln -s";;
|
||||
*) LN=ln;;
|
||||
esac
|
||||
fi
|
||||
@@ -1748,7 +1750,7 @@
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
- Linux*|GNU*|QNX*)
|
||||
+ Linux*|GNU*|QNX*|Haiku*)
|
||||
LDSHARED='$(CC) -shared'
|
||||
LDCXXSHARED='$(CXX) -shared';;
|
||||
BSD/OS*/4*)
|
||||
@@ -1817,7 +1819,7 @@
|
||||
then CCSHARED="-fPIC";
|
||||
else CCSHARED="+z";
|
||||
fi;;
|
||||
- Linux*|GNU*) CCSHARED="-fPIC";;
|
||||
+ Linux*|GNU*|Haiku*) CCSHARED="-fPIC";;
|
||||
BSD/OS*/4*) CCSHARED="-fpic";;
|
||||
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
|
||||
OpenUNIX*|UnixWare*)
|
||||
@@ -1848,7 +1850,7 @@
|
||||
LINKFORSHARED="-Wl,-E -Wl,+s";;
|
||||
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
|
||||
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
|
||||
- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
|
||||
+ Linux*|GNU*|Haiku*) LINKFORSHARED="-Xlinker -export-dynamic";;
|
||||
# -u libsys_s pulls in all symbols in libsys
|
||||
Darwin/*)
|
||||
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
|
||||
@@ -1959,6 +1961,8 @@
|
||||
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
|
||||
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
|
||||
|
||||
+AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [], $LIBS) # For Haiku
|
||||
+
|
||||
AC_MSG_CHECKING(for --with-libs)
|
||||
AC_ARG_WITH(libs,
|
||||
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs]),
|
||||
@@ -3215,7 +3219,7 @@
|
||||
# check for --with-libm=...
|
||||
AC_SUBST(LIBM)
|
||||
case $ac_sys_system in
|
||||
-Darwin) ;;
|
||||
+Darwin|Haiku*) ;;
|
||||
*) LIBM=-lm
|
||||
esac
|
||||
AC_MSG_CHECKING(for --with-libm=STRING)
|
||||
diff -urN Python-3.2a3/setup.py Python-3.2a3-haiku/setup.py
|
||||
--- Python-3.2a3/setup.py 2010-09-14 12:41:23.030670848 -0700
|
||||
+++ Python-3.2a3-haiku/setup.py 2010-10-25 13:06:13.069992448 -0700
|
||||
@@ -423,6 +423,10 @@
|
||||
platform = self.get_platform()
|
||||
srcdir = sysconfig.get_config_var('srcdir')
|
||||
|
||||
+ if platform == 'haiku1':
|
||||
+ inc_dirs += ['/boot/develop/headers/posix', '/boot/develop/headers/3rdparty', '/boot/common/include']
|
||||
+ lib_dirs += ['/boot/system/lib', '/boot/develop/lib/x86', '/boot/common/lib']
|
||||
+
|
||||
# OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb)
|
||||
if platform in ['osf1', 'unixware7', 'openunix8']:
|
||||
lib_dirs += ['/usr/ccs/lib']
|
||||
@@ -444,9 +448,9 @@
|
||||
if item.startswith('-L'):
|
||||
lib_dirs.append(item[2:])
|
||||
|
||||
- # Check for MacOS X, which doesn't need libm.a at all
|
||||
+ # Check for MacOS X or Haiku, which don't need libm.a at all
|
||||
math_libs = ['m']
|
||||
- if platform == 'darwin':
|
||||
+ if platform == 'darwin' or platform == 'haiku':
|
||||
math_libs = []
|
||||
|
||||
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
|
||||
@@ -1100,7 +1104,7 @@
|
||||
exts.append( Extension('resource', ['resource.c']) )
|
||||
|
||||
# Sun yellow pages. Some systems have the functions in libc.
|
||||
- if (platform not in ['cygwin', 'qnx6'] and
|
||||
+ if (platform not in ['cygwin', 'qnx6', 'haiku'] and
|
||||
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
|
||||
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
|
||||
libs = ['nsl']
|
||||
Reference in New Issue
Block a user