Skip to content

Instantly share code, notes, and snippets.

haikuporter coreutils
Checking if any dependency-infos need to be updated ...
Looking for stale dependency-infos ...
----------------------------------------------------------------------
sys-apps::coreutils-9.0
/Haiku-nvme/data/haikuports2/sys-apps/coreutils/coreutils-9.0.recipe
----------------------------------------------------------------------
Skipping download of source for coreutils-9.0.tar.xz
Validating checksum of coreutils-9.0.tar.xz
Unpacking source of coreutils-9.0.tar.xz
MODULE HaikuAppTest;
IMPORT S := SYSTEM, O := HaikuOS, P := HaikuPosix, C := HaikuCpp, CU := HaikuCppUtils, B := HaikuBeDecls, Kernel, IO := HaikuTerminal, TS := HostThreadSections;
TYPE
PtrView = POINTER TO View;
View = RECORD (B.BView) END;
PtrWindow = POINTER TO Window;
Window = RECORD (B.BWindow)
view: PtrView;
@X547
X547 / Build.sh
Last active January 18, 2023 13:24
Building RadeonGfx
#/bin/bash
set -e
rm -rf install
INSTALL="$PWD/install"
export PKG_CONFIG_PATH="$INSTALL/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="$INSTALL/bin:$PATH"
build_package() {
@X547
X547 / ExternalAllocator.cpp
Last active October 21, 2022 11:40
ExternalAllocator
#include "ExternalAllocator.h"
#include <stdio.h>
#include <stdlib.h>
#define ROUNDDOWN(a, b) (((a) / (b)) * (b))
#define ROUNDUP(a, b) ROUNDDOWN((a) + (b) - 1, b)
static void Assert(bool cond) {if (!cond) abort();}
@X547
X547 / build.sh
Last active October 20, 2022 10:52
Haiku Wayland build scripts
#!sh
set -e
git clone --depth=1 -b inproc-haiku https://github.com/X547/wayland.git
git clone --depth=1 -b 1.26 https://github.com/wayland-project/wayland-protocols.git
git clone --depth=1 https://github.com/X547/wayland-server.git
git clone --depth=1 -b xkbcommon-1.4.1 https://github.com/xkbcommon/libxkbcommon.git
git clone --depth=1 -b xkeyboard-config-2.36 https://github.com/freedesktop/xkeyboard-config.git
git clone --depth=1 -b gtk-3-24-haiku https://github.com/X547/gtk.git gtk3
diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c
index 569215eef1d..ddc486d6472 100644
--- a/src/gallium/drivers/zink/zink_kopper.c
+++ b/src/gallium/drivers/zink/zink_kopper.c
@@ -325,6 +325,10 @@ update_swapchain(struct zink_screen *screen, struct kopper_displaytarget *cdt, u
struct kopper_swapchain *cswap = kopper_CreateSwapchain(screen, cdt, w, h, &error);
if (!cswap)
return error;
+
+ if (util_queue_is_initialized(&screen->flush_queue))
@X547
X547 / Build.sh
Last active May 22, 2022 14:19
Haiku libgcc_s.so.1 stub
#!sh
set -e
gcc --shared libgcc.c -Wl,--version-script=libgcc.ver -o lib/libgcc_s.so.1
#!/bin/sh
set -e
rm -f kernel_arch_riscv64.a && ar csrDT kernel_arch_riscv64.a \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/Htif.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/RISCV64VMTranslationMap.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_asm.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_commpage.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_cpu.o \
objects/haiku/riscv64/release/system/kernel/arch/riscv64/arch_debug.o \
MODULE TestUnicode2;
CONST
ph* = 0FFFDH; (* � *)
bom* = 0FEFFH;
PROCEDURE CharLen8* (ch: SHORTCHAR): INTEGER;
BEGIN
CASE ch OF
| 000X .. 07FX: RETURN 1;
| 0C0X .. 0DFX: RETURN 2;
@X547
X547 / FontSize.cpp
Created January 15, 2022 11:03
FontSizeFromHeight implementation and sample code.
#include <stdio.h>
#include <algorithm>
#include <Application.h>
#include <Window.h>
#include <View.h>
#include <Rect.h>
float FontSizeFromHeight(BFont font, float height)