colors: fix x86_64 build.

This commit is contained in:
Jerome Duval
2017-01-26 22:15:17 +01:00
parent 62a10d43ed
commit c5264d736d
2 changed files with 38 additions and 2 deletions

View File

@@ -13,13 +13,14 @@ HOMEPAGE="https://github.com/jscipione/Colors"
COPYRIGHT="2001-2008 Werner Freytag
2009-2013 John Scipione"
LICENSE="MIT"
REVISION="2"
REVISION="3"
srcGitRev="9d832d2c995f822e6386223cb36840743c7e886a"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="05c5d19b6a29c532e32b11ce6ac805736eddca7348fbf3b917a60f31d29f454d"
SOURCE_DIR="Colors-$srcGitRev"
PATCHES="colors-$portVersion.patchset"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="

View File

@@ -0,0 +1,35 @@
From bc61daf81e28c2ac1a8e9cbac88d839c4b7b568f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 26 Jan 2017 22:08:41 +0100
Subject: x86_64 build fix.
diff --git a/ColorContainersView.cpp b/ColorContainersView.cpp
index 77154f9..005fabe 100644
--- a/ColorContainersView.cpp
+++ b/ColorContainersView.cpp
@@ -102,7 +102,7 @@ ColorContainersView::AttachedToWindow()
BMessage* settings = static_cast<ColorsApplication*>(be_app)->Settings();
for (int32 i = 0; i < kColorContainerCount; ++i) {
- long int int_color;
+ int32 int_color;
if (settings->FindInt32("color_well", i, &int_color) == B_OK)
fColorContainer[i]->SetColor(int_color);
else
diff --git a/ColorPickerView.cpp b/ColorPickerView.cpp
index 9a69b81..733c881 100644
--- a/ColorPickerView.cpp
+++ b/ColorPickerView.cpp
@@ -68,7 +68,7 @@ ColorPickerView::ColorPickerView()
BMessage* settings = static_cast<ColorsApplication*>(be_app)->Settings();
- long int int_color;
+ int32 int_color;
if (settings->FindInt32("selected_color", &int_color) == B_OK) {
fRed = (float)(int_color >> 16) / 255;
fGreen = (float)((int_color >> 8) & 255) / 255;
--
2.10.2