commit:     73525eaa3d3b87962d64d606a883fc84569b6f8e
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 10:22:34 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 10:24:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73525eaa

app-office/scribus: in 1.6.1 squashed findhyphen patches and backported some 
patches from live

Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../scribus/files/scribus-1.6.1-findhyphen.patch   | 69 ++++++++++++++++++++++
 ...cribus-1.6.1.ebuild => scribus-1.6.1-r1.ebuild} | 21 ++-----
 2 files changed, 73 insertions(+), 17 deletions(-)

diff --git a/app-office/scribus/files/scribus-1.6.1-findhyphen.patch 
b/app-office/scribus/files/scribus-1.6.1-findhyphen.patch
new file mode 100644
index 000000000000..cc6e5db58a24
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.6.1-findhyphen.patch
@@ -0,0 +1,69 @@
+--- a/CMakeLists_Dependencies.cmake
++++ b/CMakeLists_Dependencies.cmake
+@@ -1,6 +1,16 @@
+ 
##############################################################################################################
+ ########## Find Dependencies                                                  
                      ##########
+ 
++#<<HYPHEN for Hyphenation support
++find_package(HYPHEN)
++if(HYPHEN_FOUND)
++      message("System Hyphen Found OK")
++      set(HAVE_HYPHEN ON)
++else()
++      message("Hyphen or its developer libraries NOT found - using bundled 
Hyphen instead")
++endif()
++#>>HYPHEN for Hyphenation support
++
+ #<<PoDoFo for AI PDF import
+ option(WITH_PODOFO "Enable support for PDF embedded in AI" ON)
+ if (WITH_PODOFO)
+--- a/scribus/CMakeLists.txt
++++ b/scribus/CMakeLists.txt
+@@ -585,7 +585,9 @@ set(SCRIBUS_SOURCES
+       ${SCRIBUS_GMAGICK_SRC}
+ )
+ 
+-if(NOT HAVE_HYPHEN)
++if(HAVE_HYPHEN)
++      include_directories(${HYPHEN_INCLUDE_DIR})
++else()
+       include_directories(third_party/hyphen)
+       set(SCRIBUS_SOURCES
+       ${SCRIBUS_SOURCES}
+@@ -676,12 +678,6 @@ if(HAVE_PODOFO)
+ 
+ endif()
+ 
+-if(HAVE_HYPHEN)
+-      target_link_libraries(${EXE_NAME} PRIVATE
+-      ${HYPHEN_LIBRARY}
+-      )
+-endif()
+-
+ 
+ if(GESTURE_FRAME_PREVIEW)
+        message(STATUS "Enable gesture frame preview [experimental]")
+@@ -741,6 +737,12 @@ if(WANT_PCH)
+       target_precompile_headers(${EXE_NAME} PRIVATE scribus_pch.h)
+ endif()
+ 
++if(HAVE_HYPHEN)
++      target_link_libraries(${EXE_NAME} PRIVATE
++      ${HYPHEN_LIBRARY}
++      )
++endif()
++
+ if(WIN32)
+       set_target_properties(${EXE_NAME}
+               PROPERTIES
+--- a/scribus/hyphenator.h
++++ b/scribus/hyphenator.h
+@@ -13,7 +13,7 @@ for which a new license (GPL+exception) is in place.
+ #include <QSet>
+ 
+ #include "scribusapi.h"
+-#include "third_party/hyphen/hyphen.h"
++#include <hyphen.h>
+ 
+ class ScribusDoc;
+ class ScribusMainWindow;

diff --git a/app-office/scribus/scribus-1.6.1.ebuild 
b/app-office/scribus/scribus-1.6.1-r1.ebuild
similarity index 88%
rename from app-office/scribus/scribus-1.6.1.ebuild
rename to app-office/scribus/scribus-1.6.1-r1.ebuild
index 23dca9517e2f..6a80b0653e02 100644
--- a/app-office/scribus/scribus-1.6.1.ebuild
+++ b/app-office/scribus/scribus-1.6.1-r1.ebuild
@@ -72,31 +72,18 @@ BDEPEND="
 "
 
 PATCHES=(
-       # non(?)-upstreamable
        "${FILESDIR}"/${PN}-1.5.8-cmake.patch # bug 886251
        "${FILESDIR}"/${PN}-1.5.3-fpic.patch
-       "${FILESDIR}"/${PN}-1.5.8-findhyphen-1.patch
-       "${FILESDIR}"/${PN}-1.5.6-findhyphen.patch
+       "${FILESDIR}"/${PN}-1.6.1-findhyphen.patch
+       "${FILESDIR}"/${PN}-1.7.0-remove-hello-world-test.patch
+       "${FILESDIR}"/${PN}-1.7.0-fix-icon-version.patch
 )
 
 src_prepare() {
        cmake_src_prepare
 
+       # for safety remove files that we patched out
        rm -r scribus/third_party/hyphen || die
-
-       sed \
-               -e "/^\s*unzip\.[ch]/d" \
-               -e "/^\s*ioapi\.[ch]/d" \
-               -i scribus/CMakeLists.txt Scribus.pro || die
-       rm scribus/ioapi.[ch] || die
-
-       sed \
-               -e 's:\(${CMAKE_INSTALL_PREFIX}\):./\1:g' \
-               -i resources/templates/CMakeLists.txt || die
-
-       sed \
-               -e "/^add_subdirectory(ui\/qml)/s/^/#DONT/" \
-               -i scribus/CMakeLists.txt || die # nothing but a bogus Hello 
World test
 }
 
 src_configure() {

Reply via email to