mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
fix linux-utils on mac (#835)
* fix linux-utils on mac Closes #831 * wip * wip * wip * fix up headers * stupid. $INCLUDE means something to clang --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
ff58686c65
commit
91e05e5e88
2 changed files with 139 additions and 80 deletions
25
projects/github.com/util-linux/util-linux/macports.patch
Normal file
25
projects/github.com/util-linux/util-linux/macports.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- lib/procfs.c 2022-02-17 05:28:41.000000000 -0500
|
||||
+++ lib/procfs.c 2022-04-07 19:10:05.000000000 -0400
|
||||
@@ -6,7 +6,9 @@
|
||||
*/
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
-#include <sys/vfs.h>
|
||||
+//#include <sys/vfs.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/mount.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "c.h"
|
||||
|
||||
--- include/statfs_magic.h 2021-02-02 10:41:37.000000000 -0500
|
||||
+++ include/statfs_magic.h 2021-02-21 23:43:37.000000000 -0500
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef UTIL_LINUX_STATFS_MAGIC_H
|
||||
#define UTIL_LINUX_STATFS_MAGIC_H
|
||||
|
||||
-#include <sys/statfs.h>
|
||||
+//#include <sys/statfs.h>
|
||||
|
||||
/*
|
||||
* If possible then don't depend on internal libc __SWORD_TYPE type.
|
|
@ -1,12 +1,37 @@
|
|||
distributable:
|
||||
url: https://github.com/util-linux/util-linux/archive/refs/tags/v{{ version }}.tar.gz
|
||||
url: https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v{{version.marketing}}/util-linux-{{version.raw}}.tar.xz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: util-linux/util-linux/tags
|
||||
strip: /^v/
|
||||
|
||||
provides:
|
||||
darwin:
|
||||
- bin/cal
|
||||
- bin/col
|
||||
- bin/colcrt
|
||||
- bin/colrm
|
||||
- bin/column
|
||||
- bin/flock
|
||||
- bin/getopt
|
||||
- bin/hardlink
|
||||
- bin/hexdump
|
||||
- bin/isosize
|
||||
- bin/logger
|
||||
- bin/look
|
||||
- bin/mcookie
|
||||
- bin/mesg
|
||||
- bin/namei
|
||||
- bin/rename
|
||||
- bin/renice
|
||||
- bin/rev
|
||||
- bin/scriptreplay
|
||||
- bin/setsid
|
||||
- bin/uuidgen
|
||||
- bin/uuidparse
|
||||
- bin/wall
|
||||
- bin/whereis
|
||||
linux:
|
||||
- bin/cal
|
||||
- bin/chmem
|
||||
- bin/choom
|
||||
|
@ -72,35 +97,44 @@ provides:
|
|||
- bin/wdctl
|
||||
- bin/whereis
|
||||
|
||||
dependencies:
|
||||
gnu.org/gettext: ^0
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
gnu.org/autoconf: '*'
|
||||
gnu.org/automake: '*'
|
||||
gnu.org/gettext: '*'
|
||||
gnu.org/libtool: '*'
|
||||
gnu.org/bison: '*'
|
||||
gnu.org/m4: '*'
|
||||
freedesktop.org/pkg-config: '*'
|
||||
gnu.org/patch: '*'
|
||||
script: |
|
||||
if test "{{hw.platform}}" != "linux"; then
|
||||
echo "glibc is only supported on Linux"
|
||||
touch {{prefix}}/linux-only
|
||||
exit 0
|
||||
if test darwin = {{hw.platform}}; then
|
||||
patch -p0 <props/macports.patch # thanks to MacPorts
|
||||
fi
|
||||
./autogen.sh
|
||||
./configure $ARGS
|
||||
make --jobs {{hw.concurrency}} install
|
||||
|
||||
cd "{{prefix}}/include"
|
||||
for x in $HEADERS; do
|
||||
mv "$x/$x.h" .
|
||||
ln -s "../$x.h" "$x/"
|
||||
done
|
||||
env:
|
||||
ARGS:
|
||||
- --prefix={{prefix}}
|
||||
- --disable-makeinstall-chown
|
||||
- --disable-makeinstall-setuid
|
||||
HEADERS:
|
||||
- blkid
|
||||
- libfdisk
|
||||
- libsmartcols
|
||||
- uuid
|
||||
linux:
|
||||
HEADERS:
|
||||
- libmount
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
stedolan.github.io/jq: '*'
|
||||
script: |
|
||||
if test "{{hw.platform}}" = "linux"; then
|
||||
script:
|
||||
test "$(echo 5 6 7 | column -tJN first,second,third | jq .table[0].second)" = '"6"'
|
||||
fi
|
Loading…
Reference in a new issue