On Sun, 16 Feb 2025 23:49:00 +0000
David Uhden Collado <da...@uhden.dev> wrote:

> In this email, I have attached a diff to update sysutils/btop from 
> version 1.3.2 to version 1.4.0 [1].
> 
> I fixed a problem that prevented the manual page for this program
> from being generated due to the lack of textproc/lowdown at build
> time, and I updated and simplified the patch for the Makefile,
> leaving only the necessary parts and removing the aesthetic changes.
> 
> Tested on amd64 and it builds and runs fine.
> 
> OKs? Comments?
> 
> References:
> [1]: https://github.com/aristocratos/btop/releases/tag/v1.4.0

Tested it on amd64 and arm64. Runs OK, the manpage is generated,
and installs correctly for me as well. Although, It'd probably be better
if the manpage is installed to ${PREFIX}/man/ rather than
${PREFIX}/share/man/.

according to portcheck:
manual pages should go under ${PREFIX}/man/ rather than under
${PREFIX}/share/man/

Here's an updated diff that fixes the manpage install location:

With this diff, OK from me.

Thanks-

-- 
iz (she/her)

> i like to say mundane things,
> there are too many uninteresting things
> that go unnoticed.

izder456 (dot) neocities (dot) org
diff --git sysutils/btop/Makefile sysutils/btop/Makefile
index b559b26c2d8..992b104afa3 100644
--- sysutils/btop/Makefile
+++ sysutils/btop/Makefile
@@ -2,7 +2,7 @@ COMMENT=	resource monitor
 
 GH_ACCOUNT=	aristocratos
 GH_PROJECT=	btop
-GH_TAGNAME=	v1.3.2
+GH_TAGNAME=	v1.4.0
 
 CATEGORIES=	sysutils
 
@@ -16,6 +16,7 @@ COMPILER =	base-clang
 
 RUN_DEPENDS=	devel/desktop-file-utils \
 		x11/gtk+4,-guic
+BUILD_DEPENDS=	textproc/lowdown
 
 NO_TEST=	Yes
 USE_GMAKE=	Yes
diff --git sysutils/btop/distinfo sysutils/btop/distinfo
index 492ae5c2571..27eee0f31e1 100644
--- sysutils/btop/distinfo
+++ sysutils/btop/distinfo
@@ -1,2 +1,2 @@
-SHA256 (btop-1.3.2.tar.gz) = Mx0YSIsdx/Bs+hLP+QkjCBaiTFd5C6PoIksRfj8K4D4=
-SIZE (btop-1.3.2.tar.gz) = 1144620
+SHA256 (btop-1.4.0.tar.gz) = rA0jcb9p1RNt5+lHDG+yhsvuLha0x6bSzUihR5boZlA=
+SIZE (btop-1.4.0.tar.gz) = 1239400
diff --git sysutils/btop/patches/patch-Makefile sysutils/btop/patches/patch-Makefile
index 9e4465fdddb..120c019094d 100644
--- sysutils/btop/patches/patch-Makefile
+++ sysutils/btop/patches/patch-Makefile
@@ -1,7 +1,7 @@
 Index: Makefile
 --- Makefile.orig
 +++ Makefile
-@@ -62,7 +62,7 @@ endif
+@@ -63,7 +63,7 @@ endif
  override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0)
  override CXX_VERSION_MAJOR := $(shell echo $(CXX_VERSION) | cut -d '.' -f 1)
  
@@ -10,7 +10,7 @@ Index: Makefile
  GCC_WORKS = false
  MIN_CLANG_VERSION = 16
  
-@@ -143,7 +143,7 @@ else ifeq ($(PLATFORM_LC),macos)
+@@ -149,7 +149,7 @@ else ifeq ($(PLATFORM_LC),macos)
  else ifeq ($(PLATFORM_LC),openbsd)
  	PLATFORM_DIR := openbsd
  	THREADS	:= $(shell sysctl -n hw.ncpu || echo 1)
@@ -18,8 +18,8 @@ Index: Makefile
 +	override ADDFLAGS += -lkvm
  	export MAKE = gmake
  	SU_GROUP := wheel
- else
-@@ -152,9 +152,6 @@ endif
+ else ifeq ($(PLATFORM_LC),netbsd)
+@@ -164,9 +164,6 @@ endif
  
  #? Use all CPU cores (will only be set if using Make 4.3+)
  MAKEFLAGS := --jobs=$(THREADS)
@@ -29,50 +29,27 @@ Index: Makefile
  
  #? LTO command line
  ifeq ($(CLANG_WORKS),true)
-@@ -280,22 +277,16 @@ distclean: clean
- 	@test -e lib/rocm_smi_lib/build && rm -rf lib/rocm_smi_lib/build || true
- 
- install:
--	@printf "\033[1;92mInstalling binary to: \033[1;97m$(DESTDIR)$(PREFIX)/bin/btop\n"
- 	@mkdir -p $(DESTDIR)$(PREFIX)/bin
- 	@cp -p $(TARGETDIR)/btop $(DESTDIR)$(PREFIX)/bin/btop
- 	@chmod 755 $(DESTDIR)$(PREFIX)/bin/btop
--	@printf "\033[1;92mInstalling doc to: \033[1;97m$(DESTDIR)$(PREFIX)/share/btop\n"
- 	@mkdir -p $(DESTDIR)$(PREFIX)/share/btop
- 	@cp -p README.md $(DESTDIR)$(PREFIX)/share/btop
--	@printf "\033[1;92mInstalling themes to: \033[1;97m$(DESTDIR)$(PREFIX)/share/btop/themes\033[0m\n"
- 	@cp -pr themes $(DESTDIR)$(PREFIX)/share/btop
--	@printf "\033[1;92mInstalling desktop entry to: \033[1;97m$(DESTDIR)$(PREFIX)/share/applications/btop.desktop\n"
- 	@mkdir -p $(DESTDIR)$(PREFIX)/share/applications/
- 	@cp -p btop.desktop $(DESTDIR)$(PREFIX)/share/applications/btop.desktop
--	@printf "\033[1;92mInstalling PNG icon to: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png\n"
- 	@mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
- 	@cp -p Img/icon.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png
--	@printf "\033[1;92mInstalling SVG icon to: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg\n"
+@@ -343,9 +340,9 @@ install:
  	@mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
  	@cp -p Img/icon.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg
