commit:     fd1ac67f02506d3ac6800ab279568570d7816126
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 27 12:48:06 2024 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Thu Jun 27 12:50:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd1ac67f

dev-libs/m17n-lib: new upstream release

Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 dev-libs/m17n-lib/Manifest                       |   1 +
 dev-libs/m17n-lib/files/m17n-lib-configure.patch | 125 +++++++++++++++++++++++
 dev-libs/m17n-lib/m17n-lib-1.8.4.ebuild          |  89 ++++++++++++++++
 dev-libs/m17n-lib/metadata.xml                   |   3 +
 4 files changed, 218 insertions(+)

diff --git a/dev-libs/m17n-lib/Manifest b/dev-libs/m17n-lib/Manifest
index 3cda17fa644a..6546802fbd52 100644
--- a/dev-libs/m17n-lib/Manifest
+++ b/dev-libs/m17n-lib/Manifest
@@ -1 +1,2 @@
 DIST m17n-lib-1.8.0.tar.gz 1091731 BLAKE2B 
a4b55fbc3246fe0865dcf1647e91d03de6ead06fb4349ba207613cdea6bb079c0e7623510a6fb046dce4bfefd262f68c41c9174d29a2b4a6f673da298642e1cb
 SHA512 
8aba862888393232172c03cdf52531e29ea969c4327e6f69879ecf7438eafee32782f509ec292b3e1b7cd3202e2764984d7a59e85cdb87a7c8bfcbac5b0ee6fd
+DIST m17n-lib-1.8.4.tar.gz 1119271 BLAKE2B 
790a002e0abd66d7db0d61ab0240712b2810e698c73d507a5054ad83d4a7a7258c4407d5167ce92fc4c1f3acdfc9f8d3244634af801cde2a00762f09d5e1d823
 SHA512 
