r16358 by craig - #8232: Use the system libhyphen if available (rhel/fedora/debian/ubuntu at least)

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 14 20:22:11 CET 2011


Author: craig
Date: Mon Feb 14 19:22:10 2011
New Revision: 16358

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16358
Log:
#8232: Use the system libhyphen if available (rhel/fedora/debian/ubuntu at least)

Modified:
    branches/Version135/Scribus/CMakeLists.txt
    branches/Version135/Scribus/scribus/CMakeLists.txt
    branches/Version135/Scribus/scribus/hyphenator.h

Modified: branches/Version135/Scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16358&path=/branches/Version135/Scribus/CMakeLists.txt
==============================================================================
--- branches/Version135/Scribus/CMakeLists.txt (original)
+++ branches/Version135/Scribus/CMakeLists.txt Mon Feb 14 19:22:10 2011
@@ -466,6 +466,9 @@
 SET (QT_MIN_VERSION "4.6.0")
 IF (WANT_QT4MAC_COCOA)
   SET (QT_MAC_USE_COCOA TRUE)
+ELSE (WANT_QT4MAC_COCOA)
+  SET (HAVE_CARBON 1 CACHE TYPE BOOL)
+  ADD_DEFINITIONS("-DHAVE_CARBON=1")
 ENDIF (WANT_QT4MAC_COCOA)
 IF (WANT_QT3SUPPORT)
   SET (QT_USE_QT3SUPPORT TRUE)
@@ -685,6 +688,16 @@
   ENDIF (LIBPODOFO_FOUND)
 ENDIF (WITH_PODOFO)
 #>>PoDoFo for AI PDF import
+
+#<<HYPHEN for system hyphenation library
+FIND_PACKAGE(HYPHEN)
+IF(HYPHEN_FOUND)
+  MESSAGE("system hyphenation library found OK")
+  SET(HAVE_HYPHEN 1)
+ELSE(HYPHEN_FOUND)
+  MESSAGE("system hyphenation library NOT found - will use internal one")
+ENDIF(HYPHEN_FOUND)
+#>>HYPHEN for system hyphenation library
 
 ##############################################################################################################
 ########## Include Setup                                                                            ##########

Modified: branches/Version135/Scribus/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16358&path=/branches/Version135/Scribus/scribus/CMakeLists.txt
==============================================================================
--- branches/Version135/Scribus/scribus/CMakeLists.txt (original)
+++ branches/Version135/Scribus/scribus/CMakeLists.txt Mon Feb 14 19:22:10 2011
@@ -397,10 +397,8 @@
   guidesdelegate.cpp
   guidesmodel.cpp
   helpbrowser.cpp
-  hnjalloc.c
   hruler.cpp
   hyask.cpp
-  hyphen.c
   hyphenator.cpp
   hysettings.cpp
   imageinfodialog.cpp
@@ -635,6 +633,14 @@
   vruler.cpp
 )
 
+IF(NOT HAVE_HYPHEN)
+  SET(SCRIBUS_SOURCES
+    ${SCRIBUS_SOURCES}
+    hnjalloc.c
+    hyphen.c
+  )
+ENDIF(NOT HAVE_HYPHEN)
+
 IF(WIN32)
   SET(SCRIBUS_MOC_WIN32_ONLY_CLASSES scprintengine_gdi.h)
   SET(SCRIBUS_WIN32_ONLY_SOURCES
@@ -799,6 +805,12 @@
     ${LIBPODOFO_LIBRARY}
   )
 ENDIF(HAVE_PODOFO)
+
+IF(HAVE_HYPHEN)
+  TARGET_LINK_LIBRARIES(${EXE_NAME}
+    ${HYPHEN_LIBRARY}
+  )
+ENDIF(HAVE_HYPHEN)
 
 # Now build plugins
 SET(PLUGIN_LIBRARIES

Modified: branches/Version135/Scribus/scribus/hyphenator.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16358&path=/branches/Version135/Scribus/scribus/hyphenator.h
==============================================================================
--- branches/Version135/Scribus/scribus/hyphenator.h (original)
+++ branches/Version135/Scribus/scribus/hyphenator.h Mon Feb 14 19:22:10 2011
@@ -13,7 +13,7 @@
 #include <QSet>
 
 #include "scribusapi.h"
-#include "hyphen.h"
+#include <hyphen.h>
 class ScribusDoc;
 class ScribusMainWindow;
 class PageItem;




More information about the scribus-commit mailing list