* Split bsd.port.mk pre and post includes into 3 pieces instead of 2, to

allow OPTIONS to be able to influence dependencies.  This is still
  experimental [1]

* Teach bsd.gcc.mk about gfortran [2]

* Remove the outdated emulators/linux_base; the new default has been
  linux_base-fc4.  This will allow the outdated port to be removed [3]

* Add USE_FIREBIRD macros to bsd.database.mk [4]

PR:	93687 [1], 93690 [2], 103184 [3], 103357 [4]

Submitted by:	shaun [1], Pedro F. Giffuni <giffunip at asme to org> [2],
		gerald [2], thierry [2], vd [3], skv [4]
This commit is contained in:
Mark Linimon 2006-09-30 19:25:46 +00:00
parent 3075637e6f
commit a245fe1498
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=174200
10 changed files with 78 additions and 45 deletions

View file

@ -78,6 +78,14 @@ Database_Include_MAINTAINER= ports@FreeBSD.org
# 3 and 2. If version is not specified directly then
# sqlite3 is used (if USE_SQLITE= yes).
# SQLITE_VER - Detected sqlite version.
##
# USE_FIREBIRD - Add dependency on Firebird library. Valid values are:
# 2 and 1. If no version is given by the maintainer (if
# USE_FIREBIRD= yes) and the user did not define
# WITH_FIREBIRD_VER variable, fall back to default "2".
# WITH_FIREBIRD_VER
# - User defined variable to set Firebird version.
# FIREBIRD_VER - Detected Firebird version.
.if defined(USE_MYSQL)
DEFAULT_MYSQL_VER?= 50
@ -378,4 +386,26 @@ IGNORE= cannot install: unknown sqlite version: ${_SQLITE_VER}
.endif # defined(USE_SQLITE)
.if defined(USE_FIREBIRD)
.if defined(WITH_FIREBIRD_VER)
USE_FIREBIRD= ${WITH_FIREBIRD_VER}
.endif
.if ${USE_FIREBIRD:L} == "yes"
FIREBIRD_VER= 2
.else
FIREBIRD_VER= ${USE_FIREBIRD}
.endif
.if ${FIREBIRD_VER} == "2"
LIB_DEPENDS+= fbclient.2:${PORTSDIR}/databases/firebird2-client
.elif ${FIREBIRD_VER} == "1"
LIB_DEPENDS+= fbclient.1:${PORTSDIR}/databases/firebird-client
.else
IGNORE= cannot install: unknown Firebird version: ${FIREBIRD_VER}
.endif
.endif # defined(USE_FIREBIRD)
.endif # defined(_POSTMKINCLUDED) && !defined(Database_Post_Include)

View file

