From b35db697f7bcb94fe17d1150c4744b894e8e04d6 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Nov 2012 16:34:38 -0500 Subject: [PATCH 1/3] fix PNG support --- xloadimage-4.1-png-1.5.patch | 39 ++ xloadimage-4.1-png-pkg-config.patch | 722 ++++++++++++++-------------- xloadimage.spec | 11 +- 3 files changed, 408 insertions(+), 364 deletions(-) create mode 100644 xloadimage-4.1-png-1.5.patch diff --git a/xloadimage-4.1-png-1.5.patch b/xloadimage-4.1-png-1.5.patch new file mode 100644 index 0000000..f02c459 --- /dev/null +++ b/xloadimage-4.1-png-1.5.patch @@ -0,0 +1,39 @@ +diff -up xloadimage.4.1/png.c.png15 xloadimage.4.1/png.c +--- xloadimage.4.1/png.c.png15 2012-11-27 16:24:36.512125771 -0500 ++++ xloadimage.4.1/png.c 2012-11-27 16:28:15.216129052 -0500 +@@ -75,7 +75,7 @@ static void output_error(png_structp png + { + debug(" #error "); + output_warn( png_ptr, str); +- longjmp(png_ptr->jmpbuf, 1); /* return control to outer routine */ ++ longjmp(png_jmpbuf(png_ptr), 1); /* return control to outer routine */ + } + + +@@ -164,7 +164,7 @@ static int pngHeader(png_structpp png_pp + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; + } +- if (setjmp((*png_pp)->jmpbuf)) { ++ if (setjmp(png_jmpbuf(*png_pp))) { + /* On error */ + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; +@@ -220,7 +220,7 @@ int pngIdent(char *fullname, char *name) + zclose(zinput_file); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* On error */ + freeImage(image); + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +@@ -308,7 +308,7 @@ Image *pngLoad(char *fullname, char *nam + case PNG_COLOR_TYPE_GRAY_ALPHA: + case PNG_COLOR_TYPE_GRAY: + if (bit_depth < 8) +- png_set_gray_1_2_4_to_8(png_ptr); /* 1 pixlel 1 byte */ ++ png_set_expand_gray_1_2_4_to_8(png_ptr); /* 1 pixlel 1 byte */ + image = newRGBImage(width, height, 8); + image->rgb.used = 256; + for (i = 0; i < 256; i++) { diff --git a/xloadimage-4.1-png-pkg-config.patch b/xloadimage-4.1-png-pkg-config.patch index 5315ce9..65b3b11 100644 --- a/xloadimage-4.1-png-pkg-config.patch +++ b/xloadimage-4.1-png-pkg-config.patch @@ -1,30 +1,31 @@ diff -up xloadimage.4.1/configure.in.png-pkg-config xloadimage.4.1/configure.in ---- xloadimage.4.1/configure.in.png-pkg-config 2011-12-08 14:16:59.479149052 -0500 -+++ xloadimage.4.1/configure.in 2011-12-08 14:16:59.674147298 -0500 -@@ -16,7 +16,7 @@ AC_CHECK_LIB(m, main) +--- xloadimage.4.1/configure.in.png-pkg-config 2012-11-27 14:57:17.378047157 -0500 ++++ xloadimage.4.1/configure.in 2012-11-27 16:22:15.330123652 -0500 +@@ -16,7 +16,10 @@ AC_CHECK_LIB(m, main) dnl Replace `main' with a function in -lz: AC_CHECK_LIB(z, main) dnl Replace `main' with a function in -lpng: -AC_CHECK_LIB(png, main) -+PKG_CHECK_MODULES(PNG, libpng) ++PKG_CHECK_MODULES(PNG, libpng, HAVE_LIBPNG="yes", HAVE_LIBPNG="no") ++if test "x$HAVE_LIBPNG" = xyes ; then ++ AC_DEFINE([HAVE_LIBPNG], [], [Define if we have libpng.]) ++fi dnl Replace `main' with a function in -ljpeg: AC_CHECK_LIB(jpeg, main) dnl Replace `main' with a function in -ltiff: diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ---- xloadimage.4.1/configure.png-pkg-config 2011-12-08 14:16:59.478149061 -0500 -+++ xloadimage.4.1/configure 2011-12-08 14:16:59.680147244 -0500 -@@ -1,28 +1,696 @@ +--- xloadimage.4.1/configure.png-pkg-config 2012-11-27 14:57:17.378047157 -0500 ++++ xloadimage.4.1/configure 2012-11-27 16:22:24.239123786 -0500 +@@ -1,28 +1,716 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -+# Generated by GNU Autoconf 2.68. ++# Generated by GNU Autoconf 2.69. +# +# -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -+# Foundation, Inc. ++# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# # # This configure script is free software; the Free Software Foundation @@ -153,6 +154,31 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + ++# Use a proper internal environment variable to ensure we don't fall ++ # into an infinite loop, continuously re-executing ourselves. ++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then ++ _as_can_reexec=no; export _as_can_reexec; ++ # We cannot yet assume a decent shell, so we have to provide a ++# neutralization value for shells without unset; and this also ++# works around shells that cannot unset nonexistent variables. ++# Preserve -v and -x to the replacement shell. ++BASH_ENV=/dev/null ++ENV=/dev/null ++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++esac ++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++# Admittedly, this is quite paranoid, since all the known shells bail ++# out after a failed `exec'. ++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++as_fn_exit 255 ++ fi ++ # We don't want this to propagate to other subprocesses. ++ { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh @@ -186,7 +212,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + exitcode=1; echo positional parameters were not saved. +fi -+test x\$exitcode = x0 || exit 1" ++test x\$exitcode = x0 || exit 1 ++test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -231,21 +258,25 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + + + if test "x$CONFIG_SHELL" != x; then : -+ # We cannot yet assume a decent shell, so we have to provide a -+ # neutralization value for shells without unset; and this also -+ # works around shells that cannot unset nonexistent variables. -+ # Preserve -v and -x to the replacement shell. -+ BASH_ENV=/dev/null -+ ENV=/dev/null -+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+ export CONFIG_SHELL -+ case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+ esac -+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} ++ export CONFIG_SHELL ++ # We cannot yet assume a decent shell, so we have to provide a ++# neutralization value for shells without unset; and this also ++# works around shells that cannot unset nonexistent variables. ++# Preserve -v and -x to the replacement shell. ++BASH_ENV=/dev/null ++ENV=/dev/null ++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++esac ++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++# Admittedly, this is quite paranoid, since all the known shells bail ++# out after a failed `exec'. ++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++exit 255 +fi + + if test x$as_have_required = xno; then : @@ -344,11 +375,19 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -+ -# Defaults: -ac_help= ++ +} # as_fn_mkdir_p ++ ++# as_fn_executable_p FILE ++# ----------------------- ++# Test if FILE is an executable regular file. ++as_fn_executable_p () ++{ ++ test -f "$1" && test -x "$1" ++} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take @@ -470,6 +509,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + ++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have ++ # already done that, so ensure we don't try to do so again and fall ++ # in an infinite loop. This has already happened in practice. ++ _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). @@ -504,16 +547,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. ++ # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + fi +else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null @@ -525,28 +568,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_mkdir_p=false +fi + -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L -+ else -+ as_ls_L_option= -+ fi -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in #( -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' -+fi -+as_executable_p=$as_test_x ++as_test_x='test -x' ++as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -722,7 +745,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure no_recursion= prefix=NONE program_prefix=NONE -@@ -31,94 +699,132 @@ program_transform_name=s,x,x, +@@ -31,94 +719,132 @@ program_transform_name=s,x,x, silent= site= srcdir= @@ -817,11 +840,11 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; - -- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ + --config-cache | -C) + cache_file=config.cache ;; -+ + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ @@ -896,7 +919,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -@@ -127,116 +833,77 @@ do +@@ -127,116 +853,77 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) @@ -1042,7 +1065,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -@@ -250,26 +917,26 @@ EOF +@@ -250,26 +937,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) @@ -1073,7 +1096,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ -@@ -286,7 +953,17 @@ EOF +@@ -286,7 +973,17 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) @@ -1092,7 +1115,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) -@@ -296,7 +973,7 @@ EOF +@@ -296,7 +993,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) @@ -1101,7 +1124,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ -@@ -307,58 +984,67 @@ EOF +@@ -307,58 +1004,67 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) @@ -1193,7 +1216,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure --x) # Obsolete; use --with-x. -@@ -369,370 +1055,1724 @@ EOF +@@ -369,370 +1075,1722 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) @@ -1299,12 +1322,12 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; -+ esac + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac ++ esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done @@ -1328,8 +1351,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi @@ -1598,9 +1619,9 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +if $ac_init_version; then + cat <<\_ACEOF +configure -+generated by GNU Autoconf 2.68 ++generated by GNU Autoconf 2.69 + -+Copyright (C) 2010 Free Software Foundation, Inc. ++Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF @@ -1631,7 +1652,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err - fi ++ fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || @@ -1668,7 +1689,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err -+ fi + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || @@ -1713,7 +1734,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext ++ test -x conftest$ac_exeext + }; then : + ac_retval=0 +else @@ -1963,7 +1984,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was -+generated by GNU Autoconf 2.68. Invocation command line was ++generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + @@ -2376,7 +2397,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2456,7 +2477,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2524,25 +2545,27 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - ac_cv_prog_CC="cl" - break - fi +- done +- IFS="$ac_save_ifs" +-fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done - done -- IFS="$ac_save_ifs" ++ done +IFS=$as_save_IFS + fi - fi -CC="$ac_cv_prog_CC" ++fi +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 @@ -2578,7 +2601,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue @@ -2659,7 +2682,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2720,7 +2743,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2998,7 +3021,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -+ + +-echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 @@ -3040,8 +3064,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile @@ -3176,7 +3199,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" -@@ -746,99 +2786,250 @@ else +@@ -746,99 +2804,249 @@ else CFLAGS= fi fi @@ -3191,8 +3214,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +/* end confdefs.h. */ +#include +#include -+#include -+#include ++struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3416,8 +3438,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP - fi -- CPP="$ac_cv_prog_CPP" ++fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false @@ -3459,7 +3480,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # Passes both tests. +ac_preproc_ok=: +break -+fi + fi +- CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.i conftest.$ac_ext + +done @@ -3503,7 +3525,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. -@@ -846,227 +3037,189 @@ if test "x$with_x" = xno; then +@@ -846,227 +3054,189 @@ if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else @@ -3865,7 +3887,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else -@@ -1079,61 +3232,54 @@ else +@@ -1079,61 +3249,54 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . @@ -3973,7 +3995,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi # Check for system-dependent libraries X programs must link with. -@@ -1143,565 +3289,591 @@ rm -f conftest* +@@ -1143,565 +3306,591 @@ rm -f conftest* if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else @@ -4192,7 +4214,12 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -#else -gethostbyname(); -#endif -- ++ # on Irix 5.2, according to T.E. Dickey. ++ # The functions gethostbyname, getservbyname, and inet_addr are ++ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ++ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" ++if test "x$ac_cv_func_gethostbyname" = xyes; then : + -; return 0; } -EOF -if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -4206,12 +4233,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -+ # on Irix 5.2, according to T.E. Dickey. -+ # The functions gethostbyname, getservbyname, and inet_addr are -+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. -+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -+if test "x$ac_cv_func_gethostbyname" = xyes; then : - +- -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4360,7 +4382,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); -- ++ # on later versions), says Simon Leinen: it contains gethostby* ++ # variants that don't use the name server (or something). -lsocket ++ # must be given before -lnsl if both are needed. We assume that ++ # if connect needs -lnsl, so does gethostbyname. ++ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" ++if test "x$ac_cv_func_connect" = xyes; then : + -int main() { - -/* The GNU C library defines this for functions which it implements @@ -4385,13 +4413,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -+ # on later versions), says Simon Leinen: it contains gethostby* -+ # variants that don't use the name server (or something). -lsocket -+ # must be given before -lnsl if both are needed. We assume that -+ # if connect needs -lnsl, so does gethostbyname. -+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -+if test "x$ac_cv_func_connect" = xyes; then : - +- -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4492,10 +4514,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); -+ # Guillermo Gomez says -lposix is necessary on A/UX. -+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -+if test "x$ac_cv_func_remove" = xyes; then : - +- -int main() { - -/* The GNU C library defines this for functions which it implements @@ -4520,14 +4539,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++ # Guillermo Gomez says -lposix is necessary on A/UX. ++ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" ++if test "x$ac_cv_func_remove" = xyes; then : + -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 --fi -+fi + fi if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 @@ -4624,9 +4645,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -char shmat(); - -int main() { -+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -+if test "x$ac_cv_func_shmat" = xyes; then : - +- -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ @@ -4649,7 +4668,9 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" ++if test "x$ac_cv_func_shmat" = xyes; then : + -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4825,7 +4846,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 -+else + else +- echo "$ac_t""no" 1>&6 + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST @@ -4837,7 +4859,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++ as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in @@ -4874,8 +4896,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi - else -- echo "$ac_t""no" 1>&6 ++else + ac_cv_path_GREP=$GREP +fi + @@ -4883,9 +4904,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - -- LDFLAGS="$ac_save_LDFLAGS" - ++ ++ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : @@ -4905,7 +4925,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++ as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in @@ -4933,7 +4953,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -+ + +- LDFLAGS="$ac_save_LDFLAGS" + $ac_path_EGREP_found && break 3 + done + done @@ -4945,18 +4966,18 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + ac_cv_path_EGREP=$EGREP +fi -+ + + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" ++ -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1667: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -+ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : @@ -5019,7 +5040,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ac_cv_header_stdc=no fi rm -f conftest* -@@ -1710,16 +3882,15 @@ fi +@@ -1710,16 +3899,15 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. @@ -5042,7 +5063,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ac_cv_header_stdc=no fi rm -f conftest* -@@ -1728,749 +3899,1783 @@ fi +@@ -1728,749 +3916,1757 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. @@ -5288,9 +5309,20 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +-fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ + +-fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ +- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +- cat >> confdefs.h <>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF -+ -+ LIBS="-lz $LIBS" -+ + + LIBS="-lz $LIBS" + +-else +- echo "$ac_t""no" 1>&6 fi + +-echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 +-echo "configure:1898: checking for main in -lpng" >&5 +-ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` +-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 +-else +- ac_save_LIBS="$LIBS" +-LIBS="-lpng $LIBS" +-cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" +-fi -rm -f conftest* -LIBS="$ac_save_LIBS" @@ -5348,7 +5408,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -5370,13 +5430,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ +- ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + break 2 @@ -5421,30 +5481,11 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +$as_echo "no" >&6; } fi --echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 --echo "configure:1898: checking for main in -lpng" >&5 --ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6 +-echo "configure:1941: checking for main in -ljpeg" >&5 +-ac_lib_var=`echo jpeg'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 --else -- ac_save_LIBS="$LIBS" --LIBS="-lpng $LIBS" --cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else @@ -5456,86 +5497,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -- cat >> confdefs.h <&5 -+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } -+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ PKG_CONFIG="" -+ fi -+fi - -- LIBS="-lpng $LIBS" -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 -+$as_echo_n "checking for PNG... " >&6; } - -+if test -n "$PNG_CFLAGS"; then -+ pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$PNG_LIBS"; then -+ pkg_cv_PNG_LIBS="$PNG_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null` - else -- echo "$ac_t""no" 1>&6 -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried - fi - --echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6 --echo "configure:1941: checking for main in -ljpeg" >&5 --ac_lib_var=`echo jpeg'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes else - ac_save_LIBS="$LIBS" -LIBS="-ljpeg $LIBS" @@ -5555,50 +5516,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -+ _pkg_short_errors_supported=no ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -+ if test $_pkg_short_errors_supported = yes; then -+ PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1` -+ else -+ PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$PNG_PKG_ERRORS" >&5 -+ -+ as_fn_error $? "Package requirements (libpng) were not met: -+ -+$PNG_PKG_ERRORS -+ -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. -+ -+Alternatively, you may set the environment variables PNG_CFLAGS -+and PNG_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details." "$LINENO" 5 -+ -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. -+ -+Alternatively, you may set the environment variables PNG_CFLAGS -+and PNG_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details. -+ -+To get pkg-config, see . -+See \`config.log' for more details" "$LINENO" 5; } -+ -+else -+ PNG_CFLAGS=$pkg_cv_PNG_CFLAGS -+ PNG_LIBS=$pkg_cv_PNG_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then @@ -5608,6 +5529,95 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat >> confdefs.h <&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ PKG_CONFIG="" ++ fi ++fi ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 ++$as_echo_n "checking for PNG... " >&6; } ++ ++if test -n "$PNG_CFLAGS"; then ++ pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$PNG_LIBS"; then ++ pkg_cv_PNG_LIBS="$PNG_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng" 2>&1` ++ else ++ PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$PNG_PKG_ERRORS" >&5 ++ ++ HAVE_LIBPNG="no" ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ HAVE_LIBPNG="no" ++else ++ PNG_CFLAGS=$pkg_cv_PNG_CFLAGS ++ PNG_LIBS=$pkg_cv_PNG_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ HAVE_LIBPNG="yes" ++fi ++if test "x$HAVE_LIBPNG" = xyes ; then ++ ++$as_echo "#define HAVE_LIBPNG /**/" >>confdefs.h ++ ++fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 +$as_echo_n "checking for main in -ljpeg... " >&6; } +if ${ac_cv_lib_jpeg_main+:} false; then : @@ -5787,8 +5797,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure #define RETSIGTYPE $ac_cv_type_signal -EOF - -+_ACEOF - +- -for ac_func in mkdir select -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 @@ -5806,14 +5815,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - +- -int main() { -+for ac_func in select -+do : -+ ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" -+if test "x$ac_cv_func_select" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELECT 1 +_ACEOF -/* The GNU C library defines this for functions which it implements @@ -5824,7 +5827,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -#else -$ac_func(); -#endif -- + -; return 0; } -EOF -if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -5838,7 +5841,14 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++for ac_func in select ++do : ++ ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" ++if test "x$ac_cv_func_select" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELECT 1 ++_ACEOF + -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -6130,8 +6140,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH - do -- case "\$ac_option" in ++do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break @@ -6322,16 +6331,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. ++ # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + fi +else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null @@ -6391,28 +6400,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_mkdir_p=false +fi + -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L -+ else -+ as_ls_L_option= -+ fi -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in #( -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' -+fi -+as_executable_p=$as_test_x ++ ++# as_fn_executable_p FILE ++# ----------------------- ++# Test if FILE is an executable regular file. ++as_fn_executable_p () ++{ ++ test -f "$1" && test -x "$1" ++} # as_fn_executable_p ++as_test_x='test -x' ++as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6434,7 +6431,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# values after options handling. +ac_log=" +This file was extended by $as_me, which was -+generated by GNU Autoconf 2.68. Invocation command line was ++generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS @@ -6496,10 +6493,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status -+configured by $0, generated by GNU Autoconf 2.68, ++configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + -+Copyright (C) 2010 Free Software Foundation, Inc. ++Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + @@ -6512,7 +6509,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 -+do + do +- case "\$ac_option" in + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` @@ -6652,7 +6650,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then -+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' @@ -7050,13 +7048,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; -+ esac + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac ++ esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag @@ -7064,7 +7062,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + shift + ac_file=$1 + shift - ++ + case $ac_mode in + :L) ac_source=$1;; + :[FH]) @@ -7087,23 +7085,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_fn_append ac_file_inputs " '$ac_f'" + done -- echo creating "$ac_file" -- rm -f "$ac_file" -- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." -- case "$ac_file" in -- *Makefile*) ac_comsub="1i\\ --# $configure_input" ;; -- *) ac_comsub= ;; -- esac -- -- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` -- sed -e "$ac_comsub --s%@configure_input@%$configure_input%g --s%@srcdir@%$srcdir%g --s%@top_srcdir@%$top_srcdir%g --" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file --fi; done --rm -f conftest.s* + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ @@ -7123,6 +7104,30 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + *) ac_sed_conf_input=$configure_input;; + esac +- echo creating "$ac_file" +- rm -f "$ac_file" +- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." +- case "$ac_file" in +- *Makefile*) ac_comsub="1i\\ +-# $configure_input" ;; +- *) ac_comsub= ;; +- esac +- +- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +- sed -e "$ac_comsub +-s%@configure_input@%$configure_input%g +-s%@srcdir@%$srcdir%g +-s%@top_srcdir@%$top_srcdir%g +-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +-fi; done +-rm -f conftest.s* ++ case $ac_tag in ++ *:-:* | *:-) cat >"$ac_tmp/stdin" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; ++ esac ++ ;; ++ esac + -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# @@ -7224,13 +7229,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" -+ case $ac_tag in -+ *:-:* | *:-) cat >"$ac_tmp/stdin" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; -+ esac -+ ;; -+ esac -+ + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ @@ -7397,9 +7395,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi -fi; done + ;; ++ -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF @@ -7409,10 +7411,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -+ esac -+ -+done # for ac_tag -+ + +as_fn_exit 0 +_ACEOF @@ -7448,8 +7446,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +fi diff -up xloadimage.4.1/Makefile.in.png-pkg-config xloadimage.4.1/Makefile.in ---- xloadimage.4.1/Makefile.in.png-pkg-config 2011-12-08 14:17:59.610607618 -0500 -+++ xloadimage.4.1/Makefile.in 2011-12-08 14:18:16.618454487 -0500 +--- xloadimage.4.1/Makefile.in.png-pkg-config 2012-11-27 14:57:17.419047158 -0500 ++++ xloadimage.4.1/Makefile.in 2012-11-27 14:57:17.480047158 -0500 @@ -4,10 +4,10 @@ CC = @CC@ diff --git a/xloadimage.spec b/xloadimage.spec index 3b63296..93c6c29 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 11%{?dist} +Release: 12%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -30,6 +30,7 @@ Patch19: xloadimage-4.1-ignore-dummy-copyright-variables.patch Patch20: xloadimage-4.1-bracketfix.patch Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch +Patch23: xloadimage-4.1-png-1.5.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html BuildRequires: libX11-devel, libtiff-devel >= 4.0, libpng-devel, libjpeg-devel BuildRequires: libICE-devel @@ -71,7 +72,10 @@ dithered automatically). %patch19 -p1 %patch20 -p1 %patch21 -p1 -b .png-pkg-config +%if 0%{?fedora} >= 18 %patch22 -p1 -b .tiff4 +%endif +%patch23 -p1 -b .png15 chmod +x configure %build @@ -110,11 +114,14 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Tue Nov 27 2012 Tom Callaway - 4.1-12 +- fix png 1.5 support + * Sun Jul 22 2012 Fedora Release Engineering - 4.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon May 7 2012 Tom Callaway - 4.1-10 -- build against libtiff 4 +- build against libtiff 4 (on Fedora 18+) * Sat Jan 14 2012 Fedora Release Engineering - 4.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From c9b29c84cfacdb98eec8d9e8e832801bc5183ec6 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Nov 2012 17:04:30 -0500 Subject: [PATCH 2/3] fix libtiff BR to be conditional --- xloadimage.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 93c6c29..4a3f60c 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -32,7 +32,12 @@ Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch Patch23: xloadimage-4.1-png-1.5.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html -BuildRequires: libX11-devel, libtiff-devel >= 4.0, libpng-devel, libjpeg-devel +%if 0%{?fedora} >= 18 +BuildRequires: libtiff-devel >= 4.0 +%else +BuildRequires: libtiff-devel +%endif +BuildRequires: libX11-devel, libpng-devel, libjpeg-devel BuildRequires: libICE-devel %description From acd820d20eeda9b590c6ee94978e67634fc2f878 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Jan 2013 13:32:44 -0500 Subject: [PATCH 3/3] fix memory leak, enable support for sub-second delay --- xloadimage-4.1-fix-mem-leak.patch | 12 +++++++ xloadimage-4.1-sub-second-delay.patch | 51 +++++++++++++++++++++++++++ xloadimage.spec | 12 ++++++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 xloadimage-4.1-fix-mem-leak.patch create mode 100644 xloadimage-4.1-sub-second-delay.patch diff --git a/xloadimage-4.1-fix-mem-leak.patch b/xloadimage-4.1-fix-mem-leak.patch new file mode 100644 index 0000000..63a2c53 --- /dev/null +++ b/xloadimage-4.1-fix-mem-leak.patch @@ -0,0 +1,12 @@ +diff -up xloadimage.4.1/new.c.fix-mem-leak xloadimage.4.1/new.c +--- xloadimage.4.1/new.c.fix-mem-leak 2013-01-02 13:21:24.082069878 -0500 ++++ xloadimage.4.1/new.c 2013-01-02 13:22:04.427104519 -0500 +@@ -181,7 +181,7 @@ Image *newTrueImage(width, height) + image->depth= 24; + image->pixlen= 3; + image->data= (unsigned char *)lmalloc(ovmul(ovmul(width, height), 3)); +- image->data= (unsigned char *)lmalloc(width * height * 3); ++ /* image->data= (unsigned char *)lmalloc(width * height * 3); */ + return(image); + } + diff --git a/xloadimage-4.1-sub-second-delay.patch b/xloadimage-4.1-sub-second-delay.patch new file mode 100644 index 0000000..50a88b5 --- /dev/null +++ b/xloadimage-4.1-sub-second-delay.patch @@ -0,0 +1,51 @@ +diff -up xloadimage.4.1/options.c.sub-second-delay xloadimage.4.1/options.c +--- xloadimage.4.1/options.c.sub-second-delay 2013-01-02 13:23:23.726173587 -0500 ++++ xloadimage.4.1/options.c 2013-01-02 13:23:37.706185351 -0500 +@@ -720,7 +720,7 @@ void processOptions(argc, argv, rglobal, + + continue; + #else /* !NO_DELAY */ +- newopt->info.delay= getInteger(DELAY, argv[a]); ++ newopt->info.delay= getFloat(DELAY, argv[a]); + break; + #endif /* !NO_DELAY */ + +diff -up xloadimage.4.1/options.h.sub-second-delay xloadimage.4.1/options.h +--- xloadimage.4.1/options.h.sub-second-delay 2013-01-02 13:25:44.297294626 -0500 ++++ xloadimage.4.1/options.h 2013-01-02 13:26:25.338329430 -0500 +@@ -49,7 +49,7 @@ typedef struct option { + unsigned int x, y, w, h; /* area of image to be used */ + } clip; + unsigned int colors; /* max # of colors to use for this image */ +- unsigned int delay; /* # of seconds delay before auto pic advance */ ++ double delay; /* # of seconds delay before auto pic advance */ + char *display; /* display name */ + struct { + char *type; /* image type */ +diff -up xloadimage.4.1/window.c.sub-second-delay xloadimage.4.1/window.c +--- xloadimage.4.1/window.c.sub-second-delay 2013-01-02 13:24:13.903216792 -0500 ++++ xloadimage.4.1/window.c 2013-01-02 13:25:35.928287337 -0500 +@@ -583,9 +583,9 @@ char imageInWindow(disp, scrn, image, gl + install= (getOption(global_options, INSTALL) != NULL); + private_cmap= (getOption(global_options, PRIVATE) != NULL); + if ((opt= getOption(image_options, DELAY))) +- delay= opt->info.delay; ++ delay= opt->info.delay*1000000; + else if ((opt= getOption(global_options, DELAY))) +- delay= opt->info.delay; ++ delay= opt->info.delay*1000000; + else + delay= 0; + if ((opt= getOption(image_options, VISUAL))) +@@ -872,7 +872,10 @@ char imageInWindow(disp, scrn, image, gl + #ifdef ENABLE_TIMEOUT + AlarmWentOff = 0; + signal(SIGALRM, delayAlarmHandler); +- alarm(delay); ++ if (delay > 999999) ++ alarm(delay/1000000); ++ else ++ ualarm(delay,0); + #endif /* ENABLE_TIMEOUT */ + } + diff --git a/xloadimage.spec b/xloadimage.spec index 4a3f60c..686a474 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 12%{?dist} +Release: 13%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -31,6 +31,8 @@ Patch20: xloadimage-4.1-bracketfix.patch Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch Patch23: xloadimage-4.1-png-1.5.patch +Patch24: xloadimage-4.1-fix-mem-leak.patch +Patch25: xloadimage-4.1-sub-second-delay.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html %if 0%{?fedora} >= 18 BuildRequires: libtiff-devel >= 4.0 @@ -81,6 +83,9 @@ dithered automatically). %patch22 -p1 -b .tiff4 %endif %patch23 -p1 -b .png15 +%patch24 -p1 -b .fix-mem-leak +%patch25 -p1 -b .sub-second-delay + chmod +x configure %build @@ -119,6 +124,11 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Wed Jan 2 2013 Tom Callaway - 4.1-13 +- fix memory leak caused by opening a lot of files at once then cycling through them with "N" +- enable support for sub-second-delay values +- thanks to Roger Heflin for both patches + * Tue Nov 27 2012 Tom Callaway - 4.1-12 - fix png 1.5 support