public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/uim/files/, app-i18n/uim/
Date: Tue,  4 Oct 2022 07:09:41 +0000 (UTC)	[thread overview]
Message-ID: <1664867364.30832ee74d20c1c4c18b4e31c9f712e970029f03.sam@gentoo> (raw)

commit:     30832ee74d20c1c4c18b4e31c9f712e970029f03
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  4 06:31:59 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  4 07:09:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30832ee7

app-i18n/uim: fix build w/ Clang 16, >= openssl-1.1.1

This needs a lot more love, to be honest, but we already
have a huge stack of patches we apply, so I've resorted
to a -D hack in the ebuild for the OpenSSL 1.1.1 part
outside of configure.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-i18n/uim/files/uim-clang-16-configure.patch |  41 ++++
 app-i18n/uim/uim-1.8.9-r1.ebuild                | 246 ++++++++++++++++++++++++
 2 files changed, 287 insertions(+)

diff --git a/app-i18n/uim/files/uim-clang-16-configure.patch b/app-i18n/uim/files/uim-clang-16-configure.patch
new file mode 100644
index 000000000000..46e3bac01534
--- /dev/null
+++ b/app-i18n/uim/files/uim-clang-16-configure.patch
@@ -0,0 +1,41 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -601,6 +601,7 @@ if test "x$ac_cv_func_snprintf" = xyes; then
+ 	AC_RUN_IFELSE(
+ 		[AC_LANG_SOURCE([[
+ #include <stdio.h>
++#include <stdlib.h>
+ int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');}
+ 		]])],
+ 		[AC_MSG_RESULT(yes)],
+--- a/m4/openssl.m4
++++ b/m4/openssl.m4
+@@ -76,6 +76,7 @@ AC_MSG_CHECKING([OpenSSL header version])
+ AC_RUN_IFELSE(
+ 	[AC_LANG_SOURCE([[
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <openssl/opensslv.h>
+ #define DATA "conftest.sslincver"
+@@ -156,7 +157,9 @@ AC_ARG_WITH(openssl-header-check,
+ AC_MSG_CHECKING([whether OpenSSL's headers match the library])
+ AC_RUN_IFELSE(
+ 	[AC_LANG_SOURCE([[
++#include <stdlib.h>
+ #include <string.h>
++#include <openssl/crypto.h>
+ #include <openssl/opensslv.h>
+ int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
+ 	]])],
+@@ -220,8 +223,8 @@ int main(void) { DTLSv1_method(); }
+ AC_MSG_CHECKING([if programs using OpenSSL functions will link])
+ AC_LINK_IFELSE(
+ 	[AC_LANG_SOURCE([[
+-#include <openssl/evp.h>
+-int main(void) { SSLeay_add_all_algorithms(); }
++#include <openssl/crypto.h>
++int main(void) { OpenSSL_version_num(); }
+ 	]])],
+ 	[
+ 		AC_MSG_RESULT(yes)

diff --git a/app-i18n/uim/uim-1.8.9-r1.ebuild b/app-i18n/uim/uim-1.8.9-r1.ebuild
new file mode 100644
index 000000000000..5bc58c158713
--- /dev/null
+++ b/app-i18n/uim/uim-1.8.9-r1.ebuild
@@ -0,0 +1,246 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit autotools elisp-common flag-o-matic gnome2-utils qmake-utils
+
+EGIT_COMMIT="d1ac9d9315ff8c57c713b502544fef9b3a83b3e5"
+
+DESCRIPTION="A multilingual input method framework"
+HOMEPAGE="https://github.com/uim/uim"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="BSD GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~riscv ~x86"
+IUSE="X +anthy curl eb emacs expat libffi gtk gtk2 kde l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW libedit libnotify m17n-lib ncurses nls qt5 skk sqlite ssl static-libs xft"
+RESTRICT="test"
+REQUIRED_USE="gtk? ( X )
+	gtk2? ( X )
+	qt5? ( X )
+	xft? ( X )"
+
+CDEPEND="X? (
+		x11-libs/libICE
+		x11-libs/libSM
+		x11-libs/libX11
+		x11-libs/libXext
+		x11-libs/libXft
+		x11-libs/libXrender
+		x11-libs/libXt
+	)
+	anthy? ( app-i18n/anthy )
+	curl? ( net-misc/curl )
+	eb? ( dev-libs/eb )
+	emacs? ( >=app-editors/emacs-23.1:* )
+	expat? ( dev-libs/expat )
+	gtk? ( x11-libs/gtk+:3 )
+	gtk2? ( x11-libs/gtk+:2 )
+	kde? ( kde-frameworks/plasma:5 )
+	libedit? ( dev-libs/libedit )
+	libffi? ( dev-libs/libffi:= )
+	libnotify? ( x11-libs/libnotify )
+	m17n-lib? ( dev-libs/m17n-lib )
+	ncurses? ( sys-libs/ncurses:0= )
+	nls? ( virtual/libintl )
+	qt5? (
+		dev-qt/qtx11extras:5
+		dev-qt/qtwidgets:5
+	)
+	skk? ( app-i18n/skk-jisyo )
+	sqlite? ( dev-db/sqlite:3 )
+	ssl? ( dev-libs/openssl:0= )"
+DEPEND="${CDEPEND}
+	X? ( x11-base/xorg-proto )"
+RDEPEND="${CDEPEND}
+	!dev-scheme/sigscheme
+	X? (
+		media-fonts/font-sony-misc
+		l10n_ja? (
+			|| (
+				media-fonts/font-jis-misc
+				media-fonts/intlfonts
+			)
+		)
+		l10n_ko? (
+			|| (
+				media-fonts/font-daewoo-misc
+				media-fonts/intlfonts
+			)
+		)
+		l10n_zh-CN? (
+			|| (
+				media-fonts/font-isas-misc
+				media-fonts/intlfonts
+			)
+		)
+		l10n_zh-TW? ( media-fonts/intlfonts )
+	)"
+BDEPEND="gnome-base/librsvg
+	sys-devel/gettext
+	virtual/pkgconfig
+	kde? ( dev-util/cmake )
+	nls? ( dev-util/intltool )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-gentoo.patch
+	"${FILESDIR}"/${PN}-kde.patch
+	"${FILESDIR}"/${PN}-slibtool.patch
+	"${FILESDIR}"/${PN}-tinfo.patch
+	"${FILESDIR}"/${PN}-Wconversion.patch
+	"${FILESDIR}"/${PN}-xkb.patch
+	"${FILESDIR}"/${PN}-zh-TW.patch
+	"${FILESDIR}"/${PN}-clang-16-configure.patch
+)
+
+DOCS=( AUTHORS NEWS README RELNOTE doc )
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+	default
+	sed -i "s:\$libedit_path/lib:/$(get_libdir):g" configure.ac
+	use nls || sed -i "/^if .*USE_NLS/,/^fi/d" configure.ac
+	# fix build with "-march=pentium4 -O2", bug #661806
+	use x86 && append-cflags $(test-flags-CC -fno-inline-small-functions)
+
+	# Fix build w/ Clang 16+ and >= openssl 1.1.x, tries to use
+	# SSLv2_method otherwise.
+	append-cppflags -DOPENSSL_NO_SSL2
+
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=(
+		$(use_with X x)
+		$(use_with anthy anthy-utf8)
+		$(use_with curl)
+		$(use_with eb)
+		$(use_enable emacs)
+		$(use_with emacs lispdir "${SITELISP}")
+		$(use_with expat)
+		$(use_enable kde kde5-applet)
+		$(use_with libedit)
+		$(use_with libffi ffi)
+		$(use_with gtk gtk3)
+		$(use_with gtk2)
+		$(use_with m17n-lib m17nlib)
+		$(use_enable ncurses fep)
+		$(use_enable nls)
+		$(use_with qt5)
+		$(use_with qt5 qt5-immodule)
+		_QMAKE5=$(qt5_get_bindir)/qmake
+		$(use_with skk)
+		$(use_with sqlite sqlite3)
+		$(use_enable ssl openssl)
+		$(use_enable static-libs static)
+		$(use_with xft)
+		--without-anthy
+		--without-canna
+		--enable-default-toolkit=$(usex gtk gtk3 $(usex gtk2 gtk $(usex qt5 qt5)))
+		--disable-gnome-applet
+		--disable-gnome3-applet
+		--disable-kde-applet
+		--disable-kde4-applet
+		--without-mana
+		--enable-maintainer-mode
+		--without-prime
+		--disable-qt4-qt3support
+	)
+
+	if (use gtk || use gtk2) && use anthy; then
+		myconf+=( --enable-dict )
+	else
+		myconf+=( --disable-dict )
+	fi
+
+	if use libnotify; then
+		myconf+=( --enable-notify=libnotify )
+	fi
+
+	if use gtk || use gtk2 || use qt5; then
+		myconf+=( --enable-pref )
+	else
+		myconf+=( --disable-pref )
+	fi
+
+	econf "${myconf[@]}"
+}
+
+src_compile() {
+	default
+
+	if use emacs; then
+		cd emacs || die
+		elisp-compile *.el || die
+		cd - >/dev/null || die
+	fi
+}
+
+src_install() {
+	# bug #222677
+	emake -j1 DESTDIR="${D}" install
+	rm -f doc/Makefile*
+	einstalldocs
+
+	find "${ED}"/usr/$(get_libdir)/${PN} -name '*.la' -delete || die
+	use static-libs || find "${ED}" -name '*.la' -delete || die
+
+	insinto /etc/X11/xinit/xinput.d
+	sed \
+		-e "s:@EPREFIX@:${EPREFIX}:g" \
+		"${FILESDIR}"/xinput-${PN} > "${T}"/${PN}.conf
+	doins "${T}"/${PN}.conf
+
+	if use X; then
+		docinto xim
+		dodoc xim/README*
+	fi
+
+	if use emacs; then
+		elisp-install ${PN}-el emacs/*.el{,c}
+		elisp-site-file-install "${FILESDIR}"/${SITEFILE} ${PN}-el
+		docinto emacs
+		dodoc emacs/README*
+	fi
+
+	if use ncurses; then
+		docinto fep
+		dodoc fep/README*
+	fi
+}
+
+pkg_postinst() {
+	elog "New input method switcher has been introduced. You need to set"
+	elog
+	elog "% GTK_IM_MODULE=uim ; export GTK_IM_MODULE"
+	elog "% QT_IM_MODULE=uim ; export QT_IM_MODULE"
+	elog "% XMODIFIERS=@im=uim ; export XMODIFIERS"
+	elog
+	elog "If you would like to use uim-anthy as default input method, put"
+	elog "(define default-im-name 'anthy)"
+	elog "to your ~/.uim."
+	elog
+	elog "All input methods can be found by running uim-im-switcher-gtk, "
+	elog "uim-im-switcher-gtk3 or uim-im-switcher-qt5."
+
+	if use emacs; then
+		elisp-site-regen
+		elog
+		elog "uim is autoloaded with Emacs with a minimal set of features:"
+		elog "There is no keybinding defined to call it directly, so please"
+		elog "create one yourself and choose an input method."
+		elog "Integration with LEIM is not done with this ebuild, please have"
+		elog "a look at the documentation how to achieve this."
+	fi
+	use gtk && gnome2_query_immodules_gtk3
+	use gtk2 && gnome2_query_immodules_gtk2
+}
+
+pkg_postrm() {
+	use emacs && elisp-site-regen
+	use gtk && gnome2_query_immodules_gtk3
+	use gtk2 && gnome2_query_immodules_gtk2
+}


             reply	other threads:[~2022-10-04  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04  7:09 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-23 13:28 [gentoo-commits] repo/gentoo:master commit in: app-i18n/uim/files/, app-i18n/uim/ Akinori Hattori
2022-09-24 13:32 Akinori Hattori
2022-09-06 15:29 Akinori Hattori
2021-10-23 14:32 Akinori Hattori
2020-11-28 23:10 David Seifert
2018-07-23 13:29 Akinori Hattori
2018-06-03  2:19 Akinori Hattori
2018-05-28 15:13 Akinori Hattori
2018-05-28 14:56 Akinori Hattori
2018-05-28 14:56 Akinori Hattori
2016-07-28 17:10 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1664867364.30832ee74d20c1c4c18b4e31c9f712e970029f03.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox