ports/opt (3.2): [notify] python3: use altinstall, enable LTO, new dependency mpdecimal

crux at crux.nu crux at crux.nu
Sun Feb 12 08:09:10 UTC 2017


commit d36de341695ef1d2058a23903437b6dfbc7f31d9
Author: Danny Rawlins <monster.romster at gmail.com>
Date:   Sun Feb 12 19:08:56 2017 +1100

    [notify] python3: use altinstall, enable LTO, new dependency mpdecimal

diff --git a/python3/.footprint b/python3/.footprint
index f417a1c..c3a3219 100644
--- a/python3/.footprint
+++ b/python3/.footprint
@@ -8,10 +8,8 @@ lrwxrwxrwx	root/root	usr/bin/pydoc3 -> pydoc3.6
 lrwxrwxrwx	root/root	usr/bin/python3 -> python3.6
 lrwxrwxrwx	root/root	usr/bin/python3-config -> python3.6-config
 -rwxr-xr-x	root/root	usr/bin/python3.6
-lrwxrwxrwx	root/root	usr/bin/python3.6-config -> python3.6m-config
 -rwxr-xr-x	root/root	usr/bin/python3.6m
 -rwxr-xr-x	root/root	usr/bin/python3.6m-config
-lrwxrwxrwx	root/root	usr/bin/pyvenv -> pyvenv-3.6
 -rwxr-xr-x	root/root	usr/bin/pyvenv-3.6
 drwxr-xr-x	root/root	usr/include/
 drwxr-xr-x	root/root	usr/include/python3.6m/
@@ -121,8 +119,6 @@ lrwxrwxrwx	root/root	usr/lib/libpython3.6m.so -> libpython3.6m.so.1.0
 -r-xr-xr-x	root/root	usr/lib/libpython3.so
 drwxr-xr-x	root/root	usr/lib/pkgconfig/
 -rw-r--r--	root/root	usr/lib/pkgconfig/python-3.6.pc
-lrwxrwxrwx	root/root	usr/lib/pkgconfig/python-3.6m.pc -> python-3.6.pc
-lrwxrwxrwx	root/root	usr/lib/pkgconfig/python3.pc -> python-3.6.pc
 lrwxrwxrwx	root/root	usr/lib/python3 -> python3.6
 drwxr-xr-x	root/root	usr/lib/python3.6/
 -rw-r--r--	root/root	usr/lib/python3.6/LICENSE.txt
diff --git a/python3/Pkgfile b/python3/Pkgfile
index 992238d..7a41c34 100644
--- a/python3/Pkgfile
+++ b/python3/Pkgfile
@@ -1,16 +1,22 @@
 # Description: Python interpreter, version 3.
 # URL: https://www.python.org/
 # Maintainer: Danny Rawlins, crux at romster dot me
-# Depends on: bzip2 expat gdbm libffi openssl sqlite3 xz zlib
+# Depends on: bzip2 expat gdbm libffi mpdecimal sqlite3 xz zlib
 
 name=python3
 version=3.6.0
-release=1
+release=2
 source=(https://www.python.org/ftp/python/$version/Python-$version.tar.xz)
 
 build() {
     cd Python-$version
 
+    # Ensure that we are using the system copy of various libraries
+    rm -r Modules/expat
+    rm -r Modules/zlib
+    rm -r Modules/_ctypes/{darwin,libffi}*
+    rm -r Modules/_decimal/libmpdec
+
     # set OPT to the python default without -O3 or -g
     # our CFLAGS are used as well
     OPT="-Wall -Wstrict-prototypes -Wno-unused-result -Wsign-compare -fwrapv" \
@@ -19,16 +25,22 @@ build() {
                 --enable-ipv6 \
 		--enable-loadable-sqlite-extensions \
 		--with-threads \
+		--with-lto \
 		--with-system-expat \
 		--with-system-ffi \
+		--with-system-libmpdec \
 		--without-ensurepip
 
     make 
-    make -j1 DESTDIR=$PKG install
+    make -j1 DESTDIR=$PKG altinstall
 
-    ln -s python${version%.*} $PKG/usr/lib/$name
+    ln -s python${version%.*}        $PKG/usr/bin/python3
+    ln -s python${version%.*}-config $PKG/usr/bin/python3-config
+    ln -s idle${version%.*}          $PKG/usr/bin/idle3
+    ln -s pydoc${version%.*}         $PKG/usr/bin/pydoc3
+    ln -s python${version%.*}.1      $PKG/usr/share/man/man1/python3.1
+    ln -s python${version%.*}        $PKG/usr/lib/$name
 
-    rm $PKG/usr/bin/2to3
     rm $PKG/usr/lib/python${version%.*}/ctypes/macholib/README.ctypes
     rm $PKG/usr/lib/python${version%.*}/distutils/README
     rm $PKG/usr/lib/python${version%.*}/idlelib/{ChangeLog,NEWS.txt,NEWS2x.txt}



More information about the CRUX mailing list