From d7275a651a965673a2774419f6a1803e2cb23517 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 16 Mar 2024 19:01:48 +0100 Subject: [PATCH 1/3] fix gcc2 build --- source/BitmapStuff.cpp | 2 -- source/CanvasTools.cpp | 1 - source/Layer.cpp | 4 +--- source/add-ons/Quantize/Quantize.cpp | 2 -- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/source/BitmapStuff.cpp b/source/BitmapStuff.cpp index c1ac098..984ed50 100644 --- a/source/BitmapStuff.cpp +++ b/source/BitmapStuff.cpp @@ -18,8 +18,6 @@ #include #include -#define bzero(p,n) memset(p,0,n) - #if defined (DATATYPES) # include "Datatypes.h" #endif diff --git a/source/CanvasTools.cpp b/source/CanvasTools.cpp index e2247f1..f4d4047 100644 --- a/source/CanvasTools.cpp +++ b/source/CanvasTools.cpp @@ -34,7 +34,6 @@ #include #include #include -#include // for bzero() since R4.1 #include "PosView.h" // #define USE_THREAD_FOR_POSITION diff --git a/source/Layer.cpp b/source/Layer.cpp index 6c77db3..8d1bf6b 100644 --- a/source/Layer.cpp +++ b/source/Layer.cpp @@ -4,8 +4,6 @@ #include #include -#define bzero(p,n) memset(p,0,n) - Layer::Layer (BRect bounds, const char *name) : BBitmap (bounds, B_BITMAP_ACCEPTS_VIEWS, B_RGBA32) { @@ -50,4 +48,4 @@ void Layer::ClearTo (bgra_pixel p) bgra_pixel *d = (bgra_pixel *) Bits() - 1; for (int32 i = 0; i < BitsLength()/4; i++) *(++d) = p; -} \ No newline at end of file +} diff --git a/source/add-ons/Quantize/Quantize.cpp b/source/add-ons/Quantize/Quantize.cpp index 27525b1..93936d5 100644 --- a/source/add-ons/Quantize/Quantize.cpp +++ b/source/add-ons/Quantize/Quantize.cpp @@ -9,8 +9,6 @@ #include #include -#define bzero(p,n) memset (p, 0, n) - int16 *gLut = 0; #define FOREGROUND 0 From f3ebc3b01f8e0122e8da35437d1c56afce78f1ec Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 16 Mar 2024 19:12:36 +0100 Subject: [PATCH 2/3] fix x86_64 build --- source/BecassoMain.cpp | 2 +- source/CanvasView.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/BecassoMain.cpp b/source/BecassoMain.cpp index 6e0b98b..bc78e24 100644 --- a/source/BecassoMain.cpp +++ b/source/BecassoMain.cpp @@ -162,7 +162,7 @@ void generate_alphabuffer (char *alpha) gAlphaBuffer[253] = schar[1]; gAlphaBuffer[254] = schar[2]; gAlphaBuffer[255] = schar[3]; - char xAlphaMask[256] = { KEYFILE_MASK }; + uchar xAlphaMask[256] = { KEYFILE_MASK }; char wbuffer[256]; for (i = 0; i < 255; i++) wbuffer[i] = gAlphaBuffer[i] ^ xAlphaMask[i]; diff --git a/source/CanvasView.cpp b/source/CanvasView.cpp index e6b4576..24d13bc 100644 --- a/source/CanvasView.cpp +++ b/source/CanvasView.cpp @@ -4292,7 +4292,7 @@ void CanvasView::CopyTarget (BMessage *message) message->PrintToStream(); } - extern bool gGlobalAlpha; + extern int gGlobalAlpha; if (!gGlobalAlpha) { #if SAVE_DISABLED From 16a8ed1a193a8700710f4498a20e212b4c69fbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 16 Mar 2024 18:48:08 +0100 Subject: [PATCH 3/3] add Github Actions CI --- .github/workflows/build.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..df15c3f --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,29 @@ +name: "haiku-ci" +on: [push, pull_request] + +jobs: + build-haiku: + timeout-minutes: 60 + runs-on: ${{ matrix.config.runner }} + name: build-${{ matrix.config.os }}-${{ matrix.config.version }}-${{ matrix.config.architecture }} + + strategy: + fail-fast: false + matrix: + config: + # The OS versions supported are specific to the version of the action + # https://github.com/cross-platform-actions/action/blob/master/changelog.md + - { os: haiku, version: 'r1beta4', runner: 'ubuntu-latest', architecture: 'x86-64' } + - { os: haiku, version: 'r1beta4', runner: 'ubuntu-latest', architecture: 'x86' } + + steps: + - uses: actions/checkout@v4 + + - uses: korli/action@v0.23.0-haiku + with: + operating_system: ${{ matrix.config.os }} + version: ${{ matrix.config.version }} + architecture: ${{ matrix.config.architecture }} + run: | + ssh user@localhost "pkgman update -y haiku_devel devel:libz cmd:jam cmd:gcc cmd:nasm" && + jam -q