1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

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.
This commit is contained in:
Alexey Dokuchaev 2023-07-21 04:56:32 +00:00
parent 84459afad8
commit 8010c52fdd
2 changed files with 19 additions and 49 deletions

View File

@ -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

View File

@ -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}