Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 grafx2 (2.5-1) unstable; urgency=medium
 .
   * New upstream version.
   * Bump standards version to 4.2.1.
   * debian/watch: updated.
   * debian/README.source: added.
Author: Gürkan Myczko <gurkan@phys.ethz.ch>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-10-13

--- grafx2-2.5.orig/src/Makefile
+++ grafx2-2.5/src/Makefile
@@ -68,8 +68,8 @@ ifdef COMSPEC
   RMDIR = rmdir --ignore-fail-on-non-empty
   CP = cp
   BIN = ../bin/grafx2.exe
-  COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb `sdl-config --cflags` $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
-  LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT)
+  COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb `sdl2-config --cflags` $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
+  LOPT = `sdl2-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT)
   LUALOPT = -llua
   CC = gcc
   OBJDIR = ../obj/win32
@@ -92,8 +92,8 @@ else
     RMDIR = rmdir --ignore-fail-on-non-empty
     CP = cp
     BIN = ../bin/grafx2
-    COPT = -Wall -gstabs $(shell sdl-config --cflags) $(TTFCOPT)
-    LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lft2
+    COPT = -Wall -gstabs $(shell sdl2-config --cflags) $(TTFCOPT)
+    LOPT = $(shell sdl2-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lft2
     CC = gcc
     OBJDIR = ../obj/amiga
     ZIP = lha
@@ -149,11 +149,11 @@ endif
     FWDIR = /Library/Frameworks
     BIN = ../bin/grafx2
 
-    SDLCONFIG := $(shell which sdl-config)
+    SDLCONFIG := $(shell which sdl2-config)
 ifneq ($(SDLCONFIG), )
     # these are for use with macports
-    SDLCOPT = $(shell sdl-config --cflags)
-    SDLLOPT = $(shell sdl-config --libs) $(shell pkg-config --libs SDL_image)
+    SDLCOPT = $(shell sdl2-config --cflags)
+    SDLLOPT = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL_image)
 else
     # these are for use with Mac OS X native frameworks
     #-framework SDL_ttf 
@@ -209,8 +209,8 @@ endif
     RMDIR = rmdir --ignore-fail-on-non-empty
     CP = cp
     BIN = ../bin/grafx2
-    COPT = -Wall -g $(shell sdl-config --cflags) $(TTFCOPT)
-    LOPT = -lSDL_image $(shell sdl-config --libs) -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared
+    COPT = -Wall -g $(shell sdl2-config --cflags) $(TTFCOPT)
+    LOPT = -lSDL_image $(shell sdl2-config --libs) -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared
     CC = gcc
     OBJDIR = ../obj/aros
     STRIP = strip --strip-unneeded --remove-section .comment
@@ -225,8 +225,8 @@ endif
     RMDIR = rmdir --ignore-fail-on-non-empty
     CP = cp
     BIN = ../bin/grafx2
-    COPT = -Wall -gstabs $(shell sdl-config --cflags) $(TTFCOPT)
-    LOPT = -lSDL_image $(shell sdl-config --libs) -lpng -ljpeg -lz $(TTFLOPT)
+    COPT = -Wall -gstabs $(shell sdl2-config --cflags) $(TTFCOPT)
+    LOPT = -lSDL_image $(shell sdl2-config --libs) -lpng -ljpeg -lz $(TTFLOPT)
     CC = gcc
     OBJDIR = ../obj/morphos
     ZIP = lha
@@ -241,8 +241,8 @@ endif
     RMDIR = rmdir --ignore-fail-on-non-empty
     CP = cp
     BIN = ../bin/grafx2
-    COPT = -W -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/home/config/include
-    LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT)
+    COPT = -W -Wall -g $(shell sdl2-config --cflags) $(TTFCOPT) -I/boot/home/config/include
+    LOPT = $(shell sdl2-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT)
     CC = gcc
     OBJDIR = ../obj/beos
     ZIP = zip
@@ -264,9 +264,9 @@ endif
       LUACOPT = -D__ENABLE_LUA__ $(shell pkg-config $(LUAPKG) --cflags)
       LUALOPT = $(shell pkg-config $(LUAPKG) --libs)
     endif
-    COPT = -W -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT)
+    COPT = -W -Wall -g $(shell sdl2-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT)
     COPT += -DENABLE_FILENAMES_ICONV
-    LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv
+    LOPT = $(shell sdl2-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv
     CC = gcc
     #Append the gcc kind to the objdir (gcc2 or gcc4) to avoid conflicts when switching from one to other.
     OBJKIND = $(shell gcc -dumpversion)
@@ -281,8 +281,8 @@ endif
     RMDIR = rmdir --ignore-fail-on-non-empty
     CP = cp
     BIN = ../bin/grafx2
-    COPT = -W -Wall -Wdeclaration-after-statement -g $(shell sdl-config --cflags) $(TTFCOPT)
-    LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT)
+    COPT = -W -Wall -Wdeclaration-after-statement -g $(shell sdl2-config --cflags) $(TTFCOPT)
+    LOPT = $(shell sdl2-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT)
     CC = gcc
     OBJDIR = ../obj/skyos
     ZIP = zip
@@ -297,8 +297,8 @@ endif
     ZIP = zip
     PLATFORMFILES = ../share/grafx2/gfx2.png
     BIN = ../bin/grafx2
-    COPT = -W -Wall -std=c99 -g -gstabs -D__TRU64__ $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT)
-    LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
+    COPT = -W -Wall -std=c99 -g -gstabs -D__TRU64__ $(shell sdl2-config --cflags) $(TTFCOPT) $(LUACOPT)
+    LOPT = $(shell sdl2-config --libs) -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
     OBJDIR = ../obj/unix
     FCLOPT = -lfontconfig
     COPT += -DUSE_FC
@@ -321,8 +321,8 @@ endif
     STACK = stack
     FIX_FLAGS = flags
     FCLOPT = 
-    COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT)
-    LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT)
+    COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -DNO_INLINE_MATH -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl2-config --cflags` $(JOYCOPT) $(LUACOPT)
+    LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl2-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) $(LAYERLOPT)
   else
   ifeq ($(PLATFORM),syllable) #11
     #Syllable
