commit:     45a96dfad92d10a438656a79f1e7a54abcb108bb
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Mon Dec 28 14:15:29 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 14:15:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45a96dfa

app-accessibility/edbrowse: Fix build with gcc-10

* Thanks to Sam James for providing the patch link
* Port to cmake eclass
* Additional minor cleanup

Closes: https://bugs.gentoo.org/707500
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../edbrowse/edbrowse-3.7.5.1-r1.ebuild            | 23 ++++++++++++++--------
 .../files/edbrowse-3.7.5.1-fno-common.patch        | 11 +++++++++++
 .../edbrowse/files/edbrowse-3.7.5.1-manpage.patch  | 23 ++++++++++++++++++++++
 3 files changed, 49 insertions(+), 8 deletions(-)

diff --git a/app-accessibility/edbrowse/edbrowse-3.7.5.1-r1.ebuild 
b/app-accessibility/edbrowse/edbrowse-3.7.5.1-r1.ebuild
index 1f0f66a9bb1..fe983eda819 100644
--- a/app-accessibility/edbrowse/edbrowse-3.7.5.1-r1.ebuild
+++ b/app-accessibility/edbrowse/edbrowse-3.7.5.1-r1.ebuild
@@ -2,7 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit cmake-utils
+
+inherit cmake
 
 DESCRIPTION="Combination editor, browser, and mail client that is 100% text 
based"
 HOMEPAGE="http://edbrowse.org";
@@ -15,24 +16,30 @@ IUSE="odbc"
 
 RDEPEND="
        app-text/tidy-html5
-       >=net-misc/curl-7.36.0
-       >=dev-libs/libpcre-7.8
-       >=sys-libs/readline-6.0
        dev-lang/duktape:=
+       dev-libs/libpcre
+       net-misc/curl
+       sys-libs/readline:=
        odbc? ( dev-db/unixODBC )"
 DEPEND="${RDEPEND}"
-BDEPEND="${RDEPEND}
+BDEPEND="
        dev-lang/perl
        virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-fno-common.patch
+       "${FILESDIR}"/${P}-manpage.patch
+)
+
 src_prepare() {
-       sed -i -e "s:/usr/share/doc/edbrowse:/usr/share/doc/${P}:" 
CMakeLists.txt
-       cmake-utils_src_prepare
+       cmake_src_prepare
+
+       sed -i -e "s:/usr/share/doc/edbrowse:/usr/share/doc/${PF}:" 
CMakeLists.txt || die
 }
 
 src_configure() {
        local mycmakeargs=(
                -DBUILD_EDBR_ODBC=$(usex odbc)
        )
-       cmake-utils_src_configure
+       cmake_src_configure
 }

diff --git a/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-fno-common.patch 
b/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-fno-common.patch
new file mode 100644
index 00000000000..bf9fa08245d
--- /dev/null
+++ b/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/src/eb.h
++++ b/src/eb.h
+@@ -287,7 +287,7 @@ extern char *sslCerts;             /* ssl certificates to 
validate the secure server */
+ extern int verifyCertificates;        /* is a certificate required for the 
ssl connection? */
+ extern int displayLength;     // when printing a line
+ extern int formatLineLength;  // when formatting html
+-bool formatOverflow;
++extern bool formatOverflow;
+ extern int webTimeout, mailTimeout;
+ extern uchar browseLocal;
+ extern bool sqlPresent;               /* Was edbrowse compiled with SQL built 
in? */

diff --git a/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-manpage.patch 
b/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-manpage.patch
new file mode 100644
index 00000000000..f0d66766911
--- /dev/null
+++ b/app-accessibility/edbrowse/files/edbrowse-3.7.5.1-manpage.patch
@@ -0,0 +1,23 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -249,19 +249,7 @@ if (UNIX)
+     endif()
+     # copy to build dir
+     configure_file( ${UnixManFile} ${CMAKE_BINARY_DIR}/edbrowse.1 )
+-    # find 'gzip' - warn if not...
+-    find_program(GZIP_EXE gzip PATHS /bin )
+-    if (GZIP_EXE)
+-        # gzip it in place
+-        execute_process(COMMAND ${GZIP_EXE} -f "edbrowse.1"
+-            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+-            INPUT_FILE edbrowse.1
+-            OUTPUT_FILE edbrowse.1.gz )
+-        # install it
+-      install(FILES ${CMAKE_BINARY_DIR}/edbrowse.1.gz DESTINATION 
${UnixManDir})
+-    else ()
+-        message(WARNING "Unable to locate 'gzip'! No man page...")
+-    endif ()
++    install(FILES ${CMAKE_BINARY_DIR}/edbrowse.1 DESTINATION ${UnixManDir})
+     # install user guide
+     install(FILES doc/usersguide.html doc/usersguide_fr.html doc/sample.ebrc 
doc/sample_fr.ebrc doc/sample_it.ebrc DESTINATION ${UnixDocDir})
+ endif ()

Reply via email to