commit:     36da1b6bdd3194bc27903089ce07d1b8fb7e2996
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Fri May 23 15:14:10 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 25 08:21:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36da1b6b

media-gfx/xfig: fix modern C issues

Closes: https://bugs.gentoo.org/946838
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Part-of: https://github.com/gentoo/gentoo/pull/42229
Closes: https://github.com/gentoo/gentoo/pull/42229
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/xfig/Manifest              |  1 +
 media-gfx/xfig/xfig-3.2.9a-r1.ebuild | 56 ++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/media-gfx/xfig/Manifest b/media-gfx/xfig/Manifest
index 7386dbde3c67..352e28949bda 100644
--- a/media-gfx/xfig/Manifest
+++ b/media-gfx/xfig/Manifest
@@ -1,2 +1,3 @@
 DIST xfig-3.2.9.tar.xz 5368544 BLAKE2B 
6fd04d7238453d304a5e9624524f1e3674fe21ea3485d0925fa430a6312b61019a54397301cd7773565035cd3aee7fa130ed2459187241a778c0d44759c57d45
 SHA512 
c5e797b394740761a24e6e5e83d025dd78a11ad7d12662728c708218d7131d9077d9ed0c09023134ed9d709c58f52f5c9182e5b50e540b1876be4c359d79a60e
+DIST xfig-3.2.9a-modern-c.patch 282452 BLAKE2B 
1c84eb051030fffa31959fe7f3496396da63ba6588cd45fbec04c036ed322692d02422e3ec20b812bf2ea557730a1f8c2a26b7911cb06b56589d6b8a0dd3d377
 SHA512 
a28696c295e26ce261189b01a82278684dd4af1d64b591cfa22993dee46a55de8612ef36f52223d930279db671b6e1373a04cd16c67c3a55de0bd2f1c6a3c975
 DIST xfig-3.2.9a.tar.xz 5366180 BLAKE2B 
e80fc8dc3365f5bf686d4ec45cdf92bea5a81eaae6d095665f155714a0381d3ab27f3c0caf785f602679650ee107fcc4c88a9abcf56ac1ba8f5f63e34b858500
 SHA512 
0a4cc4901cc8a56549c8145241011cb9e5d461a90975924897696d2b05f4a83c195f006c6b4b1270cf683883c967e0ace3a9f0b023a031d77e9492b41ee4f896

diff --git a/media-gfx/xfig/xfig-3.2.9a-r1.ebuild 
b/media-gfx/xfig/xfig-3.2.9a-r1.ebuild
new file mode 100644
index 000000000000..b31c834f71fb
--- /dev/null
+++ b/media-gfx/xfig/xfig-3.2.9a-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit optfeature xdg
+
+DESCRIPTION="A menu-driven tool to draw and manipulate objects interactively 
in an X window"
+HOMEPAGE="https://mcj.sourceforge.net/";
+SRC_URI="
+       https://downloads.sourceforge.net/project/mcj/${P}.tar.xz
+       
https://www-user.tu-chemnitz.de/~hamari/distfiles/xfig-3.2.9a-modern-c.patch
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux 
~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+COMMON_DEPEND="
+       app-text/ghostscript-gpl:=
+       >=media-gfx/fig2dev-${PV}
+       media-libs/libjpeg-turbo:=
+       media-libs/libpng:=
+       media-libs/tiff:=
+       x11-libs/libX11
+       x11-libs/libXaw3d[unicode(+)]
+       x11-libs/libXft
+       x11-libs/libXpm
+       x11-libs/libXt
+"
+DEPEND="${COMMON_DEPEND}
+       x11-base/xorg-proto
+"
+RDEPEND="${COMMON_DEPEND}
+       media-fonts/font-misc-misc
+       media-fonts/urw-fonts
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-3.2.6a-solaris.patch"
+       "${FILESDIR}/${PN}-3.2.9-app-defaults.patch"
+       "${DISTDIR}/${P}-modern-c.patch"
+)
+
+src_configure() {
+       local myeconfargs=(
+               --htmldir="${EPREFIX}/usr/share/doc/${PF}" # it expects 
docdir...
+       )
+       econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       optfeature "GIF support" media-libs/netpbm virtual/imagemagick-tools
+}

Reply via email to