Add pkg-config wrapper;

Progressive dump of changes
This commit is contained in:
Nathan Fisher 2024-12-11 22:54:07 -05:00
parent d0f1242751
commit a9ecd6716d
13 changed files with 11218 additions and 354 deletions

View File

@ -5,7 +5,7 @@
# armv7l (earlier Arm SBC's such as RPI and RPI2) # armv7l (earlier Arm SBC's such as RPI and RPI2)
# aarch64 (later Arm SBC's such as RPI3 and RPI4) # aarch64 (later Arm SBC's such as RPI3 and RPI4)
# riscv64 (SiFive Unmatched, BeagleV) # riscv64 (SiFive Unmatched, BeagleV)
arch = aarch64 arch = x86_64
# If building for rpi3/4 we can automatically configure and build u-boot # If building for rpi3/4 we can automatically configure and build u-boot
# by setting rpi to 1 # by setting rpi to 1

View File

@ -28,24 +28,26 @@ install: ${pkgdbdir}/plist ${pkgdbdir}/etc.plist
${pkgdbdir}/plist: ${pkgdbdir}/plist:
if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi
find ${dirs} -type f | while read f ; \ find ${dirs} -type f | while read f ; \
do echo file\|$$(stat -c %n\|%a\|root:root $${f})\|$$(file -b -e elf $${f}) ; \ do echo file\|$$(stat -c %n\|%a\|root:root "$${f}")\|$$(file -b -e elf "$${f}") ; \
done > $@.in done > $@.in
find ${dirs} -type d | while read d ; \ find ${dirs} -type d | while read d ; \
do echo directory\|$$(stat -c %n\|%a\|root:root $${d}) ; \ do echo directory\|$$(stat -c %n\|%a\|root:root "$${d}") ; \
done >> $@.in done >> $@.in
find ${dirs} -type c | while read c ; \ find ${dirs} -type c | while read c ; \
do echo device\|$${c}\|$$(file -b $${c}) ; \ do echo device\|$${c}\|$$(file -b "$${c}") ; \
done >> $@.in done >> $@.in
mv -v $@.in $@ sort -u $@.in > $@
rm -rf $@.in
${pkgdbdir}/etc.plist: ${pkgdbdir}/etc.plist:
if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi if [ ! -d ${pkgdbdir} ] ; then install -d ${pkgdbdir} ; fi
find etc var -type f | while read f ; \ find etc var -type f | while read f ; \
do echo file\|$$(stat -c %n\|%a\|root:root $${f})\|$$(file -b -e elf $${f}) ; \ do echo file\|$$(stat -c %n\|%a\|root:root "$${f}")\|$$(file -b -e elf "$${f}") ; \
done > $@.in done > $@.in
find etc var -type d | while read d ; \ find etc var -type d | while read d ; \
do echo directory\|$$(stat -c %n\|%a\|root:root $${d}) ; \ do echo directory\|$$(stat -c %n\|%a\|root:root "$${d}") ; \
done >> $@.in done >> $@.in
mv -v $@.in $@ sort -u $@.in > $@
rm -rf $@.in
.PHONY: install .PHONY: install

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@ subdirs += linux-headers
#subdirs += glibc #subdirs += glibc
subdirs += musl subdirs += musl
subdirs += gcc-pass2 subdirs += gcc-pass2
subdirs += pkg-config
installdirs += $(tooldir) $(global_srcdir) $(global_objdir) installdirs += $(tooldir) $(global_srcdir) $(global_objdir)

View File

@ -1,4 +1,4 @@
# Makefile - hhl - /usr/src/world/pax # Makefile - hhl - /usr/src/toolchain/pax
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
include ../../config.mk include ../../config.mk

View File

@ -0,0 +1,32 @@
# Makefile - hhl - /usr/src/toolchain/pax
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
include ../../config.mk
progname = $(arch)-pkg-config
bindir = $(tooldir)/bin
objdir = $(global_objdir)/pkg-config
srcs += src/pkg-config.sh
objs += $(objdir)/$(arch)-pkg-config
include toolchain.mk
install: $(bindir)/$(progname)
$(info $(grn)=== Finished building for $(progname) ===$(reset))
$(bindir)/$(progname): $(objs) | $(bindir)
install -vm0755 $< $@
$(objs): $(srcs) | $(objdir)
sed "s:@@SYSROOT@@:$(build):" $< > $@
$(bindir):
install -d $@
$(objdir):
$(info $(grn)=== Building for $(progname) ===$(reset))
install -d $@
clean:
rm -rf $(objdir)
.PHONY: install clean

View File

@ -0,0 +1,9 @@
#!/bin/sh
SYSROOT=@@SYSROOT@@
export PKG_CONFIG_PATH=
export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
exec pkg-config "$@"

View File

@ -79,6 +79,7 @@ subdirs += bin
subdirs += sbin subdirs += sbin
subdirs += usr.bin subdirs += usr.bin
subdirs += usr.sbin subdirs += usr.sbin
subdirs += ca-certificates
ifeq ($(arch),x86_64) ifeq ($(arch),x86_64)
subdirs += grub subdirs += grub

View File

@ -3,6 +3,7 @@
# #
distname = acl distname = acl
distext = gz distext = gz
patches += acl-largefile64.patch
include world.mk include world.mk
config_opts += --host=$(tgt) config_opts += --host=$(tgt)

View File

@ -0,0 +1,12 @@
diff -Naur acl-2.3.1/tools/chacl.c acl-2.3.1.orig/tools/chacl.c
--- acl-2.3.1/tools/chacl.c 2018-02-28 04:20:39.000000000 -0500
+++ acl-2.3.1.orig/tools/chacl.c 2023-08-21 18:33:10.249557883 -0400
@@ -17,6 +17,8 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#define _LARGEFILE64_SOURCE
+
#include "config.h"
#include <stdlib.h>
#include <string.h>

View File

@ -2,6 +2,7 @@
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com> # Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
# #
distname = e2fsprogs distname = e2fsprogs
patches += e2fsprogs_fallocate64.patch
include world.mk include world.mk
export CFLAGS = --sysroot=$(DESTDIR) export CFLAGS = --sysroot=$(DESTDIR)

View File

@ -1,6 +1,6 @@
diff -Naur e2fsprogs-1.46.5/misc/e4defrag.c e2fsprogs-1.46.5.orig/misc/e4defrag.c diff -Naur e2fsprogs-1.46.5/misc/e4defrag.c e2fsprogs-1.46.5.orig/misc/e4defrag.c
--- e2fsprogs-1.46.5/misc/e4defrag.c 2021-12-30 00:54:33.000000000 -0500 --- e2fsprogs-1.46.5/misc/e4defrag.c 2021-12-30 00:54:33.000000000 -0500
+++ e2fsprogs-1.46.5.orig/misc/e4defrag.c 2023-08-20 18:54:50.480371281 -0400 +++ e2fsprogs-1.46.5.orig/misc/e4defrag.c 2023-08-21 19:52:40.786519191 -0400
@@ -195,10 +195,6 @@ @@ -195,10 +195,6 @@
#error posix_fadvise not available! #error posix_fadvise not available!
#endif #endif

File diff suppressed because it is too large Load Diff