summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-10-01 22:13:17 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-10-02 01:43:03 +0200
commit1c9a7b1068756fc7ae6b52febaaf850a481b8ad3 (patch)
treee413b20ce64a4d32f987d5a7c87bdda44b9113a2
parentapp-text/poppler: 0.81.0 version bump (diff)
downloadgentoo-1c9a7b1068756fc7ae6b52febaaf850a481b8ad3.tar.gz
gentoo-1c9a7b1068756fc7ae6b52febaaf850a481b8ad3.tar.bz2
gentoo-1c9a7b1068756fc7ae6b52febaaf850a481b8ad3.zip
app-office/scribus: 1.5.5 version bump, EAPI-7 bump
Drop L10N hacks Fix build against system dev-libs/hyphen, drop bundled Install bigger icon Set USE +templates by default Closes: https://bugs.gentoo.org/692280 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--app-office/scribus/Manifest1
-rw-r--r--app-office/scribus/files/scribus-1.5.5-findhyphen.patch70
-rw-r--r--app-office/scribus/scribus-1.5.5.ebuild156
3 files changed, 227 insertions, 0 deletions
diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest
index 3734ddc121f..bc1bb961c1a 100644
--- a/app-office/scribus/Manifest
+++ b/app-office/scribus/Manifest
@@ -1 +1,2 @@
+DIST scribus-1.5.5.tar.xz 73861836 BLAKE2B 1a10878eaba67116d72c20d8ecd8952764c709ad14d575e4eb921b4f8a7c4525b73e6722f610b1cce57c08540f619d6ebd3d32e04b653b310e475026c185561b SHA512 2d62424ad609296df33ced550940fceb4e15133a595a740cc4f4b4ffbc92aa31737336ac7716c2eed20d2866e37f5a9b780a44d86128daa6bbad3ccb58168b50
DIST scribus-1.5.5_pre20190429.tar.gz 85838093 BLAKE2B 4ffdc6356b5a2c7372bf6395847f348e7c56276d39114fa5691b6c7f8345aa89a0efe221adbbf1d431d89208fae53ae211c5298d9406487d46ddf98dd69d8c1a SHA512 1aa76491560848dccbeb17f03ba4ac24d6045881f6f92f31b921cf1a91c051176b835d86e0c46046e73573bf60b330e07945c279c077a7619bf2ee9331ca9324
diff --git a/app-office/scribus/files/scribus-1.5.5-findhyphen.patch b/app-office/scribus/files/scribus-1.5.5-findhyphen.patch
new file mode 100644
index 00000000000..13c168c51f5
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.5.5-findhyphen.patch
@@ -0,0 +1,70 @@
+--- a/CMakeLists.txt 2019-07-31 00:34:43.000000000 +0200
++++ b/CMakeLists.txt 2019-10-02 00:17:34.968355656 +0200
+@@ -954,6 +954,16 @@
+ endif()
+ #>>HUNSPELL for Speelling support
+
++#<<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 2019-10-02 00:25:01.194386515 +0200
++++ b/scribus/CMakeLists.txt 2019-10-02 00:26:23.584392213 +0200
+@@ -1069,7 +1069,9 @@
+ ${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}
+@@ -1180,13 +1182,6 @@
+
+ endif()
+
+-if(HAVE_HYPHEN)
+- target_link_libraries(${EXE_NAME}
+- ${HYPHEN_LIBRARY}
+- )
+-endif()
+-
+-
+ if(GESTURE_FRAME_PREVIEW)
+ message(STATUS "Enable gesture frame preview [experimental]")
+ set(GESTURE_FRAME_PREVIEW_SOURCES pageitempreview.cpp)
+@@ -1234,6 +1229,12 @@
+ )
+ endif ()
+
++if(HAVE_HYPHEN)
++ target_link_libraries(${EXE_NAME}
++ ${HYPHEN_LIBRARY}
++ )
++endif()
++
+ if(WIN32)
+ set_target_properties(${EXE_NAME}
+ PROPERTIES
+--- a/scribus/hyphenator.h 2019-07-31 00:35:05.000000000 +0200
++++ b/scribus/hyphenator.h 2019-10-02 00:00:42.497285638 +0200
+@@ -13,7 +13,7 @@
+ #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.5.5.ebuild b/app-office/scribus/scribus-1.5.5.ebuild
new file mode 100644
index 00000000000..576abf23fb5
--- /dev/null
+++ b/app-office/scribus/scribus-1.5.5.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk?"
+inherit cmake-utils desktop flag-o-matic python-single-r1 xdg
+
+DESCRIPTION="Desktop publishing (DTP) and layout program"
+HOMEPAGE="https://www.scribus.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}-devel/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="+boost debug examples graphicsmagick hunspell +minimal osg +pdf scripts +templates tk"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ tk? ( scripts )"
+
+# osg
+# couple of third_party libs bundled
+BDEPEND="
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig
+"
+DEPEND="${PYTHON_DEPS}
+ app-text/libmspub
+ app-text/libqxp
+ app-text/poppler:=
+ dev-libs/hyphen
+ >=dev-libs/icu-58.2:0=
+ dev-libs/librevenge
+ dev-libs/libxml2
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5[-gles2]
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ media-libs/fontconfig
+ media-libs/freetype:2
+ >=media-libs/harfbuzz-0.9.42:0=[icu]
+ media-libs/lcms:2
+ media-libs/libcdr
+ media-libs/libfreehand
+ media-libs/libpagemaker
+ media-libs/libpng:0=
+ media-libs/libvisio
+ media-libs/libzmf
+ media-libs/tiff:0
+ net-print/cups
+ sys-libs/zlib[minizip]
+ virtual/jpeg:0=
+ >=x11-libs/cairo-1.10.0[X,svg]
+ boost? ( >=dev-libs/boost-1.67:= )
+ hunspell? ( app-text/hunspell:= )
+ graphicsmagick? ( media-gfx/graphicsmagick:= )
+ osg? ( dev-games/openscenegraph:= )
+ pdf? ( app-text/podofo:0= )
+ scripts? ( dev-python/pillow[tk?,${PYTHON_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+ app-text/ghostscript-gpl
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.3-fpic.patch
+ "${FILESDIR}"/${P}-docdir.patch
+ "${FILESDIR}"/${P}-findhyphen.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ rm -r codegen/cheetah scribus/third_party/hyphen || die
+
+ cat > cmake/modules/FindZLIB.cmake <<- EOF || die
+ find_package(PkgConfig)
+ pkg_check_modules(ZLIB minizip zlib)
+ SET( ZLIB_LIBRARY \${ZLIB_LIBRARIES} )
+ SET( ZLIB_INCLUDE_DIR \${ZLIB_INCLUDE_DIRS} )
+ MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
+ EOF
+ 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() {
+ # bug #550818
+ append-cppflags -DHAVE_MEMRCHR
+
+ local mycmakeargs=(
+ -DHAVE_PYTHON=ON
+ -DPYTHON_INCLUDE_PATH=$(python_get_includedir)
+ -DPYTHON_LIBRARY=$(python_get_library_path)
+ -DWANT_DISTROBUILD=ON
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}/
+ -DWITH_BOOST=$(usex boost)
+ -DWANT_DEBUG=$(usex debug)
+ -DWANT_NOEXAMPLES=$(usex !examples)
+ -DWANT_GRAPHICSMAGICK=$(usex graphicsmagick)
+ -DWANT_HUNSPELL=$(usex hunspell)
+ -DWANT_HEADERINSTALL=$(usex !minimal)
+ -DWANT_NOOSG=$(usex !osg)
+ -DWITH_PODOFO=$(usex pdf)
+ -DWANT_NOTEMPLATES=$(usex !templates)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use tk; then
+ rm "${ED}"/usr/share/scribus/scripts/{FontSample,CalendarWizard}.py || die
+ fi
+ if use scripts; then
+ python_fix_shebang "${ED}"/usr/share/scribus/scripts
+ python_optimize "${ED}"/usr/share/scribus/scripts
+ else
+ rm "${ED}"/usr/share/scribus/scripts/*.py || die
+ fi
+
+ mv "${ED}"/usr/share/doc/${PF}/{en,html} || die
+ ln -sf html "${ED}"/usr/share/doc/${PF}/en || die
+
+ # These files are parsed to populate the help/about window.
+ cat >> "${T}"/COPYING <<- EOF || die
+ ${PN} is licensed under the "${LICENSE}".
+ Please visit https://www.gnu.org/licenses/gpl-2.0.html for the complete license text.
+ EOF
+ dodoc "${T}"/COPYING
+ docompress -x /usr/share/doc/${PF}/en /usr/share/doc/${PF}/{AUTHORS,TRANSLATION,LINKS,COPYING}
+
+ local size
+ for size in 16 32 128 256 512; do
+ newicon -s $size resources/iconsets/artwork/icon_${size}x${size}.png scribus.png
+ done
+ newicon -s 64 resources/iconsets/artwork/icon_32x32@2x.png scribus.png
+ doicon resources/iconsets/*/scribus.png
+ domenu scribus.desktop
+}