From ec48ce67e9393531963ee808c5ded23942406637 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 28 Jan 2017 12:25:39 +0100 Subject: [PATCH] caya: enable x86_64. * remove msn protocol. --- haiku-apps/caya/caya-0.0.3.recipe | 4 +- haiku-apps/caya/patches/caya-0.0.3.patchset | 76 +++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 haiku-apps/caya/patches/caya-0.0.3.patchset diff --git a/haiku-apps/caya/caya-0.0.3.recipe b/haiku-apps/caya/caya-0.0.3.recipe index 6fb928ae3..bd7abad34 100644 --- a/haiku-apps/caya/caya-0.0.3.recipe +++ b/haiku-apps/caya/caya-0.0.3.recipe @@ -10,8 +10,9 @@ REVISION="3" SOURCE_URI="https://github.com/Barrett17/Caya/archive/0.0.3.tar.gz" CHECKSUM_SHA256="01d4103d84bcc8141dc9dc8ce2da12446db7bcb0630985461b7b56a2bd1ec0fe" SOURCE_DIR="Caya-0.0.3" +PATCHES="caya-$portVersion.patchset" -ARCHITECTURES="x86_gcc2 x86 ?x86_64" +ARCHITECTURES="x86_gcc2 x86 x86_64" # no secondary architectures due to Deskbar's replicant handeling. PROVIDES=" caya = $portVersion @@ -55,7 +56,6 @@ INSTALL() cp generated/distro-haiku-*-release/Caya $appsDir/Caya cp generated/distro-haiku-*-release/aim $appsDir/Caya/protocols - cp generated/distro-haiku-*-release/msn $appsDir/Caya/protocols cp generated/distro-haiku-*-release/gtalk $appsDir/Caya/protocols cp generated/distro-haiku-*-release/facebook $appsDir/Caya/protocols cp generated/distro-haiku-*-release/jabber $appsDir/Caya/protocols diff --git a/haiku-apps/caya/patches/caya-0.0.3.patchset b/haiku-apps/caya/patches/caya-0.0.3.patchset new file mode 100644 index 000000000..d153ed1cc --- /dev/null +++ b/haiku-apps/caya/patches/caya-0.0.3.patchset @@ -0,0 +1,76 @@ +From 3455a2a4b8264861f3556fd996e1b708c215de20 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 28 Jan 2017 12:21:26 +0100 +Subject: x86_64 build fix. + + +diff --git a/application/views/ReplicantStatusView.cpp b/application/views/ReplicantStatusView.cpp +index 2c73269..3a635f6 100644 +--- a/application/views/ReplicantStatusView.cpp ++++ b/application/views/ReplicantStatusView.cpp +@@ -246,7 +246,7 @@ void + ReplicantStatusView::MouseDown(BPoint point) + { + +- unsigned long buttons; ++ uint32 buttons; + if (LockLooper()) { + GetMouse(&point, &buttons, false); + UnlockLooper(); +diff --git a/build/jam/MainBuildRules b/build/jam/MainBuildRules +index 7fd2c1a..80db46b 100644 +--- a/build/jam/MainBuildRules ++++ b/build/jam/MainBuildRules +@@ -222,7 +222,7 @@ rule ResComp + # considered linker scripts, and thus we can use preprocessor features. + actions ResComp1 + { +- cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - | egrep -v '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" - ++ cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - | egrep -va '^#' | $(2[1]) $(RCHDRS) --auto-names -o "$(1)" - + } + + actions XRes1 +diff --git a/libs/Jamfile b/libs/Jamfile +index 6a1b129..74cf3ee 100644 +--- a/libs/Jamfile ++++ b/libs/Jamfile +@@ -6,6 +6,5 @@ SubInclude TOP libs libsupport ; + SubInclude TOP libs libinterface ; + SubInclude TOP libs libimcomm ; + SubInclude TOP libs libgloox ; +-SubInclude TOP libs libmsn ; + SubInclude TOP libs libyahoo2 ; + +diff --git a/libs/libinterface/BitmapUtils.cpp b/libs/libinterface/BitmapUtils.cpp +index 2f19c77..64e9a83 100644 +--- a/libs/libinterface/BitmapUtils.cpp ++++ b/libs/libinterface/BitmapUtils.cpp +@@ -121,12 +121,12 @@ RescaleBitmap(const BBitmap* src, float width, float height) + void* srcData = src->Bits(); + + for (int32 y = 0; y <= height; y++) { +- void* dstRow = (void*)((uint32)dstData + (uint32)(y * dstYOff)); +- void* srcRow = (void*)((uint32)srcData + ((uint32)(y * dy) ++ void* dstRow = (void*)((uintptr_t)dstData + (uint32)(y * dstYOff)); ++ void* srcRow = (void*)((uintptr_t)srcData + ((uint32)(y * dy) + * srcYOff)); + + for (int32 x = 0; x <= width; x++) +- memcpy((void*)((uint32)dstRow + (x * bpp)), (void*)((uint32)srcRow ++ memcpy((void*)((uintptr_t)dstRow + (x * bpp)), (void*)((uintptr_t)srcRow + + ((uint32)(x * dx) * bpp)), bpp); + } + +diff --git a/protocols/Jamfile b/protocols/Jamfile +index 95482a6..b98cef2 100644 +--- a/protocols/Jamfile ++++ b/protocols/Jamfile +@@ -5,5 +5,4 @@ CAYA_INCLUDE_DIR = $(TOP) application ; + # Include all the components. + SubInclude TOP protocols aim ; + SubInclude TOP protocols xmpp ; +-SubInclude TOP protocols msn ; + SubInclude TOP protocols yahoo ; +-- +2.10.2 +