Merge 0.9.24 master branch into sdl2.0
This commit is contained in:
commit
7769410b2e
18 changed files with 213 additions and 122 deletions
|
|
@ -8,7 +8,7 @@ http://www.tuxpaint.org/
|
|||
|
||||
$Id$
|
||||
|
||||
2020.April.1 (0.9.24)
|
||||
2020.April.24 (0.9.24)
|
||||
* New tools
|
||||
---------
|
||||
* Fill
|
||||
|
|
@ -31,6 +31,16 @@ $Id$
|
|||
* macOS build documentation updates.
|
||||
Mark K. Kim <markuskimius@gmail.com>
|
||||
|
||||
* Wrapped some debug output in "#ifdef DEBUG" tests,
|
||||
and made sure some warnings and errors were going to
|
||||
STDERR, rather than STDOUT.
|
||||
|
||||
* Updates to build for Windows (using mingw/msys)
|
||||
TOYAMA Shin-ichi <shin1@wmail.plala.or.jp>
|
||||
|
||||
* Updates to 'spec' file for Linux RPM builds
|
||||
TOYAMA Shin-ichi <shin1@wmail.plala.or.jp>
|
||||
|
||||
* Other Improvements
|
||||
------------------
|
||||
* Added ability to move color palette options to the end of
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ cutting a release (tagging in the source code repository, and running
|
|||
* Makefile
|
||||
|
||||
* Build description files:
|
||||
* tuxpaint.spec (RPM package)
|
||||
* tuxpaint.spec (Linux RPM package)
|
||||
* macos/Info.plist (macOS build)
|
||||
* win32/resources.rc (Windows mingw/msys build)
|
||||
|
||||
* Documentation
|
||||
(For HTML variants, be sure to run "make" in "docs/", to
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
June 14, 2002 - March 28, 2020
|
||||
June 14, 2002 - May 29, 2020
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
September 14, 2002 - March 28, 2020
|
||||
September 14, 2002 - May 29, 2020
|
||||
|
||||
Drawing-related
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Options Documentation
|
|||
Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
March 28, 2020
|
||||
May 29, 2020
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
Copyright 2002-2020 by various contributors; see AUTHORS.txt
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
June 14, 2002 - April 1, 2020
|
||||
June 14, 2002 - May 29, 2020
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ Extending Tux Paint</h1>
|
|||
<p>Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt<br/>
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
<p>June 14, 2002 - March 28, 2020</p>
|
||||
<p>June 14, 2002 -
|
||||
May 29, 2020</p>
|
||||
</center>
|
||||
|
||||
<hr size=2 noshade>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ Frequently Asked Questions</h1>
|
|||
<p>Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt<br/>
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
<p>September 14, 2002 - March 28, 2020</p>
|
||||
<p>September 14, 2002 -
|
||||
|
||||
May 29, 2020</p>
|
||||
</center>
|
||||
|
||||
<h2>Drawing-related</h2>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ version
|
|||
<p>Copyright (c) 2002-2020 by various contributors; see AUTHORS.txt<br/>
|
||||
<a href="http://www.tuxpaint.org/">http://www.tuxpaint.org/</a></p>
|
||||
|
||||
<p>March 28, 2020</p>
|
||||
<p>May 29, 2020</p>
|
||||
|
||||
|
||||
</center>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ version
|
|||
|
||||
<p>June 14, 2002 -
|
||||
|
||||
April 1, 2020</p>
|
||||
May 29, 2020</p>
|
||||
|
||||
</center>
|
||||
|
||||
|
|
|
|||
10
src/fonts.c
10
src/fonts.c
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
fonts.c
|
||||
|
||||
Copyright (c) 2009-2017
|
||||
Copyright (c) 2009-2020
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -901,7 +901,7 @@ static void groupfonts(void)
|
|||
//printf("groupfonts() qsort(user_font_families 2...)\n");
|
||||
//fflush(stdout);
|
||||
if (num_font_families > 0 && user_font_families[0]->score < 0)
|
||||
printf("sorted the wrong way, or all fonts were unusable\n");
|
||||
fprintf(stderr, "sorted the wrong way, or all fonts were unusable\n");
|
||||
#if 0
|
||||
// THREADED_FONTS
|
||||
printf("Trim starting with %d families\n", num_font_families);
|
||||
|
|
@ -1225,7 +1225,7 @@ void receive_some_font_info(SDL_Surface * screen, SDL_Texture * texture, SDL_Ren
|
|||
waitpid(font_scanner_pid, &status, 0);
|
||||
if (WIFSIGNALED(status) || font_thread_aborted)
|
||||
{
|
||||
printf("child killed by signal %u\n", WTERMSIG(status));
|
||||
fprintf(stderr, "child killed by signal %u\n", WTERMSIG(status));
|
||||
user_font_families = NULL;
|
||||
num_font_families = 0;
|
||||
font_thread_done = 1;
|
||||
|
|
@ -1457,7 +1457,7 @@ static int do_surfcmp(const SDL_Surface * const *const v1, const SDL_Surface * c
|
|||
|
||||
if (s1 == s2)
|
||||
{
|
||||
printf("s1==s2?\n");
|
||||
fprintf(stderr, "s1==s2?\n");
|
||||
return 0;
|
||||
}
|
||||
if (!s1 || !s2 || !s1->w || !s2->w || !s1->h || !s2->h || !s1->format || !s2->format)
|
||||
|
|
@ -1567,7 +1567,7 @@ out:
|
|||
while (count--)
|
||||
{
|
||||
if (surfs[count] == NULL)
|
||||
printf("TRYING TO RE-FREE!");
|
||||
fprintf(stderr, "TRYING TO RE-FREE!");
|
||||
else
|
||||
{
|
||||
SDL_FreeSurface(surfs[count]);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
For Tux Paint
|
||||
Language-related functions
|
||||
|
||||
Copyright (c) 2002-2019 by Bill Kendrick and others
|
||||
Copyright (c) 2002-2020 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
$Id$
|
||||
|
||||
June 14, 2002 - August 29, 2019
|
||||
June 14, 2002 - April 2, 2020
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.\" tuxpaint.1 - 2020.03.28
|
||||
.TH TUXPAINT 1 "28 March 2020" "0.9.24" "Tux Paint"
|
||||
.\" tuxpaint.1 - 2020.05.29
|
||||
.TH TUXPAINT 1 "29 May 2020" "0.9.24" "Tux Paint"
|
||||
.SH NAME
|
||||
tuxpaint -- "Tux Paint", a drawing program for young children.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
/*
|
||||
onscreen_keyboard.c
|
||||
|
||||
Copyright (c) 2020
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
*/
|
||||
|
||||
#include "onscreen_keyboard.h"
|
||||
|
||||
#define DEBUG_OSK_COMPOSEMAP
|
||||
|
|
@ -79,14 +101,14 @@ struct osk_keyboard *osk_create(char *layout_name, SDL_Surface * canvas, SDL_Sur
|
|||
layout = load_layout(keyboard, layout_name);
|
||||
if (!layout)
|
||||
{
|
||||
printf("Error trying to load the required layout %s\n", layout_name);
|
||||
fprintf(stderr, "Error trying to load the required layout %s\n", layout_name);
|
||||
layout = load_layout(keyboard, strdup("default.layout"));
|
||||
if (!layout)
|
||||
{
|
||||
printf("Error trying to load the default layout\n");
|
||||
fprintf(stderr, "Error trying to load the default layout\n");
|
||||
return NULL;
|
||||
}
|
||||
printf("Loaded the default layout instead.\n");
|
||||
fprintf(stderr, "Loaded the default layout instead.\n");
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
@ -100,7 +122,7 @@ struct osk_keyboard *osk_create(char *layout_name, SDL_Surface * canvas, SDL_Sur
|
|||
canvas->format->Rmask, canvas->format->Gmask, canvas->format->Bmask, 0);
|
||||
if (!surface)
|
||||
{
|
||||
printf("Error creating the onscreen keyboard surface\n");
|
||||
fprintf(stderr, "Error creating the onscreen keyboard surface\n");
|
||||
return NULL;
|
||||
}
|
||||
// keyboard->name = layout_name;
|
||||
|
|
@ -177,7 +199,7 @@ static struct osk_layout *load_layout(on_screen_keyboard * keyboard, char *layou
|
|||
fi = fopen(filename, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't open either %s nor %s\n", layout_name, filename);
|
||||
fprintf(stderr, "Can't open either %s nor %s\n", layout_name, filename);
|
||||
/* Fallback to default */
|
||||
snprintf(filename, 255, "%sosk/default.layout", DATA_PREFIX);
|
||||
fi = fopen(filename, "r");
|
||||
|
|
@ -195,7 +217,7 @@ static struct osk_layout *load_layout(on_screen_keyboard * keyboard, char *layou
|
|||
free(filename);
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't load the on screen keyboard layout\n");
|
||||
fprintf(stderr, "Can't load the on screen keyboard layout\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -297,7 +319,7 @@ void load_hlayout(osk_layout * layout, char *hlayout_name)
|
|||
fi = fopen(filename, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't open either %s nor %s\n", hlayout_name, filename);
|
||||
fprintf(stderr, "Can't open either %s nor %s\n", hlayout_name, filename);
|
||||
layout->keys = NULL;
|
||||
free(filename);
|
||||
return;
|
||||
|
|
@ -482,7 +504,7 @@ void load_keymap(osk_layout * layout, char *keymap_name)
|
|||
fi = fopen(filename, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't open either %s nor %s\n", keymap_name, filename);
|
||||
fprintf(stderr, "Can't open either %s nor %s\n", keymap_name, filename);
|
||||
layout->keys = NULL;
|
||||
free(filename);
|
||||
return;
|
||||
|
|
@ -670,7 +692,7 @@ static void load_composemap(osk_layout * layout, char *composemap_name)
|
|||
fi = fopen(filename, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't open either %s nor %s\n", composemap_name, filename);
|
||||
fprintf(stderr, "Can't open either %s nor %s\n", composemap_name, filename);
|
||||
layout->keys = NULL;
|
||||
free(filename);
|
||||
return;
|
||||
|
|
@ -778,7 +800,7 @@ static void load_keysymdefs(osk_layout * layout, char *keysymdefs_name)
|
|||
fi = fopen(filename, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't open either %s nor %s\n", keysymdefs_name, filename);
|
||||
fprintf(stderr, "Can't open either %s nor %s\n", keysymdefs_name, filename);
|
||||
layout->keysymdefs = NULL;
|
||||
free(filename);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -221,9 +221,9 @@ void parse_one_option(struct cfginfo *restrict tmpcfg, const char *str, const ch
|
|||
opt = "yes";
|
||||
} else if (strcmp(opt, "yes")) {
|
||||
if(src)
|
||||
printf("Option '%s' in config file '%s' is yes/ask/new only, but got '%s'\n",str,src,opt);
|
||||
fprintf(stderr, "Option '%s' in config file '%s' is yes/ask/new only, but got '%s'\n",str,src,opt);
|
||||
else
|
||||
printf("Command line option '--%s' is yes/ask/new only, but got '%s'\n",str,opt);
|
||||
fprintf(stderr, "Command line option '--%s' is yes/ask/new only, but got '%s'\n",str,opt);
|
||||
exit(51);
|
||||
}
|
||||
}
|
||||
|
|
@ -237,9 +237,9 @@ void parse_one_option(struct cfginfo *restrict tmpcfg, const char *str, const ch
|
|||
if(!cfg || (!(flags & BOOLMASK) && noflag) )
|
||||
{
|
||||
if(src)
|
||||
printf("Unknown option '%s' in config file '%s'\n",str,src);
|
||||
fprintf(stderr, "Unknown option '%s' in config file '%s'\n",str,src);
|
||||
else
|
||||
printf("Unknown command line option '--%s'\n",str);
|
||||
fprintf(stderr, "Unknown command line option '--%s'\n",str);
|
||||
exit(47);
|
||||
}
|
||||
|
||||
|
|
@ -248,12 +248,12 @@ void parse_one_option(struct cfginfo *restrict tmpcfg, const char *str, const ch
|
|||
if(src)
|
||||
{
|
||||
// immediate options are only for the command line
|
||||
printf("Unknown option '%s' in config file '%s'\n",str,src);
|
||||
fprintf(stderr, "Unknown option '%s' in config file '%s'\n",str,src);
|
||||
exit(49);
|
||||
}
|
||||
if(opt)
|
||||
{
|
||||
printf("Command line option '--%s' doesn't take a value.\n",str);
|
||||
fprintf(stderr, "Command line option '--%s' doesn't take a value.\n",str);
|
||||
exit(50);
|
||||
}
|
||||
cfg->val();
|
||||
|
|
@ -272,18 +272,18 @@ void parse_one_option(struct cfginfo *restrict tmpcfg, const char *str, const ch
|
|||
else
|
||||
{
|
||||
if(src)
|
||||
printf("Option '%s' in config file '%s' is yes/no only, but got '%s'\n",str,src,opt);
|
||||
fprintf(stderr, "Option '%s' in config file '%s' is yes/no only, but got '%s'\n",str,src,opt);
|
||||
else
|
||||
printf("Command line option '--%s' is yes/no only, but got '%s'\n",str,opt);
|
||||
fprintf(stderr, "Command line option '--%s' is yes/no only, but got '%s'\n",str,opt);
|
||||
exit(51);
|
||||
}
|
||||
}
|
||||
else if(!opt || !*opt)
|
||||
{
|
||||
if(src)
|
||||
printf("Option '%s' in config file '%s' needs a value\n",str,src);
|
||||
fprintf(stderr, "Option '%s' in config file '%s' needs a value\n",str,src);
|
||||
else
|
||||
printf("Command line option '--%s' needs a value\n",str);
|
||||
fprintf(stderr, "Command line option '--%s' needs a value\n",str);
|
||||
exit(52);
|
||||
}
|
||||
|
||||
|
|
@ -293,9 +293,9 @@ void parse_one_option(struct cfginfo *restrict tmpcfg, const char *str, const ch
|
|||
if(dupecheck)
|
||||
{
|
||||
if(src)
|
||||
printf("Option '%s' in config file '%s' sets '%s' again.\n",str,src,cfg->name);
|
||||
fprintf(stderr, "Option '%s' in config file '%s' sets '%s' again.\n",str,src,cfg->name);
|
||||
else
|
||||
printf("Command line option '--%s' sets '%s' again.\n",str,cfg->name);
|
||||
fprintf(stderr, "Command line option '--%s' sets '%s' again.\n",str,cfg->name);
|
||||
exit(53);
|
||||
}
|
||||
|
||||
|
|
|
|||
108
src/tuxpaint.c
108
src/tuxpaint.c
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - April 1, 2020
|
||||
June 14, 2002 - May 23, 2020
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -478,6 +478,7 @@ static void mtw(wchar_t * wtok, char *tok)
|
|||
#else
|
||||
|
||||
#include <librsvg/rsvg.h>
|
||||
/* #include <librsvg/rsvg-cairo.h> -- Deprecated */
|
||||
|
||||
#if !defined(RSVG_H) || !defined(RSVG_CAIRO_H)
|
||||
#error "---------------------------------------------------"
|
||||
|
|
@ -1572,7 +1573,7 @@ static SDL_Surface *render_text(TuxPaint_Font * restrict font, const char *restr
|
|||
|
||||
if (font == NULL)
|
||||
{
|
||||
printf("render_text() received a NULL font!\n");
|
||||
fprintf(stderr, "render_text() received a NULL font!\n");
|
||||
fflush(stdout);
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -2511,7 +2512,9 @@ static void mainloop(void)
|
|||
#ifndef NOSOUND
|
||||
if (use_sound)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("modstate at mainloop %d, mod %d\n", SDL_GetModState(), mod);
|
||||
#endif
|
||||
|
||||
mute = !mute;
|
||||
Mix_HaltChannel(-1);
|
||||
|
|
@ -8013,7 +8016,7 @@ int generate_fontconfig_cache_spinner(SDL_Surface * screen)
|
|||
(event.type == SDL_KEYDOWN
|
||||
&& (event.key.keysym.sym == SDLK_ESCAPE || event.key.keysym.sym == SDLK_AC_BACK)))
|
||||
{
|
||||
printf("Aborting!\n");
|
||||
fprintf(stderr, "Aborting!\n");
|
||||
fflush(stdout);
|
||||
return (1);
|
||||
}
|
||||
|
|
@ -8889,7 +8892,7 @@ static void draw_fonts(void)
|
|||
|
||||
if (tmp_surf_1 == NULL)
|
||||
{
|
||||
printf("render_text() returned NULL!\n");
|
||||
fprintf(stderr, "render_text() returned NULL!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -11686,8 +11689,9 @@ static void load_starter_id(char *saved_id, FILE * fil)
|
|||
tmp_ptr = fgets(template_id, sizeof(template_id), fi);
|
||||
template_id[strlen(template_id) - 1] = '\0';
|
||||
tmp = fscanf(fi, "%d", &template_personal);
|
||||
/* FIXME: Debug only? */
|
||||
#ifdef DEBUG
|
||||
printf("template = %s\n (Personal=%d)", template_id, template_personal);
|
||||
#endif
|
||||
}
|
||||
if (!feof(fi) && color_tag == 'M')
|
||||
{
|
||||
|
|
@ -13829,13 +13833,17 @@ static void do_png_embed_data(png_structp png_ptr)
|
|||
if (SDL_MUSTLOCK(img_starter_bkgd))
|
||||
SDL_UnlockSurface(img_starter_bkgd);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("%d \n", (int)compressedLen);
|
||||
#endif
|
||||
|
||||
compress(compressed_data, &compressedLen, sbk_pixs, img_starter_bkgd->h * img_starter_bkgd->w * 3);
|
||||
|
||||
set_chunk_data(&chunk_data, &chunk_data_len, img_starter_bkgd->w * img_starter_bkgd->h * 3, compressed_data,
|
||||
compressedLen);
|
||||
#ifdef DEBUG
|
||||
printf("%d \n", (int)compressedLen);
|
||||
#endif
|
||||
|
||||
|
||||
tuxpaint_chunks[2].data = (png_byte *) chunk_data;
|
||||
|
|
@ -14023,7 +14031,9 @@ static void do_png_embed_data(png_structp png_ptr)
|
|||
fprintf(lfi, "\n\n");
|
||||
}
|
||||
current_node = current_node->next_to_up_label_node;
|
||||
#ifdef DEBUG
|
||||
printf("cur %p, red %p\n", current_node, first_label_node_in_redo_stack);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef fmemopen_alternative
|
||||
|
|
@ -21885,7 +21895,9 @@ static void load_info_about_label_surface(FILE * lfi)
|
|||
new_node->save_y = tmp_pos;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Original label size %dx%d\n", new_node->save_width, new_node->save_height);
|
||||
#endif
|
||||
|
||||
tmp_fscanf_return = fscanf(lfi, "%d\n", &new_node->save_cur_font);
|
||||
new_node->save_cur_font = 0;
|
||||
|
|
@ -22344,7 +22356,7 @@ Bytef *get_chunk_data(FILE * fp, char *fname, png_structp png_ptr,
|
|||
if (f > 3)
|
||||
{
|
||||
comp_buff[i - count] = unknown.data[i];
|
||||
// printf("%d, %d, %d ",i-count, comp_buff[i - count], unknown.data[i]);
|
||||
// printf("%d, %d, %d ",i-count, comp_buff[i - count], unknown.data[i]);
|
||||
}
|
||||
|
||||
if (unknown.data[i] == '\n' && f < 4)
|
||||
|
|
@ -22390,13 +22402,13 @@ Bytef *get_chunk_data(FILE * fp, char *fname, png_structp png_ptr,
|
|||
|
||||
if (unc_err != Z_STREAM_END)
|
||||
{
|
||||
printf("\n error %d, unc %d, comp %d\n", unc_err, *unc_size, comp);
|
||||
fprintf(stderr, "\n error %d, unc %d, comp %d\n", unc_err, *unc_size, comp);
|
||||
fclose(fp);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
|
||||
free(comp_buff);
|
||||
free(unc_buff);
|
||||
|
||||
printf("Can't recover the embedded data in %s, error in uncompressing data from %s\n\n", fname, chunk_name);
|
||||
fprintf(stderr, "Can't recover the embedded data in %s, error in uncompressing data from %s\n\n", fname, chunk_name);
|
||||
draw_tux_text(TUX_OOPS, strerror(errno), 0);
|
||||
return (NULL);
|
||||
}
|
||||
|
|
@ -22430,8 +22442,10 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
png_uint_32 ww, hh;
|
||||
png_uint_32 i, j;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Loading embedded data...\n");
|
||||
printf("%s\n", fname);
|
||||
#endif
|
||||
|
||||
fp = fopen(fname, "rb");
|
||||
if (!fp)
|
||||
|
|
@ -22453,7 +22467,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("%s\n", fname);
|
||||
#endif
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
if (info_ptr == NULL)
|
||||
|
|
@ -22478,7 +22494,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
|
||||
num_unknowns = (int)png_get_unknown_chunks(png_ptr, info_ptr, &unknowns);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("num_unknowns %i\n", num_unknowns);
|
||||
#endif
|
||||
if (num_unknowns)
|
||||
{
|
||||
have_label_delta = have_label_data = have_background = have_foreground = FALSE;
|
||||
|
|
@ -22492,11 +22510,15 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
blured when scaled one) */
|
||||
for (u = 0; u < num_unknowns; u++)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("%s, %d\n", unknowns[u].name, (int)unknowns[u].size);
|
||||
#endif
|
||||
|
||||
if (chunk_is_valid("tpDT", unknowns[u]))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Valid tpDT\n");
|
||||
#endif
|
||||
fi = fmemopen(unknowns[u].data, unknowns[u].size, "r");
|
||||
if (fi == NULL)
|
||||
{
|
||||
|
|
@ -22557,7 +22579,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
{
|
||||
if (chunk_is_valid("tpLD", unknowns[u]))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Valid tpLD\n");
|
||||
#endif
|
||||
|
||||
unc_buff = get_chunk_data(fp, fname, png_ptr, info_ptr, "tpLD", unknowns[u], &unc_size);
|
||||
if (unc_buff == NULL)
|
||||
|
|
@ -22596,7 +22620,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
/* Label Data */
|
||||
if (!disable_label && chunk_is_valid("tpLL", unknowns[u]))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Valid tpLL\n");
|
||||
#endif
|
||||
|
||||
unc_buff = get_chunk_data(fp, fname, png_ptr, info_ptr, "tpLL", unknowns[u], &unc_size);
|
||||
if (unc_buff == NULL)
|
||||
|
|
@ -22609,7 +22635,7 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
fi = fmemopen(unc_buff, unc_size, "rb");
|
||||
if (fi == NULL)
|
||||
{
|
||||
printf("Can't recover the label data embedded in %s, error in create file stream\n\n",
|
||||
fprintf(stderr, "Can't recover the label data embedded in %s, error in create file stream\n\n",
|
||||
fname);
|
||||
fclose(fp);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
|
||||
|
|
@ -22625,7 +22651,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
|
||||
free(unc_buff);
|
||||
ldata = TRUE;
|
||||
#ifdef DEBUG
|
||||
printf("Out of label data\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22650,8 +22678,10 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
canvas->format->Rmask, canvas->format->Gmask, canvas->format->Gmask, 0);
|
||||
if (aux_surf == NULL)
|
||||
{
|
||||
printf("Can't recover the background data embedded in %s, error in create aux image\n\n",
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Can't recover the background data embedded in %s, error in create aux image\n\n",
|
||||
fname);
|
||||
#endif
|
||||
fclose(fp);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
|
||||
free(unc_buff);
|
||||
|
|
@ -22663,7 +22693,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
}
|
||||
SDL_LockSurface(aux_surf);
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Bkgd!!!\n");
|
||||
#endif
|
||||
for (j = 0; j < hh; j++)
|
||||
for (i = 0; i < ww; i++)
|
||||
putpixels[aux_surf->format->BytesPerPixel] (aux_surf, i, j,
|
||||
|
|
@ -22693,7 +22725,9 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
|
||||
if ((starter_modified || !img_starter) && chunk_is_valid("tpFG", unknowns[u]))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Frgd!!!\n");
|
||||
#endif
|
||||
|
||||
unc_buff = get_chunk_data(fp, fname, png_ptr, info_ptr, "tpFG", unknowns[u], &unc_size);
|
||||
if (unc_buff == NULL)
|
||||
|
|
@ -22705,7 +22739,7 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
|||
canvas->format->Gmask, canvas->format->Gmask, TPAINT_AMASK);
|
||||
if (aux_surf == NULL)
|
||||
{
|
||||
printf("Can't recover the foreground data embedded in %s, error in create aux image\n\n",
|
||||
fprintf(stderr, "Can't recover the foreground data embedded in %s, error in create aux image\n\n",
|
||||
fname);
|
||||
fclose(fp);
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
|
||||
|
|
@ -23227,7 +23261,7 @@ static void setup_config(char *argv[])
|
|||
{
|
||||
if (strtof(tmpcfg.joystick_dev, NULL) < 0 || strtof(tmpcfg.joystick_dev, NULL) > 100)
|
||||
{
|
||||
printf("Joystick dev (now %s) must be between 0 and 100.\n", tmpcfg.joystick_dev);
|
||||
fprintf(stderr, "Joystick dev (now %s) must be between 0 and 100.\n", tmpcfg.joystick_dev);
|
||||
exit(1);
|
||||
}
|
||||
joystick_dev = strtof(tmpcfg.joystick_dev, NULL);
|
||||
|
|
@ -23237,7 +23271,7 @@ static void setup_config(char *argv[])
|
|||
{
|
||||
if (strtof(tmpcfg.joystick_slowness, NULL) < 0 || strtof(tmpcfg.joystick_slowness, NULL) > 500)
|
||||
{
|
||||
printf("Joystick slowness (now %s) must be between 0 and 500.\n", tmpcfg.joystick_slowness);
|
||||
fprintf(stderr, "Joystick slowness (now %s) must be between 0 and 500.\n", tmpcfg.joystick_slowness);
|
||||
exit(1);
|
||||
}
|
||||
joystick_slowness = strtof(tmpcfg.joystick_slowness, NULL);
|
||||
|
|
@ -23247,7 +23281,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_lowthreshold, NULL) < 0 || strtof(tmpcfg.joystick_lowthreshold, NULL) > 32766)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick lower threshold (now %s) must be between 0 and 32766", tmpcfg.joystick_lowthreshold);
|
||||
fprintf(stderr, "Joystick lower threshold (now %s) must be between 0 and 32766", tmpcfg.joystick_lowthreshold);
|
||||
exit(1);
|
||||
}
|
||||
joystick_low_threshold = strtof(tmpcfg.joystick_lowthreshold, NULL);
|
||||
|
|
@ -23257,7 +23291,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_maxsteps, NULL) < 1 || strtof(tmpcfg.joystick_maxsteps, NULL) > 7)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick max steps (now %s) must be between 1 and 7", tmpcfg.joystick_maxsteps);
|
||||
fprintf(stderr, "Joystick max steps (now %s) must be between 1 and 7", tmpcfg.joystick_maxsteps);
|
||||
exit(1);
|
||||
}
|
||||
joystick_maxsteps = strtof(tmpcfg.joystick_maxsteps, NULL);
|
||||
|
|
@ -23266,7 +23300,7 @@ static void setup_config(char *argv[])
|
|||
{
|
||||
if (strtof(tmpcfg.joystick_hat_slowness, NULL) < 0 || strtof(tmpcfg.joystick_hat_slowness, NULL) > 500)
|
||||
{
|
||||
printf("Joystick hat slowness (now %s) must be between 0 and 500.\n", tmpcfg.joystick_hat_slowness);
|
||||
fprintf(stderr, "Joystick hat slowness (now %s) must be between 0 and 500.\n", tmpcfg.joystick_hat_slowness);
|
||||
exit(1);
|
||||
}
|
||||
joystick_hat_slowness = strtof(tmpcfg.joystick_hat_slowness, NULL);
|
||||
|
|
@ -23276,7 +23310,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_hat_timeout, NULL) < 0 || strtof(tmpcfg.joystick_hat_timeout, NULL) > 3000)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick hat timeout (now %s) must be between 0 and 3000", tmpcfg.joystick_hat_timeout);
|
||||
fprintf(stderr, "Joystick hat timeout (now %s) must be between 0 and 3000", tmpcfg.joystick_hat_timeout);
|
||||
exit(1);
|
||||
}
|
||||
joystick_hat_timeout = strtof(tmpcfg.joystick_hat_timeout, NULL);
|
||||
|
|
@ -23286,7 +23320,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_escape, NULL) < 0 || strtof(tmpcfg.joystick_button_escape, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button escape shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_escape);
|
||||
fprintf(stderr, "Joystick button escape shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_escape);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_escape = strtof(tmpcfg.joystick_button_escape, NULL);
|
||||
|
|
@ -23297,7 +23331,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectbrushtool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button brush tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button brush tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectbrushtool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23309,7 +23343,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectstamptool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button stamp tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button stamp tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectstamptool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23321,7 +23355,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectlinestool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button lines tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button lines tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectlinestool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23333,7 +23367,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectshapestool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button shapes tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button shapes tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectshapestool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23345,7 +23379,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selecttexttool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button text tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button text tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selecttexttool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23357,7 +23391,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectlabeltool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button label tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button label tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectlabeltool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23369,7 +23403,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selectmagictool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button magic tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button magic tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selectmagictool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23380,7 +23414,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_undo, NULL) < 0 || strtof(tmpcfg.joystick_button_undo, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button undo shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_undo);
|
||||
fprintf(stderr, "Joystick button undo shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_undo);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_undo = strtof(tmpcfg.joystick_button_undo, NULL);
|
||||
|
|
@ -23390,7 +23424,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_redo, NULL) < 0 || strtof(tmpcfg.joystick_button_redo, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button redo shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_redo);
|
||||
fprintf(stderr, "Joystick button redo shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_redo);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_redo = strtof(tmpcfg.joystick_button_redo, NULL);
|
||||
|
|
@ -23401,7 +23435,7 @@ static void setup_config(char *argv[])
|
|||
|| strtof(tmpcfg.joystick_button_selecterasertool, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button eraser tool shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button eraser tool shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_selecterasertool);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23412,7 +23446,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_new, NULL) < 0 || strtof(tmpcfg.joystick_button_new, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button new shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_new);
|
||||
fprintf(stderr, "Joystick button new shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_new);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_new = strtof(tmpcfg.joystick_button_new, NULL);
|
||||
|
|
@ -23422,7 +23456,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_open, NULL) < 0 || strtof(tmpcfg.joystick_button_open, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button open shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_open);
|
||||
fprintf(stderr, "Joystick button open shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_open);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_open = strtof(tmpcfg.joystick_button_open, NULL);
|
||||
|
|
@ -23432,7 +23466,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_save, NULL) < 0 || strtof(tmpcfg.joystick_button_save, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button save shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_save);
|
||||
fprintf(stderr, "Joystick button save shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_save);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_save = strtof(tmpcfg.joystick_button_save, NULL);
|
||||
|
|
@ -23442,7 +23476,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_pagesetup, NULL) < 0 || strtof(tmpcfg.joystick_button_pagesetup, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button page setup shortcurt (now %s) must be between 0 and 254",
|
||||
fprintf(stderr, "Joystick button page setup shortcurt (now %s) must be between 0 and 254",
|
||||
tmpcfg.joystick_button_pagesetup);
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -23453,7 +23487,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(tmpcfg.joystick_button_print, NULL) < 0 || strtof(tmpcfg.joystick_button_print, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick button print shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_print);
|
||||
fprintf(stderr, "Joystick button print shortcurt (now %s) must be between 0 and 254", tmpcfg.joystick_button_print);
|
||||
exit(1);
|
||||
}
|
||||
joystick_button_print = strtof(tmpcfg.joystick_button_print, NULL);
|
||||
|
|
@ -23468,7 +23502,7 @@ static void setup_config(char *argv[])
|
|||
if (strtof(token, NULL) < 0 || strtof(token, NULL) > 254)
|
||||
{
|
||||
/* FIXME: Find better exit code */
|
||||
printf("Joystick buttons must be between 0 and 254 (don't like %s)", tmpcfg.joystick_buttons_ignore);
|
||||
fprintf(stderr, "Joystick buttons must be between 0 and 254 (don't like %s)", tmpcfg.joystick_buttons_ignore);
|
||||
exit(1);
|
||||
}
|
||||
joystick_buttons_ignore[joystick_buttons_ignore_len++] = strtof(token, NULL);
|
||||
|
|
@ -23961,11 +23995,11 @@ static void setup(void)
|
|||
|
||||
if (joystick_dev == -1)
|
||||
{
|
||||
printf("%i joystick(s) were found:\n", SDL_NumJoysticks());
|
||||
fprintf(stderr, "%i joystick(s) were found:\n", SDL_NumJoysticks());
|
||||
|
||||
for (i = 0; i < SDL_NumJoysticks(); i++)
|
||||
{
|
||||
printf(" %d: %s\n", i, SDL_JoystickName(i));
|
||||
fprintf(stderr, " %d: %s\n", i, SDL_JoystickName(i));
|
||||
}
|
||||
|
||||
SDL_Quit();
|
||||
|
|
@ -25225,7 +25259,9 @@ static int trash(char *path)
|
|||
return (unlink(path));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("trash: basename=%s", basename(path)); /* EP */
|
||||
#endif
|
||||
strcpy(fname, basename(path));
|
||||
|
||||
if (!file_exists(path))
|
||||
|
|
|
|||
|
|
@ -2,17 +2,14 @@ Summary: A drawing program for young children
|
|||
Name: tuxpaint
|
||||
Version: 0.9.24
|
||||
Release: 1
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: Multimedia/Graphics
|
||||
URL: http://www.tuxpaint.org/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
Requires: SDL >= 1.2.4 SDL_image SDL_mixer SDL_ttf SDL_Pango
|
||||
Requires: libpng librsvg2 cairo libpaper fribidi
|
||||
Requires: SDL >= 1.2.4 SDL_image SDL_mixer SDL_ttf SDL_Pango libpaper fribidi xdg-utils
|
||||
BuildRequires: SDL-devel >= 1.2.4 SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL_Pango-devel
|
||||
BuildRequires: libpng-devel librsvg2-devel cairo-devel libpaper-devel fribidi-devel
|
||||
BuildRequires: libgsf-devel libxml2-devel gtk2-devel gperf gettext
|
||||
BuildRequires: librsvg2-devel libpaper-devel fribidi-devel gperf gettext ImageMagick xdg-utils
|
||||
|
||||
%description
|
||||
"Tux Paint" is a drawing program for young children.
|
||||
|
|
@ -30,8 +27,7 @@ Summary: development files for tuxpaint plugins.
|
|||
Group: Development/Libraries
|
||||
Requires: tuxpaint = %{version}
|
||||
Requires: SDL-devel >= 1.2.4 SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL_Pango-devel
|
||||
Requires: libpng-devel librsvg2-devel cairo-devel libpaper-devel fribidi-devel
|
||||
Requires: libgsf-devel libxml2-devel gtk2-devel gperf gettext
|
||||
Requires: librsvg2-devel libpaper-devel fribidi-devel gperf
|
||||
|
||||
%description devel
|
||||
development files for tuxpaint plugins.
|
||||
|
|
@ -40,55 +36,78 @@ development files for tuxpaint plugins.
|
|||
%setup -q
|
||||
|
||||
%build
|
||||
make PREFIX=%{_prefix}
|
||||
make PREFIX=%{_prefix} DOC_PREFIX=%{_docdir}/tuxpaint/en
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}
|
||||
make ARCH_INSTALL="" PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT \
|
||||
DOC_PREFIX=$RPM_BUILD_ROOT%{_docdir}/tuxpaint \
|
||||
DEVDOC_PREFIX=$RPM_BUILD_ROOT%{_docdir}/tuxpaint/devel \
|
||||
install
|
||||
|
||||
make PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT install
|
||||
export XDG_DATA_DIRS=$RPM_BUILD_ROOT%{_datadir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/{icons/hicolor,applications,desktop-directories}
|
||||
|
||||
find $RPM_BUILD_ROOT -name tuxpaint.desktop | sort | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@g" > filelist.icons
|
||||
find $RPM_BUILD_ROOT -name tuxpaint.png | sort | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@g" >> filelist.icons
|
||||
find $RPM_BUILD_ROOT -name tuxpaint.svg | sort | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@g" >> filelist.icons
|
||||
find $RPM_BUILD_ROOT -name tuxpaint.xpm | sort | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@g" >> filelist.icons
|
||||
xdg-icon-resource install --mode system --noupdate --size 192 data/images/icon192x192.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 128 data/images/icon128x128.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 96 data/images/icon96x96.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 64 data/images/icon64x64.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 48 data/images/icon48x48.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 32 data/images/icon32x32.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 22 data/images/icon22x22.png tux4kids-tuxpaint
|
||||
xdg-icon-resource install --mode system --noupdate --size 16 data/images/icon16x16.png tux4kids-tuxpaint
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT/usr/share/doc/tuxpaint*
|
||||
cp src/tuxpaint.desktop ./tux4kids-tuxpaint.desktop
|
||||
xdg-desktop-menu install --mode system --noupdate tux4kids-tuxpaint.desktop
|
||||
rm ./tux4kids-tuxpaint.desktop
|
||||
|
||||
%post
|
||||
update-desktop-database
|
||||
|
||||
%postun
|
||||
update-desktop-database
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f filelist.icons
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/tuxpaint/tuxpaint.conf
|
||||
%doc docs/*
|
||||
%{_datadir}/tuxpaint/*
|
||||
%{_sysconfdir}/bash_completion.d/tuxpaint-completion.bash
|
||||
|
||||
%defattr(0755, root, root)
|
||||
%files
|
||||
%defattr(755,root,root,755)
|
||||
%{_bindir}/tuxpaint
|
||||
%{_bindir}/tuxpaint-import
|
||||
%{_prefix}/lib/tuxpaint/*
|
||||
|
||||
%{_prefix}/lib/tuxpaint/plugins/*.so
|
||||
|
||||
%defattr(0644, root, root)
|
||||
%defattr(644,root,root,755)
|
||||
%config(noreplace) %{_sysconfdir}/tuxpaint/tuxpaint.conf
|
||||
%{_sysconfdir}/bash_completion.d/tuxpaint-completion.bash
|
||||
%{_docdir}/tuxpaint/*
|
||||
%{_datadir}/tuxpaint/*
|
||||
%{_datadir}/pixmaps/tuxpaint.*
|
||||
%{_datadir}/applications/tux4kids-tuxpaint.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/tux4kids-tuxpaint.png
|
||||
%{_datadir}/locale/*/LC_MESSAGES/tuxpaint.mo
|
||||
%{_datadir}/man/man1/*
|
||||
%{_datadir}/man/*/man1/tuxpaint.1.*
|
||||
%{_mandir}/man1/tuxpaint*.*
|
||||
%{_mandir}/*/man1/tuxpaint*.*
|
||||
%exclude %{_docdir}/tuxpaint/devel
|
||||
%exclude %{_docdir}/tuxpaint/Makefile
|
||||
|
||||
%files devel
|
||||
%doc magic/docs/*
|
||||
%{_prefix}/include/tuxpaint/tp_magic_api.h
|
||||
%{_prefix}/bin/tp-magic-config
|
||||
%attr(755,root,root) %{_bindir}/tp-magic-config
|
||||
%defattr(644,root,root,755)
|
||||
%{_includedir}/tuxpaint/tp_magic_api.h
|
||||
%{_docdir}/tuxpaint/devel/*
|
||||
%{_docdir}/tuxpaint/Makefile
|
||||
%{_mandir}/man1/tp-magic-config.*
|
||||
|
||||
%changelog
|
||||
* Fri May 1 2020 <shin1@wmail.plala.or.jp> -
|
||||
- Enabled using xdg-utils for installing icons.
|
||||
- Wrong date in %changelog
|
||||
- Re-organized %files section
|
||||
- Correct path for 'tp-magic-config --plugindocprefix'
|
||||
|
||||
* Sat Mar 14 2020 <shin1@wmail.plala.or.jp> -
|
||||
- Disable target "install-xdg". Add ImageMagick for BuildReq.
|
||||
|
||||
* Thu Sep 26 2019 <nbs@sonic.net> -
|
||||
- Set version number 0.9.24
|
||||
|
||||
|
|
@ -125,7 +144,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
- Included magic tools
|
||||
- Separated devel package
|
||||
|
||||
* Sat Jun 01 2007 <shin1@wmail.plala.or.jp> -
|
||||
* Fri Jun 01 2007 <shin1@wmail.plala.or.jp> -
|
||||
- Requires librsvg2 and libpaper
|
||||
|
||||
* Fri Sep 08 2006 <shin1@wmail.plala.or.jp> -
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ IDI_ICON1 ICON DISCARDABLE "data/images/icon-win32.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,9,23,0
|
||||
PRODUCTVERSION 0,9,23,0
|
||||
FILEVERSION 0,9,24,0
|
||||
PRODUCTVERSION 0,9,24,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x21L
|
||||
|
|
@ -45,15 +45,15 @@ BEGIN
|
|||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "New Breed Software\0"
|
||||
VALUE "FileDescription", "Tux Paint - Interactive Paint Program.\0"
|
||||
VALUE "FileVersion", "0.9.23\0"
|
||||
VALUE "FileVersion", "0.9.24\0"
|
||||
VALUE "InternalName", "Tux Paint\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2008 by Bill Kendrick\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2008-2020 by Bill Kendrick, et al\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "TuxPaint.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "Tux Paint\0"
|
||||
VALUE "ProductVersion", "0.9.23\0"
|
||||
VALUE "SpecialBuild", "win32 build by John Popplewell\0"
|
||||
VALUE "ProductVersion", "0.9.24\0"
|
||||
VALUE "SpecialBuild", "win32 build by TOYAMA Shin-ichi\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue