summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2014-01-27 11:50:59 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2014-01-27 11:50:59 +0000
commitf091a2b471da882024efd70aee99ce72257129d8 (patch)
tree17894b3bf9df51c6e5392b27e186ce4c5bf3f525
parent- Stage support (diff)
This patch will make the socat rc script more reliable. [1]
While here, use 'compiler' USES macro to determine compiler type. PR: 185946 [1] Submitted by: feld
Notes
Notes: svn path=/head/; revision=341381
-rw-r--r--net/socat/Makefile11
-rw-r--r--net/socat/files/socat.in17
2 files changed, 16 insertions, 12 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile
index 098fb6ddff16..1894d3c0e1c1 100644
--- a/net/socat/Makefile
+++ b/net/socat/Makefile
@@ -3,7 +3,7 @@
PORTNAME= socat
PORTVERSION= 1.7.2.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= http://www.dest-unreach.org/socat/download/ \
CRITICAL
@@ -13,6 +13,7 @@ COMMENT= Multipurpose relay and more
LICENSE= GPLv2
+USES= compiler
GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_RC_SUBR= socat
@@ -25,16 +26,14 @@ PORTDOCS= EXAMPLES README SECURITY FAQ
OPTIONS_DEFINE= DOCS
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
.if defined(WITH_OPENSSL_PORT)
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
-CCISCLANG!= ${CC} --version
-
-.if !empty(CCISCLANG:M*clang*)
+.if ${COMPILER_TYPE} == "clang"
CFLAGS+= -Wno-unused-comparison
.endif
@@ -52,4 +51,4 @@ do-install:
BROKEN= Does not configure on arm
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/socat/files/socat.in b/net/socat/files/socat.in
index 8b6b943044dc..b21632ac1e2d 100644
--- a/net/socat/files/socat.in
+++ b/net/socat/files/socat.in
@@ -22,13 +22,18 @@ load_rc_config $name
: ${socat_enable="NO"}
-start_cmd="${name}_start"
+start_precmd="socat_prestart"
pidfile=/var/run/socat.pid
-command="%%PREFIX%%/bin/socat"
-
-socat_start() {
- echo "Starting ${name}."
- /usr/sbin/daemon -f -p ${pidfile} ${command} ${socat_flags}
+command=/usr/sbin/daemon
+command_args=" -f -p ${pidfile} /usr/local/bin/socat ${socat_flags}"
+procname=/usr/local/bin/socat
+
+socat_prestart()
+{
+ # socat_flags gets applied too early if we don't do this.
+ # I didn't want to force people to update their rc.conf files
+ # and change the socat_flags to something else.
+ rc_flags=""
}
run_rc_command "$1"