@ -127,26 +127,43 @@ _USE_GCC:=${_GCC_FOUND}
#
# Determine if the installed OS already has this GCCVERSION, and if not
# then set BUILD_DEPENDS, CC, CXX and F77
# then set BUILD_DEPENDS, CC, CXX, F77, and FC.
#
.for v in ${GCCVERSIONS}
. if ${_USE_GCC} == ${_GCCVERSION_${v}_V}
. if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R}
V:= ${_GCCVERSION_${v}_V:S/.//}
# If Fortran support is requested, regardless of the value of USE_GCC
# we need to use lang/gfortran, which is based on lang/gcc41 right now.
. if defined(WITH_FORTRAN)
V:= 41
_GCC_BUILD_DEPENDS:= gfortran
_GCC_PORT_DEPENDS:= gfortran${V}
.else
V:= ${_GCCVERSION_${v}_V:S/.//}
_GCC_BUILD_DEPENDS:= gcc${V}
_GCC_PORT_DEPENDS:= gcc${V}
. endif
CC:= gcc${V}
CXX:= g++${V}
# Up to GCC 4.0, we had g77, g77-33, g77-34, and the like. Starting
# with GCC 4.0, we have gfortran, gfortran40, gfortran41, and the like.
. if ${_USE_GCC} < 4.0
F77:= g77-${V}
_GCC_BUILD_DEPENDS:= ${CC}
FC:= ${F77}
. else
FC:= gfortran${V}
F77:= ${FC}
. endif
. endif
. endif
.endfor
.undef V
.if defined(_GCC_BUILD_DEPENDS)
BUILD_DEPENDS+= ${_GCC_BUILD_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS}
BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS}
.endif
MAKE_ENV+= CC="${CC}" CXX="${CXX}"
MAKE_ENV+= CC="${CC}" CXX="${CXX}" F77="${F77}" FC="${FC}"
test-gcc:
@echo USE_GCC=${USE_GCC}
@ -155,6 +172,7 @@ test-gcc:
.else
@echo Port cannot use later versions.
.endif
@echo WITH_FORTRAN=${WITH_FORTRAN}
.for v in ${GCCVERSIONS}
@echo -n "GCC version: ${_GCCVERSION_${v}_V} "
.if defined(_GCC_FOUND${v})
@ -163,5 +181,5 @@ test-gcc:
@echo "- OSVERSION from ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R}"
# @echo ${v} - ${_GCC_FOUND${v}} - ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R} - ${_GCCVERSION_${v}_V}
.endfor
@echo Using GCC vesion ${_USE_GCC}
@echo CC:${CC} - CXX:${CXX} - F77:${F77} - BUILD_DEPENDS:${BUILD_DEPENDS}
@echo Using GCC version ${_USE_GCC}
@echo CC:${CC} - CXX:${CXX} - F77:${F77} - FC:${FC} - BUILD_DEPENDS:${BUILD_DEPENDS}

View file

@ -1038,16 +1038,8 @@ makepatch:
.endif
# Start of pre-makefile section.
.if !defined(AFTERPORTMK)
.if defined(_PREMKINCLUDED)
check-makefile::
@${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice"
@${FALSE}
.endif
_PREMKINCLUDED= yes
# Start of options section
.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) )
.if defined(MAKE_VERSION)
.if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000
@ -1274,6 +1266,20 @@ WITHOUT_${W}:= true
. endif
.endif
.endif
# Start of pre-makefile section.
.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK)
.if defined(_PREMKINCLUDED)
check-makefile::
@${ECHO_CMD} "${PKGNAME}: Makefile error: you cannot include bsd.port[.pre].mk twice"
@${FALSE}
.endif
_PREMKINCLUDED= yes
# check for old, crufty, makefile types, part 1:
.if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME)
check-makefile::
@ -1581,7 +1587,7 @@ WWWGRP?= www
# End of pre-makefile section.
# Start of post-makefile section.
.if !defined(BEFOREPORTMK)
.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK)
.if defined(_POSTMKINCLUDED)
check-makefile::
@ -1811,14 +1817,10 @@ USE_LINUX= ${OVERRIDE_LINUX_BASE_PORT}
. if exists(${PORTSDIR}/emulators/linux_base-${USE_LINUX})
LINUX_BASE_PORT= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base-${USE_LINUX}
. else
. if ${USE_LINUX} == "7"
LINUX_BASE_PORT= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base
. else
. if ${USE_LINUX:L} == "yes"
. if ${USE_LINUX:L} == "yes"
LINUX_BASE_PORT= ${LINUXBASE}/etc/fedora-release:${PORTSDIR}/emulators/linux_base-fc4
. else
. else
IGNORE= There is no emulators/linux_base-${USE_LINUX}, perhaps wrong use of USE_LINUX or OVERRIDE_LINUX_BASE_PORT.
. endif
. endif
. endif
@ -1981,7 +1983,7 @@ RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.if defined(USE_MYSQL) || defined(WANT_MYSQL_VER) || \
defined(USE_PGSQL) || defined(WANT_PGSQL_VER) || \
defined(USE_BDB) || defined(USE_SQLITE)
defined(USE_BDB) || defined(USE_SQLITE) || defined(USE_FIREBIRD)
.include "${PORTSDIR}/Mk/bsd.database.mk"
.endif

