summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2022-08-27 08:54:45 -0400
committerMatt Turner <mattst88@gentoo.org>2022-08-27 11:29:37 -0400
commit2a48d4e4bce4431bd68ead902a4042e9877c9ff6 (patch)
tree4e9dab860a96a8bdcaf789c5dd3429547ab17e88 /media-gfx/xfig
parentapp-text/gv: Version bump to 3.7.4 (diff)
downloadgentoo-2a48d4e4bce4431bd68ead902a4042e9877c9ff6.tar.gz
gentoo-2a48d4e4bce4431bd68ead902a4042e9877c9ff6.tar.bz2
gentoo-2a48d4e4bce4431bd68ead902a4042e9877c9ff6.zip
media-gfx/xfig: Version bump to 3.2.8b
* Bump to EAPI=8 * Move media-libs/netpbm from DEPEND/RDEPEND to optfeature * Remove unneeded dependencies: x11-libs/libXaw, x11-libs/libXi * Add needed dependencies: media-libs/tiff, x11-libs/libX11, x11-libs/libXpm * Remove IUSE="jpeg" and IUSE="postscript", as they're always enabled upstream now. * Remove IUSE="nls" and add (+) to x11-libs/libXaw3d's unicode USE-dep * Switch from virtual/jpeg to media-libs/libjpeg-turbo * Add patch to build with -lflto Bug: https://bugs.gentoo.org/807784 Closes: https://bugs.gentoo.org/761424 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-gfx/xfig')
-rw-r--r--media-gfx/xfig/Manifest1
-rw-r--r--media-gfx/xfig/files/xfig-3.2.8b-Fix-build-with-flto.patch62
-rw-r--r--media-gfx/xfig/files/xfig-3.2.8b-app-defaults.patch14
-rw-r--r--media-gfx/xfig/xfig-3.2.8b.ebuild52
4 files changed, 129 insertions, 0 deletions
diff --git a/media-gfx/xfig/Manifest b/media-gfx/xfig/Manifest
index 46a43488a86d..80f26b1cdbf9 100644
--- a/media-gfx/xfig/Manifest
+++ b/media-gfx/xfig/Manifest
@@ -1 +1,2 @@
DIST xfig-3.2.7b.tar.xz 5059984 BLAKE2B a22465e16019e9887e302ea308e250ad5d7ba0c49aec8f554a73d3b4489d803a05041cb7d267c543a7c0d3b78eac25077c628283f82767932afcc9d9750ce883 SHA512 f3396ebf8a5961909e58b05b60117fd7bbc8c24fabbd47f108eaea9586f4180af572faffe077b1a5dcbf669ebd69b1c2791f302c126dea62a44aa1592de66f73
+DIST xfig-3.2.8b.tar.xz 5382524 BLAKE2B 94963d165664c6451776fcbc3e332a7933c00d4b43e3d4196f15883a9873171f7a0791e6fa41cbb6e8d07958f9ddcceb9578a62a9893cf2f436c07dcbe3e7f37 SHA512 5cc5e61977f97956baca77bf4bce09d0f47ea6fafb10055d0523f7cccd72d7af80e706daa62ae16df3fc54338b4f6cd4a6b71dc460311e65be749ec84fa662b3
diff --git a/media-gfx/xfig/files/xfig-3.2.8b-Fix-build-with-flto.patch b/media-gfx/xfig/files/xfig-3.2.8b-Fix-build-with-flto.patch
new file mode 100644
index 000000000000..344d4df06e69
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.8b-Fix-build-with-flto.patch
@@ -0,0 +1,62 @@
+https://sourceforge.net/p/mcj/tickets/149/
+
+From 938c4089e6cc09e6e327f15d622c064865f837ae Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Sat, 27 Aug 2022 09:14:55 -0400
+Subject: [PATCH] Fix build with -flto
+
+With CFLAGS="-lflto" the tests fail to build because main() is
+redeclared with a different type:
+
+../src/main.c:651:1: error: type of ‘main’ does not match original declaration [-Werror=lto-type-mismatch]
+ 651 | main(int argc, char **argv)
+ | ^
+test1.c:47:1: note: type mismatch in parameter 1
+ 47 | main(void)
+ | ^
+test1.c:47:1: note: type ‘void’ should match type ‘int’
+test1.c:47:1: note: ‘main’ was previously declared here
+
+Simply change the definitions of main() in the tests to match
+the one in src/main.c.
+---
+ tests/test1.c | 4 +++-
+ tests/test2.c | 4 +++-
+ tests/test4.c | 4 +++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test1.c b/tests/test1.c
+index 83cf930..da76dd7 100644
+--- a/tests/test1.c
++++ b/tests/test1.c
+@@ -44,8 +44,10 @@ round_coords(int *x, int *y)
+ }
+
+ int
+-main(void)
++main(int argc, char *argv[])
+ {
++ (void) argc;
++ (void) argv;
+ int errcode = 0;
+
+ cur_pointposn = 2; /* == P_GRID1, see mode.h */
+diff --git a/tests/test2.c b/tests/test2.c
+index ab3b434..02e919c 100644
+--- a/tests/test2.c
++++ b/tests/test2.c
+@@ -77,8 +77,10 @@ compare(int xc, int yc, int n, int pts[n][2])
+ }
+
+ int
+-main(void)
++main(int argc, char *argv[])
+ {
++ (void) argc;
++ (void) argv;
+ int x, y, yspacing, xc, yc, dist, xdist;
+ int error = 0;
+ int pts_square[2][2];
+--
+2.35.1
+
diff --git a/media-gfx/xfig/files/xfig-3.2.8b-app-defaults.patch b/media-gfx/xfig/files/xfig-3.2.8b-app-defaults.patch
new file mode 100644
index 000000000000..3ca0f99963ac
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.8b-app-defaults.patch
@@ -0,0 +1,14 @@
+diff -ruN xfig-3.2.8b.orig/app-defaults/Fig xfig-3.2.6a/app-defaults/Fig
+--- xfig-3.2.8b.orig/app-defaults/Fig.in 2017-01-10 00:27:39.000000000 +0100
++++ xfig-3.2.8b/app-defaults/Fig.in 2017-03-24 16:22:14.702253419 +0100
+@@ -10,6 +10,10 @@
+
+ ! some sample settings you may want to change
+
++! If the following resource is set to false, xfig will use metric units
++! by default.
++Fig.inches: false
++
+ ! The following fixes a problem that some window managers have
+ ! with xfig continually resizing itself
+
diff --git a/media-gfx/xfig/xfig-3.2.8b.ebuild b/media-gfx/xfig/xfig-3.2.8b.ebuild
new file mode 100644
index 000000000000..e25f69b210d0
--- /dev/null
+++ b/media-gfx/xfig/xfig-3.2.8b.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 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="http://mcj.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/mcj/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
+
+COMMON_DEPEND="
+ app-text/ghostscript-gpl:=
+ >=media-gfx/transfig-3.2.5-r1
+ media-libs/libjpeg-turbo:0=
+ media-libs/libpng:0=
+ media-libs/tiff
+ x11-libs/libX11
+ x11-libs/libXaw3d[unicode(+)]
+ 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-urwfonts.patch"
+ "${FILESDIR}/${PN}-3.2.6a-solaris.patch"
+ "${FILESDIR}/${PN}-3.2.8b-app-defaults.patch"
+ "${FILESDIR}/${PN}-3.2.8b-Fix-build-with-flto.patch"
+)
+
+src_configure() {
+ local myeconfargs=(
+ --enable-i18n
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}" # it expects docdir...
+ )
+ econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+ optfeature "GIF support" media-libs/netpbm virtual/imagemagick-tools
+}