Changeset 17634 in niluje


Ignore:
Timestamp:
Jul 31, 2020, 6:41:08 AM (7 days ago)
Author:
NiLuJe
Message:

Kindle Hacks:

  • X-TC:
    • Unbreak Pillow build One day, this shit will actually be documented and not require insane workarounds. One day.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Configs/trunk/Kindle/Misc/x-compile.sh

    r17633 r17634  
    32993299## NOTE: Usig the host's real Python install is hackish, but our hostpython might not have enough modules built to handle everything... Here's how it should have been called, though:
    33003300# env PYTHONPATH="${TC_BUILD_DIR}/Python-${PYTHON_CUR_VER}/${CROSS_TC}/hostpythonpath" ../Python-${PYTHON_CUR_VER}/${CROSS_TC}/hostpython
     3301## HTTPie's plugin system requires pkg_resources, which is part of setuptools...
     3302## The Py3-way of doing cross-compilation *may* also need it...
     3303rm -rf setuptools-49.2.0
     3304wget https://pypi.python.org/packages/source/s/setuptools/setuptools-49.2.0.zip -O setuptools-49.2.0.zip
     3305unzip setuptools-49.2.0.zip
     3306cd setuptools-49.2.0
     3307update_title_info
     3308for py_ver in ${PYTHON_VERSIONS} ; do
     3309        if [[ "${py_ver}" == 3.* ]] ; then
     3310                py_home="python3"
     3311        else
     3312                py_home="python"
     3313                # Skip
     3314                continue
     3315        fi
     3316
     3317        python${py_ver} setup.py install --root=${TC_BUILD_DIR}/${py_home} --prefix=. --install-lib=lib/python${py_ver}/site-packages --no-compile
     3318done
     3319cd ..
    33013320## chardet
    33023321rm -rf chardet-3.0.4
     
    38583877
    38593878        env CC="${CROSS_TC}-gcc" LDSHARED="${CROSS_TC}-gcc -shared" PYTHONXCPREFIX="${TC_BUILD_DIR}/${py_home}" LDFLAGS="${BASE_LDFLAGS} -L${TC_BUILD_DIR}/${py_home}/lib -L${TC_BUILD_DIR}/${py_home}/usr/lib -L${HOME}/x-tools/${CROSS_TC}/${CROSS_TC}/sysroot/usr/lib -Wl,-rpath=${DEVICE_USERSTORE}/${py_home}/lib" python${py_ver} setup.py clean --all
    3860         env CC="${CROSS_TC}-gcc" LDSHARED="${CROSS_TC}-gcc -shared" PYTHONXCPREFIX="${TC_BUILD_DIR}/${py_home}" LDFLAGS="${BASE_LDFLAGS} -L${TC_BUILD_DIR}/${py_home}/lib -L${TC_BUILD_DIR}/${py_home}/usr/lib -L${HOME}/x-tools/${CROSS_TC}/${CROSS_TC}/sysroot/usr/lib -Wl,-rpath=${DEVICE_USERSTORE}/${py_home}/lib" python${py_ver} setup.py build -x
     3879        # NOTE: disutilscross uses the host's sysconfigdata. This means a -I/usr/include is added, which, besides being a terrible idea when cross-compiling, breaks compilation here... Use the Py3-ish way from https://bugs.python.org/msg282141 instead...
     3880        env _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata__linux_arm-linux-gnueabi" PYTHONHOME="${TC_BUILD_DIR}/${py_home}" PYTHONPATH="/usr/lib/python${py_ver}/lib-dynload" setup.py build
     3881        #env CC="${CROSS_TC}-gcc" LDSHARED="${CROSS_TC}-gcc -shared" PYTHONXCPREFIX="${TC_BUILD_DIR}/${py_home}" LDFLAGS="${BASE_LDFLAGS} -L${TC_BUILD_DIR}/${py_home}/lib -L${TC_BUILD_DIR}/${py_home}/usr/lib -L${HOME}/x-tools/${CROSS_TC}/${CROSS_TC}/sysroot/usr/lib -Wl,-rpath=${DEVICE_USERSTORE}/${py_home}/lib" python${py_ver} setup.py build -x
    38613882        env CC="${CROSS_TC}-gcc" LDSHARED="${CROSS_TC}-gcc -shared" PYTHONXCPREFIX="${TC_BUILD_DIR}/${py_home}" LDFLAGS="${BASE_LDFLAGS} -L${TC_BUILD_DIR}/${py_home}/lib -L${TC_BUILD_DIR}/${py_home}/usr/lib -L${HOME}/x-tools/${CROSS_TC}/${CROSS_TC}/sysroot/usr/lib -Wl,-rpath=${DEVICE_USERSTORE}/${py_home}/lib" python${py_ver} setup.py install --root=${TC_BUILD_DIR}/${py_home} --prefix=. --install-lib=lib/python${py_ver}/site-packages --no-compile --skip-build
    38623883done
     
    40824103
    40834104        python${py_ver} setup.py clean --all
    4084         python${py_ver} setup.py install --root=${TC_BUILD_DIR}/${py_home} --prefix=. --install-lib=lib/python${py_ver}/site-packages --no-compile
    4085 done
    4086 cd ..
    4087 ## HTTPie's plugin system requires pkg_resources, which is part of setuptools...
    4088 rm -rf setuptools-49.2.0
    4089 wget https://pypi.python.org/packages/source/s/setuptools/setuptools-49.2.0.zip -O setuptools-49.2.0.zip
    4090 unzip setuptools-49.2.0.zip
    4091 cd setuptools-49.2.0
    4092 update_title_info
    4093 for py_ver in ${PYTHON_VERSIONS} ; do
    4094         if [[ "${py_ver}" == 3.* ]] ; then
    4095                 py_home="python3"
    4096         else
    4097                 py_home="python"
    4098                 # Skip
    4099                 continue
    4100         fi
    4101 
    41024105        python${py_ver} setup.py install --root=${TC_BUILD_DIR}/${py_home} --prefix=. --install-lib=lib/python${py_ver}/site-packages --no-compile
    41034106done
Note: See TracChangeset for help on using the changeset viewer.