From 0b34be07625808976bb62318a2520960fdbc4926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 6 Apr 2021 11:26:29 +0100 Subject: groups/010.host_deps.group:python[23]_host:${PKG_URLS_GIT}: update subdir to build/sbpython[23]. groups/010.host_deps.group:python2_host:${PKG_SUBDIR}: set to Python-${PKG_PYTHON2_HOST_VERSION}. groups/221.native_packages_dev.group:python[23]:${PKG_URLS_GIT}: update subdir to build/sbpython[23]. groups/221.native_packages_dev.group:python2:${PKG_SUBDIR}: set to Python-${PKG_PYTHON2_VERSION}. patches/python2_host-2.7.15.local.patch: split from vars/python2_host.vars. patches/python3_host-3.6.3.local.patch: split from vars/python3_host.vars. vars/python[23]{_host,}.vars: deleted --- groups/010.host_deps.group | 5 +-- groups/221.native_packages_dev.group | 5 +-- patches/python2_host-2.7.15.local.patch | 32 +++++++++++++++++++ patches/python3_host-3.6.3.local.patch | 54 +++++++++++++++++++++++++++++++++ vars/python2.vars | 18 ----------- vars/python2_host.vars | 22 -------------- vars/python2_minipix.vars | 1 - vars/python3.vars | 14 --------- vars/python3_host.vars | 24 --------------- 9 files changed, 92 insertions(+), 83 deletions(-) create mode 100644 patches/python2_host-2.7.15.local.patch create mode 100644 patches/python3_host-3.6.3.local.patch delete mode 100644 vars/python2.vars delete mode 100644 vars/python2_host.vars delete mode 120000 vars/python2_minipix.vars delete mode 100644 vars/python3.vars delete mode 100644 vars/python3_host.vars diff --git a/groups/010.host_deps.group b/groups/010.host_deps.group index da54594a..292b6618 100644 --- a/groups/010.host_deps.group +++ b/groups/010.host_deps.group @@ -192,18 +192,19 @@ HOST_DEPS_PREFIX="${PREFIX}"; : ${PKG_PYTHON2_HOST_SHA256SUM:=18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db}; : ${PKG_PYTHON2_HOST_VERSION:=2.7.15}; : ${PKG_PYTHON2_HOST_URL:="https://www.python.org/ftp/python/${PKG_PYTHON2_HOST_VERSION}/Python-${PKG_PYTHON2_HOST_VERSION}.tgz"}; -: ${PKG_PYTHON2_HOST_URLS_GIT:="sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"}; +: ${PKG_PYTHON2_HOST_URLS_GIT:="build/sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"}; : ${PKG_PYTHON2_HOST_BASE_DIR:=${BUILD_WORKDIR}/python2_host-host-${DEFAULT_TARGET}}; : ${PKG_PYTHON2_HOST_BUILD_DIR:=build/python2}; : ${PKG_PYTHON2_HOST_CONFIGURE:=build/sbpython2/configure}; : ${PKG_PYTHON2_HOST_CONFIGURE_ARGS:="--source-dir=../../Python-${PKG_PYTHON2_HOST_VERSION} --prefix=${PREFIX}"}; : ${PKG_PYTHON2_HOST_ENV_VARS_EXTRA:="NATIVE_LDFLAGS=-Wl,-rpath,${PREFIX}/lib"}; : ${PKG_PYTHON2_HOST_MAKEFLAGS_INSTALL_EXTRA:="PREFIX= EXEC_PREFIX= BINDIR=/bin SBINDIR=/sbin LIBDIR=/lib INCLUDEDIR=/include OLDINCLUDEDIR=/include MANDIR=/share/man DOCDIR=/share/doc LIBEXECDIR=/libexec"}; +: ${PKG_PYTHON2_HOST_SUBDIR:=Python-${PKG_PYTHON2_HOST_VERSION}}; : ${PKG_PYTHON3_HOST_DEPENDS:="bzip2_host expat_host gdbm_host libffi_host libreadline_host libressl_host libz_host ncurses_host ncursesw_host sqlite3_host xz_host"}; : ${PKG_PYTHON3_HOST_SHA256SUM:=ab6193af1921b30f587b302fe385268510e80187ca83ca82d2bfe7ab544c6f91}; : ${PKG_PYTHON3_HOST_VERSION:=3.6.3}; : ${PKG_PYTHON3_HOST_URL:="https://www.python.org/ftp/python/${PKG_PYTHON3_HOST_VERSION}/Python-${PKG_PYTHON3_HOST_VERSION}.tgz"}; -: ${PKG_PYTHON3_HOST_URLS_GIT:="sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"}; +: ${PKG_PYTHON3_HOST_URLS_GIT:="build/sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"}; : ${PKG_PYTHON3_HOST_BASE_DIR:=${BUILD_WORKDIR}/python3_host-host-${DEFAULT_TARGET}}; : ${PKG_PYTHON3_HOST_BUILD_DIR:=build/python3}; : ${PKG_PYTHON3_HOST_CONFIGURE:=build/sbpython3/configure}; diff --git a/groups/221.native_packages_dev.group b/groups/221.native_packages_dev.group index 9b45d967..39d23025 100644 --- a/groups/221.native_packages_dev.group +++ b/groups/221.native_packages_dev.group @@ -102,17 +102,18 @@ patch patchutils perl python2 python3 ruby sbsigntools smallbasic tk")"; : ${PKG_PYTHON2_SHA256SUM:=18617d1f15a380a919d517630a9cd85ce17ea602f9bbdc58ddc672df4b0239db}; : ${PKG_PYTHON2_VERSION:=2.7.15}; : ${PKG_PYTHON2_URL:="https://www.python.org/ftp/python/${PKG_PYTHON2_VERSION}/Python-${PKG_PYTHON2_VERSION}.tgz"}; -: ${PKG_PYTHON2_URLS_GIT:="sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"}; +: ${PKG_PYTHON2_URLS_GIT:="build/sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"}; : ${PKG_PYTHON2_BASE_DIR:=${BUILD_WORKDIR}/python2-native-${DEFAULT_TARGET}}; : ${PKG_PYTHON2_BUILD_DIR:=build/python2}; : ${PKG_PYTHON2_CONFIGURE:=build/sbpython2/configure}; : ${PKG_PYTHON2_CONFIGURE_ARGS:="--source-dir=../../Python-${PKG_PYTHON2_VERSION} --sysroot=${PREFIX_NATIVE} --prefix= --target=${DEFAULT_TARGET}"}; : ${PKG_PYTHON2_ENV_VARS_EXTRA:="NATIVE_CFLAGS=-std=c99 -D_XOPEN_SOURCE=700 -I${PREFIX}/include:NATIVE_LDFLAGS=-L${PREFIX}/lib -ltinfo -Wl,-rpath,${PREFIX}/lib"}; +: ${PKG_PYTHON2_SUBDIR:=Python-${PKG_PYTHON2_VERSION}}; : ${PKG_PYTHON3_DEPENDS:="bzip2 curl expat gdbm libffi libreadline libressl libz ncursesw sqlite3 xz"}; : ${PKG_PYTHON3_SHA256SUM:=ab6193af1921b30f587b302fe385268510e80187ca83ca82d2bfe7ab544c6f91}; : ${PKG_PYTHON3_VERSION:=3.6.3}; : ${PKG_PYTHON3_URL:="https://www.python.org/ftp/python/${PKG_PYTHON3_VERSION}/Python-${PKG_PYTHON3_VERSION}.tgz"}; -: ${PKG_PYTHON3_URLS_GIT:="sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"}; +: ${PKG_PYTHON3_URLS_GIT:="build/sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"}; : ${PKG_PYTHON3_BASE_DIR:=${BUILD_WORKDIR}/python3-native-${DEFAULT_TARGET}}; : ${PKG_PYTHON3_BUILD_DIR:=build/python3}; : ${PKG_PYTHON3_CONFIGURE:=build/sbpython3/configure}; diff --git a/patches/python2_host-2.7.15.local.patch b/patches/python2_host-2.7.15.local.patch new file mode 100644 index 00000000..c237daa8 --- /dev/null +++ b/patches/python2_host-2.7.15.local.patch @@ -0,0 +1,32 @@ +--- ./build/sbpython2/project/config/cfgdefs.sh.orig 2021-04-06 10:42:07.823432394 +0100 ++++ ./build/sbpython2/project/config/cfgdefs.sh 2021-04-06 10:46:44.345427809 +0100 +@@ -106,6 +106,7 @@ + if [ -n "$pycfg_pymalloc" ]; then + cfgtest_cflags_append '-DWITH_PYMALLOC' + fi ++cfgtest_ldflags_append "-L$mb_prefix/lib" + } + + +@@ -306,8 +307,8 @@ + fi + + # ncurses libs (common part) +- mb_ncurses_libs='-lpanelw -lncursesw' +- mb_ncurses_tinfo='-ltinfo' ++ mb_ncurses_libs='-lpanelw -lncursesw -ltinfow' ++ mb_ncurses_tinfo='-ltinfow' + + if cfgtest_library_presence $mb_ncurses_tinfo; then + mb_ncurses_libs="$mb_ncurses_libs $mb_ncurses_tinfo" +--- ./build/sbpython2/project/pyexts.mk.orig 2021-04-06 10:42:07.827432250 +0100 ++++ ./build/sbpython2/project/pyexts.mk 2021-04-06 10:49:55.946499708 +0100 +@@ -1017,7 +1017,7 @@ + PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo) + PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o) + +-PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(OS_LIB_SUFFIX) ++#PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(OS_LIB_SUFFIX) + PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT) + + $(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS) diff --git a/patches/python3_host-3.6.3.local.patch b/patches/python3_host-3.6.3.local.patch new file mode 100644 index 00000000..cd0bb169 --- /dev/null +++ b/patches/python3_host-3.6.3.local.patch @@ -0,0 +1,54 @@ +--- ./build/sbpython3/project/config/cfgdefs.sh.orig 2021-04-05 11:17:27.238909690 +0100 ++++ ./build/sbpython3/project/config/cfgdefs.sh 2021-04-06 10:51:52.866273106 +0100 +@@ -106,6 +106,7 @@ + if [ -n "$pycfg_pymalloc" ]; then + cfgtest_cflags_append '-DWITH_PYMALLOC' + fi ++cfgtest_ldflags_append "-L$mb_prefix/lib" + } + + +@@ -306,8 +307,8 @@ + fi + + # ncurses libs (common part) +- mb_ncurses_libs='-lpanelw -lncursesw' +- mb_ncurses_tinfo='-ltinfo' ++ mb_ncurses_libs='-lpanelw -lncursesw -ltinfow' ++ mb_ncurses_tinfo='-ltinfow' + + if cfgtest_library_presence $mb_ncurses_tinfo; then + mb_ncurses_libs="$mb_ncurses_libs $mb_ncurses_tinfo" +--- ./build/sbpython3/project/variants/3.6.3/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100 ++++ ./build/sbpython3/project/variants/3.6.3/pyexts.mk 2021-04-06 10:51:52.898271950 +0100 +@@ -1012,7 +1012,7 @@ + PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo) + PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o) + +-PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) ++#PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) + PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT) + + $(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS) +--- ./build/sbpython3/project/variants/3.7.1/pyexts.mk.orig 2021-04-05 11:17:27.246909408 +0100 ++++ ./build/sbpython3/project/variants/3.7.1/pyexts.mk 2021-04-06 10:51:52.930270793 +0100 +@@ -1068,7 +1068,7 @@ + PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo) + PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o) + +-PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) ++#PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) + PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT) + + $(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS) +--- ./build/sbpython3/project/variants/3.7.2/pyexts.mk.orig 2021-04-05 11:17:27.250909267 +0100 ++++ ./build/sbpython3/project/variants/3.7.2/pyexts.mk 2021-04-06 10:51:52.958269781 +0100 +@@ -1068,7 +1068,7 @@ + PYEXT_OSSAUDIODEV_LOBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.lo) + PYEXT_OSSAUDIODEV_OBJS = $(PYEXT_OSSAUDIODEV_SRCS:.c=.o) + +-PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) ++#PYEXT_OSSAUDIODEV_SHARED = pyext/ossaudiodev$(PYTHON_SOEXT) + PYEXT_OSSAUDIODEV_STATIC = pyext/ossaudiodev$(OS_ARCHIVE_EXT) + + $(PYEXT_OSSAUDIODEV_SHARED): $(PYEXT_OSSAUDIODEV_LOBJS) diff --git a/vars/python2.vars b/vars/python2.vars deleted file mode 100644 index 67a39d09..00000000 --- a/vars/python2.vars +++ /dev/null @@ -1,18 +0,0 @@ -# -# set +o errexit -o noglob -o nounset is assumed. -# - -pkg_python2_fetch_download() { - if ! pkg_fetch_download\ - || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}/${PKG_NAME}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ - || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then - return 1; - fi; -}; - -pkg_python2_minipix_fetch_download() { - pkg_python2_fetch_download "${@}"; -}; - -# vim:filetype=sh textwidth=0 diff --git a/vars/python2_host.vars b/vars/python2_host.vars deleted file mode 100644 index 8222aac9..00000000 --- a/vars/python2_host.vars +++ /dev/null @@ -1,22 +0,0 @@ -# -# set +o errexit -o noglob -o nounset is assumed. -# - -pkg_python2_host_fetch_download() { - if ! pkg_fetch_download\ - || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython2"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}/${PKG_NAME}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython2=${DEFAULT_GITROOT}/python/sbpython2@main"\ - || ! rtl_fileop cp "../sbpython2/project/config/cfgdefs.sh" "../sbpython2/project/config/cfgdefs.sh.orig"\ - || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" ../sbpython2/project/config/cfgdefs.sh\ - || ! sed -i"" -e'108a\ -cfgtest_ldflags_append "-L$mb_prefix/lib"' "../sbpython2/project/config/cfgdefs.sh"\ - || ! sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ -PYCOMPILE_CFLAGS += -I'"${PREFIX}"'/include -' "../sbpython2/project/pycompile.mk"\ - || ! sed -i"" '/^PYEXT_OSSAUDIODEV_SHARED/s/^/#/' ../sbpython2/project/pyexts.mk\ - || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then - return 1; - fi; -}; - -# vim:filetype=sh textwidth=0 diff --git a/vars/python2_minipix.vars b/vars/python2_minipix.vars deleted file mode 120000 index 2eb322d5..00000000 --- a/vars/python2_minipix.vars +++ /dev/null @@ -1 +0,0 @@ -python2.vars \ No newline at end of file diff --git a/vars/python3.vars b/vars/python3.vars deleted file mode 100644 index 3e3bd32f..00000000 --- a/vars/python3.vars +++ /dev/null @@ -1,14 +0,0 @@ -# -# set +o errexit -o noglob -o nounset is assumed. -# - -pkg_python3_fetch_download() { - if ! pkg_fetch_download\ - || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}/${PKG_NAME}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ - || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then - return 1; - fi; -}; - -# vim:filetype=sh textwidth=0 diff --git a/vars/python3_host.vars b/vars/python3_host.vars deleted file mode 100644 index df70b7be..00000000 --- a/vars/python3_host.vars +++ /dev/null @@ -1,24 +0,0 @@ -# -# set +o errexit -o noglob -o nounset is assumed. -# - -pkg_python3_host_fetch_download() { - if ! pkg_fetch_download\ - || ! rtl_fileop rm "${PKG_BASE_DIR}/sbpython3"\ - || ! rtl_fetch_urls_git "${BUILD_DLCACHEDIR}/${PKG_NAME}" "${DEFAULT_GIT_ARGS}" "${PKG_BASE_DIR}/build" "${PKG_NAME}" "${PKG_MIRRORS_GIT:-}" "sbpython3=${DEFAULT_GITROOT}/python/sbpython3@main"\ - || ! rtl_fileop cp "../sbpython3/project/config/cfgdefs.sh" "../sbpython3/project/config/cfgdefs.sh.orig"\ - || ! sed -i"" -e"s/-ltinfo/&w/" -e"s/mb_ncurses_libs='\([^']*\)'/mb_ncurses_libs='\1 -ltinfow'/" "../sbpython3/project/config/cfgdefs.sh"\ - || ! sed -i"" -e'108a\ -cfgtest_ldflags_append "-L$mb_prefix/lib"' "../sbpython3/project/config/cfgdefs.sh"\ - || ! sed -i"" '/^PYCOMPILE_CFLAGS.*+= -std=c99/a\ -PYCOMPILE_CFLAGS += -I'"${PREFIX}"'/include -' "../sbpython3/project/pycompile.mk"\ - || ! sed -i"" '/^PYEXT_OSSAUDIODEV_SHARED/s/^/#/' ../sbpython3/project/variants/3.6.3/pyexts.mk\ - || ! sed -i"" '/^PYEXT_OSSAUDIODEV_SHARED/s/^/#/' ../sbpython3/project/variants/3.7.1/pyexts.mk\ - || ! sed -i"" '/^PYEXT_OSSAUDIODEV_SHARED/s/^/#/' ../sbpython3/project/variants/3.7.2/pyexts.mk\ - || ! ex_pkg_state_set "${PKG_NAME}" "fetch_download" "-fetch_extract"; then - return 1; - fi; -}; - -# vim:filetype=sh textwidth=0 -- cgit v1.2.3