Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,10 @@ additional paths to be searched when linking target binaries to be introspected.
- `meson` creates a cross file, `${XBPS_WRAPPERDIR}/meson/xbps_meson.cross`, which configures
meson for cross builds. This is particularly useful for building packages that wrap meson
invocations (e.g., `python3-pep517` packages that use a meson backend) and is added by default
for packages that use the `meson` build style.
for packages that use the `meson` build style. It also sets `$MESON_PACKAGE_CACHE_DIR` to
`$XBPS_SRCDISTDIR/$pkgname-$version/` so libraries specified as meson wraps can be added to
distfiles and will be automatically used by meson. See also `common/scripts/gen-wrap-distfiles.py`
for a script that generates distfiles entries for wraps.

- `numpy` configures the environment for cross-compilation of python packages that provide
compiled extensions linking to NumPy C libraries. If the `meson` build helper is also
Expand Down
3 changes: 3 additions & 0 deletions common/build-helper/meson.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This build helper writes a Meson cross-file, allowing other build styles
# to properly drive cross-builds in Meson when appropriate

# allows meson to automatically unpack wrapped dependencies specified in distfiles
export MESON_PACKAGE_CACHE_DIR="${XBPS_SRCDISTDIR}/${pkgname}-${version}/"

# Action is only taken for cross builds
[ -z "$CROSS_BUILD" ] && return 0

Expand Down
120 changes: 120 additions & 0 deletions common/scripts/gen-wrap-distfiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#!/usr/bin/python3

import sys
from abc import ABC, abstractmethod
from configparser import ConfigParser
from dataclasses import dataclass
from pathlib import Path

@dataclass
class Wrap(ABC):
src_path: Path

directory: str | None = None
patch_url: str | None = None
patch_fallback_url: str | None = None
patch_filename: str | None = None
patch_hash: str | None = None
patch_directory: str | None = None
diff_files: str | None = None
method: str | None = None

@property
@abstractmethod
def distfile(self):
raise NotImplementedError

@property
@abstractmethod
def checksum(self):
raise NotImplementedError

@property
@abstractmethod
def filename(self):
raise NotImplementedError


@dataclass
class WrapFile(Wrap):
source_url: str | None = None
source_fallback_url: str | None = None
source_filename: str | None = None
source_hash: str | None = None
lead_directory_missing: str | None = None

@property
def distfile(self):
if self.source_url:
return f"{self.source_url}>{self.filename}"
raise ValueError(f"missing source_url in wrap {self.src_path}")

@property
def checksum(self):
if self.source_hash:
return self.source_hash
raise ValueError(f"missing source_hash in wrap {self.src_path}")

@property
def filename(self):
if self.source_filename:
return self.source_filename
raise ValueError(f"missing source_filename in wrap {self.src_path}")


def read_wrap(p: Path) -> Wrap:
wrap = ConfigParser()
with p.open() as f:
wrap.read_file(f)

for sec in wrap.sections():
if sec.startswith("wrap-"):
break
else:
raise ValueError(f"missing 'wrap-*' section in wrap {p}")

match sec:
case "wrap-file":
cls = WrapFile
case "wrap-git":
raise NotImplementedError
case "wrap-hg":
raise NotImplementedError
case "wrap-svn":
raise NotImplementedError
case _:
raise NotImplementedError

return cls(src_path=p, **dict(wrap.items(sec)))


def print_list(var: str, contents: list[str]):
print(f"""{var}+="
{"\n ".join(contents)}
\"""")


if __name__ == "__main__":
distfiles = []
checksums = []
skip_extracts = []

if len(sys.argv[1:]) < 1:
print(f"usage: {sys.argv[0]} <wrap files...>")
exit()

for arg in sys.argv[1:]:
wrap_path = Path(arg)
if wrap_path.is_file():
try:
wrap = read_wrap(wrap_path)

distfiles.append(wrap.distfile)
checksums.append(wrap.checksum)
skip_extracts.append(wrap.filename)
except ValueError as e:
print("=> ERROR:", e, file=sys.stderr)

print_list("distfiles", distfiles)
print_list("checksum", checksums)
print_list("skip_extraction", skip_extracts)
1 change: 0 additions & 1 deletion common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,6 @@ libcryptui.so.0 libcryptui-3.4.0_1
libkeyutils.so.1 libkeyutils-1.5.5_1
libiptcdata.so.0 libiptcdata-1.0.4_1
libutempter.so.0 libutempter-1.1.5_1
libxatracker.so.2 libxatracker-10.0.0_2
libtumbler-1.so.0 tumbler-4.9.2_1
libwebrtc-audio-coding-1.so.3 webrtc-audio-processing-1.3_1
libwebrtc-audio-processing-1.so.3 webrtc-audio-processing-1.3_1
Expand Down
4 changes: 2 additions & 2 deletions srcpkgs/DirectX-Headers/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'DirectX-Headers'
pkgname=DirectX-Headers
version=1.616.0
version=1.618.2
revision=1
archs="aarch64 x86_64"
build_style=meson
Expand All @@ -10,7 +10,7 @@ maintainer="Matthias von Faber <mvf@gmx.eu>"
license="MIT"
homepage="https://github.com/microsoft/DirectX-Headers"
distfiles="https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v${version}.tar.gz"
checksum=125f492802939b40223bfccb83badd3f599af2d3449613d6cb893720607b9025
checksum=62004f45e2ab00cbb5c7f03c47262632c22fbce0a237383fc458d9324c44cf36

