From owner-svn-ports-head@FreeBSD.ORG Mon Jan 27 11:51:00 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 084EDF9F; Mon, 27 Jan 2014 11:51:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE522103B; Mon, 27 Jan 2014 11:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0RBoxsU079416; Mon, 27 Jan 2014 11:50:59 GMT (envelope-from ehaupt@svn.freebsd.org) Received: (from ehaupt@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0RBoxtA079414; Mon, 27 Jan 2014 11:50:59 GMT (envelope-from ehaupt@svn.freebsd.org) Message-Id: <201401271150.s0RBoxtA079414@svn.freebsd.org> From: Emanuel Haupt Date: Mon, 27 Jan 2014 11:50:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r341381 - in head/net/socat: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 11:51:00 -0000 Author: ehaupt Date: Mon Jan 27 11:50:59 2014 New Revision: 341381 URL: http://svnweb.freebsd.org/changeset/ports/341381 QAT: https://qat.redports.org/buildarchive/r341381/ Log: 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 Modified: head/net/socat/Makefile head/net/socat/files/socat.in Modified: head/net/socat/Makefile ============================================================================== --- head/net/socat/Makefile Mon Jan 27 11:46:37 2014 (r341380) +++ head/net/socat/Makefile Mon Jan 27 11:50:59 2014 (r341381) @@ -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 +.include .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 +.include Modified: head/net/socat/files/socat.in ============================================================================== --- head/net/socat/files/socat.in Mon Jan 27 11:46:37 2014 (r341380) +++ head/net/socat/files/socat.in Mon Jan 27 11:50:59 2014 (r341381) @@ -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" +command=/usr/sbin/daemon +command_args=" -f -p ${pidfile} /usr/local/bin/socat ${socat_flags}" +procname=/usr/local/bin/socat -socat_start() { - echo "Starting ${name}." - /usr/sbin/daemon -f -p ${pidfile} ${command} ${socat_flags} +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"