freebsd-ports/devel/valgrind/Makefile
Rong-En Fan 741aa71483 Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.

To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.

To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.

Changes to Mk/*:
 - Add runtime detection magic in bsd.port.mk
 - Remove CONFIGURE_TARGET hack in various bsd.*.mk
 - USE_GNOME=gnometarget is now an no-op

Changes to individual ports, other than removing the CONFIGURE_TARGET hack:

= pkg-plist changed (due to the ugly CONFIGURE_TARGET prefix in * executables)
  - comms/gnuradio
  - science/abinit
  - science/elmer-fem
  - science/elmer-matc
  - science/elmer-meshgen2d
  - science/elmerfront
  - science/elmerpost

= use x86_64 as ARCH
  - devel/g-wrap

= other changes
  - print/magicfilter
    GNU_CONFIGURE -> HAS_CONFIGURE since it's not generated by autoconf

Total # of ports modified:  1,027
Total # of ports affected: ~7,000 (set GNU_CONFIGURE to yes)

PR:		126524 (obsoletes 52917)
Submitted by:	rafan
Tested on:	two pointyhat 7-amd64 exp runs (by pav)
Approved by:	portmgr (pav)
2008-08-21 06:18:49 +00:00

102 lines
2.5 KiB
Makefile

# Ports collection makefile for: valgrind
# Date created: April 15 2004
# Whom: Simon Barner <barner@gmx.de>
#
# $FreeBSD$
#
PORTNAME= valgrind
PORTVERSION= 352
PORTREVISION= 7
CATEGORIES= devel
MASTER_SITES= http://www.rabson.org/
DISTNAME= ${PORTNAME}-stable-${PORTVERSION}
MAINTAINER= barner@FreeBSD.org
COMMENT= A (memory) debugging and profiling tool
ONLY_FOR_ARCHS= i386
CONFLICTS= valgrind-snapshot-[0-9]*
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_GMAKE= yes
USE_GNOME= pkgconfig
GNU_CONFIGURE= yes
USE_AUTOTOOLS+= autoconf:262 aclocal:19 automake:19
CONFIGURE_ARGS+=--enable-maintainer-mode
USE_PERL5_BUILD=yes
USE_GCC= 3.4
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 800000
IGNORE= FreeBSD 8.x is unsupported
.elif ${OSVERSION} >= 700000
PLIST_SUB+= RELENG_5="@comment "
PLIST_SUB+= RELENG_6="@comment "
PLIST_SUB+= RELENG_7=""
.elif ${OSVERSION} >= 600000
PLIST_SUB+= RELENG_5="@comment "
PLIST_SUB+= RELENG_6=""
PLIST_SUB+= RELENG_7="@comment "
.else
PLIST_SUB+= RELENG_5=""
PLIST_SUB+= RELENG_6="@comment "
PLIST_SUB+= RELENG_7="@comment "
.endif
PROCFS!= /sbin/mount | ${GREP} '^procfs' | ${AWK} '{print $1}'
pre-everything::
.if ${PROCFS}
@${ECHO_CMD} ""
@${ECHO_CMD} "Check if procfs is running: YES"
.else
#
# /proc is not mounted on the machine in the package building cluster that
# that builds the list of IGNOREd ports (but it is on the build machines),
# so we need to make an exception here.
#
.ifndef (PACKAGE_BUILDING)
ECHO_MSG=/usr/bin/printf
IGNORE= needs a running procfs, which is not\n\
\ \ \ \ \ activated on your system. Please read the procfs\(5\)\n\
\ \ \ \ \ man page and add the following line to /etc/fstab:\n\
\n\
\ \ \ \ \ proc /proc procfs rw 0 0\n\
\n\n
.endif
.endif
pre-patch:
.ifdef(NOPORTDOCS)
${FIND} ${WRKSRC} -name "Makefile.in" -exec \
${REINPLACE_CMD} -e "s/docs//g" {} \;
.endif
post-install:
@${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \
${PREFIX}/include/valgrind
.ifndef (PACKAGE_BUILDING)
@yes | ${PREFIX}/bin/valgrind --tool=memcheck --gen-suppressions=yes true 2>&1 \
| ${SED} -e 's,.*{$$,{,' \
| ${GREP} -v '^=' \
> ${WRKDIR}/freebsd-default.supp || \
${RM} ${WRKDIR}/freebsd-default.supp
.endif
@${ECHO} ""
@${ECHO} ""
@${CAT} ${PKGMESSAGE} | ${SED} -e 's,%%PREFIX%%,${PREFIX},g'
@${ECHO} ""
.if exists(${WRKDIR}/freebsd-default.supp)
@${INSTALL_DATA} ${WRKDIR}/freebsd-default.supp \
${PREFIX}/lib/valgrind
PLIST_SUB+= VALGRIND_SUPPFILE=""
.else
PLIST_SUB+= VALGRIND_SUPPFILE="@comment "
.endif
.include <bsd.port.post.mk>