ports/58525: [PATCH] port devel/portlint: USE_* should be no user-settable option

Oliver Eikemeier eikemeier at fillmore-labs.com
Sat Oct 25 08:22:24 PDT 2003


>Number:         58525
>Category:       ports
>Synopsis:       [PATCH] port devel/portlint: USE_* should be no user-settable option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Class:          change-request
>Submitter-Id:   current-users
>Originator:     Oliver Eikemeier
>Organization:   Fillmore Labs - http://www.fillmore-labs.com
>Release:        FreeBSD 4.8-STABLE i386
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE

>Description:

Some ports use user-settable options that start with USE_*. These are reserved
for bsd.port.mk and friends, and may give strange results when defined on the
command line or in make.conf. For example:

  cd security/gnupg; make install USE_OPENLDAP=yes

fails when OpenLDAP is not installed, but succeeds when OpenLDAP is installed.

Affected ports:

ache at FreeBSD.org
- www/lynx-current
- www/mnogosearch
USE_OPENSSL => !WITHOUT_OPENSSL

cy at FreeBSD.org
- security/krb5
USE_MIT_TARBALL => WITH_MIT_TARBALL

darius at dons.net.au
- comms/ltmdm
USE_595_OBJ => WITH_595_OBJ

kcwu at ck.tp.edu.tw
- chinese/libtabe
- chinese/xcin25
USE_DB2 => WITH_DB2

koma2 at jiro.c.u-tokyo.ac.jp
- japanese/skkinput3
USE_SKK10 => WITH_SKK10

krion at FreeBSD.org
- irc/ngircd
USE_TCP_WRAPPERS => WITH_TCP_WRAPPERS

kris at FreeBSD.org
- games/tome
USE_XLIB => WITH_XLIB

kuriyama at FreeBSD.org
- security/gnupg
USE_OPENLDAP => WITH_OPENLDAP, and use USE_OPENLDAP

maho at FreeBSD.org
- math/spooles
USE_MPI => WITH_MPI
USE_THREADS => WITH_THREADS

makoto at pinpott.spnet.ne.jp
- japanese/zangband
USE_Z_SCORES => WITH_Z_SCORES

markun at onohara.to
- security/clamav
USE_LIBTOOL_VER is a dirty hack by myself...

mbr at FreeBSD.org
- editors/staroffice60
USE_CDROM => WITH_CDROM

mwest at uct.ac.za
- x11/xmotd
USE_HTML => WITH_HTML
USE_MOTIF => WITH_MOTIF
USE_XPM => WITH_XPM

nectar at FreeBSD.ORG
- security/heimdal
USE_XLIB => WITH_XLIB

nobutaka at FreeBSD.org
- www/w3m
USE_OPENSSL => !WITHOUT_OPENSSL

okazaki at FreeBSD.org
- java/junit
USE_JAVA => WITH_JAVA

openoffice at FreeBSD.org
- editors/openoffice
- editors/openoffice-devel
- german/openoffice
- portuguese/openoffice
- russian/openoffice
USE_LANG => WITH_LANG

pat at FreeBSD.org
- games/q3server-ra3
DONT_USE_ZIP => WITHOUT_ZIP
- games/utserver-to
DONT_USE_ZIP => WITHOUT_ZIP
DO_USE_WRKSUBDIR => WITH_WRKSUBDIR
DO_USE_STRIP => WITH_STRIP

ports at FreeBSD.org
- cad/gmsh
USE_TRIANGLE => WITH_TRIANGLE
- cad/tochnog
USE_THREADS => WITH_THREADS
- security/isakmpd
USE_KEYNOTE => WITH_KEYNOTE
- www/interchange
USE_THIS_PERL => WITH_BASE_PERL
- net/rsync
USE_SSH => WITH_SSH

sergei at FreeBSD.org
- mail/anubis
USE_OPENSSL => WITH_OPENSSL
USE_GNUTLS => WITH_GNUTLS
USE_PAM => WITH_PAM
USE_TCP_WRAPPERS => WITH_TCP_WRAPPERS
USE_PAM => WITH_PAM

sf at slappy.org
- math/maxima
USE_CMUCL => WITH_CMUCL
USE_GCL => WITH_GCL
USE_CLISP => WITH_CLISP

taguchi at tohoku.iij.ad.jp
- x11-servers/XttXF86srv-common
USE_SHARED_WRKSRC => WITH_SHARED_WRKSRC

udo.schweigert at siemens.com
- mail/mutt-devel
USE_NCURSES => WITH_NCURSES
USE_SLANG => WITH_SLANG

ume at FreeBSD.org
- mail/cyrus-imapd2
- mail/cyrus-imapd22
USE_BDB_VER => WITH_BDB_VER

Ports that are reported, but shouldn't:

ade at FreeBSD.org:
- devel/autoconf
- devel/autoconf213
- devel/autoconf253
- devel/autoconf257
USE_AUTOCONF
- devel/automake
- devel/automake14
- devel/automake15
- devel/automake17
USE_AUTOMAKE
- devel/libtool13
- devel/libtool14
- devel/libtool15
USE_LIBTOOL

>How-To-Repeat:
>Fix:

--- portlint-USE.patch begins here ---
--- src/portlint.pl	16 Aug 2003 20:42:44 -0000	1.40
+++ src/portlint.pl	25 Oct 2003 14:12:32 -0000
@@ -844,6 +847,16 @@
 	}
 
 	#
+	# whole file: USE_* as a user-settable option
+	#
+	print "OK: checking for USE_* as a user-settable option.\n" if ($verbose);
+	while ($whole =~ /\n\s*\.\s*(?:el)?if[^\n]*?\b(\w*USE_)(\w+)(?\![^\n]*\n#?\.error)/g) {
+		&perror("WARN: is $1$2 a user-settable option? ".
+			"Consider using WITH_$2 instead.")
+			if ($1.$2 ne 'USE_GCC');
+	}
+
+	#
 	# whole file: NO_CHECKSUM
 	#
 	$whole =~ s/\n#[^\n]*/\n/g;
--- portlint-USE.patch ends here ---


More information about the freebsd-ports mailing list