post_install() {
vlicense LICENSE
Expand Down
1 change: 0 additions & 1 deletion srcpkgs/libxatracker

This file was deleted.

1 change: 0 additions & 1 deletion srcpkgs/mesa-asahi-vdpau

This file was deleted.

12 changes: 3 additions & 9 deletions srcpkgs/mesa-asahi/template
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Template file for 'mesa-asahi'
pkgname=mesa-asahi
version=25.1.1
revision=1
revision=2
metapackage=yes
depends="mesa>=${version}_1"
short_desc="Mesa - Asahi (transitional dummy package)"
maintainer="dkwo <npiazza@disroot.org>"
license="Public Domain"
homepage="https://www.mesa3d.org/"
changelog="https://docs.mesa3d.org/relnotes.html"
metapackage=yes

# alphabetical order is not good
subpackages="libgbm-asahi libgbm-asahi-devel MesaLib-asahi-devel
mesa-asahi-opencl mesa-asahi-vaapi mesa-asahi-vdpau mesa-asahi-vulkan-overlay-layer
mesa-asahi-opencl mesa-asahi-vaapi mesa-asahi-vulkan-overlay-layer
mesa-asahi-dri"

libgbm-asahi_package() {
Expand Down Expand Up @@ -51,12 +51,6 @@ mesa-asahi-vaapi_package() {
short_desc="Mesa VA-API drivers"
}

mesa-asahi-vdpau_package() {
metapackage=yes
depends="mesa-vdpau"
short_desc="Mesa VDPAU drivers"
}

mesa-asahi-vulkan-overlay-layer_package() {
metapackage=yes
depends="mesa-vulkan-overlay-layer"
Expand Down
1 change: 0 additions & 1 deletion srcpkgs/mesa-vdpau

This file was deleted.

12 changes: 6 additions & 6 deletions srcpkgs/mesa/patches/musl-endian.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
--- a/src/util/u_endian.h 2017-12-21 18:31:22.000000000 +0100
+++ b/src/util/u_endian.h 2017-12-26 09:22:52.597199480 +0100
@@ -68,6 +68,16 @@

#define PIPE_ARCH_LITTLE_ENDIAN
--- a/src/util/u_endian.h 2025-09-30 15:31:39.114657163 +0300
+++ b/src/util/u_endian.h 2025-09-30 15:22:18.962576906 +0300
@@ -92,6 +92,16 @@
#define UTIL_ARCH_LITTLE_ENDIAN 1
#define UTIL_ARCH_BIG_ENDIAN 0

+#else
+/* Musl libc */
Expand All @@ -16,4 +16,4 @@
+
#endif

#endif
#if !defined(UTIL_ARCH_LITTLE_ENDIAN) || !defined(UTIL_ARCH_BIG_ENDIAN)
30 changes: 5 additions & 25 deletions srcpkgs/mesa/patches/musl.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/src/util/rand_xor.c 2020-10-03 12:27:48.489024729 +0200
+++ b/src/util/rand_xor.c 2020-10-03 12:31:05.927113521 +0200
--- a/src/util/rand_xor.c 2025-09-30 15:31:17.368731386 +0300
+++ b/src/util/rand_xor.c 2025-09-30 15:24:46.938064862 +0300
@@ -28,6 +28,7 @@
#if defined(HAVE_GETRANDOM)
#include <sys/random.h>
Expand All @@ -8,33 +8,13 @@
#include <unistd.h>
#include <fcntl.h>
#endif
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
@@ -30,6 +30,7 @@
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2025-09-30 15:31:17.368731386 +0300
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h 2025-09-30 15:24:46.938064862 +0300
@@ -13,6 +13,7 @@

#include <amdgpu.h>
#include <pthread.h>
+#include <sys/types.h>
#include "util/list.h"
#include "util/rwlock.h"
#include "ac_gpu_info.h"
--- a/src/gallium/frontends/nine/nine_debug.c 2020-03-06 07:46:48.278918421 +0100
+++ b/src/gallium/frontends/nine/nine_debug.c 2020-03-06 07:51:32.919964119 +0100
@@ -65,7 +65,7 @@ _nine_debug_printf( unsigned long flag,
{
static boolean first = TRUE;
static unsigned long dbg_flags = DBG_ERROR | DBG_WARN;
- unsigned long tid = 0;
+ pthread_t tid = 0;

if (first) {
first = FALSE;
@@ -74,7 +74,7 @@ _nine_debug_printf( unsigned long flag,

#if defined(HAVE_PTHREAD)
if (dbg_flags & DBG_TID)
- tid = (unsigned long)pthread_self();
+ tid = pthread_self();
#endif

if (dbg_flags & flag) {
Loading
Loading