mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 13:38:52 +02:00
nightandday: rename recipe, fix x86_64 build.
* use a safe source.
This commit is contained in:
@@ -7,13 +7,17 @@ display.
|
|||||||
This program should be self-explanatory. You'll find a small Popup menu when \
|
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.
|
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"
|
COPYRIGHT="1998-1999 Jean-Baptiste M. Queru"
|
||||||
LICENSE="GNU GPL v2"
|
LICENSE="GNU GPL v2"
|
||||||
HOMEPAGE="https://github.com/HaikuArchives/NightAndDay"
|
REVISION="3"
|
||||||
SOURCE_URI="git+git://github.com/HaikuArchives/NightAndDay.git#3bcc1a5a39"
|
srcGitRev="3bcc1a5a39dd1dab36bb7c5a299f10a50faeb2f2"
|
||||||
REVISION="2"
|
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="
|
PROVIDES="
|
||||||
nightanddays = $portVersion
|
nightanddays = $portVersion
|
||||||
@@ -25,7 +29,7 @@ BUILD_REQUIRES="
|
|||||||
"
|
"
|
||||||
|
|
||||||
BUILD_PREREQUIRES="
|
BUILD_PREREQUIRES="
|
||||||
cmd:gcc
|
cmd:g++
|
||||||
cmd:ld
|
cmd:ld
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -36,7 +40,7 @@ REQUIRES="
|
|||||||
BUILD()
|
BUILD()
|
||||||
{
|
{
|
||||||
cd src
|
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()
|
INSTALL()
|
||||||
89
haiku-apps/nightandday/patches/nightandday-0.1.2.patchset
Normal file
89
haiku-apps/nightandday/patches/nightandday-0.1.2.patchset
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
From e77ca06f458b609c32af4c4fa07e8b87da24e911 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Duval <jerome.duval@gmail.com>
|
||||||
|
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))<B_OK) {
|
||||||
|
if (!silent) {
|
||||||
|
(new BAlert(text[19][language],text[20][language],text[18][language]))->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
|
||||||
|
|
||||||
Reference in New Issue
Block a user