You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-office/scribus/files/scribus-1.3.5.1-system-hyph...

106 lines
3.7 KiB

diff -Nrup scribus-1.3.5.rc3.orig/cmake/modules/FindHYPHEN.cmake scribus-1.3.5.rc3/cmake/modules/FindHYPHEN.cmake
--- scribus-1.3.5.rc3.orig/cmake/modules/FindHYPHEN.cmake 1970-01-01 01:00:00.000000000 +0100
+++ scribus-1.3.5.rc3/cmake/modules/FindHYPHEN.cmake 2009-07-02 14:23:26.000000000 +0200
@@ -0,0 +1,28 @@
+# - Find HYPHEN library
+# Find the native HYPHEN includes and library
+# This module defines
+# HYPHEN_INCLUDE_DIR, where to find hyphen.h, etc.
+# HYPHEN_LIBRARIES, libraries to link against to use HYPHEN.
+# HYPHEN_FOUND, If false, do not try to use HYPHEN.
+# also defined, but not for general use are
+# HYPHEN_LIBRARY, where to find the HYPHEN library.
+
+FIND_PATH(HYPHEN_INCLUDE_DIR hyphen.h)
+
+SET(HYPHEN_NAMES_RELEASE ${HYPHEN_NAMES_RELEASE} ${HYPHEN_NAMES} hyphen libhyphen)
+SET(HYPHEN_NAMES_DEBUG ${HYPHEN_NAMES_DEBUG} hyphend libhyphend)
+
+FIND_LIBRARY(HYPHEN_LIBRARY_RELEASE NAMES ${HYPHEN_NAMES_RELEASE} )
+FIND_LIBRARY(HYPHEN_LIBRARY_DEBUG NAMES ${HYPHEN_NAMES_DEBUG} )
+
+INCLUDE(LibraryDebugAndRelease)
+SET_LIBRARY_FROM_DEBUG_AND_RELEASE(HYPHEN)
+
+# handle the QUIETLY and REQUIRED arguments and set HYPHEN_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(ScribusFindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(HYPHEN DEFAULT_MSG HYPHEN_LIBRARY HYPHEN_INCLUDE_DIR)
+
+IF(HYPHEN_FOUND)
+ SET( HYPHEN_LIBRARIES ${HYPHEN_LIBRARY} )
+ENDIF(HYPHEN_FOUND)
--- scribus-1.3.5.rc3.orig/CMakeLists.txt 2009-05-30 14:38:09.000000000 +0200
+++ scribus-1.3.5.rc3/CMakeLists.txt 2009-07-02 14:32:24.000000000 +0200
@@ -638,6 +638,16 @@ ELSE(LIBPODOFO_FOUND)
ENDIF(LIBPODOFO_FOUND)
#>>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 ##########
diff -Nrup -x CMakeFiles -x Makefile -x FindHYPHEN.cmake scribus-1.3.5.rc3.orig/scribus/CMakeLists.txt scribus-1.3.5.rc3/scribus/CMakeLists.txt
--- scribus-1.3.5.rc3.orig/scribus/CMakeLists.txt 2009-06-07 09:05:54.000000000 +0200
+++ scribus-1.3.5.rc3/scribus/CMakeLists.txt 2009-07-02 15:22:52.000000000 +0200
@@ -403,10 +403,8 @@ SET(SCRIBUS_SOURCES
guidesdelegate.cpp
guidesmodel.cpp
helpbrowser.cpp
- hnjalloc.c
hruler.cpp
hyask.cpp
- hyphen.c
hyphenator.cpp
hysettings.cpp
imageinfodialog.cpp
@@ -641,6 +639,14 @@ SET(SCRIBUS_SOURCES
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
@@ -785,6 +791,12 @@ IF(HAVE_PODOFO)
)
ENDIF(HAVE_PODOFO)
+IF(HAVE_HYPHEN)
+ TARGET_LINK_LIBRARIES(${EXE_NAME}
+ ${HYPHEN_LIBRARY}
+ )
+ENDIF(HAVE_HYPHEN)
+
# Now build plugins
SET(PLUGIN_LIBRARIES)
IF(WIN32)
diff -Nrup -x CMakeFiles -x Makefile -x '*.cmake' scribus-1.3.5.rc3.orig/scribus/hyphenator.h scribus-1.3.5.rc3/scribus/hyphenator.h
--- scribus-1.3.5.rc3.orig/scribus/hyphenator.h 2007-07-10 22:33:09.000000000 +0200
+++ scribus-1.3.5.rc3/scribus/hyphenator.h 2009-07-02 14:03:11.000000000 +0200
@@ -13,7 +13,7 @@ for which a new license (GPL+exception)
#include <QSet>
#include "scribusapi.h"
-#include "hyphen.h"
+#include <hyphen.h>
class ScribusDoc;
class ScribusMainWindow;
class PageItem;