/[gentoo-x86]/app-office/scribus/scribus-1.4.9999.ebuild
Gentoo

Contents of /app-office/scribus/scribus-1.4.9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Apr 30 07:45:10 2012 UTC (2 years, 4 months ago) by jlec
Branch: MAIN
Changes since 1.1: +13 -6 lines
app-office/scribus: Move changes to live version

(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-office/scribus/scribus-1.4.9999.ebuild,v 1.1 2012/02/13 10:55:47 jlec Exp $
4
5 EAPI=4
6
7 PYTHON_DEPEND="2"
8
9 inherit cmake-utils fdo-mime multilib python subversion
10
11 DESCRIPTION="Desktop publishing (DTP) and layout program"
12 HOMEPAGE="http://www.scribus.net/"
13 #SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
14 SRC_URI=""
15 ESVN_REPO_URI="svn://scribus.net/branches/Version14x/Scribus"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS=""
20 IUSE="cairo debug examples +minimal +pdf spell templates"
21
22 # a=$(ls resources/translations/po/scribus.*ts | sed -e 's:\.: :g' | awk '{print $2}'); echo ${a}
23 IUSE_LINGUAS=" af ar bg br ca cs_CZ cy da_DK de_1901 de_CH de el en_AU en_GB en_US es_ES et eu fi fr gl hu id it ja ko lt_LT nb_NO nl pl_PL pt_BR pt ru sa sk_SK sl sq sr sv th_TH tr uk zh_CN zh_TW"
24 IUSE+=" ${IUSE_LINGUAS// / linguas_}"
25
26 COMMON_DEPEND="
27 dev-libs/hyphen
28 dev-libs/libxml2
29 media-libs/fontconfig
30 media-libs/freetype:2
31 media-libs/lcms:2
32 media-libs/libpng:0
33 media-libs/tiff:0
34 net-print/cups
35 sys-libs/zlib[minizip]
36 x11-libs/qt-core:4
37 x11-libs/qt-gui:4
38 virtual/jpeg
39 spell? ( app-text/aspell )
40 pdf? ( app-text/podofo )
41 cairo? ( x11-libs/cairo[X,svg] )"
42 RDEPEND="${COMMON_DEPEND}
43 app-text/ghostscript-gpl"
44 DEPEND="${COMMON_DEPEND}
45 dev-libs/boost"
46
47 PATCHES=(
48 "${FILESDIR}"/${PN}-1.4.0_rc5-docs.patch
49 "${FILESDIR}"/${PN}-1.4.0-minizip.patch
50 )
51
52 pkg_setup() {
53 python_set_active_version 2
54 python_pkg_setup
55 }
56
57 src_prepare() {
58 cat > cmake/modules/FindZLIB.cmake <<- EOF
59 find_package(PkgConfig)
60 pkg_check_modules(ZLIB minizip zlib)
61 SET( ZLIB_LIBRARY \${ZLIB_LIBRARIES} )
62 SET( ZLIB_INCLUDE_DIR \${ZLIB_INCLUDE_DIRS} )
63 MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
64 EOF
65
66 rm scribus/{ioapi,unzip}.[ch] || die
67
68 if use templates; then
69 sed '/ADD_SUBDIRECTORY(resources\/templates)/d' -i CMakeLists.txt || die
70 fi
71 if use examples; then
72 sed '/ADD_SUBDIRECTORY(samples)/d' -i scribus/plugins/scriptplugin/CMakeLists.txt || die
73 fi
74
75 base_src_prepare
76 subversion_src_prepare
77 }
78
79 src_configure() {
80 local lang langs
81 for lang in ${IUSE_LINGUAS}; do
82 use linguas_${lang} && langs+=",${lang}"
83 done
84
85 local mycmakeargs=(
86 -DHAVE_PYTHON=ON
87 -DPYTHON_INCLUDE_PATH=$(python_get_includedir)
88 -DPYTHON_LIBRARY=$(python_get_library)
89 -DWANT_NORPATH=ON
90 -DWANT_QTARTHUR=ON
91 -DWANT_QT3SUPPORT=OFF
92 -DGENTOOVERSION=${PVR}
93 -DWANT_GUI_LANG=${langs#,}
94 $(cmake-utils_use_has spell ASPELL)
95 $(cmake-utils_use_has pdf PODOFO)
96 $(cmake-utils_use_want cairo)
97 $(cmake-utils_use_want minimal NOHEADERINSTALL)
98 $(cmake-utils_use_want debug DEBUG)
99 )
100 cmake-utils_src_configure
101 }
102
103 src_install() {
104 cmake-utils_src_install
105
106 mv "${ED}"/usr/share/doc/${PF}/{en,html} || die
107 ln -sf html "${ED}"/usr/share/doc/${PF}/en || die
108 docompress -x /usr/share/doc/${PF}/en
109 doicon resources/icons/scribus.png
110 domenu scribus.desktop
111 }
112
113 pkg_preinst() {
114 # 399595
115 rm -vf "${ED}"/usr/share/doc/${PF}/en* || die
116 ln -sf html "${ED}"/usr/share/doc/${PF}/en
117 subversion_pkg_preinst
118 }
119
120 pkg_postinst() {
121 fdo-mime_mime_database_update
122 }
123
124 pkg_postrm() {
125 fdo-mime_mime_database_update
126 }

  ViewVC Help
Powered by ViewVC 1.1.20