From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 925FF1581D3 for ; Thu, 23 May 2024 21:52:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 369E4E2A28; Thu, 23 May 2024 21:52:58 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 17A63E2A28 for ; Thu, 23 May 2024 21:52:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3872E34300D for ; Thu, 23 May 2024 21:52:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7600C1B3B for ; Thu, 23 May 2024 21:52:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1716501126.cb553ffc4d2487245044c655555d03242986f0ec.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/rtf2html/, app-text/rtf2html/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/rtf2html/Manifest app-text/rtf2html/files/buildsystem-fixes.patch app-text/rtf2html/rtf2html-0.2.0-r2.ebuild X-VCS-Directories: app-text/rtf2html/ app-text/rtf2html/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: cb553ffc4d2487245044c655555d03242986f0ec X-VCS-Branch: master Date: Thu, 23 May 2024 21:52:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 57045330-a5fc-4d4a-9a49-85eb59969b38 X-Archives-Hash: 2644bd58bcb841e2340bdfbd8ea6567a commit: cb553ffc4d2487245044c655555d03242986f0ec Author: Eli Schwartz gmail com> AuthorDate: Thu May 23 04:40:13 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu May 23 21:52:06 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb553ffc app-text/rtf2html: fix broken build system and regenerate configure script Uses lots of invalid bashisms, has implicit function declarations from the vintage autoconf 2.59 used. Closes: https://bugs.gentoo.org/886297 Closes: https://bugs.gentoo.org/900531 Signed-off-by: Eli Schwartz gmail.com> Signed-off-by: Sam James gentoo.org> app-text/rtf2html/Manifest | 1 + app-text/rtf2html/files/buildsystem-fixes.patch | 157 ++++++++++++++++++++++++ app-text/rtf2html/rtf2html-0.2.0-r2.ebuild | 16 ++- 3 files changed, 172 insertions(+), 2 deletions(-) diff --git a/app-text/rtf2html/Manifest b/app-text/rtf2html/Manifest index 9a243f6d8517..80453285cfdd 100644 --- a/app-text/rtf2html/Manifest +++ b/app-text/rtf2html/Manifest @@ -1 +1,2 @@ +DIST rtf2html-0.2.0-stlport.m4 3292 BLAKE2B 137016c605749aca2bd5c3a1ec69930f36d69fd177b70dc64ba67f932ebada4d9818e33ce7dce60d6935ec472dc1862253443487d45143594996a8d15585cae7 SHA512 8b67424a4fa6b4672620ada1e58de28added11e1c8ced5aee12bb2f478f6f9d31de655af91298a16bf05e1608de4f680dfa976513dcb53eee5a3d8088df7a946 DIST rtf2html-0.2.0.tar.bz2 75292 BLAKE2B 18cc67ff3642f68ae262aa6e3368be93defe19ceeab07f9e55fcd2390e4c374c7ab315c0c5f8b7644a458e4100a4be3812767b080842d862266083856f5376aa SHA512 7399c98adb4dc0f45e420cd6836c36720d6b19ccbba062d2102b2693a6812642d6193000172ef7eeef5b8a84dcb2d35c1eb99fbf3bffaf8dad43e8ca06c6fe75 diff --git a/app-text/rtf2html/files/buildsystem-fixes.patch b/app-text/rtf2html/files/buildsystem-fixes.patch new file mode 100644 index 000000000000..24642650f8ac --- /dev/null +++ b/app-text/rtf2html/files/buildsystem-fixes.patch @@ -0,0 +1,157 @@ +From 257c8fd42362f158afdcd7d7709aa3743f894468 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 23 May 2024 00:00:26 -0400 +Subject: [PATCH 1/2] configure: remove invalid bashism + +configure scripts are POSIX /bin/sh scripts and cannot have +bash-specific syntax. The test `xxx == yyy` construct with double equals +is a bash-specific alias for single equals. It does exactly the same +thing as single equals -- it provides no additional functionality, no +behavior changes, it is exactly the same but with an additional +alternate spelling. In exchange for doing nothing, it breaks muscle +memory when writing POSIX sh scripts and tricks developers into writing +the wrong thing. + +It should never be used under any circumstances. Ideally it would be +removed altogether from GNU bash. + +Bug: https://bugs.gentoo.org/903291 +Signed-off-by: Eli Schwartz +--- + configure.in | 4 ++-- + stlport.m4 | 18 +++++++++--------- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/configure.in b/configure.in +index 3207599..f8ba73d 100644 +--- a/configure.in ++++ b/configure.in +@@ -38,7 +38,7 @@ fi + + + AC_LIB_STLPORT(no) +-if test "$ac_stlport_use" == "no"; then ++if test "$ac_stlport_use" = "no"; then + AC_CHECK_LIB(stdc++,main,,AC_MSG_ERROR(rtf2html requires either libstdc++ or libstrloprt)) + fi + +@@ -47,5 +47,5 @@ AC_CHECK_FUNCS(floor strtol,,AC_MSG_ERROR(STDLIB funcs missing)) + AC_CHECK_FUNC(rint,AC_DEFINE(HAVE_RINT,1,Define to 1 if you have rint function)) + + CXXFLAGS="$CPPFLAGS $CFLAGS" +- ++ + AC_OUTPUT(Makefile) +diff --git a/stlport.m4 b/stlport.m4 +index baaf94b..ed7e13e 100644 +--- a/stlport.m4 ++++ b/stlport.m4 +@@ -4,19 +4,19 @@ + # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to + # `yes'. + # +-# If all tests succeed, CPPFLAGS will be *prepended* with ++# If all tests succeed, CPPFLAGS will be *prepended* with + # -nostdinc++ -I + # and LIBS will be appended with + # -l + # + # directory defaults to /usr/include/stlport, but can be overridden with the + # --with-stlport-headers directive; +-# library defaults to stlport, and can be overridden with the ++# library defaults to stlport, and can be overridden with the + # --with-stlport-libs directive + # + # $Id: stlport.m4,v 1.4 2007-07-31 15:39:42 vlavrinenko Exp $ + # +-# This file is (c) 2001 Jasper Spaans, ++# This file is (c) 2001 Jasper Spaans, + # Please send your comments, suggestions and bugfixes to the above + # e-mail address. + # +@@ -38,12 +38,12 @@ AC_DEFUN([AC_LIB_STLPORT], + [define([AC_LIB_STLPORT_DEFAULT], ifelse($1, no, no, yes))dnl + AC_MSG_CHECKING(whether to use stlport libraries) + AC_ARG_WITH(stlport, AC_HELP_STRING(--with-stlport,use sgi stlport headers and libraries), +- [ if test "x$withval" == xno ; then ++ [ if test "x$withval" = xno ; then + ac_stlport_use="no" + fi], + ac_stlport_use=AC_LIB_STLPORT_DEFAULT) + AC_ARG_WITH(stlport-headers, AC_HELP_STRING(--with-stlport-headers,where to find stlport headers), +- [ if test "x$withval" == xno ; then ++ [ if test "x$withval" = xno ; then + ac_stlport_use="no" + else + ac_stlport_headers="$with_stlport_headers" +@@ -52,7 +52,7 @@ AC_DEFUN([AC_LIB_STLPORT], + ac_stlport_headers="/usr/include/stlport" + ]) + AC_ARG_WITH(stlport-libs, AC_HELP_STRING(--with-stlport-libs, where to find stlport libraries), +- [ if test "x$withval" == xno ; then ++ [ if test "x$withval" = xno ; then + ac_stlport_use="no" + else + ac_stlport_libs="$with_stlport_libs" +@@ -61,7 +61,7 @@ AC_DEFUN([AC_LIB_STLPORT], + ac_stlport_libs="stlport" + ]) + +- if test "$ac_stlport_use" == no ; then ++ if test "$ac_stlport_use" = no ; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) +@@ -70,7 +70,7 @@ AC_DEFUN([AC_LIB_STLPORT], + ac_stlport_save_LIBS="$LIBS" + CPPFLAGS="-I$ac_stlport_headers $CPPFLAGS" + LIBS="-l$ac_stlport_libs $LIBS" +- if test "$MSYSTEM" == "MINGW32"; then ++ if test "$MSYSTEM" = "MINGW32"; then + CPPFLAGS="$CPPFLAGS -mthreads" + fi + AC_LANG_PUSH(C++) +@@ -80,7 +80,7 @@ AC_DEFUN([AC_LIB_STLPORT], + AC_MSG_CHECKING(where to find stlport libraries) + AC_TRY_RUN([#include + #include +-int ++int + main() + { + std::cout << "" << std::ends; +-- +2.44.1 + + +From dd1ca6d0867eaca2b9be8d7efa4d957c96b7aa51 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 23 May 2024 00:24:52 -0400 +Subject: [PATCH 2/2] autotools: ensure aclocal runs successfully by passing + -I. + +autoreconf -fi can update the autotools files automatically, but if +aclocal doesn't know where project-local macros are it will delete them +and then the configure script is malformed and errors out. + +This tells autoreconf to pass -I. to aclocal, that is, it should check +for stlport.m4 in the current directory and use it. + +Signed-off-by: Eli Schwartz +--- + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index e7eb60e..0a5fafd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,3 +2,5 @@ AUTOMAKE_OPTIONS = foreign + bin_PROGRAMS = rtf2html + rtf2html_SOURCES = fmt_opts.cpp rtf2html.cpp rtf_keyword.cpp rtf_table.cpp config.h fmt_opts.h rtf_table.h common.h dbg_iter.h rtf_keyword.h rtf_tools.h + noinst_HEADERS = config.h fmt_opts.h rtf_table.h common.h dbg_iter.h rtf_keyword.h rtf_tools.h README.ru ++ ++ACLOCAL_AMFLAGS = -I. +-- +2.44.1 + diff --git a/app-text/rtf2html/rtf2html-0.2.0-r2.ebuild b/app-text/rtf2html/rtf2html-0.2.0-r2.ebuild index 0d62d8091759..2855e2bba293 100644 --- a/app-text/rtf2html/rtf2html-0.2.0-r2.ebuild +++ b/app-text/rtf2html/rtf2html-0.2.0-r2.ebuild @@ -3,18 +3,30 @@ EAPI=8 +inherit autotools + DESCRIPTION="RTF to HTML converter" HOMEPAGE="http://rtf2html.sourceforge.net/" -SRC_URI="https://downloads.sourceforge.net/rtf2html/${P}.tar.bz2" +SRC_URI=" + https://downloads.sourceforge.net/rtf2html/${P}.tar.bz2 + https://github.com/lvu/rtf2html/raw/4b0e5a3cca2d0c81ee50dcfaa7e3d3dd0a89e59b/stlport.m4 -> ${P}-stlport.m4 +" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~amd64 ~x86" -PATCHES=( "${FILESDIR}"/${P}-gcc43.patch ) +PATCHES=( + "${FILESDIR}"/${P}-gcc43.patch + # make autoreconf work + # https://github.com/lvu/rtf2html/pull/12 + "${FILESDIR}"/buildsystem-fixes.patch +) src_prepare() { + cp "${DISTDIR}"/${P}-stlport.m4 stlport.m4 || die default + eautoreconf # CFLAGS are incorrectly parsed, so handle this here sed -i -e '/CFLAGS=$(echo $CFLAGS/d' configure || die 'sed on configure failed'