summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Jäger <pascal.jaeger@leimstift.de>2022-11-09 15:05:17 +0100
committerSam James <sam@gentoo.org>2022-11-15 01:46:08 +0000
commite135b5b7d6f3ad004ad9bf98a34924ac91f99f4d (patch)
tree078773f9881d2effa4641fd65ef62763753a01bb /app-misc/wcd
parentnet-misc/bsdwhois: fix build for clang16 (diff)
downloadgentoo-e135b5b7d6f3ad004ad9bf98a34924ac91f99f4d.tar.gz
gentoo-e135b5b7d6f3ad004ad9bf98a34924ac91f99f4d.tar.bz2
gentoo-e135b5b7d6f3ad004ad9bf98a34924ac91f99f4d.zip
app-misc/wcd: version bump to 6.0.4, fix clang16 build
Closes: https://bugs.gentoo.org/878585 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> Closes: https://github.com/gentoo/gentoo/pull/28201 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/wcd')
-rw-r--r--app-misc/wcd/Manifest1
-rw-r--r--app-misc/wcd/files/wcd-6.0.4-gentoo.patch103
-rw-r--r--app-misc/wcd/wcd-6.0.4.ebuild49
3 files changed, 153 insertions, 0 deletions
diff --git a/app-misc/wcd/Manifest b/app-misc/wcd/Manifest
index 65c4da15769e..d6a74e918884 100644
--- a/app-misc/wcd/Manifest
+++ b/app-misc/wcd/Manifest
@@ -1 +1,2 @@
DIST wcd-6.0.3.tar.gz 813763 BLAKE2B 2e215c427914705213590d7c5182bebf39becbf24238bd71c5fdd12f7e63894b2ad571793f6d25833edd3f7cd4f3acbb07bbc821880c22d7a5d4f373cd972055 SHA512 b48a6f8a196725b4b570701813cf8a96e13e4fd6289b6c779218acc20ea1ea841e5f8648f717bb389976b715b95856e91bad3ffb20f8d80961d75eae8eacfbe8
+DIST wcd-6.0.4.tar.gz 935815 BLAKE2B 00ec281890fe363258e0c847460ad9067f1c14409e64dfde239340ecf4f711af2047a8a1da226d4d17797e2b7452a4cd5aa65a0fcedcc2c172378d35a18a4a20 SHA512 afec27c0ca4cf7c7d24399f1f23c69ee765d57b449179696be5da82bcd6b146156254d9d1264e9c1f4905d5c117c7ac935a372aea25fa539b76c9bc866640daa
diff --git a/app-misc/wcd/files/wcd-6.0.4-gentoo.patch b/app-misc/wcd/files/wcd-6.0.4-gentoo.patch
new file mode 100644
index 000000000000..80fa5dc83ec4
--- /dev/null
+++ b/app-misc/wcd/files/wcd-6.0.4-gentoo.patch
@@ -0,0 +1,103 @@
+Patches build system.
+
+* Gentoo does not want pre-stripped files.
+* We do not want .exe files as the output
+* Gentoo packages curses, ncurses and ncursesw separately.
+ Therefore we need to get curses from pkg-config and include the correct path.
+
+
+Bug: https://bugs.gentoo.org/878585
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -45,12 +45,12 @@
+
+ CC ?= gcc
+ STATIC =
+-STRIP = strip
++STRIP =
+
+ ENABLE_NLS = 1
+
+ PACKAGE = wcd
+-EXT = .exe
++EXT =
+ PROGRAM = $(PACKAGE)$(EXT)
+ BIN = $(PROGRAM)
+
+@@ -328,9 +328,9 @@
+ # possible values: ncurses, curses, pdcurses, pdcursesw or <empty>
+
+ ifdef UCS
+- CURSES = ncursesw
++ CURSES = $(shell ${PKG_CONFIG} --libs ncursesw)
+ else
+- CURSES = ncurses
++ CURSES = $(shell ${PKG_CONFIG} --libs ncurses)
+ endif
+
+
+@@ -360,7 +360,7 @@
+
+ ifneq (,$(CURSES))
+ DEFS_CURSES = -DWCD_USECURSES
+- LIB_CURSES = -l$(CURSES)
++ LIB_CURSES = $(CURSES)
+ ifeq (os/2,$(OS))
+ LIB_CURSES += -ltinfo
+ endif
+@@ -458,15 +458,15 @@
+
+ LDFLAGS_USER =
+ LDFLAGS ?=
+-LDFLAGS += $(RPM_LD_FLAGS) \
++LIBS = $(RPM_LD_FLAGS) \
+ $(LDFLAGS_EXTRA) \
+ $(NLFLAG) \
+ $(LDFLAG_STATIC) \
+ $(LDFLAGS_USER)
+
+-LIBS = $(LIB_CURSES) \
+- $(LIB_UNISTRING) \
+- $(LIBS_EXTRA)
++LIBS += $(LIB_CURSES) \
++ $(LIB_UNISTRING) \
++ $(LIBS_EXTRA)
+
+ DEFS_USER =
+ DEFS = $(DEF_UNIX) $(DEFS_CURSES) $(EXTRA_DEFS) $(DEFS_USER)
+@@ -523,7 +523,7 @@
+
+ $(BIN): $(OBJS1)
+ $(MAKE) status
+- $(CC) $(OBJS1) $(LDFLAGS) $(LIBS) -o $@
++ $(CC) $(LDFLAGS) $(OBJS1) -o $@ $(LIBS)
+
+ %.o: %.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(DEFS) -c $< -o $@
+diff --git a/src/Makefile b/src/Makefile
+index fc317de..c5cff96 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -359,7 +359,7 @@ endif
+ endif
+
+ ifneq (,$(CURSES))
+- DEFS_CURSES = -DWCD_USECURSES
++ DEFS_CURSES = -DWCD_USECURSES $(shell ${PKG_CONFIG} --cflags-only-other ncursesw)
+ LIB_CURSES = $(CURSES)
+ ifeq (os/2,$(OS))
+ LIB_CURSES += -ltinfo
+@@ -384,9 +384,7 @@ endif
+ # Each ncurses variant has its own include directory
+ # ncurses (normal)/ncursesw (wide char)/ncursest (threads)
+ ifeq ($(findstring ncurses,$(CURSES)),ncurses)
+-ifneq ($(wildcard $(INCPREFIX)/include/$(CURSES)/curses.h),)
+- INCFLAGS = -I$(INCPREFIX)/include/$(CURSES) -I$(INCPREFIX)/include
+-endif
++ INCFLAGS = $(shell ${PKG_CONFIG} --cflags-only-I ncursesw)
+ ifeq ($(NCURSES_DEBUG), 1)
+ LIB_CURSES = -l$(CURSES)_g
+ endif
diff --git a/app-misc/wcd/wcd-6.0.4.ebuild b/app-misc/wcd/wcd-6.0.4.ebuild
new file mode 100644
index 000000000000..39d96c97f6f1
--- /dev/null
+++ b/app-misc/wcd/wcd-6.0.4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Wherever Change Directory"
+HOMEPAGE="http://waterlan.home.xs4all.nl/#WCD_ANCHOR"
+SRC_URI="http://waterlan.home.xs4all.nl/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="nls unicode"
+
+RDEPEND="
+ sys-libs/ncurses:=[unicode(+)?]
+ unicode? ( dev-libs/libunistring:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-text/ghostscript-gpl
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.4-gentoo.patch
+ "${FILESDIR}"/${PN}-6.0.3-doc-path.patch
+)
+
+src_prepare() {
+ default
+ tc-export CC PKG_CONFIG
+}
+
+src_compile() {
+ cd src || die
+ local mycompile="LFS=1"
+ use nls || mycompile+=" ENABLE_NLS="
+ use unicode && mycompile+=" UCS=1 UNINORM=1"
+ emake ${mycompile}
+}
+
+src_install() {
+ cd src || die
+ local DOCS=( ../README.txt )
+ default
+ emake DESTDIR="${ED}" DOTWCD=1 install-profile sysconfdir="/etc"
+}