summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2021-01-01 19:12:04 +0100
committerStephan Hartmann <sultan@gentoo.org>2021-01-01 19:12:15 +0100
commit95708ebf53cd9d24a8ad11f6ccea6fca8818fafc (patch)
tree90b7e8511d68aee4a72304ad03171ce82938bdfd /sys-fs/lde
parentsys-block/tgt: Remove old (diff)
downloadgentoo-95708ebf53cd9d24a8ad11f6ccea6fca8818fafc.tar.gz
gentoo-95708ebf53cd9d24a8ad11f6ccea6fca8818fafc.tar.bz2
gentoo-95708ebf53cd9d24a8ad11f6ccea6fca8818fafc.zip
sys-fs/lde: fix ncurses[tinfo], fix -fno-common, EAPI 7
Closes: https://bugs.gentoo.org/692966 Closes: https://bugs.gentoo.org/692966 Closes: https://bugs.gentoo.org/690512 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'sys-fs/lde')
-rw-r--r--sys-fs/lde/files/lde-2.6.1-fno-common.patch32
-rw-r--r--sys-fs/lde/files/lde-2.6.1-respect-ar.patch11
-rw-r--r--sys-fs/lde/files/lde-2.6.1-tinfo.patch22
-rw-r--r--sys-fs/lde/lde-2.6.1-r1.ebuild25
4 files changed, 85 insertions, 5 deletions
diff --git a/sys-fs/lde/files/lde-2.6.1-fno-common.patch b/sys-fs/lde/files/lde-2.6.1-fno-common.patch
new file mode 100644
index 000000000000..8e246aea95ac
--- /dev/null
+++ b/sys-fs/lde/files/lde-2.6.1-fno-common.patch
@@ -0,0 +1,32 @@
+--- a/src/lde.h
++++ b/src/lde.h
+@@ -211,7 +211,7 @@ struct fs_constants {
+ };
+
+ /* File system specific commands */
+-struct {
++struct _FS_cmd {
+ /* Check if inode is marked in use */
+ int (*inode_in_use)(unsigned long n);
+ /* Check if data zone/block is marked in use */
+@@ -231,7 +231,9 @@ struct {
+ unsigned long (*map_inode)(unsigned long n);
+ /* Map block number in file chain to physical block on disk */
+ int (*map_block)(unsigned long zone_index[], unsigned long blknr, unsigned long *mapped_block);
+-} FS_cmd;
++};
++
++extern struct _FS_cmd FS_cmd;
+
+ /* Flags */
+ struct _lde_flags {
+--- a/src/main_lde.c
++++ b/src/main_lde.c
+@@ -90,6 +90,7 @@ int (*mgetch)(void) = tty_mgetch;
+
+ struct _lde_typedata lde_typedata[] = LDE_ALLTYPES;
+
++struct _FS_cmd FS_cmd;
+
+ /* Check if device is mounted, return 1 if is mounted else 0 */
+ static int check_mount(char *device_name)
diff --git a/sys-fs/lde/files/lde-2.6.1-respect-ar.patch b/sys-fs/lde/files/lde-2.6.1-respect-ar.patch
new file mode 100644
index 000000000000..104aaf45b774
--- /dev/null
+++ b/sys-fs/lde/files/lde-2.6.1-respect-ar.patch
@@ -0,0 +1,11 @@
+--- a/macros/configure.in
++++ b/macros/configure.in
+@@ -30,7 +30,7 @@ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+ AC_PATH_PROG(RM, rm, rm)
+-AC_PATH_PROG(AR, ar, ar)
++AM_PROG_AR
+
+ AC_CHECK_PROG(system,uname,`uname`,unknown)
+
diff --git a/sys-fs/lde/files/lde-2.6.1-tinfo.patch b/sys-fs/lde/files/lde-2.6.1-tinfo.patch
new file mode 100644
index 000000000000..bb4c6c2386c4
--- /dev/null
+++ b/sys-fs/lde/files/lde-2.6.1-tinfo.patch
@@ -0,0 +1,22 @@
+--- a/macros/configure.in
++++ b/macros/configure.in
+@@ -14,7 +14,6 @@ AC_SUBST(STATIC_LDFLAGS)
+ AC_DEFINE(_GNU_SOURCE)
+
+ dnl Must use builtin() as it is overridden by some AC_ macros
+-builtin(include,./curses.m4)
+ builtin(include,./misctests.m4)
+
+ dnl Search for ncurses by default
+@@ -187,7 +186,10 @@ AC_ARG_WITH(gpm,
+ dnl ------------------------------------------------------------------
+ dnl Search for some version of curses
+ dnl ------------------------------------------------------------------
+-AC_CHECK_CURSES
++has_curses=false
++AC_SUBST(CURSES_INCLUDEDIR)
++AC_SUBST(CURSES_LIBS)
++PKG_CHECK_MODULES(ncurses, ncurses, [CURSES_LIBS="$ncurses_LIBS" CURSES_INCLUDEDIR="$ncurses_CFLAGS" has_curses=true])
+ if test "$has_curses" = true
+ then
+ AC_DEFINE(LDE_CURSES)
diff --git a/sys-fs/lde/lde-2.6.1-r1.ebuild b/sys-fs/lde/lde-2.6.1-r1.ebuild
index 30c88f3438ed..ed69cd926321 100644
--- a/sys-fs/lde/lde-2.6.1-r1.ebuild
+++ b/sys-fs/lde/lde-2.6.1-r1.ebuild
@@ -1,7 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
+
+inherit autotools
DESCRIPTION="ext2fs and minix disk editor for linux"
HOMEPAGE="http://lde.sourceforge.net/"
@@ -12,20 +14,33 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="sys-libs/ncurses:0="
-DEPEND="
- ${RDEPEND}
- dev-util/yacc"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ virtual/yacc
+"
S="${WORKDIR}/${PN}"
PATCHES=(
"${FILESDIR}/${P}-no-shadowing.patch"
+ "${FILESDIR}/${P}-fno-common.patch"
+ "${FILESDIR}/${P}-tinfo.patch"
+ "${FILESDIR}/${P}-respect-ar.patch"
)
DOCS=( WARNING README TODO COPYING )
RESTRICT="test"
+src_prepare() {
+ default
+
+ cd macros || die
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
src_install() {
dosbin "${PN}"
newman "doc/${PN}.man" "${PN}.8"