Skip to content

Commit

Permalink
net/rinetd: update to new upstream and 0.73
Browse files Browse the repository at this point in the history
While here, pet portlint and portclippy.

PR:		274331
  • Loading branch information
marcin-gryszkalis authored and rbgarga committed Oct 27, 2023
1 parent d252492 commit 3c7b8fd
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 255 deletions.
38 changes: 19 additions & 19 deletions net/rinetd/Makefile
@@ -1,39 +1,39 @@
PORTNAME= rinetd
PORTVERSION= 0.62
PORTREVISION= 4
PORTVERSION= 0.73
DISTVERSIONPREFIX= v
CATEGORIES= net
MASTER_SITES= http://www.boutell.com/rinetd/http/ \
GENTOO
DISTNAME= rinetd

MAINTAINER= garga@FreeBSD.org
COMMENT= Simple TCP port redirector
WWW= https://github.com/samhocevar/rinetd

LICENSE= GPLv2

OPTIONS_DEFINE= DOCS

WRKSRC= ${WRKDIR}/rinetd-${PORTVERSION}
USES= cpe dos2unix autoreconf
USE_GITHUB= yes
GH_ACCOUNT= samhocevar
GH_TAGNAME= d4e0a60
USE_RC_SUBR= rinetd

USES= cpe dos2unix
GNU_CONFIGURE= yes

PORTDOCS= index.html
PLIST_FILES= sbin/rinetd \
man/man8/rinetd.8.gz

USE_RC_SUBR= rinetd

post-extract:
@${MV} ${WRKDIR}/rinetd ${WRKSRC}
OPTIONS_DEFINE= DOCS

post-patch:
@${REINPLACE_CMD} -E "s,(/etc/rinetd.conf),${PREFIX}\1," \
${WRKSRC}/rinetd.[8c]
@${REINPLACE_CMD} -E "s,/usr(/sbin/rinetd),${PREFIX}\1," \
@${REINPLACE_CMD} -E \
-e "s,(/etc/rinetd.conf),${PREFIX}\1," \
-e "s,/usr(/sbin/rinetd),${PREFIX}\1," \
${WRKSRC}/rinetd.8
@${REINPLACE_CMD} -e "s,cc ,${CC} ,g" ${WRKSRC}/Makefile
@${REINPLACE_CMD} -E "s,(/etc/rinetd.conf),${PREFIX}\1," \
${WRKSRC}/src/rinetd.h

post-install:
${MV} ${STAGEDIR}${PREFIX}/etc/rinetd.conf \
${STAGEDIR}${PREFIX}/etc/rinetd.conf.sample

post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
Expand Down
5 changes: 3 additions & 2 deletions net/rinetd/distinfo
@@ -1,2 +1,3 @@
SHA256 (rinetd.tar.gz) = 0c68d27c5bd4b16ce4f58a6db514dd6ff37b2604a88b02c1dfcdc00fc1059898
SIZE (rinetd.tar.gz) = 115541
TIMESTAMP = 1696686326
SHA256 (samhocevar-rinetd-v0.73-d4e0a60_GH0.tar.gz) = 76eef19e0af8459c9434ac8ac0b58edac1bba353f5aaceb1d5f971fb3f6a3016
SIZE (samhocevar-rinetd-v0.73-d4e0a60_GH0.tar.gz) = 45544
22 changes: 0 additions & 22 deletions net/rinetd/files/patch-Makefile

This file was deleted.

18 changes: 0 additions & 18 deletions net/rinetd/files/patch-rinetd.c

This file was deleted.

194 changes: 0 additions & 194 deletions net/rinetd/files/patch-select2poll

This file was deleted.

11 changes: 11 additions & 0 deletions net/rinetd/files/patch-src_Makefile.am
@@ -0,0 +1,11 @@
--- src/Makefile.am.orig 2023-10-07 16:13:36 UTC
+++ src/Makefile.am
@@ -18,7 +18,7 @@ parse.c: parse.peg
# _DARWIN_C_SOURCE is for NI_MAXHOST on OS X
# _XOPEN_SOURCE is for struct sigaction
# _GNU_SOURCE is for h_errno and gethostbyname-related macros
-___rinetd_CFLAGS = -std=c99 -D_POSIX_C_SOURCE=200809L \
+___rinetd_CFLAGS = -std=c99 \
-D_XOPEN_SOURCE -D_GNU_SOURCE -D_DARWIN_C_SOURCE \
-Wall -Wextra -Wwrite-strings

11 changes: 11 additions & 0 deletions net/rinetd/files/patch-src_rinetd.c
@@ -0,0 +1,11 @@
--- src/rinetd.c.orig 2023-10-07 16:13:36 UTC
+++ src/rinetd.c
@@ -927,7 +927,7 @@ RETSIGTYPE quit(int s)

void registerPID(char const *pid_file_name)
{
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
FILE *pid_file = fopen(pid_file_name, "w");
if (pid_file == NULL) {
/* non-fatal, non-Linux may lack /var/run... */
3 changes: 3 additions & 0 deletions net/rinetd/pkg-plist
@@ -0,0 +1,3 @@
@sample etc/rinetd.conf.sample
sbin/rinetd
man/man8/rinetd.8.gz

0 comments on commit 3c7b8fd

Please sign in to comment.