From 4330b52986b655353b9aa63d7479537a9beee9f1 Mon Sep 17 00:00:00 2001 From: Ian Delaney Date: Wed, 13 Jan 2016 13:04:28 +0800 Subject: app-office/magicpoint: bump to vn. 1.13a_p20121015, a snapshot ebuild prepared, with support, by user Peter Stuge, now entered as the proxy maintainer under the proxy-maintainers herd in metadata. Also new use flag 'contrib' added to metadata, ebuild and patches submitted all vua the gentoo bug, though the package remains pmasked for removal. Yet to be negotiated with pertinent devs Gentoo bug: #486248 Package-Manager: portage-2.2.26 --- app-office/magicpoint/Manifest | 1 + .../magicpoint-1.13a_p20121015-any-giflib.patch | 140 ++++++++++++++++++ .../magicpoint-1.13a_p20121015-draw-charset.patch | 11 ++ ...cpoint-1.13a_p20121015-draw-stringtoolong.patch | 13 ++ .../magicpoint-1.13a_p20121015-gif-dimension.patch | 11 ++ ...oint-1.13a_p20121015-implicit-declaration.patch | 136 +++++++++++++++++ .../magicpoint-1.13a_p20121015-parse-empty.patch | 11 ++ .../magicpoint/magicpoint-1.13a_p20121015.ebuild | 163 +++++++++++++++++++++ app-office/magicpoint/metadata.xml | 8 +- 9 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-charset.patch create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-stringtoolong.patch create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-gif-dimension.patch create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-implicit-declaration.patch create mode 100644 app-office/magicpoint/files/magicpoint-1.13a_p20121015-parse-empty.patch create mode 100644 app-office/magicpoint/magicpoint-1.13a_p20121015.ebuild diff --git a/app-office/magicpoint/Manifest b/app-office/magicpoint/Manifest index f55b6d685037..c969e1e0b843 100644 --- a/app-office/magicpoint/Manifest +++ b/app-office/magicpoint/Manifest @@ -1 +1,2 @@ DIST magicpoint-1.13a.tar.gz 890670 SHA256 205e6752e3cb024bcce0583b43dafc9b89490c0016daa91d2486891edcf2cfc1 SHA512 c2399826d770f6307128eb1a88593404d5b495203319e0c90edf36e91ce82e2e42b1777cbf473f52376aa4645468ac65920839f94b58d7c9d90f08a961273df9 WHIRLPOOL ed40897f528bd70ef785f5f0c2f5a0b55ad6f14fe9fbc65849b8713d7fa84590d5f668f008d8b0b737db7e95373f5865a85446489ea0790d6e8e206f30bb7d72 +DIST mgp-snap-20121015.tar.gz 886902 SHA256 21134551d492995b0e6d9a20ecb1f2c1afdbbaef4f529ca6be59a80581c18ac2 SHA512 fa59b1ec04e2e191b74c25fd3ae9b4c855ad96d23e9e5b071c959f56b9d2064d7bdf9217b5c62c5733cc2d9ec17981947febd7afb2552f1145262225909cc711 WHIRLPOOL 6d2086df981a0b67b1bbbf85284e6b7d808f09d0884388fdf83ac69917e7a01440bda34753f6c9f45bbd39640c28ab73509ff4f1ebfcc54f83931ef6a13b568e diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch new file mode 100644 index 000000000000..0e7903a8dcf0 --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch @@ -0,0 +1,140 @@ +--- kit.orig/image/gif.c 2000-03-07 07:59:56.000000000 +0100 ++++ kit/image/gif.c 2016-01-12 17:35:49.792443794 +0100 +@@ -18,6 +18,18 @@ + #include "image.h" + #include + ++static void stderrGifError(GifFileType *gifp, int e) { ++#if defined(GIFLIB_MAJOR) /* added in 4.2.0 along with GifError{,String}() */ ++# if GIFLIB_MAJOR >= 5 ++ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString(gifp ? gifp->Error : e)); ++# else ++ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString()); ++# endif ++#else ++ PrintGifError(); ++#endif ++} ++ + static void + tellAboutImage(name, gifp) + char *name; +@@ -49,10 +61,17 @@ + GifFileType *GifFile; + ColorMapObject *ColorMap; + GifColorType *ColorMapEntry; ++ int gerr = 0; + ++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 ++ GifFile = DGifOpenFileName(fullname, &gerr); ++#else + GifFile = DGifOpenFileName(fullname); +- if (GifFile == NULL) ++#endif ++ if (GifFile == NULL) { ++ stderrGifError(GifFile, gerr); + return NULL; ++ } + + if ((ScreenBuffer = (GifRowType *) + malloc(GifFile->SHeight * sizeof(GifRowType *))) == NULL) { +@@ -87,13 +106,13 @@ + /* Scan the content of the GIF file and load the image(s) in: */ + do { + if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + switch (RecordType) { + case IMAGE_DESC_RECORD_TYPE: + if (DGifGetImageDesc(GifFile) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + Row = GifFile->Image.Top; /* Image Position relative to Screen. */ +@@ -113,7 +132,7 @@ + j += InterlacedJumps[i]) { + if (DGifGetLine(GifFile, &ScreenBuffer[j][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + } +@@ -122,7 +141,7 @@ + for (i = 0; i < Height; i++) { + if (DGifGetLine(GifFile, &ScreenBuffer[Row++][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + } +@@ -131,7 +150,7 @@ + case EXTENSION_RECORD_TYPE: + /* Skip any extension blocks in file: */ + if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + /* very adhoc transparency support */ +@@ -141,7 +160,7 @@ + } + while (Extension != NULL) { + if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ stderrGifError(GifFile, 0); + exit(-1); + } + } +@@ -179,8 +198,21 @@ + pixline[x] = GifRow[x]; + } + ++#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)) ++ if (DGifCloseFile(GifFile, &gerr) == GIF_ERROR) { ++ stderrGifError(NULL, gerr); ++#else + if (DGifCloseFile(GifFile) == GIF_ERROR) { +- PrintGifError(); ++# if defined(GIFLIB_MAJOR) ++# if GIFLIB_MAJOR >= 5 ++ stderrGifError(GifFile, 0); ++# else ++ stderrGifError(NULL, GifError()); ++# endif ++# else ++ stderrGifError(NULL, 0); ++# endif ++#endif + exit(-1); + } + +@@ -195,12 +227,22 @@ + { + GifFileType *gifp; + int ret; ++ int gerr = 0; + ++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 ++ gifp = DGifOpenFileName(fullname, &gerr); ++#else + gifp = DGifOpenFileName(fullname); +- if (gifp == NULL) ++#endif ++ if (gifp == NULL) { ++ stderrGifError(gifp, gerr); + ret = 0; +- else { ++ } else { ++#if defined(GIFLIB_MAJOR) && (GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)) ++ DGifCloseFile(gifp, &gerr); ++#else + DGifCloseFile(gifp); ++#endif + tellAboutImage(name); + ret = 1; + } diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-charset.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-charset.patch new file mode 100644 index 000000000000..056b7ef02d87 --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-charset.patch @@ -0,0 +1,11 @@ +--- kit.orig/draw.c 2012-10-14 20:25:10.000000000 +0200 ++++ kit/draw.c 2016-01-12 16:45:54.123549077 +0100 +@@ -2847,7 +2847,7 @@ + char *seed; + char *registry; + +- if (code >= 0xa0 && ((!argregistry || !argregistry[0]) && mgp_charset)) ++ if (code >= 0xa0 && ((!argregistry || !argregistry[0]) && mgp_charset[0])) + registry = mgp_charset; + else + registry = argregistry; diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-stringtoolong.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-stringtoolong.patch new file mode 100644 index 000000000000..d965cb027cc0 --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-stringtoolong.patch @@ -0,0 +1,13 @@ +--- kit.orig/draw.c 2012-10-14 20:25:10.000000000 +0200 ++++ kit/draw.c 2016-01-12 18:01:53.090388852 +0100 +@@ -1379,6 +1379,10 @@ + } + + q = draw_fragment(state, p, q - p, registry, charset16); ++ if (q == p) { ++ fprintf(stderr, "String '%s' too long for window!\n", p); ++ exit(1); ++ } + + p = q; + } diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-gif-dimension.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-gif-dimension.patch new file mode 100644 index 000000000000..c95aa2dae411 --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-gif-dimension.patch @@ -0,0 +1,11 @@ +--- kit.orig/image/gif.c 2016-01-12 16:54:40.469530579 +0100 ++++ kit/image/gif.c 2016-01-12 16:56:10.676527408 +0100 +@@ -122,7 +122,7 @@ + if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth || + GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) { + fprintf(stderr, +-"Image %d is not confined to screen dimension, aborted.\n"); ++"Image %s is not confined to screen dimension, aborted.\n", fullname); + exit(-2); + } + if (GifFile->Image.Interlace) { diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-implicit-declaration.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-implicit-declaration.patch new file mode 100644 index 000000000000..141353953e00 --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-implicit-declaration.patch @@ -0,0 +1,136 @@ +diff -ru kit.orig/contrib/xwintoppm/dsimple.c kit/contrib/xwintoppm/dsimple.c +--- kit.orig/contrib/xwintoppm/dsimple.c 1998-02-13 08:48:29.000000000 +0100 ++++ kit/contrib/xwintoppm/dsimple.c 2016-01-12 14:30:21.199834909 +0100 +@@ -48,10 +48,12 @@ + #endif + + extern Bool silent; ++extern void usage(); + unsigned long Resolve_Color(); + Pixmap Bitmap_To_Pixmap(); + Window Select_Window(); + void out(); ++void outl(); + void blip(); + Window Window_With_Name(); + void Fatal_Error(); +@@ -495,6 +497,7 @@ + * printf with up to 7 arguments. + */ + /* VARARGS1 */ ++void + outl(msg, arg0,arg1,arg2,arg3,arg4,arg5,arg6) + char *msg; + char *arg0, *arg1, *arg2, *arg3, *arg4, *arg5, *arg6; +diff -ru kit.orig/contrib/xwintoppm/xwintoppm.c kit/contrib/xwintoppm/xwintoppm.c +--- kit.orig/contrib/xwintoppm/xwintoppm.c 1998-08-26 07:30:16.000000000 +0200 ++++ kit/contrib/xwintoppm/xwintoppm.c 2016-01-12 14:29:46.892836115 +0100 +@@ -139,6 +139,13 @@ + extern int (*_XErrorFunction)(); + extern int _XDefaultError(); + ++void usage(); ++void Error(char *); ++void Window_Dump(Window, FILE *); ++extern void outl(); ++int Image_Size(XImage *); ++int Get_XColors(XWindowAttributes *, XColor **); ++ + static long parse_long (s) + char *s; + { +@@ -281,6 +288,7 @@ + * writting. + */ + ++void + Window_Dump(window, out) + Window window; + FILE *out; +@@ -609,6 +617,7 @@ + /* + * Report the syntax for calling xwd. + */ ++void + usage() + { + fprintf (stderr, +@@ -623,6 +632,7 @@ + * Error - Fatal xwd error. + */ + ++void + Error(string) + char *string; /* Error description string. */ + { +diff -ru kit.orig/ctlwords.c kit/ctlwords.c +--- kit.orig/ctlwords.c 1999-02-15 00:02:25.000000000 +0100 ++++ kit/ctlwords.c 2016-01-12 14:14:20.395868676 +0100 +@@ -24,6 +24,7 @@ + + #include + #include ++#include + + main(int argc, char *argv[]) + { +diff -ru kit.orig/draw.c kit/draw.c +--- kit.orig/draw.c 2012-10-14 20:25:10.000000000 +0200 ++++ kit/draw.c 2016-01-12 14:15:12.847866833 +0100 +@@ -140,6 +140,8 @@ + static void get_background_pixmap __P((struct ctrl *, struct render_state *)); + static void regist_background_pixmap __P((XImageInfo *, Image *)); + #ifdef MNG ++void mngload(char *, int, int, int, int); ++void mngpreload(struct render_state *, char *, int *, int *); + static void process_anim __P((struct render_state *, struct ctrl *)); + static void obj_draw_anim __P((struct render_state *, + u_int, u_int, struct render_object *)); +diff -ru kit.orig/image/image.h kit/image/image.h +--- kit.orig/image/image.h 2004-07-28 17:47:31.000000000 +0200 ++++ kit/image/image.h 2016-01-12 16:38:12.310565307 +0100 +@@ -10,6 +10,7 @@ + + #include "copyright.h" + #include ++#include + + #if defined(SYSV) || defined(VMS) || 1 + #include +diff -ru kit.orig/image/window.c kit/image/window.c +--- kit.orig/image/window.c 2004-07-28 17:47:31.000000000 +0200 ++++ kit/image/window.c 2016-01-12 14:19:03.347858732 +0100 +@@ -16,8 +16,8 @@ + #include + #include + #include +-#ifdef SYSV +-#include ++#ifdef HAVE_UNISTD_H ++# include + #endif + #if TIME_WITH_SYS_TIME + # include +@@ -32,9 +32,6 @@ + #if HAVE_SYS_SELECT_H + # include + #endif +-#ifdef __APPLE__ +-#include +-#endif + + /* SUPPRESS 560 */ + +diff -ru kit.orig/mgp.h kit/mgp.h +--- kit.orig/mgp.h 2010-05-04 00:28:00.000000000 +0200 ++++ kit/mgp.h 2016-01-12 14:16:47.967863490 +0100 +@@ -831,6 +831,9 @@ + #ifndef HAVE_USLEEP + extern void usleep __P((u_int)); + #endif ++#ifndef HAVE_STRLCPY ++extern size_t strlcpy __P((char *, const char *, size_t)); ++#endif + + #ifdef FREETYPE + #define RASTERLIB diff --git a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-parse-empty.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-parse-empty.patch new file mode 100644 index 000000000000..f3d38ccde03a --- /dev/null +++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-parse-empty.patch @@ -0,0 +1,11 @@ +--- kit.orig/parse.c 2010-05-04 00:28:00.000000000 +0200 ++++ kit/parse.c 2016-01-12 19:20:41.882222658 +0100 +@@ -1258,7 +1258,7 @@ + */ + { + int textseen; +- int contseen; ++ int contseen = 0; + for (page = 1; page <= maxpage; page++) { + line = page_attribute[page].pg_linenum; + for (l = 0; l <= line; l++) { diff --git a/app-office/magicpoint/magicpoint-1.13a_p20121015.ebuild b/app-office/magicpoint/magicpoint-1.13a_p20121015.ebuild new file mode 100644 index 000000000000..7c25f03ececa --- /dev/null +++ b/app-office/magicpoint/magicpoint-1.13a_p20121015.ebuild @@ -0,0 +1,163 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools elisp-common eutils toolchain-funcs + +MY_SNAP="${PV/*_p}" +MY_P="mgp-snap-${MY_SNAP}" +DESCRIPTION="An X11 based presentation tool" +SRC_URI="ftp://sh.wide.ad.jp/WIDE/free-ware/mgp-snap/${MY_P}.tar.gz" +HOMEPAGE="http://member.wide.ad.jp/wg/mgp/" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cjk contrib doc emacs examples gif imlib m17n-lib mng nls png truetype" + +REQUIRED_USE="imlib? ( !gif !png )" +S="${WORKDIR}/kit" + +COMMON_DEPEND="x11-libs/libICE + x11-libs/libSM + x11-libs/libXrender + x11-libs/libXmu + imlib? ( media-libs/imlib2 ) + !imlib? ( + gif? ( media-libs/giflib:= ) + png? ( >=media-libs/libpng-1.4:0= ) + ) + truetype? ( x11-libs/libXft ) + emacs? ( virtual/emacs ) + m17n-lib? ( dev-libs/m17n-lib ) + mng? ( media-libs/libmng )" +DEPEND="${COMMON_DEPEND} + sys-devel/autoconf + x11-proto/xextproto + x11-libs/libxkbfile + app-text/rman + x11-misc/imake" +RDEPEND="${COMMON_DEPEND} + contrib? ( dev-lang/perl ) + nls? ( sys-devel/gettext ) + truetype? ( cjk? ( media-fonts/sazanami ) )" + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + sed -i -e '/mgp_version =/s, (.*), ('${MY_SNAP}'),' mgp.c + + epatch \ + "${FILESDIR}"/${PN}-1.11b-gentoo.diff \ + "${FILESDIR}"/${PN}-1.13a_p20121015-parse-empty.patch \ + "${FILESDIR}"/${PN}-1.13a_p20121015-draw-charset.patch \ + "${FILESDIR}"/${PN}-1.13a_p20121015-draw-stringtoolong.patch \ + "${FILESDIR}"/${PN}-1.13a_p20121015-implicit-declaration.patch + + if ! use imlib; then + epatch "${FILESDIR}"/${PN}-1.13a-libpng15.patch + + # fix compability with libpng14 + sed -i \ + -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \ + configure.in image/png.c || die + + if use gif; then + # bug #85720 + sed -i -e "s/ungif/gif/g" configure.in || die + + # bug #486248 + epatch "${FILESDIR}"/${PN}-1.13a_p20121015-any-giflib.patch + + # fix use of uninitialized memory in error message + epatch "${FILESDIR}"/${PN}-1.13a_p20121015-gif-dimension.patch + fi + fi + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable gif) \ + $(use_enable imlib) \ + $(use_enable nls locale) \ + $(use_enable truetype xft2) \ + $(use_with m17n-lib) \ + --disable-vflib \ + --disable-freetype \ + --x-libraries=/usr/lib/X11 \ + --x-includes=/usr/include/X11 +} + +src_compile() { + xmkmf || die + # no parallel build possible anywhere + emake -j1 Makefiles + + tc-export CC + emake -j1 \ + CC="${CC}" \ + CDEBUGFLAGS="${CFLAGS}" \ + LOCAL_LDFLAGS="${LDFLAGS}" \ + BINDIR=/usr/bin \ + LIBDIR=/etc/X11 + + if use emacs; then + pushd contrib || die + elisp-compile *.el || die + popd + fi +} + +src_install() { + emake -j1 \ + DESTDIR="${D}" \ + BINDIR=/usr/bin \ + LIBDIR=/etc/X11 \ + install + + emake -j1 \ + DESTDIR="${D}" \ + DOCHTMLDIR=/usr/share/doc/${PF} \ + MANPATH=/usr/share/man \ + MANSUFFIX=1 \ + install.man + + use contrib && dobin contrib/mgp2{html,latex}.pl + + if use emacs; then + pushd contrib || die + elisp-install ${PN} *.el *.elc || die + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + popd + fi + + dodoc FAQ README* RELNOTES SYNTAX TODO* USAGE* + + if use examples; then + pushd sample || die + insinto /usr/share/doc/${PF}/examples + doins README* cloud.jpg dad.* embed*.mgp gradation*.mgp \ + mgp-old*.jpg mgp.mng mgp3.xbm mgprc-sample \ + multilingual.mgp sample*.mgp sendmail6*.mgp \ + tutorial*.mgp v6*.mgp v6header.* + popd + fi +} + +pkg_postinst() { + elog + elog "If you enabled xft2 support (default) you may specify xfont directive by" + elog "font name and font registry." + elog "e.g.)" + elog '%deffont "standard" xfont "sazanami mincho" "jisx0208.1983"' + elog + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/app-office/magicpoint/metadata.xml b/app-office/magicpoint/metadata.xml index 0bc4edceb36e..042564f391bc 100644 --- a/app-office/magicpoint/metadata.xml +++ b/app-office/magicpoint/metadata.xml @@ -1,8 +1,11 @@ + proxy-maintainers - maintainer-needed@gentoo.org + peter@stuge.se + Peter Stuger + Proxied maintainer; set to assignee in all bugs Magic Point is an X11 based presentation tool. It is designed to make @@ -11,4 +14,7 @@ just text so that you can create presentation files quickly with your favorite editor (e.g. Emacs, vi). + + Install additional contributed scripts + -- cgit v1.2.3-65-gdbad