Index: head/devel/libk8055/Makefile =================================================================== --- head/devel/libk8055/Makefile (revision 355474) +++ head/devel/libk8055/Makefile (revision 355475) @@ -1,29 +1,27 @@ # Created by: Jake Smith # $FreeBSD$ PORTNAME= libk8055 PORTVERSION= 0.2 CATEGORIES= devel MASTER_SITES= http://www.horizon9.org/~geroy/download/k8055/ \ http://xz.cx/downloads/k8055/ MAINTAINER= jake@xz.cx COMMENT= Velleman K8055 USB experimental board support and command line tool -MAN1= k8055.1 -MANCOMPRESSED= yes USE_LDCONFIG= yes USE_CSTD= gnu89 PLIST_FILES= bin/k8055 \ + include/k8055.h \ lib/libk8055.c \ lib/libk8055.o \ lib/libk8055.so \ lib/libk8055.so.0.2 \ - include/k8055.h + man/man1/k8055.1.gz -NO_STAGE= yes post-patch: @${RM} ${WRKSRC}/libk8055.c.orig .include Index: head/devel/libk8055/files/patch-Makefile =================================================================== --- head/devel/libk8055/files/patch-Makefile (revision 355474) +++ head/devel/libk8055/files/patch-Makefile (revision 355475) @@ -1,47 +1,76 @@ ---- Makefile.orig 2011-12-31 03:12:14.464658120 +0000 -+++ Makefile 2011-12-31 03:12:42.754252842 +0000 +--- Makefile.orig 2006-07-29 18:03:43.000000000 +0800 ++++ Makefile 2014-05-27 17:29:02.806622803 +0800 @@ -1,22 +1,22 @@ -cc = gcc +CC ?= gcc exec = k8055 -bindir = /usr/local/bin -libdir = /usr/local/lib -includedir = /usr/local/include -mandir = /usr/local/man/man1 +bindir = ${PREFIX}/bin +libdir = ${PREFIX}/lib +includedir = ${PREFIX}/include +mandir = ${MANPREFIX}/man/man1 OBJS = main.o libk8055.o # if your are using Linux comment out next line -CFLAGS = -DDAEMON -Wall -D_BSD +CFLAGS += -DDAEMON -Wall -D_BSD # if you are using Linux incomment following line #CFLAGS = -DDAEMON -Wall -libs = -lusb -L/usr/lib -lm +libs = -lusb -L/usr/lib ${LDFLAGS} -lm libk8055.so.0.1: libk8055.o - $(cc) -Wall -o libk8055.so.0.2 -shared libk8055.o + $(CC) -Wall -o libk8055.so.0.2 -shared libk8055.o libk8055.o: libk8055.c - $(cc) -Wall -O -c -g -fPIC $(CFLAGS) libk8055.c + $(CC) -Wall -O -c -g -fPIC $(CFLAGS) libk8055.c -ln -sf libk8055.so.0.2 libk8055.so libk8055.c: k8055.h -@@ -24,10 +24,10 @@ +@@ -24,29 +24,29 @@ libk8055.c: k8055.h all: k8055_prog libk8055.so.0.1 %.o: %.c - $(cc) $(CFLAGS) -c $< + $(CC) $(CFLAGS) -c $< k8055_prog: $(OBJS) - $(cc) $(OBJS) -o $(exec) $(libs) + $(CC) $(OBJS) -o $(exec) $(libs) strip $(exec) clean: + rm -f *.o libk8055.so libk8055.so.0.2 $(exec) + + install: k8055_prog libk8055.so.0.1 +- cp -f $(exec) $(bindir)/ +- if !(test -d $(libdir)); then \ +- mkdir $(libdir); \ ++ cp -f $(exec) $(DESTDIR)$(bindir)/ ++ if !(test -d $(DESTDIR)$(libdir)); then \ ++ mkdir $(DESTDIR)$(libdir); \ + fi +- if !(test -d $(includedir)); then \ +- mkdir $(includedir); \ ++ if !(test -d $(DESTDIR)$(includedir)); then \ ++ mkdir $(DESTDIR)$(includedir); \ + fi +- cp -Pf lib* $(libdir) +- cp -f k8055.h $(includedir) +- if !(test -d $(mandir)); then \ +- mkdir $(mandir); \ ++ cp -Pf lib* $(DESTDIR)$(libdir) ++ cp -f k8055.h $(DESTDIR)$(includedir) ++ if !(test -d $(DESTDIR)$(mandir)); then \ ++ mkdir $(DESTDIR)$(mandir); \ + fi +- cp -f man/k8055.1.gz $(mandir)/ ++ cp -f man/k8055.1.gz $(DESTDIR)$(mandir)/ + + uninstall: + rm -f $(bindir)/$(exec) $(libdir)/libk8055* $(includedir)/k8055.h