7e322788aed8a758a8c289112433aabccd12dacf14b247ba9060503bcc44930c9251f0c4e718987b9a151de097e72bc1e07c8096f7f4ad83a7d7183a549721d6

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..27a05fd97865
--- /dev/null
+++ b/dev-libs/m17n-lib/files/m17n-lib-configure.patch
@@ -0,0 +1,125 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -96,8 +96,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)
+ 
+@@ -125,6 +125,9 @@
+   X11_LD_FLAGS="-lXt -lX11"
+   M17N_EXT_LIBS="$M17N_EXT_LIBS X11"
+ 
++  AC_ARG_WITH(athena,
++            AS_HELP_STRING([--with-athena],[with X Athena Widget suport]))
++  if test "x$with_athena" != "xno"; then
+   if test "x$HAVE_XAW" = "xyes"; then
+     AC_DEFINE(HAVE_X11_XAW_COMMAND_H, 1,
+             [Define to 1 if you have the Xaw header files.])
+@@ -132,11 +135,15 @@
+     CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_X11_XAW_COMMAND_H"
+     M17N_EXT_LIBS="$M17N_EXT_LIBS Xaw"
+   fi
++  fi
+ fi
+ AC_SUBST(X11_LD_FLAGS)
+ AC_SUBST(XAW_LD_FLAGS)
+ 
+ dnl Check for fribidi library.
++AC_ARG_WITH(fribidi,
++          AS_HELP_STRING([--with-fribidi],[with FriBidi suport]))
++if test "x$with_fribidi" != "xno"; then
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ AC_CHECK_PROG(HAVE_FRIBIDI_CONFIG, fribidi-config, yes)
+@@ -158,6 +165,7 @@
+   FRIBIDI_LD_FLAGS=
+ fi
+ LIBS="$save_LIBS"
++fi
+ AC_SUBST(FRIBIDI_LD_FLAGS)
+ 
+ dnl Check for otflib usability.
+@@ -201,6 +209,9 @@
+ AC_SUBST(OTF_LD_FLAGS)
+ 
+ dnl Check for Freetype2 usability.
++AC_ARG_WITH(freetype,
++          AS_HELP_STRING([--with-freetype],[with FreeType support]))
++if test "x$with_freetype" != "xno"; then
+ PKG_CHECK_MODULES([FREETYPE], [freetype2], [HAVE_FREETYPE=yes],
+                                            [HAVE_FREETYPE=no])
+ AS_IF([test "x$HAVE_FREETYPE" = "xyes"],
+@@ -220,9 +231,13 @@
+   ],
+   []
+   )
++fi
+ AC_SUBST([FREETYPE_LD_FLAGS])
+ 
+ dnl Check for Xft2 usability.
++AC_ARG_WITH(xft,
++          AS_HELP_STRING([--with-xft],[with Xft support]))
++if test "x$with_xft" != "xno"; then
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ XFT2_LD_FLAGS="-lXft -lfreetype -lfontconfig -lXrender -lX11"
+@@ -253,6 +268,7 @@
+   CPPFLAGS="$save_CPPFLAGS"
+ fi
+ LIBS="$save_LIBS"
++fi
+ AC_SUBST(XFT2_LD_FLAGS)
+ 
+ dnl Check for fontconfig usability.
+@@ -306,6 +322,9 @@
+ fi
+ 
+ dnl Check for libxml2 usability.
++AC_ARG_WITH(libxml2,
++          AS_HELP_STRING([--with-libxml2],[with libxml2 suport]))
++if test "x$with_libxml2" != "xno"; then
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ AC_CHECK_PROG(HAVE_XML2_CONFIG, xml2-config, yes)
+@@ -328,10 +347,13 @@
+   CPPFLAGS="$save_CPPFLAGS"
+ fi
+ LIBS="$save_LIBS"
++fi
+ AC_SUBST(XML2_LD_FLAGS)
+ 
+ dnl Check for Anthy usability.
+-
++AC_ARG_WITH(anthy,
++          AS_HELP_STRING([--with-anthy],[with Anthy suport]))
++if test "x$with_anthy" != "xno"; then
+ PKG_CHECK_MODULES(ANTHY, anthy, HAVE_ANTHY=yes, HAVE_ANTHY=no)
+ if test "x$HAVE_ANTHY" = "xyes"; then
+   AC_DEFINE(HAVE_ANTHY, 1,
+@@ -340,15 +362,20 @@
+   ANTHY_LD_FLAGS="$ANTHY_LIBS"
+   CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ANTHY"
+ fi
++fi
+ AC_SUBST(ANTHY_LD_FLAGS)
+ 
+ dnl Check for Ispell usability.
++AC_ARG_WITH(ispell,
++          AS_HELP_STRING([--with-ispell],[with Ispell suport]))
++if test "x$with_ispell" != "xno"; then
+ AC_CHECK_PROG(HAVE_ISPELL, ispell, yes)
+ if test "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"
+ fi
++fi
+ 
+ dnl Check for Thai word-segmentation library.
+ dnl If we have one, define HAVE_THAI_WORDSEG and one of these:

diff --git a/dev-libs/m17n-lib/m17n-lib-1.8.4.ebuild 
b/dev-libs/m17n-lib/m17n-lib-1.8.4.ebuild
new file mode 100644
index 000000000000..9d9d1f79ba11
--- /dev/null
+++ b/dev-libs/m17n-lib/m17n-lib-1.8.4.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit autotools
+
+DESCRIPTION="Multilingual Library for Unix/Linux"
+HOMEPAGE="https://www.nongnu.org/m17n/";
+SRC_URI="mirror://nongnu/m17n/${P}.tar.gz"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv 
~sparc ~x86"
+IUSE="X anthy athena bidi fontconfig gd libotf libxml2 spell xft"
+
+RDEPEND=">=dev-db/m17n-db-${PV}
+       X? (
+               x11-libs/libX11
+               x11-libs/libXt
+               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}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-configure.patch
+       "${FILESDIR}"/${PN}-freetype.patch
+       "${FILESDIR}"/${PN}-ispell.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[@]}"
+}
+
+src_install() {
+       default
+       find "${ED}" -name '*.la' -delete || die
+}

diff --git a/dev-libs/m17n-lib/metadata.xml b/dev-libs/m17n-lib/metadata.xml
index b4b71f49542e..2803edba8c37 100644
--- a/dev-libs/m17n-lib/metadata.xml
+++ b/dev-libs/m17n-lib/metadata.xml
@@ -13,4 +13,7 @@
                <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>
+       <upstream>
+               <remote-id type="savannah-nongnu">m17n</remote-id>
+       </upstream>
 </pkgmetadata>

Reply via email to