From: yopito <yopito@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [ISSUE] cmake build style doesn't allow to choose source dir
Date: Sat, 11 Apr 2020 16:32:50 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20878@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]
New issue by yopito on void-packages repository
https://github.com/void-linux/void-packages/issues/20878
Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System
* xuname: Void 5.4.31_1 x86_64-musl GenuineIntel uptodate rrnFF
* package: packaging shiboken2 update to 5.14.2 (WIP)
### Expected behavior
want to use cmake with sources of a subdir of $wkrsrc via `-S` cmake flag:
```
[...]
wrksrc="${_pkgname}"
build_style=cmake
configure_args=" ... -S sources/shiboken2"
[...]
```
### Actual behavior
`-S <subdir>` has no effect.
### Additional details
xbps-src append "`../`" to cmake arguments unconditionally.
Resulting command is something like `cmake (args) -S sources/shiboken2 ../`
So cmake uses sources of ${wrksrc}/build/.. instead of ${wrksrc}/sources/shiboken2/
Implied by `common/build-style/cmake.sh` on sed expression L63:
```
60 # Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
61 CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
62 cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \
63 -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g')
64
```
### Workaround
My current workaround: adding subdir to $wrksrc:
```
wrksrc="${_pkgname}/sources/shiboken2"
build_style=cmake
configure_args=" ... " # removed " -S sources/shiboken2 "
[...]
```
... that makes xlint nervous:
```
srcpkgs/shiboken2/template:7: wrksrc should be a top-level directory
```
next reply other threads:[~2020-04-11 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 14:32 yopito [this message]
2020-04-11 14:43 ` pullmoll
2020-04-11 19:07 ` yopito
2020-04-11 19:08 ` xtraeme
2020-04-11 20:56 ` pullmoll
2020-04-11 21:23 ` yopito
2020-04-11 21:41 ` pullmoll
2020-04-11 21:41 ` pullmoll
2020-04-11 21:42 ` pullmoll
2020-04-11 21:42 ` pullmoll
2020-04-13 8:36 ` [ISSUE] [CLOSED] " yopito
2020-04-13 8:36 ` yopito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20878@inbox.vuxu.org \
--to=yopito@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).