diff -uNr kdegraphics-3.3.2/admin/ltmain.sh kdegraphics-3.3.2-new/admin/ltmain.sh --- kdegraphics-3.3.2/admin/ltmain.sh Sun Nov 28 08:30:52 2004 +++ kdegraphics-3.3.2-new/admin/ltmain.sh Thu Dec 23 11:08:43 2004 @@ -986,6 +986,19 @@ prev= continue ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; inst_prefix) inst_prefix_dir="$arg" prev= @@ -1207,6 +1220,11 @@ continue ;; + -framework) + prev=framework + continue + ;; + -inst-prefix-dir) prev=inst_prefix continue @@ -1276,7 +1294,7 @@ ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" + deplibs="$deplibs System.ltframework" continue esac elif test "X$arg" = "X-lc_r"; then @@ -1883,6 +1901,21 @@ fi fi ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$inherited_linker_flags " in + *" $deplib "*) ;; + * ) inherited_linker_flags="$inherited_linker_flags $deplib" ;; + esac + fi + fi + continue + ;; -L*) case $linkmode in lib) @@ -2011,6 +2044,16 @@ *) . ./$lib ;; esac + case $host in + *-*-darwin*) + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + inherited_linker_flags=`$echo "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + fi + dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then @@ -3130,7 +3173,7 @@ ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" + deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -3429,7 +3472,7 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac @@ -3479,6 +3522,15 @@ deplibs=$newdeplibs fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + inherited_linker_flags=`$echo "X $inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$echo "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -4057,8 +4109,8 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac @@ -4397,6 +4449,7 @@ # We should set the shlibpath_var rpath= for dir in $temp_rpath; do + if test "$dir" != "@FINKPREFIX@/lib"; then case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. @@ -4407,6 +4460,7 @@ rpath="$rpath\$thisdir/$dir:" ;; esac + fi done temp_rpath="$rpath" fi diff -uNr kdegraphics-3.3.2/configure kdegraphics-3.3.2-new/configure --- kdegraphics-3.3.2/configure Mon Nov 29 10:18:25 2004 +++ kdegraphics-3.3.2-new/configure Thu Dec 23 11:08:44 2004 @@ -7983,6 +7983,19 @@ lt_cv_sys_max_cmd_len=8192; ;; + netbsd* | freebsd* | openbsd* | darwin* ) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but @@ -9626,10 +9639,21 @@ archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) - allow_undefined_flag='-undefined suppress' + allow_undefined_flag='-Wl,-undefined -Wl,suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi ;; esac lt_int_apple_cc_single_mod=no @@ -11479,7 +11503,18 @@ allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + allow_undefined_flag='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi ;; esac output_verbose_link_cmd='echo' @@ -12530,7 +12565,18 @@ allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + allow_undefined_flag_CXX='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi ;; esac lt_int_apple_cc_single_mod=no @@ -16353,7 +16399,18 @@ allow_undefined_flag_F77='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_F77='-flat_namespace -undefined suppress' + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + allow_undefined_flag_F77='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi ;; esac lt_int_apple_cc_single_mod=no @@ -18635,7 +18692,18 @@ allow_undefined_flag_GCJ='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='-Wl,-undefined -Wl,dynamic_lookup' + ;; + esac + fi ;; esac lt_int_apple_cc_single_mod=no diff -uNr kdegraphics-3.3.2/kdvi/Makefile.in kdegraphics-3.3.2-new/kdvi/Makefile.in --- kdegraphics-3.3.2/kdvi/Makefile.in Mon Nov 29 10:18:19 2004 +++ kdegraphics-3.3.2-new/kdvi/Makefile.in Thu Dec 23 11:08:44 2004 @@ -471,7 +471,7 @@ xdg_menudir = @xdg_menudir@ # set the include path for X, qt and KDE -INCLUDES = -I$(top_srcdir)/kviewshell $(all_includes) $(LIBFREETYPE_CFLAGS) +INCLUDES = -I/usr/X11R6/include/freetype2 -I$(top_srcdir)/kviewshell $(all_includes) $(LIBFREETYPE_CFLAGS) # claim, which subdirectories you want to install SUBDIRS = . pix diff -uNr kdegraphics-3.3.2/kpdf/xpdf/Gfx.cc kdegraphics-3.3.2-new/kpdf/xpdf/Gfx.cc --- kdegraphics-3.3.2/kpdf/xpdf/Gfx.cc Sun Nov 28 08:30:57 2004 +++ kdegraphics-3.3.2-new/kpdf/xpdf/Gfx.cc Thu Dec 23 11:09:15 2004 @@ -2654,7 +2654,9 @@ haveMask = gFalse; dict->lookup("Mask", &maskObj); if (maskObj.isArray()) { - for (i = 0; i < maskObj.arrayGetLength(); ++i) { + for (i = 0; + i < maskObj.arrayGetLength() && i < 2*gfxColorMaxComps; + ++i) { maskObj.arrayGet(i, &obj1); maskColors[i] = obj1.getInt(); obj1.free(); diff -uNr kdegraphics-3.3.2/kpdf/xpdf/GfxState.cc kdegraphics-3.3.2-new/kpdf/xpdf/GfxState.cc --- kdegraphics-3.3.2/kpdf/xpdf/GfxState.cc Sun Nov 28 08:30:57 2004 +++ kdegraphics-3.3.2-new/kpdf/xpdf/GfxState.cc Thu Dec 23 11:09:15 2004 @@ -708,6 +708,11 @@ } nCompsA = obj2.getInt(); obj2.free(); + if (nCompsA > gfxColorMaxComps) { + error(-1, "ICCBased color space with too many (%d > %d) components", + nCompsA, gfxColorMaxComps); + nCompsA = gfxColorMaxComps; + } if (dict->lookup("Alternate", &obj2)->isNull() || !(altA = GfxColorSpace::parse(&obj2))) { switch (nCompsA) { @@ -1054,7 +1059,7 @@ } nCompsA = obj1.arrayGetLength(); if (nCompsA > gfxColorMaxComps) { - error(-1, "DeviceN color space with more than %d > %d components", + error(-1, "DeviceN color space with too many (%d > %d) components", nCompsA, gfxColorMaxComps); nCompsA = gfxColorMaxComps; } diff -uNr kdegraphics-3.3.2/kpdf/xpdf/Makefile.in kdegraphics-3.3.2-new/kpdf/xpdf/Makefile.in --- kdegraphics-3.3.2/kpdf/xpdf/Makefile.in Mon Nov 29 10:18:20 2004 +++ kdegraphics-3.3.2-new/kpdf/xpdf/Makefile.in Thu Dec 23 11:08:44 2004 @@ -418,7 +418,7 @@ xdg_appsdir = @xdg_appsdir@ xdg_directorydir = @xdg_directorydir@ xdg_menudir = @xdg_menudir@ -INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../splash -I$(srcdir)/../goo $(all_includes) $(LIBFREETYPE_CFLAGS) +INCLUDES = -I/usr/X11R6/include/freetype2 -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../splash -I$(srcdir)/../goo $(all_includes) $(LIBFREETYPE_CFLAGS) libxpdf_la_LDFLAGS = $(all_libraries) libxpdf_la_LIBADD = $(LIB_X11) $(LIBFREETYPE_LIBS) $(LIBPAPER_LIBS) $(LIBT1) ../goo/libgoo.la ../fofi/libfofi.la ../splash/libsplash.la libxpdf_la_SOURCES = Annot.cc Array.cc BuiltinFont.cc BuiltinFontTables.cc \ diff -uNr kdegraphics-3.3.2/kpovmodeler/Makefile.in kdegraphics-3.3.2-new/kpovmodeler/Makefile.in --- kdegraphics-3.3.2/kpovmodeler/Makefile.in Mon Nov 29 10:18:21 2004 +++ kdegraphics-3.3.2-new/kpovmodeler/Makefile.in Thu Dec 23 11:08:44 2004 @@ -604,7 +604,7 @@ xdg_appsdir = @xdg_appsdir@ xdg_directorydir = @xdg_directorydir@ xdg_menudir = @xdg_menudir@ -INCLUDES = $(LIBFREETYPE_CFLAGS) $(all_includes) +INCLUDES = -I/usr/X11R6/include/freetype2 $(LIBFREETYPE_CFLAGS) $(all_includes) SUBDIRS = pics examples KDE_OPTIONS = nofinal diff -uNr kdegraphics-3.3.2/ksvg/impl/libs/libtext2path/src/Makefile.in kdegraphics-3.3.2-new/ksvg/impl/libs/libtext2path/src/Makefile.in --- kdegraphics-3.3.2/ksvg/impl/libs/libtext2path/src/Makefile.in Mon Nov 29 10:18:22 2004 +++ kdegraphics-3.3.2-new/ksvg/impl/libs/libtext2path/src/Makefile.in Thu Dec 23 11:08:44 2004 @@ -416,11 +416,11 @@ xdg_menudir = @xdg_menudir@ lib_LTLIBRARIES = libtext2path.la KDE_CXXFLAGS = $(USE_EXCEPTIONS) -INCLUDES = $(FRIBIDI_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes) +INCLUDES = $(FREETYPE_CFLAGS) $(FRIBIDI_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes) libtext2path_includedir = $(includedir)/libtext2path-0.1 libtext2path_include_HEADERS = BezierPath.h Glyph.h GlyphTracer.h libtext2path_la_SOURCES = Affine.cpp Rectangle.cpp Font.cpp Glyph.cpp GlyphTracer.cpp Converter.cpp QtUnicode.cpp -libtext2path_la_LDFLAGS = $(FRIBIDI_LIBS) $(FONTCONFIG_LIBS) +libtext2path_la_LDFLAGS = $(FRIBIDI_LIBS) $(FONTCONFIG_LIBS) $(FREETYPE_LIBS) #>- all: all-am #>+ 1 all: docs-am all-am diff -uNr kdegraphics-3.3.2/ksvg/plugin/backends/libart/Makefile.in kdegraphics-3.3.2-new/ksvg/plugin/backends/libart/Makefile.in --- kdegraphics-3.3.2/ksvg/plugin/backends/libart/Makefile.in Mon Nov 29 10:18:22 2004 +++ kdegraphics-3.3.2-new/ksvg/plugin/backends/libart/Makefile.in Thu Dec 23 11:08:44 2004 @@ -423,7 +423,7 @@ #>- libksvgrendererlibart_la_METASOURCES = AUTO kde_services_DATA = ksvglibartcanvas.desktop KDE_CXXFLAGS = $(USE_EXCEPTIONS) -INCLUDES = $(KDE_INCLUDES) $(LIBART_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes) +INCLUDES = $(FREETYPE_CFLAGS) $(KDE_INCLUDES) $(LIBART_CFLAGS) $(FONTCONFIG_CFLAGS) -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl -I$(top_srcdir)/ksvg/ecma -I$(top_srcdir)/ksvg/core -I$(top_srcdir)/ksvg/impl/libs/art_support -I$(top_srcdir)/ksvg/impl/libs/libtext2path/src $(all_includes) #>- all: all-am #>+ 1 all: docs-am all-am diff -uNr kdegraphics-3.3.2/libkscan/img_canvas.cpp kdegraphics-3.3.2-new/libkscan/img_canvas.cpp --- kdegraphics-3.3.2/libkscan/img_canvas.cpp Tue Sep 9 11:05:38 2003 +++ kdegraphics-3.3.2-new/libkscan/img_canvas.cpp Thu Dec 23 11:08:44 2004 @@ -702,7 +702,7 @@ double(image->width()); kdDebug(29000) << "FIT WIDTH scrollbar to substract: " << sbWidth << endl; } - scale_factor = 100*used_xscaler; + scale_factor = (int)(100*used_xscaler); break; case FIT_HEIGHT: used_yscaler = used_xscaler = double(noSBSize.height())/double(image->height()); @@ -717,12 +717,12 @@ kdDebug(29000) << "FIT HEIGHT scrollbar to substract: " << sbWidth << endl; // scale = int(100.0*(noSBSize.height() -sbWidth) / image->height()); } - scale_factor = 100*used_xscaler; + scale_factor = (int)(100*used_xscaler); break; case ZOOM: used_xscaler = used_yscaler = double(getScaleFactor())/100.0; - scale_factor = 100*used_xscaler; + scale_factor = (int)(100*used_xscaler); break; default: break;