$NetBSD$

1.) Fix for CVE-2012-1150 taken from here:

http://hg.python.org/cpython/rev/6b7704fe1be1

2.) Fix for unpriviliged build.

--- Makefile.pre.in.orig	2012-03-25 09:49:52.000000000 +0100
+++ Makefile.pre.in	2012-03-25 09:51:50.000000000 +0100
@@ -280,6 +280,7 @@
 		Python/pymath.o \
 		Python/pystate.o \
 		Python/pythonrun.o \
+                Python/random.o \
 		Python/structmember.o \
 		Python/symtable.o \
 		Python/sysmodule.o \
@@ -708,7 +709,7 @@
 		-@if which pybuildbot.identify >/dev/null 2>&1; then \
 			pybuildbot.identify "CC='$(CC)'" "CXX='$(CXX)'"; \
 		fi
-		$(TESTPYTHON) $(TESTPROG) -uall -rw $(TESTOPTS)
+		$(TESTPYTHON) -R $(TESTPROG) -uall -rw $(TESTOPTS)
 
 QUICKTESTOPTS=	$(TESTOPTS) -x test_thread test_signal test_strftime \
 		test_unicodedata test_re test_sre test_select test_poll \
--- Makefile.pre.in.orig	2010-08-01 22:05:31.000000000 +0000
+++ Makefile.pre.in
@@ -785,7 +785,8 @@ altbininstall:	$(BUILDPYTHON)
 				(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) $(LDLIBRARY)) \
 			fi \
 		fi; \
-	else	true; \
+	elif test -f $(INSTSONAME); then \
+		$(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
 	fi
 
 # Install the manual page
