From owner-freebsd-ports@FreeBSD.ORG Thu Aug 3 20:59:37 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D54316A4DA for ; Thu, 3 Aug 2006 20:59:37 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7D8B43D55 for ; Thu, 3 Aug 2006 20:59:32 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so2700017uge for ; Thu, 03 Aug 2006 13:59:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JOcrcVZLscZg4VnLYJTKYnUEN6HUzKpnqIsumge8aSTULBZgQ0779dQ1KkJbZq8IKnfcjIIVuLhKDKSm3tO90g/POh/tI3eCdcq86Nxivwwe9CuVM7+/ONu2tl72rMlIl8pXlst7lW9FscHykP/nn+TxYuPp9nCFVFIepUcsLxU= Received: by 10.78.160.2 with SMTP id i2mr1091418hue; Thu, 03 Aug 2006 13:59:31 -0700 (PDT) Received: by 10.78.83.2 with HTTP; Thu, 3 Aug 2006 13:59:31 -0700 (PDT) Message-ID: <790a9fff0608031359u4937ad98m528de3989a46ad59@mail.gmail.com> Date: Thu, 3 Aug 2006 15:59:31 -0500 From: "Scot Hetzel" To: "Beech Rintoul" In-Reply-To: <200608031217.24275.beech@alaskaparadise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200608031217.24275.beech@alaskaparadise.com> Cc: roam@FreeBSD.org, freebsd-ports@freebsd.org Subject: Re: Makefile problem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 20:59:37 -0000 On 8/3/06, Beech Rintoul wrote: > I have an ongoing problem with the makefile for ftp/proftpd. This problem > existed when I took over maintainership of the port and I'd like to fix it if > possible before the next update. > > When I run portlint, I get the following: > > FATAL: Makefile: [131]: USE_OPENSSL is set after including bsd.port.pre.mk. > > I can cheat by adding a space instead of a tab after the line and turn it into > a warning, but I'd really like to fix this properly. I've tried moving > bsd.port.pre.mk to various places, but all I accomplish is changing the > error. > > Can someone take a look at this and maybe give me a suggestion? > Since you include bsd.openssl.mk in the ports Makefile after the include for bsd.port.pre.mk, you don't need to set the USE_OPENSSL variable. .include <${PORTSDIR}/Mk/bsd.port.pre.mk> : .if defined(WITH_OPENSSL) CFLAGS+= -DHAVE_OPENSSL -USE_OPENSSL= YES .include <${PORTSDIR}/Mk/bsd.openssl.mk> PROFTPD_LIBS+= -lssl -lcrypto -L${LOCALBASE}/lib MODULES:=${MODULES}:mod_tls .if defined(WITH_LDAP_TLS) EXTRA_PATCHES+= ${FILESDIR}/extra_patch-ldap-tls-mod_ldap.c .endif .endif The same thing can be done to the ftp/curl port: 1. Get rid of USE_OPENSSL before bsd.port.pre.mk -.if defined(WITHOUT_SSL) -USE_OPENSSL= YES -.endif .include 2. add a new option for OpenSSL that defaults to on OPTIONS= CARES "Asynchronous DNS resolution via c-ares" off \ CURL_DEBUG "Enable curl diagnostic output" off \ + SSL "OpenSSL Support" on \ + GNUTLS "Use GNU TLS if OpenSSL is OFF" off \ - GNUTLS "Use GNU TLS if WITHOUT_SSL is specified" off \ IPV6 "IPv6 support" on \ KERBEROS4 "Kerberos 4 authentication" off \ LIBIDN "Internationalized Domain Names via libidn" off \ NTLM "NTLM authentication" off 3. Change: .if !defined(WITHOUT_SSL) CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} .else CONFIGURE_ARGS+= --without-ssl .endif to .if !defined(WITHOUT_SSL) .include "${PORTSDIR}/Mk/bsd.openssl.mk" .include CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} .else CONFIGURE_ARGS+= --without-ssl .endif Do we need to specify the full patch to bsd.openssl.mk, or can we getaway with just: .include in the ports Makefile. This should fix the ports that have an optional dependancy on OpenSSL. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.