From 4e38e8b10588fb4574e1c100b537f8e252ba101e Mon Sep 17 00:00:00 2001 From: mazze Date: Thu, 25 Feb 2016 20:44:15 +0000 Subject: [PATCH] Build Lunapaint from Contrib. core/canvas.c had to be renamed because there is a file with the same name in another directory and %build_prog flattens the directory structure. Fixed a PNG ABI change in export_import.c. git-svn-id: https://svn.aros.org/svn/aros/trunk/contrib@51543 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- gfx/lunapaint/mmakefile.src | 67 ++++++++++++++++++++++++++ gfx/lunapaint/src/app/catalogs/mmakefile.src | 12 +++++ gfx/lunapaint/src/app/export_import.c | 2 +- gfx/lunapaint/src/core/{canvas.c => canvas2.c} | 0 4 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 gfx/lunapaint/mmakefile.src create mode 100644 gfx/lunapaint/src/app/catalogs/mmakefile.src rename gfx/lunapaint/src/core/{canvas.c => canvas2.c} (100%) diff --git a/gfx/lunapaint/mmakefile.src b/gfx/lunapaint/mmakefile.src new file mode 100644 index 000000000..f16e5f84a --- /dev/null +++ b/gfx/lunapaint/mmakefile.src @@ -0,0 +1,67 @@ +# $Id$ + +include $(TOP)/config/make.cfg + +#MM- contrib-gfx : contrib-gfx-$(AROS_TARGET_CPU) + +#MM- contrib-gfx-i386 : contrib-gfx-lunapaint +#DISABLED #MM- contrib-gfx-m68k : contrib-gfx-lunapaint +#MM- contrib-gfx-arm : contrib-gfx-lunapaint + +#MM contrib-gfx-lunapaint : includes linklibs workbench-libs-freetype-linklib \ +#MM contrib-gfx-lunapaint-data \ +#MM contrib-gfx-lunapaint-cpy \ +#MM contrib-gfx-lunapaint-catalogs \ +#MM contrib-gfx-lunapaint-deficon + +TARGETDIR := $(AROS_CONTRIB)/MultiMedia/Gfx/Lunapaint +DEFICON := def_Lunapaint + +# Next version of Lunapaint shouldn't need -fgnu89-inline anymore +USER_CFLAGS := -fgnu89-inline -fno-strict-aliasing +USER_INCLUDES:= -I$(SRCDIR)/$(CURDIR)/src + +FILES := \ + src/main \ + src/math/math \ + src/app/events \ + src/app/gui \ + src/app/text_to_brush \ + src/app/toolbox \ + src/app/preferences \ + src/app/new_image \ + src/app/layers \ + src/app/parts \ + src/app/canvas \ + src/app/export_import \ + src/app/project \ + src/app/animation \ + src/app/about_window \ + src/app/palette_editor \ + src/app/locale \ + src/core/effects \ + src/core/color \ + src/core/drawtools \ + src/core/canvas2 \ + src/core/tools + +%build_prog mmake=contrib-gfx-lunapaint progname=Lunapaint \ + files=$(FILES) targetdir=$(TARGETDIR) \ + uselibs="mui png z freetype2" + + +%build_icons mmake=contrib-gfx-lunapaint-deficon \ + icons=$(DEFICON) dir=$(AROS_ENVARC)/SYS + + +%copy_dir_recursive mmake=contrib-gfx-lunapaint-data src=data \ + dst=$(TARGETDIR)/data + + +CPFILES := BUGS Changelog COPYING default.palette Lunapaint.info lunapaint.prefs README TODO + +%copy_files_q mmake=contrib-gfx-lunapaint-cpy files=$(CPFILES) src=. \ + dst=$(TARGETDIR) + + +%common diff --git a/gfx/lunapaint/src/app/catalogs/mmakefile.src b/gfx/lunapaint/src/app/catalogs/mmakefile.src new file mode 100644 index 000000000..90d650d1f --- /dev/null +++ b/gfx/lunapaint/src/app/catalogs/mmakefile.src @@ -0,0 +1,12 @@ +# Copyright © 2016, The AROS Development Team. All rights reserved. +# $Id$ + +include $(TOP)/config/make.cfg + +TARGETDIR := $(AROS_CONTRIB)/MultiMedia/Gfx/Lunapaint/Catalogs + +%build_catalogs mmake=contrib-gfx-lunapaint-catalogs \ + name=Lunapaint source=$(SRCDIR)/$(CURDIR)/../strings.h \ + subdir= dir=$(TARGETDIR) + +FIXME: it shouldn't be necessary to create strings.h in SRCDIR diff --git a/gfx/lunapaint/src/app/export_import.c b/gfx/lunapaint/src/app/export_import.c index 4b3fae17b..c7cfdad81 100755 --- a/gfx/lunapaint/src/app/export_import.c +++ b/gfx/lunapaint/src/app/export_import.c @@ -671,7 +671,7 @@ void exportDT ( int w, int h, unsigned int *buffer, unsigned char *filename, con static void png_user_write( png_structp png_ptr, png_bytep data, png_size_t length ) { - Write ( png_ptr->io_ptr, data, length ); + Write ( png_get_io_ptr(png_ptr), data, length ); } static void png_user_flush( png_structp png_ptr ) { diff --git a/gfx/lunapaint/src/core/canvas.c b/gfx/lunapaint/src/core/canvas2.c similarity index 100% rename from gfx/lunapaint/src/core/canvas.c rename to gfx/lunapaint/src/core/canvas2.c -- 2.11.4.GIT