Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed replacements in conda_build_config.yaml #79

Open
hmaarrfk opened this issue Dec 5, 2022 · 1 comment
Open

Malformed replacements in conda_build_config.yaml #79

hmaarrfk opened this issue Dec 5, 2022 · 1 comment

Comments

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Dec 5, 2022

replacement_re: '$(CONDA_BUILD_SYSROOT)'

replacements:
  all_replacements:
    - tag: 'qmake build metadata'
      glob_patterns:
        - '*.pri'
        - '*.prl'
      regex_re: '(?:-L|-I)?\"?([^;\s]+\/sysroot)'
      replacement_re: '$(CONDA_BUILD_SYSROOT)'
      regex_rg: '([^;\s"]+/sysroot)'

seem to be malformed. in qt-webengine, I used sed to replace them with the actual value of ${CONDA_BUILD_SYSROOT}, fully expanded.

I'm not sure if there is a right syntax to use here, or if we should it manaually do the replacement in the build script if we can't do it in the config file.

@hmaarrfk
Copy link
Contributor Author

hmaarrfk commented Dec 9, 2022

I had to add the following code in the build script of qt-webengine to fixup the replacements for compilation:

    pushd "${PREFIX}/lib"
    for f in *.prl; do
        sed -i "s,\$.CONDA_BUILD_SYSROOT),${CONDA_BUILD_SYSROOT},g" ${f};
    done
    popd

    pushd "${PREFIX}/mkspecs"
    for f in *.pri; do
        sed -i "s,\$.CONDA_BUILD_SYSROOT),${CONDA_BUILD_SYSROOT},g" ${f}
    done
    popd

    pushd
    cd "${PREFIX}/mkspecs/modules"
    for f in *.pri; do
        sed -i "s,\$.CONDA_BUILD_SYSROOT),${CONDA_BUILD_SYSROOT},g" ${f}
    done
    popd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant