Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-editors/aee: Fix call to undeclared function wprintf
Closes: https://bugs.gentoo.org/894372 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
- Loading branch information
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI="7" | ||
|
||
inherit toolchain-funcs | ||
|
||
DESCRIPTION="An easy to use text editor" | ||
#HOMEPAGE="http://mahon.cwx.net/ http://www.users.uswest.net/~hmahon/" | ||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" | ||
SRC_URI="mirror://gentoo/${P}.tar.gz" | ||
|
||
LICENSE="Artistic" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux" | ||
IUSE="X" | ||
|
||
RDEPEND="X? ( x11-libs/libX11 )" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="virtual/pkgconfig" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-ae-location.patch | ||
"${FILESDIR}"/${PN}-Wformat-security.patch | ||
"${FILESDIR}"/${PN}-gcc-10.patch | ||
"${FILESDIR}"/${PN}-clang-16-build.patch | ||
) | ||
DOCS=( Changes README.${PN} ${PN}.i18n.guide ${PN}.msg ) | ||
|
||
src_prepare() { | ||
sed -i \ | ||
-e "s/make -/\$(MAKE) -/g" \ | ||
-e "/^buildaee/s/$/ localaee/" \ | ||
-e "/^buildxae/s/$/ localxae/" \ | ||
Makefile | ||
|
||
sed -i \ | ||
-e "s/\([\t ]\)cc /\1\\\\\$(CC) /" \ | ||
-e "/CFLAGS =/s/\" >/ \\\\\$(LDFLAGS)\" >/" \ | ||
-e "/other_cflag/s/ \${strip_option}//" \ | ||
-e "s/-lcurses/$($(tc-getPKG_CONFIG) --libs ncurses)/" \ | ||
create.mk.{aee,xae} | ||
|
||
default | ||
} | ||
|
||
src_compile() { | ||
local target="aee" | ||
use X && target="both" | ||
|
||
emake CC="$(tc-getCC)" ${target} | ||
} | ||
|
||
src_install() { | ||
dobin ${PN} | ||
dosym ${PN} /usr/bin/rae | ||
doman ${PN}.1 | ||
einstalldocs | ||
|
||
insinto /usr/share/${PN} | ||
doins help.ae | ||
|
||
if use X; then | ||
dobin xae | ||
dosym xae /usr/bin/rxae | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Bug: https://bugs.gentoo.org/894372 | ||
--- a/aee.c | ||
+++ b/aee.c | ||
@@ -1543,7 +1543,7 @@ struct bufr *buf_alloc() /* allocate space for buffers */ | ||
temp_buf->main_buffer = FALSE; | ||
temp_buf->edit_buffer = FALSE; | ||
temp_buf->dos_file = FALSE; | ||
- temp_buf->journ_fd = NULL; | ||
+ temp_buf->journ_fd = 0; | ||
return (temp_buf); | ||
} | ||
|
||
--- a/journal.c | ||
+++ b/journal.c | ||
@@ -72,6 +72,7 @@ char *jrn_vers_str = "@(#) journal.c $Revision: 1.41 $ | ||
#include "aee.h" | ||
|
||
#include <time.h> | ||
+#include <wchar.h> | ||
|
||
/* | ||
| writes the contents of the line, updates the value stored in | ||
@@ -310,7 +311,7 @@ char *file_name; | ||
| Unable to open journal file. | ||
*/ | ||
|
||
- buffer->journ_fd = NULL; | ||
+ buffer->journ_fd = 0; | ||
return(1); | ||
} | ||
|
||
@@ -860,7 +861,7 @@ struct bufr *buffer; | ||
{ | ||
wprintw(com_win, cant_opn_rcvr_fil_msg); | ||
buffer->journalling = FALSE; | ||
- buffer->journ_fd = NULL; | ||
+ buffer->journ_fd = 0; | ||
return; | ||
} | ||
|