- 
-@@ -352,23 +343,16 @@ endif
- #? Link
- .ONESHELL:
- btop: $(OBJECTS) | rocm_smi directories
--	@sleep 0.2 2>/dev/null || true
--	@TSTAMP=$$(date +%s 2>/dev/null || echo "0")
- 	@$(QUIET) || printf "\n\033[1;92mLinking and optimizing binary\033[37m...\033[0m\n"
- 	@$(VERBOSE) || printf "$(CXX) -o $(TARGETDIR)/btop $^ $(LDFLAGS)\n"
- 	@$(CXX) -o $(TARGETDIR)/btop $^ $(LDFLAGS) || exit 1
--	@printf "\033[1;92m100$(P) -> \033[1;37m$(TARGETDIR)/btop \033[100D\033[38C\033[1;93m(\033[1;97m$$(du -ah $(TARGETDIR)/btop | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n"
--	@printf "\n\033[1;92mBuild complete in \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $(TIMESTAMP) 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo "unknown")\033[92m)\033[0m\n"
- 
- #? Compile
- .ONESHELL:
- $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT) | rocm_smi directories
--	@sleep 0.3 2>/dev/null || true
--	@TSTAMP=$$(date +%s 2>/dev/null || echo "0")
- 	@$(QUIET) || printf "\033[1;97mCompiling $<\033[0m\n"
- 	@$(VERBOSE) || printf "$(CXX) $(CXXFLAGS) $(INC) -MMD -c -o $@ $<\n"
- 	@$(CXX) $(CXXFLAGS) $(INC) -MMD -c -o $@ $< || exit 1
--	@printf "\033[1;92m$$($(PROGRESS))$(P)\033[10D\033[5C-> \033[1;37m$@ \033[100D\033[38C\033[1;93m(\033[1;97m$$(du -ah $@ | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$($(DATE_CMD) +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n"
- 
- #? Non-File Targets
- .PHONY: all msg help pre
+ ifneq ($(wildcard btop.1),)
+-	@printf "\033[1;92mInstalling man page to: \033[1;97m$(DESTDIR)$(PREFIX)/share/man/man1/btop.1\n"
+-	@mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+-	@cp -p btop.1 $(DESTDIR)$(PREFIX)/share/man/man1/btop.1
++	@printf "\033[1;92mInstalling man page to: \033[1;97m$(DESTDIR)$(PREFIX)/man/man1/btop.1\n"
++	@mkdir -p $(DESTDIR)$(PREFIX)/man/man1
++	@cp -p btop.1 $(DESTDIR)$(PREFIX)/man/man1/btop.1
+ endif
+ 
+ #? Set SUID bit for btop as $SU_USER in $SU_GROUP
+@@ -374,8 +371,8 @@ uninstall:
+ 	@rm -rfv $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png
+ 	@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg\033[0m\n"
+ 	@rm -rfv $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg
+-	@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/man/man1/btop.1\033[0m\n"
+-	@rm -rfv $(DESTDIR)$(PREFIX)/share/man/man1/btop.1
++	@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/man/man1/btop.1\033[0m\n"
++	@rm -rfv $(DESTDIR)$(PREFIX)/man/man1/btop.1
+ 
+ #? Pull in dependency info for *existing* .o files
+ -include $(OBJECTS:.$(OBJEXT)=.$(DEPEXT))
diff --git sysutils/btop/pkg/PLIST sysutils/btop/pkg/PLIST
index 37a91e6d149..d49ab990d5f 100644
--- sysutils/btop/pkg/PLIST
+++ sysutils/btop/pkg/PLIST
@@ -1,4 +1,5 @@
 @bin bin/btop
+@man man/man1/btop.1
 share/applications/btop.desktop
 share/btop/
 share/btop/README.md
@@ -17,6 +18,7 @@ share/btop/themes/flat-remix.theme
 share/btop/themes/greyscale.theme
 share/btop/themes/gruvbox_dark.theme
 share/btop/themes/gruvbox_dark_v2.theme
+share/btop/themes/gruvbox_light.theme
 share/btop/themes/gruvbox_material_dark.theme
 share/btop/themes/horizon.theme
 share/btop/themes/kyli0x.theme
@@ -26,6 +28,7 @@ share/btop/themes/night-owl.theme
 share/btop/themes/nord.theme
 share/btop/themes/onedark.theme
 share/btop/themes/paper.theme
+share/btop/themes/phoenix-night.theme
 share/btop/themes/solarized_dark.theme
 share/btop/themes/solarized_light.theme
 share/btop/themes/tokyo-night.theme
@@ -34,5 +37,5 @@ share/btop/themes/tomorrow-night.theme
 share/btop/themes/whiteout.theme
 share/icons/hicolor/48x48/apps/btop.png
 share/icons/hicolor/scalable/apps/btop.svg
-@tag gtk-update-icon-cache %D/share/icons/hicolor
 @tag update-desktop-database
+@tag gtk-update-icon-cache %D/share/icons/hicolor

Reply via email to