diff options
author | linimon <linimon@FreeBSD.org> | 2006-10-01 03:25:46 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2006-10-01 03:25:46 +0800 |
commit | 9d9cab5601898d693370ff6e348778d7943eaaae (patch) | |
tree | 626216f3b3985b2bf7fb5973bfd3fff1d2074551 /Mk | |
parent | 6352ee8411d5bb86705c62e877feb428d655aead (diff) | |
download | freebsd-ports-graphics-9d9cab5601898d693370ff6e348778d7943eaaae.tar.gz freebsd-ports-graphics-9d9cab5601898d693370ff6e348778d7943eaaae.tar.zst freebsd-ports-graphics-9d9cab5601898d693370ff6e348778d7943eaaae.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]
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.database.mk | 30 | ||||
-rw-r--r-- | Mk/bsd.gcc.mk | 32 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 38 |
3 files changed, 75 insertions, 25 deletions
diff --git a/Mk/bsd.database.mk b/Mk/bsd.database.mk index 4af9d90033e..392d4b9b484 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 0242a5bc9ce..c7df7fbdefa 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 ba5f9ebddf1..e2c18c77cf2 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 |