pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
nuvie: build fixes from upstream
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Sat Sep 29 18:48:40 2018 +0200
Changeset: 3a6b6c329b04a0fffe06c7d605e807aea419224d
Modified Files:
nuvie/distinfo
nuvie/patches/patch-nuvieDefs.h
Added Files:
nuvie/patches/patch-Effect.cpp
nuvie/patches/patch-Look.cpp
nuvie/patches/patch-Map.cpp
nuvie/patches/patch-MapWindow.cpp
nuvie/patches/patch-screen_Screen.cpp
nuvie/patches/patch-sound_adplug_OplClass.cpp
Log Message:
nuvie: build fixes from upstream
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3a6b6c329b04a0fffe06c7d605e807aea419224d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
nuvie/distinfo | 8 ++-
nuvie/patches/patch-Effect.cpp | 26 ++++++++
nuvie/patches/patch-Look.cpp | 15 +++++
nuvie/patches/patch-Map.cpp | 15 +++++
nuvie/patches/patch-MapWindow.cpp | 15 +++++
nuvie/patches/patch-nuvieDefs.h | 10 +--
nuvie/patches/patch-screen_Screen.cpp | 24 +++++++
nuvie/patches/patch-sound_adplug_OplClass.cpp | 96 +++++++++++++++++++++++++++
8 files changed, 199 insertions(+), 10 deletions(-)
diffs:
diff --git a/nuvie/distinfo b/nuvie/distinfo
index ce2a0b1a57..b7902be96d 100644
--- a/nuvie/distinfo
+++ b/nuvie/distinfo
@@ -3,6 +3,12 @@ $NetBSD: distinfo,v 1.1 2015/08/17 21:22:15 yhardy Exp $
SHA1 (nuvie-0.5.tgz) = d4de34d0d9a01bfa1f5cd895d4e31b394dee19fc
RMD160 (nuvie-0.5.tgz) = 3dec5d61888ff7c06eed1b1179f0dccfc32c3d69
Size (nuvie-0.5.tgz) = 1656332 bytes
+SHA1 (patch-Effect.cpp) = 3f40d8001378bf8ae2c3010f924019ee23e4cb2b
+SHA1 (patch-Look.cpp) = 1fe19b491c040096005c6e8e9786626993506f58
+SHA1 (patch-Map.cpp) = 318ecd2928a65a5e8405acd1c3c8b453a6b7a0ca
+SHA1 (patch-MapWindow.cpp) = 142aa76f332a4c30e2e48c9811adcdf978178359
SHA1 (patch-configure) = 9e2b302469c070c36c670a70f6987fed22d27771
SHA1 (patch-configure.ac) = ebb7c28a7893c544ba96c88c25dad9974f69479d
-SHA1 (patch-nuvieDefs.h) = 24b6a928b0840ceb96d7e92d3bf39bdec08074df
+SHA1 (patch-nuvieDefs.h) = 22b72f19a2eb82ce23b39e683fe2e0340c97cf8b
+SHA1 (patch-screen_Screen.cpp) = d0ce8e8b2551fc398a2f0fbd5b4de80c2809916b
+SHA1 (patch-sound_adplug_OplClass.cpp) = fe8c8814e9f46cee10db39414c420aa6d0ed7e1d
diff --git a/nuvie/patches/patch-Effect.cpp b/nuvie/patches/patch-Effect.cpp
new file mode 100644
index 0000000000..ceb508fa6c
--- /dev/null
+++ b/nuvie/patches/patch-Effect.cpp
@@ -0,0 +1,26 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- Effect.cpp.orig 2014-02-22 12:05:53.000000000 +0000
++++ Effect.cpp
+@@ -1082,7 +1082,7 @@ void FadeEffect::init_pixelated_fade()
+ {
+ // put surface on transparent background (not checked)
+ fillret = SDL_FillRect(overlay, NULL, uint32(TRANSPARENT_COLOR));
+- SDL_Rect overlay_rect = { fade_x, fade_y, 0, 0 };
++ SDL_Rect overlay_rect = { (Sint16)fade_x, (Sint16)fade_y, 0, 0 };
+ fillret = SDL_BlitSurface(fade_from, NULL,
+ overlay, &overlay_rect);
+ }
+@@ -1234,8 +1234,8 @@ bool FadeEffect::pixelated_fade_core(uin
+ SDL_FillRect(overlay, NULL, (uint32)fade_to);
+ else // Note: assert(fade_from) if(fade_to < 0)
+ {
+- SDL_Rect fade_from_rect = { 0, 0, fade_from->w, fade_from->h };
+- SDL_Rect overlay_rect = { fade_x, fade_y, fade_from->w, fade_from->h };
++ SDL_Rect fade_from_rect = { 0, 0, (Uint16)fade_from->w, (Uint16)fade_from->h };
++ SDL_Rect overlay_rect = { (Sint16)fade_x, (Sint16)fade_y, (Uint16)fade_from->w, (Uint16)fade_from->h };
+ SDL_BlitSurface(fade_from, &fade_from_rect, overlay, &overlay_rect);
+ }
+ return(true);
diff --git a/nuvie/patches/patch-Look.cpp b/nuvie/patches/patch-Look.cpp
new file mode 100644
index 0000000000..6ab77869c1
--- /dev/null
+++ b/nuvie/patches/patch-Look.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- Look.cpp.orig 2012-07-06 18:54:24.000000000 +0000
++++ Look.cpp
+@@ -37,7 +37,7 @@ Look::Look(Configuration *cfg)
+ {
+ config = cfg;
+
+- look_tbl[2047] = '\0';
++ look_tbl[2047] = NULL;
+ max_len = 0;
+ }
+
diff --git a/nuvie/patches/patch-Map.cpp b/nuvie/patches/patch-Map.cpp
new file mode 100644
index 0000000000..0516f93335
--- /dev/null
+++ b/nuvie/patches/patch-Map.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- Map.cpp.orig 2014-02-22 12:05:53.000000000 +0000
++++ Map.cpp
+@@ -44,7 +44,7 @@ Map::Map(Configuration *cfg)
+ actor_manager = NULL;
+ surface = NULL;
+ roof_surface = NULL;
+- dungeons[4] = '\0';
++ dungeons[4] = NULL;
+
+ config->value(config_get_game_key(config) + "/roof_mode", roof_mode, false);
+ }
diff --git a/nuvie/patches/patch-MapWindow.cpp b/nuvie/patches/patch-MapWindow.cpp
new file mode 100644
index 0000000000..d767f52c4b
--- /dev/null
+++ b/nuvie/patches/patch-MapWindow.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- MapWindow.cpp.orig 2014-02-22 12:05:53.000000000 +0000
++++ MapWindow.cpp
+@@ -2730,7 +2730,7 @@ SDL_Surface *MapWindow::get_sdl_surface(
+ {
+ SDL_Surface *new_surface = NULL;
+ unsigned char *screen_area;
+- SDL_Rect copy_area = { area.x + x, area.y + y, w, h };
++ SDL_Rect copy_area = { (Sint16)(area.x + x), (Sint16)(area.y + y), w, h };
+
+ GUI::get_gui()->Display();
+ screen_area = screen->copy_area(©_area);
diff --git a/nuvie/patches/patch-nuvieDefs.h b/nuvie/patches/patch-nuvieDefs.h
index 10b236bfe5..1afc38df26 100644
--- a/nuvie/patches/patch-nuvieDefs.h
+++ b/nuvie/patches/patch-nuvieDefs.h
@@ -1,17 +1,9 @@
$NetBSD: patch-nuvieDefs.h,v 1.1 2015/08/17 21:22:15 yhardy Exp $
-Define nearbyint, use random on NetBSD.
+Use random on NetBSD.
--- nuvieDefs.h.orig 2014-01-12 23:48:46.000000000 +0000
+++ nuvieDefs.h
-@@ -50,6 +50,7 @@ typedef uint8 nuvie_game_t; // Game type
- #define clamp_min(v, c) (((v) < (c)) ? (c) : (v))
- #define clamp_max(v, c) (((v) > (c)) ? (c) : (v))
- #define clamp(v, c1, c2) ( ((v) < (c1)) ? (c1) : (((v) > (c2)) ? (c2) : (v)) )
-+#define nearbyint(f) rint(f)
-
- #define WRAPPED_COORD(c,level) ((c)&((level)?255:1023))
- #define WRAP_COORD(c,level) ((c)&=((level)?255:1023))
@@ -108,7 +109,7 @@ typedef unsigned char BOOL;
#endif
diff --git a/nuvie/patches/patch-screen_Screen.cpp b/nuvie/patches/patch-screen_Screen.cpp
new file mode 100644
index 0000000000..660be32222
--- /dev/null
+++ b/nuvie/patches/patch-screen_Screen.cpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- screen/Screen.cpp.orig 2014-02-15 06:41:33.000000000 +0000
++++ screen/Screen.cpp
+@@ -1867,7 +1867,7 @@ unsigned char *Screen::copy_area32(SDL_R
+ // (NULL area = entire screen)
+ unsigned char *Screen::copy_area(SDL_Rect *area, unsigned char *buf)
+ {
+- SDL_Rect screen_area = { 0, 0, surface->w, surface->h };
++ SDL_Rect screen_area = { 0, 0, (uint16)surface->w, (uint16)surface->h };
+ if(!area)
+ area = &screen_area;
+
+@@ -1883,7 +1883,7 @@ unsigned char *Screen::copy_area(SDL_Rec
+ void Screen::restore_area(unsigned char *pixels, SDL_Rect *area,
+ unsigned char *target, SDL_Rect *target_area, bool free_src)
+ {
+- SDL_Rect screen_area = { 0, 0, surface->w, surface->h };
++ SDL_Rect screen_area = { 0, 0, (Uint16)surface->w, (Uint16)surface->h };
+ if(!area)
+ area = &screen_area;
+
diff --git a/nuvie/patches/patch-sound_adplug_OplClass.cpp b/nuvie/patches/patch-sound_adplug_OplClass.cpp
new file mode 100644
index 0000000000..32f56ac6cb
--- /dev/null
+++ b/nuvie/patches/patch-sound_adplug_OplClass.cpp
@@ -0,0 +1,96 @@
+$NetBSD$
+
+"Fixes for C++11 support" from upstream.
+
+--- sound/adplug/OplClass.cpp.orig 2013-06-15 08:10:49.000000000 +0000
++++ sound/adplug/OplClass.cpp
+@@ -143,45 +143,46 @@ static const int slot_array[32]=
+ static const UINT32 ksl_tab[8*16]=
+ {
+ /* OCT 0 */
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
+ /* OCT 1 */
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV,
+- 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(0.750/DV), (UINT32)(1.125/DV), (UINT32)(1.500/DV),
++ (UINT32)(1.875/DV), (UINT32)(2.250/DV), (UINT32)(2.625/DV), (UINT32)(3.000/DV),
+ /* OCT 2 */
+- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+- 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV,
+- 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV,
+- 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV),
++ (UINT32)(0.000/DV), (UINT32)(1.125/DV), (UINT32)(1.875/DV), (UINT32)(2.625/DV),
++ (UINT32)(3.000/DV), (UINT32)(3.750/DV), (UINT32)(4.125/DV), (UINT32)(4.500/DV),
++ (UINT32)(4.875/DV), (UINT32)(5.250/DV), (UINT32)(5.625/DV), (UINT32)(6.000/DV),
+ /* OCT 3 */
+- 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV,
+- 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV,
+- 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV,
+- 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(1.875/DV),
++ (UINT32)(3.000/DV), (UINT32)(4.125/DV), (UINT32)(4.875/DV), (UINT32)(5.625/DV),
++ (UINT32)(6.000/DV), (UINT32)(6.750/DV), (UINT32)(7.125/DV), (UINT32)(7.500/DV),
++ (UINT32)(7.875/DV), (UINT32)(8.250/DV), (UINT32)(8.625/DV), (UINT32)(9.000/DV),
+ /* OCT 4 */
+- 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV,
+- 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV,
+- 9.000/DV, 9.750/DV,10.125/DV,10.500/DV,
+- 10.875/DV,11.250/DV,11.625/DV,12.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(0.000/DV), (UINT32)(3.000/DV), (UINT32)(4.875/DV),
++ (UINT32)(6.000/DV), (UINT32)(7.125/DV), (UINT32)(7.875/DV), (UINT32)(8.625/DV),
++ (UINT32)(9.000/DV), (UINT32)(9.750/DV),(UINT32)(10.125/DV),(UINT32)(10.500/DV),
++ (UINT32)(10.875/DV),(UINT32)(11.250/DV),(UINT32)(11.625/DV),(UINT32)(12.000/DV),
+ /* OCT 5 */
+- 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV,
+- 9.000/DV,10.125/DV,10.875/DV,11.625/DV,
+- 12.000/DV,12.750/DV,13.125/DV,13.500/DV,
+- 13.875/DV,14.250/DV,14.625/DV,15.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(3.000/DV), (UINT32)(6.000/DV), (UINT32)(7.875/DV),
++ (UINT32)(9.000/DV),(UINT32)(10.125/DV),(UINT32)(10.875/DV),(UINT32)(11.625/DV),
++ (UINT32)(12.000/DV),(UINT32)(12.750/DV),(UINT32)(13.125/DV),(UINT32)(13.500/DV),
++ (UINT32)(13.875/DV),(UINT32)(14.250/DV),(UINT32)(14.625/DV),(UINT32)(15.000/DV),
+ /* OCT 6 */
+- 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV,
+- 12.000/DV,13.125/DV,13.875/DV,14.625/DV,
+- 15.000/DV,15.750/DV,16.125/DV,16.500/DV,
+- 16.875/DV,17.250/DV,17.625/DV,18.000/DV,
++ (UINT32)(0.000/DV), (UINT32)(6.000/DV), (UINT32)(9.000/DV),(UINT32)(10.875/DV),
++ (UINT32)(12.000/DV),(UINT32)(13.125/DV),(UINT32)(13.875/DV),(UINT32)(14.625/DV),
++ (UINT32)(15.000/DV),(UINT32)(15.750/DV),(UINT32)(16.125/DV),(UINT32)(16.500/DV),
++ (UINT32)(16.875/DV),(UINT32)(17.250/DV),(UINT32)(17.625/DV),(UINT32)(18.000/DV),
+ /* OCT 7 */
+- 0.000/DV, 9.000/DV,12.000/DV,13.875/DV,
+- 15.000/DV,16.125/DV,16.875/DV,17.625/DV,
+- 18.000/DV,18.750/DV,19.125/DV,19.500/DV,
+- 19.875/DV,20.250/DV,20.625/DV,21.000/DV
++ (UINT32)(0.000/DV), (UINT32)(9.000/DV),(UINT32)(12.000/DV),(UINT32)(13.875/DV),
++ (UINT32)(15.000/DV),(UINT32)(16.125/DV),(UINT32)(16.875/DV),(UINT32)(17.625/DV),
++ (UINT32)(18.000/DV),(UINT32)(18.750/DV),(UINT32)(19.125/DV),(UINT32)(19.500/DV),
++ (UINT32)(19.875/DV),(UINT32)(20.250/DV),(UINT32)(20.625/DV),(UINT32)(21.000/DV)
++
+ };
+ #undef DV
+
+@@ -306,8 +307,8 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0
+ #define ML 2
+ static const UINT8 mul_tab[16]= {
+ /* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */
+- 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML,
+- 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML
++ (UINT8)(0.50*ML), (UINT8)(0.00*ML), (UINT8)(0.00*ML), (UINT8)(0.00*ML), (UINT8)(4.00*ML), (UINT8)(0.00*ML), (UINT8)(6.00*ML), (UINT8)(7.00*ML),
++ (UINT8)(8.00*ML), (UINT8)(9.00*ML),(UINT8)(10.00*ML),(UINT8)(10.00*ML),(UINT8)(12.00*ML),(UINT8)(12.00*ML),(UINT8)(15.00*ML),(UINT8)(15.00*ML)
+ };
+ #undef ML
+
Home |
Main Index |
Thread Index |
Old Index