Packaging espanso: How to supply compile flags (like "-I/usr/include/libxkbcommon") to the cargo build command?
Hi all, I came across espanso, a "cross-platform Text Expander written in Rust", and wanted to package it. I saw that there were some packages built for an older version, started by rickyk. I reworked the package, updated it to the current version and the current cargo packaging guidelines. And then ran into the same issue others also had on openSUSE: Specifying a different include location for xkbcommon. https://github.com/espanso/espanso/issues/995 I tried various ways to supply the compiler flag "-I/usr/include/libxkbcommon", but somehow none worked. I tried: %define __rustflags -Clink-arg=-I/usr/include/libxkbcommon export CXXFLAGS+="-I/usr/include/libxkbcommon" export OPTFLAGS+="-I/usr/include/libxkbcommon" export OPTFLAGS="%{optsflags} -I/usr/include/libxkbcommon" But this does not seem to be respected. How would I do this properly? Kind Regards, Johannes
Hey, I sent you an SR which fixes the build. still sitting at it to fix 15.6. You have to use $optflags, not %optflags. did the same mistake a couple days ago. still not 100% sure why though. Kind Reqgards, Richard -----Original Message----- From: Johannes Kastl <mail@johannes-kastl.de> To: packaging <packaging@lists.opensuse.org> Subject: Packaging espanso: How to supply compile flags (like "- I/usr/include/libxkbcommon") to the cargo build command? Date: 18/08/24 15:57:09 Hi all, I came across espanso, a "cross-platform Text Expander written in Rust", and wanted to package it. I saw that there were some packages built for an older version, started by rickyk. I reworked the package, updated it to the current version and the current cargo packaging guidelines. And then ran into the same issue others also had on openSUSE: Specifying a different include location for xkbcommon. https://github.com/espanso/espanso/issues/995 I tried various ways to supply the compiler flag "-I/usr/include/libxkbcommon", but somehow none worked. I tried: %define __rustflags -Clink-arg=-I/usr/include/libxkbcommon export CXXFLAGS+="-I/usr/include/libxkbcommon" export OPTFLAGS+="-I/usr/include/libxkbcommon" export OPTFLAGS="%{optsflags} -I/usr/include/libxkbcommon" But this does not seem to be respected. How would I do this properly? Kind Regards, Johannes
On 18.08.24 18:36 Richard Rahl wrote:
Hey,
I sent you an SR which fixes the build. still sitting at it to fix 15.6.
You have to use $optflags, not %optflags. did the same mistake a couple days ago. still not 100% sure why though.
Thanks Richard, I'll have a look later! Kind Regards, Johannes
participants (2)
-
Johannes Kastl
-
Richard Rahl