From 681707875af916558c28fd4661bdc3511233dff7 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Tue, 31 Jan 2017 22:16:54 +0100 Subject: [PATCH] nightandday: rename recipe, fix x86_64 build. * use a safe source. --- ...-0.1.2.recipe => nightandday-0.1.2.recipe} | 16 ++-- .../patches/nightandday-0.1.2.patchset | 89 +++++++++++++++++++ 2 files changed, 99 insertions(+), 6 deletions(-) rename haiku-apps/nightandday/{nightsandday-0.1.2.recipe => nightandday-0.1.2.recipe} (67%) create mode 100644 haiku-apps/nightandday/patches/nightandday-0.1.2.patchset diff --git a/haiku-apps/nightandday/nightsandday-0.1.2.recipe b/haiku-apps/nightandday/nightandday-0.1.2.recipe similarity index 67% rename from haiku-apps/nightandday/nightsandday-0.1.2.recipe rename to haiku-apps/nightandday/nightandday-0.1.2.recipe index da1a78eee..698fe1e1f 100644 --- a/haiku-apps/nightandday/nightsandday-0.1.2.recipe +++ b/haiku-apps/nightandday/nightandday-0.1.2.recipe @@ -7,13 +7,17 @@ display. This program should be self-explanatory. You'll find a small Popup menu when \ clicking the small screen at the top-right corner of the window. " +HOMEPAGE="https://github.com/HaikuArchives/NightAndDay" COPYRIGHT="1998-1999 Jean-Baptiste M. Queru" LICENSE="GNU GPL v2" -HOMEPAGE="https://github.com/HaikuArchives/NightAndDay" -SOURCE_URI="git+git://github.com/HaikuArchives/NightAndDay.git#3bcc1a5a39" -REVISION="2" +REVISION="3" +srcGitRev="3bcc1a5a39dd1dab36bb7c5a299f10a50faeb2f2" +SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="cf82b2db20550534c63ec209df4debb8d4a7519dc3e320c208510e5c17617c44" +SOURCE_DIR="NightAndDay-$srcGitRev" +PATCHES="nightandday-$portVersion.patchset" -ARCHITECTURES="x86_gcc2 !x86 !x86_64" +ARCHITECTURES="x86_gcc2 x86 x86_64" PROVIDES=" nightanddays = $portVersion @@ -25,7 +29,7 @@ BUILD_REQUIRES=" " BUILD_PREREQUIRES=" - cmd:gcc + cmd:g++ cmd:ld " @@ -36,7 +40,7 @@ REQUIRES=" BUILD() { cd src - g++ -o NightAndDay nd.cpp -fno-pic -fomit-frame-pointer -ffast-math -Wall -W -Wno-multichar -Werror -D PI=3.141592 -lbe + g++ -o NightAndDay nd.cpp -fomit-frame-pointer -ffast-math -Wall -W -Wno-multichar -Werror -D PI=3.141592 -lbe } INSTALL() diff --git a/haiku-apps/nightandday/patches/nightandday-0.1.2.patchset b/haiku-apps/nightandday/patches/nightandday-0.1.2.patchset new file mode 100644 index 000000000..6b17e4180 --- /dev/null +++ b/haiku-apps/nightandday/patches/nightandday-0.1.2.patchset @@ -0,0 +1,89 @@ +From e77ca06f458b609c32af4c4fa07e8b87da24e911 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 31 Jan 2017 22:02:19 +0100 +Subject: x86_64 build fix. + + +diff --git a/src/nd.cpp b/src/nd.cpp +index 1c02668..43eed7a 100644 +--- a/src/nd.cpp ++++ b/src/nd.cpp +@@ -43,7 +43,7 @@ or by e-mail at : djaybee@cyberdude.com + + const int numlang=3; + +-char* text [][numlang]={ ++const char* text [][numlang]={ + {"Night and Day","Jour et Nuit","Dag en Nacht"}, + {"2 colors","2 couleurs","2 kleuren"}, + {"3 colors","3 couleurs","3 kleuren"}, +@@ -78,7 +78,7 @@ char* text [][numlang]={ + {"Error while trying to save preferences","Erreur en essayant de sauver les réglages","Fout terwijl voorkeuren worden opgeslagen"} + }; + +-char* langname[numlang][numlang]={ ++const char* langname[numlang][numlang]={ + {"English","Anglais","Engels"}, + {"French","Français","Frans"}, + {"Dutch", "Hollandais","Nederlands"} +@@ -89,7 +89,7 @@ class DKMainWindow; + class DKColorControl; + class DKScreenView; + +-struct { ++static struct { + DKMainWindow *window0; + BRadioButton *button1,*button2,*button3; + BStringView *sview4a,*sview4b,*sview4c,*sview5a,*sview5b,*sview5c,*sview6,*sview7,*sview8; +@@ -156,9 +156,9 @@ private: + void Draw(BRect); + }; + +-long dkthread(void*); +-long mousethread(void*); +-long bitmapthread(void*); ++status_t dkthread(void*); ++status_t mousethread(void*); ++status_t bitmapthread(void*); + + const rgb_color light_gray={255,255,255,0}, + medium_gray={224,224,224,0}, +@@ -296,7 +296,7 @@ void DKApplication::SaveSettings(bool silent) { + } + return; + } +- sprintf(buff,"# language : 0=English, 1=French\n%ld\n",language); ++ sprintf(buff,"# language : 0=English, 1=French\n%" B_PRId32 "\n",language); + if (file.Write(buff,strlen(buff))Go(NULL); +@@ -1105,7 +1105,7 @@ int main() { + DKApplication _; + } + +-long dkthread(void*) { ++status_t dkthread(void*) { + acquire_sem(ccsem); + release_sem(ccsem); + rgb_color c; +@@ -1157,7 +1157,7 @@ long dkthread(void*) { + } + } + +-long mousethread(void* _p) { ++status_t mousethread(void* _p) { + DKColorControl* cc=(DKColorControl*)_p; + BPoint p; + uint32 but; +@@ -1185,7 +1185,7 @@ long mousethread(void* _p) { + return B_OK; + } + +-long bitmapthread(void*) { ++status_t bitmapthread(void*) { + rgb_color l0,l6,l12,l18; + uchar cvrt[216]; + {BScreen s; +-- +2.10.2 +