git: 8010c52fdd45 - main - sysutils/wmmemfree: clean the port up prior to unbreaking it (+)

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Fri, 21 Jul 2023 04:57:54 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8010c52fdd4568b8253b31513ee016194c9f688d

commit 8010c52fdd4568b8253b31513ee016194c9f688d
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-07-21 04:56:32 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-07-21 04:56:32 +0000

    sysutils/wmmemfree: clean the port up prior to unbreaking it (+)
    
    Ditch most of the gratuitous patching of the program's Makefile
    as we only need to adjust object files, compiler, and libraries.
---
 sysutils/wmmemfree/Makefile             |  4 +--
 sysutils/wmmemfree/files/patch-Makefile | 64 +++++++++------------------------
 2 files changed, 19 insertions(+), 49 deletions(-)

diff --git a/sysutils/wmmemfree/Makefile b/sysutils/wmmemfree/Makefile
index 13956535685d..37ffa81f9091 100644
--- a/sysutils/wmmemfree/Makefile
+++ b/sysutils/wmmemfree/Makefile
@@ -15,8 +15,8 @@ BROKEN_FreeBSD_14=	fails to compile: read_mem.c: invalid use of undefined type '
 BROKEN_mips=		fails to compile: mem_freebsd.c: storage size of 'vm' isn't known
 BROKEN_mips64=		fails to compile: mem_freebsd.c: storage size of 'vm' isn't known
 
-USES=		tar:bzip2 xorg
-USE_XORG=	xpm
+USES=		localbase tar:bzip2 xorg
+USE_XORG=	x11 xext xpm
 
 PLIST_FILES=	"@(,kmem,2555) bin/wmmemfree" man/man1/${PORTNAME}.1.gz
 
diff --git a/sysutils/wmmemfree/files/patch-Makefile b/sysutils/wmmemfree/files/patch-Makefile
index ef220cc50a7b..26f34c806042 100644
--- a/sysutils/wmmemfree/files/patch-Makefile
+++ b/sysutils/wmmemfree/files/patch-Makefile
@@ -1,54 +1,24 @@
---- Makefile.orig	Sat Mar 22 02:59:07 2003
-+++ Makefile	Fri Apr 11 12:50:48 2003
-@@ -1,38 +1,17 @@
--#Makefile
-+CC ?=	cc
-+LDIR =	-L${LOCALBASE}/lib
-+IDIR =	-I${LOCALBASE}/include
+--- Makefile.orig	2003-03-21 20:59:07 UTC
++++ Makefile
+@@ -1,18 +1,18 @@
+ #Makefile
  
--PROG=wmmemfree
+ PROG=wmmemfree
 -OBJS=dockapp.o draw.o mem_linux.o options.o wmmemfree.o
-+LIBS =	-lX11 -lXpm -lXext -lkvm
++OBJS=dockapp.o draw.o mem_freebsd.o options.o wmmemfree.o
  
--PREFIX=/usr/local
--BINDIR=$(PREFIX)/bin
--MANUALDIR=$(PREFIX)/share/man/man1
+ PREFIX=/usr/local
+ BINDIR=$(PREFIX)/bin
+ MANUALDIR=$(PREFIX)/share/man/man1
 -CC=gcc
--STRIP=strip
--FLAGS=-Wall -O2
--RM=rm -f
--INST=install
--MANUAL=$(PROG).1
++CC?=gcc
+ STRIP=strip
+ FLAGS=-Wall -O2
+ RM=rm -f
+ INST=install
+ MANUAL=$(PROG).1
 -LIBS=-L/usr/X11R6/lib -lX11 -lXext -lXpm
-+OBJS =	dockapp.o\
-+	draw.o\
-+	mem_freebsd.o\
-+	options.o\
-+	wmmemfree.o
++LIBS+=-lX11 -lXext -lXpm -lkvm
  
--all: $(PROG)
-+.c.o:
-+	${CC} ${CFLAGS} ${IDIR} ${DEFS} -c $< -o $*.o
+ all: $(PROG)
  
--$(PROG): $(OBJS)
--	$(CC) -o $(PROG) $(OBJS) $(LIBS)
--	$(STRIP) $(PROG)
--%.o: %.c
--	$(CC) $(FLAGS) -c $< -o $@
--clean:
--	$(RM) $(OBJS) $(PROG)
--install: $(PROG)
--	$(INST) -m 755 $(PROG) $(BINDIR)
--	$(INST) -m 644 $(MANUAL) $(MANUALDIR)
--uninstall:
--	$(RM) $(BINDIR)/$(PROG)
--	$(RM) $(MANUALDIR)/$(MANUAL)
--
--dockapp.o: dockapp.c wmmemfree.h options.h draw.h xpm/bg.xpm xpm/on.xpm \
--  xpm/off.xpm xpm/numbers.xpm xpm/panel.xpm
--draw.o: draw.c dockapp.h draw.h mem_linux.h options.h
--mem_linux.o: mem_linux.c
--options.o: options.c wmmemfree.h options.h
--wmmemfree.o: wmmemfree.c wmmemfree.h dockapp.h draw.h options.h
-+all:	${OBJS}
-+	${CC} ${CFLAGS} -o wmmemfree ${OBJS} ${LDIR} ${LIBS}