diff -Nru tatan-1.0.dfsg1/debian/changelog tatan-1.0.dfsg1/debian/changelog --- tatan-1.0.dfsg1/debian/changelog 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/changelog 2018-04-24 20:09:34.000000000 +0000 @@ -1,3 +1,13 @@ +tatan (1.0.dfsg1-8) unstable; urgency=medium + + * Patched to compile with gdc-8. (Closes: #896588) + * Enable deprecation warnings during compilation. + * Move to debhelper compat level 11. + * Changed priority from extra to optional. + * Bump Standards-Version to 4.1.4. + + -- Peter De Wachter Tue, 24 Apr 2018 22:09:34 +0200 + tatan (1.0.dfsg1-7) unstable; urgency=medium * Fix build failure with current gdc. diff -Nru tatan-1.0.dfsg1/debian/compat tatan-1.0.dfsg1/debian/compat --- tatan-1.0.dfsg1/debian/compat 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/compat 2018-04-24 20:09:34.000000000 +0000 @@ -1 +1 @@ -9 +11 diff -Nru tatan-1.0.dfsg1/debian/control tatan-1.0.dfsg1/debian/control --- tatan-1.0.dfsg1/debian/control 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/control 2018-04-24 20:09:34.000000000 +0000 @@ -1,12 +1,12 @@ Source: tatan Section: games -Priority: extra +Priority: optional Maintainer: Debian Games Team Uploaders: Miriam Ruiz , Peter De Wachter Build-Depends: - debhelper (>= 9), + debhelper (>= 11), gdc (>= 4.8.1), libgl1-mesa-dev | libgl-dev, libglu1-mesa-dev | libglu-dev, @@ -15,7 +15,7 @@ libsdl1.2-dev Build-Conflicts: libphobos-4.4-dev -Standards-Version: 3.9.8 +Standards-Version: 4.1.4 Homepage: http://hiz.fool.jp/hp/game/tatan/index_en.html Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/tatan/ Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/tatan/ diff -Nru tatan-1.0.dfsg1/debian/patches/dlang_v2.patch tatan-1.0.dfsg1/debian/patches/dlang_v2.patch --- tatan-1.0.dfsg1/debian/patches/dlang_v2.patch 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/patches/dlang_v2.patch 2018-04-24 20:09:34.000000000 +0000 @@ -1,5 +1,5 @@ Description: port to D language version 2 - With this patch the code is accapted by gdc-4.6 0.29.1-4.6.4-3 without + With this patch the code is accepted by gdc-4.6 0.29.1-4.6.4-3 without triggering deprecated feature warnings/errors. Author: Peter De Wachter diff -Nru tatan-1.0.dfsg1/debian/patches/gdc-8.patch tatan-1.0.dfsg1/debian/patches/gdc-8.patch --- tatan-1.0.dfsg1/debian/patches/gdc-8.patch 1970-01-01 00:00:00.000000000 +0000 +++ tatan-1.0.dfsg1/debian/patches/gdc-8.patch 2018-04-24 20:09:34.000000000 +0000 @@ -0,0 +1,335 @@ +Description: More fixes for D language changes + With this patch the code is accepted by gdc-8 8-20180414-1 without + triggering deprecated feature warnings. + - Convert I/O to use std.stdio module + - Fix some unused broken code by deleting it + - Avoid C-style array type notation + - Use "goto case" to mark fall-through in switch statements +Author: Peter De Wachter +Forwarded: no + +--- a/src/br/boss.d ++++ b/src/br/boss.d +@@ -1026,6 +1026,7 @@ + addAnimation(new Magnification(500 ,100.0f) ,"mag"); + changeState("startA"); + } ++ break; + default:break; + } + +--- a/src/br/bullet.d ++++ b/src/br/bullet.d +@@ -164,6 +164,7 @@ + switch(kind){ + case CollisionManager.kind.SHIP: + destroy(); ++ goto case; + case CollisionManager.kind.WALL: + if(re <= 0){ + if(vel.x<0)pos = new Vector3(p.pos.x+(p.collisionRange+collisionRange) ,pos.y ,pos.z); +@@ -228,6 +229,7 @@ + switch(kind){ + case CollisionManager.kind.SHIP: + destroy(); ++ goto case; + case CollisionManager.kind.WALL: + if(!hit){ + if(vel.x<0){ +--- a/src/br/enemy.d ++++ b/src/br/enemy.d +@@ -773,7 +773,7 @@ + // this.acc = (cast(Vector3)vel.clone()) * -0.01f; + + if(ENEMYDSHAPE is null){ +- Shape s = OctaShape.getShape(1.0f ,1.0f).transformMatrix(matRotateZ(-90));; ++ Shape s = OctaShape.getShape(1.0f ,1.0f).transformMatrix(matRotateZ(-90)); + Shape s1 = OctaShape.getShape(0.6f ,3.0f).scalef(0.8f,0.8f,0.8f).transformMatrix(matTranslate(1.5f,0.0f,0.0f)*matRotateZ(45)); + Shape s2 = OctaShape.getShape(0.6f ,3.0f).scalef(0.8f,0.8f,0.8f).transformMatrix(matTranslate(1.5f,0.0f,0.0f)*matRotateZ(135)); + ENEMYDSHAPE = s + s1 + s2; +--- a/src/br/wall.d ++++ b/src/br/wall.d +@@ -10,7 +10,7 @@ + + public void makeWall(string type ,Vector3 pos ,Vector3 vel ,Object par = null){ + switch(type){ +- case "1" : new Wall1(pos ,vel); ++ case "1" : new Wall1(pos ,vel); break; + + default:break; + } +--- a/src/util/log.d ++++ b/src/util/log.d +@@ -3,11 +3,11 @@ + private import std.conv; + private import std.file; + private import std.path; +-private import std.cstream; ++private import std.stdio; + static const string g_logname = "run.log"; + void Log_write(string msg) + { +- std.cstream.dout.writeLine(msg); ++ stdout.writeln(msg); + append(g_logname, msg ~ "\n"); + } + void Log_write(int msg) +@@ -17,6 +17,6 @@ + } + void Log_write(Exception e) + { +- std.cstream.dout.writeLine(e.toString()); ++ stdout.writeln(e.toString()); + append(g_logname, e.toString() ~ "\n"); + } +--- a/src/util/mouse.d ++++ b/src/util/mouse.d +@@ -6,7 +6,6 @@ + module util.mouse; + + private import std.string; +-private import std.stream; + private import SDL; + + private import br.screen; +@@ -107,18 +106,6 @@ + button = 0; + } + +- public void read(File fd) { +- fd.read(x); +- fd.read(y); +- fd.read(button); +- } +- +- public void write(File fd) { +- fd.write(x); +- fd.write(y); +- fd.write(button); +- } +- + public bool equals(MouseState s) { + if (x == s.x && y == s.y && button == s.button) + return true; +--- a/src/util/rand.d ++++ b/src/util/rand.d +@@ -5,7 +5,6 @@ + */ + module util.rand; + +-private import std.stream; + private import std.datetime; + + /** +@@ -112,7 +111,7 @@ + uint MIXBITS(uint u, uint v) { return (u & UMASK) | (v & LMASK); } + uint TWIST(uint u,uint v) { return (MIXBITS(u,v) >> 1) ^ (v&1 ? MATRIX_A : 0); } + +-uint state[N]; /* the array for the state vector */ ++uint[N] state; /* the array for the state vector */ + int left = 1; + int initf = 0; + uint *next; +@@ -137,7 +136,7 @@ + /* key_length is its length */ + //uint init_key[]; + //uint key_length; +-void init_by_array(uint init_key[], uint key_length) ++void init_by_array(uint[] init_key, uint key_length) + { + int i, j, k; + init_genrand(cast(uint)19650218UL); +--- a/src/util/record.d ++++ b/src/util/record.d +@@ -1,5 +1,4 @@ + module util.record; +-private import std.stream; + + public class Record{ + +@@ -32,30 +31,6 @@ + } + } + } +- public void load(File fd){ +- foreach(ref int[] lap;lapTime){ +- foreach(ref int l;lap){ +- fd.read(l); +- } +- } +- foreach(ref int[] total;totalTime){ +- foreach(ref int t;total){ +- fd.read(t); +- } +- } +- } +- public void save(File fd){ +- foreach(ref int[] lap;lapTime){ +- foreach(ref int l;lap){ +- fd.write(l); +- } +- } +- foreach(ref int[] total;totalTime){ +- foreach(ref int t;total){ +- fd.write(t); +- } +- } +- } + public int updateLapRecord(int stage ,int lap){ + int rank = -1; + if(lapTime.length <= stage)return -1; +--- a/import/hell2.d ++++ b/import/hell2.d +@@ -1,10 +1,8 @@ + module hell2; +-private import core.vararg; + private import std.string; + private import std.conv; + private import std.file; + private import std.path; +-private import std.cstream; + private import std.ascii; + private import std.math; + private import std.format; +@@ -186,79 +184,6 @@ + } + + /** +- * SDL初期化 +- */ +-void Hell_init(string caption, int width=640, int height=480, bool fullscreen=false) +-{ +- if(g_init) return; +- g_width = width; +- g_height = height; +- g_videoBpp = 0; +- g_videoFlags = SDL_OPENGL; +- if(fullscreen) +- { +- g_videoFlags |= SDL_FULLSCREEN; +- } +- +- if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO) < 0) +- { +- throw new Error("Hell_init: Couldn't initialize SDL"); +- } +- // スクリーン初期化 +- if((g_screen = SDL_SetVideoMode(g_width, g_height, g_videoBpp, g_videoFlags)) is null) +- { +- throw new Error("Hell_init: Couldn't set video mode"); +- } +- if(fullscreen) +- { +- _toggleShowCursor(); // フルスクリーン時はマウスカーソルを消す +- } +- +- glOrtho(0, g_width, g_height, 0, -1, 1); +- glViewport(0, 0, g_width, g_height); +- glClearColor(0.0f, 0.0f, 0.0f, 0.0f); +- Hell_setCaption(caption); +- // アイコン設定 +- SDL_Surface* icon = SDL_LoadBMP("resource/hell.bmp"); +- SDL_WM_SetIcon(icon, null); +- // サウンド初期化(音を良くしたい場合、下のコメントを外す) +-// if(Mix_OpenAudio(44100, AUDIO_S16, 2, 8192) < 0) +- if(Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024) < 0) +- { +- throw new Error("Hell_init: " ~ to!string(SDL_GetError())); +- } +- +- // ログ初期化 +- write(g_logname, ""); +- if(SDL_NumJoysticks() > 0) +- { +- // ジョイスティック生成 +- g_joy = SDL_JoystickOpen(0); +- if(!g_joy) +- { +- throw new Error(to!string(SDL_GetError())); +- } +- g_joyButtonNum = SDL_JoystickNumButtons(g_joy); +- g_joyButtonPrev = new bool[g_joyButtonNum]; +- g_joyButton = new bool[g_joyButtonNum]; +- } +- else +- { +- g_joy = null; +- g_joyButtonNum = 0; +- } +- +- // フォントの読込 +- Hell_loadFont(); +- +- // 曲面オブジェクト生成 +-// g_quadricObj = gluNewQuadric(); +- +- glEnable(GL_BLEND); +- g_init = true; +-} +- +-/** + * 終了処理 + */ + void Hell_quit() +@@ -283,42 +208,6 @@ + } + + /** +- * キャプション設定(※日本語不可) +- */ +-void Hell_setCaption(...) +-{ +- string _caption = ""; +- void _putc(dchar c) +- { +- scope tmp = [c]; +- _caption ~= toUTF8(tmp); +- } +- doFormat(&_putc, _arguments, _argptr); +- SDL_WM_SetCaption(toStringz(_caption), null); +-} +- +- +-/** +- * ログ書き込み +- */ +-void Hell_write(...) +-{ +- void _putc(dchar c) +- { +- fputc(c, stdout); +- scope tmp = [c]; +- append(g_logname, toUTF8(tmp)); +- } +- doFormat(&_putc, _arguments, _argptr); +-} +- +-void Hell_write(Exception e) +-{ +- dout.writeLine(e.toString()); +- append(g_logname, e.toString() ~ "\n"); +-} +- +-/** + * 画面を消去 + */ + void Hell_begin() +@@ -952,18 +841,6 @@ + tex.unbind(); + } + +-void Hell_drawFontEx(int x, int y, float zoom=1.0f, ubyte r=0xff, ubyte g=0xff, ubyte b=0xff, ubyte a=0xff, ...) +-{ +- string _tmpString = ""; +- void _putc(dchar c) +- { +- scope tmp = [c]; +- _tmpString ~= toUTF8(tmp); +- } +- doFormat(&_putc, _arguments, _argptr); +- Hell_drawFont(_tmpString, x, y, zoom, r, g, b, a); +-} +- + /** + * αブレンド定数 + */ diff -Nru tatan-1.0.dfsg1/debian/patches/imports.patch tatan-1.0.dfsg1/debian/patches/imports.patch --- tatan-1.0.dfsg1/debian/patches/imports.patch 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/patches/imports.patch 2018-04-24 20:09:34.000000000 +0000 @@ -1,5 +1,5 @@ Description: port import/ code to D language version 2 - With this patch the code is accapted by GDC 4.8 without triggering deprecation + With this patch the code is accepted by GDC 4.8 without triggering deprecation warnings/errors. Author: Peter De Wachter @@ -60,6 +60,15 @@ struct SDL_CDtrack { Uint8 id; /* Track number */ +@@ -68,7 +68,7 @@ + int numtracks; /* Number of tracks on disk */ + int cur_track; /* Current track position */ + int cur_frame; /* Current frame offset within current track */ +- SDL_CDtrack track[SDL_MAX_TRACKS+1]; ++ SDL_CDtrack[SDL_MAX_TRACKS+1] track; + } + + /* Conversion functions from frames to Minute/Second/Frames and vice versa */ --- a/import/SDL_endian.d +++ b/import/SDL_endian.d @@ -47,7 +47,7 @@ @@ -731,3 +740,14 @@ SMPEG_scale(mpeg, (on) ? 2 : 1); } +--- a/import/SDL_mouse.d ++++ b/import/SDL_mouse.d +@@ -32,7 +32,7 @@ + Sint16 hot_x, hot_y; /* The "tip" of the cursor */ + Uint8 *data; /* B/W cursor data */ + Uint8 *mask; /* B/W cursor mask */ +- Uint8 *save[2]; /* Place to save cursor area */ ++ Uint8 *[2] save; /* Place to save cursor area */ + void /*WMcursor*/ *wm_cursor; /* Window-manager cursor */ + } + diff -Nru tatan-1.0.dfsg1/debian/patches/makefile.patch tatan-1.0.dfsg1/debian/patches/makefile.patch --- tatan-1.0.dfsg1/debian/patches/makefile.patch 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/patches/makefile.patch 2018-04-24 20:09:34.000000000 +0000 @@ -12,7 +12,7 @@ +all: $(EXE) + +$(EXE): $(DSRC) -+ $(GDC) -o $@ -Iimport -Isrc -Wno-deprecated $(DFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DSRC) -lSDL -lGLU -lGL -lSDL_mixer ++ $(GDC) -o $@ -Iimport -Isrc -Wdeprecated $(DFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DSRC) -lSDL -lGLU -lGL -lSDL_mixer + +clean: + rm -f $(EXE) diff -Nru tatan-1.0.dfsg1/debian/patches/series tatan-1.0.dfsg1/debian/patches/series --- tatan-1.0.dfsg1/debian/patches/series 2016-06-20 08:33:04.000000000 +0000 +++ tatan-1.0.dfsg1/debian/patches/series 2018-04-24 20:09:34.000000000 +0000 @@ -3,3 +3,4 @@ makefile.patch directories.patch dlang_v2.patch +gdc-8.patch