diff options
Diffstat (limited to 'misc/magicpoint')
-rw-r--r-- | misc/magicpoint/Makefile | 22 | ||||
-rw-r--r-- | misc/magicpoint/files/patch-gif.c | 81 |
2 files changed, 94 insertions, 9 deletions
diff --git a/misc/magicpoint/Makefile b/misc/magicpoint/Makefile index 036c341c06e3..0883ab749669 100644 --- a/misc/magicpoint/Makefile +++ b/misc/magicpoint/Makefile @@ -14,25 +14,27 @@ MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/mgp/ MAINTAINER= dinoex@FreeBSD.org COMMENT= An X11-based presentation tool -LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png \ +XLIB_DEPENDS+= png15:${PORTSDIR}/graphics/png \ mng:${PORTSDIR}/graphics/libmng RUN_DEPENDS+= pnmscale:${PORTSDIR}/graphics/netpbm USE_IMAKE= yes USE_XORG= x11 xext xmu xt sm ice xi xtst +WANT_GNOME= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-vflib --enable-locale -OPTIONS+= FREETYPE "With FreeType support" on \ - XFT "With Xft2 support" on \ - GIF "With gif image support" off \ +OPTIONS+= FREETYPE "With FreeType support" on \ + XFT "With Xft2 support" on \ + GIF "With gif image support" off \ IMLIB "With Imlib exclusive image processing" off MAN1= mgp.1 mgp2ps.1 mgpembed.1 mgpnet.1 xwintoppm.1 xmindpath.1 PORTDOCS= ${DOCS} sample emacs-lisp scripts -DOCS= COPYRIGHT COPYRIGHT.jp FAQ README README.fonts README.fonts.jp \ - README.lang RELNOTES SYNTAX TODO.jp USAGE USAGE.jp +DOCS= COPYRIGHT COPYRIGHT.jp FAQ README README.fonts \ + README.fonts.jp README.lang RELNOTES SYNTAX TODO.jp \ + USAGE USAGE.jp SAMPLES= README README.jp cloud.jpg dad.eps dad.jpg default.mgp \ embed-jp.mgp embed.mgp gradation-jp.mgp \ gradation.mgp mgp-old1.jpg mgp-old2.jpg mgp-old3.jpg \ @@ -47,7 +49,8 @@ SAMPLE_SCRIPTS= eqn2eps.sh tex2eps.sh mgp2html.pl mgp2latex.pl .include <bsd.port.pre.mk> .if defined(WITH_FREETYPE) -LIB_DEPENDS+= ttf.4:${PORTSDIR}/print/freetype +# Only freetype 1.x is supported +USE_FREETYPE= yes CONFIGURE_ARGS+= --enable-freetype \ --enable-freetype-charset16 .else @@ -55,7 +58,7 @@ CONFIGURE_ARGS+= --disable-freetype .endif .if defined(WITH_XFT) -LIB_DEPENDS+= Xft.2:${PORTSDIR}/x11-fonts/libXft +USE_XORG+= xft CONFIGURE_ARGS+= --enable-xft2 .else CONFIGURE_ARGS+= --disable-xft2 @@ -64,12 +67,13 @@ CONFIGURE_ARGS+= --disable-xft2 .if defined(WITH_GIF) LIB_DEPENDS+= gif.5:${PORTSDIR}/graphics/giflib CONFIGURE_ARGS+= --enable-gif +CFLAGS+= -I${LOCALBASE}/include .else CONFIGURE_ARGS+= --disable-gif .endif .if defined(WITH_IMLIB) -LIB_DEPENDS+= Imlib.5:${PORTSDIR}/graphics/imlib +USE_GNOME= imlib CONFIGURE_ARGS+= --enable-imlib .else CONFIGURE_ARGS+= --disable-imlib diff --git a/misc/magicpoint/files/patch-gif.c b/misc/magicpoint/files/patch-gif.c new file mode 100644 index 000000000000..3c19c5cddca6 --- /dev/null +++ b/misc/magicpoint/files/patch-gif.c @@ -0,0 +1,81 @@ +--- image/gif.c.orig 2000-03-07 07:59:56.000000000 +0100 ++++ image/gif.c 2012-06-02 09:10:25.000000000 +0200 +@@ -19,6 +19,17 @@ + #include <gif_lib.h> + + static void ++localPrintGifError(void) ++{ ++ char *Err = GifErrorString(); ++ ++ if (Err != NULL) ++ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err); ++ else ++ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", GifError()); ++} ++ ++static void + tellAboutImage(name, gifp) + char *name; + GifFileType *gifp; +@@ -87,13 +98,13 @@ + /* Scan the content of the GIF file and load the image(s) in: */ + do { + if (DGifGetRecordType(GifFile, &RecordType) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + switch (RecordType) { + case IMAGE_DESC_RECORD_TYPE: + if (DGifGetImageDesc(GifFile) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + Row = GifFile->Image.Top; /* Image Position relative to Screen. */ +@@ -113,7 +124,7 @@ + j += InterlacedJumps[i]) { + if (DGifGetLine(GifFile, &ScreenBuffer[j][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + } +@@ -122,7 +133,7 @@ + for (i = 0; i < Height; i++) { + if (DGifGetLine(GifFile, &ScreenBuffer[Row++][Col], + Width) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + } +@@ -131,7 +142,7 @@ + case EXTENSION_RECORD_TYPE: + /* Skip any extension blocks in file: */ + if (DGifGetExtension(GifFile, &ExtCode, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + /* very adhoc transparency support */ +@@ -141,7 +152,7 @@ + } + while (Extension != NULL) { + if (DGifGetExtensionNext(GifFile, &Extension) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + } +@@ -180,7 +191,7 @@ + } + + if (DGifCloseFile(GifFile) == GIF_ERROR) { +- PrintGifError(); ++ localPrintGifError(); + exit(-1); + } + |