summaryrefslogtreecommitdiff
path: root/app-office/magicpoint
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-office/magicpoint
reinit the tree, so we can have metadata
Diffstat (limited to 'app-office/magicpoint')
-rw-r--r--app-office/magicpoint/Manifest15
-rw-r--r--app-office/magicpoint/files/50magicpoint-gentoo.el6
-rw-r--r--app-office/magicpoint/files/magicpoint-1.11b-gentoo.diff37
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a-libpng15.patch11
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-any-giflib.patch140
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-charset.patch11
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-draw-stringtoolong.patch13
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-fontconfig.patch33
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-gif-dimension.patch11
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-implicit-declaration.patch136
-rw-r--r--app-office/magicpoint/files/magicpoint-1.13a_p20121015-parse-empty.patch11
-rw-r--r--app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild169
-rw-r--r--app-office/magicpoint/metadata.xml23
13 files changed, 616 insertions, 0 deletions
diff --git a/app-office/magicpoint/Manifest b/app-office/magicpoint/Manifest
new file mode 100644
index 000000000000..ffbdcec9f5a4
--- /dev/null
+++ b/app-office/magicpoint/Manifest
@@ -0,0 +1,15 @@
+AUX 50magicpoint-gentoo.el 195 SHA256 7c1e59dcef2d74a065deccfdb3a507fd09b32201f27e90e8f86557c15082ea56 SHA512 e601460b245be363da41f4076381a96b1155799850807d1b6862ea2677844f87960aa27c484ee8735fddeb63e5b940973492c0a2979ad6dea31707f5682806fe WHIRLPOOL 9c8c21dd965d70b213e7c78e5153b3254943b4ec95f6a38c8fc75ec64e880fd1d7f2cc9c7efb05c6dd3bc12f7477396ce52f3b2cf9b8e2b9c86b73fa8bf02fa6
+AUX magicpoint-1.11b-gentoo.diff 1412 SHA256 64111b050a4ca31c97c975e4bbbe150474e4fd8a3fbec3dfc3adae45587647d3 SHA512 f3ae7d2ed64771b0af719442f572b50bb4a493de7b2b91b6de39750f52875a95c579b102ac0fc94294ac14dc03aea2bc5ccb8f62015e930bf25a1b1d6454c26e WHIRLPOOL a425f65ddf1bdd7c33871b7d2ddca33e9a535cee70d90ac7ce6d225ebfd13b50799e28dca380c113876aeed4066684c0d6c6d5cc297f2100a2f4c108a8181630
+AUX magicpoint-1.13a-libpng15.patch 240 SHA256 22d3887872d72cdc755184bc104aa5ff801e00546a43ee9ec6021f7e38a8f698 SHA512 78855e421db27bdbacaa98ff0597106055cb6c8b537ad1edd4d55026669e9e948df9d6f76636bac6ed14f1a7c3509685f46eab02c1b56a0bde5e786f91adb16e WHIRLPOOL dd905f428247baf61fe566de3759efabfcda97320c47feff544bafd786b8e3ce0b280d3fe9fbe5c9779222a1857f49f8296e87fc6b9c4d464adb3afa0eb8d8e3
+AUX magicpoint-1.13a_p20121015-any-giflib.patch 3585 SHA256 3982664c537f2048c56d0fa3b28f8084cc2487ba7d320a019b3d1705742a6e6f SHA512 661e86eddc3c929651dd2d06b14638d4c92f03281447ee706203a99940bfca8783373ed8a175ddac73e2a6ccb2d8c25386aca39b977fbc3e631b5a16dcfc3536 WHIRLPOOL 8c4b21a2f0773c9fe87dd892932090b2d16e8fb21a6ce131420070806f003bdc4d1e6e66962eb1dc21bcc827557c89b66ce88a922acde619c4bda8eccfc36c69
+AUX magicpoint-1.13a_p20121015-draw-charset.patch 376 SHA256 bcc6a2d8111b13725a9daa3b937056a8fa3e548d1a56ac5ec87b6b16b24d9d4c SHA512 3aa3b7e4fa638a86e3a5241ad2768a44b0d3e1925dcbf23e4c5b9cd1fde9d3897b3785336be174d709c6172e47c34a5e1550cef05e868e0706cf2f91b73a160c WHIRLPOOL 82453ff50f5426babddceef7e7b878bc768a9fb6e081364f17926eb6565ee3afadbc9cee8890bc1046140e98e8a493fdc0e10555b4c6c5bfc80d32123f435254
+AUX magicpoint-1.13a_p20121015-draw-stringtoolong.patch 310 SHA256 2a10896a680b54d57d281a8fa468129d8793d6f989a1c833efde261f95a559d4 SHA512 65f77a096501ba27208bdc7e036ada66946e15c012b22e5dcae579141d399a7149bd647f9a5968f82ff34c344ce9c5ee4841be33a7fb911187b1def131bb7387 WHIRLPOOL c9d2e72bda07e63c89401a4dd2f25aae17a31a29d5db4315d3f46bd54913909a1bfd7606c83ab5ba92fb19484a669b5441d70e5d395aef01a1d817d019d80985
+AUX magicpoint-1.13a_p20121015-fontconfig.patch 1005 SHA256 cf6fa4da4020bb51e66805ba77550d9fded90ccf8aed3b18118226c42496b305 SHA512 53fc5bbce474e4c60af75ad73f00108c40ab317b9b835f971e475f8f49a893a41614ec76345e220c8e7284032f7df1a7785e2ca91d5a66c4f99470d55b0f9603 WHIRLPOOL 3daf04d75b3957341b8befe588d8d304ba6cdae5861580224d715bc53e89706788a907599a82f874f79e9b11b87d23a62926a98450742a6befe8fc88a4cc6701
+AUX magicpoint-1.13a_p20121015-gif-dimension.patch 493 SHA256 bb86769585f3c5a4761131118c8d207b799705ce726a8d78b98ee914587d9964 SHA512 d8103374df7696ed6daf36c079c2e1f2efbfc8e774f77e06beec629b2064576325f311603ca7d1dfe3f65ed11dfaff1abd7ae70b4f78a5199e76e1d5030c5aa6 WHIRLPOOL ab6eb5f251d73ea715a05ff96f0bd4c28c51e62c9bdef948717a4d0677dd67ec65ed44d3e7072762f4b7f8568222b1b7e824eaeda414a82abbc2a76854232cc7
+AUX magicpoint-1.13a_p20121015-implicit-declaration.patch 3673 SHA256 e7707ac3e1710114432bc48bc8bf1f8f9b849eb1c3832be8febc4833fff4006f SHA512 be8da97dd37a59190cddc3f826094a343d2351d832d9bbb42a7a319149884e026fdd97018826162474bb2ffc0f88082cd4075a228487fd3d40e6b76c9ebdc029 WHIRLPOOL 412dc20438248be212813374886ee169ae794fa3be80ae686f8f203042acc300306fe4f0a313ab6844e36bbb5587e61a9c8c9ccd0793b30020dbb2a87f3e259c
+AUX magicpoint-1.13a_p20121015-parse-empty.patch 316 SHA256 4e3293637f759ba33cd88a47871729ea6d793090200cb2ece8e51b07a1a87d3e SHA512 adb7a9e1585c907cd8f8b0f834391620cecf854702301715149ddc80af080115dbdd18c7f8622a5fc403df8f1205133909c98a2153461e4e8f4bf401b647f518 WHIRLPOOL 26217214d6e8d3601f49bd1ea9428522f95dc7ab4fcb49b91dac35e0acd6846186cb39989bb01cae50a493dd97d4cb0321465f4bf6e3c15b69b4ba1f528fecb2
+DIST mgp-snap-20121015.tar.gz 886902 SHA256 21134551d492995b0e6d9a20ecb1f2c1afdbbaef4f529ca6be59a80581c18ac2 SHA512 fa59b1ec04e2e191b74c25fd3ae9b4c855ad96d23e9e5b071c959f56b9d2064d7bdf9217b5c62c5733cc2d9ec17981947febd7afb2552f1145262225909cc711 WHIRLPOOL 6d2086df981a0b67b1bbbf85284e6b7d808f09d0884388fdf83ac69917e7a01440bda34753f6c9f45bbd39640c28ab73509ff4f1ebfcc54f83931ef6a13b568e
+EBUILD magicpoint-1.13a_p20121015-r1.ebuild 3861 SHA256 d02bfaacfaa261c1681ef4ed193ae40720a796fd31fc1f41ac53c236e5302871 SHA512 c27f34870fe05d323e0f314be211bab1637b66b117e6f2eaf06ed1efd746a0fafcf7624af0fd1e80070f662efb8e9bc0e5d3d6a108bc148f62316a23239f00d1 WHIRLPOOL 13e02995fd22cdd549aa3c23f7653e0f8c8c9882267ee5b84bf2afbd420339816cb9cc9f18b1a330d2951bbcde554bec6dbe43cb346e5991e5dbcbd2746e614a
+MISC ChangeLog 4700 SHA256 b42f54b3146d5a0a1114e82b9ca3f4272a35461ca9dd0270ff40642b00058e92 SHA512 5fa22cb22267e9f3c825df6c76de1903dc8e81bf9372fbdaa1638bf1dc1f3f5ad16fc140d7ada412a1cca677c07d4a2d242b06c5f341739dbf10cfcc1375fcc2 WHIRLPOOL 80a29e74b8b7630df9273888dfacacd2eb3b6ef45e4cb9a687a7b73787b0902ec778d7f9db5f2952e8c67fc80ab7607affe03fe884ebf460a10a7db1e74afe5f
+MISC ChangeLog-2015 9828 SHA256 2efeb65833147098d57226a9847dd4a7f1ed0d7bc035575b396cb03f4a54ec6e SHA512 98b51650881e7edfedc1f2b68cc18334821c089297f06998e05c73017deb71a7734a8afbcbd9c8f87e4463e6869fa1b06bb0babfd0952b54019635292628384e WHIRLPOOL f1fc47b6391f2e464842f21640acc20180add4a9f2b00e2b11f1cc5ace2c96b7dc0f4e5712bad26ca699d11f062cf8538f14bc1942631654c1a490d908a25bf0
+MISC metadata.xml 887 SHA256 095732864cf00681f73db56aa76fa50ed13d2a2c70aa4049c35a5e7065332197 SHA512 a8855056ce6635b983a372be990674a4ca502eeb05352722152ca8230100e5ebd643db53a957e612db788c6086c31fd107cfb158a2e628501d917441530cdba9 WHIRLPOOL 5626eb3b2d853e9bdecc67b3d4cecd05e96293e9d26c3d145dd470ad59a924e20f0ddaadab7ea2f397aa15ff2c20210ec0979cb8ae5af6a751bf92cb5abadc89
diff --git a/app-office/magicpoint/files/50magicpoint-gentoo.el b/app-office/magicpoint/files/50magicpoint-gentoo.el
new file mode 100644
index 000000000000..301fcb4d4bb6
--- /dev/null
+++ b/app-office/magicpoint/files/50magicpoint-gentoo.el
@@ -0,0 +1,6 @@
+
+;;; magicpoint site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'mgp-mode "mgp-mode" "MagicPoint editor mode" t)
+(add-to-list 'auto-mode-alist '("\\.mgp\\'" . mgp-mode))
diff --git a/app-office/magicpoint/files/magicpoint-1.11b-gentoo.diff b/app-office/magicpoint/files/magicpoint-1.11b-gentoo.diff
new file mode 100644
index 000000000000..8c0d454972a3
--- /dev/null
+++ b/app-office/magicpoint/files/magicpoint-1.11b-gentoo.diff
@@ -0,0 +1,37 @@
+diff -urN magicpoint-1.10a.ORIG/mgp.h magicpoint-1.10a/mgp.h
+--- magicpoint-1.10a.ORIG/mgp.h 2003-06-06 16:18:25.000000000 +0900
++++ magicpoint-1.10a/mgp.h 2003-09-02 04:24:56.000000000 +0900
+@@ -93,7 +93,7 @@
+ #include "freetype.h"
+
+ #ifndef FREETYPEFONTDIR
+-#define FREETYPEFONTDIR "/usr/local/share/fonts/ttf"
++#define FREETYPEFONTDIR "/usr/X11R6/lib/X11/fonts/truetype"
+ #endif
+ #endif /*FREETYPE*/
+
+@@ -130,7 +130,7 @@
+ #define UUDECODE "/usr/bin/uudecode"
+ #endif
+ #ifndef GUNZIP
+-#define GUNZIP "/usr/contrib/bin/gunzip"
++#define GUNZIP "/bin/gunzip"
+ #endif
+
+ #define MAXPAGE 512
+diff -urN magicpoint-1.10a.ORIG/sample/default.mgp magicpoint-1.10a/sample/default.mgp
+--- magicpoint-1.10a.ORIG/sample/default.mgp 2001-08-11 01:40:54.000000000 +0900
++++ magicpoint-1.10a/sample/default.mgp 2003-09-02 04:24:56.000000000 +0900
+@@ -12,9 +12,9 @@
+ %% into the "tfdir" directory above:
+ %% ftp://ftp.mew.org/pub/mgp/ttf-jp.tar.gz
+ %%
+-%deffont "standard" tfont "standard.ttf", tmfont "kochi-mincho.ttf"
+-%deffont "thick" tfont "thick.ttf", tmfont "goth.ttf"
+-%deffont "typewriter" tfont "typewriter.ttf", tmfont "goth.ttf"
++%deffont "standard" xfont "serif" "iso10646"
++%deffont "thick" xfont "sans-serif" "iso10646"
++%deffont "typewriter" xfont "monospace" "iso10646"
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %%
+ %% Default settings per each line numbers.
diff --git a/app-office/magicpoint/files/magicpoint-1.13a-libpng15.patch b/app-office/magicpoint/files/magicpoint-1.13a-libpng15.patch
new file mode 100644
index 000000000000..7990b4685544
--- /dev/null
+++ b/app-office/magicpoint/files/magicpoint-1.13a-libpng15.patch
@@ -0,0 +1,11 @@
+--- image/png.c
++++ image/png.c
+@@ -86,7 +86,7 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ fclose(fp);
+ return NULL;
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 <gif_lib.h>
+
++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-fontconfig.patch b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-fontconfig.patch
new file mode 100644
index 000000000000..9a49eb39282e
--- /dev/null
+++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-fontconfig.patch
@@ -0,0 +1,33 @@
+# Bug #572658
+--- kit.orig/configure.in 2009-05-04 09:36:47.000000000 +0200
++++ kit/configure.in 2016-01-23 04:25:17.047720246 +0100
+@@ -16,6 +16,7 @@
+ AC_PROG_AWK
+ AC_PROG_YACC
+ AC_PROG_LEX
++PKG_PROG_PKG_CONFIG([0.22])
+ AC_PATH_PROGS(mgp_cv_path_perl, perl5 perl, no)
+ AC_SUBST(mgp_cv_path_perl)
+ AC_PATH_PROGS(mgp_cv_path_uuencode, uuencode, no)
+@@ -385,9 +386,9 @@
+ if test "$mgp_use_xft2" = "yes"; then
+ AC_MSG_CHECKING(for xft2 library..)
+ AC_CHECK_LIB(Xft, XftFontOpen,
+- [LIBS="$LIBS -lXft -lfontconfig"
++ [LIBS="$LIBS -lXft `pkg-config --libs fontconfig`"
+ AC_DEFINE(USE_XFT2)
+- mgp_xft2_found=yes], [], [-lfontconfig])
++ mgp_xft2_found=yes], [], [`pkg-config --libs fontconfig`])
+ fi
+ fi
+ fi
+@@ -507,6 +508,9 @@
+ AC_DEFINE(USE_M17N)
+ OPTFLAGS="$OPTFLAGS `m17n-config X --cflags`"
+ LIBS="$LIBS `m17n-config X --libs` -lm17n-core"
++ if test "x$ac_cv_header_fontconfig_fontconfig_h" = "xyes"; then
++ LIBS="$LIBS `pkg-config --libs fontconfig`"
++ fi
+ fi
+ fi
+
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 <stdio.h>
+ #include <string.h>
++#include <stdlib.h>
+
+ 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 <stdio.h>
++#include <stdlib.h>
+
+ #if defined(SYSV) || defined(VMS) || 1
+ #include <string.h>
+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 <signal.h>
+ #include <errno.h>
+ #include <sys/types.h>
+-#ifdef SYSV
+-#include <unistd.h>
++#ifdef HAVE_UNISTD_H
++# include <unistd.h>
+ #endif
+ #if TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+@@ -32,9 +32,6 @@
+ #if HAVE_SYS_SELECT_H
+ # include <sys/select.h>
+ #endif
+-#ifdef __APPLE__
+-#include <unistd.h>
+-#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-r1.ebuild b/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild
new file mode 100644
index 000000000000..e249940edd06
--- /dev/null
+++ b/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 fontconfig 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[X] )
+ !imlib? (
+ gif? ( media-libs/giflib:= )
+ png? ( >=media-libs/libpng-1.4:0= )
+ )
+ truetype? (
+ x11-libs/libXft
+ media-libs/fontconfig
+ )
+ emacs? ( virtual/emacs )
+ m17n-lib? (
+ dev-libs/m17n-lib
+ fontconfig? ( media-libs/fontconfig )
+ )
+ 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-fontconfig.patch \
+ "${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
new file mode 100644
index 000000000000..48039235f3cd
--- /dev/null
+++ b/app-office/magicpoint/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>peter@stuge.se</email>
+ <name>Peter Stuge</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Magic Point is an X11 based presentation tool. It is designed to make
+ simple presentations easy while to make complicated presentations
+ possible. Its presentation file (whose suffix is typically .mgp) is
+ just text so that you can create presentation files quickly with your
+ favorite editor (e.g. Emacs, vi).
+ </longdescription>
+ <use>
+ <flag name="contrib">Install additional contributed scripts</flag>
+ </use>
+</pkgmetadata>