--- kdegraphics-3.5.0/kcoloredit/Makefile.am	2005-09-10 04:18:59.000000000 -0400
+++ kdegraphics-3.5.0-new/kcoloredit/Makefile.am	2005-11-22 13:52:45.000000000 -0500
@@ -1,21 +1,24 @@
 INCLUDES = $(all_includes)
 
-kcoloredit_SOURCES = kzcolorselector.cpp imageselection.cpp \
+kcoloredit_la_SOURCES = kzcolorselector.cpp imageselection.cpp \
 	texteditselection.cpp gradientselection.cpp colorselector.cpp \
 	kxycolorselector.cpp paletteview.cpp paletteviewscrolledarea.cpp \
 	editablestreamhistory.cpp color.cpp palette.cpp loadpalettedlg.cpp \
 	kcoloreditview.cpp kcoloreditdoc.cpp kcoloredit.cpp main.cpp 
-kcoloredit_METASOURCES = AUTO
-kcoloredit_LDADD = $(LIB_KDEUI) $(LIB_KFILE)
-kcoloredit_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kcoloredit_la_METASOURCES = AUTO
+kcoloredit_la_LIBADD = $(LIB_KDEUI) $(LIB_KFILE)
+kcoloredit_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 rcdir = $(kde_datadir)/kcoloredit
 rc_DATA = kcoloreditui.rc
 
-bin_PROGRAMS = kcoloredit kcolorchooser
-kcolorchooser_SOURCES = kcolorchooser.cpp
-kcolorchooser_LDADD = $(LIB_KDEUI)
-kcolorchooser_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kcoloredit.la kcolorchooser.la
+
+kcolorchooser_la_SOURCES = kcolorchooser.cpp
+kcolorchooser_la_LIBADD = $(LIB_KDEUI)
+kcolorchooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
 
 noinst_HEADERS = color.h colorselector.h editablestreamhistory.h \
 	gradientselection.h imageselection.h kcoloredit.h kcoloreditdoc.h \
