Message ID | 20210825180332.5720-16-maximedevos@telenet.be |
---|---|
State | Accepted |
Headers | show |
Series | Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Hey, > + (string-append dir "/_giscanner.cpython-39-" > + (normalise-system system) ".so")) Won't this be "cpython-310-" or so when we will update the Python package definition? Thanks, Mathieu
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index ac38cd40d2..0c2f548f62 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -411,21 +411,40 @@ functions for strings and common data structures.") "-Dbuild_introspection_data=false")) '()) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - ;; 'typelibs' is undefined. - `((add-after 'unpack 'set-typelibs - (lambda _ - (substitute* "meson.build" - (("\\bsources: typelibs\\b") - "sources: []"))))) - '()) + #$@(if (%current-target-system) + ;; 'typelibs' is undefined. + `((add-after 'unpack 'set-typelibs + (lambda _ + (substitute* "meson.build" + (("\\bsources: typelibs\\b") + "sources: []"))))) + '()) (add-after 'unpack 'do-not-use-/usr/bin/env (lambda _ (substitute* "tools/g-ir-tool-template.in" (("#!@PYTHON_CMD@") (string-append "#!" (which "python3")))) - #t))))) + #t)) + #$@(if (%current-target-system) + ;; Meson gives python extensions an incorrect name, see + ;; <https://github.com/mesonbuild/meson/issues/7049>. + #~((add-after 'install 'rename-library + (lambda* (#:key build target #:allow-other-keys) + (define dir + (string-append #$output + "/lib/gobject-introspection/giscanner")) + ;; python uses strings like 'x86_64-linux-gnu', not + ;; 'x86_64-unknown-linux-gnu'. + (define (normalise-system system) + ((@ (ice-9 string-fun) string-replace-substring) + system "-unknown-" "-")) + (define (extension system) + (string-append dir "/_giscanner.cpython-39-" + (normalise-system system) ".so")) + (rename-file (extension build) (extension target))))) + #~())))) (native-inputs `(("glib" ,glib "bin") ("pkg-config" ,pkg-config)