ports/150174: math/blas: Allow Profiled Libraries to be disabled.
Scot Hetzel
swhetzel at gmail.com
Wed Sep 1 05:50:02 UTC 2010
>Number: 150174
>Category: ports
>Synopsis: math/blas: Allow Profiled Libraries to be disabled.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Sep 01 05:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Scot Hetzel
>Release: FreeBSD 9.0-CURRENT
>Organization:
>Environment:
FreeBSD vbox.hetzel.local 9.0-CURRENT FreeBSD 9.0-CURRENT #20 r211958M: Sun Aug 29 05:40:13 UTC 2010 root at vbox.hetzel.local:/usr/obj/usr/src/9x/sys/GENERIC amd64
>Description:
If you have a system without profiled libraries installed, the port still wants to install them.
>How-To-Repeat:
Have a system without profiled libraries installed, and then cd /usr/ports/math/blas ; make install.
>Fix:
The attached patch changes the port to use OPTIONS frame work to select if profiled libraries should be installed.
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/math/blas/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- Makefile 30 Aug 2010 07:26:27 -0000 1.47
+++ Makefile 1 Sep 2010 00:30:04 -0000
@@ -35,11 +35,25 @@
MAKE_ENV+= ${_u}="${LOCALBASE}/bin/${_u:L}"
.endfor
-.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE))
+# If there are no profiled libraries on this system, default to OFF
+.if exists(/usr/lib/libc_p.a)
+PROFILE_STATUS= ON
+.else
+PROFILE_STATUS= OFF
+.endif
+
+OPTIONS= PROFILE "Install Profiled Libraries" ${PROFILE_STATUS}
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_PROFILE)
+MAKE_ARGS+= WITH_PROFILE=true
PLIST_FILES+= lib/libblas_p.a
+.else
+MAKE_ARGS+= WITHOUT_PROFILE=true
.endif
post-patch:
@${CP} ${FILESDIR}/makefile.lib ${WRKSRC}/Makefile
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list