summaryrefslogtreecommitdiff
path: root/dev-libs/m17n-lib
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/m17n-lib')
-rw-r--r--dev-libs/m17n-lib/Manifest16
-rw-r--r--dev-libs/m17n-lib/files/m17n-lib-1.5.2-fribidi.patch16
-rw-r--r--dev-libs/m17n-lib/files/m17n-lib-configure.patch80
-rw-r--r--dev-libs/m17n-lib/files/m17n-lib-gui.patch13
-rw-r--r--dev-libs/m17n-lib/files/m17n-lib-ispell.patch11
-rw-r--r--dev-libs/m17n-lib/files/m17n-lib-parallel-make.patch61
-rw-r--r--dev-libs/m17n-lib/m17n-lib-1.5.2.ebuild59
-rw-r--r--dev-libs/m17n-lib/m17n-lib-1.6.3.ebuild63
-rw-r--r--dev-libs/m17n-lib/m17n-lib-1.6.4.ebuild73
-rw-r--r--dev-libs/m17n-lib/m17n-lib-1.7.0.ebuild84
-rw-r--r--dev-libs/m17n-lib/metadata.xml23
11 files changed, 499 insertions, 0 deletions
diff --git a/dev-libs/m17n-lib/Manifest b/dev-libs/m17n-lib/Manifest
new file mode 100644
index 000000000000..f6eef9231a28
--- /dev/null
+++ b/dev-libs/m17n-lib/Manifest
@@ -0,0 +1,16 @@
+AUX m17n-lib-1.5.2-fribidi.patch 379 SHA256 30dead6ce68a07679d28b61876d8a768626b18df94ef61778825f924aa5198e4 SHA512 cc9bd1057517b4a8e42df048b4c4976d86ae1e129ea1440cc0b2721a69adf70912d3e1dd6e64d43cbdd6ca6c5fef53b7fb03cbf3a48b2143e9f798a5bdca237e WHIRLPOOL b78c7813957be165575cb0affbf2d521edff0770975a97b612f6e5f179d7d1057dd71119d72c29bed8fc93fc0b770ea4bb088c11b62843d5313f5a2093fadedc
+AUX m17n-lib-configure.patch 3290 SHA256 e31a0f1951ed910407e33c87145c4c5541c590593c6798fe9120393c94298085 SHA512 01a5ef3f1efb1dd81cc569a797be6fab45247df92c9fb95ed72da44637bf0eedc310198b487c30a1727bd38f39e5868cf4921a61f4a130d459c17516976ea7dc WHIRLPOOL 980910501147a63314a1bd995c1a5bdc4f584d88efa482a45a72282f4a1ce71c9f225d030ed80ec7fe28d51d482f6a325d028029022c68942a12a9decf701a9a
+AUX m17n-lib-gui.patch 365 SHA256 a49d05bc8588d8c8df8892d1dac3367366e33d8d43a493cd70f8bd98b216c160 SHA512 792900e167d8ed47a006dd48f8cb0b0b58e239f1ab56751131de15179b917c5ec8251d00932dc5d0d2fec8c51b2532606e958e90c943f6360a3442a02b76f445 WHIRLPOOL 4450e8fcd086db45fad25ddb05248b40ed0e2c3601892e916fa10c005f4c34e5fc9b5fdd914e04e0dfac6cf6c6569a1f0152129d5eb0a585510798a4f54c898e
+AUX m17n-lib-ispell.patch 458 SHA256 895ec8af2583b465a6e1fab86709c8a512e1ca8763dd3220df4997e4d2980800 SHA512 cbfbd70a1b6d7525627ad8d87c3b2d79f8bfbd74915da5b6f8646a5ab7cbb351abb7a1ea103320faaa4cf80fa0a58d0adf7d9b3a7cc0ee40e8bb4220dd92574c WHIRLPOOL d5ea9acc693c9676f6c01c86f7115825d3b692453b958e572497bbae3379478456b5d081eed2f075946c0d9004d238037e30dad8dfa652d61e7d47ce879132a8
+AUX m17n-lib-parallel-make.patch 2379 SHA256 d6c98a488155449652c02bf436252c9e777129c3e727fc2acc7f3e91aea77cd3 SHA512 a1726270680ab0124764a092aca36369e89a21b0164b039d5663cb0af8352b316ed59bec049dc849201f046bcb7bbcf3dd8522bbc7ab20ef64c59d898274eef1 WHIRLPOOL 3800d05b8b466991dcbe0a08a05a1389ab2485743e4239ad476771e54e1470b2791263be3c80f69edd8ea23aca8449f9b81a9819b1f0b846c6582398dccd4a42
+DIST m17n-lib-1.5.2.tar.gz 997592 SHA256 389cc05194e9a1f9e58b186c3fcd60d7fee2a6f627c3ea8f9c944d69983721f1 SHA512 899959ad7d6b32b7ec0a97eca5abf2a3a4e9d44d81b5157bc974b17544db4e59550bc04b0b2d46371dc57f64c7e0aa70ebb7d473ade3a762f40acf19ac19b072 WHIRLPOOL 9483d3fcc97aad78b44dd228e8c800e5147cc7c7758e72b87e4875960abe0f8d5b34ab669ec858da4d1792c1c3b58dc3669f4ced9bf8f151924f0d44dbf7b3e0
+DIST m17n-lib-1.6.3.tar.gz 1033048 SHA256 ff5ebe09572a5e6d4a376783a78d4355f0b17a71fbaf8b01978230be7eef735e SHA512 66177e5be17e330230d31bfff8a3cc7415ad79f9bfaf8f4c4baea02f1f19bf2d3628210c697a9b14d07dcb9bac8ca256e6c5102cbaae65876bf49aa2150cfd80 WHIRLPOOL ac337d68c4cfd0f9c331ded71a16c4d86f2d4c655a59f17da92fc8a80ed6f420af97ceb2ff071d556aaee0cf73baae9736faed32aaa58538d59a44f27a981c53
+DIST m17n-lib-1.6.4.tar.gz 1034422 SHA256 0370fda16bce321acad96b623dbbead0d797d86f5d5fa43d0cde8ff3b01555a4 SHA512 751f22efdaf4fb3e23d17ca07e20c65c59d60ff4f90a384bd9a8e9e8b01503d87c76cfc4c3c9717d8549a08c705b1c444939816a7eb07ca77b029b4f457f58c3 WHIRLPOOL d5bdfbb072a557f8e37307a4de56a9d2eb24c637afb885f294ab1970d8ca916bc53354ae7ca0fb4c6eaf445c955b60b79a0718c4e72af533a844d770a7b36a8c
+DIST m17n-lib-1.7.0.tar.gz 1063169 SHA256 8eb853e1e0c86a70a09871f3264f950e5d62bba98960b3ffcde11511c138db83 SHA512 26fc1be02a5e487a2fa5f2f63d991f3c745aa1b78e20d931fe4b265125266501cc8d402aa3cb5c1b71a7d4c0f7a0bf5b2c3b17ec5f4f8e0f5ee3052ad4e205b7 WHIRLPOOL ea677f51af7eae80cffb8fcf3e09acb73d6483391a9e776de860137ad19c27c5472394367f4181a63e43891c3514a4b59dc635cfd83ab0e545560f368144878b
+EBUILD m17n-lib-1.5.2.ebuild 1353 SHA256 1cb703d5b5fd0915bd1242a66ea0cb8132ea160159ed4265486d469d6cef7517 SHA512 0d78a72cad467a2c392f1a61b21c37feb7f5f2c13e7530c395dcf8975764c5286eadf20bc2b070af54df0a3c072e439a9ddba3a032c86fbaafa9d8d6f6dab815 WHIRLPOOL 2378e0eb2cb2a7e43f6d30d298d174350cabb66721cde24e682d07e277c31ef9c2b9854b01c4a92b7e06f759e90ce0ca50496cc99b75a993d49d6486b4bda3c0
+EBUILD m17n-lib-1.6.3.ebuild 1243 SHA256 ddf7c9ebea5447fdc8807e3bdf7d6c6527a17ec10798617b3af35ccfed7f71b1 SHA512 fd406846f8b9fbb807d52284b5a0b2414aa77291fd3ce164cc8ed7b1ad1134c1fb701116db1052d209358bd308139ce0f348f291e97aeead3e18bbb4ccb5c907 WHIRLPOOL c478db1366b5e2f342bebe76f6a32ad2ca78672b024a0e9c35232a51e0a61ccb542b4d003e3f9c5035e37fd7f83e168496cf34ee3c82d2c9a6ad95b4ddd0a771
+EBUILD m17n-lib-1.6.4.ebuild 1857 SHA256 dc655f8722d8c3205e3002415411214dc114723503e70916f9b178aa86993a2f SHA512 dc39e2a31c78633892e99721fdd99c14ac5c04413a39f9982c38b300f7baa393e9054712ba0c03e43231f772f6648a4814f2491c17c5c505daa54110385e43d1 WHIRLPOOL 87523707fd9858e72e8b5dda1d1ca6dc346baabd5668add99dd49bf77b4c04c7dfa671fa573f9b39a52ae8a06ad7f274a0528ff8a30e925b51e5c4516ce574ee
+EBUILD m17n-lib-1.7.0.ebuild 1706 SHA256 39fc7dc07180a291226f360b44a29c38b86b0c5057e7a76153bbd4b973d76c5c SHA512 4db0843cce13a5d8d1459ffbebe9f99d1c3a953672beba689aa518f34001e75f3e5cd79b97c7af648ada339a99c29a2f072c88496cce610e70a7be6d2dca11bd WHIRLPOOL 7a8049fcb8d8b69803d409f2dbc51ff2fb9e5f0036a8ad9e6e8d9af240af8dc677594cae6daa8f74d01368e440113e4d1ced09fb1a69bb231b4dc095bcad623e
+MISC ChangeLog 3387 SHA256 ae7965ed07a33dd431f919d1f0521de3c31a736329b37ac5613b82825087f54e SHA512 017b06441caac2e2003038dfd5a67ce8f9f31e32731dea330cd9eb31cc2a0cbee95c34ab952e0dbb9de4a88acfa6e8dd052bb88bc0e26c2caf531e13fb294d7f WHIRLPOOL 977f04914e4600cacc398ceb8caa3c05c217fb20ccb1db99eeeb3e836a478f2ce2a6d1d06a817d83ca286c091769b6c8b685ad273f8bb1a7b750422b443e01f5
+MISC ChangeLog-2015 8232 SHA256 7613efc07cec4fc6949d29eb4d037c14e5f816bbe44144a5cb32c2616f3190bc SHA512 902a015a49fbe6b61be5a2f7b845d37d7d3eb45d6b5fb66a7926495fe83981503adfdba34a57853c69ffe5486a6b90c1c7d66a4df2870ca75332a614595ebbba WHIRLPOOL 7d79e0d97d826e2c19692176aec1d9e42d127b61c21317e36986d37a832156e0aba231e632a8bfe1c730df3d4f7f9a9c08a0a011d2f4147cbb5848d771b331b9
+MISC metadata.xml 873 SHA256 3bc9fbc3db6b479c3b8ad0fc1730be58b8a9d68aba1a5e95691f386c34af92e5 SHA512 e0318084f83ee510dee477bb9b6396a81dfe4afbdc407daecc49d51c037217002686af4db286e4bcd6a158061ca0a77822f3853f25f12db5a384a3fafdd38291 WHIRLPOOL 3a41db62f5e9070d4b23893ebf1c38984f932b42010aa4a8745450cd1ca9929dd0dd37da607d3c9a93a8dec2570c739a823efb8da38b3a3c48c71f10fc0e568e
diff --git a/dev-libs/m17n-lib/files/m17n-lib-1.5.2-fribidi.patch b/dev-libs/m17n-lib/files/m17n-lib-1.5.2-fribidi.patch
new file mode 100644
index 000000000000..cfc298e320e7
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-1.5.2-fribidi.patch
@@ -0,0 +1,16 @@
+diff --git a/src/draw.c b/src/draw.c
+index f9667d0..1ba6cf6 100644
+--- a/src/draw.c
++++ b/src/draw.c
+@@ -1750,7 +1750,11 @@ mdraw__init ()
+ MbidiS = msymbol ("S");
+ MbidiNSM = msymbol ("NSM");
+ #ifdef HAVE_FRIBIDI
++#if FRIBIDI_INTERFACE_VERSION < 3
+ fribidi_set_mirroring (TRUE);
++#else
++ fribidi_set_mirroring (1);
++#endif
+ #endif
+
+ M_break_at_space = msymbol ("bs");
diff --git a/dev-libs/m17n-lib/files/m17n-lib-configure.patch b/dev-libs/m17n-lib/files/m17n-lib-configure.patch
new file mode 100644
index 000000000000..00ba09493f3d
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-configure.patch
@@ -0,0 +1,80 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -125,7 +125,9 @@ if test "x$no_x" != "xyes"; then
+ X11_LD_FLAGS="-lXt -lX11"
+ M17N_EXT_LIBS="$M17N_EXT_LIBS X11"
+
+- if test "x$HAVE_XAW" = "xyes"; then
++ AC_ARG_WITH(athena,
++ AS_HELP_STRING([--with-athena],[with MIT Athena widget suport]))
++ if test "x$with_athena" != "xno" -a "x$HAVE_XAW" = "xyes"; then
+ AC_DEFINE(HAVE_X11_XAW_COMMAND_H, 1,
+ [Define to 1 if you have the Xaw header files.])
+ XAW_LD_FLAGS="-lXaw -lXmu"
+@@ -149,7 +151,9 @@ else
+ fi
+ AC_CHECK_LIB(fribidi, fribidi_set_mirroring, HAVE_FRIBIDI=yes, HAVE_FRIBIDI=no)
+ AC_CHECK_HEADER(fribidi/fribidi.h,, HAVE_FRIBIDI=no)
+-if test "x$HAVE_FRIBIDI" = "xyes"; then
++AC_ARG_WITH(fribidi,
++ AS_HELP_STRING([--with-fribidi],[with fribidi suport]))
++if test "x$with_fribidi" != "xno" -a "x$HAVE_FRIBIDI" = "xyes"; then
+ AC_DEFINE(HAVE_FRIBIDI, 1,
+ [Define to 1 if you have Fribidi library and header file.])
+ M17N_EXT_LIBS="$M17N_EXT_LIBS fribidi"
+@@ -202,8 +206,10 @@ fi
+ AC_SUBST(OTF_LD_FLAGS)
+
+ dnl Check for Freetype2 usability.
++AC_ARG_WITH(freetype,
++ AS_HELP_STRING([--with-freetype],[enable Freetype support]))
+ AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes)
+-if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
++if test "x$with_freetype" != "xno" -a "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
+ FREETYPE_INC=`freetype-config --cflags`
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $FREETYPE_INC"
+@@ -255,7 +261,9 @@ AC_CHECK_HEADER(X11/Xft/Xft.h,, HAVE_XFT2=no,
+ #else
+ Version too old. Compiling this line should fail.
+ #endif])
+-if test "x$HAVE_XFT2" = "xyes"; then
++AC_ARG_WITH(xft,
++ AS_HELP_STRING([--with-xft],[enable Xft2 support]))
++if test "x$with_xft" != "xno" -a "x$HAVE_XFT2" = "xyes"; then
+ AC_DEFINE(HAVE_XFT2, 1,
+ [Define to 1 if you have Xft2 library and header file.])
+ M17N_EXT_LIBS="$M17N_EXT_LIBS xft2"
+@@ -330,7 +338,9 @@ else
+ fi
+ AC_CHECK_LIB(xml2, xmlParseMemory, HAVE_XML2=yes, HAVE_XML2=no)
+ AC_CHECK_HEADER(libxml/tree.h,, HAVE_XML2=no, /**/)
+-if test "x$HAVE_XML2" = "xyes"; then
++AC_ARG_WITH(libxml2,
++ AS_HELP_STRING([--with-libxml2],[with libxml2 suport]))
++if test "x$with_libxml2" != "xno" -a "x$HAVE_XML2" = "xyes"; then
+ AC_DEFINE(HAVE_XML2, 1,
+ [Define to 1 if you have libxml2 library and header file])
+ M17N_EXT_LIBS="$M17N_EXT_LIBS xml2"
+@@ -344,7 +354,9 @@ AC_SUBST(XML2_LD_FLAGS)
+ dnl Check for Anthy usability.
+
+ PKG_CHECK_MODULES(ANTHY, anthy, HAVE_ANTHY=yes, HAVE_ANTHY=no)
+-if test "x$HAVE_ANTHY" = "xyes"; then
++AC_ARG_WITH(anthy,
++ AS_HELP_STRING([--with-anthy],[with anthy suport]))
++if test "x$with_anthy" != "xno" -a "x$HAVE_ANTHY" = "xyes"; then
+ AC_DEFINE(HAVE_ANTHY, 1,
+ [Define to 1 if you have Anthy library and header file])
+ M17N_EXT_LIBS="$M17N_EXT_LIBS anthy"
+@@ -355,7 +367,9 @@ AC_SUBST(ANTHY_LD_FLAGS)
+
+ dnl Check for Ispell usability.
+ AC_CHECK_PROG(HAVE_ISPELL, ispell, yes)
+-if test "x$HAVE_ISPELL" = "xyes"; then
++AC_ARG_WITH(ispell,
++ AS_HELP_STRING([--with-ispell],[with ispell suport]))
++if test "x$with_ispell" != "xno" -a "x$HAVE_ISPELL" = "xyes"; then
+ AC_DEFINE(HAVE_ISPELL, 1, [Define if ispell is available.])
+ M17N_EXT_LIBS="$M17N_EXT_LIBS ispell"
+ CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ISPELL"
diff --git a/dev-libs/m17n-lib/files/m17n-lib-gui.patch b/dev-libs/m17n-lib/files/m17n-lib-gui.patch
new file mode 100644
index 000000000000..b60d81bbc221
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-gui.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -97,8 +97,8 @@
+
+ dnl Checks which levels of APIs should be compiled.
+
+-AC_ARG_ENABLE(gui,
+- AS_HELP_STRING([--enable-gui],[enable GUI level APIs (default is YES)]))
++AC_ARG_WITH(gui,
++ AS_HELP_STRING([--with-gui],[enable GUI level APIs (default is YES)]))
+
+ AM_CONDITIONAL(WITH_GUI, test x$with_gui != xno)
+
diff --git a/dev-libs/m17n-lib/files/m17n-lib-ispell.patch b/dev-libs/m17n-lib/files/m17n-lib-ispell.patch
new file mode 100644
index 000000000000..c9f87fb1c6d0
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-ispell.patch
@@ -0,0 +1,11 @@
+--- a/example/mimx-ispell.c
++++ b/example/mimx-ispell.c
+@@ -166,7 +166,7 @@ ispell_word (MPlist *args)
+ return add_action (actions, msymbol ("shift"), Msymbol, init_state);
+
+ buf[nbytes] = '\0';
+- sprintf (command, "echo %s | ispell -a -m", (char *) buf);
++ sprintf (command, "echo %s | ispell-aspell -a -m", (char *) buf);
+ ispell = popen (command, "r");
+ if (! ispell)
+ return add_action (actions, msymbol ("shift"), Msymbol, init_state);
diff --git a/dev-libs/m17n-lib/files/m17n-lib-parallel-make.patch b/dev-libs/m17n-lib/files/m17n-lib-parallel-make.patch
new file mode 100644
index 000000000000..a035921d055c
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-parallel-make.patch
@@ -0,0 +1,61 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -53,7 +53,7 @@
+ language.h language.c \
+ mlocale.h locale.c \
+ m17n.h m17n.c
+-libm17n_la_LIBADD = ${top_builddir}/src/libm17n-core.la -ldl
++libm17n_la_LIBADD = libm17n-core.la -ldl
+ libm17n_la_LDFLAGS = -export-dynamic ${VINFO}
+
+ FLT_SOURCES = \
+@@ -61,7 +61,7 @@
+ m17n-flt.h m17n-flt.c
+
+ libm17n_flt_la_SOURCES = ${FLT_SOURCES}
+-libm17n_flt_la_LIBADD = ${top_builddir}/src/libm17n-core.la
++libm17n_flt_la_LIBADD = libm17n-core.la
+ libm17n_flt_la_LDFLAGS = -export-dynamic ${VINFO}
+
+ GUI_SOURCES = \
+@@ -80,7 +80,7 @@
+ @FONTCONFIG_LD_FLAGS@
+
+ libm17n_gui_la_SOURCES = ${GUI_SOURCES}
+-libm17n_gui_la_LIBADD = ${OPTIONAL_LD_FLAGS} ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la
++libm17n_gui_la_LIBADD = ${OPTIONAL_LD_FLAGS} libm17n-core.la libm17n.la libm17n-flt.la
+ libm17n_gui_la_LDFLAGS = -export-dynamic ${VINFO}
+
+ if WITH_GUI
+@@ -90,11 +90,11 @@
+ X_LD_FLAGS = ${X_PRE_LIBS} ${X_LIBS} @X11_LD_FLAGS@ ${X_EXTRA_LIBS}
+
+ libm17n_X_la_SOURCES = m17n-X.h m17n-X.c
+-libm17n_X_la_LIBADD = ${X_LD_FLAGS} @XFT2_LD_FLAGS@ @FONTCONFIG_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
++libm17n_X_la_LIBADD = ${X_LD_FLAGS} @XFT2_LD_FLAGS@ @FONTCONFIG_LD_FLAGS@ libm17n-core.la libm17n.la libm17n-flt.la libm17n-gui.la
+ libm17n_X_la_LDFLAGS = -avoid-version -module
+
+ libm17n_gd_la_SOURCES = m17n-gd.c
+-libm17n_gd_la_LIBADD = @GD_LD_FLAGS@ @FREETYPE_LD_FLAGS@ ${top_builddir}/src/libm17n-core.la ${top_builddir}/src/libm17n.la ${top_builddir}/src/libm17n-flt.la ${top_builddir}/src/libm17n-gui.la
++libm17n_gd_la_LIBADD = @GD_LD_FLAGS@ @FREETYPE_LD_FLAGS@ libm17n-core.la libm17n.la libm17n-flt.la libm17n-gui.la
+ libm17n_gd_la_LDFLAGS = -avoid-version -module
+
+ endif
+@@ -121,14 +121,14 @@
+ noinst_PROGRAMS = linkcore linkshell linkgui
+
+ linkcore_SOURCES = linkcore.c
+-linkcore_LDADD = ${top_builddir}/src/libm17n-core.la
++linkcore_LDADD = libm17n-core.la
+ linkcore_LDFLAGS = -static
+
+ linkshell_SOURCES = linkshell.c
+-linkshell_LDADD = ${top_builddir}/src/libm17n.la
++linkshell_LDADD = libm17n.la
+ linkshell_LDFLAGS = -static
+
+ linkgui_SOURCES = linkgui.c
+-linkgui_LDADD = ${top_builddir}/src/libm17n-gui.la
++linkgui_LDADD = libm17n-gui.la
+ linkgui_LDFLAGS = -static
+ endif
diff --git a/dev-libs/m17n-lib/m17n-lib-1.5.2.ebuild b/dev-libs/m17n-lib/m17n-lib-1.5.2.ebuild
new file mode 100644
index 000000000000..2978c5954358
--- /dev/null
+++ b/dev-libs/m17n-lib/m17n-lib-1.5.2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Multilingual Library for Unix/Linux"
+HOMEPAGE="https://savannah.nongnu.org/projects/m17n"
+SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86"
+#IUSE="anthy gd ispell"
+IUSE="gd"
+
+RDEPEND="x11-libs/libXaw
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXrender
+ x11-libs/libXft
+ dev-libs/libxml2
+ dev-libs/fribidi
+ >=media-libs/freetype-2.1
+ media-libs/fontconfig
+ gd? ( media-libs/gd )
+ >=dev-libs/libotf-0.9.4
+ >=dev-db/m17n-db-${PV}"
+# linguas_th? ( || ( app-i18n/libthai app-i18n/wordcut ) )
+# anthy? ( app-i18n/anthy )
+# ispell? ( app-text/ispell )
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ if use gd && ! built_with_use media-libs/gd png ; then
+ eerror "m17n-lib requires GD to be built with png support. Please add"
+ eerror "'png' to your USE flags, and re-emerge media-libs/gd."
+ die "Missing USE flag."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-fribidi.patch
+}
+
+src_compile() {
+ append-flags -fPIC
+ econf $(use_with gd) || die
+ emake -j1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
+}
diff --git a/dev-libs/m17n-lib/m17n-lib-1.6.3.ebuild b/dev-libs/m17n-lib/m17n-lib-1.6.3.ebuild
new file mode 100644
index 000000000000..3ef131f92f82
--- /dev/null
+++ b/dev-libs/m17n-lib/m17n-lib-1.6.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="Multilingual Library for Unix/Linux"
+HOMEPAGE="https://savannah.nongnu.org/projects/m17n"
+SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+#IUSE="anthy gd ispell"
+IUSE="gd X"
+
+RDEPEND="
+ X? (
+ x11-libs/libXaw
+ x11-libs/libXft
+ x11-libs/libX11
+ gd? ( media-libs/gd[png] )
+ dev-libs/fribidi
+ >=media-libs/freetype-2.1
+ media-libs/fontconfig
+ >=dev-libs/libotf-0.9.4
+ )
+ dev-libs/libxml2
+ ~dev-db/m17n-db-${PV}"
+# linguas_th? ( || ( app-i18n/libthai app-i18n/wordcut ) )
+# anthy? ( app-i18n/anthy )
+# ispell? ( app-text/ispell )
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-gui.patch \
+ "${FILESDIR}"/${PN}-parallel-make.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use X; then
+ myconf+=" --with-gui $(use_with gd)"
+ else
+ myconf+=" --without-gui --without-gd"
+ fi
+
+ econf ${myconf} || die
+}
+
+src_install() {
+ # bug #363239
+ emake -j1 DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/dev-libs/m17n-lib/m17n-lib-1.6.4.ebuild b/dev-libs/m17n-lib/m17n-lib-1.6.4.ebuild
new file mode 100644
index 000000000000..ccfe005ab6f9
--- /dev/null
+++ b/dev-libs/m17n-lib/m17n-lib-1.6.4.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils autotools
+
+DESCRIPTION="Multilingual Library for Unix/Linux"
+HOMEPAGE="https://savannah.nongnu.org/projects/m17n"
+SRC_URI="http://download.savannah.gnu.org/releases/m17n/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc ppc64 sparc x86"
+IUSE="anthy athena anthy bidi fontconfig gd spell libotf libxml2 X xft"
+
+RDEPEND="
+ anthy? ( app-i18n/anthy )
+ spell? ( app-text/aspell )
+ libxml2? ( dev-libs/libxml2 )
+ X? (
+ athena? ( x11-libs/libXaw )
+ bidi? ( dev-libs/fribidi )
+ fontconfig? ( media-libs/fontconfig )
+ gd? ( media-libs/gd[png] )
+ libotf? ( >=dev-libs/libotf-0.9.4 )
+ xft? (
+ >=media-libs/freetype-2.1
+ x11-libs/libXft )
+ x11-libs/libX11
+ )
+ ~dev-db/m17n-db-${PV}"
+# athena? ( x11-libs/libXaw )
+# athena shoud be enabled to build m17n-edit properly when X is enabled.
+
+# linguas_th? ( || ( app-i18n/libthai app-i18n/wordcut ) )
+#
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-gui.patch \
+ "${FILESDIR}"/${PN}-parallel-make.patch \
+ "${FILESDIR}"/${PN}-configure.patch \
+ "${FILESDIR}"/${PN}-ispell.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="$(use_with anthy) $(use_with spell ispell) $(use_with libxml2)"
+
+ if use X; then
+ myconf+=" --with-x --with-gui $(use_with athena) $(use_with bidi fribidi)
+$(use_with fontconfig) $(use_with xft freetype) $(use_with gd) $(use_with libotf)
+$(use_with xft)"
+ else
+ myconf+=" --without-x --without-gui --without-athena --without-fribidi
+--without-fontconfig --without-freetype --without-gd --without-libotf
+--without-xft"
+ fi
+
+ econf ${myconf} || die
+}
+
+src_install() {
+ # bug #363239
+ emake -j1 DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/dev-libs/m17n-lib/m17n-lib-1.7.0.ebuild b/dev-libs/m17n-lib/m17n-lib-1.7.0.ebuild
new file mode 100644
index 000000000000..fc89235d9280
--- /dev/null
+++ b/dev-libs/m17n-lib/m17n-lib-1.7.0.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools
+
+DESCRIPTION="Multilingual Library for Unix/Linux"
+HOMEPAGE="https://savannah.nongnu.org/projects/m17n"
+SRC_URI="mirror://nongnu/m17n/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="X anthy athena bidi fontconfig gd libotf libxml2 spell xft"
+
+RDEPEND="~dev-db/m17n-db-${PV}
+ X? (
+ x11-libs/libX11
+ athena? ( x11-libs/libXaw )
+ bidi? ( dev-libs/fribidi )
+ fontconfig? ( media-libs/fontconfig )
+ gd? ( media-libs/gd[png] )
+ libotf? ( dev-libs/libotf )
+ xft? (
+ media-libs/freetype
+ x11-libs/libXft
+ )
+ )
+ anthy? ( app-i18n/anthy )
+ libxml2? ( dev-libs/libxml2 )
+ spell? ( app-text/aspell )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-configure.patch
+ "${FILESDIR}"/${PN}-gui.patch
+ "${FILESDIR}"/${PN}-ispell.patch
+ "${FILESDIR}"/${PN}-parallel-make.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+ # workaround for parallel install
+ sed -i "/^install-module/s/:/: install-libLTLIBRARIES/" src/Makefile.in
+}
+
+src_configure() {
+ local myconf=(
+ $(use_with anthy)
+ $(use_with libxml2)
+ $(use_with spell ispell)
+ )
+ if use X; then
+ myconf+=(
+ $(use_with athena)
+ $(use_with bidi fribidi)
+ $(use_with fontconfig)
+ $(use_with xft freetype)
+ $(use_with gd)
+ --with-gui
+ $(use_with libotf)
+ --with-x
+ $(use_with xft)
+ )
+ else
+ myconf+=(
+ --without-athena
+ --without-fontconfig
+ --without-freetype
+ --without-fribidi
+ --without-gd
+ --without-gui
+ --without-libotf
+ --without-x
+ --without-xft
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
diff --git a/dev-libs/m17n-lib/metadata.xml b/dev-libs/m17n-lib/metadata.xml
new file mode 100644
index 000000000000..0c2995cb954a
--- /dev/null
+++ b/dev-libs/m17n-lib/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="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+ <use>
+ <flag name="X">Build the Graphical User Interface API and utilities</flag>
+ <flag name="anthy">
+ Enable support for <pkg>app-i18n/anthy</pkg> input method
+ </flag>
+ <flag name="athena">
+ Enable the MIT Athena widget set (<pkg>x11-libs/libXaw</pkg>)
+ </flag>
+ <flag name="gd">
+ Build API and utilities based on <pkg>media-libs/gd</pkg>. This
+ flag is only meaningful if the X USE flag is also enabled.
+ </flag>
+ <flag name="libotf">Use <pkg>dev-libs/libotf</pkg> to handle OpenType fonts</flag>
+ <flag name="libxml2">Use <pkg>dev-libs/libxml2</pkg> to parse XML</flag>
+ </use>
+</pkgmetadata>