diff --git a/haiku-apps/resourcer/patches/resourcer-1.0.patchset b/haiku-apps/resourcer/patches/resourcer-1.0.patchset new file mode 100644 index 000000000..1fd540a53 --- /dev/null +++ b/haiku-apps/resourcer/patches/resourcer-1.0.patchset @@ -0,0 +1,156 @@ +From eacc2db43e6f51c2bd980cf94b6dfeccf614eb16 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 28 Jan 2017 14:26:50 +0100 +Subject: x86_64 build fix + + +diff --git a/main/makefile b/main/makefile +index 35c1fdf..72641a8 100644 +--- a/main/makefile ++++ b/main/makefile +@@ -68,7 +68,7 @@ RSRCS= Resource.rsrc + # naming scheme you need to specify the path to the library + # and it's name + # library: my_lib.a entry: my_lib.a or path/my_lib.a +-LIBS= translation tracker root be ++LIBS= translation tracker root be $(STDCPPLIBS) + + # specify additional paths to directories following the standard + # libXXX.so or libXXX.a naming scheme. You can specify full paths +diff --git a/main/preamble.h b/main/preamble.h +index 5a0a755..f9fef11 100644 +--- a/main/preamble.h ++++ b/main/preamble.h +@@ -1,7 +1,7 @@ + class reswindow; + BRect find_center(uint32 width, uint32 height); + BRect find_center(BRect rect,uint32 width, uint32 height); +-#if __INTEL__ ++#if __INTEL__ || defined(__x86_64__) + type_code flipcode (type_code original); + #endif + #if __POWERPC__ +@@ -18,7 +18,7 @@ typedef struct{ + } plug_in; + + +-#if __INTEL__ ++#if __INTEL__ || defined(__x86_64__) + type_code flipcode (type_code original) { + type_code type = original; + char *one = (char *)(&original); +diff --git a/main/window.h b/main/window.h +index 60036c0..12c79ea 100644 +--- a/main/window.h ++++ b/main/window.h +@@ -276,7 +276,7 @@ void restypeview::MessageReceived(BMessage *msg) { + msg->FindString("name",(const char **)(&name)); + BDirectory dir(&ref); + BFile file(&dir,name,B_READ_WRITE | B_CREATE_FILE); +- void *data; ++ unsigned char *data; + bool isattr; + prev->FindBool("isattr",&isattr); + if (!isattr) { +@@ -410,7 +410,7 @@ void restypeview::MessageReceived(BMessage *msg) { + data = new unsigned char[size]; + map.Read(data,size); + size_t tempSize = temp->BitsLength(); +- memcpy((void *)(uint32(data) + (size - tempSize)),temp->Bits(),tempSize); ++ memcpy((void *)(addr_t(data) + (size - tempSize)),temp->Bits(),tempSize); + map.DetachBitmap(&temp); + delete temp; + type = 'bits'; +@@ -567,7 +567,7 @@ int32 getdata(void *y) { + data = new unsigned char[size]; + map.Read(data,size); + size_t tempSize = temp->BitsLength(); +- memcpy((void *)(uint32(data) + (size - tempSize)),temp->Bits(),tempSize); ++ memcpy((void *)(addr_t(data) + (size - tempSize)),temp->Bits(),tempSize); + map.DetachBitmap(&temp); + delete temp; + construct = true; +diff --git a/reslib/CSTR.h b/reslib/CSTR.h +index 8ba8498..6af096a 100644 +--- a/reslib/CSTR.h ++++ b/reslib/CSTR.h +@@ -1,3 +1,4 @@ ++#include + #include + + class _EXPORT ResourceStringView : public BStringView { +@@ -52,4 +53,4 @@ status_t ResourceStringView::Archive(BMessage *into, bool deep) const { + into->AddString("class", "ResourceStringView"); + into->AddInt32("resid",id); + return stat; +-} +\ No newline at end of file ++} +diff --git a/reslib/Resources.cp b/reslib/Resources.cp +index acf5ed9..860b7ae 100644 +--- a/reslib/Resources.cp ++++ b/reslib/Resources.cp +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + const void *AppResource(type_code type,int32 id,size_t *lengthFound); + const void *AppResource(type_code type,const char *name,size_t *lengthFound); +@@ -157,7 +158,7 @@ status_t get_app_resource(type_code type,long id,void** buffer/*<-- do not initi + } + + status_t get_app_resource(type_code type,const char *name,void** buffer/*<-- do not initialize*/,size_t *lengthFound) { +- long id; ++ int32 id; + if (be_app->AppResources()->GetResourceInfo(type,name,&id,lengthFound) == false) + return B_ERROR; + *buffer = new unsigned char[*lengthFound]; +@@ -170,4 +171,4 @@ status_t get_app_resource(type_code type,const char *name,void** buffer/*<-- do + #include "CSTR.h" + #include "cursor.h" + #include "bits.h" +-#include "WIND.h" +\ No newline at end of file ++#include "WIND.h" +diff --git a/reslib/nois.h b/reslib/nois.h +index 45e93ee..bc98e58 100644 +--- a/reslib/nois.h ++++ b/reslib/nois.h +@@ -22,10 +22,10 @@ BSound *getsound(long id) { + decodeformat((unsigned char *)(sound),&format,length,&is_old); + BSound *sounda; + if (is_old) { +- sound = (void *)((int)sound + 20); ++ sound = (void *)((addr_t)sound + 20); + sounda = new BSound((void *)sound,length - 20,format); + } else { +- sound = (void *)((int)sound + sizeof(TranslatorSound)); ++ sound = (void *)((addr_t)sound + sizeof(TranslatorSound)); + sounda = new BSound((void *)sound,length - 20,format); + } + return (sounda); +@@ -40,10 +40,10 @@ BSound *getsound(const char *name) { + decodeformat((unsigned char *)(sound),&format,length,&is_old); + BSound *sounda; + if (is_old) { +- sound = (void *)((int)sound + 20); ++ sound = (void *)((addr_t)sound + 20); + sounda = new BSound((void *)sound,length - 20,format); + } else { +- sound = (void *)((int)sound + sizeof(TranslatorSound)); ++ sound = (void *)((addr_t)sound + sizeof(TranslatorSound)); + sounda = new BSound((void *)sound,length - 20,format); + } + return (sounda); +@@ -92,4 +92,4 @@ void decode4(unsigned char *buffer,void* toop) { + *two = *(buffer + 1); + *three = *(buffer + 2); + *four = *(buffer + 3); +-} +\ No newline at end of file ++} +-- +2.10.2 + diff --git a/haiku-apps/resourcer/resourcer-1.0.recipe b/haiku-apps/resourcer/resourcer-1.0.recipe index 7b58dd913..640ed0700 100644 --- a/haiku-apps/resourcer/resourcer-1.0.recipe +++ b/haiku-apps/resourcer/resourcer-1.0.recipe @@ -6,12 +6,13 @@ including images, cursors, sounds, movies, text, and icons." HOMEPAGE="https://github.com/HaikuArchives/Resourcer" COPYRIGHT="2000 Nathan Whitehorn" LICENSE="BSD (3-clause)" -REVISION="3" +REVISION="4" SOURCE_URI="https://github.com/HaikuArchives/Resourcer/archive/bd16d3419d18d881c2a906eecbc28705100b808e.tar.gz" CHECKSUM_SHA256="4482d87f707c8499e61b23c88bab1d98c76cf56de9084fe55f1187fd0eb6d96f" SOURCE_DIR="Resourcer-bd16d3419d18d881c2a906eecbc28705100b808e" +PATCHES="resourcer-$portVersion.patchset" -ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?x86_gcc2 ?x86 x86_64" PROVIDES=" resourcer = $portVersion