On 2017/09/11 11:09, Jérôme KASPER wrote:
> Hi kaashif, brian,
> 
> find attached a wip for aget . added MASTER_SITES instead of github and 
> removed c++ deps.
> i also made a patch for Makefile to remove use of gcc and use install stuff 
> in install stage instead
> of cp . However there must be a path problem lasting because even if i run a 
> loop of make plist
> i have pkg/PLIST still empty.
> 
> i think i’m not too far from a clean result but i would need help about the 
> empty pkg/PLIST

here's a diff to apply on top. patches aren't necessary for CC, you can
pass that in with MAKE_FLAGS, and the install stage is simple enough it's
easier to just replicate in the ports Makefile than fixing it up.
the other changes are general ports style to keep things in line with
other ports.

on the other hand, I'm not sure it's a good addition to ports:

- no https
- no ipv6
- seems dead since 2009
- we already have a couple of alternatives - aria2 which is still developed,
and axel which also seems dead since 2009 but at least does https..

diff --git Makefile Makefile
index bb0ca16..2065077 100644
--- Makefile
+++ Makefile
@@ -1,20 +1,24 @@
 # $OpenBSD: Makefile 2017/09/11 11:29:30 jkasper Exp $
 
-COMMENT =      Multithreaded HTTP download accelerator
+COMMENT =      multithreaded HTTP download accelerator
 
-V =            0.4.1
-PKGNAME =      aget-${V}
-DISTNAME =     ${PKGNAME}
-
-MASTER_SITES = http://www.enderunix.org/aget/
+DISTNAME =     aget-0.4.1
 
 CATEGORIES =   net
 
 HOMEPAGE =     http://www.enderunix.org/aget/
 
-#BSD Clause-3
+# BSD
 PERMIT_PACKAGE_CDROM = Yes
 
 WANTLIB =      c pthread
 
+MASTER_SITES = http://www.enderunix.org/aget/
+
+MAKE_FLAGS =   CC="${CC}" CFLAGS="${CFLAGS}"
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKBUILD}/aget ${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKBUILD}/aget.1 ${PREFIX}/man/man1
+
 .include <bsd.port.mk>
diff --git patches/patch-Head_c patches/patch-Head_c
new file mode 100644
index 0000000..a2667a4
--- /dev/null
+++ patches/patch-Head_c
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+prototype for hstrerror(3)
+
+Index: Head.c
+--- Head.c.orig
++++ Head.c
+@@ -18,6 +18,7 @@
+ 
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
++#include <netdb.h>
+ 
+ #ifdef SOLARIS
+ #include <arpa/nameser.h>
diff --git patches/patch-Makefile patches/patch-Makefile
deleted file mode 100644
index 82844cd..0000000
--- patches/patch-Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-$OpenBSD$
-
-Index: Makefile
---- Makefile.orig
-+++ Makefile
-@@ -4,8 +4,9 @@
- OBJS = main.o Aget.o Misc.o Head.o Signal.o Download.o Resume.o
- CFLAGS = -g -W
- LDFLAGS = -pthread
--CC = gcc
- STRIP = strip
-+BINDIR = /usr/local/bin
-+MANDIR = /usr/share/man/man
- 
- all: $(OBJS)
-       $(CC) -o aget $(OBJS) $(LDFLAGS)
-@@ -14,8 +15,11 @@ strip: $(all)
-       $(STRIP) aget
-       
- install:
--      cp -f aget /usr/local/bin/aget
--      cp -f aget.1 /usr/share/man/man1/
-+      install -m755 -d ${WRKBUILD}$(BINDIR)
-+      install -m755 -d ${WRKBUILD}$(MANDIR)
-+
-+      install -m755 aget ${WRKBUILD}$(BINDIR)
-+      install -m755 aget.1 ${WRKBUILD}$(MANDIR)
- 
- clean: 
-       rm -f aget *.o core.* *~
diff --git pkg/PLIST pkg/PLIST
index 8666d3a..6ddf7fb 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -1 +1,3 @@
 @comment $OpenBSD$
+@bin bin/aget
+@man man/man1/aget.1

Reply via email to