diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-03-24 15:31:41 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-03-24 15:32:03 +0100 |
commit | 36808ffac39c0c2f370e00173d09f4c669bcb827 (patch) | |
tree | 7bb0c5f70a9490a79cdb2390f0b0d92e3b1e908e | |
parent | dev-perl/Net-DNS: Bump to version 1.90.0 re bug #613720 (diff) | |
download | gentoo-36808ffac39c0c2f370e00173d09f4c669bcb827.tar.gz gentoo-36808ffac39c0c2f370e00173d09f4c669bcb827.tar.bz2 gentoo-36808ffac39c0c2f370e00173d09f4c669bcb827.zip |
media-gfx/xfig: Add patch for libpng-1.6 support from RH
Package-Manager: Portage-2.3.5, Repoman-2.3.2
-rw-r--r-- | media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch | 4 | ||||
-rw-r--r-- | media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch | 4 | ||||
-rw-r--r-- | media-gfx/xfig/files/xfig-3.2.5b-solaris.patch | 8 | ||||
-rw-r--r-- | media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch | 4 | ||||
-rw-r--r-- | media-gfx/xfig/files/xfig-3.2.5c-png16.patch | 18 | ||||
-rw-r--r-- | media-gfx/xfig/xfig-3.2.5c-r1.ebuild | 111 |
6 files changed, 139 insertions, 10 deletions
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch index d773da51b180..560ddef94ebb 100644 --- a/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch +++ b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch @@ -1,8 +1,8 @@ Defaults for xfig. Idea from Roland Rosenfeld <roland@debian.org> diff -urNad xfig~/Fig.ad xfig/Fig.ad ---- Fig.ad -+++ Fig.ad +--- a/Fig.ad ++++ b/Fig.ad @@ -10,13 +10,17 @@ ! some sample settings you may want to change diff --git a/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch index c672a27554da..931ac94e58a4 100644 --- a/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch +++ b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch @@ -3,8 +3,8 @@ Missed hunk noticed https://bugzilla.redhat.com/show_bug.cgi?id=505257#c1 is rec http://bugs.gentoo.org/show_bug.cgi?id=264575 === modified file 'u_print.c' ---- u_print.c 2010-01-14 19:50:08 +0000 -+++ u_print.c 2010-01-14 19:54:14 +0000 +--- a/u_print.c 2010-01-14 19:50:08 +0000 ++++ b/u_print.c 2010-01-14 19:54:14 +0000 @@ -202,14 +202,22 @@ char tmp_fig_file[PATH_MAX]; char *outfile, *name, *real_lang; diff --git a/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch index a295b5227f00..2e93a7faac26 100644 --- a/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch +++ b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch @@ -1,7 +1,7 @@ * workaround some missing things on Solaris ---- u_quartic.c -+++ u_quartic.c +--- a/u_quartic.c ++++ b/u_quartic.c @@ -21,4 +21,7 @@ #include <math.h> @@ -10,8 +10,8 @@ + #endif static int ---- w_intersect.c -+++ w_intersect.c +--- a/w_intersect.c ++++ b/w_intersect.c @@ -31,6 +31,11 @@ #define ISET_P1 (1 << 0) #define ISET_P2 (1 << 1) diff --git a/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch index 6a5c3dff949e..87ac63f838f8 100644 --- a/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch +++ b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch @@ -1,5 +1,5 @@ ---- u_fonts.c 2002-09-09 13:36:58.000000000 -0400 -+++ u_fonts.c 2006-10-11 00:29:07.000000000 -0400 +--- a/u_fonts.c 2002-09-09 13:36:58.000000000 -0400 ++++ b/u_fonts.c 2006-10-11 00:29:07.000000000 -0400 @@ -22,41 +22,41 @@ /* X11 font names */ diff --git a/media-gfx/xfig/files/xfig-3.2.5c-png16.patch b/media-gfx/xfig/files/xfig-3.2.5c-png16.patch new file mode 100644 index 000000000000..f7a426295d3c --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5c-png16.patch @@ -0,0 +1,18 @@ +Source: https://bugzilla.redhat.com/show_bug.cgi?id=1150330 + +From: David Kaufmann <astra@ionic.at> +Subject: Fix PNG reading + +--- a/f_readpng.c 2014-09-15 13:25:26.290813563 +0200 ++++ a/f_readpng.c 2014-09-15 14:04:10.241297027 +0200 +@@ -90,8 +90,8 @@ + png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, + &interlace_type, &compression_type, &filter_type); + +- png_fixed_point gamma = 0.45; +- png_get_gAMA_fixed(png_ptr,info_ptr,&gamma); ++ double gamma = 0.45455; ++ png_get_gAMA(png_ptr,info_ptr,&gamma); + png_set_gamma(png_ptr, 2.2, gamma); + + if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) { diff --git a/media-gfx/xfig/xfig-3.2.5c-r1.ebuild b/media-gfx/xfig/xfig-3.2.5c-r1.ebuild new file mode 100644 index 000000000000..bbe838eccc23 --- /dev/null +++ b/media-gfx/xfig/xfig-3.2.5c-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils multilib + +MY_P=${PN}.${PV} + +DESCRIPTION="A menu-driven tool to draw and manipulate objects interactively in an X window" +HOMEPAGE="http://www.xfig.org" +SRC_URI="mirror://sourceforge/mcj/${MY_P}.full.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="nls" + +RDEPEND="x11-libs/libXaw + x11-libs/libXp + x11-libs/libXaw3d + nls? ( x11-libs/libXaw3d[unicode] ) + x11-libs/libXi + x11-libs/libXt + virtual/jpeg:0= + media-libs/libpng:0= + media-fonts/font-misc-misc + media-fonts/urw-fonts + >=media-gfx/transfig-3.2.5-r1 + media-libs/netpbm" +DEPEND="${RDEPEND} + x11-misc/imake + x11-proto/xproto + x11-proto/inputproto" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}/${PN}-3.2.5c-spelling.patch" + "${FILESDIR}/${PN}-3.2.5b-papersize_b1.patch" + "${FILESDIR}/${PN}-3.2.5b-pdfimport_mediabox.patch" + "${FILESDIR}/${PN}-3.2.5b-network_images.patch" + "${FILESDIR}/${PN}-3.2.5b-app-defaults.patch" + "${FILESDIR}/${PN}-3.2.5b-urwfonts.patch" + "${FILESDIR}/${PN}-3.2.5b-mkstemp.patch" #264575 + "${FILESDIR}/${PN}-3.2.5c-darwin.patch" + "${FILESDIR}/${PN}-3.2.5b-solaris.patch" + "${FILESDIR}/${PN}-3.2.5c-XAW3D1_5E_notlocal.patch" + "${FILESDIR}/${PN}-3.2.5c-crash-on-exit.patch" + "${FILESDIR}/${PN}-3.2.5c-png16.patch" +) + +sed_Imakefile() { + # see Imakefile for details + vars2subs=( BINDIR="${EPREFIX}"/usr/bin + PNGINC=-I"${EPREFIX}"/usr/include + JPEGLIBDIR="${EPREFIX}"/usr/$(get_libdir) + JPEGINC=-I"${EPREFIX}"/usr/include + XPMLIBDIR="${EPREFIX}"/usr/$(get_libdir) + XPMINC=-I"${EPREFIX}"/usr/include/X11 + USEINLINE=-DUSE_INLINE + XFIGLIBDIR="${EPREFIX}"/usr/share/xfig + XFIGDOCDIR="${EPREFIX}/usr/share/doc/${PF}" + MANDIR="${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\)" + "CC=$(tc-getCC)" ) + + for variable in "${vars2subs[@]}" ; do + varname=${variable%%=*} + varval=${variable##*=} + sed -i \ + -e "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" \ + "$@" || die + done + if use nls; then + # XAW_INTERNATIONALIZATION fixes #405475 (comment 17) and #426780 by Markus Peloquin + sed -i \ + -e "s:^\(XCOMM\)*[[:space:]]*\(#define I18N\).*$:\2:" \ + -e "s:^\(XCOMM\)*[[:space:]]*\(XAW_INTERN = -DXAW_INTERNATIONALIZATION\).*$:\2:" \ + "$@" || die + fi + sed -i -e "s:^\(XCOMM\)*[[:space:]]*\(#define XAW3D1_5E\).*$:\2:" "$@" || die +} + +src_prepare() { + # Permissions are really crazy here + chmod -R go+rX . || die + find . -type f -exec chmod a-x '{}' \; || die + + default + + sed_Imakefile Imakefile + sed -e "s:/usr/lib/X11/xfig:${EPREFIX}/usr/share/doc/${PF}:" \ + -i Doc/xfig.man || die +} + +src_compile() { + local EXTCFLAGS=${CFLAGS} + xmkmf || die + [[ ${CHOST} == *-solaris* ]] && EXTCFLAGS="${EXTCFLAGS} -D_POSIX_SOURCE" + emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${EXTCFLAGS}" \ + USRLIBDIR="${EPREFIX}"/usr/$(get_libdir) +} + +src_install() { + emake -j1 DESTDIR="${D}" install install.libs install.man + + dodoc README FIGAPPS CHANGES LATEX.AND.XFIG + + doicon xfig.png + make_desktop_entry xfig Xfig xfig +} |