1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 PYTHON_COMPAT=( python2_7 )
10 inherit autotools eutils gnome2 python-single-r1 multilib
12 DESCRIPTION="Diagram/flowchart creation program"
13 HOMEPAGE="https://wiki.gnome.org/Apps/Dia"
15 SRC_URI="https://dev.gentoo.org/~pacho/gnome/${PN}-0.97.3_pre20140417.tar.xz"
16 S="${WORKDIR}/${PN}-0.97.2"
20 KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
21 # the doc USE flag doesn't seem to do anything without docbook2html
22 # cairo support is preferred as explained by upstream at:
23 # https://bugzilla.gnome.org/show_bug.cgi?id=729668#c6
24 IUSE="+cairo doc python"
31 >=media-libs/freetype-2
32 >=media-libs/libart_lgpl-2
37 cairo? ( x11-libs/cairo )
39 app-text/docbook-xml-dtd:4.5
40 app-text/docbook-xsl-stylesheets )
49 doc? ( dev-libs/libxslt )"
52 use python && python-single-r1_pkg_setup
56 DOCS="AUTHORS ChangeLog KNOWN_BUGS MAINTAINERS NEWS README RELEASE-PROCESS THANKS TODO"
58 epatch "${FILESDIR}"/${PN}-0.97.0-gnome-doc.patch #159381 , upstream #470812 #558690
59 epatch "${FILESDIR}"/${PN}-0.97.2-underlinking.patch #420685
60 epatch "${FILESDIR}"/${PN}-0.97.2-disable-cairo.patch #509636
61 epatch "${FILESDIR}"/${PN}-0.97.2-png-crash.patch #508566
65 sed -i -e "s/\.so/$(get_libname)/" acinclude.m4 || die #298232
70 sed -i -e '/if HAVE_DB2MAN/,/endif/d' doc/*/Makefile.am || die
73 # Fix naming conflict on Darwin/OSX, upstream bug #????
74 sed -i -e 's/isspecial/char_isspecial/' objects/GRAFCET/boolequation.c || die
76 sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in || die
78 sed -i -e "/localedir/d" configure.in || die
85 # --exec-prefix makes Python look for modules in the Prefix
86 # --enable-gnome only adds support for deprecated stuff, bug #442294
87 # https://bugzilla.redhat.com/show_bug.cgi?id=996759
88 gnome2_src_configure \
89 --exec-prefix="${EPREFIX}/usr" \
92 $(use_enable doc db2html) \
102 # Install second desktop file for integrated mode (bug #415495)
103 sed -e 's|^Exec=dia|Exec=dia --integrated|' \
104 -e '/^Name/ s|$| (integrated mode)|' \
105 "${ED}"/usr/share/applications/dia.desktop \
106 > "${ED}"/usr/share/applications/dia-integrated.desktop || die