aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2006-10-01 03:25:46 +0800
committerMark Linimon <linimon@FreeBSD.org>2006-10-01 03:25:46 +0800
commita245fe1498cad65d7a364849b208ff53a5d3a6f7 (patch)
treec03880dadc017bb964181cb364735cafab6d0f25
parent3075637e6f755767af4e106b6134500e1e761c61 (diff)
downloadfreebsd-ports-gnome-a245fe1498cad65d7a364849b208ff53a5d3a6f7.tar.gz
freebsd-ports-gnome-a245fe1498cad65d7a364849b208ff53a5d3a6f7.tar.zst
freebsd-ports-gnome-a245fe1498cad65d7a364849b208ff53a5d3a6f7.zip
* 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]
-rw-r--r--Mk/bsd.database.mk30
-rw-r--r--Mk/bsd.gcc.mk32
-rw-r--r--Mk/bsd.port.mk38
-rw-r--r--math/elmer-mathlibs/Makefile2
-rw-r--r--math/elmer-umfpack/Makefile3
-rw-r--r--science/elmer-eio/Makefile3
-rw-r--r--science/elmer-fem/Makefile4
-rw-r--r--science/elmer-hutiter/Makefile4
-rw-r--r--science/elmer-matc/Makefile3
-rw-r--r--science/elmerpost/Makefile4
10 files changed, 78 insertions, 45 deletions
diff --git a/Mk/bsd.database.mk b/Mk/bsd.database.mk
index 4af9d90033e3..392d4b9b4846 100644
--- a/Mk/bsd.database.mk
+++ b/Mk/bsd.database.mk
@@ -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)
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
index 0242a5bc9cea..c7df7fbdefa6 100644
--- a/Mk/bsd.gcc.mk
+++ b/Mk/bsd.gcc.mk
@@ -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}
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ba5f9ebddf10..e2c18c77cf23 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -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
diff --git a/math/elmer-mathlibs/Makefile b/math/elmer-mathlibs/Makefile
index 3bb9e7a53712..99d04313659e 100644
--- a/math/elmer-mathlibs/Makefile
+++ b/math/elmer-mathlibs/Makefile
@@ -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
diff --git a/math/elmer-umfpack/Makefile b/math/elmer-umfpack/Makefile
index 1239a4443fa7..438b355072db 100644
--- a/math/elmer-umfpack/Makefile
+++ b/math/elmer-umfpack/Makefile
@@ -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
diff --git a/science/elmer-eio/Makefile b/science/elmer-eio/Makefile
index 7f07244e4053..e0f1505bb690 100644
--- a/science/elmer-eio/Makefile
+++ b/science/elmer-eio/Makefile
@@ -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}
diff --git a/science/elmer-fem/Makefile b/science/elmer-fem/Makefile
index 613f3a0444cf..c00b88928e60 100644
--- a/science/elmer-fem/Makefile
+++ b/science/elmer-fem/Makefile
@@ -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
diff --git a/science/elmer-hutiter/Makefile b/science/elmer-hutiter/Makefile
index 88e83aab7037..b06eed3240b2 100644
--- a/science/elmer-hutiter/Makefile
+++ b/science/elmer-hutiter/Makefile
@@ -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}
diff --git a/science/elmer-matc/Makefile b/science/elmer-matc/Makefile
index 304ed4676e3a..40a19104dfae 100644
--- a/science/elmer-matc/Makefile
+++ b/science/elmer-matc/Makefile
@@ -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}
diff --git a/science/elmerpost/Makefile b/science/elmerpost/Makefile
index 00219eea2f08..e5bbfc460c8f 100644
--- a/science/elmerpost/Makefile
+++ b/science/elmerpost/Makefile
@@ -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}