diff options
author | Hans de Graaff <graaff@gentoo.org> | 2023-10-15 10:44:46 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2023-10-15 10:45:55 +0200 |
commit | 5250adb89535b8d738d6c14f80e375b0657bc9de (patch) | |
tree | 46ddedef2a81da8e90ba308425f56f632114fc6f /media-gfx | |
parent | media-gfx/transfig: avoid file collision (diff) | |
download | gentoo-5250adb89535b8d738d6c14f80e375b0657bc9de.tar.gz gentoo-5250adb89535b8d738d6c14f80e375b0657bc9de.tar.bz2 gentoo-5250adb89535b8d738d6c14f80e375b0657bc9de.zip |
media-gfx/fig2dev: new package, add 3.2.9
Upstream renamed transfig to fig2dev.
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/fig2dev/Manifest | 2 | ||||
-rw-r--r-- | media-gfx/fig2dev/fig2dev-3.2.9.ebuild | 105 | ||||
-rw-r--r-- | media-gfx/fig2dev/files/transfig-3.2.5e-clang.patch | 12 | ||||
-rw-r--r-- | media-gfx/fig2dev/files/transfig-3.2.5e-gcc10-fno-common.patch | 30 | ||||
-rw-r--r-- | media-gfx/fig2dev/metadata.xml | 8 |
5 files changed, 157 insertions, 0 deletions
diff --git a/media-gfx/fig2dev/Manifest b/media-gfx/fig2dev/Manifest new file mode 100644 index 000000000000..b56d9caad949 --- /dev/null +++ b/media-gfx/fig2dev/Manifest @@ -0,0 +1,2 @@ +DIST fig2dev-3.2.9.tar.xz 529892 BLAKE2B d6b4f84f89f85b282e2e02a3a4129ab8c9f67b3376b670fb553fc89347bf2552bfc3b3bfc4d4a4a35da7f9e5659f6f6fdf5a1fb4f82fb87d140dc09d079d9ffa SHA512 4a92539d79027c73cd9fa53d7e960db40ae5616d3197023a98346de4727cd70b28cd7d64ba33063dbe3dcacada7e97bb0e0c595547781a4244aea8c75d43f406 +DIST fig2mpdf-1.1.2.tar.bz2 191438 BLAKE2B 411791fecf6e10aac92c004c7da69a10c97a6e12f811452f12d0b51b3a1eeff8fff97d831a5e64c9047855d27e6825a4e65f62be2536651e5876edd00cc822a9 SHA512 36dea40008371386b47a4451e2f311cc2540ab063e3b61e628a535775d62a8840c5cc20c37b80465184bf041c6e583aaf3e5156079e72211d0a87ff3346d2980 diff --git a/media-gfx/fig2dev/fig2dev-3.2.9.ebuild b/media-gfx/fig2dev/fig2dev-3.2.9.ebuild new file mode 100644 index 000000000000..5ac367a0ae18 --- /dev/null +++ b/media-gfx/fig2dev/fig2dev-3.2.9.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +#MY_P="${PN}.${PV}" + +DESCRIPTION="Set of tools for creating TeX documents with graphics" +HOMEPAGE="https://www.xfig.org/" +SRC_URI="mirror://sourceforge/mcj/${P}.tar.xz + mirror://gentoo/fig2mpdf-1.1.2.tar.bz2" +#S="${WORKDIR}/${MY_P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" + +RDEPEND=" + media-libs/libpng + virtual/jpeg + x11-apps/rgb + x11-libs/libXpm + !media-gfx/transfig +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-text/rman + sys-devel/gcc +" + +DOCS=( README CHANGES NOTES ) +HTML_DOCS=( "${WORKDIR}/fig2mpdf/doc/." ) + +sed_Imakefile() { + # see fig2dev/Imakefile for details + vars2subs="BINDIR=${EPREFIX}/usr/bin + MANDIR=${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\) + XFIGLIBDIR=${EPREFIX}/usr/share/xfig + PNGINC=-I${EPREFIX}/usr/include/X11 + XPMINC=-I${EPREFIX}/usr/include/X11 + USEINLINE=-DUSE_INLINE + RGB=${EPREFIX}/usr/share/X11/rgb.txt + FIG2DEV_LIBDIR=${EPREFIX}/usr/share/fig2dev" + + for variable in ${vars2subs} ; do + varname=${variable%%=*} + varval=${variable##*=} + sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@" || die + done +} + +src_prepare() { + default + + # find . -type f -exec chmod a-x '{}' \; || die + # find . -name Makefile -delete || die + + # sed -e 's:-L$(ZLIBDIR) -lz::' \ + # -e 's: -lX11::' \ + # -i fig2dev/Imakefile || die + # sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile +} + +src_configure() { + # export IMAKECPP=${IMAKECPP:-${CHOST}-gcc -E} + # CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" xmkmf || die + econf +} + +src_compile() { + # emake CC="$(tc-getBUILD_CC)" LD="$(tc-getLD)" Makefiles + + local myemakeargs=( + CC="$(tc-getCC)" + AR="$(tc-getAR)" + RANLIB="$(tc-getRANLIB)" + CDEBUGFLAGS="${CFLAGS}" + LOCAL_LDFLAGS="${LDFLAGS}" + USRLIBDIR="${EPREFIX}/usr/$(get_libdir)" + ) + emake "${myemakeargs[@]}" +} + +src_install() { + local myemakeargs=( + DESTDIR="${D}" + INSTDATFLAGS="-m 644" + INSTMANFLAGS="-m 644" + ) + emake "${myemakeargs[@]}" install + + dobin "${WORKDIR}/fig2mpdf/fig2mpdf" + doman "${WORKDIR}/fig2mpdf/fig2mpdf.1" + + einstalldocs + + rm "${ED}/usr/share/doc/${PF}/html/"{Makefile,*.lfig,*.pdf,*.tex} || die +} + +pkg_postinst() { + elog "Note, that defaults are changed and now if you don't want to ship" + elog "personal information into output files, use fig2dev with -a option." +} diff --git a/media-gfx/fig2dev/files/transfig-3.2.5e-clang.patch b/media-gfx/fig2dev/files/transfig-3.2.5e-clang.patch new file mode 100644 index 000000000000..f75b649ff26f --- /dev/null +++ b/media-gfx/fig2dev/files/transfig-3.2.5e-clang.patch @@ -0,0 +1,12 @@ +index 6a622f1..a14b96f 100644 +--- a/fig2dev/dev/genibmgl.c ++++ b/fig2dev/dev/genibmgl.c +@@ -572,7 +572,7 @@ static set_width(w) + { + static int current_width=-1; + +- if (w == current_width) return; ++ if (w == current_width) return 0; + + /* Default line width is 0.3 mm; back off to original xfig pen + thickness number, and re-size. diff --git a/media-gfx/fig2dev/files/transfig-3.2.5e-gcc10-fno-common.patch b/media-gfx/fig2dev/files/transfig-3.2.5e-gcc10-fno-common.patch new file mode 100644 index 000000000000..e0c92161e3ff --- /dev/null +++ b/media-gfx/fig2dev/files/transfig-3.2.5e-gcc10-fno-common.patch @@ -0,0 +1,30 @@ +--- a/fig2dev/dev/gensvg.c ++++ b/fig2dev/dev/gensvg.c +@@ -230,10 +230,12 @@ + }; + + /* arrowhead arrays */ +-Point points[50], fillpoints[50], clippoints[50]; +-int npoints, nfillpoints, nclippoints; +-int arrowx1, arrowy1; /* first point of object */ +-int arrowx2, arrowy2; /* second point of object */ ++Point fillpoints[50]; ++int nfillpoints; ++extern Point points[50], clippoints[50]; ++extern int npoints, nclippoints; ++extern int arrowx1, arrowy1; /* first point of object */ ++extern int arrowx2, arrowy2; /* second point of object */ + + static int tileno=0; /* number of current tile */ + +--- a/fig2dev/fig2dev.h ++++ b/fig2dev/fig2dev.h +@@ -127,7 +127,7 @@ + extern char *prog, *from, *to; + extern char *name; + extern double font_size; +-Boolean correct_font_size; /* use correct font size */ ++extern Boolean correct_font_size; /* use correct font size */ + extern double mag, fontmag; + extern FILE *tfp; + diff --git a/media-gfx/fig2dev/metadata.xml b/media-gfx/fig2dev/metadata.xml new file mode 100644 index 000000000000..9206b593ffbc --- /dev/null +++ b/media-gfx/fig2dev/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!--maintainer-needed--> + <upstream> + <remote-id type="sourceforge">mcj</remote-id> + </upstream> +</pkgmetadata> |