Github messages for voidlinux
 help / Atom feed
* [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
@ 2019-07-27  0:51 voidlinux-github
  2019-07-30 15:34 ` voidlinux-github
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: voidlinux-github @ 2019-07-27  0:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages xbps-libc
https://github.com/void-linux/void-packages/pull/13356

xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
This can be used in template checks to remove the clunky case statements and pattern matching, as well as simplify normal ifs.

For example:

```
if [ "${XBPS_TARGET_MACHINE%-musl}" = "${XBPS_TARGET_MACHINE}" ]; then
    ... glibc specific ...
fi
```

or

```
case "$XBPS_TARGET_MACHINE" in
    *-musl) ;;
    *) ... glibc specific ...
esac
```

becomes a simple:

```
if [ "${XBPS_TARGET_LIBC}" = "glibc" ]; then
   ... glibc specific ...
fi
```

I've noticed these are common enough of patterns in our stuff to make this worthwhile. The implementation should be sound, I checked and there aren't any `uname` values with a dash in them.

A patch file from https://github.com/void-linux/void-packages/pull/13356.patch is attached

[-- Attachment #2: github-pr-xbps-libc-13356.patch --]
[-- Type: text/x-diff, Size: 1406 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
  2019-07-27  0:51 [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC voidlinux-github
@ 2019-07-30 15:34 ` voidlinux-github
  2019-07-30 15:38 ` voidlinux-github
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: voidlinux-github @ 2019-07-30 15:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/13356#issuecomment-516472989
Comment:
This should work AFAICT while I think it'd be better to add this to the profiles.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
  2019-07-27  0:51 [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC voidlinux-github
  2019-07-30 15:34 ` voidlinux-github
@ 2019-07-30 15:38 ` voidlinux-github
  2019-07-30 15:38 ` voidlinux-github
  2019-07-30 15:39 ` voidlinux-github
  3 siblings, 0 replies; 5+ messages in thread
From: voidlinux-github @ 2019-07-30 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/13356#issuecomment-516474521
Comment:
Why? IMO if the variable can be guessed from available information, there isn't any need to further complicate the profiles by explicitly specifying it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
  2019-07-27  0:51 [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC voidlinux-github
  2019-07-30 15:34 ` voidlinux-github
  2019-07-30 15:38 ` voidlinux-github
@ 2019-07-30 15:38 ` voidlinux-github
  2019-07-30 15:39 ` voidlinux-github
  3 siblings, 0 replies; 5+ messages in thread
From: voidlinux-github @ 2019-07-30 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/13356#issuecomment-516472989
Comment:
This should work AFAICT while I think it'd be better to add this to the profiles.
Perhaps at the same time we could once and for all define the endianness of the machine and target as well.
`XBPS_ENDIAN=little` or `XBPS_ENDIAN=big` and also `XBPS_TARGET_ENDIAN...` in cross-profiles. No more case/esac for endianness specific template sections.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC
  2019-07-27  0:51 [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC voidlinux-github
                   ` (2 preceding siblings ...)
  2019-07-30 15:38 ` voidlinux-github
@ 2019-07-30 15:39 ` voidlinux-github
  3 siblings, 0 replies; 5+ messages in thread
From: voidlinux-github @ 2019-07-30 15:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

New comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/13356#issuecomment-516474865
Comment:
It's a matter of taste I'd say. I would like to have everything (most things) in one place.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27  0:51 [PR PATCH] xbps-src: add XBPS_LIBC/XBPS_TARGET_LIBC voidlinux-github
2019-07-30 15:34 ` voidlinux-github
2019-07-30 15:38 ` voidlinux-github
2019-07-30 15:38 ` voidlinux-github
2019-07-30 15:39 ` voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox