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@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
Jakov Smolic
2020-12-28 15:15:29 +01:00
committed by David Seifert
parent 3e12336e46
commit 45a96dfad9
3 changed files with 49 additions and 8 deletions

View File

@@ -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
}

View File

@@ -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? */

View File

@@ -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 ()