aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2024-01-20 23:35:58 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2024-01-21 01:01:07 +0000
commitd5807b72bba91eb77b1299f9d6a82873ccd93242 (patch)
tree4102c371692294e3d3120fe940dac5f865c7729e
parent1e66610a7861517da1c3a2c9f557a28c4f835328 (diff)
downloadports-d5807b72bba91eb77b1299f9d6a82873ccd93242.tar.gz
ports-d5807b72bba91eb77b1299f9d6a82873ccd93242.zip
devel/libk8055: Sanitize MANPREFIX
- Add LICENSE GPLv2+ mentioned in code - Refresh patches Approved by: portmgr (blanket)
-rw-r--r--devel/libk8055/Makefile7
-rw-r--r--devel/libk8055/files/patch-Makefile22
-rw-r--r--devel/libk8055/files/patch-libk8055.c26
3 files changed, 33 insertions, 22 deletions
diff --git a/devel/libk8055/Makefile b/devel/libk8055/Makefile
index 4bb468ce1527..eff1da2ccf7c 100644
--- a/devel/libk8055/Makefile
+++ b/devel/libk8055/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libk8055
PORTVERSION= 0.2
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.horizon9.org/~geroy/download/k8055/ \
http://xz.cx/downloads/k8055/
@@ -8,8 +9,10 @@ MAINTAINER= jake@xz.cx
COMMENT= Velleman K8055 USB experimental board support and command line tool
WWW= http://www.horizon9.org/~geroy/
-USE_LDCONFIG= yes
+LICENSE= GPLv2+
+
USE_CSTD= gnu89
+USE_LDCONFIG= yes
PLIST_FILES= bin/k8055 \
include/k8055.h \
@@ -17,7 +20,7 @@ PLIST_FILES= bin/k8055 \
lib/libk8055.o \
lib/libk8055.so \
lib/libk8055.so.0.2 \
- man/man1/k8055.1.gz
+ share/man/man1/k8055.1.gz
post-patch:
@${RM} ${WRKSRC}/libk8055.c.orig
diff --git a/devel/libk8055/files/patch-Makefile b/devel/libk8055/files/patch-Makefile
index b9b8432f9ea0..a47fecef3866 100644
--- a/devel/libk8055/files/patch-Makefile
+++ b/devel/libk8055/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2006-07-29 18:03:43.000000000 +0800
-+++ Makefile 2014-05-27 17:29:02.806622803 +0800
+--- Makefile.orig 2006-07-29 10:03:43 UTC
++++ Makefile
@@ -1,22 +1,22 @@
-cc = gcc
+CC ?= gcc
@@ -11,7 +11,7 @@
+bindir = ${PREFIX}/bin
+libdir = ${PREFIX}/lib
+includedir = ${PREFIX}/include
-+mandir = ${MANPREFIX}/man/man1
++mandir = ${PREFIX}/share/man/man1
OBJS = main.o libk8055.o
# if your are using Linux comment out next line
-CFLAGS = -DDAEMON -Wall -D_BSD
@@ -32,7 +32,7 @@
-ln -sf libk8055.so.0.2 libk8055.so
libk8055.c: k8055.h
-@@ -24,29 +24,29 @@ libk8055.c: k8055.h
+@@ -24,33 +24,33 @@ all: k8055_prog libk8055.so.0.1
all: k8055_prog libk8055.so.0.1
%.o: %.c
@@ -43,10 +43,12 @@
- $(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 \
@@ -70,7 +72,13 @@
+ 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
+-
++
+ test: k8055_prog
+ killall $(exec)
+ ./$(exec)
diff --git a/devel/libk8055/files/patch-libk8055.c b/devel/libk8055/files/patch-libk8055.c
index a31c4a68a5de..077fc5eebc13 100644
--- a/devel/libk8055/files/patch-libk8055.c
+++ b/devel/libk8055/files/patch-libk8055.c
@@ -1,6 +1,6 @@
---- libk8055.c 2006-07-29 11:02:26.000000000 +0100
-+++ libk8055.c.orig 2011-10-09 21:34:57.693521803 +0100
-@@ -83,7 +83,7 @@
+--- libk8055.c.orig 2006-07-29 10:02:26 UTC
++++ libk8055.c
+@@ -83,7 +83,7 @@ int OpenDevice(long board_address){
return -1; /*throw -1 to show that OpenDevice failed */
}
else
@@ -9,7 +9,7 @@
if (open_status!=8)
return -1;
else
-@@ -101,7 +101,7 @@
+@@ -101,7 +101,7 @@ long ReadAnalogChannel(long Channelno){
long ReadAnalogChannel(long Channelno){
int open_status=0;
@@ -18,7 +18,7 @@
if (open_status==8){
if (Channelno==2)
return data_in[3];
-@@ -114,7 +114,7 @@
+@@ -114,7 +114,7 @@ int ReadAllAnalog(long* data1, long* data2){
int ReadAllAnalog(long* data1, long* data2){
int open_status=0;
@@ -27,7 +27,7 @@
if (open_status==8){
*data1=data_in[2];
*data2=data_in[3];
-@@ -131,8 +131,8 @@
+@@ -131,8 +131,8 @@ int OutputAnalogChannel(long channel, long data){
data_out[3]=(unsigned char)data;
else
data_out[2]=(unsigned char)data;
@@ -38,7 +38,7 @@
if (open_status!=8)
return -1;
else
-@@ -144,8 +144,8 @@
+@@ -144,8 +144,8 @@ int OutputAllAnalog(long data1,long data2){
data_out[0]=0x05; /* analog out or digital out command */
data_out[2]=(unsigned char)data1;
data_out[3]=(unsigned char)data2;
@@ -49,7 +49,7 @@
if (open_status!=8)
return -1;
else
-@@ -179,8 +179,8 @@
+@@ -179,8 +179,8 @@ int WriteAllDigital(long data){
int open_status=0;
data_out[0]=0x05; /* analog out or digital out command */
data_out[1]=(unsigned char)data;
@@ -60,7 +60,7 @@
if (open_status!=8)
return -1;
else
-@@ -225,7 +225,7 @@
+@@ -225,7 +225,7 @@ int ReadDigitalChannel(long channel){
int open_status=0,i;
unsigned char mask=8;
if (channel>0 && channel<6){
@@ -69,7 +69,7 @@
if (open_status==8){
for (i=1;i<=channel;i++)
if (i!=3) mask*=2;
-@@ -244,7 +244,7 @@
+@@ -244,7 +244,7 @@ long ReadAllDigital(){
long ReadAllDigital(){
int open_status=0,i,return_data=0;
unsigned char mask=8,pow=1;
@@ -78,7 +78,7 @@
if (open_status==8){
for (i=1;i<=5;i++){
mask*=2;
-@@ -269,8 +269,8 @@
+@@ -269,8 +269,8 @@ int ResetCounter(long counternr){
if (counternr==1 || counternr==2){
data_out[0]=0x02+(unsigned char)counternr; /* counter selection */
data_out[3+counternr]=0x00;
@@ -89,7 +89,7 @@
if (open_status==8)
return 0;
else
-@@ -283,7 +283,7 @@
+@@ -283,7 +283,7 @@ long ReadCounter(long counterno){
long ReadCounter(long counterno){
int open_status=0;
if (counterno==1 || counterno==2){
@@ -98,7 +98,7 @@
if (open_status==8){
if (counterno==2)
return data_in[6];
-@@ -316,7 +316,7 @@
+@@ -316,7 +316,7 @@ int SetCounterDebounceTime(long counterno, long deboun
value+=1;
data_out[5+counterno]=(unsigned char)value;
if (DEBUG) fprintf(stderr,"Debouncetime%d value for k8055:%d\n",(int)counterno,data_out[5+counterno]);