commit:     a3dc67052d5a266a8ed044a76913bea30efbac63
Author:     Mats Lidell <matsl <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 12 11:06:23 2024 +0000
Commit:     Mats Lidell <matsl <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 11:06:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3dc6705

app-editors/xemacs: Set no-strict-aliasing on debug

Reintroduce patch to disable broken libc version check.

Bug: https://bugs.gentoo.org/924339
Signed-off-by: Mats Lidell <matsl <AT> gentoo.org>

 .../xemacs-21.5.35-configure-libc-version.patch    | 73 ++++++++++++++++++++++
 ...s-21.5.9999.ebuild => xemacs-21.5.35-r1.ebuild} | 31 +++++----
 app-editors/xemacs/xemacs-21.5.9999.ebuild         | 14 ++++-
 3 files changed, 103 insertions(+), 15 deletions(-)

diff --git 
a/app-editors/xemacs/files/xemacs-21.5.35-configure-libc-version.patch 
b/app-editors/xemacs/files/xemacs-21.5.35-configure-libc-version.patch
new file mode 100644
index 000000000000..e744d3952b10
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.5.35-configure-libc-version.patch
@@ -0,0 +1,73 @@
+diff -r 3761ed745bc6 configure.ac
+--- a/configure.ac     Sat Mar 02 17:26:00 2024 +0100
++++ b/configure.ac     Fri Mar 08 22:25:23 2024 +0100
+@@ -2192,7 +2192,6 @@
+ 
+ compiler_version=""
+ gcc_compiler_specs=""
+-libc_version=""
+ 
+ AC_MSG_CHECKING([for compiler version information])
+ 
+@@ -2255,53 +2254,6 @@
+ fi
+ AC_MSG_RESULT([$compiler_version])
+ 
+-AC_MSG_CHECKING(for standard C library version information)
+-
+-case "$ac_cv_build" in
+-      *-*-linux*)
+-        dnl #### who would ever _not_ be running the distro's libc?
+-        dnl Maybe it would be better to get/augment this info with ldd?
+-        if test -f /etc/redhat-release ; then
+-          libc_version=`rpm -q glibc`
+-        elif test -f /etc/debian_version ; then
+-          libc_version=`dpkg-query --showformat='${version}' --show libc6`
+-          libc_version="GNU libc $libc_version (Debian)"
+-        dnl need SuSE et al checks here...
+-        fi
+-        dnl #### Tested on Debian, does this actually work elsewhere?  ;-)
+-          if test -z "$libc_version"; then
+-          libc_version=`ls /lib/libc-*.so | sed -e 
's,/lib/libc-\(.*\)\.so,\1,'`
+-          fi
+-      ;;
+-
+-      *-*-aix*)
+-        libc_version="bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`" 
+-      ;;
+-
+-      *-*-solaris*)
+-        libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
+-        libc_version="SUNWcsl $libc"
+-
+-      ;;
+-
+-      mips-sgi-irix*)
+-        libc_version="IRIX libc `uname -sRm`"
+-      ;;
+-        
+-      alpha*-dec-osf*)
+-      dnl Another ugly case
+-        (cd /usr/.smdb.;
+-              libc_version=` grep -h libc.so *.inv | awk '$9 == "f" {print 
$12}' | tr '\n' ','`
+-        )
+-      ;;
+-esac
+-
+-dnl Awww, shucks.
+-if test -z "libc_version"; then
+-  libc_version="detection failed (please report this)"
+-fi
+-AC_MSG_RESULT([$libc_version])
+-
+ dnl ---------------------------------------------------------
+ dnl These directories are used to search for include subdirs.
+ dnl ---------------------------------------------------------
+@@ -6122,7 +6074,6 @@
+     echo "  WARNING: CC and XEMACS_CC mismatched; check CFLAGS carefully."
+   fi
+ fi
+-echo "  libc version:                      $libc_version"
+ echo "  Relocating allocator for buffers:  $with_rel_alloc"
+ echo "
+ Package Search (a 'root' contains '{xemacs,mule,site}-packages'):"

diff --git a/app-editors/xemacs/xemacs-21.5.9999.ebuild 
b/app-editors/xemacs/xemacs-21.5.35-r1.ebuild
similarity index 90%
copy from app-editors/xemacs/xemacs-21.5.9999.ebuild
copy to app-editors/xemacs/xemacs-21.5.35-r1.ebuild
index 15945ea32285..505fb03625a3 100644
--- a/app-editors/xemacs/xemacs-21.5.9999.ebuild
+++ b/app-editors/xemacs/xemacs-21.5.35-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Note: xemacs currently does not work with position independent code
@@ -6,17 +6,17 @@
 
 EAPI=8
 
-inherit flag-o-matic xdg-utils desktop
+inherit flag-o-matic xdg-utils desktop autotools
 
 DESCRIPTION="highly customizable open source text editor and application 
