Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2005 18:38:12 GMT
From:      skv@FreeBSD.org
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/77873: New variable: USE_BSD_MK
Message-ID:  <200502211838.j1LIcCgP097694@freefall.freebsd.org>
Resent-Message-ID: <200502211840.j1LIeCV3097798@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         77873
>Category:       ports
>Synopsis:       New variable: USE_BSD_MK
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 18:40:12 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Skvortsov
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
<Organization of PR author (multiple lines)>
>Environment:

	<Relevant environment information (multiple lines)>

>Description:

New variable USE_BSD_MK is offered.

These is some ports in tree depending on (building via) /usr/share/mk/*.mk files.

New USE_BSD_MK should rip off all MAKE_ENV appendings and NOPROFILE hacks.

Possibly affected ports:

audio/ufmcontrol-i18n
comms/tits
converters/iconv
databases/db
devel/libhash
devel/linuxthreads
graphics/gdchart
graphics/libglut
graphics/ming
graphics/tifmerge
irc/icbirc
japanese/libjconv
japanese/ming
lang/ghc
lang/ghc5
mail/popd
math/lapack
math/libranlib
misc/projectionlib
misc/ezload
multimedia/libdivxdecore-devel
multimedia/libdivxencore
net/libconnect
net-mgmt/ipacctd
net/widentd
news/newsfetch
science/hdf
security/isakmpd
security/vncrypt
sysutils/dc42wrap
sysutils/estctrl
textproc/nunnimcax
textproc/tinyxml

Note commonly used in ports that MANDIR-via-MAKE_ENV passing is not added
to applied patch because MANDIR is already depends on SHAREDIR.

>How-To-Repeat:

	<Code/input/activities to reproduce the problem (multiple lines)>

>Fix:

--- bsd.port.mk.orig	Mon Feb 21 20:37:22 2005
+++ bsd.port.mk	Mon Feb 21 21:23:12 2005
@@ -221,6 +221,11 @@
 # USE_GMAKE		- If set, this port uses gmake.
 # GMAKE			- Set to path of GNU make if not in $PATH.
 #				  Default: gmake
+# USE_BSD_MK		- If set, this port uses /usr/share/mk/* files. Additional variables
+#				  are added to MAKE_ENV and PLIST_SUB.
+#				  Note that if USE_BSD_MK equal to "bin"
+#				  then "BINDIR=${PREFIX}/bin" will be added to MAKE_ENV,
+#				  else "BINDIR=${PREFIX}/sbin" will be appended.
 ##
 # USE_GETOPT_LONG
 #				- If set, this port uses getopt_long. If OSVERSION
@@ -1459,6 +1464,23 @@
 CPPFLAGS+=		-I${LOCALBASE}/include
 LDFLAGS+=		-L${LOCALBASE}/lib -lgnugetopt
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+.endif
+.endif
+
+.if defined(USE_BSD_MK)
+.if ${USE_BSD_MK:U} == "BIN"
+MAKE_ENV+=	BINDIR=${PREFIX}/bin
+.else
+MAKE_ENV+=	BINDIR=${PREFIX}/sbin
+.endif
+MAKE_ENV+=	SHAREDIR=${PREFIX}
+.if defined(NOMANCOMPRESS)
+MAKE_ENV+=	NOMANCOMPRESS=${NOMANCOMPRESS}
+.endif
+.if defined(NOPROFILE)
+PLIST_SUB+=	PROFILE="@comment "
+.else
+PLIST_SUB+=	PROFILE=""
 .endif
 .endif
 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502211838.j1LIcCgP097694>