@@ -335,8 +335,8 @@ endif
     LUACOPT = -I/resources/indexes/include
     LUALOPT = -llua
     BIN = ../bin/grafx2
-    COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -g `sdl-config --cflags` -I/resources/indexes/include/SDL $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
-    LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT) -lm
+    COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -g `sdl2-config --cflags` -I/resources/indexes/include/SDL $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
+    LOPT = `sdl2-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT) -lm
     CC = gcc
     OBJDIR = ../obj/syllable
     FCLOPT = 
@@ -368,7 +368,7 @@ endif
       #cross compile a Win32 executable
       CROSS_CC ?= $(shell which i686-w64-mingw32-gcc || which mingw32-gcc)
       CROSS_PKGCONFIG ?= $(shell which i686-w64-mingw32-pkg-config || which mingw32-pkg-config || which pkg-config)
-      CROSS_SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl-config)
+      CROSS_SDLCONFIG ?= $(shell which ../3rdparty/usr/bin/sdl2-config || which /usr/local/cross-tools/i386-mingw32/bin/sdl2-config)
       CROSS_PKG_CONFIG_PATH ?= $(shell if [ -d ../3rdparty/usr ] ; then echo "$${PWD}/../3rdparty/usr/lib/pkgconfig" ; fi )
       CC = $(CROSS_CC)
       BIN = ../bin/grafx2.exe
@@ -391,8 +391,8 @@ endif
         #cross compile an exec for the gp2x
         CC = /opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin/arm-open2x-linux-gcc
         BIN = ../bin/grafx2.gpe
-        COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -static -g -O$(OPTIM) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --cflags` $(TTFCOPT) -D__GP2X__ $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
-        LOPT = -static -lSDL_image `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl-config --static-libs` -ljpeg -lpng -lz -lm $(TTFLOPT) $(LUALOPT)
+        COPT = -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -static -g -O$(OPTIM) -I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl2-config --cflags` $(TTFCOPT) -D__GP2X__ $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
+        LOPT = -static -lSDL_image `/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin/sdl2-config --static-libs` -ljpeg -lpng -lz -lm $(TTFLOPT) $(LUALOPT)
         OBJDIR = ../obj/gp2x
         NOTTF = 1
         PLATFORM = gp2x
@@ -405,8 +405,8 @@ endif
         BIN = ../bin/grafx2
         LUACOPT = 
         LUALOPT = -lluajit-5.1
-        COPT = -DGCWZERO -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -g -O$(OPTIM) -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL `/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --cflags` $(TTFCOPT)  $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
-        LOPT = -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib -lSDL_image `/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --libs` -ljpeg -lpng -lz -lm $(TTFLOPT) $(LUALOPT)
+        COPT = -DGCWZERO -W -Wall -Wdeclaration-after-statement -pedantic -std=c99 -g -O$(OPTIM) -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL `/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl2-config --cflags` $(TTFCOPT)  $(TTFCOPT) $(JOYCOPT) $(LUACOPT)
+        LOPT = -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib -lSDL_image `/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl2-config --libs` -ljpeg -lpng -lz -lm $(TTFLOPT) $(LUALOPT)
         OBJDIR = ../obj/gp2x
         NOTTF = 1
         PLATFORM = gp2x
@@ -416,8 +416,8 @@ endif
       ifdef AROS32CROSS
         #cross compile an AROS 32 bit executable
         BIN = ../GrafX2
-        COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) $(LUACOPT)
-        LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared $(LUALOPT)
+        COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl2-config --cflags` $(TTFCOPT) $(LUACOPT)
+        LOPT = -lSDL_image `i386-linux-aros-sdl2-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared $(LUALOPT)
         LUACOPT = -I/home/mazze/projects/fullaros/aros-linux-i386-dbg/bin/linux-i386/AROS/Development/include/lua
         LUALOPT = -llua
         CC = i386-linux-aros-gcc
@@ -438,13 +438,13 @@ endif
         STACK = m68k-atari-mint-stack
         FIX_FLAGS = m68k-atari-mint-flags
         FCLOPT = 
-        COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -ffast-math -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl-config --cflags` $(JOYCOPT) $(LUACOPT)
-        LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) -lm $(LAYERLOPT) -Wl,--stack,8k 
+        COPT = -W -Wall -m68020-60 -fomit-frame-pointer -std=c99 -Wdeclaration-after-statement -D__MINT__ -ffast-math -O$(OPTIM) -I$(prefix)/include `$(prefix)/bin/libpng12-config --cflags` `$(prefix)/bin/sdl2-config --cflags` $(JOYCOPT) $(LUACOPT)
+        LOPT = -static -m68020-60 -lSDL_image `$(prefix)/bin/sdl2-config --libs` -L$(prefix)/lib -ltiff -ljpeg `$(prefix)/bin/libpng12-config --libs` -lz -lm $(TTFLOPT) -lfreetype $(LUALOPT) -lm $(LAYERLOPT) -Wl,--stack,8k 
       else
 
         # Compiles a regular linux executable for the native platform
         BIN = ../bin/grafx2
-        COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -g $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
+        COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -g $(shell sdl2-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
         COPT += $(shell pkg-config --cflags libpng)
 
         ifneq ($(PLATFORM), FreeBSD)
