mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-13 03:03:15 +00:00
01c588a635
very long and if some dependencies can't be added into the list. [1] - Fix FAM support. Make gamin the default FAM system. [2] - Introduce new 'quicksearch' target to show only port, path and info section of the matching ports. [3] - Introduce new category - rubygems. [4] - Fix stale dependencies while installing qmail slaveport and another port that depends on qmail. [5] - Add commentary for describes target in bsd.port.mk. [6] - Fix warning issued during make index on archs !368. [7] - Add USE_DOS2UNIX variable. If set to "YES", remove the ^M from all files under ${WRKSRC}. If set to a string, remove in all files under ${WRKSRC} with one of these names the ^Ms. [8] - Add new variables PERL_RUN_DEPENDS and PERL_BUILD_DEPENDS by checking the existance of the Perl modules with the "perl -e 'use module;'" command. [9] - Fix bsd.port.mk variable quoting issues. No quoting is necessary anymore either in the Makefile or on the command line. Affected variables include: BROKEN FORBIDDEN IGNORE MANUAL_PACKAGE_BUILD NO_CDROM NO_PACKAGE RESTRICTED [10] - Add NOFETCHFILES variable. If set, don't download these files from the ${MASTER_SITES} or ${MASTER_SITE_BACKUP} (but do from ${MASTER_SITE_OVERRIDE}). [11] - Improve 'search' target output. [12] - Add a new virtual category for Amateur Radio - hamradio. [13] - Cleanup some old/unused pathes in bsd.port.mk. [14] - Add @dirrmtry for plists which does the same as: "@unexec rmdir %D/foo 2>/dev/null || true" [15] - Remove virtual category - offix. [16] - Use portsnap instead of cvsup or cvs on "make update" in /usr/ports. [17] - Move location of bsd.autotools.mk within bsd.port.mk [18] - Add bsd.linux-rpm.mk, fix INSTALLS_SHLIB for Linux ports [19] - Use new USE_RC_SUBR format for FreeBSD version >= 700007 [20] - Replace the string "FreeBSD" by "The FreeBSD Project" in the security warning [21] - Add bsd.local.mk for local modification to ports framework. [22] - Replace rcNG spelling by rc.d [23] - Remove superfluous USE_REINPLACE. [24] Special thanks to: linimon for spending hours with all these patches clement for fixes kris for help with pointyhat PR: ports/86310 [1], ports/89498 [2], ports/83530 [3], ports/83789 [4], ports/84053 [5], ports/86281 [6], ports/87214 [7], ports/87234 [8], ports/87318 [9], ports/87396 [10], ports/87605 [11], ports/87840 [12], ports/88230 [13], ports/88493 [14], ports/88711 [15], ports/88751 [16], ports/89281 [17], ports/89999 [18], ports/90031 [19], ports/90150 [20], ports/90668 [21], ports/91433 [23], ports/88754 [24] Submitted by: mi [1], marcus [2], Lars Engels <lars.engels@0x20.net> [3], pav [4, 16, 20, 24], garga [5], cperciva [6], vd [7], edwin [8, 9, 11, 15, 21], fenner [10], Arseny Nasokin <tarc.po.cs.msu.su@tarc.po.cs.msu.su> [12], Carl Makin <carl@stagecraft.cx> [13], arved [14], NIIMI Satoshi <sa2c@sa2c.net> [17], thierry [18], jylefort [19], linimon [22], dougb [23]
348 lines
11 KiB
Makefile
348 lines
11 KiB
Makefile
#-*- mode: makefile; tab-width: 4; -*-
|
|
# ex:ts=4
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# Please view me with 4 column tabs!
|
|
#
|
|
# Please make sure all changes to this file are passed either through
|
|
# the maintainer, or portmgr@FreeBSD.org
|
|
|
|
Autotools_Include_MAINTAINER= ade@FreeBSD.org
|
|
|
|
#---------------------------------------------------------------------------
|
|
# IMPORTANT! READ ME! YES, THAT MEANS YOU!
|
|
#
|
|
# The "versioned" autotools referenced here are for BUILDING other ports
|
|
# only. THIS CANNOT BE STRESSED HIGHLY ENOUGH. Things WILL BREAK if you
|
|
# try to use them for anything other than ports/ work. This particularly
|
|
# includes use as a run-time dependency.
|
|
#
|
|
# If you need unmodified versions of autotools, such as for use in an
|
|
# IDE, then you MUST use the devel/gnu-* equivalents, and NOT these.
|
|
# See devel/anjuta and devel/kdevelop for examples.
|
|
#
|
|
# You have been WARNED!
|
|
#---------------------------------------------------------------------------
|
|
|
|
#---------------------------------------------------------------------------
|
|
# Entry point into the autotools system
|
|
#---------------------------------------------------------------------------
|
|
#
|
|
# USE_AUTOTOOLS= tool:version[:inc | :env] ...
|
|
#
|
|
# 'tool' can currently be one of:
|
|
# libtool, libltdl, autoconf, autoheader, automake, aclocal
|
|
#
|
|
# 'version' is tool dependent
|
|
#
|
|
# ':inc' is for libtool only, and is used to modify the patch-autotools
|
|
# target to use the relevant included version of libtool
|
|
#
|
|
# ':env' is for autoconf/autoheader/automake/aclocal and is used to
|
|
# specify that the environment variables are needed, but the relevant
|
|
# tool should NOT be run as part of the run-autotools target
|
|
#
|
|
# XXX: there is currently no sanity checking of the supplied variables
|
|
# other than to detect actually available versions. This should
|
|
# probably be fixed at some point.
|
|
#
|
|
# In addition, the following variables can be set in the port Makefile
|
|
# to be passed to the relevant tools:
|
|
#
|
|
# AUTOMAKE_ARGS=...
|
|
# - Extra arguments passed to automake during configure step
|
|
#
|
|
# ACLOCAL_ARGS=...
|
|
# - Arguments passed to aclocal during configure step
|
|
#
|
|
# AUTOCONF_ARGS=...
|
|
# - Extra arguments passed to autoconf during configure step
|
|
#
|
|
# AUTOHEADER_ARGS=...
|
|
# - Extra arguments passed to autoheader during configure step
|
|
#
|
|
# LIBTOOLFLAGS=<value>
|
|
# - Arguments passed to libtool during configure step
|
|
# Currently defaults to "--disable-ltlibs", but this will be going
|
|
# away when libtool .la files are brought back
|
|
#
|
|
# LIBTOOLFILES=<list-of-files>
|
|
# - A list of files to patch during libtool pre-configuration
|
|
# Defaults to "aclocal.m4" if autoconf is in use, otherwise "configure"
|
|
#
|
|
#---------------------------------------------------------------------------
|
|
|
|
# XXX: here be dragons :)
|
|
#
|
|
.for item in ${USE_AUTOTOOLS}
|
|
AUTOTOOL_${item:C/^([^:]+).*/\1/}${item:M*\:*\:*:C/^[^:]+:[^:]+:([^:]+)/_\1/}= ${item:C/^[^:]+:([^:]+).*/\1/}
|
|
.endfor
|
|
|
|
#---------------------------------------------------------------------------
|
|
# AUTOMAKE/ACLOCAL
|
|
#---------------------------------------------------------------------------
|
|
|
|
.if defined(AUTOTOOL_automake)
|
|
AUTOTOOL_automake_env= ${AUTOTOOL_automake}
|
|
GNU_CONFIGURE?= yes
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_aclocal)
|
|
AUTOTOOL_automake_env= ${AUTOTOOL_aclocal}
|
|
GNU_CONFIGURE?= yes
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_automake_env)
|
|
AUTOMAKE_VERSION= ${AUTOTOOL_automake_env}
|
|
|
|
# Make sure we specified a legal version of automake
|
|
#
|
|
. if !exists(${PORTSDIR}/devel/automake${AUTOMAKE_VERSION}/Makefile)
|
|
BROKEN+= Unknown AUTOMAKE version: ${AUTOMAKE_VERSION}
|
|
. endif
|
|
|
|
# Set up the automake environment
|
|
#
|
|
AUTOMAKE= ${LOCALBASE}/bin/automake${AUTOMAKE_VERSION}
|
|
AUTOMAKE_DIR= ${LOCALBASE}/share/automake${AUTOMAKE_VERSION}
|
|
ACLOCAL= ${LOCALBASE}/bin/aclocal${AUTOMAKE_VERSION}
|
|
ACLOCAL_DIR= ${LOCALBASE}/share/aclocal${AUTOMAKE_VERSION}
|
|
AUTOMAKE_PATH= ${LOCALBASE}/libexec/automake${AUTOMAKE_VERSION}:
|
|
AUTOMAKE_VARS= ACLOCAL=${ACLOCAL} AUTOMAKE=${AUTOMAKE}
|
|
|
|
AUTOMAKE_DEPENDS= ${AUTOMAKE}:${PORTSDIR}/devel/automake${AUTOMAKE_VERSION}
|
|
BUILD_DEPENDS+= ${AUTOMAKE_DEPENDS}
|
|
|
|
# XXX: backwards compatibility shim
|
|
#
|
|
. if ${AUTOMAKE_VERSION} == 14
|
|
AUTOMAKE_ARGS+= -i
|
|
. endif
|
|
|
|
. if defined(AUTOTOOL_aclocal)
|
|
ACLOCAL_ARGS?= --acdir=${ACLOCAL_DIR}
|
|
. endif
|
|
|
|
.endif
|
|
|
|
#---------------------------------------------------------------------------
|
|
# AUTOCONF/AUTOHEADER
|
|
#---------------------------------------------------------------------------
|
|
|
|
.if defined(AUTOTOOL_autoheader)
|
|
AUTOTOOL_autoconf= ${AUTOTOOL_autoheader}
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_autoconf)
|
|
AUTOTOOL_autoconf_env= ${AUTOTOOL_autoconf}
|
|
GNU_CONFIGURE?= yes
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_autoconf_env)
|
|
AUTOCONF_VERSION= ${AUTOTOOL_autoconf_env}
|
|
|
|
# Make sure we specified a legal version of autoconf
|
|
#
|
|
. if !exists(${PORTSDIR}/devel/autoconf${AUTOCONF_VERSION}/Makefile)
|
|
BROKEN+= Unknown AUTOCONF version: ${AUTOCONF_VERSION}
|
|
. endif
|
|
|
|
# Set up the autoconf/autoheader environment
|
|
#
|
|
AUTOCONF= ${LOCALBASE}/bin/autoconf${AUTOCONF_VERSION}
|
|
AUTOCONF_DIR= ${LOCALBASE}/share/autoconf${AUTOCONF_VERSION}
|
|
AUTOHEADER= ${LOCALBASE}/bin/autoheader${AUTOCONF_VERSION}
|
|
AUTOIFNAMES= ${LOCALBASE}/bin/ifnames${AUTOCONF_VERSION}
|
|
AUTOM4TE= ${LOCALBASE}/bin/autom4te${AUTOCONF_VERSION}
|
|
AUTORECONF= ${LOCALBASE}/bin/autoreconf${AUTOCONF_VERSION}
|
|
AUTOSCAN= ${LOCALBASE}/bin/autoscan${AUTOCONF_VERSION}
|
|
AUTOUPDATE= ${LOCALBASE}/bin/autoupdate${AUTOCONF_VERSION}
|
|
AUTOCONF_PATH= ${LOCALBASE}/libexec/autoconf${AUTOCONF_VERSION}:
|
|
AUTOCONF_VARS= AUTOCONF=${AUTOCONF} AUTOHEADER=${AUTOHEADER} AUTOIFNAMES=${AUTOIFNAMES} AUTOM4TE=${AUTOM4TE} AUTORECONF=${AUTORECONF} AUTOSCAN=${AUTOSCAN} AUTOUPDATE=${AUTOUPDATE}
|
|
|
|
AUTOCONF_DEPENDS= ${AUTOCONF}:${PORTSDIR}/devel/autoconf${AUTOCONF_VERSION}
|
|
BUILD_DEPENDS+= ${AUTOCONF_DEPENDS}
|
|
|
|
.endif
|
|
|
|
#---------------------------------------------------------------------------
|
|
# LIBTOOL/LIBLTDL
|
|
#---------------------------------------------------------------------------
|
|
|
|
# Convenience function to save people having to depend directly on
|
|
# devel/libltdl15
|
|
#
|
|
.if defined(AUTOTOOL_libltdl)
|
|
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl15
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_libtool)
|
|
GNU_CONFIGURE?= YES
|
|
AUTOTOOL_libtool_env= ${AUTOTOOL_libtool}
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_libtool_inc)
|
|
GNU_CONFIGURE?= YES
|
|
AUTOTOOL_libtool_env= ${AUTOTOOL_libtool_inc}
|
|
.endif
|
|
|
|
.if defined(AUTOTOOL_libtool_env)
|
|
LIBTOOL_VERSION= ${AUTOTOOL_libtool_env}
|
|
|
|
# Make sure we specified a legal version of libtool
|
|
#
|
|
. if !exists(${PORTSDIR}/devel/libtool${LIBTOOL_VERSION}/Makefile)
|
|
BROKEN+= Unknown LIBTOOL version: ${LIBTOOL_VERSION}
|
|
. endif
|
|
|
|
# Set up the libtool environment
|
|
#
|
|
LIBTOOL= ${LOCALBASE}/bin/libtool${LIBTOOL_VERSION}
|
|
LIBTOOLIZE= ${LOCALBASE}/bin/libtoolize${LIBTOOL_VERSION}
|
|
LIBTOOL_LIBEXECDIR= ${LOCALBASE}/libexec/libtool${LIBTOOL_VERSION}
|
|
LIBTOOL_SHAREDIR= ${LOCALBASE}/share/libtool${LIBTOOL_VERSION}
|
|
LIBTOOL_M4= ${LOCALBASE}/share/aclocal/libtool${LIBTOOL_VERSION}.m4
|
|
LTMAIN= ${LIBTOOL_SHAREDIR}/ltmain.sh
|
|
. if ${LIBTOOL_VERSION} == 13
|
|
LTCONFIG= ${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION}
|
|
. else
|
|
LTCONFIG= ${TRUE}
|
|
. endif
|
|
LIBTOOL_PATH= ${LIBTOOL_LIBEXECDIR}:
|
|
LIBTOOL_VARS= LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} LIBTOOL_M4=${LIBTOOL_M4} LTCONFIG=${LTCONFIG}
|
|
|
|
LIBTOOL_DEPENDS= ${LIBTOOL}:${PORTSDIR}/devel/libtool${LIBTOOL_VERSION}
|
|
BUILD_DEPENDS+= ${LIBTOOL_DEPENDS}
|
|
|
|
# XXX: do we really need this?
|
|
#
|
|
LIBTOOLFLAGS?= --disable-ltlibs
|
|
|
|
. if defined(AUTOTOOL_autoconf)
|
|
LIBTOOLFILES?= aclocal.m4
|
|
. else
|
|
LIBTOOLFILES?= configure
|
|
. endif
|
|
|
|
.endif
|
|
|
|
#---------------------------------------------------------------------------
|
|
# Environmental handling
|
|
# Now that we've got our environments defined for autotools, add them
|
|
# in so that the rest of the world can handle them
|
|
#
|
|
AUTOTOOLS_PATH= ${AUTOMAKE_PATH}${AUTOCONF_PATH}${LIBTOOL_PATH}
|
|
AUTOTOOLS_VARS= ${AUTOMAKE_VARS} ${AUTOCONF_VARS} ${LIBTOOL_VARS}
|
|
|
|
.if defined(AUTOTOOLS_PATH) && (${AUTOTOOLS_PATH} != "")
|
|
AUTOTOOLS_ENV+= PATH=${AUTOTOOLS_PATH}${PATH}
|
|
CONFIGURE_ENV+= PATH=${AUTOTOOLS_PATH}${PATH}
|
|
MAKE_ENV+= PATH=${AUTOTOOLS_PATH}${PATH}
|
|
SCRIPTS_ENV+= PATH=${AUTOTOOLS_PATH}${PATH}
|
|
. for item in automake aclocal autoconf autoheader libtool
|
|
. if defined(AUTOTOOL_${item}_env)
|
|
${item:U}_ENV+= PATH=${AUTOTOOLS_PATH}${PATH}
|
|
. endif
|
|
. endfor
|
|
.endif
|
|
|
|
.if defined(AUTOTOOLS_VARS) && (${AUTOTOOLS_VARS} != "")
|
|
AUTOTOOLS_ENV+= ${AUTOTOOLS_VARS}
|
|
CONFIGURE_ENV+= ${AUTOTOOLS_VARS}
|
|
MAKE_ENV+= ${AUTOTOOLS_VARS}
|
|
SCRIPTS_ENV+= ${AUTOTOOLS_VARS}
|
|
. for item in automake aclocal autoconf autoheader libtool
|
|
. if defined(AUTOTOOL_${item}_env)
|
|
${item:U}_ENV+= ${AUTOTOOLS_VARS}
|
|
. endif
|
|
. endfor
|
|
.endif
|
|
|
|
#---------------------------------------------------------------------------
|
|
# Make targets
|
|
#---------------------------------------------------------------------------
|
|
|
|
# run-autotools
|
|
#
|
|
# Part of the configure set - run appropriate programs prior to
|
|
# the actual configure target if autotools are in use.
|
|
# If needed, this target can be overridden, for example to change
|
|
# the order of autotools running.
|
|
|
|
.if !target(run-autotools)
|
|
run-autotools:: run-autotools-aclocal patch-autotools run-autotools-autoheader \
|
|
run-autotools-autoconf run-autotools-automake
|
|
.endif
|
|
|
|
.if !target(run-autotools-aclocal)
|
|
run-autotools-aclocal:
|
|
. if defined(AUTOTOOL_aclocal)
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${ACLOCAL} \
|
|
${ACLOCAL_ARGS})
|
|
. else
|
|
@${DO_NADA}
|
|
. endif
|
|
.endif
|
|
|
|
.if !target(run-autotools-automake)
|
|
run-autotools-automake:
|
|
. if defined(AUTOTOOL_automake)
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOMAKE} \
|
|
${AUTOMAKE_ARGS})
|
|
. else
|
|
@${DO_NADA}
|
|
. endif
|
|
.endif
|
|
|
|
.if !target(run-autotools-autoconf)
|
|
run-autotools-autoconf:
|
|
. if defined(AUTOTOOL_autoconf)
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
|
|
${AUTOCONF_ARGS})
|
|
. else
|
|
@${DO_NADA}
|
|
. endif
|
|
.endif
|
|
|
|
.if !target(run-autotools-autoheader)
|
|
run-autotools-autoheader:
|
|
. if defined(AUTOTOOL_autoheader)
|
|
@(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOHEADER} \
|
|
${AUTOHEADER_ARGS})
|
|
. else
|
|
@${DO_NADA}
|
|
. endif
|
|
.endif
|
|
|
|
# patch-autotools
|
|
#
|
|
# Special target to automatically make libtool using ports use the
|
|
# libtool port. See above for default values of LIBTOOLFILES.
|
|
|
|
.if !target(patch-autotools)
|
|
patch-autotools::
|
|
. if defined(AUTOTOOL_libtool_inc)
|
|
@(cd ${PATCH_WRKSRC}; \
|
|
for file in ${LIBTOOLFILES}; do \
|
|
${CP} $$file $$file.tmp; \
|
|
${SED} -e "s^\$$ac_aux_dir/ltconfig^${LTCONFIG}^g" \
|
|
-e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} ${LTMAIN}^g" \
|
|
$$file.tmp > $$file; \
|
|
${RM} $$file.tmp; \
|
|
done);
|
|
. elif defined(AUTOTOOL_libtool)
|
|
@(cd ${PATCH_WRKSRC}; \
|
|
for file in ${LIBTOOLFILES}; do \
|
|
${CP} $$file $$file.tmp; \
|
|
${SED} -e "s^\$$ac_aux_dir/ltconfig^${LTCONFIG}^g" \
|
|
-e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} ${LTMAIN}^g" \
|
|
-e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
|
|
$$file.tmp > $$file; \
|
|
${RM} $$file.tmp; \
|
|
done);
|
|
. else
|
|
@${DO_NADA}
|
|
. endif
|
|
.endif
|