View file

@ -15,7 +15,6 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= Math libraries build with F90 for used in ELMER FEM
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran
.ifdef WITH_MPI
BUILD_DEPENDS+= ${LOCALBASE}/mpich/include/mpif.h:${PORTSDIR}/net/mpich
.endif
@ -27,7 +26,6 @@ CONFLICTS+= scalapack-[0-9]*
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
.ifdef WITH_OPTIMIZED_FLAGS

View file

@ -15,13 +15,10 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= UMFPACK library used by ELMER FEM package
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran
CONFLICTS= umfpack-[0-9].[0-9]*
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
CONFIGURE_ENV+= FC=${FC} F77=${FC}
GNU_CONFIGURE= yes

View file

@ -14,11 +14,8 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= ELMER FEM Package Data base Interface
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
CONFIGURE_ENV+= FC=${FC} F77=${FC} FCFLAGS=${FCFLAGS}

View file

@ -14,8 +14,7 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= FEM solver for use in the ELMER FEM package
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran \
${LOCALBASE}/lib/libmatc.a:${PORTSDIR}/science/elmer-matc \
BUILD_DEPENDS= ${LOCALBASE}/lib/libmatc.a:${PORTSDIR}/science/elmer-matc \
${LOCALBASE}/lib/libblas.a:${PORTSDIR}/math/elmer-mathlibs \
${LOCALBASE}/lib/liblapack.a:${PORTSDIR}/math/elmer-mathlibs \
${LOCALBASE}/lib/libumfpack.a:${PORTSDIR}/math/elmer-umfpack \
@ -26,7 +25,6 @@ RUN_DEPENDS= ElmerGrid:${PORTSDIR}/science/elmergrid \
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
.ifdef WITH_OPTIMIZED_FLAGS

View file

@ -14,14 +14,12 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= HUTIter library for use in the ELMER FEM package
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran \
${LOCALBASE}/lib/libblas.a:${PORTSDIR}/math/elmer-mathlibs \
BUILD_DEPENDS= ${LOCALBASE}/lib/libblas.a:${PORTSDIR}/math/elmer-mathlibs \
${LOCALBASE}/lib/liblapack.a:${PORTSDIR}/math/elmer-mathlibs \
${LOCALBASE}/lib/libarpack.a:${PORTSDIR}/math/elmer-mathlibs
USE_GCC= 4.1+
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
WITH_FORTRAN= yes
CONFIGURE_ENV+= FC=${FC} F77=${FC}

View file

@ -14,11 +14,8 @@ PKGNAMEPREFIX= elmer-
MAINTAINER= ports@FreeBSD.org
COMMENT= MatC language library used by ELMER FEM package
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
CONFIGURE_ENV+= FC=${FC} F77=${FC}

View file

@ -13,8 +13,7 @@ MASTER_SITES= ftp://ftp.funet.fi/pub/sci/physics/elmer/
MAINTAINER= ports@FreeBSD.org
COMMENT= Visualization of Numerical Results in the ELMER FEM package
BUILD_DEPENDS= ${FC}:${PORTSDIR}/lang/gfortran \
${LOCALBASE}/lib/libmatc.a:${PORTSDIR}/science/elmer-matc \
BUILD_DEPENDS= ${LOCALBASE}/lib/libmatc.a:${PORTSDIR}/science/elmer-matc \
wish8.4:${PORTSDIR}/x11-toolkits/tk84
RUN_DEPENDS= wish8.4:${PORTSDIR}/x11-toolkits/tk84
@ -29,7 +28,6 @@ ALL_TARGET=
USE_GCC= 4.1+
WITH_FORTRAN= yes
FC= ${LOCALBASE}/bin/gfortran41
F77= ${FC}
CONFIGURE_ENV+= FC=${FC} F77=${FC} FCFLAGS=${FCFLAGS}