diff --git a/python3/patches/python3.fix-comment-style.patch b/python3/patches/python3.fix-comment-style.patch new file mode 100644 index 0000000..03a2ee3 --- /dev/null +++ b/python3/patches/python3.fix-comment-style.patch @@ -0,0 +1,11 @@ +--- Python-3.6.0/Include/pyport.h.orig 2017-01-01 07:58:08.575202311 +0700 ++++ Python-3.6.0/Include/pyport.h 2017-01-01 07:58:20.332234160 +0700 +@@ -37,7 +37,7 @@ + * integral synonyms. Only define the ones we actually need. + */ + +-// long long is required. Ensure HAVE_LONG_LONG is defined for compatibility. ++/* long long is required. Ensure HAVE_LONG_LONG is defined for compatibility. */ + #ifndef HAVE_LONG_LONG + #define HAVE_LONG_LONG + #endif diff --git a/python3/patches/python3.no-static-library.diff b/python3/patches/python3.no-static-library.diff index c33aeed..2821ca7 100644 --- a/python3/patches/python3.no-static-library.diff +++ b/python3/patches/python3.no-static-library.diff @@ -1,6 +1,6 @@ -diff -uar Python-3.5.1.orig/Makefile.pre.in Python-3.5.1/Makefile.pre.in ---- Python-3.5.1.orig/Makefile.pre.in 2015-12-07 03:39:09.000000000 +0200 -+++ Python-3.5.1/Makefile.pre.in 2015-12-14 21:25:22.103542432 +0200 +diff -uar Python-3.6.0.orig/Makefile.pre.in Python-3.6.0/Makefile.pre.in +--- Python-3.6.0.orig/Makefile.pre.in 2016-12-23 04:21:21.000000000 +0200 ++++ Python-3.6.0/Makefile.pre.in 2016-12-27 22:50:14.139741226 +0200 @@ -564,7 +564,7 @@ $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make @@ -10,10 +10,10 @@ diff -uar Python-3.5.1.orig/Makefile.pre.in Python-3.5.1/Makefile.pre.in $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) platform: $(BUILDPYTHON) pybuilddir.txt -@@ -599,18 +599,6 @@ - _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ +@@ -609,18 +609,6 @@ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + -# Build static library -# avoid long command lines, same as LIBRARY_OBJS -$(LIBRARY): $(LIBRARY_OBJS) @@ -22,14 +22,14 @@ diff -uar Python-3.5.1.orig/Makefile.pre.in Python-3.5.1/Makefile.pre.in - $(AR) $(ARFLAGS) $@ $(PARSER_OBJS) - $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS) - $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS) Python/frozen.o -- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS) +- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) - $(AR) $(ARFLAGS) $@ $(MODOBJS) - $(RANLIB) $@ - libpython$(LDVERSION).so: $(LIBRARY_OBJS) if test $(INSTSONAME) != $(LDLIBRARY); then \ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -@@ -700,7 +688,7 @@ +@@ -710,7 +698,7 @@ echo "-----------------------------------------------"; \ fi @@ -38,7 +38,7 @@ diff -uar Python-3.5.1.orig/Makefile.pre.in Python-3.5.1/Makefile.pre.in $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) ############################################################################ -@@ -1372,18 +1360,6 @@ +@@ -1388,18 +1376,6 @@ else true; \ fi; \ done diff --git a/python3/python3.SlackBuild b/python3/python3.SlackBuild index 938ea2d..fdbbec5 100644 --- a/python3/python3.SlackBuild +++ b/python3/python3.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for python3 -# Copyright 2012-2015 Audrius Kažukauskas +# Copyright 2012-2017 Audrius Kažukauskas # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,9 @@ # Modified by Willy Sudiarto Raharjo for CSB Project PRGNAM=python3 -VERSION=${VERSION:-3.5.2} +SRCNAM=Python +VERSION=${VERSION:-3.6.0} +BRANCH_VERSION=$(echo $VERSION | cut -f 1,2 -d . ) BUILD=${BUILD:-1} TAG=${TAG:-_csb} @@ -56,26 +58,27 @@ else LIBDIRSUFFIX="" fi -PYVER=$(cut -d. -f1,2 <<< "$VERSION") - set -eu # Location for Python site-packages. -SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/python${PYVER}/site-packages +SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/python${BRANCH_VERSION}/site-packages # Same as above without $PKG. -TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/python${PYVER}/site-packages +TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/python${BRANCH_VERSION}/site-packages rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf Python-$VERSION -tar xvf $CWD/Python-$VERSION.tar.xz -cd Python-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.xz +cd $SRCNAM-$VERSION patch -p1 -i $CWD/patches/python3.readline.set_pre_input_hook.diff # We don't want a large libpython*.a. patch -p1 -i $CWD/patches/python3.no-static-library.diff +# Change comment style from C++ to C, which fixes building pygobject3-python3. +patch -p1 -i $CWD/patches/python3.fix-comment-style.patch + if [ "$ARCH" = "x86_64" ]; then # Install to lib64 instead of lib. patch -p1 -i $CWD/patches/python3.x86_64.diff @@ -111,8 +114,8 @@ make make install DESTDIR=$PKG # Restore original ensurepip behaviour. -sed -i 's|\("install",\) "--ignore-installed",|\1|' \ - $PKG/usr/lib${LIBDIRSUFFIX}/python${PYVER}/ensurepip/__init__.py +sed -i 's| "--ignore-installed",||' \ + $PKG/usr/lib${LIBDIRSUFFIX}/python${BRANCH_VERSION}/ensurepip/__init__.py # Remove to avoid overwriting a copy from Python2. rm -f $PKG/usr/bin/2to3