Browse Source

Ugly hacks to get pyliblo to build

tags/v1.1
falkTX 4 years ago
parent
commit
33c6ee77ec
2 changed files with 25 additions and 12 deletions
  1. +17
    -5
      bootstrap-carla.sh
  2. +8
    -7
      setup/functions.sh

+ 17
- 5
bootstrap-carla.sh View File

@@ -302,11 +302,6 @@ PYQT5_EXTRAFLAGS="--qmake ${PAWPAW_PREFIX}/bin/qmake --sip ${PAWPAW_PREFIX}/bin/
download PyQt5${PYQT5_SUFFIX} "${PYQT5_VERSION}" "${PYQT5_DOWNLOAD_URL}" download PyQt5${PYQT5_SUFFIX} "${PYQT5_VERSION}" "${PYQT5_DOWNLOAD_URL}"
build_pyqt PyQt5${PYQT5_SUFFIX} "${PYQT5_VERSION}" "${PYQT5_EXTRAFLAGS} --concatenate --confirm-license -c" build_pyqt PyQt5${PYQT5_SUFFIX} "${PYQT5_VERSION}" "${PYQT5_EXTRAFLAGS} --concatenate --confirm-license -c"


# TODO: finish this
if [ "${WIN32}" -eq 1 ]; then
exit 0
fi

# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
# cython (optional) # cython (optional)


@@ -318,9 +313,26 @@ fi
# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
# pyliblo # pyliblo


export EXTRA_CFLAGS="$(${PAWPAW_PREFIX}/bin/python3-config --cflags | awk 'sub("-ne","")')"
export EXTRA_CFLAGS+=" $(pkg-config --cflags liblo)"

export EXTRA_LDFLAGS="-shared -L/home/falktx/PawPawBuilds/targets/win64/bin $(${PAWPAW_PREFIX}/bin/python3-config --ldflags | awk 'sub("-ne","")' | awk 'sub("/lib -lpython3.8","/lib -Wl,-Bdynamic -lpython3.8")')"
export EXTRA_LDFLAGS+=" -Wl,-Bstatic $(pkg-config --libs liblo)"

# export LINK="${TARGET_CXX}"
# export LINKER="${TARGET_CXX}"
export LDSHARED="${TARGET_CXX}"

# export PYTHONPATH="/home/falktx/PawPawBuilds/targets/win64/lib/python3.8"

download pyliblo "${PYLIBLO_VERSION}" "http://das.nasophon.de/download" download pyliblo "${PYLIBLO_VERSION}" "http://das.nasophon.de/download"
build_python pyliblo "${PYLIBLO_VERSION}" build_python pyliblo "${PYLIBLO_VERSION}"


# TODO: finish this
if [ "${WIN32}" -eq 1 ]; then
exit 0
fi

# --------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------
# setuptools_scm (optional) # setuptools_scm (optional)




+ 8
- 7
setup/functions.sh View File

@@ -375,11 +375,11 @@ function build_python() {
local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}" local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"
local python=python3 local python=python3


if [ "${CROSS_COMPILING}" -eq 1 ]; then
python="${EXE_WRAPPER} ${PAWPAW_PREFIX}/bin/python3${APP_EXT}"
elif [ ! -e "${PAWPAW_PREFIX}/bin/python3" ] && ! which python3 > /dev/null; then
python=python
fi
# if [ "${CROSS_COMPILING}" -eq 1 ]; then
# python="${EXE_WRAPPER} ${PAWPAW_PREFIX}/bin/python3${APP_EXT}"
# elif [ ! -e "${PAWPAW_PREFIX}/bin/python3" ] && ! which python3 > /dev/null; then
python=python3.8
# fi


_prebuild "${name}" "${pkgdir}" _prebuild "${name}" "${pkgdir}"


@@ -392,20 +392,21 @@ function build_python() {
export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fvisibility-inlines-hidden//')" export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fvisibility-inlines-hidden//')"
export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')" export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-dead_strip -Wl,-dead_strip_dylibs//')" export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,-dead_strip -Wl,-dead_strip_dylibs//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-Wl,--strip-all//')"
export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')" export LDFLAGS="$(echo ${LDFLAGS} | sed -e 's/-fdata-sections -ffunction-sections//')"


touch "${pkgdir}/.stamp_configured" touch "${pkgdir}/.stamp_configured"


if [ ! -f "${pkgdir}/.stamp_built" ]; then if [ ! -f "${pkgdir}/.stamp_built" ]; then
pushd "${pkgdir}" pushd "${pkgdir}"
${python} setup.py build ${extraconfrules}
${python} setup.py build ${extraconfrules} --verbose
touch .stamp_built touch .stamp_built
popd popd
fi fi


if [ ! -f "${pkgdir}/.stamp_installed" ]; then if [ ! -f "${pkgdir}/.stamp_installed" ]; then
pushd "${pkgdir}" pushd "${pkgdir}"
${python} setup.py install --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
${python} setup.py install --prefix="${PAWPAW_PREFIX}" ${extraconfrules} --verbose
touch .stamp_installed touch .stamp_installed
popd popd
fi fi


Loading…
Cancel
Save