venture37

Bitrig support for Python 2.7.10

Jul 26th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.68 KB | None | 0 0
  1. Index: lang/python27/patches/patch-Include_pyport.h
  2. ===================================================================
  3. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-Include_pyport.h,v
  4. retrieving revision 1.3
  5. diff -u -r1.3 patch-Include_pyport.h
  6. --- lang/python27/patches/patch-Include_pyport.h 24 Apr 2015 03:01:36 -0000 1.3
  7. +++ lang/python27/patches/patch-Include_pyport.h 12 Jul 2015 02:17:19 -0000
  8. @@ -1,19 +1,29 @@
  9. -$NetBSD: patch-Include_pyport.h,v 1.3 2015/04/24 03:01:36 rodent Exp $
  10. +$NetBSD$
  11.  
  12. SunOS defines gethostname in <unistd.h>
  13. http://bugs.python.org/issue19561
  14. +Add Bitrig support
  15.  
  16. ---- Include/pyport.h.orig 2014-12-10 15:59:32.000000000 +0000
  17. +--- Include/pyport.h.orig Sat May 23 16:09:00 2015
  18. +++ Include/pyport.h
  19. -@@ -640,11 +640,6 @@ Please be conservative with adding new o
  20. +@@ -467,7 +467,7 @@ extern "C" {
  21. + * This isn't reliable. See Py_OVERFLOWED comments.
  22. + * X is evaluated more than once.
  23. + */
  24. +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || (defined(__hpux) && defined(__ia64))
  25. ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__Bitrig__) || (defined(__hpux) && defined(__ia64))
  26. + #define _Py_SET_EDOM_FOR_NAN(X) if (isnan(X)) errno = EDOM;
  27. + #else
  28. + #define _Py_SET_EDOM_FOR_NAN(X) ;
  29. +@@ -639,11 +639,6 @@ Prototypes that are missing from the standard include
  30. + Please be conservative with adding new ones, document them and enclose them
  31. in platform-specific #ifdefs.
  32. **************************************************************************/
  33. -
  34. +-
  35. -#ifdef SOLARIS
  36. -/* Unchecked */
  37. -extern int gethostname(char *, int);
  38. -#endif
  39. --
  40. +
  41. #ifdef __BEOS__
  42. /* Unchecked */
  43. - /* It's in the libs, but not the headers... - [cjh] */
  44. Index: lang/python27/patches/patch-Lib_ctypes_util.py
  45. ===================================================================
  46. RCS file: lang/python27/patches/patch-Lib_ctypes_util.py
  47. diff -N lang/python27/patches/patch-Lib_ctypes_util.py
  48. --- /dev/null 1 Jan 1970 00:00:00 -0000
  49. +++ lang/python27/patches/patch-Lib_ctypes_util.py 12 Jul 2015 02:17:19 -0000
  50. @@ -0,0 +1,12 @@
  51. +$NetBSD$
  52. +
  53. +--- Lib/ctypes/util.py.orig Wed Jun 3 01:33:38 2015
  54. ++++ Lib/ctypes/util.py
  55. +@@ -153,6 +153,7 @@ elif os.name == "posix":
  56. +
  57. + if (sys.platform.startswith("freebsd")
  58. + or sys.platform.startswith("openbsd")
  59. ++ or sys.platform.startswith("bitrig")
  60. + or sys.platform.startswith("dragonfly")):
  61. +
  62. + def _num_version(libname):
  63. Index: lang/python27/patches/patch-Lib_test_test_fcntl.py
  64. ===================================================================
  65. RCS file: lang/python27/patches/patch-Lib_test_test_fcntl.py
  66. diff -N lang/python27/patches/patch-Lib_test_test_fcntl.py
  67. --- /dev/null 1 Jan 1970 00:00:00 -0000
  68. +++ lang/python27/patches/patch-Lib_test_test_fcntl.py 12 Jul 2015 02:17:19 -0000
  69. @@ -0,0 +1,13 @@
  70. +$NetBSD$
  71. +
  72. +--- Lib/test/test_fcntl.py.orig Wed Jun 3 01:36:04 2015
  73. ++++ Lib/test/test_fcntl.py
  74. +@@ -27,7 +27,7 @@ def get_lockdata():
  75. + else:
  76. + start_len = "qq"
  77. +
  78. +- if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd', 'bsdos'))
  79. ++ if (sys.platform.startswith(('netbsd', 'freebsd', 'openbsd', 'bitrig', 'bsdos'))
  80. + or sys.platform == 'darwin'):
  81. + if struct.calcsize('l') == 8:
  82. + off_t = 'l'
  83. Index: lang/python27/patches/patch-Lib_test_test_fileio.py
  84. ===================================================================
  85. RCS file: lang/python27/patches/patch-Lib_test_test_fileio.py
  86. diff -N lang/python27/patches/patch-Lib_test_test_fileio.py
  87. --- /dev/null 1 Jan 1970 00:00:00 -0000
  88. +++ lang/python27/patches/patch-Lib_test_test_fileio.py 12 Jul 2015 02:17:19 -0000
  89. @@ -0,0 +1,12 @@
  90. +$NetBSD$
  91. +
  92. +--- Lib/test/test_fileio.py.orig Wed Jun 3 01:38:09 2015
  93. ++++ Lib/test/test_fileio.py
  94. +@@ -308,6 +308,7 @@ class OtherFileTests(unittest.TestCase):
  95. + self.assertEqual(f.writable(), True)
  96. + if sys.platform != "darwin" and \
  97. + 'bsd' not in sys.platform and \
  98. ++ 'bitrig' not in sys.platform and \
  99. + not sys.platform.startswith('sunos'):
  100. + # Somehow /dev/tty appears seekable on some BSDs
  101. + self.assertEqual(f.seekable(), False)
  102. Index: lang/python27/patches/patch-Lib_test_test_posix.py
  103. ===================================================================
  104. RCS file: lang/python27/patches/patch-Lib_test_test_posix.py
  105. diff -N lang/python27/patches/patch-Lib_test_test_posix.py
  106. --- /dev/null 1 Jan 1970 00:00:00 -0000
  107. +++ lang/python27/patches/patch-Lib_test_test_posix.py 12 Jul 2015 02:17:19 -0000
  108. @@ -0,0 +1,14 @@
  109. +$NetBSD$
  110. +
  111. +--- Lib/test/test_posix.py.orig Wed Jun 3 01:41:05 2015
  112. ++++ Lib/test/test_posix.py
  113. +@@ -538,7 +538,8 @@ class PosixTester(unittest.TestCase):
  114. + quirky_platform = (
  115. + 'sunos' in sys.platform or
  116. + 'netbsd' in sys.platform or
  117. +- 'openbsd' in sys.platform
  118. ++ 'openbsd' in sys.platform or
  119. ++ 'bitrig'in sys.platform
  120. + )
  121. + if quirky_platform:
  122. + expected_errno = errno.ERANGE
  123. Index: lang/python27/patches/patch-Lib_test_test_subprocess.py
  124. ===================================================================
  125. RCS file: lang/python27/patches/patch-Lib_test_test_subprocess.py
  126. diff -N lang/python27/patches/patch-Lib_test_test_subprocess.py
  127. --- /dev/null 1 Jan 1970 00:00:00 -0000
  128. +++ lang/python27/patches/patch-Lib_test_test_subprocess.py 12 Jul 2015 02:17:19 -0000
  129. @@ -0,0 +1,13 @@
  130. +$NetBSD$
  131. +
  132. +--- Lib/test/test_subprocess.py.orig Wed Jun 3 01:43:15 2015
  133. ++++ Lib/test/test_subprocess.py
  134. +@@ -951,7 +951,7 @@ class POSIXProcessTestCase(BaseTestCase):
  135. + getattr(p, method)(*args)
  136. + return p
  137. +
  138. +- @unittest.skipIf(sys.platform.startswith(('netbsd', 'openbsd')),
  139. ++ @unittest.skipIf(sys.platform.startswith(('netbsd', 'openbsd', 'bitrig')),
  140. + "Due to known OS bug (issue #16762)")
  141. + def _kill_dead_process(self, method, *args):
  142. + # Do not inherit file handles from the parent.
  143. Index: lang/python27/patches/patch-Modules_posixmodule.c
  144. ===================================================================
  145. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-Modules_posixmodule.c,v
  146. retrieving revision 1.2
  147. diff -u -r1.2 patch-Modules_posixmodule.c
  148. --- lang/python27/patches/patch-Modules_posixmodule.c 24 Apr 2015 03:01:36 -0000 1.2
  149. +++ lang/python27/patches/patch-Modules_posixmodule.c 12 Jul 2015 02:17:19 -0000
  150. @@ -1,8 +1,8 @@
  151. -$NetBSD: patch-Modules_posixmodule.c,v 1.2 2015/04/24 03:01:36 rodent Exp $
  152. +$NetBSD$
  153.  
  154. ---- Modules/posixmodule.c.orig 2014-12-10 15:59:55.000000000 +0000
  155. +--- Modules/posixmodule.c.orig Sat May 23 16:09:20 2015
  156. +++ Modules/posixmodule.c
  157. -@@ -317,6 +317,10 @@ extern int lstat(const char *, struct st
  158. +@@ -317,6 +317,10 @@ extern int lstat(const char *, struct stat *);
  159. #define PARSE_PID "i"
  160. #define PyLong_FromPid PyInt_FromLong
  161. #define PyLong_AsPid PyInt_AsLong
  162. @@ -13,3 +13,11 @@
  163. #elif SIZEOF_PID_T == SIZEOF_LONG
  164. #define PARSE_PID "l"
  165. #define PyLong_FromPid PyInt_FromLong
  166. +@@ -2152,6 +2156,7 @@ Return a string representing the current working direc
  167. +
  168. + #if (defined(__sun) && defined(__SVR4)) || \
  169. + defined(__OpenBSD__) || \
  170. ++ defined(__Bitrig__) || \
  171. + defined(__NetBSD__)
  172. + /* Issue 9185: getcwd() returns NULL/ERANGE indefinitely. */
  173. + static PyObject *
  174. Index: lang/python27/patches/patch-Modules_socketmodule.c
  175. ===================================================================
  176. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-Modules_socketmodule.c,v
  177. retrieving revision 1.5
  178. diff -u -r1.5 patch-Modules_socketmodule.c
  179. --- lang/python27/patches/patch-Modules_socketmodule.c 24 Apr 2015 03:01:36 -0000 1.5
  180. +++ lang/python27/patches/patch-Modules_socketmodule.c 12 Jul 2015 02:17:19 -0000
  181. @@ -1,8 +1,17 @@
  182. -$NetBSD: patch-Modules_socketmodule.c,v 1.5 2015/04/24 03:01:36 rodent Exp $
  183. +$NetBSD$
  184.  
  185. ---- Modules/socketmodule.c.orig 2014-12-10 15:59:55.000000000 +0000
  186. +--- Modules/socketmodule.c.orig Sat May 23 16:09:21 2015
  187. +++ Modules/socketmodule.c
  188. -@@ -248,7 +248,7 @@ shutdown(how) -- shut down traffic in on
  189. +@@ -186,7 +186,7 @@ shutdown(how) -- shut down traffic in one or both dire
  190. + (this includes the getaddrinfo emulation) protect access with a lock. */
  191. + #if defined(WITH_THREAD) && (defined(__APPLE__) || \
  192. + (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
  193. +- defined(__OpenBSD__) || defined(__NetBSD__) || \
  194. ++ defined(__OpenBSD__) || defined(__Bitrig__) || defined(__NetBSD__) || \
  195. + defined(__VMS) || !defined(HAVE_GETADDRINFO))
  196. + #define USE_GETADDRINFO_LOCK
  197. + #endif
  198. +@@ -248,7 +248,7 @@ shutdown(how) -- shut down traffic in one or both dire
  199. /* Irix 6.5 fails to define this variable at all. This is needed
  200. for both GCC and SGI's compiler. I'd say that the SGI headers
  201. are just busted. Same thing for Solaris. */
  202. Index: lang/python27/patches/patch-al
  203. ===================================================================
  204. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-al,v
  205. retrieving revision 1.17
  206. diff -u -r1.17 patch-al
  207. --- lang/python27/patches/patch-al 24 May 2015 07:44:07 -0000 1.17
  208. +++ lang/python27/patches/patch-al 12 Jul 2015 02:17:19 -0000
  209. @@ -1,28 +1,28 @@
  210. -$NetBSD: patch-al,v 1.17 2015/05/24 07:44:07 adam Exp $
  211. +$NetBSD$
  212.  
  213. -- recognize MirBSD, Interix
  214. +- recognize MirBSD, Interix, Bitrig
  215. - remove special-case library version hack for FreeBSD
  216. - don't set Mac OS X target version: stick to the current one
  217. - honor pkgsrc LDFLAGS
  218. - other stuff not previously commented (XXX)
  219.  
  220. ---- configure.orig 2015-05-23 16:09:25.000000000 +0000
  221. +--- configure.orig Sat May 23 16:09:25 2015
  222. +++ configure
  223. @@ -3271,7 +3271,7 @@ case $ac_sys_system/$ac_sys_release in
  224. # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
  225. # In addition, Stefan Krah confirms that issue #1244610 exists through
  226. # OpenBSD 4.6, but is fixed in 4.7.
  227. - OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
  228. -+ OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456] | MirBSD/*)
  229. ++ OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456] | MirBSD/* | Bitrig/*)
  230. define_xopen_source=no
  231. # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
  232. # also defined. This can be overridden by defining _BSD_SOURCE
  233. -@@ -5373,15 +5373,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
  234. +@@ -5373,15 +5373,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
  235. RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
  236. INSTSONAME="$LDLIBRARY".$SOVERSION
  237. ;;
  238. - Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
  239. -+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|Interix*|MirBSD*)
  240. ++ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|Interix*|MirBSD*|Bitrig*)
  241. LDLIBRARY='libpython$(VERSION).so'
  242. BLDLIBRARY='-L. -lpython$(VERSION)'
  243. RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
  244. @@ -34,7 +34,7 @@
  245. INSTSONAME="$LDLIBRARY".$SOVERSION
  246. ;;
  247. hp*|HP*)
  248. -@@ -5415,6 +5410,11 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
  249. +@@ -5415,6 +5410,11 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
  250. LDLIBRARY='libpython$(VERSION).so'
  251. RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
  252. ;;
  253. @@ -91,6 +91,15 @@
  254. BSD/OS*/4*)
  255. LDSHARED="gcc -shared"
  256. LDCXXSHARED="g++ -shared";;
  257. +@@ -8284,7 +8283,7 @@ then
  258. + else
  259. + LDSHARED="ld -Bshareable"
  260. + fi;;
  261. +- OpenBSD*)
  262. ++ OpenBSD*|Bitrig*)
  263. + if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
  264. + then
  265. + LDSHARED='$(CC) -shared $(CCSHARED)'
  266. @@ -8300,6 +8299,9 @@ then
  267. ;;
  268. esac
  269. @@ -106,7 +115,7 @@
  270. Linux*|GNU*) CCSHARED="-fPIC";;
  271. BSD/OS*/4*) CCSHARED="-fpic";;
  272. - FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
  273. -+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
  274. ++ FreeBSD*|NetBSD*|OpenBSD*|Bitrig*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
  275. + Interix*) CCSHARED="";;
  276. OpenUNIX*|UnixWare*)
  277. if test "$GCC" = "yes"
  278. @@ -116,7 +125,7 @@
  279. SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
  280. ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
  281. - FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
  282. -+ FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
  283. ++ FreeBSD*|NetBSD*|OpenBSD*|Bitrig*|MirBSD*|DragonFly*)
  284. if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
  285. then
  286. LINKFORSHARED="-Wl,--export-dynamic"
  287. @@ -136,3 +145,14 @@
  288. ;
  289. return 0;
  290. }
  291. +@@ -15328,6 +15336,10 @@ do
  292. + case $ac_option in
  293. + # Handling of the options.
  294. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  295. ++ : Avoid regenerating within pkgsrc
  296. ++ exit 0
  297. ++ : Avoid regenerating within pkgsrc
  298. ++ exit 0
  299. + ac_cs_recheck=: ;;
  300. + --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
  301. + $as_echo "$ac_cs_version"; exit ;;
  302. Index: lang/python27/patches/patch-am
  303. ===================================================================
  304. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-am,v
  305. retrieving revision 1.19
  306. diff -u -r1.19 patch-am
  307. --- lang/python27/patches/patch-am 24 Apr 2015 03:01:36 -0000 1.19
  308. +++ lang/python27/patches/patch-am 12 Jul 2015 02:17:19 -0000
  309. @@ -1,4 +1,4 @@
  310. -$NetBSD: patch-am,v 1.19 2015/04/24 03:01:36 rodent Exp $
  311. +$NetBSD$
  312.  
  313. Disabled modules for normal build:
  314. bsddb
  315. @@ -23,7 +23,9 @@
  316.  
  317. cygwin 2.7.3-no-libm.patch
  318.  
  319. ---- setup.py.orig 2014-12-10 16:00:01.000000000 +0000
  320. +Add Bitrig support
  321. +
  322. +--- setup.py.orig Sat May 23 16:09:25 2015
  323. +++ setup.py
  324. @@ -33,7 +33,7 @@ host_platform = get_platform()
  325. COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
  326. @@ -374,6 +376,15 @@
  327. if dbmext is not None:
  328. exts.append(dbmext)
  329. else:
  330. +@@ -1890,7 +1723,7 @@ class PyBuildExt(build_ext):
  331. + # Check for the include files on Debian and {Free,Open}BSD, where
  332. + # they're put in /usr/include/{tcl,tk}X.Y
  333. + dotversion = version
  334. +- if '.' not in dotversion and "bsd" in host_platform.lower():
  335. ++ if '.' not in dotversion and "bsd" in host_platform.lower() or "bitrig" in host_platform.lower():
  336. + # OpenBSD and FreeBSD use Tcl/Tk library names like libtcl83.a,
  337. + # but the include subdirs are named like .../include/tcl8.3.
  338. + dotversion = dotversion[:-1] + '.' + dotversion[-1]
  339. @@ -2230,9 +2063,9 @@ def main():
  340. ext_modules=[Extension('_struct', ['_struct.c'])],
  341.  
  342. Index: lang/python27/patches/patch-aw
  343. ===================================================================
  344. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-aw,v
  345. retrieving revision 1.3
  346. diff -u -r1.3 patch-aw
  347. --- lang/python27/patches/patch-aw 24 Apr 2015 03:01:36 -0000 1.3
  348. +++ lang/python27/patches/patch-aw 12 Jul 2015 02:17:19 -0000
  349. @@ -1,13 +1,13 @@
  350. -$NetBSD: patch-aw,v 1.3 2015/04/24 03:01:36 rodent Exp $
  351. +$NetBSD$
  352.  
  353. ---- Modules/nismodule.c.orig 2014-12-10 15:59:55.000000000 +0000
  354. +--- Modules/nismodule.c.orig Sat May 23 16:09:20 2015
  355. +++ Modules/nismodule.c
  356. @@ -89,7 +89,7 @@ nis_mapname (char *map, int *pfix)
  357. return map;
  358. }
  359.  
  360. -#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
  361. -+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
  362. ++#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__Bitrig__) || defined(__FreeBSD__) || defined(__DragonFly__)
  363. typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *);
  364. #else
  365. typedef int (*foreachfunc)(int, char *, int, char *, int, char *);
  366. Index: lang/python27/patches/patch-az
  367. ===================================================================
  368. RCS file: /cvsroot/pkgsrc/lang/python27/patches/patch-az,v
  369. retrieving revision 1.5
  370. diff -u -r1.5 patch-az
  371. --- lang/python27/patches/patch-az 24 Apr 2015 03:01:36 -0000 1.5
  372. +++ lang/python27/patches/patch-az 12 Jul 2015 02:17:19 -0000
  373. @@ -1,7 +1,16 @@
  374. -$NetBSD: patch-az,v 1.5 2015/04/24 03:01:36 rodent Exp $
  375. +$NetBSD$
  376.  
  377. ---- Modules/selectmodule.c.orig 2014-12-10 15:59:55.000000000 +0000
  378. +--- Modules/selectmodule.c.orig Sat May 23 16:09:20 2015
  379. +++ Modules/selectmodule.c
  380. +@@ -1235,7 +1235,7 @@ static PyTypeObject kqueue_queue_Type;
  381. + /*
  382. + * kevent is not standard and its members vary across BSDs.
  383. + */
  384. +-#if !defined(__OpenBSD__)
  385. ++#if !defined(__OpenBSD__) && !defined(__Bitrig__)
  386. + # define IDENT_TYPE T_UINTPTRT
  387. + # define IDENT_CAST Py_intptr_t
  388. + # define DATA_TYPE T_INTPTRT
  389. @@ -1906,7 +1906,9 @@ initselect(void)
  390. PyModule_AddIntConstant(m, "KQ_FILTER_NETDEV", EVFILT_NETDEV);
  391. #endif
Advertisement
Add Comment
Please, Sign In to add comment