development system"
 HOMEPAGE="https://www.xemacs.org/";
-SRC_URI="neXt? ( http://www.malfunction.de/afterstep/files/NeXT_XEmacs.tar.gz 
)"
 
-inherit mercurial
-EHG_REPO_URI="https://foss.heptapod.net/xemacs/xemacs";
+SRC_URI="http://ftp.xemacs.org/pub/xemacs/xemacs-$(ver_cut 1-2)/${P}.tar.gz
+       neXt? ( http://www.malfunction.de/afterstep/files/NeXT_XEmacs.tar.gz )"
 
 LICENSE="GPL-3+"
 SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
 IUSE="alsa debug gif gpm pop postgres ldap xface nas dnd X jpeg tiff png motif 
freewnn xft xim athena neXt Xaw3d gdbm berkdb +bignum"
 
 X_DEPEND="x11-libs/libXt x11-libs/libXmu x11-libs/libXext x11-misc/xbitmaps"
@@ -55,18 +55,20 @@ PDEPEND="app-xemacs/xemacs-base
        app-xemacs/mule-base"
 
 src_unpack() {
-       mercurial_src_unpack
-
-       use neXt && unpack NeXT_XEmacs.tar.gz
+       default_src_unpack
 }
 
 src_prepare() {
        use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* 
"${S}"/etc/toolbar/
        find "${S}"/lisp -name '*.elc' -exec rm {} \; || die
-       eapply "${FILESDIR}/${PN}-21.5.35-mule-tests.patch"
+       eapply "${FILESDIR}/${P}-configure.patch"
+       eapply "${FILESDIR}/${P}-mule-tests.patch"
+       eapply "${FILESDIR}/${P}-configure-libc-version.patch"
 
        eapply_user
 
+       eautoconf
+
        # Some binaries and man pages are installed under suffixed names
        # to avoid collions with their GNU Emacs counterparts (see below).
        # Fix internal filename references.
@@ -129,10 +131,10 @@ src_configure() {
                if use motif ; then
                        myconf="${myconf} --with-xim=motif"
                else
-                       myconf="${myconf} --with-xim=xlib"
+               myconf="${myconf} --with-xim=xlib"
                fi
        else
-               myconf="${myconf} --with-xim=no"
+         myconf="${myconf} --with-xim=no"
        fi
 
        myconf="${myconf} $(use_with freewnn wnn )"
@@ -155,8 +157,13 @@ src_configure() {
                myconf="${myconf} --without-database"
        fi
 
-       use debug && myconf="${myconf} --with-debug" ||
+       if use debug ; then
+               myconf="${myconf} --with-debug"
+               # bug #924339
+               append-flags -fno-strict-aliasing
+       else
                myconf="${myconf} --with-optimization --with-cflags-debugging="
+       fi
 
        use bignum && myconf="${myconf} --with-bignum=openssl" ||
                myconf="${myconf} --with-bignum=no"

diff --git a/app-editors/xemacs/xemacs-21.5.9999.ebuild 
b/app-editors/xemacs/xemacs-21.5.9999.ebuild
index 15945ea32285..172643503b1d 100644
--- a/app-editors/xemacs/xemacs-21.5.9999.ebuild
+++ b/app-editors/xemacs/xemacs-21.5.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Note: xemacs currently does not work with position independent code
@@ -6,7 +6,7 @@
 
 EAPI=8
 
-inherit flag-o-matic xdg-utils desktop
+inherit flag-o-matic xdg-utils desktop autotools
 
 DESCRIPTION="highly customizable open source text editor and application 
development system"
 HOMEPAGE="https://www.xemacs.org/";
@@ -64,9 +64,12 @@ src_prepare() {
        use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* 
"${S}"/etc/toolbar/
        find "${S}"/lisp -name '*.elc' -exec rm {} \; || die
        eapply "${FILESDIR}/${PN}-21.5.35-mule-tests.patch"
+       eapply "${FILESDIR}/${PN}-21.5.35-configure-libc-version.patch"
 
        eapply_user
 
+       eautoconf
+
        # Some binaries and man pages are installed under suffixed names
        # to avoid collions with their GNU Emacs counterparts (see below).
        # Fix internal filename references.
@@ -155,8 +158,13 @@ src_configure() {
                myconf="${myconf} --without-database"
        fi
 
-       use debug && myconf="${myconf} --with-debug" ||
+       if use debug ; then
+               myconf="${myconf} --with-debug"
+               # bug #924339
+               append-flags -fno-strict-aliasing
+       else
                myconf="${myconf} --with-optimization --with-cflags-debugging="
+       fi
 
        use bignum && myconf="${myconf} --with-bignum=openssl" ||
                myconf="${myconf} --with-bignum=no"

Reply via email to