diff options
author | Viorel Munteanu <ceamac.paragon@gmail.com> | 2022-07-28 22:40:03 +0300 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-08-10 16:27:54 +0300 |
commit | 1c1339a568ac96ddddca18fc8c46de1882cc3d74 (patch) | |
tree | e24f6f4814b01fa83dd9bddd2deb4f9216a9e359 /media-gfx/xpaint | |
parent | x11-libs/libXaw3dXft: fix pkg-config Version (diff) | |
download | gentoo-1c1339a568ac96ddddca18fc8c46de1882cc3d74.tar.gz gentoo-1c1339a568ac96ddddca18fc8c46de1882cc3d74.tar.bz2 gentoo-1c1339a568ac96ddddca18fc8c46de1882cc3d74.zip |
media-gfx/xpaint: fix compilation with lto
Closes: https://bugs.gentoo.org/859820
Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26638
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-gfx/xpaint')
-rw-r--r-- | media-gfx/xpaint/files/xpaint-3.1.4-gentoo-lto.patch | 27 | ||||
-rw-r--r-- | media-gfx/xpaint/xpaint-3.1.4-r1.ebuild | 87 |
2 files changed, 114 insertions, 0 deletions
diff --git a/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-lto.patch b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-lto.patch new file mode 100644 index 000000000000..abdb51967fbc --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.4-gentoo-lto.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/859820 + +dynFinish is declared as double, but always used as int (actually Boolean). + +--- a/dynPenOp.c ++++ b/dynPenOp.c +@@ -35,7 +35,8 @@ + + #define XTIMEOUT 20 + +-double dynWidth = 10, dynMass = 600, dynDrag = 15, dynFinish = 0; ++double dynWidth = 10, dynMass = 600, dynDrag = 15; ++Boolean dynFinish = 0; + + typedef struct { + double startx, starty; +--- a/ops.h ++++ b/ops.h +@@ -26,7 +26,7 @@ + extern double tickSize, tickAngle; + extern double brushOpacity; + extern double dynWidth, dynMass, dynDrag; +-extern int dynFinish; ++extern Boolean dynFinish; + extern int sprayRadius, sprayDensity, sprayRate; + extern int boxSize; + extern double boxRatio; diff --git a/media-gfx/xpaint/xpaint-3.1.4-r1.ebuild b/media-gfx/xpaint/xpaint-3.1.4-r1.ebuild new file mode 100644 index 000000000000..65557236f490 --- /dev/null +++ b/media-gfx/xpaint/xpaint-3.1.4-r1.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop toolchain-funcs xdg + +DESCRIPTION="Image editor with tiff, jpeg and png support" +HOMEPAGE="http://sf-xpaint.sourceforge.net/" +SRC_URI="mirror://sourceforge/sf-xpaint/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pgf tiff" +# jpeg2k disabled for blocking media-libs/openjpeg:0 security cleanup, bug 735592 + +RDEPEND=" + media-libs/fontconfig + media-libs/libjpeg-turbo:= + media-libs/libpng:0= + media-libs/netpbm + x11-libs/libX11 + >=x11-libs/libXaw3dXft-1.6.2h[unicode] + x11-libs/libXext + x11-libs/libXft + x11-libs/libXmu + x11-libs/libXpm + x11-libs/libXt + pgf? ( media-libs/libpgf ) + tiff? ( media-libs/tiff:0 ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-3.1.3-libtool-clang.patch + "${FILESDIR}"/${PN}-3.1.3-gentoo-qa.patch + "${FILESDIR}"/${PN}-3.1.3-gentoo-prefix.patch + "${FILESDIR}"/${P}-gentoo-shared-lib.patch + "${FILESDIR}"/${P}-gentoo-lto.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable tiff) \ + --disable-libdvipgm \ + --disable-libopenjpeg +} + +src_compile() { + # clean up + emake clean + emake -C util clean + + # parallel make still fails sometimes + emake substads + emake xpaint.1 + + default + emake \ + WITH_PGF="$(usex pgf "yes" "no")" \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + includedir="${EPREFIX}"/usr/include \ + -C util +} + +src_install() { + default + emake \ + WITH_PGF="$(usex pgf "yes" "no")" \ + DESTDIR="${ED}" \ + -C util install + doicon icons/xpaint.svg + make_desktop_entry "${PN}" + find "${ED}" -name '*.la' -delete || die +} |