--- kdegraphics-3.5.0/kcoloredit/kcolorchooser.cpp	2005-09-10 04:18:59.000000000 -0400
+++ kdegraphics-3.5.0-new/kcoloredit/kcolorchooser.cpp	2005-11-22 13:52:45.000000000 -0500
@@ -41,7 +41,7 @@
    KCmdLineLastOption
 };
 	
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
   KLocale::setMainCatalogue("kdelibs"); 
   KAboutData aboutData( "kcolorchooser", I18N_NOOP("KColorChooser"),
--- kdegraphics-3.5.0/kcoloredit/main.cpp	2005-09-10 04:18:59.000000000 -0400
+++ kdegraphics-3.5.0-new/kcoloredit/main.cpp	2005-11-22 13:52:45.000000000 -0500
@@ -34,7 +34,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
 	KAboutData aboutData( "kcoloredit", I18N_NOOP("KColorEdit"),
--- kdegraphics-3.5.0/kdvi/Makefile.am	2005-09-10 04:18:58.000000000 -0400
+++ kdegraphics-3.5.0-new/kdvi/Makefile.am	2005-11-22 13:52:45.000000000 -0500
@@ -1,11 +1,13 @@
 # set the include path for X, qt and KDE
 INCLUDES= -I$(top_srcdir)/kviewshell \
 	-I$(top_builddir)/kviewshell \
-	$(all_includes) $(LIBFREETYPE_CFLAGS)
+	$(LIBFREETYPE_CFLAGS) $(all_includes)
 # claim, which subdirectories you want to install
 SUBDIRS = . pix
 
-bin_PROGRAMS = kdvi
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdvi.la
 
 # you can add here more. This one gets installed
 kde_module_LTLIBRARIES= kdvipart.la
@@ -38,9 +40,9 @@
 
 KDE_OPTIONS = nofinal
 
-kdvi_SOURCES = main.cpp 
-kdvi_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdvi_LDADD = ../kviewshell/libifaces.la ../kviewshell/libkviewshell.la -lkparts
+kdvi_la_SOURCES = main.cpp 
+kdvi_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdvi_la_LIBADD = ../kviewshell/libifaces.la ../kviewshell/libkviewshell.la -lkparts
 
 ## this option you can leave out. Just, if you use "make dist", you need it
 noinst_HEADERS = dvi.h dviRenderer.h xdvi.h
--- kdegraphics-3.5.0/kdvi/main.cpp	2005-11-08 17:25:52.000000000 -0500
+++ kdegraphics-3.5.0-new/kdvi/main.cpp	2005-11-22 13:52:46.000000000 -0500
@@ -29,7 +29,7 @@
 static const char description[] = I18N_NOOP("A previewer for Device Independent files (DVI files) produced by the TeX typesetting system.");
 
 
-int main(int argc, char** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
 {
   KAboutData about ("kdvi", I18N_NOOP("KDVI"), "1.4",
                     description, KAboutData::License_GPL,
--- kdegraphics-3.5.0/kfax/Makefile.am	2005-10-10 10:56:54.000000000 -0400
+++ kdegraphics-3.5.0-new/kfax/Makefile.am	2005-11-22 13:52:46.000000000 -0500
@@ -1,16 +1,18 @@
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-LDADD      = $(LIB_KFILE) $(LIB_KDEPRINT) -lm
 INCLUDES   = $(all_includes)
 
 ####### Files
 noinst_HEADERS = kfax.h faxexpand.h options.h
 
-kfax_SOURCES   = options.cpp kfax.cpp faxexpand.cpp faxinit.cpp faxinput.cpp \
+kfax_la_SOURCES   = options.cpp kfax.cpp faxexpand.cpp faxinit.cpp faxinput.cpp \
 		 viewfax.cpp kfax_printsettings.cpp
+kfax_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kfax_la_LIBADD  = $(LIB_KFILE) $(LIB_KDEPRINT) -lm
 
 METASOURCES    = AUTO
 
-bin_PROGRAMS   = kfax
+bin_PROGRAMS   = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kfax.la
 
 xdg_apps_DATA = kfax.desktop
 
--- kdegraphics-3.5.0/kfax/kfax.cpp	2005-10-10 10:56:54.000000000 -0400
+++ kdegraphics-3.5.0-new/kfax/kfax.cpp	2005-11-22 13:52:46.000000000 -0500
@@ -1682,7 +1682,7 @@
    KCmdLineLastOption
 };
 
-int main (int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain (int argc, char **argv)
 {
   KAboutData aboutData( "kfax", I18N_NOOP("KFax"),
       KFAXVERSION, description, KAboutData::License_GPL,
--- kdegraphics-3.5.0/kfile-plugins/png/Makefile.am	2005-09-10 04:19:24.000000000 -0400
+++ kdegraphics-3.5.0-new/kfile-plugins/png/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -10,7 +10,7 @@
 
 kfile_png_la_SOURCES = kfile_png.cpp
 kfile_png_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
-kfile_png_la_LIBADD = $(LIB_KIO)
+kfile_png_la_LIBADD = $(LIB_KIO) $(LIBPNG)
 
 # let automoc handle all of the meta source files (moc)
 METASOURCES = AUTO
--- kdegraphics-3.5.0/kghostview/Makefile.am	2005-09-10 04:19:23.000000000 -0400
+++ kdegraphics-3.5.0-new/kghostview/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -4,7 +4,8 @@
 
 ####### Files
 
-bin_PROGRAMS = 	kghostview
+kdeinit_LTLIBRARIES = kghostview.la
+bin_PROGRAMS = 	
 lib_LTLIBRARIES = libkghostviewlib.la
 kde_module_LTLIBRARIES = libkghostviewpart.la
 noinst_LTLIBRARIES = libdscparse.la
@@ -27,9 +28,9 @@
 
 libkghostviewpart_la_SOURCES = part_init.cpp
 
-kghostview_SOURCES = main.cpp
-kghostview_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kghostview_LDADD = libkghostviewlib.la
+kghostview_la_SOURCES = main.cpp
+kghostview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kghostview_la_LIBADD = libkghostviewlib.la
 
 libdscparse_la_LDFLAGS = $(all_libraries) -no-undefined
 libdscparse_la_LIBADD = $(LIB_QT)
--- kdegraphics-3.5.0/kghostview/main.cpp	2005-10-10 10:56:55.000000000 -0400
+++ kdegraphics-3.5.0-new/kghostview/main.cpp	2005-11-22 13:52:47.000000000 -0500
@@ -43,7 +43,7 @@
     KCmdLineLastOption
 };
 
-int main( int argc, char** argv )
+extern "C" KDE_EXPORT int kdemain( int argc, char** argv )
 {
     KCmdLineArgs::init( argc, argv, KGVPart::createAboutData() );
     KCmdLineArgs::addCmdLineOptions( options );
--- kdegraphics-3.5.0/kiconedit/Makefile.am	2005-09-10 04:19:24.000000000 -0400
+++ kdegraphics-3.5.0-new/kiconedit/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -1,18 +1,20 @@
 INCLUDES = $(all_includes)
 SUBDIRS = pics
 
-bin_PROGRAMS = kiconedit
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kiconedit.la
 
-kiconedit_SOURCES = utils.cpp main.cpp kiconedit.cpp kicongrid.cpp \
+kiconedit_la_SOURCES = utils.cpp main.cpp kiconedit.cpp kicongrid.cpp \
     kiconcolors.cpp kcolorgrid.cpp palettetoolbar.cpp\
     kicon.cpp kresize.cpp knew.cpp properties.cpp \
     kiconeditslots.cpp kiconconfig.cpp 
 
-kiconedit_METASOURCES = AUTO
+kiconedit_la_METASOURCES = AUTO
 
 # the library search path. 
-kiconedit_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kiconedit_LDADD = $(LIB_KFILE) -lkdeprint
+kiconedit_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kiconedit_la_LIBADD = $(LIB_KFILE) -lkdeprint
 
 DISTCLEANFILES = *~ .deps/* .libs/*
 
--- kdegraphics-3.5.0/kiconedit/main.cpp	2005-10-10 10:56:55.000000000 -0400
+++ kdegraphics-3.5.0-new/kiconedit/main.cpp	2005-11-22 13:52:47.000000000 -0500
@@ -40,7 +40,7 @@
   KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData aboutData( "kiconedit", I18N_NOOP("KIconEdit"),
     VERSION, description, KAboutData::License_GPL,
--- kdegraphics-3.5.0/kooka/Makefile.am	2005-09-10 04:19:00.000000000 -0400
+++ kdegraphics-3.5.0-new/kooka/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -2,10 +2,13 @@
 
 SUBDIRS = pics
 
-bin_PROGRAMS = kooka
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kooka.la
+
 METASOURCES = AUTO
 
-kooka_SOURCES =	main.cpp kooka.cpp kookaview.cpp kookapref.cpp 		\
+kooka_la_SOURCES =	main.cpp kooka.cpp kookaview.cpp kookapref.cpp 		\
 		img_saver.cpp ksaneocr.cpp \
 		kookaimage.cpp kookaimagemeta.cpp scanpackager.cpp 	\
 		imgnamecombo.cpp imageselectline.cpp      \
@@ -16,8 +19,8 @@
 		kocrocrad.cpp
 # 		pagesetup.cpp 
 
-kooka_LDADD   = $(LIB_KFILE) -lkdeprint -lktexteditor $(LIBTIFF) $(top_builddir)/libkscan/libkscan.la $(KADMOS_LIB) $(LIB_KSPELL)
-kooka_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+kooka_la_LIBADD   = $(LIB_KFILE) -lkdeprint -lktexteditor $(LIBTIFF) $(top_builddir)/libkscan/libkscan.la $(KADMOS_LIB) $(LIB_KSPELL)
+kooka_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
 
 INCLUDES         = -I$(top_srcdir)/libkscan $(all_includes) $(LIBSANE_INCLUDES) $(KADMOS_INC)
 
--- kdegraphics-3.5.0/kooka/main.cpp	2005-09-10 04:19:00.000000000 -0400
+++ kdegraphics-3.5.0-new/kooka/main.cpp	2005-11-22 13:52:47.000000000 -0500
@@ -71,7 +71,7 @@
 
 
 
-int main( int argc, char *argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char *argv[] )
 {
    KAboutData about("kooka", I18N_NOOP("Kooka"), KOOKA_VERSION, I18N_NOOP(description),
 		    KAboutData::License_GPL_V2, "(C) 2000 Klaas Freitag", 0,
--- kdegraphics-3.5.0/kpdf/Makefile.am	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.0-new/kpdf/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -1,6 +1,6 @@
 SUBDIRS = xpdf conf core ui shell
 
-INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(all_includes) $(FREETYPE_CFLAGS)
+INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
 
 METASOURCES = AUTO
 
--- kdegraphics-3.5.0/kpdf/shell/Makefile.am	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.0-new/kpdf/shell/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -1,12 +1,15 @@
-INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(all_includes) $(FREETYPE_CFLAGS)
+INCLUDES = -I$(srcdir)/xpdf -I$(srcdir)/xpdf/goo -I$(top_builddir)/kpdf $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes)
+LDFLAGS  = $(FREETYPE_LDFLAGS) $(FONTCONFIG_LDFLAGS)
 
 METASOURCES = AUTO
 
-bin_PROGRAMS = kpdf
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kpdf.la
 
-kpdf_SOURCES = main.cpp shell.cpp
-kpdf_LDFLAGS = $(KDE_RPATH) $(all_libraries)
-kpdf_LDADD   = $(LIB_KPARTS)
+kpdf_la_SOURCES = main.cpp shell.cpp
+kpdf_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
+kpdf_la_LIBADD  = $(LIB_KPARTS)
 
 EXTRA_DIST = kpdf.desktop
 xdg_apps_DATA = kpdf.desktop
--- kdegraphics-3.5.0/kpdf/shell/main.cpp	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.0-new/kpdf/shell/main.cpp	2005-11-22 13:52:47.000000000 -0500
@@ -29,7 +29,7 @@
     KCmdLineLastOption
 };
 
-int main(int argc, char** argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
 {
     KAboutData about(
         "kpdf",
--- kdegraphics-3.5.0/kpdf/xpdf/xpdf/Makefile.am	2005-09-10 04:18:43.000000000 -0400
+++ kdegraphics-3.5.0-new/kpdf/xpdf/xpdf/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -1,7 +1,7 @@
-INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../splash -I$(srcdir)/../goo $(all_includes) $(LIBFREETYPE_CFLAGS) $(XFT_CFLAGS) $(X_INCLUDES) $(QT_INCLUDES)
+INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../fofi -I$(srcdir)/../splash -I$(srcdir)/../goo $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) $(all_includes) $(XFT_CFLAGS) $(X_INCLUDES) $(QT_INCLUDES)
 
 libxpdf_la_LDFLAGS = $(all_libraries)
-libxpdf_la_LIBADD = $(LIB_X11) $(LIBFREETYPE_LIBS) $(LIBPAPER_LIBS) $(XFT_LIBS) $(LIBJPEG) ../goo/libgoo.la ../fofi/libfofi.la ../splash/libsplash.la 
+libxpdf_la_LIBADD = $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIB_X11) $(LIBPAPER_LIBS) $(XFT_LIBS) $(LIBJPEG) ../goo/libgoo.la ../fofi/libfofi.la ../splash/libsplash.la 
 libxpdf_la_SOURCES = Annot.cc Array.cc BuiltinFont.cc BuiltinFontTables.cc \
      Catalog.cc CharCodeToUnicode.cc CMap.cc Decrypt.cc Dict.cc DCTStream.cc \
      FontEncodingTables.cc Function.cc Gfx.cc \
--- kdegraphics-3.5.0/kpovmodeler/Makefile.am	2005-09-10 04:18:54.000000000 -0400
+++ kdegraphics-3.5.0-new/kpovmodeler/Makefile.am	2005-11-22 13:52:47.000000000 -0500
@@ -224,11 +224,12 @@
 ####
 # the executable
 
-bin_PROGRAMS = kpovmodeler
+bin_PROGRAMS = 
+kdeinit_LTLIBRARIES = kpovmodeler.la
 
-kpovmodeler_SOURCES = main.cpp
-kpovmodeler_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kpovmodeler_LDADD = libkpovmodeler.la
+kpovmodeler_la_SOURCES = main.cpp
+kpovmodeler_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kpovmodeler_la_LIBADD  = libkpovmodeler.la
 
 dummy.cpp:
 	echo > dummy.cpp
--- kdegraphics-3.5.0/kpovmodeler/main.cpp	2005-09-10 04:18:54.000000000 -0400
+++ kdegraphics-3.5.0-new/kpovmodeler/main.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -35,7 +35,7 @@
   KCmdLineLastOption
 };
 
-int main( int argc, char* argv[] )
+extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
 {
    PMShell* shell = 0;
 
--- kdegraphics-3.5.0/kruler/Makefile.am	2005-09-10 04:19:23.000000000 -0400
+++ kdegraphics-3.5.0-new/kruler/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -2,11 +2,14 @@
 
 INCLUDES= $(all_includes)
 
-bin_PROGRAMS = kruler
-kruler_METASOURCES = AUTO
-kruler_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kruler_LDADD   = $(LIB_KDEUI)
-kruler_SOURCES = klineal.cpp main.cpp 
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kruler.la
+
+kruler_la_METASOURCES = AUTO
+kruler_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kruler_la_LIBADD  = $(LIB_KDEUI)
+kruler_la_SOURCES = klineal.cpp main.cpp 
 
 xdg_apps_DATA = kruler.desktop
 
--- kdegraphics-3.5.0/kruler/main.cpp	2005-09-10 04:19:23.000000000 -0400
+++ kdegraphics-3.5.0-new/kruler/main.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -22,7 +22,7 @@
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
 
-int main(int argc, char *argv[])
+extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
 {
 
 
--- kdegraphics-3.5.0/ksnapshot/Makefile.am	2005-09-10 04:19:19.000000000 -0400
+++ kdegraphics-3.5.0-new/ksnapshot/Makefile.am	2005-11-22 13:53:31.000000000 -0500
@@ -1,14 +1,16 @@
-bin_PROGRAMS= ksnapshot
+bin_PROGRAMS= 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = ksnapshot.la
 
 INCLUDES = -DKSNAPVERSION="\"0.7\"" $(all_includes)
 
-ksnapshot_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-ksnapshot_LDADD = $(LIB_KDEPRINT)
+ksnapshot_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module
+ksnapshot_la_LIBADD = $(LIB_KDEPRINT)
 
-ksnapshot_SOURCES = ksnapshotiface.skel main.cpp ksnapshot.cpp \
+ksnapshot_la_SOURCES = ksnapshotiface.skel main.cpp ksnapshot.cpp \
     regiongrabber.cpp windowgrabber.cpp ksnapshotwidget.ui
 
-ksnapshot_METASOURCES = AUTO
+ksnapshot_la_METASOURCES = AUTO
 
 xdg_apps_DATA = ksnapshot.desktop
 
--- kdegraphics-3.5.0/ksnapshot/main.cpp	2005-10-10 10:56:53.000000000 -0400
+++ kdegraphics-3.5.0-new/ksnapshot/main.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -40,7 +40,7 @@
     { 0, 0, 0 }
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData aboutData( "ksnapshot", I18N_NOOP("KSnapshot"),
     KSNAPVERSION, description, KAboutData::License_GPL,
--- kdegraphics-3.5.0/ksvg/Makefile.am	2005-09-10 04:19:19.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -4,9 +4,9 @@
 libksvg_la_SOURCES = dummy.cc
 libksvg_la_METASOURCES = AUTO
 libksvg_la_LDFLAGS = -version-info 0:1:0 -no-undefined $(all_libraries)
-libksvg_la_LIBADD  = dom/libksvgdom.la impl/libksvgdomimpl.la core/libksvgcore.la ecma/libksvgecma.la \
+libksvg_la_LIBADD  = $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) dom/libksvgdom.la impl/libksvgdomimpl.la core/libksvgcore.la ecma/libksvgecma.la \
 		     $(LCMS_LIBS) impl/libs/xrgbrender/libksvgxrgbrender.la impl/libs/libtext2path/src/libtext2path.la \
-			 impl/libs/art_support/libksvgart.la -lkjs $(LIB_KHTML) $(LIBART_LIBS) $(FREETYPE_LIBS) $(FONTCONFIG_LIBS)
+			 impl/libs/art_support/libksvgart.la -lkjs $(LIB_KHTML)
 
 INCLUDES = -I$(top_srcdir)/ksvg/dom -I$(top_srcdir)/ksvg/impl $(all_includes)
 
--- kdegraphics-3.5.0/ksvg/impl/libs/libtext2path/src/Makefile.am	2005-09-10 04:19:14.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/impl/libs/libtext2path/src/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -1,10 +1,10 @@
 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 = $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(FRIBIDI_LIBS)
--- kdegraphics-3.5.0/ksvg/plugin/backends/agg/Makefile.am	2005-09-10 04:19:12.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/plugin/backends/agg/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -12,4 +12,4 @@
 kde_services_DATA = ksvgaggcanvas.desktop
 
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-INCLUDES = $(KDE_INCLUDES) $(AGG_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) $(FONTCONFIG_CFLAGS) $(KDE_INCLUDES) $(AGG_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)
--- kdegraphics-3.5.0/ksvg/plugin/backends/libart/Makefile.am	2005-09-10 04:19:11.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/plugin/backends/libart/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -8,4 +8,4 @@
 kde_services_DATA = ksvglibartcanvas.desktop
 
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
-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 $(KDE_INCLUDES) $(all_includes)
+INCLUDES = $(FREETYPE_CFLAGS) $(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 $(KDE_INCLUDES) $(all_includes)
--- kdegraphics-3.5.0/ksvg/test/external/Makefile.am	2005-09-10 04:19:09.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/test/external/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -1,13 +1,16 @@
 INCLUDES = $(FREETYPE_CFLAGS) -I$(top_srcdir)/ksvg -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/libtext2path/src $(all_includes)
+LDFLAGS = $(FREETYPE_LDFLAGS)
 METASOURCES = AUTO
 KDE_CXXFLAGS = $(USE_EXCEPTIONS)
 
-bin_PROGRAMS = svgdisplay printnodetest
+bin_PROGRAMS = 
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = svgdisplay.la printnodetest.la
 
-svgdisplay_SOURCES = SVGTestWidget.cc svgdisplay.cc
-svgdisplay_LDADD =  $(LIB_KDECORE) ../../libksvg.la
-svgdisplay_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+svgdisplay_la_SOURCES = SVGTestWidget.cc svgdisplay.cc
+svgdisplay_la_LIBADD =  $(LIB_KDECORE) ../../libksvg.la
+svgdisplay_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
 
-printnodetest_SOURCES = printnodetest.cpp
-printnodetest_LDADD =  $(LIB_KDECORE) ../../libksvg.la
-printnodetest_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+printnodetest_la_SOURCES = printnodetest.cpp
+printnodetest_la_LIBADD =  $(LIB_KDECORE) ../../libksvg.la
+printnodetest_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -module
--- kdegraphics-3.5.0/ksvg/test/external/printnodetest.cpp	2005-10-10 10:56:46.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/test/external/printnodetest.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -44,7 +44,7 @@
 	exit(0);
 }
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 	KAboutData *about = new KAboutData("KSVG printNode test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG printNode test app"));
 	KCmdLineArgs::init(argc, argv, about);
--- kdegraphics-3.5.0/ksvg/test/external/svgdisplay.cc	2005-09-10 04:19:09.000000000 -0400
+++ kdegraphics-3.5.0-new/ksvg/test/external/svgdisplay.cc	2005-11-22 13:52:48.000000000 -0500
@@ -10,7 +10,7 @@
 	KCmdLineLastOption
 };
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
 
 	KAboutData *about = new KAboutData( "KSVG test app", I18N_NOOP("KSVG test"), "0.1", I18N_NOOP("KSVG standalone test app") );
--- kdegraphics-3.5.0/kviewshell/Makefile.am	2005-09-10 04:19:21.000000000 -0400
+++ kdegraphics-3.5.0-new/kviewshell/Makefile.am	2005-11-22 13:52:48.000000000 -0500
@@ -5,8 +5,9 @@
 
 ####### Files
 
-bin_PROGRAMS = 	kviewshell
+bin_PROGRAMS = 	
 lib_LTLIBRARIES = libkmultipage.la
+kdeinit_LTLIBRARIES = kviewshell.la
 kde_module_LTLIBRARIES = kviewerpart.la emptymultipagepart.la
 noinst_LTLIBRARIES = libifaces.la libkviewshell.la
 
@@ -38,9 +39,9 @@
 
 libkviewshell_la_SOURCES = kviewshell.cpp
 
-kviewshell_SOURCES = main.cpp
-kviewshell_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kviewshell_LDADD = libkviewshell.la ./libifaces.la -lkparts
+kviewshell_la_SOURCES = main.cpp
+kviewshell_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kviewshell_la_LIBADD = libkviewshell.la ./libifaces.la -lkparts
 
 kviewshellinclude_HEADERS = anchor.h bookmark.h pageView.h documentPageCache.h documentRenderer.h documentWidget.h \
 	history.h hyperlink.h kmultipage.h length.h pageNumber.h pageSize.h renderedDocumentPage.h renderedDocumentPagePixmap.h \
--- kdegraphics-3.5.0/kviewshell/main.cpp	2005-11-08 17:25:45.000000000 -0500
+++ kdegraphics-3.5.0-new/kviewshell/main.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -32,7 +32,7 @@
 static const char description[] = I18N_NOOP("Generic framework for viewer applications");
 
 
-int main(int argc, char **argv)
+extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
 {
   KAboutData about ("kviewshell", I18N_NOOP("KViewShell"), "0.6",
 		    description, KAboutData::License_GPL,
--- kdegraphics-3.5.0/libkscan/img_canvas.cpp	2005-10-10 10:56:40.000000000 -0400
+++ kdegraphics-3.5.0-new/libkscan/img_canvas.cpp	2005-11-22 13:52:48.000000000 -0500
@@ -700,7 +700,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());
@@ -715,12 +715,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;
--- kdegraphics-3.5.0/kviewshell/plugins/djvu/libdjvu/Makefile.am	2005-11-08 17:25:45.000000000 -0500
+++ kdegraphics-3.5.0-new/kviewshell/plugins/djvu/libdjvu/Makefile.am	2005-11-26 10:47:53.000000000 -0500
@@ -1,7 +1,7 @@
 INCLUDES = -I$(top_srcdir) $(all_includes)
 
-kde_module_LTLIBRARIES = libdjvu.la
-libdjvu_la_LDFLAGS = -avoid-version $(all_libraries)
+lib_LTLIBRARIES = libdjvu.la
+libdjvu_la_LDFLAGS = $(all_libraries)
 libdjvu_la_LIBADD = $(LIBJPEG)
 libdjvu_la_SOURCES = Arrays.cpp DjVuDocEditor.cpp DjVuMessageLite.cpp GOS.cpp IW44Image.cpp \
 	BSByteStream.cpp DjVuDocument.cpp DjVuNavDir.cpp GPixmap.cpp JB2EncodeCodec.cpp \
--- kdegraphics-3.5.0/kfaxview/libkfaximage/Makefile.am	2005-09-10 04:18:44.000000000 -0400
+++ kdegraphics-3.5.0-new/kfaxview/libkfaximage/Makefile.am	2005-11-27 10:55:12.000000000 -0500
@@ -1,7 +1,7 @@
 INCLUDES = -I$(top_srcdir) $(all_includes)
 
 lib_LTLIBRARIES = libkfaximage.la
-libkfaximage_la_LDFLAGS = $(all_libraries) -no-undefined -avoid-version
+libkfaximage_la_LDFLAGS = $(all_libraries) -no-undefined
 libkfaximage_la_LIBADD  = $(LIB_KDECORE)
 libkfaximage_la_SOURCES = kfaximage.cpp faxexpand.cpp faxinit.cpp
 
--- kdegraphics-3.5.0/kpdf/xpdf/xpdf/GlobalParams.cc	Tue Nov  8 17:25:47 2005
+++ kdegraphics-3.5.0-new/kpdf/xpdf/xpdf/GlobalParams.cc	Sat Jan 14 16:23:46 2006
@@ -1315,7 +1315,7 @@
   if (type.contains("Italic")) slant=FC_SLANT_ITALIC;
   if (type.contains("Bold")) weight=FC_WEIGHT_BOLD;
   if (type.contains("Light")) weight=FC_WEIGHT_LIGHT;
-  if (type.contains("Condensed")) width=FC_WIDTH_CONDENSED;
+  // if (type.contains("Condensed")) width=FC_WIDTH_CONDENSED;
 }
 
 DisplayFontParam *GlobalParams::getDisplayFont(GString *fontName) {
@@ -1329,13 +1329,14 @@
   dfp = (DisplayFontParam *)displayFonts->lookup(fontName);
   // KPDF: try to find font using Xft
   if (!dfp) {
-  	int weight=FC_WEIGHT_MEDIUM, slant=FC_SLANT_ROMAN, width=FC_WIDTH_NORMAL;
+  	int weight=FC_WEIGHT_MEDIUM, slant=FC_SLANT_ROMAN, width=0;
 	QString name(fontName->getCString());
 	
 	parseStyle(name,weight,slant,width);
 	p = FcPatternBuild(0,FC_FAMILY,FcTypeString, name.ascii(), 
 		FC_SLANT, FcTypeInteger, slant, FC_WEIGHT, FcTypeInteger, weight,
-		FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0);
+		// FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0);
+		FC_LANG, FcTypeString, "xx", (char*)0);
 	if (!p) goto fin;
 	m = XftFontMatch(qt_xdisplay(),qt_xscreen(),p,&res);
 	if (!m) goto fin;
--- kdegraphics-3.5.1/kpdf/part.cpp	2006-01-19 11:38:22.000000000 -0500
+++ kdegraphics-3.5.1-new/kpdf/part.cpp	2006-01-24 16:57:42.000000000 -0500
@@ -697,6 +697,11 @@
     KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), QString::null, widget() );
     if ( saveURL.isValid() && !saveURL.isEmpty() )
     {
+        if (saveURL == url())
+        {
+                KMessageBox::information( widget(), i18n("You are trying to overwrite \"%1\" with itself. This is not allowed. Please save it in another location.").arg(saveURL.filename()) );
+  	             return;
+        }
         if ( KIO::NetAccess::exists( saveURL, false, widget() ) )
         {
             if (KMessageBox::warningContinueCancel( widget(), i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?").arg(saveURL.filename()), QString::null, i18n("Overwrite")) != KMessageBox::Continue)
--- kdegraphics-3.5.1/kpdf/xpdf/splash/SplashXPathScanner.cc	(Revision 505052)
+++ kdegraphics-3.5.1-new/kpdf/xpdf/splash/SplashXPathScanner.cc	(Arbeitskopie)
@@ -186,7 +186,7 @@ GBool SplashXPathScanner::getNextSpan(in
 }
 
 void SplashXPathScanner::computeIntersections(int y) {
-  SplashCoord ySegMin, ySegMax, xx0, xx1;
+  SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1;
   SplashXPathSeg *seg;
   int i, j;
 
@@ -236,19 +236,27 @@ void SplashXPathScanner::computeIntersec
     } else if (seg->flags & splashXPathVert) {
       xx0 = xx1 = seg->x0;
     } else {
-      if (ySegMin <= y) {
-	// intersection with top edge
-	xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
+      if (seg->x0 < seg->x1) {
+	xSegMin = seg->x0;
+	xSegMax = seg->x1;
       } else {
-	// x coord of segment endpoint with min y coord
-	xx0 = (seg->flags & splashXPathFlip) ? seg->x1 : seg->x0;
+	xSegMin = seg->x1;
+	xSegMax = seg->x0;
       }
-      if (ySegMax >= y + 1) {
-	// intersection with bottom edge
-	xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
-      } else {
-	// x coord of segment endpoint with max y coord
-	xx1 = (seg->flags & splashXPathFlip) ? seg->x0 : seg->x1;
+      // intersection with top edge
+      xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
+      // intersection with bottom edge
+      xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
+      // the segment may not actually extend to the top and/or bottom edges
+      if (xx0 < xSegMin) {
+	xx0 = xSegMin;
+      } else if (xx0 > xSegMax) {
+	xx0 = xSegMax;
+      }
+      if (xx1 < xSegMin) {
+	xx1 = xSegMin;
+      } else if (xx1 > xSegMax) {
+	xx1 = xSegMax;
       }
     }
     if (xx0 < xx1) {
