Index: Mk/Uses/7z.mk =================================================================== --- Mk/Uses/7z.mk +++ Mk/Uses/7z.mk @@ -19,34 +19,34 @@ P7ZIP_AFTER_ARGS?= # empty P7ZIP_WRKDIR?= ${EXTRACT_WRKDIR} -.if !empty(7z_ARGS:Np7zip:Npartial) +. if !empty(7z_ARGS:Np7zip:Npartial) IGNORE= USES=7z has invalid arguments: ${7z_ARGS:Np7zip:Npartial} -.endif +. endif -.if ! ${7z_ARGS:Mp7zip} && (${OPSYS} == FreeBSD && ${OSVERSION} < 1000009) +. if ! ${7z_ARGS:Mp7zip} && (${OPSYS} == FreeBSD && ${OSVERSION} < 1000009) # libarchive lacks 7zip reader, fallback to P7ZIP_CMD 7z_ARGS+= p7zip -.endif +. endif -.if ${7z_ARGS:Mp7zip} +. if ${7z_ARGS:Mp7zip} EXTRACT_DEPENDS+= ${P7ZIP_CMD}:archivers/p7zip -.endif +. endif -.if ! ${7z_ARGS:Mpartial} +. if ! ${7z_ARGS:Mpartial} EXTRACT_SUFX?= .7z -.endif +. endif -.if ${7z_ARGS:Mp7zip} && ! ${7z_ARGS:Mpartial} +. if ${7z_ARGS:Mp7zip} && ! ${7z_ARGS:Mpartial} EXTRACT_CMD?= ${P7ZIP_CMD} EXTRACT_BEFORE_ARGS?= ${P7ZIP_BEFORE_ARGS} EXTRACT_AFTER_ARGS?= ${P7ZIP_AFTER_ARGS} -.endif +. endif -.if ! ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY) +. if ! ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY) EXTRACT_ONLY+= ${EXTRACT_ONLY_7z} -.endif +. endif -.if ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial} +. if ${7z_ARGS:Mp7zip} && ${7z_ARGS:Mpartial} EXTRACT_ONLY?= ${DISTFILES:N*\:*7z*:C/:.*//} EXTRACT_ONLY_7z?= ${DISTFILES:M*\:*7z*:C/:.*//} @@ -59,6 +59,6 @@ exit 1; \ fi; \ done -.endif +. endif .endif Index: Mk/Uses/ada.mk =================================================================== --- Mk/Uses/ada.mk +++ Mk/Uses/ada.mk @@ -15,19 +15,19 @@ CC= ada ADAXX= gcc6 # framework default -. if ${ada_ARGS:M5} +. if ${ada_ARGS:M5} ADAXX= gcc5 -. elif ${ada_ARGS:M6} +. elif ${ada_ARGS:M6} ADAXX= gcc6 -. elif defined(ADA_DEFAULT) -. if ${ADA_DEFAULT} == 5 +. elif defined(ADA_DEFAULT) +. if ${ADA_DEFAULT} == 5 ADAXX= gcc5 +. endif . endif -. endif -. if ${ada_ARGS:Mrun} +. if ${ada_ARGS:Mrun} RUN_DEPENDS+= ${LOCALBASE}/${ADAXX}-aux/bin/ada:lang/${ADAXX}-aux -. endif +. endif BUILD_DEPENDS+= ${LOCALBASE}/${ADAXX}-aux/bin/ada:lang/${ADAXX}-aux MAKE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ Index: Mk/Uses/alias.mk =================================================================== --- Mk/Uses/alias.mk +++ Mk/Uses/alias.mk @@ -13,19 +13,19 @@ .if !defined(_INCLUDE_USES_ALIAS_MK) _INCLUDE_USES_ALIAS_MK= yes -.if ${OPSYS} != FreeBSD +. if ${OPSYS} != FreeBSD -.if empty(alias_ARGS) +. if empty(alias_ARGS) CFLAGS+= -D__FreeBSD__=9 -.else -. if ${alias_ARGS} == 8 || ${alias_ARGS} == 10 \ +. else +. if ${alias_ARGS} == 8 || ${alias_ARGS} == 10 \ || ${alias_ARGS} == 9 || ${alias_ARGS} == 11 CFLAGS+= -D__FreeBSD__=${alias_ARGS} -. else +. else IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias -. endif -.endif +. endif +. endif -.endif # OPSYS != FreeBSD +. endif # OPSYS != FreeBSD .endif Index: Mk/Uses/autoreconf.mk =================================================================== --- Mk/Uses/autoreconf.mk +++ Mk/Uses/autoreconf.mk @@ -60,9 +60,9 @@ aclocal-1.15:devel/automake \ automake-1.15:devel/automake -.if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild) +. if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild) BUILD_DEPENDS+= libtoolize:devel/libtool -.endif +. endif AUTORECONF?= ${LOCALBASE}/bin/autoreconf AUTORECONF_WRKSRC?= ${WRKSRC} @@ -72,21 +72,21 @@ .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_AUTORECONF_POST_MK) _INCLUDE_USES_AUTORECONF_POST_MK= yes -.if ! ${autoreconf_ARGS:Mbuild} +. if ! ${autoreconf_ARGS:Mbuild} _USES_configure+= 470:do-autoreconf do-autoreconf: -.for f in AUTHORS ChangeLog INSTALL NEWS README +. for f in AUTHORS ChangeLog INSTALL NEWS README # Don't modify time stamps if the files already exist @test -e ${AUTORECONF_WRKSRC}/${f} || ${TOUCH} ${AUTORECONF_WRKSRC}/${f} -.endfor -.if defined(_USE_GNOME) && ${_USE_GNOME:Mintltool} +. endfor +. if defined(_USE_GNOME) && ${_USE_GNOME:Mintltool} @(cd ${AUTORECONF_WRKSRC} && \ if test -f configure.ac; then configure=configure.ac; \ else configure=configure.in; fi && \ if ${EGREP} -q '^(AC|IT)_PROG_INTLTOOL' $${configure}; \ then ${LOCALBASE}/bin/intltoolize -f -c; fi) -.endif +. endif @(cd ${AUTORECONF_WRKSRC} && ${AUTORECONF} -f -i) -.endif +. endif .endif Index: Mk/Uses/bdb.mk =================================================================== --- Mk/Uses/bdb.mk +++ Mk/Uses/bdb.mk @@ -50,9 +50,9 @@ .if !defined(_INCLUDE_USES_BDB_MK) _INCLUDE_USES_BDB_MK= yes -.if !empty(bdb_ARGS) +. if !empty(bdb_ARGS) _bdb_ARGS:= ${bdb_ARGS} -.endif +. endif _bdb_ARGS?= yes # TODO: avoid malformed conditional with invalid _bdb_ARGS/BDB_DEFAULT @@ -60,10 +60,10 @@ BDB_UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME} -.if defined(WITH_BDB_VER) +. if defined(WITH_BDB_VER) WARNING+= "WITH_BDB_VER is deprecated and will be removed on 2016-08-01. Use DEFAULT_VERSIONS+=bdb=${WITH_BDB_VER}" BDB_DEFAULT:=${WITH_BDB_VER} -.endif +. endif .include "${PORTSDIR}/Mk/bsd.default-versions.mk" @@ -72,9 +72,9 @@ _DB_PORTS= 48 5 6 _DB_DEFAULTS= 48 5 # does not include 6 due to different licensing # but user can re-add it through WITH_BDB6_PERMITTED -. if defined(WITH_BDB6_PERMITTED) +. if defined(WITH_BDB6_PERMITTED) _DB_DEFAULTS+= 6 -. endif +. endif # Dependency lines for different db versions db48_DEPENDS= libdb-4.8.so:databases/db48 @@ -87,124 +87,124 @@ # Override the global BDB_DEFAULT with the # port specific _WITH_BDB_VER -.if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER) +. if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER) BDB_DEFAULT= ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER} -.endif +. endif # Override _bdb_ARGS with global BDB_DEFAULT if the maintainer did not # ask for a more specific version. -. if ${_bdb_ARGS} == yes -. if ${BDB_DEFAULT} != 1 +. if ${_bdb_ARGS} == yes +. if ${BDB_DEFAULT} != 1 _bdb_ARGS= ${BDB_DEFAULT} -. else +. else _bdb_ARGS:= 48+ +. endif . endif -. endif # Compatiblity hack: # upgrade older plussed versions to 48+ _BDB_OLDPLUSVERS=4+ 40+ 41+ 42+ 43+ 44+ 45+ 46+ 47+ -.for i in ${_bdb_ARGS} -. if ${_BDB_OLDPLUSVERS:M${i}} +. for i in ${_bdb_ARGS} +. if ${_BDB_OLDPLUSVERS:M${i}} _bdb_ARGS:= 48+ -. endif -.endfor +. endif +. endfor # 1. detect installed versions _INST_BDB_VER= -.for bdb in ${_DB_PORTS} -. if exists(${db${bdb}_FIND}) +. for bdb in ${_DB_PORTS} +. if exists(${db${bdb}_FIND}) _INST_BDB_VER+=${bdb} -. endif -.endfor +. endif +. endfor # 2. parse supported versions: # 2a. build list from _bdb_ARGS _SUPP_BDB_VER= __bdb_ARGS:=${_bdb_ARGS:C,\+$,,:C/(.)(.)$/\1.\2/} -.if !empty(_bdb_ARGS:M*+) -. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/} -. if ${__bdb_ARGS} <= ${bdb} +. if !empty(_bdb_ARGS:M*+) +. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/} +. if ${__bdb_ARGS} <= ${bdb} _SUPP_BDB_VER+=${bdb:C/\.//} -. endif -. endfor -.else +. endif +. endfor +. else _SUPP_BDB_VER=${_bdb_ARGS} -.endif +. endif # 2b. expand INVALID_BDB_VER if given with "+": -.if !empty(INVALID_BDB_VER:M*+) +. if !empty(INVALID_BDB_VER:M*+) _INV_BDB:=${INVALID_BDB_VER:C,\+$,,:C/(.)(.)$/\1.\2/} _INV_BDB_VER:= -. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/} -. if ${_INV_BDB} <= ${bdb} +. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/} +. if ${_INV_BDB} <= ${bdb} _INV_BDB_VER+=${bdb:C/\.//} -. endif -. endfor -.else +. endif +. endfor +. else _INV_BDB_VER:=${INVALID_BDB_VER} -.endif +. endif # 2c. strip versions from INVALID_BDB_VER out of _SUPP_BDB_VER -.for unsupp in ${_INV_BDB_VER} +. for unsupp in ${_INV_BDB_VER} _SUPP_BDB_VER:=${_SUPP_BDB_VER:N${unsupp}} -.endfor +. endfor # 3a. calculate intersection in _INST_BDB_VER to see if there # is a usable installed version -.for i in ${_INST_BDB_VER} -. if empty(_SUPP_BDB_VER:M${i}) +. for i in ${_INST_BDB_VER} +. if empty(_SUPP_BDB_VER:M${i}) _INST_BDB_VER:= ${_INST_BDB_VER:N${i}} -. endif -.endfor +. endif +. endfor _ELIGIBLE_BDB_VER:=${_INST_BDB_VER} # 3b. if there is no usable version installed, check defaults -.if empty(_INST_BDB_VER) +. if empty(_INST_BDB_VER) _DFLT_BDB_VER:=${_DB_DEFAULTS} # make sure we use a reasonable version for package builds _WITH_BDB_HIGHEST=yes -. for i in ${_DFLT_BDB_VER} -. if empty(_SUPP_BDB_VER:M${i}) +. for i in ${_DFLT_BDB_VER} +. if empty(_SUPP_BDB_VER:M${i}) _DFLT_BDB_VER:= ${_DFLT_BDB_VER:N${i}} -. endif -. endfor +. endif +. endfor _ELIGIBLE_BDB_VER:=${_DFLT_BDB_VER} -.endif +. endif # 4. elect a version _BDB_VER= -.for i in ${_ELIGIBLE_BDB_VER} -. if !empty(WITH_BDB_HIGHEST) || !empty(_WITH_BDB_HIGHEST) || empty(${_BDB_VER}) +. for i in ${_ELIGIBLE_BDB_VER} +. if !empty(WITH_BDB_HIGHEST) || !empty(_WITH_BDB_HIGHEST) || empty(${_BDB_VER}) _BDB_VER:=${i} -. endif -.endfor +. endif +. endfor # 5. catch errors or set variables -.if empty(_BDB_VER) +. if empty(_BDB_VER) IGNORE= cannot install: no eligible BerkeleyDB version. Requested: ${_bdb_ARGS}, incompatible: ${_INV_BDB_VER}. Try: make debug-bdb -.else -. if defined(BDB_BUILD_DEPENDS) +. else +. if defined(BDB_BUILD_DEPENDS) BUILD_DEPENDS+= ${db${_BDB_VER}_FIND}:${db${_BDB_VER}_DEPENDS:C/^libdb.*://} -. else +. else LIB_DEPENDS+= ${db${_BDB_VER}_DEPENDS} -. endif -. if ${_BDB_VER} == 48 +. endif +. if ${_BDB_VER} == 48 BDB_LIB_NAME= db-4.8 BDB_LIB_CXX_NAME= db_cxx-4.8 BDB_LIB_DIR= ${LOCALBASE}/lib/db48 -. elif ${_BDB_VER} == 5 +. elif ${_BDB_VER} == 5 BDB_LIB_NAME= db-5.3 BDB_LIB_CXX_NAME= db_cxx-5.3 BDB_LIB_DIR= ${LOCALBASE}/lib/db5 -. elif ${_BDB_VER} == 6 +. elif ${_BDB_VER} == 6 BDB_LIB_NAME= db-6.2 BDB_LIB_CXX_NAME= db_cxx-6.2 BDB_LIB_DIR= ${LOCALBASE}/lib/db6 -. endif +. endif BDB_LIB_NAME?= db${_BDB_VER} BDB_LIB_CXX_NAME?= db${_BDB_VER}_cxx BDB_INCLUDE_DIR?= ${LOCALBASE}/include/db${_BDB_VER} BDB_LIB_DIR?= ${LOCALBASE}/lib -.endif +. endif BDB_VER= ${_BDB_VER} debug-bdb: @@ -235,21 +235,21 @@ # Obsolete variables - ports can define these to want users about # variables that may be in /etc/make.conf but that are no longer # effective: -.if defined(OBSOLETE_BDB_VAR) -. for var in ${OBSOLETE_BDB_VAR} -. if defined(${var}) +. if defined(OBSOLETE_BDB_VAR) +. for var in ${OBSOLETE_BDB_VAR} +. if defined(${var}) BAD_VAR+= ${var}, -. endif -. endfor -. if defined(BAD_VAR) +. endif +. endfor +. if defined(BAD_VAR) _IGNORE_MSG= Obsolete variable(s) ${BAD_VAR} use DEFAULT_VERSIONS or ${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version -. if defined(IGNORE) +. if defined(IGNORE) IGNORE+= ${_IGNORE_MSG} -. else +. else IGNORE= ${_IGNORE_MSG} +. endif +. endif . endif -. endif -.endif .endif Index: Mk/Uses/bison.mk =================================================================== --- Mk/Uses/bison.mk +++ Mk/Uses/bison.mk @@ -13,19 +13,19 @@ _BISON_DEPENDS= bison:devel/bison -.if empty(bison_ARGS) +. if empty(bison_ARGS) bison_ARGS= build -.endif +. endif -.if ${bison_ARGS} == "build" +. if ${bison_ARGS} == "build" BUILD_DEPENDS+= ${_BISON_DEPENDS} -.elif ${bison_ARGS} == "run" +. elif ${bison_ARGS} == "run" RUN_DEPENDS+= ${_BISON_DEPENDS} -.elif ${bison_ARGS} == "both" +. elif ${bison_ARGS} == "both" BUILD_DEPENDS+= ${_BISON_DEPENDS} RUN_DEPENDS+= ${_BISON_DEPENDS} -.else +. else IGNORE= USES=bison - invalid args: [${bison_ARGS}] specified -.endif +. endif .endif Index: Mk/Uses/blaslapack.mk =================================================================== --- Mk/Uses/blaslapack.mk +++ Mk/Uses/blaslapack.mk @@ -17,35 +17,35 @@ _DEFAULT_BLASLAPACK= netlib -.if empty(blaslapack_ARGS) +. if empty(blaslapack_ARGS) blaslapack_ARGS= ${_DEFAULT_BLASLAPACK} -.endif +. endif LDFLAGS+= -L${LOCALBASE}/lib -.if ${blaslapack_ARGS} == atlas +. if ${blaslapack_ARGS} == atlas LIB_DEPENDS+= libatlas.so:math/atlas _BLASLIB= ptf77blas LAPACKLIB= -lalapack -lptcblas _ATLASLIB= atlas ATLASLIB= -l${_ATLASLIB} -.elif ${blaslapack_ARGS} == gotoblas +. elif ${blaslapack_ARGS} == gotoblas LIB_DEPENDS+= libgoto2.so:math/gotoblas LIB_DEPENDS+= liblapack.so:math/lapack _BLASLIB= goto2p LAPACKLIB= -lgoto2p -.elif ${blaslapack_ARGS} == netlib +. elif ${blaslapack_ARGS} == netlib LIB_DEPENDS+= libblas.so:math/blas LIB_DEPENDS+= liblapack.so:math/lapack _BLASLIB= blas LAPACKLIB= -llapack -.elif ${blaslapack_ARGS} == openblas +. elif ${blaslapack_ARGS} == openblas LIB_DEPENDS+= libopenblas.so:math/openblas _BLASLIB= openblasp LAPACKLIB= -lopenblasp -.else +. else IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS} -.endif +. endif BLASLIB= -l${_BLASLIB} Index: Mk/Uses/charsetfix.mk =================================================================== --- Mk/Uses/charsetfix.mk +++ Mk/Uses/charsetfix.mk @@ -11,9 +11,9 @@ .if !defined(_INCLUDE_USES_CHARSETFIX_MK) _INCLUDE_USES_CHARSETFIX_MK= yes -.if !empty(charsetfix_ARGS) +. if !empty(charsetfix_ARGS) IGNORE= USES=charsetfix does not require args -.endif +. endif CHARSETFIX_MAKEFILEIN?= Makefile.in Index: Mk/Uses/cmake.mk =================================================================== --- Mk/Uses/cmake.mk +++ Mk/Uses/cmake.mk @@ -41,30 +41,30 @@ _valid_ARGS= outsource run # Sanity check -.for arg in ${cmake_ARGS} +. for arg in ${cmake_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= cmake:${cmake_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor CMAKE_BIN= ${LOCALBASE}/bin/cmake BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake -.if ${cmake_ARGS:Mrun} +. if ${cmake_ARGS:Mrun} RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake -.endif +. endif -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) CMAKE_BUILD_TYPE?= Debug -.else +. else CMAKE_BUILD_TYPE?= Release -.endif #defined(WITH_DEBUG) +. endif #defined(WITH_DEBUG) PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" -.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) +. if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) INSTALL_TARGET?= install/strip -.endif +. endif CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ @@ -84,37 +84,37 @@ CMAKE_INSTALL_PREFIX?= ${PREFIX} -.if defined(BATCH) || defined(PACKAGE_BUILDING) +. if defined(BATCH) || defined(PACKAGE_BUILDING) CMAKE_VERBOSE= yes CMAKE_NOCOLOR= yes -.endif +. endif -.if defined(CMAKE_VERBOSE) +. if defined(CMAKE_VERBOSE) CMAKE_ARGS+= -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -.endif -.if defined(CMAKE_NOCOLOR) +. endif +. if defined(CMAKE_NOCOLOR) CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -.endif +. endif -.if defined(CMAKE_NINJA) +. if defined(CMAKE_NINJA) .include "${USESDIR}/ninja.mk" -.endif +. endif _CMAKE_MSG= "===> Performing in-source build" CMAKE_SOURCE_PATH?= ${WRKSRC} -.if ${cmake_ARGS:Moutsource} +. if ${cmake_ARGS:Moutsource} _CMAKE_MSG= "===> Performing out-of-source build" CONFIGURE_WRKSRC= ${WRKDIR}/.build BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} -.endif +. endif -.if !target(do-configure) +. if !target(do-configure) do-configure: @${ECHO_MSG} ${_CMAKE_MSG} ${MKDIR} ${CONFIGURE_WRKSRC} @cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} -.endif +. endif .endif #!defined(_INCLUDE_USES_CMAKE_MK) Index: Mk/Uses/compiler.mk =================================================================== --- Mk/Uses/compiler.mk +++ Mk/Uses/compiler.mk @@ -31,220 +31,220 @@ .if !defined(_INCLUDE_USES_COMPILER_MK) _INCLUDE_USES_COMPILER_MK= yes -.if empty(compiler_ARGS) +. if empty(compiler_ARGS) compiler_ARGS= env -.endif +. endif VALID_ARGS= c++11-lib c++11-lang c++14-lang c11 features openmp env nestedfct c++0x gcc-c++11-lib -.if ${compiler_ARGS} == gcc-c++11-lib +. if ${compiler_ARGS} == gcc-c++11-lib _COMPILER_ARGS+= features gcc-c++11-lib -.elif ${compiler_ARGS} == c++11-lib +. elif ${compiler_ARGS} == c++11-lib _COMPILER_ARGS+= features c++11-lib -.elif ${compiler_ARGS} == c++0x +. elif ${compiler_ARGS} == c++0x _COMPILER_ARGS+= features c++0x -.elif ${compiler_ARGS} == c++11-lang +. elif ${compiler_ARGS} == c++11-lang _COMPILER_ARGS+= features c++11-lang -.elif ${compiler_ARGS} == c++14-lang +. elif ${compiler_ARGS} == c++14-lang _COMPILER_ARGS+= features c++14-lang -.elif ${compiler_ARGS} == c11 +. elif ${compiler_ARGS} == c11 _COMPILER_ARGS+= features c11 -.elif ${compiler_ARGS} == features +. elif ${compiler_ARGS} == features _COMPILER_ARGS+= features -.elif ${compiler_ARGS} == env +. elif ${compiler_ARGS} == env _COMPILER_ARGS+= env -.elif ${compiler_ARGS} == openmp +. elif ${compiler_ARGS} == openmp _COMPILER_ARGS+= env openmp -.elif ${compiler_ARGS} == nestedfct +. elif ${compiler_ARGS} == nestedfct _COMPILER_ARGS+= env nestedfct -.else +. else IGNORE= Invalid argument "${compiler_ARGS}", valid arguments are: ${VALID_ARGS} _COMPILER_ARGS= # -.endif +. endif -.if ${_COMPILER_ARGS:Mc++*} || ${_COMPILER_ARGS:Mc11} +. if ${_COMPILER_ARGS:Mc++*} || ${_COMPILER_ARGS:Mc11} _COMPILER_ARGS+= features -.endif +. endif _CCVERSION!= ${CC} --version -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) COMPILER_VERSION= ${_CCVERSION:M[0-9].[0-9]*:tW:C/([0-9]).([0-9]).*/\1\2/g} -.else +. else COMPILER_VERSION= ${_CCVERSION:M[0-9].[0-9]*:C/([0-9]).([0-9]).*/\1\2/g:u} -.endif -.if ${_CCVERSION:Mclang} +. endif +. if ${_CCVERSION:Mclang} COMPILER_TYPE= clang -.else +. else COMPILER_TYPE= gcc -.endif +. endif ALT_COMPILER_VERSION= 0 ALT_COMPILER_TYPE= none _ALTCCVERSION= -.if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) -.if ${ARCH} == amd64 || ${ARCH} == i386 # clang often non-default for a reason +. if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) +. if ${ARCH} == amd64 || ${ARCH} == i386 # clang often non-default for a reason _ALTCCVERSION!= /usr/bin/clang --version -.endif -.elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) +. endif +. elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) _ALTCCVERSION!= /usr/bin/gcc --version -.endif +. endif -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9].[0-9]*:tW:C/([0-9]).([0-9]).*/\1\2/g} -.else +. else ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9].[0-9]*:C/([0-9]).([0-9]).*/\1\2/g:u} -.endif -.if ${_ALTCCVERSION:Mclang} +. endif +. if ${_ALTCCVERSION:Mclang} ALT_COMPILER_TYPE= clang -.elif !empty(_ALTCCVERSION) +. elif !empty(_ALTCCVERSION) ALT_COMPILER_TYPE= gcc -.endif +. endif CHOSEN_COMPILER_TYPE= ${COMPILER_TYPE} -.if ${_COMPILER_ARGS:Mopenmp} -.if ${COMPILER_TYPE} == clang +. if ${_COMPILER_ARGS:Mopenmp} +. if ${COMPILER_TYPE} == clang USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.endif -.endif +. endif +. endif -.if ${_COMPILER_ARGS:Mnestedfct} -.if ${COMPILER_TYPE} == clang +. if ${_COMPILER_ARGS:Mnestedfct} +. if ${COMPILER_TYPE} == clang USE_GCC= any CHOSEN_COMPILER_TYPE= gcc -.endif -.endif +. endif +. endif -.if ${_COMPILER_ARGS:Mfeatures} +. if ${_COMPILER_ARGS:Mfeatures} _CXXINTERNAL!= ${CXX} -\#\#\# /dev/null 2>&1 -.if ${_CXXINTERNAL:M\"-lc++\"} +. if ${_CXXINTERNAL:M\"-lc++\"} COMPILER_FEATURES= libc++ -.else +. else COMPILER_FEATURES= libstdc++ -.endif +. endif CSTD= c89 c99 c11 gnu89 gnu99 gnu11 CXXSTD= c++98 c++0x c++11 c++14 gnu++98 gnu++11 -.for std in ${CSTD} ${CXXSTD} +. for std in ${CSTD} ${CXXSTD} _LANG=c -.if ${CXXSTD:M${std}} +. if ${CXXSTD:M${std}} _LANG=c++ -.endif +. endif OUTPUT_${std}!= echo | ${CC} -std=${std} -c -x ${_LANG} /dev/null -o /dev/null 2>&1; echo -.if !${OUTPUT_${std}:M*error*} +. if !${OUTPUT_${std}:M*error*} COMPILER_FEATURES+= ${std} -.endif -.endfor -.endif +. endif +. endfor +. endif -.if ${_COMPILER_ARGS:Mc++11-lib} -.if !${COMPILER_FEATURES:Mc++11} +. if ${_COMPILER_ARGS:Mc++11-lib} +. if !${COMPILER_FEATURES:Mc++11} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} +. elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.endif -.endif +. endif +. endif -.if ${_COMPILER_ARGS:Mc++14-lang} -.if !${COMPILER_FEATURES:Mc++14} -.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +. if ${_COMPILER_ARGS:Mc++14-lang} +. if !${COMPILER_FEATURES:Mc++14} +. if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= 5+ CHOSEN_COMPILER_TYPE= gcc -.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 35) || ${COMPILER_TYPE} == gcc -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 35 +. elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 35) || ${COMPILER_TYPE} == gcc +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 35 CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang36:lang/clang36 CPP= ${LOCALBASE}/bin/clang-cpp36 CC= ${LOCALBASE}/bin/clang36 CXX= ${LOCALBASE}/bin/clang++36 CHOSEN_COMPILER_TYPE= clang -.endif -.endif -.endif -.endif - -.if ${_COMPILER_ARGS:Mc++11-lang} -.if !${COMPILER_FEATURES:Mc++11} -.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +. endif +. endif +. endif +. endif + +. if ${_COMPILER_ARGS:Mc++11-lang} +. if !${COMPILER_FEATURES:Mc++11} +. if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 +. elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang34:lang/clang34 CPP= ${LOCALBASE}/bin/clang-cpp34 CC= ${LOCALBASE}/bin/clang34 CXX= ${LOCALBASE}/bin/clang++34 CHOSEN_COMPILER_TYPE= clang -.endif -.endif -.endif -.endif - -.if ${_COMPILER_ARGS:Mc++0x} -.if !${COMPILER_FEATURES:Mc++0x} -.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +. endif +. endif +. endif +. endif + +. if ${_COMPILER_ARGS:Mc++0x} +. if !${COMPILER_FEATURES:Mc++0x} +. if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 +. elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang34:lang/clang34 CHOSEN_COMPILER_TYPE= clang CPP= ${LOCALBASE}/bin/clang-cpp34 CC= ${LOCALBASE}/bin/clang34 CXX= ${LOCALBASE}/bin/clang++34 -.endif -.endif -.endif -.endif - -.if ${_COMPILER_ARGS:Mc11} -.if !${COMPILER_FEATURES:Mc11} -.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +. endif +. endif +. endif +. endif + +. if ${_COMPILER_ARGS:Mc11} +. if !${COMPILER_FEATURES:Mc11} +. if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 +. elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} == gcc +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang34:lang/clang34 CHOSEN_COMPILER_TYPE= clang CPP= ${LOCALBASE}/bin/clang-cpp34 CC= ${LOCALBASE}/bin/clang34 CXX= ${LOCALBASE}/bin/clang++34 -.endif -.endif -.endif -.endif +. endif +. endif +. endif +. endif -.if ${_COMPILER_ARGS:Mgcc-c++11-lib} +. if ${_COMPILER_ARGS:Mgcc-c++11-lib} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.if ${COMPILER_FEATURES:Mlibc++} +. if ${COMPILER_FEATURES:Mlibc++} LDFLAGS+= -L${LOCALBASE}/lib/c++ CXXFLAGS+= -nostdinc++ -isystem ${LOCALBASE}/include/c++/v1 BUILD_DEPENDS+= ${LOCALBASE}/lib/c++/libstdc++.so:devel/libc++ -.endif -.endif +. endif +. endif .endif Index: Mk/Uses/cran.mk =================================================================== --- Mk/Uses/cran.mk +++ Mk/Uses/cran.mk @@ -42,43 +42,43 @@ NO_BUILD= yes R_COMMAND= ${LOCALBASE}/bin/R -.if !target(do-test) +. if !target(do-test) R_POSTCMD_CHECK_OPTIONS?= --timings -.if !exists(${LOCALBASE}/bin/pdflatex) +. if !exists(${LOCALBASE}/bin/pdflatex) R_POSTCMD_CHECK_OPTIONS+= --no-manual --no-build-vignettes -.endif +. endif do-test: @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \ ${R_COMMAND} ${R_PRECMD_CHECK_OPTIONS} CMD check \ ${R_POSTCMD_CHECK_OPTIONS} ${PORTNAME} -.endif +. endif -.if !target(do-install) +. if !target(do-install) R_POSTCMD_INSTALL_OPTIONS+= -l ${STAGEDIR}${PREFIX}/${R_LIB_DIR} R_POSTCMD_INSTALL_OPTIONS+= --install-tests -.if defined(NOPORTDOCS) +. if defined(NOPORTDOCS) R_POSTCMD_INSTALL_OPTIONS+= --no-docs --no-html -.endif +. endif do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${R_LIB_DIR} @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} ${R_COMMAND} \ ${R_PRECMD_INSTALL_OPTIONS} CMD INSTALL \ ${R_POSTCMD_INSTALL_OPTIONS} ${PORTNAME} -.endif +. endif -.if ${cran_ARGS:Mauto-plist} +. if ${cran_ARGS:Mauto-plist} _USES_install+= 750:cran-auto-plist cran-auto-plist: @${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \ ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} -.endif +. endif -.if ${cran_ARGS:Mcompiles} +. if ${cran_ARGS:Mcompiles} .include "${PORTSDIR}/math/R/compiler.mk" -.endif +. endif .endif #_INCLUDE_USES_CRAN_MK Index: Mk/Uses/desktop-file-utils.mk =================================================================== --- Mk/Uses/desktop-file-utils.mk +++ Mk/Uses/desktop-file-utils.mk @@ -11,9 +11,9 @@ .if !defined(_INCLUDE_USES_DESKTOP_FILE_UTILS_MK) _INCLUDE_USES_DESKTOP_FILE_UTILS_MK= yes -.if !empty(desktop-file-utils_ARGS) +. if !empty(desktop-file-utils_ARGS) IGNORE= USES=desktop-file-utils does not require args -.endif +. endif BUILD_DEPENDS+= update-desktop-database:devel/desktop-file-utils RUN_DEPENDS+= update-desktop-database:devel/desktop-file-utils Index: Mk/Uses/desthack.mk =================================================================== --- Mk/Uses/desthack.mk +++ Mk/Uses/desthack.mk @@ -11,9 +11,9 @@ .if !defined(_INCLUDE_USES_DESTHACK_MK) _INCLUDE_USES_DESTHACK_MK= yes -.if !empty(desthack_ARGS) +. if !empty(desthack_ARGS) IGNORE= USES=desthack does not require args -.endif +. endif GNU_CONFIGURE_PREFIX= \$${${DESTDIRNAME}}${PREFIX} GNU_CONFIGURE_MANPREFIX= \$${${DESTDIRNAME}}${MANPREFIX} Index: Mk/Uses/display.mk =================================================================== --- Mk/Uses/display.mk +++ Mk/Uses/display.mk @@ -11,11 +11,11 @@ .if !defined(_INCLUDE_USES_DISPLAY_MK) _INCLUDE_USES_DISPLAY_MK= yes -.if empty(display_ARGS) +. if empty(display_ARGS) display_ARGS= install -.endif +. endif -.if !defined(DISPLAY) +. if !defined(DISPLAY) BUILD_DEPENDS+= Xvfb:x11-servers/xorg-vfbserver \ ${LOCALBASE}/share/fonts/misc/8x13O.pcf.gz:x11-fonts/xorg-fonts-miscbitmaps \ ${LOCALBASE}/share/fonts/misc/fonts.alias:x11-fonts/font-alias \ @@ -33,5 +33,5 @@ stop-display: pkill -15 -F ${XVFBPIDFILE} -.endif +. endif .endif Index: Mk/Uses/dos2unix.mk =================================================================== --- Mk/Uses/dos2unix.mk +++ Mk/Uses/dos2unix.mk @@ -12,31 +12,31 @@ .if !defined(_INCLUDE_USES_DOS2UNIX_MK) _INCLUDE_USES_DOS2UNIX_MK= yes -.if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) +. if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) _DOS2UNIX_ALL= yes -.endif +. endif DOS2UNIX_WRKSRC?= ${WRKSRC} _USES_patch+= 200:dos2unix dos2unix: @${ECHO_MSG} "===> Converting DOS text files to UNIX text files" -.if defined(_DOS2UNIX_ALL) +. if defined(_DOS2UNIX_ALL) @${FIND} ${DOS2UNIX_WRKSRC} -type f -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.else -.if defined(DOS2UNIX_FILES) +. else +. if defined(DOS2UNIX_FILES) @(cd ${DOS2UNIX_WRKSRC}; \ ${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' ) -.elif defined(DOS2UNIX_REGEX) +. elif defined(DOS2UNIX_REGEX) @${FIND} -E ${DOS2UNIX_WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.else -.for f in ${DOS2UNIX_GLOB} +. else +. for f in ${DOS2UNIX_GLOB} @${FIND} ${DOS2UNIX_WRKSRC} -type f -name '${f}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.endfor -.endif -.endif +. endfor +. endif +. endif .endif Index: Mk/Uses/drupal.mk =================================================================== --- Mk/Uses/drupal.mk +++ Mk/Uses/drupal.mk @@ -13,25 +13,25 @@ .if !defined(_INCLUDE_USES_DRUPAL_Mk) _INCLUDE_USES_DRUPAL_Mk= yes -.if ${drupal_ARGS:M[7]} +. if ${drupal_ARGS:M[7]} _DRUPAL_VERSION= ${drupal_ARGS:M[7]} -.endif +. endif VALID_VERSIONS= 7 -.if ${drupal_ARGS:N[7]:Ntheme:Nmodule} +. if ${drupal_ARGS:N[7]:Ntheme:Nmodule} IGNORE= Unknown argument for USES=drupal: ${drupal_ARGS:N[7]:Ntheme:Nmodule} -.endif +. endif _DRUPAL_COMP= ${drupal_ARGS:N[7]} -.if !defined(_DRUPAL_VERSION) || ! ${VALID_VERSIONS:M${_DRUPAL_VERSION}} +. if !defined(_DRUPAL_VERSION) || ! ${VALID_VERSIONS:M${_DRUPAL_VERSION}} IGNORE= Missing or invalid argument for USES=drupal, a version must be provided: ${VALID_VERSIONS} -.endif +. endif -.if ${drupal_ARGS:Mmodule} && ${drupal_ARGS:Mtheme} +. if ${drupal_ARGS:Mmodule} && ${drupal_ARGS:Mtheme} IGNORE= theme and module arguments are mutually exclusive for USES=drupal -.endif +. endif DRUPAL_BASE?= www/drupal${_DRUPAL_VERSION} @@ -40,26 +40,26 @@ PLIST_SUB+= DRUPAL_BASE=${DRUPAL_BASE} SUB_LIST+= DRUPAL_BASE=${DRUPAL_BASE} DRUPAL_DIR=${DRUPAL_DIR} -.if ! ${_DRUPAL_COMP} +. if ! ${_DRUPAL_COMP} DOCSDIR?= ${DRUPAL_DOCSDIR} -.endif +. endif -.if ${_DRUPAL_COMP} +. if ${_DRUPAL_COMP} _USES_POST+= drupal PKGNAMEPREFIX= drupal${_DRUPAL_VERSION}- # drupal contributions must be licensed under the GPLv2 or GPLv3. This is # documented at: http://drupal.org/licensing/faq/ -.if !defined(LICENSE) +. if !defined(LICENSE) LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual -.endif +. endif -.if defined(DRUPAL_MODSUBDIR) +. if defined(DRUPAL_MODSUBDIR) DRUPAL_MODDIR?= ${DRUPAL_BASE}/sites/all/${_DRUPAL_COMP}s/${DRUPAL_MODSUBDIR} -.else +. else DRUPAL_MODDIR?= ${DRUPAL_BASE}/sites/all/${_DRUPAL_COMP}s -.endif +. endif DRUPAL_MODLIB?= ${DRUPAL_BASE}/sites/all/libraries @@ -87,31 +87,31 @@ "@owner root" \ "@group wheel" PLIST_DIRS+= ${MODULE_DIRS:C|^|%%DRUPAL_MODDIR%%/|} -.endif +. endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_DRUPAL_POST_MK) _INCLUDE_USES_DRUPAL_POST_MK= yes -.if ${_DRUPAL_COMP} -.if ${PORT_OPTIONS:MDOCS} +. if ${_DRUPAL_COMP} +. if ${PORT_OPTIONS:MDOCS} PLIST_FILES+= ${DOC_FILES:C|^|%%DOCSDIR%%/|} PLIST_DIRS+= ${DOC_DIRS:C|^|%%DOCSDIR%%/|} PLIST_DIRS+= %%DOCSDIR%% -.endif +. endif do-install: @${MKDIR} ${DRUPAL_MODDIR:C|^|${STAGEDIR}${PREFIX}/|} -.if defined(MODULE_DIRS) +. if defined(MODULE_DIRS) @${MKDIR} ${MODULE_DIRS:C|^|${STAGEDIR}${PREFIX}/${DRUPAL_MODDIR}/|} -.endif -.for f in ${MODULE_FILES} +. endif +. for f in ${MODULE_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/${DRUPAL_MODDIR}/${f} -.endfor +. endfor @${MKDIR} ${STAGEDIR}${DOCSDIR} ${DOC_DIRS:C|^|${STAGEDIR}${DOCSDIR}/|} -.for f in ${DOC_FILES} +. for f in ${DOC_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/${f} -.endfor +. endfor -.endif +. endif .endif Index: Mk/Uses/elixir.mk =================================================================== --- Mk/Uses/elixir.mk +++ Mk/Uses/elixir.mk @@ -34,9 +34,9 @@ .if !defined(_INCLUDE_USES_ELIXIR_MK) _INCLUDE_USES_ELIXIR_MK=yes -.if !empty(elixir_ARGS) +. if !empty(elixir_ARGS) IGNORE= USES=elixir does not require args -.endif +. endif ELIXIR_APP_NAME?= ${PORTNAME} ELIXIR_LIB_ROOT?= ${LOCALBASE}/lib/elixir/lib @@ -61,35 +61,35 @@ BUILD_DEPENDS+= elixir:lang/elixir RUN_DEPENDS+= elixir:lang/elixir -.for depend in ${MIX_BUILD_DEPS} +. for depend in ${MIX_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.for depend in ${MIX_RUN_DEPS} +. for depend in ${MIX_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.if !target(do-build) +. if !target(do-build) do-build: -.if ${MIX_REWRITE} != "" +. if ${MIX_REWRITE} != "" @${REINPLACE_CMD} -i '' -E -e "s@{.*(only|optional): .*},?@@" ${WRKSRC}/mix.exs -.for depend in ${MIX_BUILD_DEPS} +. for depend in ${MIX_BUILD_DEPS} @if [ $$(echo ${depend:T} | sed -e "s/erlang-//") != ${depend:T} ]; then \ ${REINPLACE_CMD} -i '' -E -e "s@{ *:(${depend:T:S/erlang-//}), *(github:|\").*} *,?@@" ${WRKSRC}/mix.exs; \ else \ ${REINPLACE_CMD} -i '' -E -e "s@{ *:(${depend:T:S/elixir-//}), *(github:|\").*}@{ :\1, path: \"${ELIXIR_LIB_ROOT}/\\1\", compile: false }@" ${WRKSRC}/mix.exs; \ fi -.endfor -.endif +. endfor +. endif @${RM} -f ${WRKSRC}/mix.lock @cd ${WRKSRC} && ${MIX_COMPILE} -.for app in ${MIX_EXTRA_APPS} +. for app in ${MIX_EXTRA_APPS} @${RM} -f ${WRKSRC}/${app}/mix.lock @cd ${WRKSRC}/${app} && ${MIX_COMPILE} -.endfor -.endif # .if !target(do-build) +. endfor +. endif # .if !target(do-build) -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT} @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/lib @@ -101,26 +101,26 @@ ${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ fi -.if ${MIX_DOC_FILES} != "" || ${MIX_DOC_DIRS} != "" +. if ${MIX_DOC_FILES} != "" || ${MIX_DOC_DIRS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} -.endif -.for file in ${MIX_DOC_FILES} +. endif +. for file in ${MIX_DOC_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} -.endfor -.for dir in ${MIX_DOC_DIRS} +. endfor +. for dir in ${MIX_DOC_DIRS} cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${DOCSDIR} -.endfor -.for file in ${MIX_EXTRA_FILES} +. endfor +. for file in ${MIX_EXTRA_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${ELIXIR_APP_ROOT} -.endfor -.for dir in ${MIX_EXTRA_DIRS} +. endfor +. for dir in ${MIX_EXTRA_DIRS} @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/${dir} cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}${ELIXIR_APP_ROOT}/${dir} -.endfor -.for app in ${MIX_EXTRA_APPS} +. endfor +. for app in ${MIX_EXTRA_APPS} ${INSTALL_DATA} ${WRKSRC}/${app}/_build/${MIX_BUILD_NAME}/lib/*/ebin/* \ ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin -.endfor -.endif # .if !target(do-install) +. endfor +. endif # .if !target(do-install) .endif #!defined(_INCLUDE_USES_ELIXIR_MK) Index: Mk/Uses/erlang.mk =================================================================== --- Mk/Uses/erlang.mk +++ Mk/Uses/erlang.mk @@ -41,29 +41,29 @@ BUILD_DEPENDS+= erl:lang/erlang RUN_DEPENDS+= erl:lang/erlang -.if ${erlang_ARGS:Mrebar} +. if ${erlang_ARGS:Mrebar} BUILD_DEPENDS+= rebar>=0:devel/rebar -.endif +. endif -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} BUILD_DEPENDS+= rebar3>=0:devel/rebar3 -.endif +. endif -.for depend in ${ERL_BUILD_DEPS} +. for depend in ${ERL_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.for depend in ${ERL_RUN_DEPS} +. for depend in ${ERL_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.if ${erlang_ARGS:Mrebar} +. if ${erlang_ARGS:Mrebar} ERLANG_COMPILE= ${REBAR_CMD} -.endif +. endif -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} ERLANG_COMPILE= HOME=${WRKDIR} ${REBAR3_CMD} -.endif +. endif _USES_patch+= 650:post-patch-erlang post-patch-erlang: @@ -88,29 +88,29 @@ fi @${RM} -f ${WRKSRC}/src/*.orig ${WRKSRC}/include/*.orig -.if !target(do-build) +. if !target(do-build) do-build: # This will cause calls to local rebar and rebar3 to fail; makes it easier to spot them @${RM} -f ${WRKSRC}/rebar ${WRKSRC}/rebar3 -.for target in ${REBAR_TARGETS} +. for target in ${REBAR_TARGETS} # Remove rebar.lock every time - it can be created again after each run of rebar3 @${RM} ${WRKSRC}/rebar.lock @cd ${WRKSRC} && REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} -.endfor -.endif # !target(do-build) +. endfor +. endif # !target(do-build) -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT} @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/src cd ${WRKSRC}/src && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/src @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/ebin -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} ${INSTALL_DATA} ${WRKSRC}/_build/${ERL_BUILD_NAME}/lib/${ERL_APP_NAME}/ebin/* \ ${STAGEDIR}${ERL_APP_ROOT}/ebin -.else +. else ${INSTALL_DATA} ${WRKSRC}/ebin/* ${STAGEDIR}${ERL_APP_ROOT}/ebin -.endif +. endif if [ -d ${WRKSRC}/include ]; then \ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/include; \ cd ${WRKSRC}/include && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/include; \ @@ -119,20 +119,20 @@ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/priv; \ fi -.if ${ERL_DOCS} != "" +. if ${ERL_DOCS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for file in ${ERL_DOCS} +. for file in ${ERL_DOCS} if [ -d "${WRKSRC}/${file}" ]; then \ cd ${WRKSRC} && ${COPYTREE_SHARE} ${file} ${STAGEDIR}${DOCSDIR}; \ else \ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}; \ fi -.endfor -.endif # .if ${ERL_DOCS} != "" -.if ${REBAR_TARGETS:Mescriptize} +. endfor +. endif # .if ${ERL_DOCS} != "" +. if ${REBAR_TARGETS:Mescriptize} @${MKDIR} ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin -.endif -.endif # !target(do-install) +. endif +. endif # !target(do-install) .endif #!defined(_INCLUDE_USES_ERLANG_MK) Index: Mk/Uses/execinfo.mk =================================================================== --- Mk/Uses/execinfo.mk +++ Mk/Uses/execinfo.mk @@ -18,10 +18,10 @@ .if !defined(_INCLUDE_USES_EXECINFO_MK) _INCLUDE_USES_EXECINFO_MK= yes -.if !exists(/usr/lib/libexecinfo.so) +. if !exists(/usr/lib/libexecinfo.so) LIB_DEPENDS+= libexecinfo.so:devel/libexecinfo EXECINFO_CPPFLAGS= -I${LOCALBASE}/include EXECINFO_LDFLAGS= -L${LOCALBASE}/lib -.endif +. endif .endif Index: Mk/Uses/fakeroot.mk =================================================================== --- Mk/Uses/fakeroot.mk +++ Mk/Uses/fakeroot.mk @@ -11,7 +11,7 @@ .if !defined(_INCLUDE_USES_FAKEROOT_MK) _INCLUDE_USES_FAKEROOT_MK= yes BUILD_DEPENDS+= fakeroot:security/fakeroot -.if ${UID} != 0 +. if ${UID} != 0 FAKEROOT?= fakeroot -.endif +. endif .endif Index: Mk/Uses/fam.mk =================================================================== --- Mk/Uses/fam.mk +++ Mk/Uses/fam.mk @@ -21,41 +21,41 @@ _FAM_SYSTEMS= fam gamin _DEFAULT_FAM= gamin -.if exists(${LOCALBASE}/libexec/gam_server) +. if exists(${LOCALBASE}/libexec/gam_server) _HAVE_FAM= gamin -.elif exists(${LOCALBASE}/bin/fam) +. elif exists(${LOCALBASE}/bin/fam) _HAVE_FAM= fam -.endif +. endif # Sanity checks -.if defined(WITH_FAM_SYSTEM) && defined(_HAVE_FAM) && ${_HAVE_FAM} != ${WITH_FAM_SYSTEM} +. if defined(WITH_FAM_SYSTEM) && defined(_HAVE_FAM) && ${_HAVE_FAM} != ${WITH_FAM_SYSTEM} IGNORE= FAM mismatch: ${_HAVE_FAM} is installed, but ${WITH_FAM_SYSTEM} desired -.endif +. endif -.if !empty(fam_ARGS) -.for _fam_ARGS in ${fam_ARGS} -. if ! ${_FAM_SYSTEMS:M${_fam_ARGS}} +. if !empty(fam_ARGS) +. for _fam_ARGS in ${fam_ARGS} +. if ! ${_FAM_SYSTEMS:M${_fam_ARGS}} IGNORE= Incorrect 'USES+= fam:${fam_ARGS}' usage: argument [${_fam_ARGS}] is not recognized -. endif -.endfor -. if defined(_HAVE_FAM) && ${_HAVE_FAM} != ${fam_ARGS} +. endif +. endfor +. if defined(_HAVE_FAM) && ${_HAVE_FAM} != ${fam_ARGS} IGNORE= FAM mismatch: port wants to use ${fam_ARGS} while you have ${_HAVE_FAM} -. endif -. if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM} != ${fam_ARGS} +. endif +. if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM} != ${fam_ARGS} IGNORE= FAM mismatch: port wants to use ${fam_ARGS} while you wish to use ${WITH_FAM_SYSTEM} +. endif . endif -.endif # Proceed -.if !empty(fam_ARGS) +. if !empty(fam_ARGS) _USE_FAM= ${fam_ARGS} -.elif defined(_HAVE_FAM) +. elif defined(_HAVE_FAM) _USE_FAM= ${_HAVE_FAM} -.elif defined(WITH_FAM_SYSTEM) +. elif defined(WITH_FAM_SYSTEM) _USE_FAM= ${WITH_FAM_SYSTEM} -.else +. else _USE_FAM= ${_DEFAULT_FAM} -.endif +. endif LIB_DEPENDS+= ${_${_USE_FAM}_DEPENDS} Index: Mk/Uses/firebird.mk =================================================================== --- Mk/Uses/firebird.mk +++ Mk/Uses/firebird.mk @@ -9,17 +9,17 @@ _INCLUDE_USES_FIREBIRD_MK= yes .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if !empty(firebird_ARGS) +. if !empty(firebird_ARGS) FIREBIRD_VER= ${firebird_ARGS} -.endif +. endif FIREBIRD_VER?= ${FIREBIRD_DEFAULT:S/.//} # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -.if ${FIREBIRD_VER} == 25 +. if ${FIREBIRD_VER} == 25 LIB_DEPENDS+= libfbclient.so:databases/firebird25-client -.else +. else IGNORE= cannot install: unknown Firebird version: ${FIREBIRD_VER} -.endif +. endif .endif Index: Mk/Uses/fmake.mk =================================================================== --- Mk/Uses/fmake.mk +++ Mk/Uses/fmake.mk @@ -10,14 +10,14 @@ .if !defined(_INCLUDE_USES_FMAKE_MK) _INCLUDE_USES_FMAKE_MK= yes -.if !empty(fmake_ARGS) +. if !empty(fmake_ARGS) IGNORE= Incorrect 'USES+= fmake:${fmake_ARGS}' fmake takes no arguments -.endif +. endif -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) FMAKE= ${LOCALBASE}/bin/fmake BUILD_DEPENDS+= ${FMAKE}:devel/fmake CONFIGURE_ENV+= MAKE=${FMAKE} MAKE_CMD= ${FMAKE} -.endif +. endif .endif Index: Mk/Uses/fonts.mk =================================================================== --- Mk/Uses/fonts.mk +++ Mk/Uses/fonts.mk @@ -42,27 +42,27 @@ .if !defined(_INCLUDE_USES_FONTS_MK) _INCLUDE_USES_FONTS_MK= yes -.if empty(fonts_ARGS) +. if empty(fonts_ARGS) fonts_ARGS= fcfontsdir -.endif +. endif -.if !empty(fonts_ARGS:Nfc:Nfontsdir:Nfcfontsdir:Nnone) +. if !empty(fonts_ARGS:Nfc:Nfontsdir:Nfcfontsdir:Nnone) IGNORE= USES=fonts - invalid ARGS (${fonts_ARGS}) -.endif +. endif -.if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfcfontsdir) +. if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfcfontsdir) RUN_DEPENDS+= fc-cache:x11-fonts/fontconfig -.endif -.if !empty(fonts_ARGS:Mfontsdir) || !empty(fonts_ARGS:Mfcfontsdir) +. endif +. if !empty(fonts_ARGS:Mfontsdir) || !empty(fonts_ARGS:Mfcfontsdir) RUN_DEPENDS+= mkfontdir:x11-fonts/mkfontdir \ mkfontscale:x11-fonts/mkfontscale -.endif +. endif FONTNAME?= ${PORTNAME} FONTSDIR?= ${PREFIX}/share/fonts/${FONTNAME} -.if !empty(fonts_ARGS:Nnone) +. if !empty(fonts_ARGS:Nnone) PLIST_FILES+= "@${fonts_ARGS} ${FONTSDIR}" -.endif +. endif SUB_LIST+= FONTSDIR="${FONTSDIR}" PLIST_SUB+= FONTSDIR="${FONTSDIR:S,^${PREFIX}/,,}" .endif Index: Mk/Uses/fortran.mk =================================================================== --- Mk/Uses/fortran.mk +++ Mk/Uses/fortran.mk @@ -11,20 +11,20 @@ .if !defined(_INCLUDE_USES_FORTRAN_MK) _INCLUDE_USES_FORTRAN_MK= yes -.if empty(fortran_ARGS) +. if empty(fortran_ARGS) fortran_ARGS= gcc -.endif +. endif -.if ${fortran_ARGS} == gcc +. if ${fortran_ARGS} == gcc .include "${PORTSDIR}/Mk/bsd.default-versions.mk" _GCC_VER= ${GCC_DEFAULT:S/.//} -.if ${GCC_DEFAULT} == ${LANG_GCC_IS} +. if ${GCC_DEFAULT} == ${LANG_GCC_IS} BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc -.else +. else BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} -.endif +. endif USE_BINUTILS= yes F77= gfortran${_GCC_VER} FC= gfortran${_GCC_VER} @@ -32,14 +32,14 @@ FCFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \ -L${LOCALBASE}/lib/gcc${_GCC_VER} -B${LOCALBASE}/bin -.elif ${fortran_ARGS} == ifort +. elif ${fortran_ARGS} == ifort BUILD_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:lang/ifc RUN_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:lang/ifc F77= ${LOCALBASE}/intel_fc_80/bin/ifort FC= ${LOCALBASE}/intel_fc_80/bin/ifort -.else +. else IGNORE= USES=fortran: invalid arguments: ${fortran_ARGS} -.endif +. endif CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" Index: Mk/Uses/fuse.mk =================================================================== --- Mk/Uses/fuse.mk +++ Mk/Uses/fuse.mk @@ -11,13 +11,13 @@ .if !defined(_INCLUDE_USES_FUSE_MK) _INCLUDE_USES_FUSE_MK= yes -.if !empty(fuse_ARGS) +. if !empty(fuse_ARGS) IGNORE= USES=fuse does not require args -.endif +. endif LIB_DEPENDS+= libfuse.so:sysutils/fusefs-libs -.if !exists(/sbin/mount_fusefs) +. if !exists(/sbin/mount_fusefs) RUN_DEPENDS+= mount_fusefs:sysutils/fusefs-kmod -.endif +. endif .endif Index: Mk/Uses/gecko.mk =================================================================== --- Mk/Uses/gecko.mk +++ Mk/Uses/gecko.mk @@ -18,13 +18,13 @@ .if !defined(_INCLUDE_USES_GECKO_MK) _INCLUDE_USES_GECKO_MK= yes -.if empty(gecko_ARGS) +. if empty(gecko_ARGS) gecko_ARGS= libxul -.endif +. endif _GECKO_VERSION= ${gecko_ARGS:M[0-9][0-9]*} -.if ${gecko_ARGS:Mlibxul} +. if ${gecko_ARGS:Mlibxul} # Compat with older versions GECKO= libxul GECKO_CONFING?= ${LOCALBASE}/bin/${GECKO}-config @@ -34,7 +34,7 @@ BUILD_DEPENDS+= libxul>=45:www/libxul RUN_DEPENDS+= libxul>=45:www/libxul -.elif ${gecko_ARGS:Mfirefox} +. elif ${gecko_ARGS:Mfirefox} _GECKO_DEFAULT_VERSION= 45 _GECKO_VERSIONS= 45 47 @@ -44,84 +44,84 @@ 45_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:www/firefox-esr 47_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:www/firefox -.if exists(${LOCALBASE}/bin/firefox) +. if exists(${LOCALBASE}/bin/firefox) _GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/firefox --version 2>/dev/null _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g} -.endif +. endif -.elif ${gecko_ARGS:Mseamonkey} +. elif ${gecko_ARGS:Mseamonkey} _GECKO_DEFAULT_VERSION= 39 _GECKO_VERSIONS= 39 _GECKO_TYPE= seamonkey -.if exists(${LOCALBASE}/bin/seamonkey) +. if exists(${LOCALBASE}/bin/seamonkey) _GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/seamonkey --version 2>/dev/null _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9]*:C/[0-9].([0-9][0-9]).*/\1/g} -.endif +. endif # Dependence lines for different Seamonkey versions 39_DEPENDS= ${LOCALBASE}/lib/seamonkey/seamonkey:www/seamonkey -.elif ${gecko_ARGS:Mthunderbird} +. elif ${gecko_ARGS:Mthunderbird} _GECKO_DEFAULT_VERSION= 45 _GECKO_VERSIONS= 45 _GECKO_TYPE= thunderbird -.if exists(${LOCALBASE}/bin/thunderbird) +. if exists(${LOCALBASE}/bin/thunderbird) _GECKO_INSTALLED_VER!= ${LOCALBASE}/bin/thunderbird --version 2>/dev/null _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g} -.endif +. endif # Dependence lines for different Thunderbird versions 45_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:mail/thunderbird -.else +. else IGNORE= Unknown type of gecko dependency you may specify either libxul, firefox, seamonkey or thunderbird -.endif +. endif -.if defined(_GECKO_TYPE) -.if ${_GECKO_VERSION:M*+} +. if defined(_GECKO_TYPE) +. if ${_GECKO_VERSION:M*+} _GECKO_MIN_VERSION:= ${_GECKO_VERSION:S/+//} _GECKO_WANTED_VERSIONS:= ${_GECKO_DEFAULT_VERSION} -.endif +. endif -.if ${_GECKO_VERSION:M[0-9][0-9]} +. if ${_GECKO_VERSION:M[0-9][0-9]} _GECKO_WANTED_VERSIONS:= ${_GECKO_VERSION:M[0-9][0-9]} -.endif +. endif _GECKO_WANTED_VERSIONS?= ${_GECKO_DEFAULT_VERSION} -.if defined(_GECKO_MIN_VERSION) -. for _v in ${_GECKO_VERSIONS} -. if ${_GECKO_MIN_VERSION} <= ${_v} +. if defined(_GECKO_MIN_VERSION) +. for _v in ${_GECKO_VERSIONS} +. if ${_GECKO_MIN_VERSION} <= ${_v} _GECKO_WANTED_VERSIONS+= ${_v} +. endif +. endfor . endif -. endfor -.endif -.for _v in ${_GECKO_WANTED_VERSIONS:O:u} +. for _v in ${_GECKO_WANTED_VERSIONS:O:u} _GECKO_HIGHEST_VERSION:= ${_v} -.if defined(_GECKO_INSTALLED_VER) && ${_GECKO_INSTALLED_VER} == ${_v} +. if defined(_GECKO_INSTALLED_VER) && ${_GECKO_INSTALLED_VER} == ${_v} _GECKO_WANTED_VERSION:= ${_v} -.endif -.endfor +. endif +. endfor -.if !defined(_GECKO_WANTED_VERSION) -.if defined(_GECKO_INSTALLED_VER) +. if !defined(_GECKO_WANTED_VERSION) +. if defined(_GECKO_INSTALLED_VER) IGNORE= cannot install: ${_GECKO_TYPE} versions mismatch: ${_GECKO_TYPE}-${_GECKO_INSTALLED_VER} is installed and wanted version is ${_GECKO_TYPE}-${_GECKO_VERSION:M[0-9][0-9]} -.else +. else _GECKO_WANTED_VERSION:= ${_GECKO_HIGHEST_VERSION} -.endif -.endif +. endif +. endif -.if ${gecko_ARGS:Mbuild} +. if ${gecko_ARGS:Mbuild} BUILD_DEPENDS+= ${${_GECKO_WANTED_VERSION}_DEPENDS} -.endif +. endif RUN_DEPENDS+= ${${_GECKO_WANTED_VERSION}_DEPENDS} -.endif +. endif .endif Index: Mk/Uses/gem.mk =================================================================== --- Mk/Uses/gem.mk +++ Mk/Uses/gem.mk @@ -15,11 +15,11 @@ _valid_ARGS= noautoplist # Sanity check -.for arg in ${gem_ARGS} +. for arg in ${gem_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= gem:${gem_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems RUN_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems @@ -44,23 +44,23 @@ GEMSPEC= ${PORTNAME}.gemspec GEM_ENV+= RB_USER_INSTALL=yes -.if defined(LANG) && !empty(LANG) +. if defined(LANG) && !empty(LANG) GEM_ENV+= LANG=${LANG} -.else +. else GEM_ENV+= LANG=en_US.UTF-8 -.endif +. endif -.if defined(LC_ALL) && !empty(LC_ALL) +. if defined(LC_ALL) && !empty(LC_ALL) GEM_ENV+= LC_ALL=${LC_ALL} -.else +. else GEM_ENV+= LC_ALL=en_US.UTF-8 -.endif +. endif -.if defined(LC_CTYPE) && !empty(LC_CTYPE) +. if defined(LC_CTYPE) && !empty(LC_CTYPE) GEM_ENV+= LC_CTYPE=${LC_CTYPE} -.else +. else GEM_ENV+= LC_CTYPE=UTF-8 -.endif +. endif PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ REV="${RUBY_GEM}" \ @@ -80,21 +80,21 @@ RUBYGEMBIN= ${LOCALBASE}/bin/gem${RUBY_VER:S/.//} -. if defined(DISTFILES) +. if defined(DISTFILES) GEMFILES= ${DISTFILES:C/:[^:]+$//} -. else +. else GEMFILES= ${DISTNAME}${EXTRACT_SUFX} -. endif +. endif RUBYGEM_ARGS=-l --no-update-sources --install-dir ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER} --ignore-dependencies --bindir=${STAGEDIR}${PREFIX}/bin -.if ${PORT_OPTIONS:MDOCS} +. if ${PORT_OPTIONS:MDOCS} RUBYGEM_ARGS+= --rdoc --ri -.else +. else RUBYGEM_ARGS+= --no-rdoc --no-ri -.endif +. endif -.if !target(do-extract) +. if !target(do-extract) do-extract: @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ @@ -104,9 +104,9 @@ fi; \ ${FALSE}; \ fi) -.endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ @@ -115,9 +115,9 @@ fi; \ ${FALSE}; \ fi) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: (cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- --build-args ${CONFIGURE_ARGS}) ${RM} -r ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info/ @@ -126,25 +126,25 @@ ${RM} -rf ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext \ ${STAGEDIR}${PREFIX}/${CACHE_DIR} 2> /dev/null || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR} 2> /dev/null || ${TRUE} -.if defined(NOPORTDOCS) +. if defined(NOPORTDOCS) -@${RMDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR} -.endif -.endif +. endif +. endif -.if empty(gem_ARGS:Mnoautoplist) +. if empty(gem_ARGS:Mnoautoplist) _USES_install+= 820:gem-autoplist gem-autoplist: @${ECHO} ${GEM_SPEC} >> ${TMPPLIST} -.if !defined(NOPORTDOCS) +. if !defined(NOPORTDOCS) @${FIND} -ds ${STAGEDIR}${PREFIX}/${DOC_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} -.endif +. endif @${FIND} -ds ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} @if [ -d ${STAGEDIR}${PREFIX}/${EXT_DIR} ]; then \ ${FIND} -ds ${STAGEDIR}${PREFIX}/${EXT_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ fi -.endif +. endif .endif Index: Mk/Uses/gettext-runtime.mk =================================================================== --- Mk/Uses/gettext-runtime.mk +++ Mk/Uses/gettext-runtime.mk @@ -11,18 +11,18 @@ .if !defined(_INCLUDE_USES_GETTEXT_RUNTIME_MK) _INCLUDE_USES_GETTEXT_RUNTIME_MK= yes -.if empty(gettext-runtime_ARGS) +. if empty(gettext-runtime_ARGS) gettext-runtime_ARGS= lib -.endif +. endif -.if ${gettext-runtime_ARGS:Mlib} +. if ${gettext-runtime_ARGS:Mlib} LIB_DEPENDS+= libintl.so:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mbuild} +. endif +. if ${gettext-runtime_ARGS:Mbuild} BUILD_DEPENDS+= gettext:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mrun} +. endif +. if ${gettext-runtime_ARGS:Mrun} RUN_DEPENDS+= gettext:devel/gettext-runtime -.endif +. endif .endif Index: Mk/Uses/gettext-tools.mk =================================================================== --- Mk/Uses/gettext-tools.mk +++ Mk/Uses/gettext-tools.mk @@ -11,15 +11,15 @@ .if !defined(_INCLUDE_USES_GETTEXT_TOOLS_MK) _INCLUDE_USES_GETTEXT_TOOLS_MK= yes -.if empty(gettext-tools_ARGS) +. if empty(gettext-tools_ARGS) gettext-tools_ARGS= build -.endif +. endif -.if ${gettext-tools_ARGS:Mbuild} +. if ${gettext-tools_ARGS:Mbuild} BUILD_DEPENDS+= msgfmt:devel/gettext-tools -.endif -.if ${gettext-tools_ARGS:Mrun} +. endif +. if ${gettext-tools_ARGS:Mrun} RUN_DEPENDS+= msgfmt:devel/gettext-tools -.endif +. endif .endif Index: Mk/Uses/gettext.mk =================================================================== --- Mk/Uses/gettext.mk +++ Mk/Uses/gettext.mk @@ -11,9 +11,9 @@ .if !defined(_INCLUDE_USES_GETTEXT_MK) _INCLUDE_USES_GETTEXT_MK= yes -.if !empty(gettext_ARGS) +. if !empty(gettext_ARGS) IGNORE= USES=gettext does not take arguments -.endif +. endif .include "${USESDIR}/gettext-runtime.mk" .include "${USESDIR}/gettext-tools.mk" Index: Mk/Uses/ghostscript.mk =================================================================== --- Mk/Uses/ghostscript.mk +++ Mk/Uses/ghostscript.mk @@ -34,71 +34,71 @@ _GS_ARGS= ${ghostscript_ARGS} -.if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun} +. if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun} IGNORE?= Unknown ghostscript argument ${_GS_ARGS} -.endif +. endif # Determine version number of Ghostscript to use .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} +. if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} IGNORE?= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION} -.endif +. endif # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection .undef _GS_BUILD_DEP .undef _GS_RUN_DEP -.if ${_GS_ARGS:Mbuild} +. if ${_GS_ARGS:Mbuild} _GS_BUILD_DEP= yes -.endif -.if ${_GS_ARGS:Mrun} +. endif +. if ${_GS_ARGS:Mrun} _GS_RUN_DEP= yes -.endif +. endif # The port does not specify a build or run dependency, assume both are # required. -.if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) +. if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) _GS_BUILD_DEP= yes _GS_RUN_DEP= yes -.endif +. endif .undef _GS_SELECTED -.for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} +. for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} _V=${V} -.if ${_V:M9} +. if ${_V:M9} _GS_SELECTED?= 9 -.elif ${_V:Magpl} +. elif ${_V:Magpl} _GS_SELECTED?= 9-agpl -.elif ${_V:M8} +. elif ${_V:M8} _GS_SELECTED?= 8 -.elif ${_V:M7} +. elif ${_V:M7} _GS_SELECTED?= 7 -.endif -.endfor +. endif +. endfor # Resolve minor version number for X11.so library. -.if !empty(_GS_SELECTED:M9-agpl) +. if !empty(_GS_SELECTED:M9-agpl) _GS_VERSION_MINOR= 9.16_2 -.elif !empty(_GS_SELECTED:M9) +. elif !empty(_GS_SELECTED:M9) _GS_VERSION_MINOR= 9.06_11 -.elif !empty(_GS_SELECTED:M8) +. elif !empty(_GS_SELECTED:M8) _GS_VERSION_MINOR= 8.71_19 -.elif !empty(_GS_SELECTED:M7) +. elif !empty(_GS_SELECTED:M7) _GS_VERSION_MINOR= 7.07_32 -.endif +. endif # dependencies _GS_PORT= ghostscript${_GS_SELECTED}-base _GS_X11_PORT= ghostscript${_GS_SELECTED}-x11 -.for type in BUILD RUN -.if defined(_GS_${type}_DEP) +. for type in BUILD RUN +. if defined(_GS_${type}_DEP) ${type}_DEPENDS+= ${_GS_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_PORT} -.if ${_GS_ARGS:Mx11} +. if ${_GS_ARGS:Mx11} ${type}_DEPENDS+= ${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT} -.endif -.endif -.endfor +. endif +. endif +. endfor .endif # _INCLUDE_USES_GHOSTSCRIPT_MK Index: Mk/Uses/gmake.mk =================================================================== --- Mk/Uses/gmake.mk +++ Mk/Uses/gmake.mk @@ -10,17 +10,17 @@ .if !defined(_INCLUDE_USES_GMAKE_MK) _INCLUDE_USES_GMAKE_MK= yes -.if !empty(gmake_ARGS) -.if ${gmake_ARGS} == lite +. if !empty(gmake_ARGS) +. if ${gmake_ARGS} == lite _GMAKE_EXT= -lite -.else +. else IGNORE= Incorrect 'USES+= gmake:${gmake_ARGS}' gmake has only one valid argument: lite -.endif -.endif +. endif +. endif -.if defined(DIET) +. if defined(DIET) _GMAKE_EXT= -lite -.endif +. endif BUILD_DEPENDS+= gmake${_GMAKE_EXT}:devel/gmake${_GMAKE_EXT} CONFIGURE_ENV+= MAKE=gmake${_GMAKE_EXT} Index: Mk/Uses/gnome.mk =================================================================== --- Mk/Uses/gnome.mk +++ Mk/Uses/gnome.mk @@ -62,9 +62,9 @@ _USES_POST+= gnome -.if !empty(gnome_ARGS) +. if !empty(gnome_ARGS) IGNORE= USES=gnome takes no arguments -.endif +. endif # non-version specific components _USE_GNOME_ALL= esound intlhack intltool introspection \ @@ -490,9 +490,9 @@ gvfs_RUN_DEPENDS= gvfs>=0:devel/gvfs gvfs_USE_GNOME_IMPL= glib20 -.if defined(INSTALLS_ICONS) +. if defined(INSTALLS_ICONS) USE_GNOME+= gtk-update-icon-cache -.endif +. endif # End component definition section @@ -537,47 +537,47 @@ _USE_GNOME_SAVED:=${USE_GNOME} HAVE_GNOME?= -.if (defined(WANT_GNOME) && !defined(WITHOUT_GNOME)) -. for component in ${_USE_GNOME_ALL} -. if exists(${${component}_DETECT}) +. if (defined(WANT_GNOME) && !defined(WITHOUT_GNOME)) +. for component in ${_USE_GNOME_ALL} +. if exists(${${component}_DETECT}) HAVE_GNOME+= ${component} -. elif defined(WITH_GNOME) -. if ${WITH_GNOME}=="yes" || ${WITH_GNOME:M${component}}!="" \ +. elif defined(WITH_GNOME) +. if ${WITH_GNOME}=="yes" || ${WITH_GNOME:M${component}}!="" \ || ${WITH_GNOME}=="1" HAVE_GNOME+= ${component} -. endif -. endif -. endfor -.elif defined(WITHOUT_GNOME) -. if ${WITHOUT_GNOME}!="yes" && ${WITHOUT_GNOME}!="1" -. for component in ${_USE_GNOME_ALL} -. if ${WITHOUT_GNOME:M${component}}=="" -. if exists(${${component}_DETECT}) -HAVE_GNOME+= ${component} . endif . endif . endfor +. elif defined(WITHOUT_GNOME) +. if ${WITHOUT_GNOME}!="yes" && ${WITHOUT_GNOME}!="1" +. for component in ${_USE_GNOME_ALL} +. if ${WITHOUT_GNOME:M${component}}=="" +. if exists(${${component}_DETECT}) +HAVE_GNOME+= ${component} +. endif +. endif +. endfor +. endif . endif -.endif -.if defined(USE_GNOME) +. if defined(USE_GNOME) # First of all expand all USE_GNOME_IMPL recursively -. for component in ${_USE_GNOME_ALL} -. for subcomponent in ${${component}_USE_GNOME_IMPL} +. for component in ${_USE_GNOME_ALL} +. for subcomponent in ${${component}_USE_GNOME_IMPL} ${component}_USE_GNOME_IMPL+=${${subcomponent}_USE_GNOME_IMPL} -. endfor -. endfor +. endfor +. endfor # Then use already expanded USE_GNOME_IMPL to expand USE_GNOME. # Also, check to see if each component has a desktop requirement. If it does, # and if the user's chosen desktop is not of the same version, mark the # port as IGNORE. -. for component in ${USE_GNOME:C/^([^:]+).*/\1/} -. if ${_USE_GNOME_ALL:M${component}}=="" +. for component in ${USE_GNOME:C/^([^:]+).*/\1/} +. if ${_USE_GNOME_ALL:M${component}}=="" IGNORE= cannot install: Unknown component ${component} -. endif +. endif _USE_GNOME+= ${${component}_USE_GNOME_IMPL} ${component} -. endfor +. endfor # Setup the GTK+ API version for pixbuf loaders, input method modules, # and theme engines. @@ -585,83 +585,83 @@ GTK3_VERSION="${GTK3_VERSION}" # Set USE_CSTD for all ports that depend on glib12 -.if defined(_USE_GNOME) && !empty(_USE_GNOME:Mglib12) +. if defined(_USE_GNOME) && !empty(_USE_GNOME:Mglib12) USE_CSTD= gnu89 -.endif +. endif -.if defined(_USE_GNOME) && empty(_USE_GNOME:Mglib20:u) && defined(GLIB_SCHEMAS) +. if defined(_USE_GNOME) && empty(_USE_GNOME:Mglib20:u) && defined(GLIB_SCHEMAS) IGNORE= GLIB_SCHEMAS is set, but needs USE_GNOME=glib20 to work -.endif +. endif -.if defined(_USE_GNOME) && empty(_USE_GNOME:Mgconf2:u) && defined(GCONF_SCHEMAS) +. if defined(_USE_GNOME) && empty(_USE_GNOME:Mgconf2:u) && defined(GCONF_SCHEMAS) IGNORE= GCONF_SCHEMAS is set, but needs USE_GNOME=gconf2 to work -.endif +. endif # Then traverse through all components, check which of them # exist in ${_USE_GNOME} and set variables accordingly -.ifdef _USE_GNOME +. ifdef _USE_GNOME -. for component in ${_USE_GNOME:O:u} -. if defined(${component}_PATCH_DEPENDS) +. for component in ${_USE_GNOME:O:u} +. if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS} -. endif +. endif -. if defined(${component}_DETECT) -. if ${USE_GNOME:M${component}\:build}!="" +. if defined(${component}_DETECT) +. if ${USE_GNOME:M${component}\:build}!="" BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} -. elif ${USE_GNOME:M${component}\:run}!="" +. elif ${USE_GNOME:M${component}\:run}!="" RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. else -. if defined(${component}_LIB_DEPENDS) +. else +. if defined(${component}_LIB_DEPENDS) LIB_DEPENDS+= ${${component}_LIB_DEPENDS} -. else +. else BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. endif -. endif -. endif +. endif +. endif +. endif -. if defined(${component}_CONFIGURE_ARGS) +. if defined(${component}_CONFIGURE_ARGS) CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS} -. endif +. endif -. if defined(${component}_CONFIGURE_ENV) +. if defined(${component}_CONFIGURE_ENV) CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV} -. endif +. endif -. if defined(${component}_MAKE_ENV) +. if defined(${component}_MAKE_ENV) MAKE_ENV+= ${${component}_MAKE_ENV} -. endif +. endif -. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) +. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET} -. endif +. endif -. if defined(${component}_PRE_PATCH) +. if defined(${component}_PRE_PATCH) GNOME_PRE_PATCH+= ; ${${component}_PRE_PATCH} -. endif -. endfor -.endif +. endif +. endfor +. endif -. if defined(GCONF_SCHEMAS) +. if defined(GCONF_SCHEMAS) MAKE_ENV+= GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 -. endif -.endif +. endif +. endif -.if defined(WANT_GNOME) +. if defined(WANT_GNOME) USE_GNOME?= -. if ${_USE_GNOME_SAVED}==${USE_GNOME} +. if ${_USE_GNOME_SAVED}==${USE_GNOME} PLIST_SUB+= GNOME:="@comment " NOGNOME:="" -. else +. else PLIST_SUB+= GNOME:="" NOGNOME:="@comment " +. endif . endif -.endif -.if defined(USE_GNOME_SUBR) +. if defined(USE_GNOME_SUBR) GNOME_SUBR= ${LOCALBASE}/etc/gnome.subr RUN_DEPENDS+= ${GNOME_SUBR}:sysutils/gnome_subr SUB_LIST+= GNOME_SUBR=${GNOME_SUBR} -.endif +. endif .endif # end of the part @@ -669,13 +669,13 @@ .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GNOME_POST_MK) _INCLUDE_USES_GNOME_POST_MK= yes -.if defined(GNOME_PRE_PATCH) +. if defined(GNOME_PRE_PATCH) _USES_patch+= 290:gnome-pre-patch gnome-pre-patch: @${GNOME_PRE_PATCH:C/^;//1} -.endif +. endif -.if defined(GCONF_SCHEMAS) +. if defined(GCONF_SCHEMAS) _USES_install+= 690:gnome-post-gconf-schemas gnome-post-gconf-schemas: @for i in ${GCONF_SCHEMAS}; do \ @@ -685,20 +685,20 @@ ${ECHO_CMD} "@postexec env GCONF_CONFIG_SOURCE=xml:${GCONF_CONFIG_OPTIONS}:%D/${GCONF_CONFIG_DIRECTORY} HOME=${WRKDIR} gconftool-2 --makefile-install-rule %D/etc/gconf/schemas/$${i} > /dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ done -.endif +. endif # we put the @unexec behind the plist schema entry, because it compiles files # in the directory. So we should remove the port file first before recompiling. -.if defined(GLIB_SCHEMAS) +. if defined(GLIB_SCHEMAS) _USES_install+= 690:gnome-post-glib-schemas gnome-post-glib-schemas: @for i in ${GLIB_SCHEMAS}; do \ ${ECHO_CMD} "share/glib-2.0/schemas/$${i}" >> ${TMPPLIST}; \ done @${ECHO_CMD} "@glib-schemas" >> ${TMPPLIST}; -.endif +. endif -.if defined(INSTALLS_OMF) +. if defined(INSTALLS_OMF) _USES_install+= 690:gnome-post-omf gnome-post-omf: @for i in `${GREP} "\.omf$$" ${TMPPLIST}`; do \ @@ -707,9 +707,9 @@ ${ECHO_CMD} "@postunexec scrollkeeper-uninstall -q %D/$${i} 2>/dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ done -.endif +. endif -.if defined(INSTALLS_ICONS) +. if defined(INSTALLS_ICONS) _USES_install+= 690:gnome-post-icons gnome-post-icons: @${RM} -f ${TMPPLIST}.icons1 @@ -726,7 +726,7 @@ ${RM} -f ${TMPPLIST}.icons1; \ ${MV} -f ${TMPPLIST}.icons2 ${TMPPLIST}; \ fi -.endif +. endif .endif # End of use part. Index: Mk/Uses/gnustep.mk =================================================================== --- Mk/Uses/gnustep.mk +++ Mk/Uses/gnustep.mk @@ -33,35 +33,35 @@ LIB_DIRS+= ${GNUSTEP_SYSTEM_LIBRARIES} \ ${GNUSTEP_LOCAL_LIBRARIES} -.for a in CFLAGS CPPFLAGS CXXFLAGS OBJCCFLAGS OBJCFLAGS LDFLAGS +. for a in CFLAGS CPPFLAGS CXXFLAGS OBJCCFLAGS OBJCFLAGS LDFLAGS MAKE_ENV+= ADDITIONAL_${a}="${ADDITIONAL_${a}} ${${a}}" -.endfor -.for a in FLAGS INCLUDE_DIRS LIB_DIRS +. endfor +. for a in FLAGS INCLUDE_DIRS LIB_DIRS MAKE_ENV+= ADDITIONAL_${a}="${ADDITIONAL_${a}}" -.endfor +. endfor MAKE_ARGS+=messages=yes MAKEFILE= GNUmakefile #MAKE_ENV+= GNUSTEP_CONFIG_FILE=${PORTSDIR}/devel/gnustep-make/files/GNUstep.conf GNU_CONFIGURE_PREFIX= ${GNUSTEP_PREFIX} -.if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_ARCH} == "i386" GNU_ARCH= ix86 -.else +. else GNU_ARCH= ${MACHINE_ARCH} -.endif +. endif PLIST_SUB+= GNU_ARCH=${GNU_ARCH} VERSION=${PORTVERSION} PLIST_SUB+= MAJORVERSION=${PORTVERSION:C/([0-9]).*/\1/1} PLIST_SUB+= LIBVERSION=${DEFAULT_LIBVERSION} PLIST_SUB+= MAJORLIBVERSION=${DEFAULT_LIBVERSION:C/([0-9]).*/\1/1} -.if defined(USE_GNUSTEP) -. if ${USE_GNUSTEP:Mbase} +. if defined(USE_GNUSTEP) +. if ${USE_GNUSTEP:Mbase} LIB_DEPENDS+= libgnustep-base.so:lang/gnustep-base -. endif +. endif -. if ${USE_GNUSTEP:Mbuild} +. if ${USE_GNUSTEP:Mbuild} PATH:= ${GNUSTEP_SYSTEM_TOOLS}:${GNUSTEP_LOCAL_TOOLS}:${PATH} MAKE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" GNUSTEP_SYSTEM_ROOT="${GNUSTEP_SYSTEM_ROOT}" # All GNUstep things installed from ports should be in the System domain. @@ -71,17 +71,17 @@ CONFIGURE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" GNUSTEP_SYSTEM_ROOT="${GNUSTEP_SYSTEM_ROOT}" BUILD_DEPENDS+= gnustep-make>0:devel/gnustep-make .include "${USESDIR}/objc.mk" -. endif +. endif -. if ${USE_GNUSTEP:Mgui} +. if ${USE_GNUSTEP:Mgui} LIB_DEPENDS+= libgnustep-gui.so:x11-toolkits/gnustep-gui -. endif +. endif -. if ${USE_GNUSTEP:Mback} +. if ${USE_GNUSTEP:Mback} BUILD_DEPENDS+= gnustep-back>0:x11-toolkits/gnustep-back RUN_DEPENDS+= gnustep-back>0:x11-toolkits/gnustep-back -. endif +. endif -.endif +. endif .endif Index: Mk/Uses/go.mk =================================================================== --- Mk/Uses/go.mk +++ Mk/Uses/go.mk @@ -29,13 +29,13 @@ .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes -.if ${ARCH} == "i386" +. if ${ARCH} == "i386" GOARCH= 386 GOOBJ= 8 -.else +. else GOARCH= amd64 GOOBJ= 6 -.endif +. endif # Settable variables GO_PKGNAME?= ${PORTNAME} @@ -62,20 +62,20 @@ GO_SRCDIR=${GO_SRCDIR} \ GO_PKGNAME=${GO_PKGNAME} -.if !target(post-extract) +. if !target(post-extract) post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} -.endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} install -v ${GO_TARGET}) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: -.for _TARGET in ${GO_TARGET} +. for _TARGET in ${GO_TARGET} @if [ -e "${GO_WRKDIR_PKG}/${_TARGET}.a" ]; then \ _TARGET_LIBDIR="${STAGEDIR}/${PREFIX}/${GO_LIBDIR}/${_TARGET:H}"; \ ${MKDIR} $${_TARGET_LIBDIR}; \ @@ -87,7 +87,7 @@ if [ -e "${GO_WRKDIR_BIN}/${_TARGET:T}" ]; then \ ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${_TARGET:T} ${STAGEDIR}/${LOCALBASE}/bin; \ fi; -.endfor -.endif +. endfor +. endif .endif Index: Mk/Uses/gperf.mk =================================================================== --- Mk/Uses/gperf.mk +++ Mk/Uses/gperf.mk @@ -10,24 +10,24 @@ .if !defined(_INCLUDE_USES_GPERF_MK) _INCLUDE_USES_GPERF_MK= yes -.if !exists(/usr/bin/gperf) +. if !exists(/usr/bin/gperf) BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf GPERF= ${LOCALBASE}/bin/gperf -.else +. else _GPERF_VERSION!= /usr/bin/gperf --version | head -1 || true _GPERF_MAJ_VERSION= ${_GPERF_VERSION:M[0-9].[0-9].[0-9]:C/.*([0-9]).[0-9].[0-9].*/\1/g} -.if empty(_GPERF_MAJ_VERSION) +. if empty(_GPERF_MAJ_VERSION) _GPERF_MAJ_VERSION= 0 -.endif +. endif -.if ${_GPERF_MAJ_VERSION} < 3 +. if ${_GPERF_MAJ_VERSION} < 3 BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf GPERF= ${LOCALBASE}/bin/gperf -.else +. else GPERF= /usr/bin/gperf -.endif -.endif +. endif +. endif CONFIGURE_ENV+= GPERF=${GPERF} MAKE_ENV+= GPERF=${GPERF} Index: Mk/Uses/gssapi.mk =================================================================== --- Mk/Uses/gssapi.mk +++ Mk/Uses/gssapi.mk @@ -80,12 +80,12 @@ _HEADERS= sys/types.h sys/stat.h stdint.h .undef _FIXUP_KRB5CONFIG -.if empty(gssapi_ARGS) +. if empty(gssapi_ARGS) gssapi_ARGS= base -.endif -.for _A in ${gssapi_ARGS} +. endif +. for _A in ${gssapi_ARGS} _local:= ${_A} -.if ${_local} == "base" +. if ${_local} == "base" HEIMDAL_HOME= /usr GSSAPIBASEDIR= ${HEIMDAL_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib @@ -94,80 +94,80 @@ GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILIBS= -lkrb5 -lgssapi -lgssapi_krb5 GSSAPILDFLAGS= -L"${GSSAPILIBDIR}" -.if empty(OSREL:N9.3) +. if empty(OSREL:N9.3) _FIXUP_KRB5CONFIG= yes -.endif -.elif ${_local} == "heimdal" +. endif +. elif ${_local} == "heimdal" HEIMDAL_HOME?= ${LOCALBASE} GSSAPIBASEDIR= ${HEIMDAL_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib/heimdal GSSAPIINCDIR= ${GSSAPIBASEDIR}/include/heimdal _HEADERS+= gssapi/gssapi.h gssapi/gssapi_krb5.h krb5.h -.if !defined(_KRB_BOOTSTRAP) +. if !defined(_KRB_BOOTSTRAP) BUILD_DEPENDS+= ${_HEIMDAL_DEPENDS} RUN_DEPENDS+= ${_HEIMDAL_DEPENDS} -.else +. else PREFIX= ${HEIMDAL_HOME} -.endif +. endif GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILIBS= -lkrb5 -lgssapi GSSAPILDFLAGS= -L"${GSSAPILIBDIR}" _RPATH= ${GSSAPILIBDIR} -.elif ${_local} == "mit" +. elif ${_local} == "mit" KRB5_HOME?= ${LOCALBASE} GSSAPIBASEDIR= ${KRB5_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib GSSAPIINCDIR= ${GSSAPIBASEDIR}/include _HEADERS+= gssapi/gssapi.h gssapi/gssapi_krb5.h krb5.h -.if !defined(_KRB_BOOTSTRAP) +. if !defined(_KRB_BOOTSTRAP) BUILD_DEPENDS+= ${_MITKRB5_DEPENDS} RUN_DEPENDS+= ${_MITKRB5_DEPENDS} -.else +. else PREFIX= ${KRB5_HOME} -.endif +. endif GSSAPILIBS= -lkrb5 -lgssapi_krb5 GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILDFLAGS= -L"${GSSAPILIBDIR}" _RPATH= ${GSSAPILIBDIR} -.elif ${_local} == "bootstrap" +. elif ${_local} == "bootstrap" _KRB_BOOTSTRAP= 1 -.elif ${_local} == "flags" +. elif ${_local} == "flags" _KRB_USEFLAGS= 1 -.else +. else IGNORE= USES=gssapi - invalid args: [${_local}] specified -.endif -.endfor +. endif +. endfor # Fix up krb5-config if broken. This script included in 9.X prior to # r271474 and in 10.X prior to r271473 are broken because # libgssapi_krb5 for some interfaces of GSS-API is missing. -.if defined(_FIXUP_KRB5CONFIG) +. if defined(_FIXUP_KRB5CONFIG) KRB5CONFIG=${WRKDIR}/krb5-config _USES_configure+= 290:krb5config-fix krb5config-fix: ${SED} -e 's,\$$lib_flags -lgssapi -lheimntlm,\$$lib_flags -lgssapi -lgssapi_krb5 -lheimntlm,' < ${GSSAPIBASEDIR}/bin/krb5-config > ${KRB5CONFIG} ${CHMOD} a+rx ${KRB5CONFIG} -.else +. else KRB5CONFIG=${GSSAPIBASEDIR}/bin/krb5-config -.endif +. endif # Fix up -Wl,-rpath in LDFLAGS -.if defined(_RPATH) && !empty(_RPATH) -.if !empty(LDFLAGS:M-Wl,-rpath,*) -.for F in ${LDFLAGS:M-Wl,-rpath,*} +. if defined(_RPATH) && !empty(_RPATH) +. if !empty(LDFLAGS:M-Wl,-rpath,*) +. for F in ${LDFLAGS:M-Wl,-rpath,*} LDFLAGS:= -Wl,-rpath,${_RPATH}:${F:S/-Wl,-rpath,//} \ ${LDFLAGS:N-Wl,-rpath,*} -.endfor -.else +. endfor +. else LDFLAGS+= -Wl,-rpath,${_RPATH}:/usr/lib -.endif +. endif _DEBUG_KRB_RPATH= -Wl,-rpath,${_RPATH} -.endif -.if defined(_KRB_USEFLAGS) && !empty(_KRB_USEFLAGS) +. endif +. if defined(_KRB_USEFLAGS) && !empty(_KRB_USEFLAGS) CPPFLAGS+= ${GSSAPICPPFLAGS} LDFLAGS+= ${GSSAPILDFLAGS} LDADD+= ${GSSAPILIBS} -.endif +. endif GSSAPI_CONFIGURE_ARGS= \ CFLAGS="${GSSAPICPPFLAGS} ${CFLAGS}" \ LDFLAGS="${GSSAPILDFLAGS} ${LDFLAGS}" \ Index: Mk/Uses/horde.mk =================================================================== --- Mk/Uses/horde.mk +++ Mk/Uses/horde.mk @@ -137,29 +137,29 @@ horde-trean-DEPEND= ${LOCALBASE}/${HORDE_DIR}/trean/index.php:www/horde-trean horde-turba-DEPEND= ${LOCALBASE}/${HORDE_DIR}/turba/index.php:mail/horde-turba -.if defined(USE_HORDE_RUN) -. for DEP in ${USE_HORDE_RUN} -. if !defined(horde-${DEP}-DEPEND) +. if defined(USE_HORDE_RUN) +. for DEP in ${USE_HORDE_RUN} +. if !defined(horde-${DEP}-DEPEND) UNKNOWN_HORDE_PACKAGES+= ${DEP} -. else +. else RUN_DEPENDS+= ${horde-${DEP}-DEPEND} +. endif +. endfor . endif -. endfor -.endif -.if defined(USE_HORDE_BUILD) -. for DEP in ${USE_HORDE_BUILD} -. if !defined(horde-${DEP}-DEPEND) +. if defined(USE_HORDE_BUILD) +. for DEP in ${USE_HORDE_BUILD} +. if !defined(horde-${DEP}-DEPEND) UNKNOWN_HORDE_PACKAGES+= ${DEP} -. else +. else BUILD_DEPENDS+= ${horde-${DEP}-DEPEND} +. endif +. endfor . endif -. endfor -.endif -.if defined(UNKNOWN_HORDE_PACKAGES) +. if defined(UNKNOWN_HORDE_PACKAGES) IGNORE= unknown Horde package(s): ${UNKNOWN_HORDE_PACKAGES} -.endif +. endif .include "${USESDIR}/pear.mk" .endif Index: Mk/Uses/iconv.mk =================================================================== --- Mk/Uses/iconv.mk +++ Mk/Uses/iconv.mk @@ -13,7 +13,7 @@ .if !defined(_INCLUDE_USES_ICONV_MK) _INCLUDE_USES_ICONV_MK= yes -.if !exists(/usr/include/iconv.h) || ${iconv_ARGS:Mwchar_t} || ${iconv_ARGS:Mtranslit} +. if !exists(/usr/include/iconv.h) || ${iconv_ARGS:Mwchar_t} || ${iconv_ARGS:Mtranslit} ICONV_CMD= ${LOCALBASE}/bin/iconv ICONV_LIB= -liconv @@ -23,15 +23,15 @@ ICONV_INCLUDE_PATH= ${LOCALBASE}/include ICONV_LIB_PATH= ${LOCALBASE}/lib/libiconv.so -.if ${iconv_ARGS:Mbuild} +. if ${iconv_ARGS:Mbuild} BUILD_DEPENDS+= ${ICONV_CMD}:converters/libiconv -.elif ${iconv_ARGS:Mpatch} +. elif ${iconv_ARGS:Mpatch} PATCH_DEPENDS+= ${ICONV_CMD}:converters/libiconv -.else +. else LIB_DEPENDS+= libiconv.so:converters/libiconv -.endif +. endif -.else +. else ICONV_CMD= /usr/bin/iconv ICONV_LIB= @@ -41,19 +41,19 @@ ICONV_INCLUDE_PATH= /usr/include ICONV_LIB_PATH= /usr/lib/libc.so -.if (${OPSYS} == FreeBSD && (${OSVERSION} < 1001514 \ +. if (${OPSYS} == FreeBSD && (${OSVERSION} < 1001514 \ || (${OSVERSION} >= 1100000 && ${OSVERSION} < 1100069))) \ || exists(${LOCALBASE}/include/iconv.h) BUILD_DEPENDS+= libiconv>=1.14_9:converters/libiconv ICONV_INCLUDE_PATH= ${LOCALBASE}/include -.endif +. endif CPPFLAGS+= -DLIBICONV_PLUG CFLAGS+= -DLIBICONV_PLUG CXXFLAGS+= -DLIBICONV_PLUG OBJCFLAGS+= -DLIBICONV_PLUG -.endif +. endif # These are the most common names for the iconv-related variables found in # CMake-based ports. We set them here via CMAKE_ARGS to make sure that the best Index: Mk/Uses/imake.mk =================================================================== --- Mk/Uses/imake.mk +++ Mk/Uses/imake.mk @@ -14,37 +14,37 @@ .if !defined(_INCLUDE_USES_IMAKE_MK) _INCLUDE_USES_IMAKE_MK= yes -.if ${imake_ARGS:Nnotall:Nenv:Nnoman} +. if ${imake_ARGS:Nnotall:Nenv:Nnoman} IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument -.endif +. endif BUILD_DEPENDS+= imake:devel/imake -.if defined(USE_GCC) +. if defined(USE_GCC) IMAKECPP= ${CPP} IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX} -.else +. else IMAKECPP= tradcpp IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX} BUILD_DEPENDS+= tradcpp:devel/tradcpp -.endif +. endif MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" -.if ! ${imake_ARGS:Mnotall} +. if ! ${imake_ARGS:Mnotall} XMKMF_ARGS+= -a -.endif +. endif -.if ! ${imake_ARGS:Menv} -.if !target(do-configure) +. if ! ${imake_ARGS:Menv} +. if !target(do-configure) do-configure: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) -.endif +. endif -.if ! ${imake_ARGS:Mnoman} +. if ! ${imake_ARGS:Mnoman} LATE_INSTALL_ARGS= install.man -.endif +. endif -.endif +. endif .endif Index: Mk/Uses/jpeg.mk =================================================================== --- Mk/Uses/jpeg.mk +++ Mk/Uses/jpeg.mk @@ -18,21 +18,21 @@ _INCLUDE_USES_JPEG_MK= yes JPEG_PORT?= graphics/jpeg-turbo -.if empty(jpeg_ARGS) +. if empty(jpeg_ARGS) jpeg_ARGS= lib -.endif +. endif -.if ${jpeg_ARGS} == lib +. if ${jpeg_ARGS} == lib LIB_DEPENDS+= libjpeg.so:${JPEG_PORT} -.elif ${jpeg_ARGS} == build +. elif ${jpeg_ARGS} == build BUILD_DEPENDS+= cjpeg:${JPEG_PORT} -.elif ${jpeg_ARGS} == run +. elif ${jpeg_ARGS} == run RUN_DEPENDS+= cjpeg:${JPEG_PORT} -.elif ${jpeg_ARGS} == both +. elif ${jpeg_ARGS} == both BUILD_DEPENDS+= cjpeg:${JPEG_PORT} RUN_DEPENDS+= cjpeg:${JPEG_PORT} -.else +. else IGNORE= USES=jpeg - invalid args: [${jpeg_ARGS}] specified -.endif +. endif .endif Index: Mk/Uses/kmod.mk =================================================================== --- Mk/Uses/kmod.mk +++ Mk/Uses/kmod.mk @@ -13,22 +13,22 @@ _USES_POST+= kmod -.if !empty(kmod_ARGS) +. if !empty(kmod_ARGS) IGNORE= USES=kmod takes no arguments -.endif +. endif -.if !exists(${SRC_BASE}/sys/Makefile) +. if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source files in ${SRC_BASE} -.endif +. endif CATEGORIES+= kld SSP_UNSAFE= kernel module supports SSP natively KMODDIR?= /boot/modules -.if ${KMODDIR} == /boot/kernel +. if ${KMODDIR} == /boot/kernel KMODDIR= /boot/modules -.endif +. endif PLIST_SUB+= KMODDIR="${KMODDIR:C,^/,,}" MAKE_ENV+= KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" NO_XREF=yes PLIST_FILES+= "@kld ${KMODDIR}" Index: Mk/Uses/lha.mk =================================================================== --- Mk/Uses/lha.mk +++ Mk/Uses/lha.mk @@ -10,9 +10,9 @@ EXTRACT_SUFX?= .lzh -.if !empty(lha_ARGS) +. if !empty(lha_ARGS) IGNORE= Incorrect 'USES+=lha:${lha_ARGS}' expecting 'USES+=lha' -.endif +. endif EXTRACT_DEPENDS+= lha:archivers/lha EXTRACT_CMD?= ${LHA_CMD} Index: Mk/Uses/libtool.mk =================================================================== --- Mk/Uses/libtool.mk +++ Mk/Uses/libtool.mk @@ -17,9 +17,9 @@ _INCLUDE_USES_LIBTOOL_MK= yes _USES_POST+= libtool -.if ${libtool_ARGS:Mbuild} +. if ${libtool_ARGS:Mbuild} BUILD_DEPENDS+= libtool:devel/libtool -.endif +. endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) @@ -69,16 +69,16 @@ _USES_stage+= 790:patch-lafiles patch-lafiles: -.if ${libtool_ARGS:Mkeepla} +. if ${libtool_ARGS:Mkeepla} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" -.else +. else @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ 'case `${REALPATH} -q "{}"` in \ *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} -.endif +. endif .endif Index: Mk/Uses/lua.mk =================================================================== --- Mk/Uses/lua.mk +++ Mk/Uses/lua.mk @@ -16,62 +16,62 @@ .include "${PORTSDIR}/Mk/bsd.default-versions.mk" _LUA_DEFAULT_VERSION= ${LUA_DEFAULT:S/.//} -.if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}} +. if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}} IGNORE= Invalid lua version ${LUA_DEFAULT} -.endif +. endif # # Parse a ver+ argument # -.if ${lua_ARGS:M*+} +. if ${lua_ARGS:M*+} _LUA_MIN_VERSION:= ${lua_ARGS:M*+:S/+//} _LUA_WANTED_VERSION:= ${_LUA_DEFAULT_VERSION} -.endif +. endif # # Parse one or more ver arguments # -.if ${lua_ARGS:M5[1-3]} +. if ${lua_ARGS:M5[1-3]} _LUA_WANTED_VERSIONS:= ${lua_ARGS:M5[1-3]} -.endif +. endif # # If no version was specified with any of the ver or ver+ arguments, set the # default version. # -.if !defined(_LUA_WANTED_VERSIONS) +. if !defined(_LUA_WANTED_VERSIONS) _LUA_WANTED_VERSIONS= ${_LUA_DEFAULT_VERSION} -.endif +. endif # # Resolve minimum versions (ver+). Append anything greater or equal than the # specified minimum version to the list of wanted versions. # -.if defined(_LUA_MIN_VERSION) -. for _v in ${_LUA_VALID_VERSIONS} -. if ${_LUA_MIN_VERSION} <= ${_v} +. if defined(_LUA_MIN_VERSION) +. for _v in ${_LUA_VALID_VERSIONS} +. if ${_LUA_MIN_VERSION} <= ${_v} _LUA_WANTED_VERSIONS+=${_v} -. endif -. endfor -.endif +. endif +. endfor +. endif # # Right now we have built a list of potential versions that we may depend on. # Let's sort them and remove any duplicates. We then locate the highest one # already installed, if any. # -.for _v in ${_LUA_WANTED_VERSIONS:O:u} +. for _v in ${_LUA_WANTED_VERSIONS:O:u} _LUA_HIGHEST_VERSION:=${_v} -. if exists(${LOCALBASE}/bin/lua${_v}) +. if exists(${LOCALBASE}/bin/lua${_v}) _LUA_WANTED_VERSION:= ${_v} -. endif -.endfor +. endif +. endfor # # If we couldn't find any wanted version installed, depend on the highest one. -.if !defined(_LUA_WANTED_VERSION) +. if !defined(_LUA_WANTED_VERSION) _LUA_WANTED_VERSION:= ${_LUA_HIGHEST_VERSION} -.endif +. endif # # Exported variables @@ -98,12 +98,12 @@ LUA_INCDIR=${LUA_INCDIR} \ LUA_LIBDIR=${LUA_LIBDIR} -.if ${lua_ARGS:Mbuild} +. if ${lua_ARGS:Mbuild} BUILD_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} -.elif ${lua_ARGS:Mrun} +. elif ${lua_ARGS:Mrun} RUN_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} -.else +. else LIB_DEPENDS+= liblua-${LUA_VER}.so:lang/lua${LUA_VER_STR} -.endif +. endif .endif Index: Mk/Uses/makeinfo.mk =================================================================== --- Mk/Uses/makeinfo.mk +++ Mk/Uses/makeinfo.mk @@ -11,12 +11,12 @@ .if !defined(_INCLUDE_USES_MAKEINFO_MK) _INCLUDE_USES_MAKEINFO_MK= yes -.if !empty(makeinfo_ARGS) +. if !empty(makeinfo_ARGS) IGNORE= USES=makeinfo - expects no arguments -.endif +. endif -.if !exists(/usr/bin/makeinfo) +. if !exists(/usr/bin/makeinfo) BUILD_DEPENDS+= makeinfo:print/texinfo -.endif +. endif .endif Index: Mk/Uses/makeself.mk =================================================================== --- Mk/Uses/makeself.mk +++ Mk/Uses/makeself.mk @@ -10,9 +10,9 @@ .if !defined(_INCLUDE_USES_MAKESELF_Mk) _INCLUDE_USES_MAKESELF_MK= yes -.if !empty(makeself_ARGS) +. if !empty(makeself_ARGS) IGNORE= Incorrect 'USES+= makeself:${makeself_ARGS}' makeself takes no arguments -.endif +. endif EXTRACT_DEPENDS+= ${UNMAKESELF_CMD}:archivers/unmakeself Index: Mk/Uses/mate.mk =================================================================== --- Mk/Uses/mate.mk +++ Mk/Uses/mate.mk @@ -22,9 +22,9 @@ _USES_POST+= mate -.if !empty(mate_ARGS) +. if !empty(mate_ARGS) IGNORE= USES=mate takes no arguments -.endif +. endif # This section defines possible names of MATE components and all information # necessary for ports to use those components. @@ -92,9 +92,9 @@ s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \ s|/usr/bin/iconv|${LOCALBASE}/bin/iconv|g ; \ s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|' -.if ${USE_MATE:Mintlhack}!="" +. if ${USE_MATE:Mintlhack}!="" USE_MATE+= intltool -.endif +. endif libmatekbd_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatekbd.pc libmatekbd_BUILD_DEPENDS= ${libmatekbd_DETECT}:x11/libmatekbd @@ -140,58 +140,58 @@ # End component definition section -.if defined(USE_MATE) +. if defined(USE_MATE) # Comparing between USE_MATE and _USE_MATE_ALL to make sure the component # exists in _USE_MATE_ALL. If it does not exist then give an error about it. #. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} -. for component in ${USE_MATE:C/^([^:]+).*/\1/} +. for component in ${USE_MATE:C/^([^:]+).*/\1/} #. for component in ${USE_GNOME:C/^([^:]+).*/\1/} -. if ${_USE_MATE_ALL:M${component}}=="" +. if ${_USE_MATE_ALL:M${component}}=="" .error cannot install: Unknown component USE_MATE=${component} -. endif -. endfor +. endif +. endfor -. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} -. if defined(${component}_PATCH_DEPENDS) +. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} +. if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS} -. endif +. endif -. if defined(${component}_DETECT) -. if ${USE_MATE:M${component}\:build}!="" +. if defined(${component}_DETECT) +. if ${USE_MATE:M${component}\:build}!="" BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} -. elif ${USE_MATE:M${component}\:run}!="" +. elif ${USE_MATE:M${component}\:run}!="" RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. else -. if defined(${component}_LIB_DEPENDS) +. else +. if defined(${component}_LIB_DEPENDS) LIB_DEPENDS+= ${${component}_LIB_DEPENDS} -. else +. else BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. endif -. endif -. endif +. endif +. endif +. endif -. if defined(${component}_CONFIGURE_TARGET) +. if defined(${component}_CONFIGURE_TARGET) CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS} -. endif +. endif -. if defined(${component}_CONFIGURE_ENV) +. if defined(${component}_CONFIGURE_ENV) CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV} -. endif +. endif -. if defined(${component}_MAKE_ENV) +. if defined(${component}_MAKE_ENV) MAKE_ENV+= ${${component}_MAKE_ENV} -. endif +. endif -. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) +. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET} -. endif +. endif -. if defined(${component}_PRE_PATCH) +. if defined(${component}_PRE_PATCH) MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH} -. endif -. endfor -.endif # USE_MATE check +. endif +. endfor +. endif # USE_MATE check .endif # End of optional part. @@ -199,7 +199,7 @@ .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_MATE_POST_MK) _INCLUDE_USES_MATE_POST_MK= yes -.if ${USE_MATE:Mautogen}!="" +. if ${USE_MATE:Mautogen}!="" CONFIGURE_ENV+= NOCONFIGURE=yes @@ -207,15 +207,15 @@ mate-pre-configure: @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) -.endif +. endif -.if defined(MATE_PRE_PATCH) +. if defined(MATE_PRE_PATCH) _USES_configure+= 445:mate-pre-configure-script mate-pre-configure-script: @${MATE_PRE_PATCH:C/^;//1} -.endif +. endif .endif # End of use part. Index: Mk/Uses/mono.mk =================================================================== --- Mk/Uses/mono.mk +++ Mk/Uses/mono.mk @@ -10,9 +10,9 @@ .if !defined(_INCLUDE_USES_MONO_MK) _INCLUDE_USES_MONO_MK= yes -.if !empty(mono_ARGS) +. if !empty(mono_ARGS) IGNORE= USES=mono takes no arguments -.endif +. endif # Set the location of the .wapi directory so we write to a location we # can always assume to be writable. Index: Mk/Uses/motif.mk =================================================================== --- Mk/Uses/motif.mk +++ Mk/Uses/motif.mk @@ -13,16 +13,16 @@ .if !defined(_INCLUDE_USES_MOTIF_MK) _INCLUDE_USES_MOTIF_MK= yes -.if !empty(motif_ARGS) +. if !empty(motif_ARGS) IGNORE= USES=motif takes no arguments -.endif +. endif -.if defined(WANT_LESSTIF) +. if defined(WANT_LESSTIF) LIB_DEPENDS+= libXm.so:x11-toolkits/lesstif -.else +. else USE_XORG+= xpm LIB_DEPENDS+= libXm.so.4:x11-toolkits/open-motif -.endif +. endif MOTIFLIB?= -L${LOCALBASE}/lib -lXm -lXp MAKE_ENV+= MOTIFLIB="${MOTIFLIB}" Index: Mk/Uses/mysql.mk =================================================================== --- Mk/Uses/mysql.mk +++ Mk/Uses/mysql.mk @@ -28,33 +28,33 @@ .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if !empty(mysql_ARGS) +. if !empty(mysql_ARGS) .undef _WANT_MYSQL_VER .undef _WANT_MYSQL_SERVER .undef _WANT_MYSQL_EMBEDDED _MYSQL_ARGS= ${mysql_ARGS:S/,/ /g} -.if ${_MYSQL_ARGS:Mserver} +. if ${_MYSQL_ARGS:Mserver} _WANT_MYSQL_SERVER= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver} -.endif -.if ${_MYSQL_ARGS:Membedded} +. endif +. if ${_MYSQL_ARGS:Membedded} _WANT_MYSQL_EMBEDDED= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nembedded} -.endif -.if ${_MYSQL_ARGS:Mclient} +. endif +. if ${_MYSQL_ARGS:Mclient} _WANT_MYSQL_CLIENT= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nclient} -.endif +. endif # Port requested a version -.if !empty(_MYSQL_ARGS) +. if !empty(_MYSQL_ARGS) _WANT_MYSQL_VER= ${_MYSQL_ARGS} -.endif -.endif # !empty(mysql_ARGS) +. endif +. endif # !empty(mysql_ARGS) -.if defined(DEFAULT_MYSQL_VER) +. if defined(DEFAULT_MYSQL_VER) WARNING+= "DEFAULT_MYSQL_VER is defined, consider using DEFAULT_VERSIONS=mysql=${DEFAULT_MYSQL_VER} instead" -.endif +. endif DEFAULT_MYSQL_VER?= ${MYSQL_DEFAULT:S/.//} # MySQL client version currently supported. @@ -71,73 +71,73 @@ MYSQL101m_LIBVER= 18 # Setting/finding MySQL version we want. -.if exists(${LOCALBASE}/bin/mysql) +. if exists(${LOCALBASE}/bin/mysql) _MYSQL!= ${LOCALBASE}/bin/mysql --version | ${SED} -e 's/.*Distrib \([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/' _PERCONA!= ${LOCALBASE}/bin/mysql --version | ${GREP} Percona | wc -l _MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l -.if ${_PERCONA} == 1 +. if ${_PERCONA} == 1 _MYSQL_VER= ${_MYSQL}p -.elif ${_MARIADB} == 1 +. elif ${_MARIADB} == 1 _MYSQL_VER= ${_MYSQL}m -.else +. else _MYSQL_VER= ${_MYSQL} -.endif -.endif +. endif +. endif -.if defined(_WANT_MYSQL_VER) -.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} +. if defined(_WANT_MYSQL_VER) +. if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} IGNORE= cannot install: the port wants mysql${_WANT_MYSQL_VER}-client and you try to install mysql${WITH_MYSQL_VER}-client -.endif +. endif MYSQL_VER= ${_WANT_MYSQL_VER} -.elif defined(WITH_MYSQL_VER) +. elif defined(WITH_MYSQL_VER) MYSQL_VER= ${WITH_MYSQL_VER} -.else -.if defined(_MYSQL_VER) +. else +. if defined(_MYSQL_VER) MYSQL_VER= ${_MYSQL_VER} -.else +. else MYSQL_VER= ${DEFAULT_MYSQL_VER} -.endif -.endif # _WANT_MYSQL_VER +. endif +. endif # _WANT_MYSQL_VER -.if defined(_MYSQL_VER) -.if ${_MYSQL_VER} != ${MYSQL_VER} +. if defined(_MYSQL_VER) +. if ${_MYSQL_VER} != ${MYSQL_VER} IGNORE= cannot install: MySQL versions mismatch: mysql${_MYSQL_VER}-client is installed and wanted version is mysql${MYSQL_VER}-client -.endif -.endif +. endif +. endif -.if (${MYSQL_VER:C/[0-9]*//} == "m") +. if (${MYSQL_VER:C/[0-9]*//} == "m") _MYSQL_FLAVOUR= mariadb -.elif (${MYSQL_VER:C/[0-9]*//} == "p") +. elif (${MYSQL_VER:C/[0-9]*//} == "p") _MYSQL_FLAVOUR= percona -.else +. else _MYSQL_FLAVOUR= mysql -.endif +. endif _MYSQL_CLIENT= databases/${_MYSQL_FLAVOUR}${MYSQL_VER:C/[mp]//}-client _MYSQL_SERVER= databases/${_MYSQL_FLAVOUR}${MYSQL_VER:C/[mp]//}-server # And now we are checking if we can use it -.if defined(MYSQL${MYSQL_VER}_LIBVER) -.if defined(IGNORE_WITH_MYSQL) -. for VER in ${IGNORE_WITH_MYSQL} -. if (${MYSQL_VER} == "${VER}") +. if defined(MYSQL${MYSQL_VER}_LIBVER) +. if defined(IGNORE_WITH_MYSQL) +. for VER in ${IGNORE_WITH_MYSQL} +. if (${MYSQL_VER} == "${VER}") IGNORE= cannot install: does not work with MySQL version ${MYSQL_VER} (MySQL ${IGNORE_WITH_MYSQL} not supported) -. endif -. endfor -.endif # IGNORE_WITH_MYSQL -.if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) +. endif +. endfor +. endif # IGNORE_WITH_MYSQL +. if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} -.if defined(_WANT_MYSQL_EMBEDDED) +. if defined(_WANT_MYSQL_EMBEDDED) BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER} -.endif -.endif -.if defined(_WANT_MYSQL_CLIENT) || \ +. endif +. endif +. if defined(_WANT_MYSQL_CLIENT) || \ !(defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED)) LIB_DEPENDS+= libmysqlclient.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT} -.endif -.else +. endif +. else IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER} -.endif # Check for correct libs +. endif # Check for correct libs .endif Index: Mk/Uses/ncurses.mk =================================================================== --- Mk/Uses/ncurses.mk +++ Mk/Uses/ncurses.mk @@ -26,19 +26,19 @@ .if !defined(_INCLUDE_USES_NCURSES_MK) _INCLUDE_USES_NCURSES_MK= yes -.if empty(ncurses_ARGS) -. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncurses.so) +. if empty(ncurses_ARGS) +. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncurses.so) ncurses_ARGS= base -. else +. else ncurses_ARGS= port +. endif . endif -.endif -.if ${ncurses_ARGS} == base +. if ${ncurses_ARGS} == base NCURSESBASE= /usr NCURSESINC= ${NCURSESBASE}/include -. if exists(${LOCALBASE}/lib/libncurses.so) +. if exists(${LOCALBASE}/lib/libncurses.so) _USES_sanity+= 400:check-depends-ncurses check-depends-ncurses: @${ECHO_CMD} "Dependency error: this port wants the ncurses library from the FreeBSD" @@ -46,29 +46,29 @@ @${ECHO_CMD} "version is installed by a port." @${ECHO_CMD} "Please deinstall the port or undefine WITH_NCURSES_BASE." @${FALSE} -. endif +. endif NCURSESRPATH= /usr/lib:${LOCALBASE}/lib -.elif ${ncurses_ARGS} == port +. elif ${ncurses_ARGS} == port NCURSESBASE= ${LOCALBASE} NCURSESINC= ${LOCALBASE}/include/ncurses -. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) +. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) PKG_DBDIR?= ${DESTDIR}/var/db/pkg -. if defined(DESTDIR) +. if defined(DESTDIR) PKGARGS= -c ${DESTDIR} -. endif +. endif PKGARGS?= NCURSES_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libncurses.so || : -. endif +. endif NCURSES_INSTALLED?= -.if ${NCURSES_INSTALLED} != "" +. if ${NCURSES_INSTALLED} != "" NCURSES_PORT= ${NCURSES_INSTALLED} NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`pkg query "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so." NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E} -.endif +. endif NCURSES_PORT?= devel/ncurses NCURSES_SHLIBVER?= 6 @@ -77,15 +77,15 @@ RUN_DEPENDS+= ${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT} NCURSESRPATH= ${NCURSESBASE}/lib -.else +. else .error USES=ncurses only accept 'port' and 'base' as arguments, got ${ncurses_ARGS} -.endif +. endif NCURSESLIB= ${NCURSESBASE}/lib -.if defined(NCURSES_RPATH) +. if defined(NCURSES_RPATH) CFLAGS+= -Wl,-rpath,${NCURSESRPATH} -.endif +. endif LDFLAGS+= -Wl,-rpath=${NCURSESRPATH} .endif Index: Mk/Uses/ninja.mk =================================================================== --- Mk/Uses/ninja.mk +++ Mk/Uses/ninja.mk @@ -13,13 +13,13 @@ .if !defined(_INCLUDE_USES_NINJA_MK) _INCLUDE_USES_NINJA_MK= yes -.if !empty(ninja_ARGS) +. if !empty(ninja_ARGS) IGNORE= Incorrect 'USES+= ninja:${ninja_ARGS}' ninja takes no arguments -.endif +. endif -.if defined(NINJA_VERBOSE) +. if defined(NINJA_VERBOSE) MAKE_ARGS+= -v -.endif +. endif BUILD_DEPENDS+= ninja:devel/ninja Index: Mk/Uses/objc.mk =================================================================== --- Mk/Uses/objc.mk +++ Mk/Uses/objc.mk @@ -11,61 +11,61 @@ _INCLUDE_USES_OBJC_MK= yes objc_ARGS?= -.if !empty(objc_ARGS) && ! ${objc_ARGS:Mcompiler} +. if !empty(objc_ARGS) && ! ${objc_ARGS:Mcompiler} IGNORE= USES=objc only accepts no arguments or 'compiler' -.endif +. endif _CCVERSION!= ${CC} --version -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) COMPILER_VERSION= ${_CCVERSION:M[0-9].[0-9]*:tW:C/([0-9]).([0-9]).*/\1\2/g} -.else +. else COMPILER_VERSION= ${_CCVERSION:M[0-9].[0-9]*:C/([0-9]).([0-9]).*/\1\2/g:u} -.endif -.if ${_CCVERSION:Mclang} +. endif +. if ${_CCVERSION:Mclang} COMPILER_TYPE= clang -.else +. else COMPILER_TYPE= gcc -.endif +. endif ALT_COMPILER_VERSION= 0 ALT_COMPILER_TYPE= none _ALTCCVERSION= -.if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) +. if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) _ALTCCVERSION!= /usr/bin/clang --version -.elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) +. elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) _ALTCCVERSION!= /usr/bin/gcc --version -.endif +. endif -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9].[0-9]*:tW:C/([0-9]).([0-9]).*/\1\2/g} -.else +. else ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9].[0-9]*:C/([0-9]).([0-9]).*/\1\2/g:u} -.endif -.if ${_ALTCCVERSION:Mclang} +. endif +. if ${_ALTCCVERSION:Mclang} ALT_COMPILER_TYPE= clang -.elif !empty(_ALTCCVERSION) +. elif !empty(_ALTCCVERSION) ALT_COMPILER_TYPE= gcc -.endif +. endif # We do always need clang -.if (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} != clang -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 +. if (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 34) || ${COMPILER_TYPE} != clang +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 34 CC= /usr/bin/clang CPP= /usr/bin/clang-cpp CXX= /usr/bin/clang++ -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang34:lang/clang34 CPP= ${LOCALBASE}/bin/clang-cpp34 CC= ${LOCALBASE}/bin/clang34 CXX= ${LOCALBASE}/bin/clang++34 -.endif -.endif +. endif +. endif -.if ! ${objc_ARGS:Mcompiler} +. if ! ${objc_ARGS:Mcompiler} LIB_DEPENDS+= libobjc.so.4.6:lang/libobjc2 OBJCFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -.endif +. endif CONFIGURE_ENV+= OBJC="${CC}" OBJCFLAGS="${OBJCFLAGS}" MAKE_ENV+= OBJC="${CC}" OBJCFLAGS="${OBJCFLAGS}" Index: Mk/Uses/openal.mk =================================================================== --- Mk/Uses/openal.mk +++ Mk/Uses/openal.mk @@ -24,23 +24,23 @@ _OPENAL_LIBS= si soft _DEFAULT_OPENAL= soft -.if exists(${LOCALBASE}/lib/libopenal.a) +. if exists(${LOCALBASE}/lib/libopenal.a) _HAVE_OPENAL= si -.elif exists(${LOCALBASE}/bin/openal-info) +. elif exists(${LOCALBASE}/bin/openal-info) _HAVE_OPENAL= soft -.endif +. endif # Be friendly -.if empty(openal_ARGS) +. if empty(openal_ARGS) openal_ARGS= ${_DEFAULT_OPENAL} -.endif +. endif # Sanity checks -.if defined(WANT_OPENAL) && defined(_HAVE_OPENAL) && ${_HAVE_OPENAL} != ${WANT_OPENAL} +. if defined(WANT_OPENAL) && defined(_HAVE_OPENAL) && ${_HAVE_OPENAL} != ${WANT_OPENAL} IGNORE= OpenAL mismatch: ${_HAVE_OPENAL} is installed, but ${WANT_OPENAL} desired -.endif +. endif -.for _arg in ${openal_ARGS} +. for _arg in ${openal_ARGS} . if ! ${_valid_ARGS:M${_arg}} IGNORE= Incorrect 'USES+= openal:${openal_ARGS}' usage: argument [${_arg}] is not recognized . endif @@ -60,27 +60,27 @@ . endif . endfor . endif -.endfor +. endfor # Proceed _USE_OPENAL= -.if ${openal_ARGS:Mal} -.if defined(_HAVE_OPENAL) +. if ${openal_ARGS:Mal} +. if defined(_HAVE_OPENAL) _USE_OPENAL= ${_HAVE_OPENAL} -.elif defined(WANT_OPENAL) +. elif defined(WANT_OPENAL) _USE_OPENAL= ${WANT_OPENAL} -.else +. else _USE_OPENAL= ${_DEFAULT_OPENAL} -.endif -.endif +. endif +. endif -.for _arg in ${openal_ARGS:Nal} +. for _arg in ${openal_ARGS:Nal} _USE_OPENAL+= ${_arg} -.endfor +. endfor -.for _arg in ${_USE_OPENAL} +. for _arg in ${_USE_OPENAL} LIB_DEPENDS+= ${_${_arg}_DEPENDS} -.endfor +. endfor .endif Index: Mk/Uses/pathfix.mk =================================================================== --- Mk/Uses/pathfix.mk +++ Mk/Uses/pathfix.mk @@ -12,9 +12,9 @@ .if !defined(_INCLUDE_USES_PATHFIX_MK) _INCLUDE_USES_PATHFIX_MK= yes -.if !empty(pathfix_ARGS) +. if !empty(pathfix_ARGS) IGNORE= USES=pathfix does not require args -.endif +. endif PATHFIX_CMAKELISTSTXT?= CMakeLists.txt PATHFIX_MAKEFILEIN?= Makefile.in @@ -22,7 +22,7 @@ _USES_patch+= 190:pathfix pathfix: -.if ${USES:Mcmake*} +. if ${USES:Mcmake*} @${FIND} ${PATHFIX_WRKSRC} -name "${PATHFIX_CMAKELISTSTXT}" -type f | ${XARGS} ${REINPLACE_CMD} -e \ 's|[{]CMAKE_INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]INSTALL_LIB_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ @@ -32,7 +32,7 @@ s|[{]LIBRARY_INSTALL_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]libdir[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|lib/pkgconfig|libdata/pkgconfig|g' -.else +. else @${FIND} ${PATHFIX_WRKSRC} -name "${PATHFIX_MAKEFILEIN}" -type f | ${XARGS} ${REINPLACE_CMD} -e \ 's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \ s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ @@ -43,6 +43,6 @@ s|[(]prefix[)]/lib/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[$$][(]localstatedir[)]/scrollkeeper|${SCROLLKEEPER_DIR}|g ; \ s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' -.endif +. endif .endif Index: Mk/Uses/pear.mk =================================================================== --- Mk/Uses/pear.mk +++ Mk/Uses/pear.mk @@ -12,9 +12,9 @@ _INCLUDE_USES_PEAR_MK= yes _USES_POST+= pear -.if !empty(pear_ARGS) +. if !empty(pear_ARGS) IGNORE+= USES=pear takes not arguments -.endif +. endif MASTER_SITES?= http://pear.php.net/get/ \ http://us.pear.php.net/get/ \ @@ -26,23 +26,23 @@ BUILD_DEPENDS+= pear:devel/pear RUN_DEPENDS+= pear:devel/pear -.if !defined(USE_PHPIZE) +. if !defined(USE_PHPIZE) NO_BUILD= yes -.endif +. endif -.if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != "" +. if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != "" PKGNAMEPREFIX?= pear-${PEAR_CHANNEL}- PEARPKGREF= ${PEAR_CHANNEL}/${PORTNAME} -.else +. else PKGNAMEPREFIX?= pear- PEARPKGREF= ${PORTNAME} -.endif +. endif -.if exists(${LOCALBASE}/bin/php-config) +. if exists(${LOCALBASE}/bin/php-config) PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix -.else +. else PHP_BASE= ${LOCALBASE} -.endif +. endif PEAR= ${LOCALBASE}/bin/pear LPEARDIR= share/pear LPKGREGDIR= ${LPEARDIR}/packages/${PKGNAME} @@ -60,18 +60,18 @@ SQLSDIR= ${PHP_BASE}/${LSQLSDIR} SCRIPTFILESDIR= ${LOCALBASE}/bin TESTSDIR= ${PHP_BASE}/${LTESTSDIR} -.if defined(CATEGORY) && !empty(CATEGORY) +. if defined(CATEGORY) && !empty(CATEGORY) LINSTDIR= ${LPEARDIR}/${CATEGORY} -.else +. else LINSTDIR= ${LPEARDIR} -.endif +. endif INSTDIR= ${PHP_BASE}/${LINSTDIR} SUB_LIST+= PKG_NAME=${PEARPKGREF} -.if !defined(USE_PHPIZE) && !exists(${.CURDIR}/pkg-plist) +. if !defined(USE_PHPIZE) && !exists(${.CURDIR}/pkg-plist) PLIST= ${WRKDIR}/PLIST -.endif +. endif PLIST_SUB+= PEARDIR=${LPEARDIR} PKGREGDIR=${LPKGREGDIR} \ TESTSDIR=${LTESTSDIR} INSTDIR=${LINSTDIR} SQLSDIR=${LSQLSDIR} \ SCRIPTFILESDIR=${LCRIPTSDIR} @@ -85,7 +85,7 @@ _USES_install+= 250:pear-pre-install pear-pre-install: -.if exists(${LOCALBASE}/lib/php.DIST_PHP) \ +. if exists(${LOCALBASE}/lib/php.DIST_PHP) \ || exists(${PHP_BASE}/lib/php.DIST_PHP) \ || exists(${LOCALBASE}/.PEAR.pkg) \ || exists(${PHP_BASE}/.PEAR.pkg) @@ -94,7 +94,7 @@ @${ECHO_MSG} " Please deinstall your installed pear- ports." @${ECHO_MSG} "" @${FALSE} -.endif +. endif DIRFILTER= ${SED} -En '\:^.*/[^/]*$$:s:^(.+)/[^/]*$$:\1:p' \ | ( while read r; do \ @@ -110,16 +110,16 @@ done \ ) | ${SORT} -ur -.if !defined(USE_PHPIZE) +. if !defined(USE_PHPIZE) _USES_install+= 260:do-autogenerate-plist do-autogenerate-plist: @${ECHO_MSG} "===> Generating packing list with pear" @${LN} -sf ${WRKDIR}/package.xml ${WRKSRC}/package.xml @cd ${WRKSRC} && ${PEAR} install -n -f -P ${WRKDIR}/inst package.xml > /dev/null 2> /dev/null -.for R in .channels .depdb .depdblock .filemap .lock .registry +. for R in .channels .depdb .depdblock .filemap .lock .registry @${RM} -rf ${WRKDIR}/inst/${PREFIX}/${LPEARDIR}/${R} @${RM} -rf ${WRKDIR}/inst/${R} -.endfor +. endfor @FILES=`cd ${WRKDIR}/inst && ${FIND} . -type f | ${CUT} -c 2- | \ ${GREP} -v -E "^${PREFIX}/"` || exit 0; \ ${ECHO_CMD} $${FILES}; if ${TEST} -n "$${FILES}"; then \ @@ -133,11 +133,11 @@ do-install: @cd ${WRKSRC} && ${PEAR} install -n -f -P ${STAGEDIR} package.xml # Clean up orphans re-generated by pear-install -.for R in .channels .depdb .depdblock .filemap .lock .registry +. for R in .channels .depdb .depdblock .filemap .lock .registry @${RM} -rf ${STAGEDIR}${PREFIX}/${LPEARDIR}/${R} @${RM} -rf ${STAGEDIR}/${R} -.endfor -.endif +. endfor +. endif _USES_install+= 270:do-generate-deinstall-script do-generate-deinstall-script: Index: Mk/Uses/perl5.mk =================================================================== --- Mk/Uses/perl5.mk +++ Mk/Uses/perl5.mk @@ -36,56 +36,56 @@ .if !defined(_INCLUDE_USES_PERL5_MK) _INCLUDE_USES_PERL5_MK= yes -.if !empty(perl5_ARGS) +. if !empty(perl5_ARGS) IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments -.endif +. endif USE_PERL5?= run build # remove when 5.20 goes away. .sinclude "${LOCALBASE}/etc/perl5_version" -.if defined(PERL_VERSION) +. if defined(PERL_VERSION) PERL5_DEPEND= ${PERL5} THIS_IS_OLD_PERL= yes -.else +. else # end of remove # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if ${PERL5_DEFAULT} == 5.18 +. if ${PERL5_DEFAULT} == 5.18 .include "${PORTSDIR}/lang/perl5.18/version.mk" -.elif ${PERL5_DEFAULT} == 5.20 +. elif ${PERL5_DEFAULT} == 5.20 .include "${PORTSDIR}/lang/perl5.20/version.mk" -.elif ${PERL5_DEFAULT} == 5.22 +. elif ${PERL5_DEFAULT} == 5.22 .include "${PORTSDIR}/lang/perl5.22/version.mk" -.elif ${PERL5_DEFAULT} == 5.24 +. elif ${PERL5_DEFAULT} == 5.24 .include "${PORTSDIR}/lang/perl5.24/version.mk" -.elif ${PERL5_DEFAULT} == devel +. elif ${PERL5_DEFAULT} == devel .include "${PORTSDIR}/lang/perl5-devel/version.mk" # Force PERL_PORT here in case two identical PERL_VERSION. PERL_PORT?= perl5-devel -.else +. else IGNORE= Invalid perl5 version ${PERL5_DEFAULT} -.endif -.endif +. endif +. endif PERL_VER?= ${PERL_VERSION:C/\.[0-9]+$//} -.if !defined(PERL_LEVEL) && defined(PERL_VERSION) +. if !defined(PERL_LEVEL) && defined(PERL_VERSION) perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|} _perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|} perl_minor= ${_perl_minor:C|^.*(...)|\1|} -.if ${perl_minor} >= 100 +. if ${perl_minor} >= 100 perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} -.else # ${perl_minor} < 100 +. else # ${perl_minor} < 100 _perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} perl_patch= ${_perl_patch:C|^.*(..)|\1|} -.endif # ${perl_minor} < 100 +. endif # ${perl_minor} < 100 PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} -.else +. else PERL_LEVEL=0 -.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) +. endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) PERL_ARCH?= mach @@ -94,15 +94,15 @@ # perl5_default file, or up there in the default versions selection. # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -.if ${PERL_LEVEL} >= 502400 +. if ${PERL_LEVEL} >= 502400 PERL_PORT?= perl5.24 -.elif ${PERL_LEVEL} >= 502200 +. elif ${PERL_LEVEL} >= 502200 PERL_PORT?= perl5.22 -.elif ${PERL_LEVEL} >= 502000 +. elif ${PERL_LEVEL} >= 502000 PERL_PORT?= perl5.20 -.else # ${PERL_LEVEL} < 502000 +. else # ${PERL_LEVEL} < 502000 PERL_PORT?= perl5.18 -.endif +. endif SITE_PERL_REL?= lib/perl5/site_perl SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} @@ -110,11 +110,11 @@ SITE_ARCH?= ${LOCALBASE}/${SITE_ARCH_REL} SITE_MAN3_REL?= ${SITE_PERL_REL}/man/man3 SITE_MAN3?= ${PREFIX}/${SITE_MAN3_REL} -.if defined(THIS_IS_OLD_PERL) +. if defined(THIS_IS_OLD_PERL) SITE_MAN1_REL?= share/man/man1 -.else +. else SITE_MAN1_REL?= ${SITE_PERL_REL}/man/man1 -.endif +. endif SITE_MAN1?= ${PREFIX}/${SITE_MAN1_REL} PERL5?= ${LOCALBASE}/bin/perl${PERL_VERSION} @@ -124,7 +124,7 @@ QA_ENV+= SITE_ARCH_REL=${SITE_ARCH_REL} LIBPERL=libperl.so.${PERL_VER} # Define the want perl first if defined -.if ${USE_PERL5:M5*} +. if ${USE_PERL5:M5*} want_perl_sign= ${USE_PERL5:M5*:C|^[0-9.]+||} want_perl_ver= ${USE_PERL5:M5*:S|${want_perl_sign}$||} want_perl_major= ${want_perl_ver:C|\..*||} @@ -133,40 +133,40 @@ want_perl_minor= ${_want_perl_minor:S|^|000|:C|.*(...)|\1|} want_perl_patch= ${_want_perl_patch:S|^|00|:C|.*(..)|\1|} USE_PERL5_LEVEL= ${want_perl_major}${want_perl_minor}${want_perl_patch} -.endif +. endif # All but version _USE_PERL5= ${USE_PERL5:N5*} # Mask unspecified components. E.g. this way "5" will match any "5.x.x". -.if empty(_want_perl_minor) +. if empty(_want_perl_minor) masked_PERL_LEVEL= ${PERL_LEVEL:C|(.....)$|00000|} -.elif empty(_want_perl_patch) +. elif empty(_want_perl_patch) masked_PERL_LEVEL= ${PERL_LEVEL:C|(..)$|00|} -.else +. else masked_PERL_LEVEL= ${PERL_LEVEL} -.endif +. endif -.if defined(want_perl_sign) -.if ${want_perl_sign} == "+" -.if ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} +. if defined(want_perl_sign) +. if ${want_perl_sign} == "+" +. if ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${want_perl_ver} or later, install lang/perl${want_perl_major}.${want_perl_minor:C|^0||} and try again IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} -.elif ${want_perl_sign} == "" -.if ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} +. endif # ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} +. elif ${want_perl_sign} == "" +. if ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${want_perl_ver} exactly IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} -.elif ${want_perl_sign} == "-" -.if ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} +. endif # ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} +. elif ${want_perl_sign} == "-" +. if ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires a Perl version earlier than ${want_perl_ver} IGNORE= ${USE_PERL5_REASON} -.endif # ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} -.else # wrong suffix +. endif # ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} +. else # wrong suffix IGNORE= improper use of USE_PERL5 -.endif -.endif +. endif +. endif _USES_POST+= perl5 .endif @@ -182,14 +182,14 @@ SITE_ARCH=${SITE_ARCH_REL} # handle perl5 specific manpages -.for sect in 3 -.if defined(P5MAN${sect}) +. for sect in 3 +. if defined(P5MAN${sect}) _MANPAGES+= ${P5MAN${sect}:S%^%${PREFIX}/lib/perl5/${PERL_VER}/man/man${sect}/%} -.endif -.endfor +. endif +. endfor MANDIRS+= ${PREFIX}/${SITE_PERL_REL}/man -.if ${_USE_PERL5:Mmodbuild} || ${_USE_PERL5:Mmodbuildtiny} +. if ${_USE_PERL5:Mmodbuild} || ${_USE_PERL5:Mmodbuildtiny} _USE_PERL5+= configure ALL_TARGET?= # empty CONFIGURE_ARGS+=--install_path lib="${PREFIX}/${SITE_PERL_REL}" \ @@ -202,60 +202,60 @@ PL_BUILD?= Build CONFIGURE_ARGS+=--destdir ${STAGEDIR} DESTDIRNAME= --destdir -.if ${_USE_PERL5:Mmodbuild} -.if ${PORTNAME} != Module-Build +. if ${_USE_PERL5:Mmodbuild} +. if ${PORTNAME} != Module-Build BUILD_DEPENDS+= p5-Module-Build>=0.4206:devel/p5-Module-Build -.endif +. endif CONFIGURE_ARGS+=--create_packlist 1 -.endif -.if ${_USE_PERL5:Mmodbuildtiny} -.if ${PORTNAME} != Module-Build-Tiny +. endif +. if ${_USE_PERL5:Mmodbuildtiny} +. if ${PORTNAME} != Module-Build-Tiny BUILD_DEPENDS+= p5-Module-Build-Tiny>=0.039:devel/p5-Module-Build-Tiny -.endif +. endif CONFIGURE_ARGS+=--create_packlist 1 -.endif -.elif ${_USE_PERL5:Mconfigure} +. endif +. elif ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+=INSTALLDIRS="site" -.endif # modbuild +. endif # modbuild -.if ${_USE_PERL5:Mconfigure} +. if ${_USE_PERL5:Mconfigure} _USE_PERL5+= build run # Disable AutoInstall from attempting to install from CPAN directly in # the case of missing dependencies. This causes the build to loop on # the build cluster asking for interactive input. CONFIGURE_ENV+= PERL_EXTUTILS_AUTOINSTALL="--skipdeps" -.if defined(BATCH) && !defined(IS_INTERACTIVE) +. if defined(BATCH) && !defined(IS_INTERACTIVE) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" -.endif # defined(BATCH) && !defined(IS_INTERACTIVE) -.endif # configure +. endif # defined(BATCH) && !defined(IS_INTERACTIVE) +. endif # configure -.if ${_USE_PERL5:Mextract} +. if ${_USE_PERL5:Mextract} EXTRACT_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} -.endif +. endif -.if ${_USE_PERL5:Mpatch} +. if ${_USE_PERL5:Mpatch} PATCH_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} -.endif +. endif -.if ${_USE_PERL5:Mbuild} +. if ${_USE_PERL5:Mbuild} BUILD_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} -.endif +. endif -.if ${_USE_PERL5:Mrun} +. if ${_USE_PERL5:Mrun} RUN_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} -.endif +. endif -.if ${_USE_PERL5:Mconfigure} +. if ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" PREFIX="${PREFIX}" \ INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" CONFIGURE_SCRIPT?= Makefile.PL MAN3PREFIX?= ${PREFIX}/${SITE_PERL_REL} -.if !defined(THIS_IS_OLD_PERL) +. if !defined(THIS_IS_OLD_PERL) MAN1PREFIX?= ${PREFIX}/${SITE_PERL_REL} -.endif +. endif .undef HAS_CONFIGURE -.if !target(do-configure) +. if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ @@ -264,26 +264,26 @@ @cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} \ ${PERL5} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} -.if !${_USE_PERL5:Mmodbuild*} +. if !${_USE_PERL5:Mmodbuild*} @cd ${CONFIGURE_WRKSRC} && \ ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile -.endif # ! modbuild -.endif # !target(do-configure) -.endif # configure +. endif # ! modbuild +. endif # !target(do-configure) +. endif # configure -.if ${_USE_PERL5:Mmodbuild*} -.if !target(do-build) +. if ${_USE_PERL5:Mmodbuild*} +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) -.endif # !target(do-build) +. endif # !target(do-build) -.if !${USES:Mgmake} -.if !target(do-install) +. if !${USES:Mgmake} +. if !target(do-install) do-install: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) -.endif # !target(do-install) -.endif # ! USES=gmake -.endif # modbuild +. endif # !target(do-install) +. endif # ! USES=gmake +. endif # modbuild PACKLIST_DIR?= ${PREFIX}/${SITE_ARCH_REL}/auto @@ -317,14 +317,14 @@ @[ -d "${STAGEDIR}${SITE_MAN3}" ] && \ ${FIND} ${STAGEDIR}${SITE_MAN3} -name '*::README.3' -delete || : -.if !target(do-test) && (!empty(USE_PERL5:Mmodbuild*) || !empty(USE_PERL5:Mconfigure)) +. if !target(do-test) && (!empty(USE_PERL5:Mmodbuild*) || !empty(USE_PERL5:Mconfigure)) TEST_TARGET?= test TEST_WRKSRC?= ${BUILD_WRKSRC} do-test: -.if ${USE_PERL5:Mmodbuild*} +. if ${USE_PERL5:Mmodbuild*} cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} -.elif ${USE_PERL5:Mconfigure} +. elif ${USE_PERL5:Mconfigure} cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} -.endif # USE_PERL5:Mmodbuild* -.endif # do-test +. endif # USE_PERL5:Mmodbuild* +. endif # do-test .endif # defined(_POSTMKINCLUDED) Index: Mk/Uses/pgsql.mk =================================================================== --- Mk/Uses/pgsql.mk +++ Mk/Uses/pgsql.mk @@ -39,17 +39,17 @@ #PGSQL99_LIBVER=6 PGSQL_LIBVER= 5 -.for v in ${VALID_PGSQL_VER:S,.,,} +. for v in ${VALID_PGSQL_VER:S,.,,} PGSQL$v_LIBVER?= ${PGSQL_LIBVER} -.endfor +. endfor .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.for v in ${PGSQL_DEFAULT} -. if ! ${VALID_PGSQL_VER:M$v} +. for v in ${PGSQL_DEFAULT} +. if ! ${VALID_PGSQL_VER:M$v} IGNORE= Invalid PGSQL default version ${PGSQL_DEFAULT}; valid versions are ${VALID_PGSQL_VER} -. endif -.endfor +. endif +. endfor . for w in WITH DEFAULT . ifdef $w_PGSQL_VER @@ -119,20 +119,20 @@ PGSQL_VER_NODOT= ${PGSQL_VER:S,.,,} # And now we are checking if we can use it -. if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) +. if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) # Compat. Please DO NOT use IGNORE_WITH_PGSQL! . if defined(IGNORE_WITH_PGSQL) DEV_WARNING+= "Do not set IGNORE_WITH_PGSQL, use the version argument to USES=pgsql" -. for ver in ${IGNORE_WITH_PGSQL} -. if (${PGSQL_VER} == ${ver}) +. for ver in ${IGNORE_WITH_PGSQL} +. if (${PGSQL_VER} == ${ver}) IGNORE?= cannot install: does not work with postgresql${PGSQL_VER_NODOT}-client (PostgreSQL ${IGNORE_WITH_PGSQL} not supported) -. endif -. endfor +. endif +. endfor . endif # IGNORE_WITH_PGSQL -.if !defined(WANT_PGSQL) || ${WANT_PGSQL} == lib +. if !defined(WANT_PGSQL) || ${WANT_PGSQL} == lib LIB_DEPENDS+= libpq.so.${PGSQL${PGSQL_VER_NODOT}_LIBVER}:databases/postgresql${PGSQL_VER_NODOT}-client -.endif +. endif _USE_PGSQL_DEP= client contrib docs pgtcl pltcl plperl server _USE_PGSQL_DEP_client= psql Index: Mk/Uses/pkgconfig.mk =================================================================== --- Mk/Uses/pkgconfig.mk +++ Mk/Uses/pkgconfig.mk @@ -13,21 +13,21 @@ _PKGCONFIG_DEPENDS= pkgconf>=0.9.10:devel/pkgconf -.if empty(pkgconfig_ARGS) +. if empty(pkgconfig_ARGS) pkgconfig_ARGS= build -.endif +. endif -.if ${pkgconfig_ARGS} == "build" +. if ${pkgconfig_ARGS} == "build" BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} CONFIGURE_ENV+= PKG_CONFIG=pkgconf -.elif ${pkgconfig_ARGS} == "run" +. elif ${pkgconfig_ARGS} == "run" RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -.elif ${pkgconfig_ARGS} == "both" +. elif ${pkgconfig_ARGS} == "both" CONFIGURE_ENV+= PKG_CONFIG=pkgconf BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -.else +. else IGNORE= USES=pkgconfig - invalid args: [${pkgconfig_ARGS}] specified -.endif +. endif .endif Index: Mk/Uses/pure.mk =================================================================== --- Mk/Uses/pure.mk +++ Mk/Uses/pure.mk @@ -17,18 +17,18 @@ _valid_ARGS= ffi # Sanity check -.for arg in ${pure_ARGS} +. for arg in ${pure_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= pure:${pure_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor LIB_DEPENDS+= libpure.so:lang/pure .include "${USESDIR}/gmake.mk" -.if ${pure_ARGS:Mffi} +. if ${pure_ARGS:Mffi} RUN_DEPENDS+= ${LOCALBASE}/lib/pure/ffi.pure:devel/pure-ffi -.endif +. endif MAKE_ARGS+= prefix=${PREFIX} mandir=${PREFIX}/man \ CC=${CC} CFLAGS="${CFLAGS}" \ Index: Mk/Uses/pyqt.mk =================================================================== --- Mk/Uses/pyqt.mk +++ Mk/Uses/pyqt.mk @@ -29,24 +29,24 @@ # option is for internal use by the py-sip ports. _PYQT_SUPPORTED= 4 5 sip -.if empty(pyqt_ARGS) +. if empty(pyqt_ARGS) IGNORE= pyqt needs a qt-version (${_PYQT_SUPPORTED}) -.endif +. endif # At the moment we support PyQt bindings versions 4 and 5 -.for ver in ${_PYQT_SUPPORTED:O:u} -. if ${pyqt_ARGS:M${ver}} -. if empty(_PYQT_VERSION) +. for ver in ${_PYQT_SUPPORTED:O:u} +. if ${pyqt_ARGS:M${ver}} +. if empty(_PYQT_VERSION) _PYQT_VERSION= ${ver} -. else +. else IGNORE?= cannot be installed: different PYQT versions specified via pyqt:[${_PYQT_SUPPORTED:S/ //g}] +. endif . endif -. endif -.endfor +. endfor -.if empty(_PYQT_VERSION) +. if empty(_PYQT_VERSION) IGNORE?= USES=pyqt needs a version number (valid values: ${_PYQT_SUPPORTED}) -.endif +. endif PYQT_MAINTAINER= kde@FreeBSD.org @@ -196,7 +196,7 @@ SIPDIR= ${PREFIX}/${SIPDIR_REL} PLIST_SUB+= PYQT_SIPDIR=${SIPDIR_REL} -.if defined(PYQT_DIST) +. if defined(PYQT_DIST) PORTVERSION= ${PYQT_VERSION} MASTER_SITES= ${PYQT_MASTERSITES} PKGNAMEPREFIX= ${PYQT_PY_RELNAME}- @@ -205,11 +205,11 @@ HAS_CONFIGURE= yes QT_NONSTANDARD= yes # Do not add unknown arguments to CONFIGURE_ARGS. -.if ${_PYQT_VERSION} > 4 +. if ${_PYQT_VERSION} > 4 # PyQt5's configure.py generates .pro files and calls qmake to generate the # Makefiles. qmake's Makefiles use INSTALL_ROOT instead of DESTDIR. DESTDIRNAME= INSTALL_ROOT -.endif +. endif PATCHDIR= ${.CURDIR}/../../devel/${PYQT_RELNAME}-core/files QSCIDIR= ${PREFIX}/share/qt${_PYQT_VERSION}/qsci @@ -222,36 +222,36 @@ # One of the things PyQt looks for to determine whether to build the Qt DBus # main loop module (${PYQT_RELNAME}-dbussupport) is whether the dbus/ directory is # present. Only extract it for that port then. -.if ${PORTNAME} != "dbussupport" +. if ${PORTNAME} != "dbussupport" EXTRACT_AFTER_ARGS+= --exclude "${DISTNAME}/dbus" -.endif # ${PORTNAME} != "dbussupport" +. endif # ${PORTNAME} != "dbussupport" -.if !target(do-configure) +. if !target(do-configure) do-configure: cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \ ${PYTHON_CMD} configure.py ${CONFIGURE_ARGS} -.endif # !target(do-configure) -.endif # defined(PYQT_DIST) +. endif # !target(do-configure) +. endif # defined(PYQT_DIST) # Set build and run depends -- we need to prefix them internally with "py-" # else we conflict with the ones defined in bsd.qt.mk with the same name _USE_PYQT_ALL+= ${_USE_PYQT${_PYQT_VERSION}_ONLY} -.for comp in ${_USE_PYQT_ALL:O:u} +. for comp in ${_USE_PYQT_ALL:O:u} _USE_PYQT_ALL_SUFFIXED+= py-${comp} py-${comp}_build py-${comp}_run py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT} py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT} py-${comp}_build_BUILD_DEPENDS?= ${py-${comp}_BUILD_DEPENDS} py-${comp}_run_RUN_DEPENDS?= ${py-${comp}_RUN_DEPENDS} -.endfor +. endfor _USE_PYQT= ${USE_PYQT:O:u} -.for comp in ${_USE_PYQT} -. if ${_USE_PYQT_ALL_SUFFIXED:Mpy-${comp}} +. for comp in ${_USE_PYQT} +. if ${_USE_PYQT_ALL_SUFFIXED:Mpy-${comp}} BUILD_DEPENDS+= ${py-${comp}_BUILD_DEPENDS} RUN_DEPENDS+= ${py-${comp}_RUN_DEPENDS} -. else +. else IGNORE?= cannot be installed: unknown USE_PYQT component ${comp} #' -. endif -.endfor +. endif +. endfor .endif # defined(_INCLUDE_USES_PYQT_MK) Index: Mk/Uses/python.mk =================================================================== --- Mk/Uses/python.mk +++ Mk/Uses/python.mk @@ -228,9 +228,9 @@ _PYTHON_RELPORTDIR= lang/python # Make each individual feature available as _PYTHON_FEATURE_ -.for var in ${USE_PYTHON} +. for var in ${USE_PYTHON} _PYTHON_FEATURE_${var:tu}= yes -.endfor +. endfor # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection @@ -238,81 +238,81 @@ .undef _PYTHON_RUN_DEP .undef _PYTHON_TEST_DEP _PYTHON_ARGS= ${python_ARGS:S/,/ /g} -.if ${_PYTHON_ARGS:Mbuild} +. if ${_PYTHON_ARGS:Mbuild} _PYTHON_BUILD_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nbuild} -.endif -.if ${_PYTHON_ARGS:Mrun} +. endif +. if ${_PYTHON_ARGS:Mrun} _PYTHON_RUN_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nrun} -.endif -.if ${_PYTHON_ARGS:Mtest} +. endif +. if ${_PYTHON_ARGS:Mtest} _PYTHON_TEST_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Ntest} -.endif +. endif # The port does not specify a build, run or test dependency, assume all are # required. -.if !defined(_PYTHON_BUILD_DEP) && !defined(_PYTHON_RUN_DEP) && \ +. if !defined(_PYTHON_BUILD_DEP) && !defined(_PYTHON_RUN_DEP) && \ !defined(_PYTHON_TEST_DEP) && !defined(PYTHON_NO_DEPENDS) _PYTHON_BUILD_DEP= yes _PYTHON_RUN_DEP= yes _PYTHON_TEST_DEP= yes -.endif +. endif # Determine version number of Python to use .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if defined(PYTHON_DEFAULT_VERSION) +. if defined(PYTHON_DEFAULT_VERSION) WARNING+= "PYTHON_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//} instead" -.endif -.if defined(PYTHON2_DEFAULT_VERSION) +. endif +. if defined(PYTHON2_DEFAULT_VERSION) WARNING+= "PYTHON2_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//} instead" -.endif -.if defined(PYTHON3_DEFAULT_VERSION) +. endif +. if defined(PYTHON3_DEFAULT_VERSION) WARNING+= "PYTHON3_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//} instead" -.endif +. endif -.if exists(${LOCALBASE}/bin/python) -.if !defined(_PYTHON_DEFAULT_VERSION) +. if exists(${LOCALBASE}/bin/python) +. if !defined(_PYTHON_DEFAULT_VERSION) _PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \ 'import sys; print("%d.%d" % sys.version_info[:2])' 2> /dev/null \ || ${ECHO_CMD} ${_PYTHON_PORTBRANCH}) | ${TAIL} -1 -.endif +. endif _EXPORTED_VARS+= _PYTHON_DEFAULT_VERSION -.if defined(PYTHON_DEFAULT) && (${PYTHON_DEFAULT} != ${_PYTHON_DEFAULT_VERSION}) +. if defined(PYTHON_DEFAULT) && (${PYTHON_DEFAULT} != ${_PYTHON_DEFAULT_VERSION}) WARNING+= "Your requested default python version ${PYTHON_DEFAULT} is different from the installed default python interpreter version ${_PYTHON_DEFAULT_VERSION}" -.endif +. endif PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION} -.else +. else PYTHON_DEFAULT_VERSION= python${PYTHON_DEFAULT} -.endif # exists(${LOCALBASE}/bin/python) +. endif # exists(${LOCALBASE}/bin/python) # Is only a meta-port version defined? -.if ${PYTHON_DEFAULT_VERSION} == "python2" +. if ${PYTHON_DEFAULT_VERSION} == "python2" PYTHON2_DEFAULT_VERSION?= python${PYTHON2_DEFAULT} -.elif ${PYTHON_DEFAULT_VERSION:R} == "python2" +. elif ${PYTHON_DEFAULT_VERSION:R} == "python2" PYTHON2_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION} -.else +. else PYTHON2_DEFAULT_VERSION?= python${PYTHON2_DEFAULT} -.endif -.if ${PYTHON_DEFAULT_VERSION} == "python3" +. endif +. if ${PYTHON_DEFAULT_VERSION} == "python3" PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT} -.elif ${PYTHON_DEFAULT_VERSION:R} == "python3" +. elif ${PYTHON_DEFAULT_VERSION:R} == "python3" PYTHON3_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION} -.else +. else PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT} -.endif +. endif -.if ${_PYTHON_ARGS} == "2" +. if ${_PYTHON_ARGS} == "2" _PYTHON_ARGS= ${PYTHON2_DEFAULT_VERSION:S/^python//} _WANTS_META_PORT= 2 -.elif ${_PYTHON_ARGS} == "3" +. elif ${_PYTHON_ARGS} == "3" _PYTHON_ARGS= ${PYTHON3_DEFAULT_VERSION:S/^python//} _WANTS_META_PORT= 3 -.endif # ${_PYTHON_ARGS} == "2" +. endif # ${_PYTHON_ARGS} == "2" -.if defined(PYTHON_VERSION) +. if defined(PYTHON_VERSION) # A port/user requests a specific python version for its dependencies via # DEPENDS_ARGS, since it requires the specific python version itself. # Several things can happen now: @@ -329,9 +329,9 @@ # hint. Just warn maintainers, if the versions do not match # (_PYTHON_VERSION_NONSUPPORTED). _PYTHON_VERSION:= ${PYTHON_VERSION:S/^python//} -.else +. else _PYTHON_VERSION:= ${PYTHON_DEFAULT_VERSION:S/^python//} -.endif # defined(PYTHON_VERSION) +. endif # defined(PYTHON_VERSION) # Validate Python version whether it meets the version restriction. _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[0-9])$/\1-\1/} @@ -341,42 +341,42 @@ _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]} .undef _PYTHON_VERSION_NONSUPPORTED -.if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM}) +. if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least -.elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION} > ${_PYTHON_VERSION_MAXIMUM}) +. elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION} > ${_PYTHON_VERSION_MAXIMUM}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most -.endif +. endif # If we have an unsupported version of Python, try another. -.if defined(_PYTHON_VERSION_NONSUPPORTED) -.if defined(PYTHON_VERSION) || defined(PYTHON_CMD) +. if defined(_PYTHON_VERSION_NONSUPPORTED) +. if defined(PYTHON_VERSION) || defined(PYTHON_CMD) _PV:= ${_PYTHON_VERSION} # preserve the specified python version WARNING+= "needs Python ${_PYTHON_VERSION_NONSUPPORTED}. But a port depending on this one specified ${_PV}" -.endif # defined(PYTHON_VERSION) || defined(PYTHON_CMD) +. endif # defined(PYTHON_VERSION) || defined(PYTHON_CMD) .undef _PYTHON_VERSION -.for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} -.if !defined(_PYTHON_VERSION) && \ +. if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \ !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ ${__VER} > ${_PYTHON_VERSION_MAXIMUM})) _PYTHON_VERSION= ${ver} -.endif -.endfor -.if !defined(_PYTHON_VERSION) +. endif +. endfor +. if !defined(_PYTHON_VERSION) IGNORE= needs an unsupported version of Python -.endif -.endif # defined(_PYTHON_VERSION_NONSUPPORTED) +. endif +. endif # defined(_PYTHON_VERSION_NONSUPPORTED) # Pass PYTHON_VERSION down the dependency chain. This ensures that # port A -> B -> C all will use the same python version and do not # try to find a different one, if the passed version fits into # the supported version range. PYTHON_VERSION?= python${_PYTHON_VERSION} -.if !defined(PYTHON_NO_DEPENDS) +. if !defined(PYTHON_NO_DEPENDS) DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} -.endif +. endif # NOTE: # @@ -396,9 +396,9 @@ PYTHON_ABIVER= # empty PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} # Protect partial checkouts from Mk/Scripts/functions.sh:export_ports_env(). -.if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) +. if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) .include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version" -.endif +. endif # Create a 4 integer version string, prefixing 0 to the last token if # it's a single character. Only use the the first 3 tokens of # PORTVERSION to support pre-release versions (rc3, alpha4, etc) of @@ -407,14 +407,14 @@ # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} -.if exists(${PYTHON_CMD}-config) && ${PYTHON_VER} != 2.7 +. if exists(${PYTHON_CMD}-config) && ${PYTHON_VER} != 2.7 PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags -.endif +. endif -.if !defined(PYTHONBASE) +. if !defined(PYTHONBASE) PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ 2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1 -.endif +. endif _EXPORTED_VARS+= PYTHONBASE PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER} @@ -444,32 +444,32 @@ # - it uses USE_PYTHON=distutils # -.if defined(_PYTHON_FEATURE_CONCURRENT) +. if defined(_PYTHON_FEATURE_CONCURRENT) _USES_POST+= uniquefiles:dirs -.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} +. if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} UNIQUE_DEFAULT_LINKS= yes -.else +. else UNIQUE_DEFAULT_LINKS= no -.endif +. endif UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} UNIQUE_SUFFIX= -${PYTHON_VER} -.if defined(_PYTHON_FEATURE_AUTOPLIST) +. if defined(_PYTHON_FEATURE_AUTOPLIST) UNIQUE_FIND_SUFFIX_FILES= \ ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} | \ ${GREP} -e '^bin/.*$$\|^sbin/.*$$\|^libexec/.*$$' -.else +. else UNIQUE_FIND_SUFFIX_FILES= \ ${GREP} -he '^bin/.*$$\|^sbin/.*$$\|^libexec/.*$$' ${TMPPLIST} 2>/dev/null -.endif -.endif # defined(_PYTHON_FEATURE_CONCURRENT) +. endif +. endif # defined(_PYTHON_FEATURE_CONCURRENT) _CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} -.if defined(_PYTHON_FEATURE_DISTUTILS) && \ +. if defined(_PYTHON_FEATURE_DISTUTILS) && \ ${_CURRENTPORT:S/${PYTHON_SUFFIX}$//} != ${PYTHON_PKGNAMEPREFIX}setuptools BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:devel/py-setuptools${PYTHON_SUFFIX} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:devel/py-setuptools${PYTHON_SUFFIX} -.endif +. endif # distutils support PYSETUP?= setup.py @@ -480,12 +480,12 @@ PYDISTUTILS_CONFIGUREARGS?= # empty PYDISTUTILS_BUILDARGS?= # empty PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} -.if defined(_PYTHON_FEATURE_DISTUTILS) -. if !defined(PYDISTUTILS_INSTALLNOSINGLE) +. if defined(_PYTHON_FEATURE_DISTUTILS) +. if !defined(PYDISTUTILS_INSTALLNOSINGLE) PYDISTUTILS_INSTALLARGS+= --single-version-externally-managed -. endif +. endif PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR} -.endif +. endif PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ ${PYDISTUTILS_INSTALLARGS} @@ -494,22 +494,22 @@ PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -.if !defined(_PYTHON_FEATURE_NOEGGINFO) && \ +. if !defined(_PYTHON_FEATURE_NOEGGINFO) && \ !defined(_PYTHON_FEATURE_AUTOPLIST) && \ defined(_PYTHON_FEATURE_DISTUTILS) && \ defined(PYTHON_REL) _USES_stage+= 933:add-plist-egginfo add-plist-egginfo: -. for egginfo in ${PYDISTUTILS_EGGINFO} +. for egginfo in ${PYDISTUTILS_EGGINFO} if [ -d "${PYDISTUTILS_EGGINFODIR}/${egginfo}" ]; then \ ${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \ ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PREFIX}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; \ done; \ fi; -. endfor -.endif +. endfor +. endif -.if defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} @@ -521,17 +521,17 @@ -e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} -.else -.if ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) +. else +. if ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) # When Python version is 3.2+ we rewrite all the filenames # of TMPPLIST that end with .py[co], so that they conform # to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' -.if ${PYTHON_REL} < 3500 +. if ${PYTHON_REL} < 3500 PYOEXTENSION= pyo -.else +. else PYOEXTENSION= opt-1.pyc -.endif +. endif _USES_stage+= 935:add-plist-python add-plist-python: @${AWK} '\ @@ -543,8 +543,8 @@ pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="${PYOEXTENSION}" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} -.endif # ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) -.endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) +. endif # ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) +. endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) # Fix for programs that build python from a GNU auto* environment CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" @@ -559,29 +559,29 @@ PYNUMPY= ${PYTHON_SITELIBDIR}/numpy/core/numeric.py:math/py-numpy # dependencies -.if defined(_PYTHON_BUILD_DEP) +. if defined(_PYTHON_BUILD_DEP) BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) +. if defined(_WANTS_META_PORT) BUILD_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif -.if defined(_PYTHON_RUN_DEP) +. endif +. endif +. if defined(_PYTHON_RUN_DEP) RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) +. if defined(_WANTS_META_PORT) RUN_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif -.if defined(_PYTHON_TEST_DEP) +. endif +. endif +. if defined(_PYTHON_TEST_DEP) TEST_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -.if defined(_WANTS_META_PORT) +. if defined(_WANTS_META_PORT) TEST_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT} -.endif -.endif +. endif +. endif # set $PREFIX as Python's one -.if defined(_PYTHON_FEATURE_PYTHONPREFIX) +. if defined(_PYTHON_FEATURE_PYTHONPREFIX) PREFIX= ${PYTHONBASE} -.endif +. endif # Substitutions for pkg-plist # Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the @@ -604,23 +604,23 @@ PYDISTUTILS_BUILD_TARGET?= build PYDISTUTILS_INSTALL_TARGET?= install -.if defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_DISTUTILS) LDSHARED?= ${CC} -shared MAKE_ENV+= LDSHARED="${LDSHARED}" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= -.if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE) +. if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE) do-configure: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) -.endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) -.endif -.endif # defined(_PYTHON_FEATURE_DISTUTILS) +. endif +. endif # defined(_PYTHON_FEATURE_DISTUTILS) .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) Index: Mk/Uses/qmail.mk =================================================================== --- Mk/Uses/qmail.mk +++ Mk/Uses/qmail.mk @@ -20,44 +20,44 @@ QMAIL_PREFIX?= /var/qmail -.if empty(qmail_ARGS) +. if empty(qmail_ARGS) qmail_ARGS= both -.endif +. endif -.if ${qmail_ARGS} == "build" +. if ${qmail_ARGS} == "build" BUILD_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "run" +. elif ${qmail_ARGS} == "run" RUN_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "both" +. elif ${qmail_ARGS} == "both" BUILD_DEPENDS+= ${_QMAIL_DEPENDS} RUN_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "vars" -.else +. elif ${qmail_ARGS} == "vars" +. else IGNORE= USES=qmail - invalid args: [${qmail_ARGS}] specified -.endif +. endif -.if ${qmail_ARGS} != "vars" +. if ${qmail_ARGS} != "vars" _QMAIL_VALID_SLAVEPORTS= ldap mysql spamcontrol tls -. if defined(QMAIL_SLAVEPORT) -. for slave in ${_QMAIL_VALID_SLAVEPORTS} -. if ${QMAIL_SLAVEPORT:tl} == ${slave} +. if defined(QMAIL_SLAVEPORT) +. for slave in ${_QMAIL_VALID_SLAVEPORTS} +. if ${QMAIL_SLAVEPORT:tl} == ${slave} _QMAIL_SLAVEPORT_OKAY= true -. endif -. endfor +. endif +. endfor -. if !defined(_QMAIL_SLAVEPORT_OKAY) +. if !defined(_QMAIL_SLAVEPORT_OKAY) IGNORE= Invalid QMAIL_SLAVEPORT value. Only one can be set, valid values are: ${_QMAIL_VALID_SLAVEPORTS} +. endif . endif -. endif -. if defined(QMAIL_SLAVEPORT) +. if defined(QMAIL_SLAVEPORT) _QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:mail/qmail-${QMAIL_SLAVEPORT:tl} -. else +. else _QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:mail/qmail -. endif +. endif -.endif +. endif .endif Index: Mk/Uses/qmake.mk =================================================================== --- Mk/Uses/qmake.mk +++ Mk/Uses/qmake.mk @@ -30,24 +30,24 @@ # _QT_VERSION is defined in bsd.qt.mk, only if a correct Qt version was selected # via USE_QT*. -.if empty(_QT_VERSION) +. if empty(_QT_VERSION) IGNORE= 'USES+= qmake' must be accompanied with 'USE_QT[${_QT_SUPPORTED:S/ //g}]= #' -.endif +. endif # _env is a private argument used only by bsd.qt.mk to get variables and custom # targets (currently, only qmake-configure), without qmake being added to the # configure stage. _VALID_ARGS= norecursive outsource _env -.for arg in ${qmake_ARGS} -. if empty(_VALID_ARGS:M${arg}) +. for arg in ${qmake_ARGS} +. if empty(_VALID_ARGS:M${arg}) IGNORE= Incorrect 'USES+= qmake' usage: argument '${arg}' is not recognized -. endif -.endfor +. endif +. endfor -.if ! ${qmake_ARGS:M_env} +. if ! ${qmake_ARGS:M_env} USE_QT${_QT_VERSION:R:R}+= qmake_build -.endif +. endif # QMAKESPEC belongs to bsd.qt.mk. QMAKE_ENV?= ${CONFIGURE_ENV} @@ -65,39 +65,39 @@ QMAKE_CXXFLAGS_RELEASE="" \ PREFIX="${PREFIX}" -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) QMAKE_ARGS+= CONFIG+="debug" \ CONFIG-="release" -.else +. else QMAKE_ARGS+= CONFIG+="release" \ CONFIG-="debug separate_debug_info" -.endif # defined(WITH_DEBUG) +. endif # defined(WITH_DEBUG) # We set -recursive by default to keep qmake from running in the build stage. -.if ! ${qmake_ARGS:Mnorecursive} +. if ! ${qmake_ARGS:Mnorecursive} QMAKE_ARGS+= -recursive -.endif +. endif -.if defined(QMAKE_VERBOSE) +. if defined(QMAKE_VERBOSE) QMAKE_ARGS+= -d -.endif +. endif # _QMAKE_WRKSRC (and _QMAKE, below) are needed to abstract the qmake target and # use it for both qtbase and USES=qmake ports. They are private, not supposed to # be used anywhere else. _QMAKE_WRKSRC?= ${CONFIGURE_WRKSRC} -.if ${qmake_ARGS:Moutsource} +. if ${qmake_ARGS:Moutsource} CONFIGURE_WRKSRC= ${WRKDIR}/.build BUILD_WRKSRC= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC= ${BUILD_WRKSRC} QMAKE_SOURCE_PATH?= ${WRKSRC} -.else +. else QMAKE_SOURCE_PATH?= # empty -.endif +. endif -.if ! ${qmake_ARGS:M_env} +. if ! ${qmake_ARGS:M_env} DESTDIRNAME= INSTALL_ROOT -.endif +. endif # Define a custom target to make it usable by bsd.qt.mk for internal Qt # configuration. @@ -106,8 +106,8 @@ @cd ${_QMAKE_WRKSRC} && \ ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} ${QMAKE_SOURCE_PATH} -.if !target(do-configure) && ! ${qmake_ARGS:M_env} +. if !target(do-configure) && ! ${qmake_ARGS:M_env} _USES_configure+= 450:qmake-configure -.endif +. endif .endif # !defined(_INCLUDE_USES_QMAKE_MK) Index: Mk/Uses/readline.mk =================================================================== --- Mk/Uses/readline.mk +++ Mk/Uses/readline.mk @@ -11,14 +11,14 @@ .if !defined(_INCLUDE_USES_READLINE_MK) _INCLUDE_USES_READLINE_MK= yes -.if !exists(/usr/lib/libreadline.so) +. if !exists(/usr/lib/libreadline.so) readline_ARGS= port -.endif +. endif -.if ${readline_ARGS} == port +. if ${readline_ARGS} == port LIB_DEPENDS+= libreadline.so.6:devel/readline CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -.endif +. endif .endif Index: Mk/Uses/scons.mk =================================================================== --- Mk/Uses/scons.mk +++ Mk/Uses/scons.mk @@ -10,9 +10,9 @@ .if !defined(_INCLUDE_USES_SCONS_MK) _INCLUDE_USES_SCONS_MK= yes -.if !empty(scons_ARGS) +. if !empty(scons_ARGS) IGNORE= Incorrect 'USES+= scons:${scons_ARGS}' scons takes no arguments -.endif +. endif MAKEFILE= # MAKE_FLAGS= # Index: Mk/Uses/shared-mime-info.mk =================================================================== --- Mk/Uses/shared-mime-info.mk +++ Mk/Uses/shared-mime-info.mk @@ -11,9 +11,9 @@ .if !defined(_INCLUDE_USES_SHARED_MIME_INFO_MK) _INCLUDE_USES_SHARED_MIME_INFO_MK= yes -.if !empty(shared-mime-info_ARGS) +. if !empty(shared-mime-info_ARGS) IGNORE= USES=shared-mime-info does not require args -.endif +. endif BUILD_DEPENDS+= update-mime-database:misc/shared-mime-info RUN_DEPENDS+= update-mime-database:misc/shared-mime-info Index: Mk/Uses/shebangfix.mk =================================================================== --- Mk/Uses/shebangfix.mk +++ Mk/Uses/shebangfix.mk @@ -36,10 +36,10 @@ SHEBANG_LANG+= bash java ksh perl php python ruby tcl tk -.if ${USES:Mlua*} +. if ${USES:Mlua*} SHEBANG_LANG+= lua lua_CMD?= ${LOCALBASE}/bin/${LUA_CMD} -.endif +. endif tcl_OLD_CMD+= /usr/bin/tclsh tcl_CMD?= ${TCLSH} @@ -47,31 +47,31 @@ tk_OLD_CMD+= /usr/bin/wish tk_CMD?= ${WISH} -.if ${USES:Mpython*} +. if ${USES:Mpython*} python_CMD?= ${PYTHON_CMD} -.endif +. endif # Replace the same patterns for all langs and setup a default, that may have # been set already above with ?=. -.for lang in ${SHEBANG_LANG} +. for lang in ${SHEBANG_LANG} ${lang}_CMD?= ${LOCALBASE}/bin/${lang} ${lang}_OLD_CMD+= "/usr/bin/env ${lang}" ${lang}_OLD_CMD+= /bin/${lang} ${lang}_OLD_CMD+= /usr/bin/${lang} -.endfor +. endfor -.for lang in ${SHEBANG_LANG} -. if !defined(${lang}_CMD) +. for lang in ${SHEBANG_LANG} +. if !defined(${lang}_CMD) IGNORE+= missing definition for ${lang}_CMD -. endif -. if !defined(${lang}_OLD_CMD) +. endif +. if !defined(${lang}_OLD_CMD) IGNORE+= missing definition for ${lang}_OLD_CMD -. endif -. for old_cmd in ${${lang}_OLD_CMD} +. endif +. for old_cmd in ${${lang}_OLD_CMD} _SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}\([[:space:]]\)|\#!${${lang}_CMD}\1|" _SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}$$|\#!${${lang}_CMD}|" +. endfor . endfor -.endfor _USES_patch+= 210:fix-shebang fix-shebang: Index: Mk/Uses/sqlite.mk =================================================================== --- Mk/Uses/sqlite.mk +++ Mk/Uses/sqlite.mk @@ -8,17 +8,17 @@ .if !defined(_INCLUDE_USES_SQLITE_MK) _INCLUDE_USES_SQLITE_MK= yes -.if !empty(sqlite_ARGS) +. if !empty(sqlite_ARGS) SQLITE_VER= ${sqlite_ARGS} -.endif +. endif SQLITE_VER?= 3 -.if ${SQLITE_VER} == 3 +. if ${SQLITE_VER} == 3 LIB_DEPENDS+= libsqlite3.so:databases/sqlite${SQLITE_VER} -.elif ${SQLITE_VER} == 2 +. elif ${SQLITE_VER} == 2 LIB_DEPENDS+= libsqlite.so:databases/sqlite${SQLITE_VER} -.else +. else IGNORE= cannot install: unknown SQLite version: ${SQLITE_VER} -.endif +. endif .endif Index: Mk/Uses/tar.mk =================================================================== --- Mk/Uses/tar.mk +++ Mk/Uses/tar.mk @@ -10,25 +10,25 @@ .if !defined(_INCLUDE_USES_TAR_MK) _INCLUDE_USES_TAR_MK= yes -.if ${tar_ARGS} == xz +. if ${tar_ARGS} == xz EXTRACT_SUFX?= .tar.xz -.elif ${tar_ARGS} == lzma +. elif ${tar_ARGS} == lzma EXTRACT_SUFX?= .tar.lzma -.elif ${tar_ARGS} == txz +. elif ${tar_ARGS} == txz EXTRACT_SUFX?= .txz -.elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2 +. elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2 EXTRACT_SUFX?= .tar.bz2 -.elif ${tar_ARGS} == tgz +. elif ${tar_ARGS} == tgz EXTRACT_SUFX?= .tgz -.elif ${tar_ARGS} == tbz +. elif ${tar_ARGS} == tbz EXTRACT_SUFX?= .tbz -.elif ${tar_ARGS} == tbz2 +. elif ${tar_ARGS} == tbz2 EXTRACT_SUFX?= .tbz2 -.elif ${tar_ARGS} == Z +. elif ${tar_ARGS} == Z EXTRACT_SUFX?= .tar.Z -.elif empty(tar_ARGS) +. elif empty(tar_ARGS) EXTRACT_SUFX?= .tar -.else +. else IGNORE= Incorrect 'USES+=tar:${tar_ARGS}' -.endif +. endif .endif Index: Mk/Uses/tcl.mk =================================================================== --- Mk/Uses/tcl.mk +++ Mk/Uses/tcl.mk @@ -59,9 +59,9 @@ # MAINTAINER: tcltk@FreeBSD.org .if ${USES:Mtk} || ${USES:Mtk\:*} -.if !defined(_TCLTK_PORT) +. if !defined(_TCLTK_PORT) _TCLTK_IGNORE= yes -.endif +. endif .endif .if !defined(_INCLUDE_USES_TCL_MK) && !defined(_TCLTK_IGNORE) @@ -80,9 +80,9 @@ # .include "${PORTSDIR}/Mk/bsd.default-versions.mk" _TCLTK_DEFAULT_VERSION= ${TCLTK_DEFAULT:S/.//} -.if ! ${_TCLTK_VALID_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} +. if ! ${_TCLTK_VALID_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} IGNORE= Invalid tcltk version ${TCLTK_DEFAULT} -.endif +. endif # # _TCLTK_PORT tells us whether we're depending on Tcl or Tk. When using @@ -93,62 +93,62 @@ # # Parse a ver+ argument. # -.if ${tcl_ARGS:M*+} +. if ${tcl_ARGS:M*+} _TCLTK_MIN_VERSION:= ${tcl_ARGS:M*+:S/+//} _TCLTK_WANTED_VERSIONS:=${_TCLTK_DEFAULT_VERSION} -.endif +. endif # # Parse one or more ver arguments. # -.if ${tcl_ARGS:M8[4-6]} +. if ${tcl_ARGS:M8[4-6]} _TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[4-6]} -.endif +. endif # # It makes little sense to specify both the wrapper and a specific version. # -.if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) +. if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) IGNORE= USES=${_TCLTK_PORT}: it is not possible to specify both a version and the wrapper: ${tcl_ARGS} -.endif +. endif # # If no version was specified with any of the ver or ver+ arguments, set the # default version. # -.if !defined(_TCLTK_WANTED_VERSIONS) +. if !defined(_TCLTK_WANTED_VERSIONS) _TCLTK_WANTED_VERSIONS= ${_TCLTK_DEFAULT_VERSION} -.endif +. endif # # Resolve minimum versions (ver+). Append anything greater or equal than the # specified minimum version to the list of wanted versions. # -.if defined(_TCLTK_MIN_VERSION) -. for _v in ${_TCLTK_VALID_VERSIONS} -. if ${_TCLTK_MIN_VERSION} <= ${_v} +. if defined(_TCLTK_MIN_VERSION) +. for _v in ${_TCLTK_VALID_VERSIONS} +. if ${_TCLTK_MIN_VERSION} <= ${_v} _TCLTK_WANTED_VERSIONS+=${_v} -. endif -. endfor -.endif +. endif +. endfor +. endif # # Right now we have built a list of potential versions that we may depend on. # Let's sort them and remove any duplicates. We then locate the highest one # already installed, if any. # -.for _v in ${_TCLTK_WANTED_VERSIONS:O:u} +. for _v in ${_TCLTK_WANTED_VERSIONS:O:u} _TCLTK_HIGHEST_VERSION:=${_v} -. if exists(${LOCALBASE}/lib/lib${_TCLTK_PORT}${_v}.so) +. if exists(${LOCALBASE}/lib/lib${_TCLTK_PORT}${_v}.so) _TCLTK_WANTED_VERSION:= ${_v} -. endif -.endfor +. endif +. endfor # # If we couldn't find any wanted version installed, depend on the highest one. -.if !defined(_TCLTK_WANTED_VERSION) +. if !defined(_TCLTK_WANTED_VERSION) _TCLTK_WANTED_VERSION:= ${_TCLTK_HIGHEST_VERSION} -.endif +. endif # # Exported variables @@ -159,13 +159,13 @@ TCL_LIBDIR:= ${LOCALBASE}/lib/tcl${TCL_VER} TCL_INCLUDEDIR:=${LOCALBASE}/include/tcl${TCL_VER} -.if ${_TCLTK_PORT} == "tk" +. if ${_TCLTK_PORT} == "tk" TK_VER:= ${_TCLTK_WANTED_VERSION:S/8/8./} TK_SHLIB_VER:= ${_TCLTK_WANTED_VERSION} WISH:= ${LOCALBASE}/bin/wish${TCL_VER} TK_LIBDIR:= ${LOCALBASE}/lib/tk${TK_VER} TK_INCLUDEDIR:= ${LOCALBASE}/include/tk${TK_VER} -.endif +. endif # # Dependencies @@ -175,13 +175,13 @@ _TCLTK_LIB_DEPENDS= # Construct the correct dependency lines (wrapper) -.if ${tcl_ARGS:Mwrapper} -. if ${_TCLTK_PORT} == "tcl" +. if ${tcl_ARGS:Mwrapper} +. if ${_TCLTK_PORT} == "tcl" _TCLTK_WRAPPER_PORT= tclsh:lang/tcl-wrapper -. elif ${_TCLTK_PORT} == "tk" +. elif ${_TCLTK_PORT} == "tk" _TCLTK_WRAPPER_PORT= wish:x11-toolkits/tk-wrapper +. endif . endif -.endif # Construct the correct dependency lines (Tcl/Tk) . if ${_TCLTK_PORT} == "tcl" @@ -190,31 +190,31 @@ . elif ${_TCLTK_PORT} == "tk" _TCLTK_EXE_LINE= wish${TK_VER}:x11-toolkits/tk${_TCLTK_WANTED_VERSION} _TCLTK_LIB_LINE= libtk${TK_SHLIB_VER}.so:x11-toolkits/tk${_TCLTK_WANTED_VERSION} -.endif +. endif -.if ${tcl_ARGS:Mbuild} +. if ${tcl_ARGS:Mbuild} BUILD_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} -.elif ${tcl_ARGS:Mrun} +. elif ${tcl_ARGS:Mrun} RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} -.else +. else RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} LIB_DEPENDS+= ${_TCLTK_LIB_LINE} -.endif +. endif # Setup TEA stuff -.if ${tcl_ARGS:Mtea} +. if ${tcl_ARGS:Mtea} GNU_CONFIGURE= yes TCL_PKG?= ${PORTNAME:C/^tcl(-?)//:C/(-?)tcl\$//}${PORTVERSION} PLIST_SUB+= TCL_PKG=${TCL_PKG} CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-tcl=${TCL_LIBDIR} \ --with-tclinclude=${TCL_INCLUDEDIR} -. if ${_TCLTK_PORT} == "tk" +. if ${_TCLTK_PORT} == "tk" CONFIGURE_ARGS+=--with-tk=${TK_LIBDIR} --with-tkinclude=${TK_INCLUDEDIR} +. endif . endif -.endif .endif # defined(_INCLUDE_USES_TCL_MK) Index: Mk/Uses/terminfo.mk =================================================================== --- Mk/Uses/terminfo.mk +++ Mk/Uses/terminfo.mk @@ -9,9 +9,9 @@ .if !defined(_INCLUDE_USES_TERMINFO_MK) _INCLUDE_USES_TERMINFO_MK= yes -.if !empty(terminfo_ARGS) +. if !empty(terminfo_ARGS) IGNORE= USES=terminfo does not require args -.endif +. endif PLIST_FILES+= @terminfo Index: Mk/Uses/twisted.mk =================================================================== --- Mk/Uses/twisted.mk +++ Mk/Uses/twisted.mk @@ -25,12 +25,12 @@ _INCLUDE_USES_TWISTED_MK= yes # If neither build nor run are specified add both. -.if ${twisted_ARGS:Mbuild} || empty(twisted_ARGS:Mrun) +. if ${twisted_ARGS:Mbuild} || empty(twisted_ARGS:Mrun) BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:devel/py-twistedCore -.endif -.if ${twisted_ARGS:Mrun} || empty(twisted_ARGS:Mbuild) +. endif +. if ${twisted_ARGS:Mrun} || empty(twisted_ARGS:Mbuild) RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:devel/py-twistedCore -.endif +. endif _TWISTED_COMPONENTS= conch flow lore mail names news pair runner web web2 words @@ -46,17 +46,17 @@ web_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:www/py-twistedWeb words_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:net-im/py-twistedWords -.for component in ${twisted_ARGS:Nbuild:Nrun} -. if ${_TWISTED_COMPONENTS:M${component}}=="" +. for component in ${twisted_ARGS:Nbuild:Nrun} +. if ${_TWISTED_COMPONENTS:M${component}}=="" IGNORE= cannot install unknown twisted component ${component} -. endif +. endif # If neither build nor run are specified add both. -. if ${twisted_ARGS:Mbuild} || empty(twisted_ARGS:Mrun) +. if ${twisted_ARGS:Mbuild} || empty(twisted_ARGS:Mrun) BUILD_DEPENDS+= ${${component}_DEPENDS} -. endif -. if ${twisted_ARGS:Mrun} || empty(twisted_ARGS:Mbuild) +. endif +. if ${twisted_ARGS:Mrun} || empty(twisted_ARGS:Mbuild) RUN_DEPENDS+= ${${component}_DEPENDS} -. endif -.endfor +. endif +. endfor .endif # !defined(_INCLUDE_USES_TWISTED_MK) Index: Mk/Uses/uidfix.mk =================================================================== --- Mk/Uses/uidfix.mk +++ Mk/Uses/uidfix.mk @@ -10,10 +10,10 @@ .if !defined(_INCLUDE_USES_UIDFIX_MK) _INCLUDE_USES_UIDFIX_MK= yes -.if !defined(GID) +. if !defined(GID) GID!= id -g -.endif -.if ${UID} != 0 +. endif +. if ${UID} != 0 MAKE_ENV+= BINOWN=${UID} SHAREOWN=${UID} CONFOWN=${UID} LIBOWN=${UID} MAKE_ENV+= BINGRP=${GID} SHAREGRP=${GID} CONFGRP=${GID} LIBGRP=${GID} MAKE_ENV+= INCSOWN=${UID} INCSGRP=${GID} @@ -27,5 +27,5 @@ WWWGRP= ${GID} INCSOWN= ${UID} INCSGRP= ${GID} -.endif +. endif .endif Index: Mk/Uses/uniquefiles.mk =================================================================== --- Mk/Uses/uniquefiles.mk +++ Mk/Uses/uniquefiles.mk @@ -69,13 +69,13 @@ UNIQUE_PREFIX_FILES?= # empty UNIQUE_SUFFIX_FILES?= # empty -.if ${uniquefiles_ARGS:Mdirs} +. if ${uniquefiles_ARGS:Mdirs} DOCSDIR= ${PREFIX}/share/doc/${UNIQUE_PREFIX}${PORTNAME} EXAMPLESDIR= ${PREFIX}/share/examples/${UNIQUE_PREFIX}${PORTNAME} DATADIR= ${PREFIX}/share/${UNIQUE_PREFIX}${PORTNAME} WWWDIR= ${PREFIX}/www/${UNIQUE_PREFIX}${PORTNAME} ETCDIR= ${PREFIX}/etc/${UNIQUE_PREFIX}${PORTNAME} -.endif +. endif UNIQUE_DEFAULT_LINKS?= no UNIQUE_FIND_PREFIX_FILES?= # empty @@ -89,24 +89,24 @@ _UNIQUEPKGLIST= ${WRKDIR}/.PLIST.uniquefiles -.if ${UNIQUE_DEFAULT_LINKS} == yes +. if ${UNIQUE_DEFAULT_LINKS} == yes _DO_CONDITIONAL_SYMLINK= \ if [ ! -e ${STAGEDIR}${PREFIX}/$${fname} -a ! -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ ${ECHO_MSG} "Link: @$${fname} --> $${newf}"; \ ${LN} -s ${PREFIX}/$${newf} ${STAGEDIR}${PREFIX}/$${fname}; \ ${ECHO_CMD} LINKED:$${newf}:$${fname} >> ${_UNIQUEPKGLIST}; \ fi -.else +. else # We are not symlinking the renamed binary. _DO_CONDITIONAL_SYMLINK= ${DO_NADA} -.endif +. endif _USES_stage+= 775:move-uniquefiles move-uniquefiles: -.if ${UNIQUE_PREFIX_FILES} || ${UNIQUE_FIND_PREFIX_FILES} +. if ${UNIQUE_PREFIX_FILES} || ${UNIQUE_FIND_PREFIX_FILES} @${ECHO_MSG} "===> Creating unique files: Move files needing PREFIX"; -.endif -.for entry in ${UNIQUE_PREFIX_FILES} +. endif +. for entry in ${UNIQUE_PREFIX_FILES} @fname=${entry}; \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/${UNIQUE_PREFIX}$${fname##*/} ; \ @@ -118,8 +118,8 @@ ${ECHO_MSG} "Makefile error: UNIQUE (prefix): $${fname} not found"; \ ${FALSE}; \ fi; -.endfor -.if ${UNIQUE_FIND_PREFIX_FILES} +. endfor +. if ${UNIQUE_FIND_PREFIX_FILES} @for fname in `${UNIQUE_FIND_PREFIX_FILES}`; do \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/${UNIQUE_PREFIX}$${fname##*/} ; \ @@ -132,12 +132,12 @@ ${FALSE}; \ fi; \ done; -.endif +. endif -.if ${UNIQUE_SUFFIX_FILES} || ${UNIQUE_FIND_SUFFIX_FILES} +. if ${UNIQUE_SUFFIX_FILES} || ${UNIQUE_FIND_SUFFIX_FILES} @${ECHO_MSG} "===> Creating unique files: Move files needing SUFFIX"; -.endif -.for entry in ${UNIQUE_SUFFIX_FILES} +. endif +. for entry in ${UNIQUE_SUFFIX_FILES} @fname=${entry}; \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/$${fname##*/}${UNIQUE_SUFFIX}; \ @@ -149,8 +149,8 @@ ${ECHO_MSG} "Makefile error: UNIQUE (suffix): $${fname} not found"; \ ${FALSE}; \ fi; -.endfor -.if ${UNIQUE_FIND_SUFFIX_FILES} +. endfor +. if ${UNIQUE_FIND_SUFFIX_FILES} @for fname in `${UNIQUE_FIND_SUFFIX_FILES}`; do \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/$${fname##*/}${UNIQUE_SUFFIX}; \ @@ -163,7 +163,7 @@ ${FALSE}; \ fi; \ done; -.endif +. endif # Using .if exists(${_UNIQUEPKGPLIST} below instead of the sh test # does not work in poudriere. It works fine on the CLI, though... Index: Mk/Uses/waf.mk =================================================================== --- Mk/Uses/waf.mk +++ Mk/Uses/waf.mk @@ -17,14 +17,14 @@ .if !defined(_INCLUDE_USES_WAF_MK) _INCLUDE_USES_WAF_MK= yes -.if !empty(waf_ARGS) +. if !empty(waf_ARGS) IGNORE= Incorrect 'USES+= waf:${waf_ARGS}' waf takes no arguments -.endif +. endif -.if !${USES:Mpython*} +. if !${USES:Mpython*} python_ARGS= 2,build .include "${USESDIR}/python.mk" -.endif +. endif MAKEFILE= # MAKE_FLAGS= # Index: Mk/Uses/webplugin.mk =================================================================== --- Mk/Uses/webplugin.mk +++ Mk/Uses/webplugin.mk @@ -114,41 +114,41 @@ ${_WEBPLUGIN_APPS_ALL_NATIVE} _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL} -.if ${webplugin_ARGS} == all || empty(webplugin_ARGS) +. if ${webplugin_ARGS} == all || empty(webplugin_ARGS) _WEBPLUGIN_PATTERN= * -.elif ${webplugin_ARGS} == native +. elif ${webplugin_ARGS} == native _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_NATIVE} -.elif ${webplugin_ARGS} == linux +. elif ${webplugin_ARGS} == linux _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_LINUX} -.else +. else _WEBPLUGIN_PATTERN= ${webplugin_ARGS} -.endif +. endif -.if !defined(WEBPLUGIN_FILES) +. if !defined(WEBPLUGIN_FILES) IGNORE= Cannot be installed: WEBPLUGIN_FILES is empty. Please, add plug-in files to it -.endif +. endif -.for _TEMP_APP__ in ${_WEBPLUGIN_APPS_ALL} +. for _TEMP_APP__ in ${_WEBPLUGIN_APPS_ALL} _TEMP_APP_=${_TEMP_APP__} _TEMP_FLAG_=0 -. for _TEMP_USE__ in ${USE_webplugin} +. for _TEMP_USE__ in ${USE_webplugin} _TEMP_USE_=${_TEMP_USE__} -. if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!} || \ +. if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!} || \ ( ${_TEMP_APP_:Mlinux-*} && ${_TEMP_USE_:Mlinux} ) || \ ( ${_TEMP_APP_:Nlinux-*} && ${_TEMP_USE_:Mnative} ) _TEMP_FLAG_=1 -. endif -. endfor -. if ${_TEMP_FLAG_} +. endif +. endfor +. if ${_TEMP_FLAG_} USE_WEBPLUGIN_EXP+= ${_TEMP_APP__} -. endif -.endfor +. endif +. endfor -.for p in ${_WEBPLUGIN_PATTERN} +. for p in ${_WEBPLUGIN_PATTERN} _WEBPLUGIN_MATCHED+= ${_WEBPLUGIN_TEST:M${p}} -.endfor +. endfor _WEBPLUGIN_LIBDIR= ${LOCALBASE}/lib/browser_plugins _WEBPLUGIN_SLDIR= ${_WEBPLUGIN_LIBDIR}/symlinks @@ -161,18 +161,18 @@ WEBPLUGIN_DIR?= ${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME} PLIST_SUB+= WEBPLUGIN_DIR="${WEBPLUGIN_DIR:S,^${PREFIX}/,,}" -.for d in ${_WEBPLUGIN_LINKFARMS} -.for l in ${WEBPLUGIN_FILES} +. for d in ${_WEBPLUGIN_LINKFARMS} +. for l in ${WEBPLUGIN_FILES} PLIST_FILES+= ${d}/${l} -.endfor -.endfor +. endfor +. endfor _USES_install+= 600:webplugin-post-install webplugin-post-install: -.for d in ${_WEBPLUGIN_LINKFARMS} +. for d in ${_WEBPLUGIN_LINKFARMS} ${MKDIR} ${STAGEDIR}${d} -.for l in ${WEBPLUGIN_FILES} +. for l in ${WEBPLUGIN_FILES} ${LN} -sf ${l:S,^,${WEBPLUGIN_DIR}/,} ${STAGEDIR}${d}/ -.endfor -.endfor +. endfor +. endfor .endif Index: Mk/Uses/xfce.mk =================================================================== --- Mk/Uses/xfce.mk +++ Mk/Uses/xfce.mk @@ -56,53 +56,53 @@ xfconf_LIB_DEPENDS= libxfconf-0.so:x11/xfce4-conf xfconf_USE_XFCE_REQ= libutil -.if defined(USE_XFCE) +. if defined(USE_XFCE) # First, expand all USE_XFCE_REQ recursively. -.for comp in ${_USE_XFCE_ALL} -. for subcomp in ${${comp}_USE_XFCE_REQ} +. for comp in ${_USE_XFCE_ALL} +. for subcomp in ${${comp}_USE_XFCE_REQ} ${comp}_USE_XFCE_REQ+=${${subcomp}_USE_XFCE_REQ} -. endfor -.endfor +. endfor +. endfor # Then, use already expanded USE_XFCE_REQ to expand USE_XFCE. -.for comp in ${USE_XFCE} -. if ${_USE_XFCE_ALL:M${comp}} == "" +. for comp in ${USE_XFCE} +. if ${_USE_XFCE_ALL:M${comp}} == "" IGNORE= cannot install: Unknown component ${comp} -. endif +. endif _USE_XFCE+= ${${comp}_USE_XFCE_REQ} ${comp} -.endfor +. endfor # Remove duplicate components USE_XFCE= ${_USE_XFCE:O:u} -.for comp in ${USE_XFCE} +. for comp in ${USE_XFCE} -. if ${xfce_ARGS} == gtk3 -. if defined(${comp}_GTK3_DETECT) -. if exists(${${comp}_DETECT}) && !exists(${${comp}_GTK3_DETECT}) +. if ${xfce_ARGS} == gtk3 +. if defined(${comp}_GTK3_DETECT) +. if exists(${${comp}_DETECT}) && !exists(${${comp}_GTK3_DETECT}) BROKEN+= GTK3 option needs to be set in ${comp} -. endif -. endif -. endif +. endif +. endif +. endif -. if defined(${comp}_BUILD_DEPENDS) +. if defined(${comp}_BUILD_DEPENDS) BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} -. endif +. endif -. if defined(${comp}_LIB_DEPENDS) +. if defined(${comp}_LIB_DEPENDS) LIB_DEPENDS+= ${${comp}_LIB_DEPENDS} -. endif +. endif -. if defined(${comp}_RUN_DEPENDS) +. if defined(${comp}_RUN_DEPENDS) RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} -. endif -.endfor +. endif +. endfor -. if ${USE_XFCE:M*gui} == libgui +. if ${USE_XFCE:M*gui} == libgui DEPRECATED?= Depends on unmaintained x11-toolkits/libxfce4gui -. endif +. endif -.endif # end of defined(USE_XFCE) +. endif # end of defined(USE_XFCE) .endif Index: Mk/Uses/zip.mk =================================================================== --- Mk/Uses/zip.mk +++ Mk/Uses/zip.mk @@ -15,13 +15,13 @@ EXTRACT_BEFORE_ARGS?= -qo EXTRACT_AFTER_ARGS?= -d ${EXTRACT_WRKDIR} -.if empty(zip_ARGS) +. if empty(zip_ARGS) EXTRACT_CMD?= ${UNZIP_NATIVE_CMD} -.elif ${zip_ARGS} == "infozip" +. elif ${zip_ARGS} == "infozip" EXTRACT_DEPENDS+= ${UNZIP_CMD}:archivers/unzip EXTRACT_CMD?= ${UNZIP_CMD} -.else +. else IGNORE= Incorrect 'USES+=zip:${zip_ARGS}' expecting 'USES+=zip[:infozip]' -.endif +. endif .endif Index: Mk/Uses/zope.mk =================================================================== --- Mk/Uses/zope.mk +++ Mk/Uses/zope.mk @@ -21,11 +21,11 @@ _PYTHON_VER_REQUIRED= python2.7 -.if defined(ZOPE_VERSION) +. if defined(ZOPE_VERSION) _ZOPE_VERSION:= ${ZOPE_VERSION} -.else +. else _ZOPE_VERSION:= ${_ZOPE_PORTBRANCH} -.endif +. endif # Validate Zope version whether it meets USE_ZOPE version restriction. _ZOPE_VERSION_CHECK:= ${USE_ZOPE:C/^([1-9]\.[0-9]*)$/\1-\1/} @@ -34,57 +34,57 @@ _ZOPE_VERSION_MAXIMUM_TMP:= ${_ZOPE_VERSION_CHECK:C/.*-([1-9]\.[0-9]*)/\1/} _ZOPE_VERSION_MAXIMUM:= ${_ZOPE_VERSION_MAXIMUM_TMP:M[1-9].[0-9]} -.if !empty(_ZOPE_VERSION_MINIMUM) && ( \ +. if !empty(_ZOPE_VERSION_MINIMUM) && ( \ ${_ZOPE_VERSION} < ${_ZOPE_VERSION_MINIMUM}) _ZOPE_VERSION_NONSUPPORTED= ${_ZOPE_VERSION_MINIMUM} at least -.elif !empty(_ZOPE_VERSION_MAXIMUM) && ( \ +. elif !empty(_ZOPE_VERSION_MAXIMUM) && ( \ ${_ZOPE_VERSION} > ${_ZOPE_VERSION_MAXIMUM}) _ZOPE_VERSION_NONSUPPORTED= ${_ZOPE_VERSION_MAXIMUM} at most -.endif +. endif # If we have an unsupported version of Zope, try another. -.if defined(_ZOPE_VERSION_NONSUPPORTED) -.if defined(ZOPE_VERSION) +. if defined(_ZOPE_VERSION_NONSUPPORTED) +. if defined(ZOPE_VERSION) IGNORE= needs Zope ${_ZOPE_VERSION_NONSUPPORTED}.\ But you specified ${_ZOPE_VERSION} -.else +. else .undef _ZOPE_VERSION -.for ver in ${_ZOPE_ALLBRANCHES} +. for ver in ${_ZOPE_ALLBRANCHES} __VER= ${ver} -.if !defined(_ZOPE_VERSION) && \ +. if !defined(_ZOPE_VERSION) && \ !(!empty(_ZOPE_VERSION_MINIMUM) && ( \ ${__VER} < ${_ZOPE_VERSION_MINIMUM})) && \ !(!empty(_ZOPE_VERSION_MAXIMUM) && ( \ ${__VER} > ${_ZOPE_VERSION_MAXIMUM})) _ZOPE_VERSION= ${ver} -.endif -.endfor -.if !defined(_ZOPE_VERSION) +. endif +. endfor +. if !defined(_ZOPE_VERSION) IGNORE= needs an unsupported version of Zope _ZOPE_VERSION= ${_ZOPE_PORTBRANCH} # just to avoid version sanity checking. -.endif -.endif # defined(ZOPE_VERSION) -.endif # defined(_ZOPE_VERSION_NONSUPPORTED) +. endif +. endif # defined(ZOPE_VERSION) +. endif # defined(_ZOPE_VERSION_NONSUPPORTED) ZOPE_VERSION?= ${_ZOPE_VERSION} -.if !defined(PYTHON_VERSION) +. if !defined(PYTHON_VERSION) PYTHON_VERSION= ${_PYTHON_VER_REQUIRED} -.elif ${PYTHON_VERSION} != ${_PYTHON_VER_REQUIRED} +. elif ${PYTHON_VERSION} != ${_PYTHON_VER_REQUIRED} IGNORE+= Zope requires Python ${_PYTHON_VER_REQUIRED}.\ But you or a port dependency specified ${PYTHON_VERSION} -.endif # !defined(PYTHON_VERSION) +. endif # !defined(PYTHON_VERSION) # Zope-related variables -.if ${ZOPE_VERSION} == ${_ZOPE_PORTBRANCH} +. if ${ZOPE_VERSION} == ${_ZOPE_PORTBRANCH} RUN_DEPENDS+= zope213>0:www/zope213 -.else +. else _USES_sanity+= 300:check-makevars-zope check-makevars-zope: @${ECHO} "Makefile error: bad value for ZOPE_VERSION: ${ZOPE_VERSION}." @${ECHO} "Legal values are: ${_ZOPE_PORTBRANCH} (default)" @${FALSE} -.endif +. endif ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR} ZOPEPRODUCTDIR?= Products Index: Mk/bsd.apache.mk =================================================================== --- Mk/bsd.apache.mk +++ Mk/bsd.apache.mk @@ -87,9 +87,9 @@ .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if defined(DEFAULT_APACHE_VER) +. if defined(DEFAULT_APACHE_VER) WARNING+= "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead" -.endif +. endif DEFAULT_APACHE_VERSION?= ${APACHE_DEFAULT:S/.//} # When adding a version, please keep the comment in @@ -103,78 +103,78 @@ # Keep apache version in ascending order! # The "+" sign is only valid as last sign, not between # two versions or in combination with range! -.if defined(USE_APACHE) && !empty(USE_APACHE) -. if ${USE_APACHE:Mcommon*} != "" +. if defined(USE_APACHE) && !empty(USE_APACHE) +. if ${USE_APACHE:Mcommon*} != "" AP_PORT_IS_SERVER= yes -. elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == "" +. elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == "" AP_PORT_IS_MODULE= yes -. if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+" +. if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+" AP_PLUS= yes -. endif -. else +. endif +. else IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) -. endif +. endif # Catch unknown apache versions and silly USE_APACHE constructs -. if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE) +. if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) -. endif +. endif # Catch USE_APACHE [min]-[max]+ -. if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-" +. if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) -. endif -.elif defined(USE_APACHE) +. endif +. elif defined(USE_APACHE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified ) -.endif # defined(USE_APACHE) +. endif # defined(USE_APACHE) # =============================================================== -.if defined(AP_PORT_IS_SERVER) +. if defined(AP_PORT_IS_SERVER) # Module selection -.for category in ${DEFAULT_MODULES_CATEGORIES} +. for category in ${DEFAULT_MODULES_CATEGORIES} DEFAULT_MODULES+= ${${category}_MODULES} -.endfor +. endfor -.for category in ${ALL_MODULES_CATEGORIES} +. for category in ${ALL_MODULES_CATEGORIES} AVAILABLE_MODULES+= ${${category}_MODULES} -.endfor +. endfor # detect invalid lowercase params in make.conf # keep this check until end of 2012 -.if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} +. if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} IGNORE= lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\ detected (make.conf), they shoud be UPPERCASE -.endif +. endif # Setting "@comment " as default. -.for module in ${AVAILABLE_MODULES:O} +. for module in ${AVAILABLE_MODULES:O} ${module}PLIST_SUB= "@comment " _DISABLE_MODULES+= --disable-${module:tl} -.endfor +. endfor # Configure # dirty hacks to make sure all modules are disabled before we select them -.if ${USE_APACHE:Mcommon2*} +. if ${USE_APACHE:Mcommon2*} CONFIGURE_ARGS+= ${_DISABLE_MODULES:O:u} -.endif +. endif # OPTIONS handling -.for module in ${AVAILABLE_MODULES} -. if ${PORT_OPTIONS:M${module}} +. for module in ${AVAILABLE_MODULES} +. if ${PORT_OPTIONS:M${module}} _APACHE_MODULES+= ${module} -. else +. else WITHOUT_MODULES+= ${module} -. endif -.endfor +. endif +. endfor -.if !defined(WITH_STATIC_APACHE) +. if !defined(WITH_STATIC_APACHE) # FYI #DYNAMIC_MODULES= so CONFIGURE_ARGS+= --enable-so -.else +. else CONFIGURE_ARGS+= --disable-so WITH_ALL_STATIC_MODULES= yes -.endif +. endif -.if ${PORT_OPTIONS:MSUEXEC} +. if ${PORT_OPTIONS:MSUEXEC} _APACHE_MODULES+= ${SUEXEC_MODULES} SUEXEC_CONFARGS= with-suexec @@ -183,11 +183,11 @@ #SUEXEC_DOCROOT?= ${WWWDIR} SUEXEC_USERDIR?= public_html # avoid duplicate search paths -.if ${LOCALBASE} == ${PREFIX} +. if ${LOCALBASE} == ${PREFIX} SUEXEC_SAFEPATH?= ${LOCALBASE}/bin:/usr/bin:/bin -.else +. else SUEXEC_SAFEPATH?= ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin -.endif +. endif SUEXEC_LOGFILE?= /var/log/httpd-suexec.log SUEXEC_UIDMIN?= 1000 SUEXEC_GIDMIN?= 1000 @@ -201,78 +201,78 @@ --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \ --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" -. if defined(WITH_SUEXEC_UMASK) +. if defined(WITH_SUEXEC_UMASK) CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} -. endif -.endif +. endif +. endif -.if !defined(WITHOUT_MODULES) +. if !defined(WITHOUT_MODULES) APACHE_MODULES= ${_APACHE_MODULES} -.else -.for module in ${_APACHE_MODULES:O:u} -. if !${WITHOUT_MODULES:M${module}} +. else +. for module in ${_APACHE_MODULES:O:u} +. if !${WITHOUT_MODULES:M${module}} APACHE_MODULES+= ${module} -. endif -.endfor -.endif +. endif +. endfor +. endif -.if defined(WITH_STATIC_MODULES) -.for module in ${APACHE_MODULES} -. if ${WITH_STATIC_MODULES:M${module}} +. if defined(WITH_STATIC_MODULES) +. for module in ${APACHE_MODULES} +. if ${WITH_STATIC_MODULES:M${module}} _CONFIGURE_ARGS+= --enable-${module:tl}=static -. else +. else _CONFIGURE_ARGS+= --enable-${module:tl}=shared -. endif -.endfor +. endif +. endfor CONFIGURE_ARGS+= ${_CONFIGURE_ARGS:O} -.elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) +. elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) WITH_STATIC_MODULES= ${APACHE_MODULES} CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES:O:tl}" -.else +. else CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES:O:tl}" -.endif +. endif # ==================================== # start pkg-plist adjustments -.if defined(WITH_STATIC_MODULES) -.for module in ${APACHE_MODULES} -. if !${WITH_STATIC_MODULES:M${module}} +. if defined(WITH_STATIC_MODULES) +. for module in ${APACHE_MODULES} +. if !${WITH_STATIC_MODULES:M${module}} _SHARED_MODULES+= ${module} -. endif -.endfor +. endif +. endfor SHARED_MODULES= ${_SHARED_MODULES} -.elif !defined(WITH_ALL_STATIC_MODULES) +. elif !defined(WITH_ALL_STATIC_MODULES) SHARED_MODULES= ${APACHE_MODULES} -.endif +. endif -.for module in ${SHARED_MODULES} +. for module in ${SHARED_MODULES} ${module}PLIST_SUB= "" -.endfor +. endfor -.for module in ${AVAILABLE_MODULES:O:u} +. for module in ${AVAILABLE_MODULES:O:u} PLIST_SUB+= MOD_${module}=${${module}PLIST_SUB} -.endfor +. endfor # pkg-plist workaround STATIC support -.if ${PORT_OPTIONS:MSUEXEC} +. if ${PORT_OPTIONS:MSUEXEC} PLIST_SUB+= SUEXEC="" -.else +. else PLIST_SUB+= SUEXEC="@comment " -.endif +. endif -.if ${PORT_OPTIONS:MLOG_FORENSIC} +. if ${PORT_OPTIONS:MLOG_FORENSIC} PLIST_SUB+= FORENSIC="" -.else +. else PLIST_SUB+= FORENSIC="@comment " -.endif +. endif # end pkg-plist adjustments #### End of AP_PORT_IS_SERVER #### # =============================================================== -.elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD) +. elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD) APXS?= ${LOCALBASE}/sbin/apxs HTTPD?= ${LOCALBASE}/sbin/httpd @@ -280,19 +280,19 @@ SHORTMODNAME?= ${MODULENAME:S/mod_//} SRC_FILE?= ${MODULENAME}.c -.if exists(${HTTPD}) +. if exists(${HTTPD}) _APACHE_VERSION!= ${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' -.elif defined(APACHE_PORT) +. elif defined(APACHE_PORT) _APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p' -.endif +. endif -.if defined(USE_APACHE) +. if defined(USE_APACHE) _USE_APACHE:= ${USE_APACHE} -.elif defined(USE_APACHE_BUILD) +. elif defined(USE_APACHE_BUILD) _USE_APACHE:= ${USE_APACHE_BUILD} -.elif defined(USE_APACHE_RUN) +. elif defined(USE_APACHE_RUN) _USE_APACHE:= ${USE_APACHE_RUN} -.endif +. endif _APACHE_VERSION_CHECK:= ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/} _APACHE_VERSION_MINIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/} @@ -302,67 +302,67 @@ # ============================================================== # num+ -.if ${_USE_APACHE:M*+} +. if ${_USE_APACHE:M*+} _APACHE_WANTED_VERSIONS= ${DEFAULT_APACHE_VERSION} # -num -.elif ${_USE_APACHE:M\-[0-9][0-9]} -.for _v in ${APACHE_SUPPORTED_VERSION:O} -. if ${_APACHE_VERSION_MAXIMUM} >= ${_v} +. elif ${_USE_APACHE:M\-[0-9][0-9]} +. for _v in ${APACHE_SUPPORTED_VERSION:O} +. if ${_APACHE_VERSION_MAXIMUM} >= ${_v} _APACHE_WANTED_VERSIONS+= ${_v} -. endif -.endfor +. endif +. endfor # num-num -.elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]} -.for _v in ${APACHE_SUPPORTED_VERSION} -. if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v} +. elif ${_USE_APACHE:M[0-9][0-9]-[0-9][0-9]} +. for _v in ${APACHE_SUPPORTED_VERSION} +. if ${_APACHE_VERSION_MINIMUM} <= ${_v} && ${_APACHE_VERSION_MAXIMUM} >= ${_v} _APACHE_WANTED_VERSIONS+= ${_v} -. endif -.endfor +. endif +. endfor # num -.elif ${_USE_APACHE:M[0-9][0-9]} +. elif ${_USE_APACHE:M[0-9][0-9]} _APACHE_WANTED_VERSIONS= ${_USE_APACHE:M[0-9][0-9]} -.endif +. endif # ============================================================== -.if !defined(_APACHE_WANTED_VERSIONS) +. if !defined(_APACHE_WANTED_VERSIONS) _APACHE_WANTED_VERSIONS= ${DEFAULT_APACHE_VERSION} -.endif +. endif -.for _v in ${_APACHE_WANTED_VERSIONS:O:u} +. for _v in ${_APACHE_WANTED_VERSIONS:O:u} _APACHE_HIGHEST_VERSION:= ${_v} -. if defined (_APACHE_VERSION) && ${_APACHE_VERSION} == ${_v} +. if defined (_APACHE_VERSION) && ${_APACHE_VERSION} == ${_v} _APACHE_WANTED_VERSION:= ${_v} -. endif -.endfor +. endif +. endfor -.if !defined(_APACHE_WANTED_VERSION) +. if !defined(_APACHE_WANTED_VERSION) # next line is broken on 8.x and 9.x but working on 10 #_APACHE_WANTED_VERSION:= ${_APACHE_WANTED_VERSIONS:O:u:M${DEFAULT_APACHE_VERSION}} # working line on 8.x, 9.x, 10 _APACHE_WANTED_VERSION:= ${_APACHE_WANTED_VERSIONS:O:u:MDEFAULT_APACHE_VERSION} -. if empty(_APACHE_WANTED_VERSION) +. if empty(_APACHE_WANTED_VERSION) _APACHE_WANTED_VERSION:= ${_APACHE_HIGHEST_VERSION} -. endif -.endif +. endif +. endif -.if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${_APACHE_WANTED_VERSION} +. if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${_APACHE_WANTED_VERSION} BROKEN= ${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED} -.endif +. endif APACHE_VERSION:= ${_APACHE_WANTED_VERSION} -.if exists(${APXS}) +. if exists(${APXS}) APXS_PREFIX!= ${APXS} -q prefix 2> /dev/null || echo NULL -. if ${APXS_PREFIX} == NULL +. if ${APXS_PREFIX} == NULL IGNORE= : Your apache does not support DSO modules -. endif -. if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} +. endif +. if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} IGNORE?= PREFIX must be equal to APXS_PREFIX. -. endif -.endif +. endif +. endif APACHEMODDIR= libexec/apache${APACHE_VERSION} APACHEINCLUDEDIR=include/apache${APACHE_VERSION} @@ -380,68 +380,68 @@ APACHE_PKGNAMEPREFIX= ap${APACHE_VERSION}- -.if defined(AP_FAST_BUILD) +. if defined(AP_FAST_BUILD) PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} -.endif +. endif -.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) +. if defined(USE_APACHE) || defined(USE_APACHE_BUILD) BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} -.endif +. endif -.if defined(USE_APACHE) || defined(USE_APACHE_RUN) +. if defined(USE_APACHE) || defined(USE_APACHE_RUN) RUN_DEPENDS+= ${APXS}:${APACHE_PORT} -.endif +. endif PLIST_SUB+= AP_NAME="${SHORTMODNAME}" PLIST_SUB+= AP_MODULE="${MODULENAME}.so" -.if defined(AP_GENPLIST) +. if defined(AP_GENPLIST) PLIST?= ${WRKDIR}/ap-plist -.endif +. endif -.if defined(AP_INC) +. if defined(AP_INC) AP_EXTRAS+= -I ${AP_INC} -.endif -.if defined(AP_LIB) +. endif +. if defined(AP_LIB) AP_EXTRAS+= -L ${AP_LIB} -.endif +. endif -.endif # End of AP_PORT_IS_SERVER / AP_PORT_IS_MOULE +. endif # End of AP_PORT_IS_SERVER / AP_PORT_IS_MOULE .endif # End of !Apache_Pre_Include # =============================================================== .if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) Apache_Post_Include= bsd.apache.mk -.if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN) -. if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != "" +. if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN) +. if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} ) -. endif -.elif defined(USE_APACHE_RUN) +. endif +. elif defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified ) -.endif +. endif -.if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD) -. if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != "" +. if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD) +. if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} ) -. endif -.elif defined(USE_APACHE_BUILD) +. endif +. elif defined(USE_APACHE_BUILD) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified ) -.endif +. endif # Check if USE_APACHE(_BUILD|_RUN) are mixed together -.if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) ) +. if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) ) IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN -.elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN) +. elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together -.endif +. endif -.if defined(NO_BUILD) && defined(USE_APACHE) +. if defined(NO_BUILD) && defined(USE_APACHE) BROKEN= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile -.endif +. endif -.if defined(AP_PORT_IS_SERVER) -.if !target(print-closest-mirrors) +. if defined(AP_PORT_IS_SERVER) +. if !target(print-closest-mirrors) print-closest-mirrors: @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2 @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\ @@ -451,72 +451,72 @@ ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\ ${ECHO_MSG} $$MIRRORS; else \ ${ECHO_MSG} "No mirrors found!">&2 ; fi -.endif +. endif -.if !target(show-modules) +. if !target(show-modules) show-modules: -.if !empty(APACHE_MODULES) -.for module in ${AVAILABLE_MODULES} +. if !empty(APACHE_MODULES) +. for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : " ${module} -. if ${APACHE_MODULES:M${module}} +. if ${APACHE_MODULES:M${module}} @${ECHO} -n "enabled " -. if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} +. if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} @${ECHO_CMD} " (static)" -. else +. else @${ECHO_CMD} "(shared)" -. endif -. else +. endif +. else @${ECHO_CMD} disabled -. endif -.endfor -.else -.for module in ${AVAILABLE_MODULES} +. endif +. endfor +. else +. for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : disabled\n" ${module} -.endfor -.endif -.endif +. endfor +. endif +. endif -.elif defined(AP_PORT_IS_MODULE) +. elif defined(AP_PORT_IS_MODULE) -.if defined(AP_MODENABLE) +. if defined(AP_MODENABLE) AP_MOD_EN= -a -.else +. else AP_MOD_EN= -A -.endif +. endif PLIST_SUB+= AP_MOD_EN="${AP_MOD_EN}" -.if defined(AP_FAST_BUILD) -.if !target(ap-gen-plist) +. if defined(AP_FAST_BUILD) +. if !target(ap-gen-plist) _USES_build+= 490:ap-gen-plist ap-gen-plist: -.if defined(AP_GENPLIST) -. if !exists(${PLIST}) +. if defined(AP_GENPLIST) +. if !exists(${PLIST}) @${ECHO} "===> Generating apache plist" @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} @${ECHO} "@postexec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST} @${ECHO} "@postunexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} @${ECHO} "@postunexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST} -. endif -.endif -.endif +. endif +. endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: (cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.la ${SRC_FILE}) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} ${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.la -. if !defined(DEBUG) +. if !defined(DEBUG) @${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so" @[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so -. else +. else @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so" -. endif -.endif +. endif +. endif -.endif # defined(AP_FAST_BUILD) -.endif # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE) +. endif # defined(AP_FAST_BUILD) +. endif # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE) .endif # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) Index: Mk/bsd.autotools.mk =================================================================== --- Mk/bsd.autotools.mk +++ Mk/bsd.autotools.mk @@ -63,14 +63,14 @@ # _AUTOTOOLS_NOCOMP= .for component in ${_AUTOTOOLS_IMPL} -. if ${_AUTOTOOLS_ALL:M${component}}=="" +. if ${_AUTOTOOLS_ALL:M${component}}=="" _AUTOTOOLS_NOCOMP+= ${component} -. endif -. if ${_AUTOTOOL_${component}}==${component} +. endif +. if ${_AUTOTOOL_${component}}==${component} _AUTOTOOL_${component}= yes . elsif ${_AUTOTOOL_${component}}!="env" && ${_AUTOTOOL_${component}}!="yes" _AUTOTOOLS_BADCOMP+= ${component}:${_AUTOTOOL_${component}} -. endif +. endif .endfor .if !empty(_AUTOTOOLS_NOCOMP) IGNORE+= Unknown autotool: ${_AUTOTOOLS_NOCOMP:O:u} @@ -80,9 +80,9 @@ # _AUTOTOOLS_BADCOMP= .for component in ${_AUTOTOOLS_IMPL} -. if ${_AUTOTOOL_${component}}!="env" && ${_AUTOTOOL_${component}}!="yes" +. if ${_AUTOTOOL_${component}}!="env" && ${_AUTOTOOL_${component}}!="yes" _AUTOTOOLS_BADCOMP+= ${component}:${_AUTOTOOL_${component}} -. endif +. endif .endfor .if !empty(_AUTOTOOLS_BADCOMP) IGNORE+= Bad autotool stanza: ${_AUTOTOOLS_BADCOMP:O:u} @@ -103,10 +103,10 @@ AUTOMAKE_APIVER= 1.15 AUTOMAKE_PORT= devel/automake -. if ${_AUTOTOOL_automake} == "yes" +. if ${_AUTOTOOL_automake} == "yes" _AUTOTOOL_rule_automake= yes GNU_CONFIGURE?= yes -. endif +. endif .endif .if defined(AUTOMAKE_VERSION) @@ -115,9 +115,9 @@ ACLOCAL= ${LOCALBASE}/bin/aclocal-${AUTOMAKE_VERSION} ACLOCAL_DIR= ${LOCALBASE}/share/aclocal-${AUTOMAKE_VERSION} -. if defined(_AUTOTOOL_aclocal) +. if defined(_AUTOTOOL_aclocal) ACLOCAL_ARGS?= --automake-acdir=${ACLOCAL_DIR} -. endif +. endif AUTOMAKE_VARS= AUTOMAKE=${AUTOMAKE} \ AUTOMAKE_DIR=${AUTOMAKE_DIR} \ @@ -144,10 +144,10 @@ AUTOCONF_VERSION= 2.69 AUTOCONF_PORT= devel/autoconf -. if ${_AUTOTOOL_autoconf} == "yes" +. if ${_AUTOTOOL_autoconf} == "yes" _AUTOTOOL_rule_autoconf= yes GNU_CONFIGURE?= yes -. endif +. endif .endif .if defined(AUTOCONF_VERSION) @@ -181,9 +181,9 @@ AUTOTOOLS_VARS= ${AUTOMAKE_VARS} ${AUTOCONF_VARS} .if defined(AUTOTOOLS_VARS) && !empty(AUTOTOOLS_VARS) -. for var in AUTOTOOLS CONFIGURE MAKE SCRIPTS +. for var in AUTOTOOLS CONFIGURE MAKE SCRIPTS ${var:tu}_ENV+= ${AUTOTOOLS_VARS} -. endfor +. endfor .endif #--------------------------------------------------------------------------- Index: Mk/bsd.ccache.mk =================================================================== --- Mk/bsd.ccache.mk +++ Mk/bsd.ccache.mk @@ -7,40 +7,40 @@ _CCACHEMKINCLUDED= yes # HOME is always set to ${WRKDIR} now. Try to use /root/.ccache as default. -.if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) -. if defined(USER) && ${USER} == root +. if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) +. if defined(USER) && ${USER} == root CCACHE_DIR= /root/.ccache -. else +. else NO_CCACHE= yes WARNING+= WITH_CCACHE_BUILD support disabled, please set CCACHE_DIR. +. endif . endif -.endif # Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and # don't use if ccache already set in CC -.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ +. if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ !defined(NO_BUILD) && !defined(NOCCACHE) # Avoid depends loops between ccache and pkg -. if ${PKGORIGIN} != devel/ccache && ${PKGORIGIN} != ${PKG_ORIGIN} +. if ${PKGORIGIN} != devel/ccache && ${PKGORIGIN} != ${PKG_ORIGIN} BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:devel/ccache -. endif +. endif _CCACHE_PATH= ${LOCALBASE}/libexec/ccache # Prepend the ccache dir into the PATH and setup ccache env PATH:= ${_CCACHE_PATH}:${PATH} #.MAKEFLAGS: PATH=${PATH} -.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} +. if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} -.endif +. endif # Ensure this is always in subchild environments -. if defined(CCACHE_DIR) +. if defined(CCACHE_DIR) #.MAKEFLAGS: CCACHE_DIR=${CCACHE_DIR} MAKE_ENV+= CCACHE_DIR="${CCACHE_DIR}" CONFIGURE_ENV+= CCACHE_DIR="${CCACHE_DIR}" -. endif -.endif +. endif +. endif .endif Index: Mk/bsd.commands.mk =================================================================== --- Mk/bsd.commands.mk +++ Mk/bsd.commands.mk @@ -105,11 +105,11 @@ MD5?= /sbin/md5 SHA256?= /sbin/sha256 -.if exists(/usr/bin/soeliminate) +. if exists(/usr/bin/soeliminate) SOELIM?= /usr/bin/soeliminate -.else +. else SOELIM?= /usr/bin/soelim -.endif +. endif # ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo", # or "true" if the make flag -s is given. Use ECHO_CMD where you mean Index: Mk/bsd.default-versions.mk =================================================================== --- Mk/bsd.default-versions.mk +++ Mk/bsd.default-versions.mk @@ -13,10 +13,10 @@ .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes -.for lang in ${DEFAULT_VERSIONS} +. for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} -.endfor +. endfor # Possible values: 2.2, 2.4 APACHE_DEFAULT?= 2.4 @@ -35,20 +35,20 @@ # Possible values: 5.1, 5.5, 5.6, 5.7, 5.5m, 10.0m, 10.1m, 5.5p, 5.6p MYSQL_DEFAULT?= 5.6 # Possible values: 5.18, 5.20, 5.22, devel -.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ +. if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) PERL5_DEFAULT?= 5.20 -.elif !defined(PERL5_DEFAULT) +. elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. -.if !defined(_PERL5_FROM_BIN) +. if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= perl -e 'printf "%vd\n", $$^V;' -.endif +. endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} -.endif +. endif # Possible values: 9.0, 9.1, 9.2, 9.3, 9.4, 9.5 PGSQL_DEFAULT?= 9.3 # Possible values: 5.5, 5.6, 7.0 @@ -62,46 +62,46 @@ # Possible values: 2.0, 2.1, 2.2, 2.3 RUBY_DEFAULT?= 2.2 # Possible values: base, openssl, openssl-devel, libressl, libressl-devel -.if !defined(SSL_DEFAULT) +. if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. -. if defined(WITH_OPENSSL_PORT) -. if defined(OPENSSL_PORT) +. if defined(WITH_OPENSSL_PORT) +. if defined(OPENSSL_PORT) SSL_DEFAULT:=${OPENSSL_PORT:T} WARNING+= "Using WITH_OPENSSL_PORT and OPENSSL_PORT in make.conf is deprecated, replace them with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} in your make.conf" -. else +. else SSL_DEFAULT=openssl WARNING+= "Using WITH_OPENSSL_PORT in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=openssl in your make.conf" -. endif -. elif defined(WITH_OPENSSL_BASE) +. endif +. elif defined(WITH_OPENSSL_BASE) SSL_DEFAULT=base WARNING+= "Using WITH_OPENSSL_BASE in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=base in your make.conf" -. elif !defined(WITH_OPENSSL_BASE) && \ +. elif !defined(WITH_OPENSSL_BASE) && \ !defined(WITH_OPENSSL_PORT) && \ !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base -. else -. if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) +. else +. if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) # find installed port and use it for dependency -. if !defined(OPENSSL_INSTALLED) -. if defined(DESTDIR) +. if !defined(OPENSSL_INSTALLED) +. if defined(DESTDIR) PKGARGS= -c ${DESTDIR} -. else +. else PKGARGS= -. endif +. endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : -. endif -. if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) +. endif +. if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" +. endif . endif . endif -. endif # Make sure we have a default in the end SSL_DEFAULT?= base -.endif +. endif # Possible values: 8.4, 8.5, 8.6 TCLTK_DEFAULT?= 8.6 Index: Mk/bsd.destdir.mk =================================================================== --- Mk/bsd.destdir.mk +++ Mk/bsd.destdir.mk @@ -69,17 +69,17 @@ _DESTDIRMKINCLUDED= yes -.if defined(WITH_DESTDIR_DEBUG) +. if defined(WITH_DESTDIR_DEBUG) DEBUG_MSG= ${ECHO_MSG} "DEBUG:" -.else +. else DEBUG_MSG= ${TRUE} -.endif +. endif DESTDIR_ENV_LIST?= DESTDIR_ENV= CHROOTED=yes PATH=${PATH} TERM=${TERM} -.for _var in ${DESTDIR_ENV_LIST:NDESTDIR:NCHROOTED:NPORTSDIR} +. for _var in ${DESTDIR_ENV_LIST:NDESTDIR:NCHROOTED:NPORTSDIR} DESTDIR_ENV+= ${_var}="${${_var}}" -.endfor +. endfor # Processing DESTDIR_MOUNT_LIST into something more machine-readable # VAR:HOST_PATH:DEST_PATH @@ -87,31 +87,31 @@ # VAR:HOST_PATH -> VAR:HOST_PATH:TMP DESTDIR_MOUNT_LIST?= PORTSDIR DISTDIR _DESTDIR_MOUNT_LIST= -.for _entry in ${DESTDIR_MOUNT_LIST} +. for _entry in ${DESTDIR_MOUNT_LIST} __entry=${_entry} -.if ${__entry:M*\:*\:*} +. if ${__entry:M*\:*\:*} _DESTDIR_MOUNT_LIST+= ${_entry} -.elif ${__entry:M*\:*} +. elif ${__entry:M*\:*} _DESTDIR_MOUNT_LIST+= ${_entry}:___temp___ -.else -.if defined(${_entry}) && !empty(${_entry}) +. else +. if defined(${_entry}) && !empty(${_entry}) _DESTDIR_MOUNT_LIST+= ${_entry}:${${_entry}}:___temp___ -.endif -.endif -.endfor +. endif +. endif +. endfor .MAIN: all -.for _target in ${.TARGETS} +. for _target in ${.TARGETS} ${_target}: pre-chroot do-chroot @${TRUE} -.endfor +. endfor -.if !target(pre-chroot) +. if !target(pre-chroot) pre-chroot: @${TRUE} -.endif +. endif -.if !target(do-chroot) +. if !target(do-chroot) do-chroot: @if [ ! -d ${DESTDIR} ]; then \ ${ECHO_MSG} "===> Directory ${DESTDIR} does not exist"; \ @@ -218,5 +218,5 @@ ${RMDIR} $${_entry} || ${TRUE}; \ done; \ exit $$status -.endif # !target(do-chroot) +. endif # !target(do-chroot) .endif # !defined(_DESTDIRMKINCLUDED) Index: Mk/bsd.emacs.mk =================================================================== --- Mk/bsd.emacs.mk +++ Mk/bsd.emacs.mk @@ -74,11 +74,11 @@ EMACS_COMMON_PORT= NO EMACS_HAS_MULE= YES EMACS_NO_SUBDIRSEL= NO -.if (${EMACS_MASTERDIR_PKGFILES} == "YES") +. if (${EMACS_MASTERDIR_PKGFILES} == "YES") COMMENTFILE?= ${PKGDIR}/pkg-comment.${EMACS_PORT_NAME} DESCR?= ${PKGDIR}/pkg-descr.${EMACS_PORT_NAME} PLIST?= ${PKGDIR}/pkg-plist.${EMACS_PORT_NAME} -.endif +. endif # Emacs-24.x (development version) .elif (${EMACS_PORT_NAME} == "emacs-devel") @@ -91,11 +91,11 @@ EMACS_COMMON_PORT= NO EMACS_HAS_MULE= YES EMACS_NO_SUBDIRSEL= NO -.if (${EMACS_MASTERDIR_PKGFILES} == "YES") +. if (${EMACS_MASTERDIR_PKGFILES} == "YES") COMMENTFILE?= ${PKGDIR}/pkg-comment.${EMACS_PORT_NAME} DESCR?= ${PKGDIR}/pkg-descr.${EMACS_PORT_NAME} PLIST?= ${PKGDIR}/pkg-plist.${EMACS_PORT_NAME} -.endif +. endif .else check-makevars:: @@ -133,11 +133,11 @@ BUILD_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTSDIR} .endif .if (${EMACS_NO_RUN_DEPENDS} == "NO") -.if defined(EMACS_COMMON_PORT) && (${EMACS_COMMON_PORT} == "YES") +. if defined(EMACS_COMMON_PORT) && (${EMACS_COMMON_PORT} == "YES") RUN_DEPENDS+= ${EMACS_COREEL}:${EMACS_PORTSDIR}-common -.else +. else RUN_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTSDIR} -.endif +. endif .endif # environments for build Index: Mk/bsd.fpc.mk =================================================================== --- Mk/bsd.fpc.mk +++ Mk/bsd.fpc.mk @@ -32,9 +32,9 @@ .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if defined(DEFAULT_FPC_VER) +. if defined(DEFAULT_FPC_VER) WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead" -.endif +. endif FPC_Include_MAINTAINER= freebsd-fpc@FreeBSD.org FPC_Pre_Include= bsd.fpc.mk @@ -45,22 +45,22 @@ FPC_VER= ${DEFAULT_FPC_VER} FPC_ARCH= ${ARCH:S/amd64/x86_64/} -.if exists(${LOCALBASE}/bin/fpc) +. if exists(${LOCALBASE}/bin/fpc) FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV -. if ${FPC_CURRENT_VER} != ${FPC_VER} +. if ${FPC_CURRENT_VER} != ${FPC_VER} IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version -. endif -.endif +. endif +. endif -.if ${ARCH} == "i386" +. if ${ARCH} == "i386" PPNAME= ppc386 -.elif ${ARCH} == "amd64" +. elif ${ARCH} == "amd64" PPNAME= ppcx64 -.else +. else PPNAME= ppc_not_yet_ported ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64 -.endif +. endif BUILD_DEPENDS+= ${PPNAME}:lang/fpc @@ -81,30 +81,30 @@ sqlite svgalib symbolic syslog tcl unzip users utmp \ uuid x11 xforms zlib -.if defined(WANT_FPC_BASE) -. if ${WANT_FPC_BASE:tl} == "yes" +. if defined(WANT_FPC_BASE) +. if ${WANT_FPC_BASE:tl} == "yes" USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \ postgres pthreads regexpr sqlite -. else +. else IGNORE= unknown value, please use "yes" instead of -. endif -.endif +. endif +. endif -.if defined(WANT_FPC_ALL) -. if ${WANT_FPC_ALL:tl} == "yes" +. if defined(WANT_FPC_ALL) +. if ${WANT_FPC_ALL:tl} == "yes" USE_FPC= ${_FPC_ALL_UNITS} -. else +. else IGNORE= unknown value, please use "yes" instead of -. endif -.endif +. endif +. endif -.if ${USE_FPC:tl} != "yes" -. for UNITS in ${USE_FPC} -. if ${_FPC_ALL_UNITS:M${UNITS}}=="" +. if ${USE_FPC:tl} != "yes" +. for UNITS in ${USE_FPC} +. if ${_FPC_ALL_UNITS:M${UNITS}}=="" IGNORE= cannot install: unknown FPC unit ${UNITS} -. endif -. endfor -.endif +. endif +. endfor +. endif # Base units gdbint_UNIT= devel/fpc-gdbint @@ -201,19 +201,19 @@ .endif .if defined(_POSTMKINCLUDED) && defined(USE_FPC) -. for UNIT in ${USE_FPC} -. if ${_FPC_ALL_UNITS:M${UNIT}} != "" +. for UNIT in ${USE_FPC} +. if ${_FPC_ALL_UNITS:M${UNIT}} != "" BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. if defined(USE_FPC_RUN) +. if defined(USE_FPC_RUN) RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. endif +. endif security-check: fpc-check-install -. endif -. endfor +. endif +. endfor fpc-check-install: -.if defined(UNITPREFIX) && defined(PKGNAMESUFFIX) +. if defined(UNITPREFIX) && defined(PKGNAMESUFFIX) @${ECHO_CMD} "#################################################################" @${ECHO_CMD} "" @${ECHO_CMD} " The following freepascal unit has been installed in your system:" @@ -221,7 +221,7 @@ @${ECHO_CMD} " * ${UNITPREFIX}${PKGNAMESUFFIX:S/-//} " @${ECHO_CMD} "" @${ECHO_CMD} "#################################################################" -.endif +. endif .endif #.endif Index: Mk/bsd.gcc.mk =================================================================== --- Mk/bsd.gcc.mk +++ Mk/bsd.gcc.mk @@ -58,82 +58,82 @@ # Extract the fields from GCCVERSION_... .for v in ${GCCVERSIONS} -. for j in ${GCCVERSION_${v}} -. if !defined(_GCCVERSION_${v}_R) +. for j in ${GCCVERSION_${v}} +. if !defined(_GCCVERSION_${v}_R) _GCCVERSION_${v}_R= ${j} -. elif !defined(_GCCVERSION_${v}_V) +. elif !defined(_GCCVERSION_${v}_V) _GCCVERSION_${v}_V= ${j} -. endif -. endfor +. endif +. endfor .endfor .if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) -. if ${USE_GCC} == any +. if ${USE_GCC} == any # Enable the clang-is-cc workaround. Default to the last GCC imported # into base. _USE_GCC:= 4.2 _GCC_ORLATER:= true -. else # ${USE_GCC} == any +. else # ${USE_GCC} == any # See if we can use a later version or exclusively the one specified. _USE_GCC:= ${USE_GCC:S/+//} -.if ${USE_GCC} != ${_USE_GCC} +. if ${USE_GCC} != ${_USE_GCC} _GCC_ORLATER:= true -.endif +. endif -. endif # ${USE_GCC} == any +. endif # ${USE_GCC} == any # Initialize _GCC_FOUND${v}. In parallel, check if USE_GCC points to a # valid version to begin with. -.for v in ${GCCVERSIONS} -. if exists(${LOCALBASE}/bin/gcc${_GCCVERSION_${v}_V:S/.//}) +. for v in ${GCCVERSIONS} +. if exists(${LOCALBASE}/bin/gcc${_GCCVERSION_${v}_V:S/.//}) _GCC_FOUND${v}= port -. elif ${OSVERSION} < ${_GCCVERSION_${v}_R} -. if exists(/usr/bin/gcc) +. elif ${OSVERSION} < ${_GCCVERSION_${v}_R} +. if exists(/usr/bin/gcc) _GCC_FOUND${v}= base -. endif -. endif -. if ${_USE_GCC}==${_GCCVERSION_${v}_V} +. endif +. endif +. if ${_USE_GCC}==${_GCCVERSION_${v}_V} _GCCVERSION_OKAY= true -. endif -.endfor +. endif +. endfor -.if !defined(_GCCVERSION_OKAY) +. if !defined(_GCCVERSION_OKAY) IGNORE= Unknown version of GCC specified (USE_GCC=${USE_GCC}) -.endif +. endif # If the GCC package defined in USE_GCC does not exist, but a later # version is allowed (for example 4.7+), see if there is a later. # First check if the base installed version is good enough, otherwise # get the first available version. # -.if defined(_GCC_ORLATER) -. for v in ${GCCVERSIONS} -. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} +. if defined(_GCC_ORLATER) +. for v in ${GCCVERSIONS} +. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} _GCC_MIN1:= true -. endif -. if defined(_GCC_MIN1) && defined(_GCC_FOUND${v}) && ${_GCC_FOUND${v}}=="base" && !defined(_GCC_FOUND) +. endif +. if defined(_GCC_MIN1) && defined(_GCC_FOUND${v}) && ${_GCC_FOUND${v}}=="base" && !defined(_GCC_FOUND) _GCC_FOUND:= ${_GCCVERSION_${v}_V} -. endif -. endfor -. for v in ${GCCVERSIONS} -. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} +. endif +. endfor +. for v in ${GCCVERSIONS} +. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} _GCC_MIN2:= true -. endif -. if defined(_GCC_MIN2) && defined(_GCC_FOUND${v}) && !defined(_GCC_FOUND) +. endif +. if defined(_GCC_MIN2) && defined(_GCC_FOUND${v}) && !defined(_GCC_FOUND) _GCC_FOUND:= ${_GCCVERSION_${v}_V} -. endif -. endfor +. endif +. endfor -. if defined(_GCC_FOUND) +. if defined(_GCC_FOUND) _USE_GCC:= ${_GCC_FOUND} -. elif ${_USE_GCC} < ${GCC_DEFAULT} +. elif ${_USE_GCC} < ${GCC_DEFAULT} _USE_GCC:= ${GCC_DEFAULT} -. endif -.endif # defined(_GCC_ORLATER) +. endif +. endif # defined(_GCC_ORLATER) .endif # defined(USE_GCC) @@ -142,16 +142,16 @@ # A concrete version has been selected. Determine if the installed OS # features this version in the base, and if not then set proper ports # dependencies, CC, CXX, CPP, and flags. -.for v in ${GCCVERSIONS} -. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} -. if ${OSVERSION} > ${_GCCVERSION_${v}_R} || !exists(/usr/bin/gcc) +. for v in ${GCCVERSIONS} +. if ${_USE_GCC} == ${_GCCVERSION_${v}_V} +. if ${OSVERSION} > ${_GCCVERSION_${v}_R} || !exists(/usr/bin/gcc) V:= ${_GCCVERSION_${v}_V:S/.//} _GCC_PORT_DEPENDS:= gcc${V} -. if ${_USE_GCC} == ${LANG_GCC_IS} +. if ${_USE_GCC} == ${LANG_GCC_IS} _GCC_PORT:= gcc -. else +. else _GCC_PORT:= gcc${V} -. endif +. endif CC:= gcc${V} CXX:= g++${V} CPP:= cpp${V} @@ -159,26 +159,26 @@ CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME} -. else # Use GCC in base. +. else # Use GCC in base. CC:= gcc CXX:= g++ -. if exists(/usr/bin/gcpp) +. if exists(/usr/bin/gcpp) CPP:= gcpp -. else +. else CPP:= cpp -. endif -. endif # Use GCC in base. -. endif # ${_USE_GCC} == ${_GCCVERSION_${v}_V} -.endfor +. endif +. endif # Use GCC in base. +. endif # ${_USE_GCC} == ${_GCCVERSION_${v}_V} +. endfor .undef V -.if defined(_GCC_PORT_DEPENDS) +. if defined(_GCC_PORT_DEPENDS) BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} # Later GCC ports already depend on binutils; make sure whatever we # build leverages this as well. USE_BINUTILS= yes -.endif +. endif .endif # defined(_USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) @@ -187,22 +187,22 @@ .if defined(IGNORE) @echo "IGNORE: ${IGNORE}" .else -.if defined(USE_GCC) -.if defined(_GCC_ORLATER) +. if defined(USE_GCC) +. if defined(_GCC_ORLATER) @echo Port can use later versions. -.else +. else @echo Port cannot use later versions. -.endif -.for v in ${GCCVERSIONS} +. endif +. for v in ${GCCVERSIONS} @echo -n "GCC version: ${_GCCVERSION_${v}_V} " -.if defined(_GCC_FOUND${v}) +. if defined(_GCC_FOUND${v}) @echo -n "(${_GCC_FOUND${v}}) " -.endif +. endif @echo "- OSVERSION up to ${_GCCVERSION_${v}_R}" # @echo ${v} - ${_GCC_FOUND${v}} - up to ${_GCCVERSION_${v}_R} - ${_GCCVERSION_${v}_V} -.endfor +. endfor @echo Using GCC version ${_USE_GCC} -.endif +. endif @echo CC=${CC} - CXX=${CXX} - CPP=${CPP} - CFLAGS=\"${CFLAGS}\" @echo LDFLAGS=\"${LDFLAGS}\" @echo "BUILD_DEPENDS=${BUILD_DEPENDS}" Index: Mk/bsd.gecko.mk =================================================================== --- Mk/bsd.gecko.mk +++ Mk/bsd.gecko.mk @@ -16,7 +16,7 @@ # system. .if defined(USE_GECKO) -.if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) +. if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of @@ -91,9 +91,9 @@ USE_PERL5= build USE_XORG= xext xrender xt -.if ${MOZILLA} != "libxul" +. if ${MOZILLA} != "libxul" BUNDLE_LIBS= yes -.endif +. endif MOZILLA_SUFX?= none MOZSRC?= ${WRKSRC} @@ -128,34 +128,34 @@ CPPFLAGS+= -isystem${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -Wl,-rpath,${PREFIX}/lib/${MOZILLA} -.if ${OPSYS} != DragonFly # XXX xpcshell crash during install +. if ${OPSYS} != DragonFly # XXX xpcshell crash during install # use jemalloc 3.0.0 (4.0 for firefox 43+) API for stats/tuning MOZ_EXPORT+= MOZ_JEMALLOC3=1 MOZ_JEMALLOC4=1 -.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100079 -. if ${MOZILLA_VER:R:R} < 43 +. if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100079 +. if ${MOZILLA_VER:R:R} < 43 # system jemalloc 4.0.0 vs. bundled jemalloc 3.6.0-204-gb4acf73 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bug1125514 -. endif -.elif ${OPSYS} != FreeBSD || ${OSVERSION} < 1000012 || ${MOZILLA_VER:R:R} >= 37 +. endif +. elif ${OPSYS} != FreeBSD || ${OSVERSION} < 1000012 || ${MOZILLA_VER:R:R} >= 37 MOZ_OPTIONS+= --enable-jemalloc -.endif -.endif # !DragonFly +. endif +. endif # !DragonFly # Standard depends _ALL_DEPENDS= cairo event ffi graphite harfbuzz hunspell icu jpeg nspr nss opus png pixman soundtouch sqlite vpx -.if ${PORT_OPTIONS:MINTEGER_SAMPLES} +. if ${PORT_OPTIONS:MINTEGER_SAMPLES} MOZ_EXPORT+= MOZ_INTEGER_SAMPLES=1 _ALL_DEPENDS+= tremor -.else +. else _ALL_DEPENDS+= vorbis -.endif +. endif -.if ! ${PORT_OPTIONS:MBUNDLED_CAIRO} +. if ! ${PORT_OPTIONS:MBUNDLED_CAIRO} cairo_BUILD_DEPENDS=cairo>=1.12.16_1,2:graphics/cairo cairo_LIB_DEPENDS= libcairo.so:graphics/cairo cairo_MOZ_OPTIONS= --enable-system-cairo -.endif +. endif event_LIB_DEPENDS= libevent.so:devel/libevent2 event_MOZ_OPTIONS= --with-system-libevent @@ -163,13 +163,13 @@ ffi_LIB_DEPENDS= libffi.so:devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi -.if exists(${FILESDIR}/patch-bug847568) +. if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz -.endif +. endif hunspell_LIB_DEPENDS= libhunspell-1.3.so:textproc/hunspell hunspell_MOZ_OPTIONS= --enable-system-hunspell @@ -188,10 +188,10 @@ nss_LIB_DEPENDS= libnss3.so:security/nss nss_MOZ_OPTIONS= --with-system-nss -.if exists(${FILESDIR}/patch-z-bug517422) && ${MOZILLA_VER:R:R} < 45 +. if exists(${FILESDIR}/patch-z-bug517422) && ${MOZILLA_VER:R:R} < 45 opus_LIB_DEPENDS= libopus.so:audio/opus opus_MOZ_OPTIONS= --with-system-opus -.endif +. endif pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman @@ -199,15 +199,15 @@ png_LIB_DEPENDS= libpng.so:graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} -.if exists(${FILESDIR}/patch-z-bug517422) +. if exists(${FILESDIR}/patch-z-bug517422) soundtouch_LIB_DEPENDS= libSoundTouch.so:audio/soundtouch soundtouch_MOZ_OPTIONS= --with-system-soundtouch -.endif +. endif sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -.if exists(${FILESDIR}/patch-z-bug517422) +. if exists(${FILESDIR}/patch-z-bug517422) # XXX disabled: update to 1.2.x or review backported fixes theora_LIB_DEPENDS= libtheora.so:multimedia/libtheora theora_MOZ_OPTIONS= --with-system-theora @@ -217,27 +217,27 @@ vorbis_LIB_DEPENDS= libvorbis.so:audio/libvorbis vorbis_MOZ_OPTIONS= --with-system-vorbis --with-system-ogg -.endif +. endif -vpx_BUILD_DEPENDS= yasm:devel/yasm vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx -.for use in ${USE_MOZILLA} +. for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} -.endfor +. endfor -.for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} -.if !defined(_WITHOUT_${dep}) +. for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} +. if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} USES+= ${${dep}_USES} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} -.else +. else BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS} -.endif -.endfor +. endif +. endfor # Standard options MOZ_CHROME?= omni @@ -248,16 +248,16 @@ --enable-pie \ --with-pthreads # Configure options for install -.if !defined(MOZ_EXTENSIONS) +. if !defined(MOZ_EXTENSIONS) MOZ_OPTIONS+= --enable-extensions=default -.else +. else MOZ_OPTIONS+= --enable-extensions=${MOZ_EXTENSIONS} -.endif -.if !defined(MOZ_PROTOCOLS) +. endif +. if !defined(MOZ_PROTOCOLS) MOZ_OPTIONS+= --enable-necko-protocols=default -.else +. else MOZ_OPTIONS+= --enable-necko-protocols=${MOZ_PROTOCOLS} -.endif +. endif # others MOZ_OPTIONS+= --with-system-zlib \ --with-system-bz2 \ @@ -278,190 +278,190 @@ MOZ_GOOGLE_OAUTH_API_CLIENTID=996322985003.apps.googleusercontent.com \ MOZ_GOOGLE_OAUTH_API_KEY=IR1za9-1VK0zZ0f_O8MVFicn -.if ${PORT_OPTIONS:MGTK3} +. if ${PORT_OPTIONS:MGTK3} MOZ_TOOLKIT= cairo-gtk3 -.endif +. endif -.if ${MOZ_TOOLKIT:Mcairo-qt} +. if ${MOZ_TOOLKIT:Mcairo-qt} # don't use - transparent backgrounds (bug 521582), USE_MOZILLA+= -cairo # ports/169343 USE_DISPLAY=yes # install USE_GNOME+= pango USE_QT5+= qmake_build buildtools_build gui network quick printsupport MOZ_EXPORT+= HOST_QMAKE="${QMAKE}" HOST_MOC="${MOC}" HOST_RCC="${RCC}" -.elif ${MOZ_TOOLKIT:Mcairo-gtk3} +. elif ${MOZ_TOOLKIT:Mcairo-gtk3} BUILD_DEPENDS+= gtk3>=3.14.6:x11-toolkits/gtk30 USE_GNOME+= gtk30 -. if ${MOZILLA_VER:R:R} >= 32 +. if ${MOZILLA_VER:R:R} >= 32 USE_GNOME+= gtk20 # bug 624422 -. endif -.else # gtk2, cairo-gtk2 +. endif +. else # gtk2, cairo-gtk2 USE_GNOME+= gtk20 -.endif +. endif -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} +. if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize -.else -. if ${MOZILLA_VER:R:R} >= 45 && ${ARCH} == i386 && \ +. else +. if ${MOZILLA_VER:R:R} >= 45 && ${ARCH} == i386 && \ (${OSVERSION} >= 1000000 && ${OSVERSION} < 1003501) USES:= compiler:c++14-lang ${USES:Ncompiler*c++11*} # XXX ports/207837 -. endif +. endif MOZ_OPTIONS+= --disable-optimize -.endif +. endif -.if ${PORT_OPTIONS:MCANBERRA} +. if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:audio/libcanberra -.endif +. endif -.if ${PORT_OPTIONS:MDBUS} +. if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:devel/libnotify LIB_DEPENDS+= libdbus-glib-1.so:devel/dbus-glib \ libstartup-notification-1.so:x11/startup-notification MOZ_OPTIONS+= --enable-startup-notification -.else +. else MOZ_OPTIONS+= --disable-dbus --disable-libnotify -.endif +. endif -.if ${PORT_OPTIONS:MFFMPEG} +. if ${PORT_OPTIONS:MFFMPEG} # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg -.endif +. endif -.if ${PORT_OPTIONS:MGSTREAMER} +. if ${PORT_OPTIONS:MGSTREAMER} RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:multimedia/gstreamer1-libav USE_GSTREAMER1?=good libav MOZ_OPTIONS+= --enable-gstreamer=1.0 -.else +. else MOZ_OPTIONS+= --disable-gstreamer -.endif +. endif -.if ${PORT_OPTIONS:MGCONF} +. if ${PORT_OPTIONS:MGCONF} BUILD_DEPENDS+= ${gconf2_DETECT}:${gconf2_LIB_DEPENDS:C/.*://} USE_GNOME+= gconf2:build MOZ_OPTIONS+= --enable-gconf -.else +. else MOZ_OPTIONS+= --disable-gconf -.endif +. endif -.if ${PORT_OPTIONS:MGIO} && ! ${MOZ_TOOLKIT:Mcairo-qt} +. if ${PORT_OPTIONS:MGIO} && ! ${MOZ_TOOLKIT:Mcairo-qt} MOZ_OPTIONS+= --enable-gio -.else +. else MOZ_OPTIONS+= --disable-gio -.endif +. endif -.if ${PORT_OPTIONS:MGNOMEUI} +. if ${PORT_OPTIONS:MGNOMEUI} BUILD_DEPENDS+= ${libgnomeui_DETECT}:${libgnomeui_LIB_DEPENDS:C/.*://} USE_GNOME+= libgnomeui:build MOZ_OPTIONS+= --enable-gnomeui -.else +. else MOZ_OPTIONS+= --disable-gnomeui -.endif +. endif -.if ${PORT_OPTIONS:MLIBPROXY} +. if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:net/libproxy MOZ_OPTIONS+= --enable-libproxy -.else +. else MOZ_OPTIONS+= --disable-libproxy -.endif +. endif -.if ${PORT_OPTIONS:MPGO} +. if ${PORT_OPTIONS:MPGO} USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*} USE_DISPLAY=yes ALL_TARGET= profiledbuild MOZ_EXPORT+=MOZ_OPTIMIZE_FLAGS="-Os" MOZ_PGO_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" -.endif +. endif -.if ${PORT_OPTIONS:MALSA} +. if ${PORT_OPTIONS:MALSA} LIB_DEPENDS+= libasound.so:audio/alsa-lib RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins RUN_DEPENDS+= alsa-lib>=1.1.1_1:audio/alsa-lib MOZ_OPTIONS+= --enable-alsa -.endif +. endif -.if ${PORT_OPTIONS:MPULSEAUDIO} -. if ${PORT_OPTIONS:MALSA} +. if ${PORT_OPTIONS:MPULSEAUDIO} +. if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= pulseaudio>0:audio/pulseaudio -. else +. else # pull pulse package if we cannot fallback to another backend LIB_DEPENDS+= libpulse.so:audio/pulseaudio -. endif +. endif MOZ_OPTIONS+= --enable-pulseaudio -.else +. else MOZ_OPTIONS+= --disable-pulseaudio -.endif +. endif -.if ${MOZILLA_VER:R:R} >= 40 -.if ${PORT_OPTIONS:MRUST} +. if ${MOZILLA_VER:R:R} >= 40 +. if ${PORT_OPTIONS:MRUST} BUILD_DEPENDS+= rustc:${RUST_PORT} RUST_PORT?= lang/rust MOZ_OPTIONS+= --enable-rust -.else +. else MOZ_OPTIONS+= --disable-rust -.endif -.endif +. endif +. endif -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 -.else +. else MOZ_OPTIONS+= --disable-debug --enable-release -.endif +. endif -.if ${PORT_OPTIONS:MDTRACE} +. if ${PORT_OPTIONS:MDTRACE} MOZ_OPTIONS+= --enable-dtrace \ --disable-gold -. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100061 +. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100061 LIBS+= -lelf -. endif +. endif STRIP= -.else +. else MOZ_OPTIONS+= --disable-dtrace -.endif +. endif -.if ${MOZILLA_VER:R:R} < 40 -. if ${PORT_OPTIONS:MLOGGING} || ${PORT_OPTIONS:MDEBUG} +. if ${MOZILLA_VER:R:R} < 40 +. if ${PORT_OPTIONS:MLOGGING} || ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-logging -. else +. else MOZ_OPTIONS+= --disable-logging -. endif -.endif +. endif +. endif -.if ${PORT_OPTIONS:MPROFILE} +. if ${PORT_OPTIONS:MPROFILE} MOZ_OPTIONS+= --enable-profiling STRIP= -.else +. else MOZ_OPTIONS+= --disable-profiling -.endif +. endif -.if ${PORT_OPTIONS:MTEST} +. if ${PORT_OPTIONS:MTEST} USE_XORG+= xscrnsaver MOZ_OPTIONS+= --enable-tests -.else +. else MOZ_OPTIONS+= --disable-tests -.endif +. endif -.if !defined(STRIP) || ${STRIP} == "" +. if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip -.else +. else MOZ_OPTIONS+= --enable-strip --enable-install-strip -.endif +. endif # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be # used in .mozconfig. And client.mk automatically uses -jN where N # is what multiprocessing.cpu_count() returns. -.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) +. if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) MAKE_JOBS_NUMBER= 1 -.endif -.if defined(MAKE_JOBS_NUMBER) +. endif +. if defined(MAKE_JOBS_NUMBER) MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER} -.endif +. endif -.if defined(MOZ_MAKE_FLAGS) +. if defined(MOZ_MAKE_FLAGS) MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}" -.endif +. endif MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \ -e 's|@CFLAGS@|${CFLAGS}|g' \ @@ -481,29 +481,29 @@ -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS} -.if ${ARCH} == amd64 -. if ${USE_MOZILLA:M-nss} +. if ${ARCH} == amd64 +. if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin -. endif -.elif ${ARCH:Mpowerpc*} +. endif +. elif ${ARCH:Mpowerpc*} USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*} -. if ${ARCH} == "powerpc64" +. if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" CFLAGS+= -mminimal-toc -. endif -.elif ${ARCH} == "sparc64" +. endif +. elif ${ARCH} == "sparc64" # Work around miscompilation/mislinkage of the sCanonicalVTable hacks. MOZ_OPTIONS+= --disable-v1-string-abi -.endif +. endif -.else # bsd.port.post.mk +. else # bsd.port.post.mk pre-extract: gecko-pre-extract gecko-pre-extract: -.if ${PORT_OPTIONS:MPGO} +. if ${PORT_OPTIONS:MPGO} @${ECHO} "*****************************************************************" @${ECHO} "**************************** attention **************************" @${ECHO} "*****************************************************************" @@ -514,50 +514,50 @@ @${ECHO} " Do not interrupt or close ${MOZILLA} during this tests! " @${ECHO} "*****************************************************************" @sleep 10 -.endif +. endif post-patch: gecko-post-patch gecko-moz-pis-patch gecko-post-patch: -.if exists(${PKGINSTALL_INC}) +. if exists(${PKGINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGINSTALL_INC} > ${PKGINSTALL} -.endif -.if exists(${PKGDEINSTALL_INC}) +. endif +. if exists(${PKGDEINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGDEINSTALL_INC} > ${PKGDEINSTALL} -.endif +. endif @${RM} -f ${MOZCONFIG} -.if !defined(NOMOZCONFIG) +. if !defined(NOMOZCONFIG) @if [ -e ${PORT_MOZCONFIG} ] ; then \ ${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG} ; \ fi -.for arg in ${MOZ_OPTIONS} +. for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} -.endfor -.for arg in ${MOZ_MK_OPTIONS} +. endfor +. for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} -.endfor -.for var in ${MOZ_EXPORT} +. endfor +. for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} -.endfor -.endif # .if !defined(NOMOZCONFIG) -.if exists(${MOZSRC}/build/unix/mozilla-config.in) +. endfor +. endif # .if !defined(NOMOZCONFIG) +. if exists(${MOZSRC}/build/unix/mozilla-config.in) @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \ s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \ s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \ ${MOZSRC}/build/unix/mozilla-config.in -.endif -.if ${USE_MOZILLA:M-nspr} +. endif +. if ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \ done -.endif -.if ${USE_MOZILLA:M-nss} +. endif +. if ${USE_MOZILLA:M-nss} @${ECHO_MSG} "===> Applying NSS patches" @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \ done -.endif +. endif @for f in \ ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \ ${WRKSRC}/directory/c-sdk/configure \ @@ -598,9 +598,9 @@ # handles mozilla pis scripts. gecko-moz-pis-patch: -.for moz in ${MOZ_PIS_SCRIPTS} +. for moz in ${MOZ_PIS_SCRIPTS} @${MOZCONFIG_SED} < ${FILESDIR}/${moz} > ${WRKDIR}/${moz} -.endfor +. endfor do-configure: gecko-do-configure @@ -617,20 +617,20 @@ gecko-create-plist: # Create the plist ${RM} -f ${PLISTF} -.for dir in ${MOZILLA_PLIST_DIRS} +. for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} -.endfor +. endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} gecko-moz-pis-pre-install: -.if defined(MOZ_PIS_SCRIPTS) +. if defined(MOZ_PIS_SCRIPTS) ${MKDIR} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR} -.for moz in ${MOZ_PIS_SCRIPTS} +. for moz in ${MOZ_PIS_SCRIPTS} ${INSTALL_SCRIPT} ${WRKDIR}/${moz} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR} -.endfor -.endif +. endfor +. endif -.endif +. endif .endif # HERE THERE BE TACOS -- adamw Index: Mk/bsd.gstreamer.mk =================================================================== --- Mk/bsd.gstreamer.mk +++ Mk/bsd.gstreamer.mk @@ -383,38 +383,38 @@ .if defined(_POSTMKINCLUDED) && !defined(Gstreamer_Post_Include) Gstreamer_Post_Include= bsd.gstreamer.mk -.if (defined (USE_GSTREAMER) && defined(USE_GSTREAMER1)) +. if (defined (USE_GSTREAMER) && defined(USE_GSTREAMER1)) IGNORE= USE_GSTREAMER and USE_GSTREAMER1 can't be used together -.endif +. endif -.if defined(USE_GSTREAMER) -.for ext in ${USE_GSTREAMER} +. if defined(USE_GSTREAMER) +. for ext in ${USE_GSTREAMER} ${ext}_GST_PREFIX?= gstreamer-plugins- ${ext}_GST_VERSION?= ${GST_VERSION}${GST_MINOR_VERSION} ${ext}_NAME?= ${ext} -. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS}) +. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS}) BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${${ext}_DEPENDS} RUN_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${${ext}_DEPENDS} -. else +. else IGNORE= cannot install: unknown gstreamer ${GST_VERSION} plugin -- ${ext} -. endif -.endfor -.endif +. endif +. endfor +. endif -.if defined(USE_GSTREAMER1) -.for ext in ${USE_GSTREAMER1} +. if defined(USE_GSTREAMER1) +. for ext in ${USE_GSTREAMER1} ${ext}_GST_PREFIX?= gstreamer1-plugins- ${ext}_GST_VERSION?= ${GST1_VERSION}${GST1_MINIMAL_VERSION} ${ext}_NAME10?= ${ext} ${ext}_GST_DEPENDS?= ${${ext}_DEPENDS:S,gstreamer-,gstreamer1-,} -. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_GST_DEPENDS}) +. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_GST_DEPENDS}) BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${${ext}_GST_DEPENDS} RUN_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${${ext}_GST_DEPENDS} -. else +. else IGNORE= cannot install: unknown gstreamer ${GST1_VERSION} plugin -- ${ext} -. endif -.endfor -.endif +. endif +. endfor +. endif # The End .endif Index: Mk/bsd.java.mk =================================================================== --- Mk/bsd.java.mk +++ Mk/bsd.java.mk @@ -128,7 +128,7 @@ # Stage 5: Define all settings for the port to use # -. if defined(USE_JAVA) +. if defined(USE_JAVA) #------------------------------------------------------------------------------- @@ -148,15 +148,15 @@ SUB_LIST+= JAVASHAREDIR="${JAVASHAREDIR}" \ JAVAJARDIR="${JAVAJARDIR}" \ JAVALIBDIR="${JAVALIBDIR}" -. if defined(JAVA_VERSION) +. if defined(JAVA_VERSION) SUB_LIST+= JAVA_VERSION="${JAVA_VERSION}" -. endif -. if defined(JAVA_VENDOR) +. endif +. if defined(JAVA_VENDOR) SUB_LIST+= JAVA_VENDOR="${JAVA_VENDOR}" -. endif -. if defined(JAVA_OS) +. endif +. if defined(JAVA_OS) SUB_LIST+= JAVA_OS="${JAVA_OS}" -. endif +. endif # The complete list of Java versions, os and vendors supported. __JAVA_VERSION_LIST= 1.6 1.7 1.8 @@ -204,23 +204,23 @@ # From here, the port is using bsd.java.mk v2.0 # Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS} -. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS -. if defined(${variable}) +. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS +. if defined(${variable}) check-makevars:: @${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined -- clearing." .undef ${variable} -. endif -. endfor +. endif +. endfor # Error checking: JAVA_VERSION -.if !defined(_JAVA_VERSION_LIST_REGEXP) -. for v in ${_JAVA_VERSION_LIST} -. if defined(_JAVA_VERSION_LIST_REGEXP) +. if !defined(_JAVA_VERSION_LIST_REGEXP) +. for v in ${_JAVA_VERSION_LIST} +. if defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP:= ${_JAVA_VERSION_LIST_REGEXP}\| -. endif +. endif _JAVA_VERSION_LIST_REGEXP:= ${_JAVA_VERSION_LIST_REGEXP}$v -. endfor -.endif +. endfor +. endif check-makevars:: @@ -228,28 +228,28 @@ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE})) || true # Error checking: JAVA_VENDOR -.if !defined(_JAVA_VENDOR_LIST_REGEXP) -. for v in ${_JAVA_VENDOR_LIST} -. if defined(_JAVA_VENDOR_LIST_REGEXP) +. if !defined(_JAVA_VENDOR_LIST_REGEXP) +. for v in ${_JAVA_VENDOR_LIST} +. if defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP:= ${_JAVA_VENDOR_LIST_REGEXP}\| -. endif +. endif _JAVA_VENDOR_LIST_REGEXP:= ${_JAVA_VENDOR_LIST_REGEXP}$v -. endfor -.endif +. endfor +. endif check-makevars:: @test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_VENDOR_LIST_REGEXP}" || \ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VENDOR}\" is not a valid value for JAVA_VENDOR. It should be one or more of: ${_JAVA_VENDOR_LIST}"; \ ${FALSE})) || true # Error checking: JAVA_OS -.if !defined(_JAVA_OS_LIST_REGEXP) -. for v in ${_JAVA_OS_LIST} -. if defined(_JAVA_OS_LIST_REGEXP) +. if !defined(_JAVA_OS_LIST_REGEXP) +. for v in ${_JAVA_OS_LIST} +. if defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP:= ${_JAVA_OS_LIST_REGEXP}\| -. endif +. endif _JAVA_OS_LIST_REGEXP:= ${_JAVA_OS_LIST_REGEXP}$v -. endfor -.endif +. endfor +. endif check-makevars:: @test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_OS_LIST_REGEXP}" || \ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_OS}\" is not a valid value for JAVA_OS. It should be one or more of: ${_JAVA_OS_LIST}"; \ @@ -258,60 +258,60 @@ # Set default values for JAVA_BUILD and JAVA_RUN # When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre # (unless NO_BUILD is set) -. if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN) -. if !defined(NO_BUILD) +. if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN) +. if !defined(NO_BUILD) JAVA_BUILD= jdk -. endif +. endif JAVA_RUN= jre -. endif +. endif # JDK dependency setting . undef _JAVA_PORTS_INSTALLED . undef _JAVA_PORTS_POSSIBLE -. if defined(JAVA_VERSION) +. if defined(JAVA_VERSION) _JAVA_VERSION= ${JAVA_VERSION:S/1.6+/1.6 1.7+/:S/1.7+/1.7 1.8+/:S/1.8+/1.8/} -. else +. else _JAVA_VERSION= ${__JAVA_VERSION_LIST} -. endif -. if defined(JAVA_OS) +. endif +. if defined(JAVA_OS) _JAVA_OS= ${JAVA_OS} -. else +. else _JAVA_OS= ${_JAVA_OS_LIST} -. endif -. if defined(JAVA_VENDOR) +. endif +. if defined(JAVA_VENDOR) _JAVA_VENDOR= ${JAVA_VENDOR} -. else +. else _JAVA_VENDOR= ${_JAVA_VENDOR_LIST} -. endif +. endif -. for A_JAVA_PORT in ${_JAVA_PORTS_ALL} +. for A_JAVA_PORT in ${_JAVA_PORTS_ALL} A_JAVA_PORT_INFO:= ${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} A_JAVA_PORT_HOME= ${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,} A_JAVA_PORT_VERSION= ${A_JAVA_PORT_INFO:MVERSION=*:C/VERSION=([0-9])\.([0-9])(.*)/\1.\2/} A_JAVA_PORT_OS= ${A_JAVA_PORT_INFO:MOS=*:S,OS=,,} A_JAVA_PORT_VENDOR= ${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} -.if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE}) +. if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE}) __JAVA_PORTS_INSTALLED+= ${A_JAVA_PORT} -.endif +. endif # Because variables inside for loops are special (directly replaced as strings), # we are allowed to use them inside modifiers, where normally ${FOO:M${BAR}} is # not allowed. # -.for ver in ${A_JAVA_PORT_VERSION} -.for os in ${A_JAVA_PORT_OS} -.for vendor in ${A_JAVA_PORT_VENDOR} -.if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}} +. for ver in ${A_JAVA_PORT_VERSION} +. for os in ${A_JAVA_PORT_OS} +. for vendor in ${A_JAVA_PORT_VENDOR} +. if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}} __JAVA_PORTS_POSSIBLE+= ${A_JAVA_PORT} -.endif -.endfor -.endfor -.endfor +. endif +. endfor +. endfor +. endfor -. endfor -.if !defined(_JAVA_PORTS_INSTALLED) +. endfor +. if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED= ${__JAVA_PORTS_INSTALLED:C/ [ ]+/ /g} -.endif +. endif _JAVA_PORTS_POSSIBLE= ${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g} @@ -323,27 +323,27 @@ . undef _JAVA_PORTS_INSTALLED_POSSIBLE -. for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE} +. for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE} __JAVA_PORTS_INSTALLED_POSSIBLE+= ${_JAVA_PORTS_INSTALLED:M${A_JAVA_PORT}} -. endfor +. endfor _JAVA_PORTS_INSTALLED_POSSIBLE= ${__JAVA_PORTS_INSTALLED_POSSIBLE:C/[ ]+//g} -. if ${_JAVA_PORTS_INSTALLED_POSSIBLE} != "" -. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} -. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) +. if ${_JAVA_PORTS_INSTALLED_POSSIBLE} != "" +. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} +. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) _JAVA_PORT= $i _JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit= 1 -. endif -. endfor +. endif +. endfor # If no installed JDK port fits, then pick one from the list of possible ones -. else -. for i in ${_JAVA_PORTS_POSSIBLE} -. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) +. else +. for i in ${_JAVA_PORTS_POSSIBLE} +. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) _JAVA_PORT= $i _JAVA_PORTS_POSSIBLE_shortcircuit= 1 -. endif -. endfor -. endif +. endif +. endfor +. endif _JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,} @@ -360,40 +360,40 @@ # # Ant Support: USE_ANT --> JAVA_BUILD=jdk -. if defined(USE_ANT) +. if defined(USE_ANT) JAVA_BUILD= jdk -. endif +. endif # Add the JDK port to the dependencies DEPEND_JAVA= ${JAVA}:${JAVA_PORT} -. if defined(JAVA_EXTRACT) +. if defined(JAVA_EXTRACT) EXTRACT_DEPENDS+= ${DEPEND_JAVA} -. endif -. if defined(JAVA_BUILD) -. if defined(NO_BUILD) +. endif +. if defined(JAVA_BUILD) +. if defined(NO_BUILD) check-makevars:: @${ECHO_CMD} "${PKGNAME}: Makefile error: JAVA_BUILD and NO_BUILD cannot be set at the same time."; @${FALSE} -. endif +. endif BUILD_DEPENDS+= ${DEPEND_JAVA} -. endif -. if defined(JAVA_RUN) +. endif +. if defined(JAVA_RUN) RUN_DEPENDS+= ${DEPEND_JAVA} -. endif +. endif # Ant support: default do-build target -. if defined(USE_ANT) +. if defined(USE_ANT) DESTDIRNAME?= -Dfreebsd.ports.destdir ANT?= ${LOCALBASE}/bin/ant MAKE_ENV+= JAVA_HOME=${JAVA_HOME} BUILD_DEPENDS+= ${ANT}:devel/apache-ant ALL_TARGET?= -. if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) -. endif -. endif +. endif +. endif #----------------------------------------------------------------------------- # Stage 5: Define all settings for the port to use @@ -406,11 +406,11 @@ . undef JAVAC # Then test if a JAVAC has to be set (JAVA_BUILD==jdk) -. if defined(JAVA_BUILD) -. if (${JAVA_BUILD:tu} == "JDK") && !defined(JAVAC) +. if defined(JAVA_BUILD) +. if (${JAVA_BUILD:tu} == "JDK") && !defined(JAVAC) JAVAC?= ${JAVA_HOME}/bin/javac -. endif -. endif +. endif +. endif # Define the location of some more executables. APPLETVIEWER?= ${JAVA_HOME}/bin/appletviewer @@ -463,5 +463,5 @@ @${ECHO_CMD} "JAVAC= ${JAVAC}" @${ECHO_CMD} "JAVA_CLASSES= ${JAVA_CLASSES}" -. endif +. endif .endif Index: Mk/bsd.kde4.mk =================================================================== --- Mk/bsd.kde4.mk +++ Mk/bsd.kde4.mk @@ -99,15 +99,15 @@ # Keep in sync with cmake/modules/PythonMacros.cmake _PYTHON_SHORT_VER= ${PYTHON_VERSION:S/^python//:S/.//} -.if ${_PYTHON_SHORT_VER} > 31 +. if ${_PYTHON_SHORT_VER} > 31 PLIST_SUB+= PYCACHE="__pycache__/" \ PYC_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyc \ PYO_SUFFIX=cpython-${_PYTHON_SHORT_VER}.pyo -.else +. else PLIST_SUB+= PYCACHE="" \ PYC_SUFFIX=pyc \ PYO_SUFFIX=pyo -.endif +. endif .endif # !defined(_POSTMKINCLUDED) && !defined(Kde_Pre_Include) @@ -262,37 +262,37 @@ strigi_PATH= ${LOCALBASE}/lib/libstreamanalyzer.so.0 # Iterate through components deprived of suffix. -.for component in ${USE_KDE4:O:u:C/_.+//} +. for component in ${USE_KDE4:O:u:C/_.+//} # Check that the component is valid. -. if ${_USE_KDE4_ALL:M${component}} != "" +. if ${_USE_KDE4_ALL:M${component}} != "" # Skip meta-components -. if defined(${component}_PORT) && defined(${component}_PATH) +. if defined(${component}_PORT) && defined(${component}_PATH) ${component}_DEPENDS= ${${component}_PATH}:${${component}_PORT} # Check if a dependency type is explicitly requested. -. if ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == "" +. if ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == "" ${component}_TYPE= # empty -. if ${USE_KDE4:M${component}_build} != "" +. if ${USE_KDE4:M${component}_build} != "" ${component}_TYPE+= build -. endif -. if ${USE_KDE4:M${component}_run} != "" +. endif +. if ${USE_KDE4:M${component}_run} != "" ${component}_TYPE+= run -. endif -. endif # ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == "" +. endif +. endif # ${USE_KDE4:M${component}_*} != "" && ${USE_KDE4:M${component}} == "" # If no dependency type is set, default to full dependency. -. if !defined(${component}_TYPE) +. if !defined(${component}_TYPE) ${component}_TYPE= build run -. endif +. endif # Set real dependencies. -. if ${${component}_TYPE:Mbuild} != "" +. if ${${component}_TYPE:Mbuild} != "" BUILD_DEPENDS+= ${${component}_DEPENDS} -. endif -. if ${${component}_TYPE:Mrun} != "" +. endif +. if ${${component}_TYPE:Mrun} != "" RUN_DEPENDS+= ${${component}_DEPENDS} -. endif -. endif # defined(${component}_PORT) && defined(${component}_PATH) -. else # ! ${_USE_KDE4_ALL:M${component}} != "" +. endif +. endif # defined(${component}_PORT) && defined(${component}_PATH) +. else # ! ${_USE_KDE4_ALL:M${component}} != "" IGNORE= can't be installed: unknown USE_KDE4 component '${component}' -. endif # ${_USE_KDE4_ALL:M${component}} != "" -.endfor +. endif # ${_USE_KDE4_ALL:M${component}} != "" +. endfor .endif # defined(_POSTMKINCLUDED) && !defined(Kde_Post_Include) Index: Mk/bsd.ldap.mk =================================================================== --- Mk/bsd.ldap.mk +++ Mk/bsd.ldap.mk @@ -33,67 +33,67 @@ # OPENLDAP_VER # - Detected OpenLDAP version. -.if defined(USE_OPENLDAP) +. if defined(USE_OPENLDAP) DEFAULT_OPENLDAP_VER?= 24 # OpenLDAP client versions currently supported OPENLDAP23_LIB= libldap-2.3.so.2 OPENLDAP24_LIB= libldap-2.4.so.2 -.if exists(${LOCALBASE}/bin/ldapwhoami) +. if exists(${LOCALBASE}/bin/ldapwhoami) _OPENLDAP_VER!= ${LOCALBASE}/bin/ldapwhoami -VV 2>&1 | ${GREP} ldapwhoami | ${SED} -E 's/.*OpenLDAP: ldapwhoami (2)\.(3|4).*/\1\2/' -.endif +. endif -.if defined(WANT_OPENLDAP_VER) -.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER} != ${WANT_OPENLDAP_VER} +. if defined(WANT_OPENLDAP_VER) +. if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER} != ${WANT_OPENLDAP_VER} IGNORE= cannot install: the port wants openldap${WANT_OPENLDAP_VER}-client and you try to install openldap${WITH_OPENLDAP_VER}-client. -.endif +. endif OPENLDAP_VER= ${WANT_OPENLDAP_VER} -.elif defined(WITH_OPENLDAP_VER) +. elif defined(WITH_OPENLDAP_VER) OPENLDAP_VER= ${WITH_OPENLDAP_VER} -.else -.if defined(_OPENLDAP_VER) +. else +. if defined(_OPENLDAP_VER) OPENLDAP_VER= ${_OPENLDAP_VER} -.else +. else OPENLDAP_VER= ${DEFAULT_OPENLDAP_VER} -.endif -.endif # WANT_OPENLDAP_VER +. endif +. endif # WANT_OPENLDAP_VER -.if defined(_OPENLDAP_VER) -.if ${_OPENLDAP_VER} != ${OPENLDAP_VER} +. if defined(_OPENLDAP_VER) +. if ${_OPENLDAP_VER} != ${OPENLDAP_VER} IGNORE= cannot install: OpenLDAP versions mismatch: openldap${_OPENLDAP_VER}-client is installed and wanted version is openldap${OPENLDAP_VER}-client -.endif -.endif +. endif +. endif CFLAGS+= -DLDAP_DEPRECATED _OPENLDAP_CLIENT_PKG!= ${PKG_INFO} -Ex openldap.\*-client 2>/dev/null; ${ECHO_CMD} _OPENLDAP_FLAVOUR= ${_OPENLDAP_CLIENT_PKG:C/openldap//:C/-client-.*//} -.if defined(WANT_OPENLDAP_SASL) -.if !empty(_OPENLDAP_CLIENT_PKG) && empty(_OPENLDAP_FLAVOUR) +. if defined(WANT_OPENLDAP_SASL) +. if !empty(_OPENLDAP_CLIENT_PKG) && empty(_OPENLDAP_FLAVOUR) IGNORE= cannot install: SASL support requested and ${_OPENLDAP_CLIENT_PKG} is installed -.endif +. endif _OPENLDAP_FLAVOUR= -sasl -.endif +. endif # And now we are checking if we can use it -.if defined(OPENLDAP${OPENLDAP_VER}_LIB) +. if defined(OPENLDAP${OPENLDAP_VER}_LIB) # compatability shim -.if defined(BROKEN_WITH_OPENLDAP) +. if defined(BROKEN_WITH_OPENLDAP) IGNORE_WITH_OPENLDAP=${BROKEN_WITH_OPENLDAP} -.endif -.if defined(IGNORE_WITH_OPENLDAP) -. for VER in ${IGNORE_WITH_OPENLDAP} -. if (${OPENLDAP_VER} == "${VER}") +. endif +. if defined(IGNORE_WITH_OPENLDAP) +. for VER in ${IGNORE_WITH_OPENLDAP} +. if (${OPENLDAP_VER} == "${VER}") IGNORE= cannot install: doesn't work with OpenLDAP version: ${OPENLDAP_VER} (Doesn't support OpenLDAP ${IGNORE_WITH_OPENLDAP}) -. endif -. endfor -.endif # IGNORE_WITH_OPENLDAP +. endif +. endfor +. endif # IGNORE_WITH_OPENLDAP LIB_DEPENDS+= ${OPENLDAP${OPENLDAP_VER}_LIB}:net/openldap${OPENLDAP_VER}${_OPENLDAP_FLAVOUR}-client -.else +. else IGNORE= cannot install: unknown OpenLDAP version: ${OPENLDAP_VER} -.endif # Check for correct libs +. endif # Check for correct libs -.endif # defined(USE_OPENLDAP) +. endif # defined(USE_OPENLDAP) .endif # defined(_POSTMKINCLUDED) && !defined(Ldap_Post_Include) Index: Mk/bsd.licenses.db.mk =================================================================== --- Mk/bsd.licenses.db.mk +++ Mk/bsd.licenses.db.mk @@ -277,9 +277,9 @@ # Set default permissions if not defined .for lic in ${_LICENSE_LIST} -. if !defined(_LICENSE_PERMS_${lic}) +. if !defined(_LICENSE_PERMS_${lic}) # note that space before = is needed to correctly handle licenses # ending with a plus sign _LICENSE_PERMS_${lic} = ${_LICENSE_PERMS_DEFAULT} -. endif +. endif .endfor Index: Mk/bsd.licenses.mk =================================================================== --- Mk/bsd.licenses.mk +++ Mk/bsd.licenses.mk @@ -129,7 +129,7 @@ .if defined(_POSTMKINCLUDED) && !defined(BEFOREPORTMK) -.if defined(LICENSE) +. if defined(LICENSE) # Include known licenses from database @@ -169,37 +169,37 @@ # _LICENSE_COMB - Copy of LICENSE_COMB (but "single" instead of empty) _LICENSE?= ${LICENSE} -.if !defined(LICENSE_COMB) +. if !defined(LICENSE_COMB) _LICENSE_COMB= single -.else +. else _LICENSE_COMB= ${LICENSE_COMB} -.endif +. endif # Check if single or dual/multiple license # # Make sure LICENSE_COMB is only used with more than one license. -.if ${_LICENSE_COMB} != "single" && ${_LICENSE_COMB} != "dual" && ${_LICENSE_COMB} != "multi" +. if ${_LICENSE_COMB} != "single" && ${_LICENSE_COMB} != "dual" && ${_LICENSE_COMB} != "multi" _LICENSE_ERROR?= invalid value for LICENSE_COMB: "${_LICENSE_COMB}" (should be "single", "dual" or "multi") -.endif +. endif -.for lic in ${_LICENSE} -. if defined(_LICENSE_DEFINED) -. if ${_LICENSE_COMB} == "single" +. for lic in ${_LICENSE} +. if defined(_LICENSE_DEFINED) +. if ${_LICENSE_COMB} == "single" _LICENSE_ERROR?= multiple licenses in LICENSE, but LICENSE_COMB is set to "single" (or undefined) -. else +. else _LICENSE_MULTI= yes -. endif -. else +. endif +. else _LICENSE_DEFINED= yes -. endif -.endfor -.if ${_LICENSE_COMB} != "single" && !defined(_LICENSE_MULTI) +. endif +. endfor +. if ${_LICENSE_COMB} != "single" && !defined(_LICENSE_MULTI) _LICENSE_ERROR?= single license in LICENSE, but LICENSE_COMB is set to "${_LICENSE_COMB}" (requires more than one) -.endif -.if !defined(_LICENSE_DEFINED) +. endif +. if !defined(_LICENSE_DEFINED) _LICENSE_ERROR?= no licenses present in LICENSE (empty string) -.endif +. endif .undef _LICENSE_DEFINED .undef _LICENSE_MULTI @@ -213,167 +213,167 @@ # Make sure required variables are defined, and remove conflicting (positive # and negative) duplicated components. -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" # Defaults to empty _LICENSE_GROUPS?= # # Start -. for lic in ${_LICENSE} -. if ${_LICENSE_LIST:M${lic}} != "" +. for lic in ${_LICENSE} +. if ${_LICENSE_LIST:M${lic}} != "" # Case 1: license defined in the framework. _LICENSE_TYPE= known -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}) _LICENSE_ERROR?= redefining LICENSE_${var} is not allowed for known licenses, to define a custom license try another LICENSE name like ${_LICENSE}-variant -. endif -. if !defined(_LICENSE_${var}_${lic}) +. endif +. if !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= ERROR: missing _LICENSE_${var}_${lic} in bsd.licenses.db.mk -. else +. else _LICENSE_${var}= ${_LICENSE_${var}_${lic}} -. endif -. endfor +. endif +. endfor # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE) -. if !defined(LICENSE_TEXT) -. if exists(${_LICENSE_STORE}/${lic}) +. if !defined(LICENSE_FILE) +. if !defined(LICENSE_TEXT) +. if exists(${_LICENSE_STORE}/${lic}) _LICENSE_FILE= ${_LICENSE_STORE}/${lic} -. else +. else # No license file in /usr/ports/Templates/Licenses _LICENSE_TEXT= The license: ${_LICENSE} (${_LICENSE_NAME}) is standard, please read from the web. _LICENSE_FILE= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_ERROR?= defining LICENSE_TEXT is not allowed for known licenses -. endif -. else +. endif +. else _LICENSE_FILE= ${LICENSE_FILE} -. endif +. endif -. else +. else # Case 2: license only known by the port. _LICENSE_TYPE= unknown -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}) _LICENSE_${var}= ${LICENSE_${var}} -. elif !defined(_LICENSE_${var}) +. elif !defined(_LICENSE_${var}) _LICENSE_ERROR?= for unknown licenses, defining LICENSE_${var} is mandatory (otherwise use a known LICENSE) -. endif -. endfor +. endif +. endfor # Check LICENSE_PERMS for invalid, ambiguous and duplicate components __LICENSE_PERMS:= # -. for comp in ${_LICENSE_PERMS} -. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" +. for comp in ${_LICENSE_PERMS} +. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" _LICENSE_ERROR?= invalid LICENSE_PERMS component "${comp}" -. elif ${__LICENSE_PERMS:M${comp}} == "" && \ +. elif ${__LICENSE_PERMS:M${comp}} == "" && \ ${_LICENSE_PERMS:Mno-${comp:C/^no-//}} == "" __LICENSE_PERMS+= ${comp} -. endif -. endfor +. endif +. endfor _LICENSE_PERMS:= ${__LICENSE_PERMS} . undef __LICENSE_PERMS # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE) -. if !defined(LICENSE_TEXT) +. if !defined(LICENSE_FILE) +. if !defined(LICENSE_TEXT) _LICENSE_ERROR?= either LICENSE_FILE or LICENSE_TEXT must be defined -. else +. else _LICENSE_TEXT= ${LICENSE_TEXT} _LICENSE_FILE= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_FILE= ${LICENSE_FILE} -. endif -. endif +. endif +. endif # Only one is allowed -. if defined(LICENSE_FILE) && defined(LICENSE_TEXT) +. if defined(LICENSE_FILE) && defined(LICENSE_TEXT) _LICENSE_ERROR?= defining both LICENSE_FILE and LICENSE_TEXT is not allowed -. endif +. endif # Distfiles -. if !defined(LICENSE_DISTFILES) +. if !defined(LICENSE_DISTFILES) _LICENSE_DISTFILES= ${_DISTFILES} -. else +. else _LICENSE_DISTFILES= ${LICENSE_DISTFILES} -. endif -. endfor +. endif +. endfor -.else -. for lic in ${_LICENSE} +. else +. for lic in ${_LICENSE} # Defaults to empty _LICENSE_GROUPS_${lic}?=# -. if ${_LICENSE_LIST:M${lic}} != "" +. if ${_LICENSE_LIST:M${lic}} != "" # Case 1: license defined in the framework. _LICENSE_TYPE_${lic} = known -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}_${lic}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}_${lic}) _LICENSE_ERROR?= redefining LICENSE_${var}_${lic} is not allowed for known licenses, to define a custom license try another LICENSE name for ${lic} like ${lic}-variant -. endif -. if !defined(_LICENSE_${var}_${lic}) +. endif +. if !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= ERROR: missing _LICENSE_${var}_${lic} in bsd.licenses.db.mk -. endif -. endfor +. endif +. endfor # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE_${lic}) -. if !defined(LICENSE_TEXT_${lic}) -. if exists(${_LICENSE_STORE}/${lic}) +. if !defined(LICENSE_FILE_${lic}) +. if !defined(LICENSE_TEXT_${lic}) +. if exists(${_LICENSE_STORE}/${lic}) _LICENSE_FILE_${lic} = ${_LICENSE_STORE}/${lic} -. else +. else # No license file in /usr/ports/Templates/Licenses _LICENSE_TEXT_${lic} = The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web. _LICENSE_FILE_${lic} = ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_ERROR?= defining LICENSE_TEXT_${lic} is not allowed for known licenses -. endif -. else +. endif +. else _LICENSE_FILE_${lic} = ${LICENSE_FILE_${lic}} -. endif +. endif -. else +. else # Case 2: license only known by the port. _LICENSE_TYPE_${lic} = unknown -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}_${lic}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}_${lic}) _LICENSE_${var}_${lic} = ${LICENSE_${var}_${lic}} -. elif !defined(_LICENSE_${var}_${lic}) +. elif !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= for unknown licenses, defining LICENSE_${var}_${lic} is mandatory (otherwise use a known LICENSE) -. endif -. endfor +. endif +. endfor # Check LICENSE_PERMS for invalid, ambiguous and duplicate components __LICENSE_PERMS:= # -. for comp in ${_LICENSE_PERMS_${lic}} -. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" +. for comp in ${_LICENSE_PERMS_${lic}} +. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" _LICENSE_ERROR?= invalid LICENSE_PERMS_${var} component "${comp}" -. elif ${__LICENSE_PERMS:M${comp}} == "" && \ +. elif ${__LICENSE_PERMS:M${comp}} == "" && \ ${_LICENSE_PERMS_${lic}:Mno-${comp:C/^no-//}} == "" __LICENSE_PERMS+= ${comp} -. endif -. endfor +. endif +. endfor _LICENSE_PERMS_${lic}:= ${__LICENSE_PERMS} . undef __LICENSE_PERMS # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE_${lic}) -. if !defined(LICENSE_TEXT_${lic}) +. if !defined(LICENSE_FILE_${lic}) +. if !defined(LICENSE_TEXT_${lic}) _LICENSE_ERROR?= either LICENSE_FILE_${lic} or LICENSE_TEXT_${lic} must be defined -. else +. else _LICENSE_TEXT_${lic} = ${LICENSE_TEXT_${lic}} _LICENSE_FILE_${lic} = ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_FILE_${lic} = ${LICENSE_FILE_${lic}} -. endif -. endif +. endif +. endif # Only one is allowed -. if defined(LICENSE_FILE_${lic}) && defined(LICENSE_TEXT_${lic}) +. if defined(LICENSE_FILE_${lic}) && defined(LICENSE_TEXT_${lic}) _LICENSE_ERROR?= defining both LICENSE_FILE_${lic} and LICENSE_TEXT_${lic}is not allowed -. endif +. endif # Distfiles -. if !defined(LICENSE_DISTFILES_${lic}) +. if !defined(LICENSE_DISTFILES_${lic}) _LICENSE_DISTFILES_${lic} = ${_DISTFILES} -. else +. else _LICENSE_DISTFILES_${lic} = ${LICENSE_DISTFILES_${lic}} -. endif -. endfor -.endif +. endif +. endfor +. endif # Check if the user agrees with the license @@ -386,129 +386,129 @@ # Evaluate per-license status -.if ${_LICENSE_COMB} == "single" -. for lic in ${_LICENSE} -. if ${LICENSES_REJECTED:M${lic}} != "" +. if ${_LICENSE_COMB} == "single" +. for lic in ${_LICENSE} +. if ${LICENSES_REJECTED:M${lic}} != "" _LICENSE_STATUS?= rejected -. endif -. for group in ${_LICENSE_GROUPS} -. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" +. endif +. for group in ${_LICENSE_GROUPS} +. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" _LICENSE_STATUS?= rejected -. endif -. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" +. endif +. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" _LICENSE_STATUS?= accepted -. endif -. endfor -. if ${LICENSES_ACCEPTED:M${lic}} != "" +. endif +. endfor +. if ${LICENSES_ACCEPTED:M${lic}} != "" _LICENSE_STATUS?= accepted -. endif -. if ${_LICENSE_PERMS:Mauto-accept} != "" && !defined(LICENSES_ASK) +. endif +. if ${_LICENSE_PERMS:Mauto-accept} != "" && !defined(LICENSES_ASK) _LICENSE_STATUS?= accepted -. endif +. endif _LICENSE_STATUS?= ask -. endfor +. endfor -.else -. for lic in ${_LICENSE} -. if ${LICENSES_REJECTED:M${lic}} != "" +. else +. for lic in ${_LICENSE} +. if ${LICENSES_REJECTED:M${lic}} != "" _LICENSE_STATUS_${lic}?= rejected -. endif -. for group in ${_LICENSE_GROUPS_${lic}} -. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" +. endif +. for group in ${_LICENSE_GROUPS_${lic}} +. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" _LICENSE_STATUS_${lic}?= rejected -. endif -. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" +. endif +. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" _LICENSE_STATUS_${lic}?= accepted -. endif -. endfor -. if ${LICENSES_ACCEPTED:M${lic}} != "" +. endif +. endfor +. if ${LICENSES_ACCEPTED:M${lic}} != "" _LICENSE_STATUS_${lic}?= accepted -. endif -. if ${_LICENSE_PERMS_${lic}:Mauto-accept} != "" && !defined(LICENSES_ASK) +. endif +. if ${_LICENSE_PERMS_${lic}:Mauto-accept} != "" && !defined(LICENSES_ASK) _LICENSE_STATUS_${lic}?= accepted -. endif +. endif _LICENSE_STATUS_${lic}?= ask -. endfor -.endif +. endfor +. endif # Evaluate general status -.if ${_LICENSE_COMB} == "dual" -. for lic in ${_LICENSE} -. if ${_LICENSE_STATUS_${lic}} == "accepted" +. if ${_LICENSE_COMB} == "dual" +. for lic in ${_LICENSE} +. if ${_LICENSE_STATUS_${lic}} == "accepted" _LICENSE_STATUS= accepted -. elif ${_LICENSE_STATUS_${lic}} == "ask" +. elif ${_LICENSE_STATUS_${lic}} == "ask" _LICENSE_STATUS?= ask _LICENSE_TO_ASK+= ${lic} -. endif +. endif _LICENSE_STATUS?= rejected -. endfor +. endfor -.elif ${_LICENSE_COMB} == "multi" -. for lic in ${_LICENSE} -. if ${_LICENSE_STATUS_${lic}} == "rejected" +. elif ${_LICENSE_COMB} == "multi" +. for lic in ${_LICENSE} +. if ${_LICENSE_STATUS_${lic}} == "rejected" _LICENSE_STATUS= rejected -. elif ${_LICENSE_STATUS_${lic}} == "ask" +. elif ${_LICENSE_STATUS_${lic}} == "ask" _LICENSE_STATUS?= ask _LICENSE_TO_ASK+= ${lic} -. endif -. endfor +. endif +. endfor _LICENSE_STATUS?= accepted -.endif +. endif # For dual/multi licenses, after processing all sub-licenses, the following # must be determined: _LICENSE_NAME, _LICENSE_PERMS and _LICENSE_GROUPS. -.if ${_LICENSE_COMB} == "dual" +. if ${_LICENSE_COMB} == "dual" _LICENSE_NAME= Dual (any of): ${_LICENSE} # Calculate least restrictive permissions (union) _LICENSE_PERMS:= # -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_PERMS} -. if ${_LICENSE_PERMS_${lic}:M${comp}} != "" && \ +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_PERMS} +. if ${_LICENSE_PERMS_${lic}:M${comp}} != "" && \ ${_LICENSE_PERMS:M${comp}} == "" _LICENSE_PERMS+= ${comp} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Calculate least restrictive groups (union) _LICENSE_GROUPS:= # -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_GROUPS} -. if ${_LICENSE_GROUPS_${lic}:M${comp}} != "" && \ +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_GROUPS} +. if ${_LICENSE_GROUPS_${lic}:M${comp}} != "" && \ ${_LICENSE_GROUPS:M${comp}} == "" _LICENSE_GROUPS+= ${comp} -. endif -. endfor -. endfor +. endif +. endfor +. endfor -.elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" _LICENSE_NAME= Multiple (all of): ${_LICENSE} # Calculate most restrictive permissions (intersection) _LICENSE_PERMS:= ${_LICENSE_LIST_PERMS} -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_PERMS} -. if ${_LICENSE_PERMS_${lic}:M${comp}} == "" +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_PERMS} +. if ${_LICENSE_PERMS_${lic}:M${comp}} == "" _LICENSE_PERMS:= ${_LICENSE_PERMS:N${comp}} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Calculate most restrictive groups (intersection) _LICENSE_GROUPS:= ${_LICENSE_LIST_GROUPS} -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_GROUPS} -. if ${_LICENSE_GROUPS_${lic}:M${comp}} == "" +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_GROUPS} +. if ${_LICENSE_GROUPS_${lic}:M${comp}} == "" _LICENSE_GROUPS:= ${_LICENSE_GROUPS:N${comp}} -. endif -. endfor -. endfor -.endif +. endif +. endfor +. endfor +. endif # Prepare information for asking license to the user -.if ${_LICENSE_STATUS} == "ask" && ${_LICENSE_COMB} != "single" +. if ${_LICENSE_STATUS} == "ask" && ${_LICENSE_COMB} != "single" _LICENSE_ASK_DATA!= mktemp -ut portslicense -.endif +. endif # Calculate restrictions and set RESTRICTED_FILES when # appropiate, together with cleaning targets. @@ -517,73 +517,73 @@ # CDROM and FTP, but the current framework supports separating them (would # require better/new delete-package and delete-distfiles targets) -.if ${_LICENSE_PERMS:Mpkg-mirror} == "" +. if ${_LICENSE_PERMS:Mpkg-mirror} == "" _LICENSE_RESTRICTED+= delete-package -.elif ${_LICENSE_PERMS:Mpkg-sell} == "" +. elif ${_LICENSE_PERMS:Mpkg-sell} == "" _LICENSE_CDROM+= delete-package -.endif +. endif -.if ${_LICENSE_COMB} == "multi" -. for lic in ${_LICENSE} -. if ${_LICENSE_PERMS_${lic}:Mdist-mirror} == "" || ${_LICENSE_PERMS_${lic}:Mdist-sell} == "" +. if ${_LICENSE_COMB} == "multi" +. for lic in ${_LICENSE} +. if ${_LICENSE_PERMS_${lic}:Mdist-mirror} == "" || ${_LICENSE_PERMS_${lic}:Mdist-sell} == "" RESTRICTED_FILES+= ${_LICENSE_DISTFILES_${lic}} -. endif -. endfor -. if defined(RESTRICTED_FILES) +. endif +. endfor +. if defined(RESTRICTED_FILES) RESTRICTED_FILES+= ${_PATCHFILES} _LICENSE_RESTRICTED+= delete-distfiles _LICENSE_CDROM+= delete-distfiles -. endif -.else -. if ${_LICENSE_PERMS:Mdist-mirror} == "" +. endif +. else +. if ${_LICENSE_PERMS:Mdist-mirror} == "" _LICENSE_RESTRICTED+= delete-distfiles RESTRICTED_FILES= ${_PATCHFILES} ${_DISTFILES} -. elif ${_LICENSE_PERMS:Mdist-sell} == "" +. elif ${_LICENSE_PERMS:Mdist-sell} == "" _LICENSE_CDROM+= delete-distfiles RESTRICTED_FILES= ${_PATCHFILES} ${_DISTFILES} -. endif -.endif +. endif +. endif -.if defined(_LICENSE_RESTRICTED) +. if defined(_LICENSE_RESTRICTED) # _LICENSE_RESTRICTED contains 'delete-distfiles' and 'delete-package' if # needed with RESTRICTED_FILES filled from above. clean-restricted: ${_LICENSE_RESTRICTED} clean-restricted-list: ${_LICENSE_RESTRICTED:C/$/-list/} -.else +. else clean-restricted: clean-restricted-list: -.endif +. endif -.if defined(_LICENSE_CDROM) +. if defined(_LICENSE_CDROM) clean-for-cdrom: ${_LICENSE_CDROM} clean-for-cdrom-list: ${_LICENSE_CDROM:C/$/-list/} -.else +. else clean-for-cdrom: clean-for-cdrom-list: -.endif +. endif # Check variables are correctly defined and print status up to here -.if ${_LICENSE_STATUS} == "ask" && defined(BATCH) +. if ${_LICENSE_STATUS} == "ask" && defined(BATCH) IGNORE= License ${_LICENSE} needs confirmation, but BATCH is defined -.endif +. endif check-license: -.if defined(_LICENSE_ERROR) +. if defined(_LICENSE_ERROR) @${ECHO_MSG} "===> License not correctly defined: ${_LICENSE_ERROR}" @exit 1 -.endif -.if ${_LICENSE_STATUS} == "rejected" +. endif +. if ${_LICENSE_STATUS} == "rejected" @${ECHO_MSG} "===> License ${_LICENSE} rejected by the user" @${ECHO_MSG} @${ECHO_MSG} "If you want to install this port make sure the following license(s) are not present in LICENSES_REJECTED, either in make arguments or /etc/make.conf: ${_LICENSE}. Also check LICENSES_GROUPS_REJECTED in case they contain a group this license(s) belong to." | ${FMT} @${ECHO_MSG} @exit 1 -.elif ${_LICENSE_STATUS} == "accepted" +. elif ${_LICENSE_STATUS} == "accepted" @${ECHO_MSG} "===> License ${_LICENSE} accepted by the user" -.elif ${_LICENSE_STATUS} == "ask" +. elif ${_LICENSE_STATUS} == "ask" @${ECHO_MSG} "===> License ${_LICENSE} needs confirmation, will ask later" -.endif +. endif # Display, ask and save preference if requested @@ -591,35 +591,35 @@ ${_LICENSE_COOKIE}: # Make sure all required license files exist -.if ${_LICENSE_COMB} == "single" -. if !defined(LICENSE_FILE) && defined(_LICENSE_TEXT) +. if ${_LICENSE_COMB} == "single" +. if !defined(LICENSE_FILE) && defined(_LICENSE_TEXT) @test -f ${_LICENSE_FILE} || ${ECHO_CMD} "${_LICENSE_TEXT}" | ${FMT} > ${_LICENSE_FILE} -. endif +. endif @test -f ${_LICENSE_FILE} || \ (${ECHO_MSG} "===> Missing license file for ${_LICENSE} in ${_LICENSE_FILE}"; exit 1) -.else -. for lic in ${_LICENSE} -. if !defined(LICENSE_FILE_${lic}) && defined(_LICENSE_TEXT_${lic}) +. else +. for lic in ${_LICENSE} +. if !defined(LICENSE_FILE_${lic}) && defined(_LICENSE_TEXT_${lic}) @test -f ${_LICENSE_FILE_${lic}} || ${ECHO_CMD} "${_LICENSE_TEXT_${lic}}" | ${FMT} > ${_LICENSE_FILE_${lic}} -. endif +. endif @test -f ${_LICENSE_FILE_${lic}} || \ (${ECHO_MSG} "===> Missing license file for ${lic} in ${_LICENSE_FILE_${lic}}"; exit 1) -. endfor -.endif +. endfor +. endif -.if ${_LICENSE_STATUS} == "ask" -. if !defined(NO_LICENSES_DIALOGS) +. if ${_LICENSE_STATUS} == "ask" +. if !defined(NO_LICENSES_DIALOGS) # Dialog interface -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \ --yes-label Accept --no-label Reject --yesno \ "$$(${CAT} ${_LICENSE_FILE})" 21 76 -. elif ${_LICENSE_COMB} == "dual" +. elif ${_LICENSE_COMB} == "dual" @${RM} -f ${_LICENSE_ASK_DATA} -. for lic in ${_LICENSE_TO_ASK} +. for lic in ${_LICENSE_TO_ASK} @${ECHO_CMD} "${lic}:${_LICENSE_FILE_${lic}}" >> ${_LICENSE_ASK_DATA} -. endfor +. endfor @menu_cmd="${DIALOG} --hline \"This port requires you to accept at least one license\" --menu \"License for ${PKGNAME} (dual)\" 21 70 15"; \ trap '${RM} -f $$tmpfile' EXIT INT TERM; \ tmpfile=$$(mktemp -t portlicenses); \ @@ -641,11 +641,11 @@ esac; \ done -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${RM} -f ${_LICENSE_ASK_DATA} -. for lic in ${_LICENSE_TO_ASK} +. for lic in ${_LICENSE_TO_ASK} @${ECHO_CMD} "${lic}:${_LICENSE_FILE_${lic}}" >> ${_LICENSE_ASK_DATA} -. endfor +. endfor @menu_cmd="${DIALOG} --hline \"This port requires you to accept all mentioned licenses\" --menu \"License for ${PKGNAME} (multi)\" 21 70 15"; \ trap '${RM} -f $$tmpfile' EXIT INT TERM; \ tmpfile=$$(mktemp -t portlicenses); \ @@ -664,112 +664,112 @@ ${DIALOG} --textbox "$${file}" 21 75 ;; \ esac; \ done -. endif +. endif -. else +. else # Text interface @${ECHO_MSG} -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${ECHO_MSG} "To install the port you must agree to the license: ${_LICENSE} (${_LICENSE_NAME})." | ${FMT} @${ECHO_MSG} @${ECHO_MSG} "You can view the license at ${_LICENSE_FILE:S/${WRKDIR}\//${WRKDIR:T}\//}." -. elif ${_LICENSE_COMB} == "dual" +. elif ${_LICENSE_COMB} == "dual" @${ECHO_MSG} "To install the port you must agree to any of the following licenses:" -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${ECHO_MSG} "To install the port you must agree to all of the following licenses:" -. endif +. endif @${ECHO_MSG} -. if ${_LICENSE_COMB} != "single" -. for lic in ${_LICENSE_TO_ASK} -. if defined(WRKDIRPREFIX) +. if ${_LICENSE_COMB} != "single" +. for lic in ${_LICENSE_TO_ASK} +. if defined(WRKDIRPREFIX) @${ECHO_MSG} "- ${lic} (${_LICENSE_NAME_${lic}}), available at ${_LICENSE_FILE_${lic}}" -. else +. else @${ECHO_MSG} "- ${lic} (${_LICENSE_NAME_${lic}}), available at ${_LICENSE_FILE_${lic}:S/${WRKDIR}\//${WRKDIR:T}\//}" -. endif -. endfor +. endif +. endfor @${ECHO_MSG} -. endif +. endif @${ECHO_MSG} "If you agree with the corresponding license(s), add them to LICENSES_ACCEPTED either in make arguments or /etc/make.conf." | ${FMT} @${ECHO_MSG} @exit 1 -. endif +. endif @${RM} -f ${_LICENSE_ASK_DATA} -.endif +. endif # Create report and catalog -.if !defined(NO_LICENSES_INSTALL) +. if !defined(NO_LICENSES_INSTALL) @${RM} -f ${_LICENSE_CATALOG_TMP} ${_LICENSE_REPORT_TMP} -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" # Catalog -. for var in _LICENSE _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS _LICENSE_DISTFILES +. for var in _LICENSE _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS _LICENSE_DISTFILES @${ECHO_CMD} "${var}=${${var}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor +. endfor # Report @${ECHO_CMD} "This package has a single license: ${_LICENSE} (${_LICENSE_NAME})." > ${_LICENSE_REPORT_TMP} -. else +. else # Catalog -. for var in _LICENSE _LICENSE_COMB _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS +. for var in _LICENSE _LICENSE_COMB _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS @${ECHO_CMD} "${var}=${${var}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor -. if ${_LICENSE_COMB} == "dual" && ${_LICENSE_STATUS} == "ask" +. endfor +. if ${_LICENSE_COMB} == "dual" && ${_LICENSE_STATUS} == "ask" @${SED} -e 's/^/_LICENSE_SELECTED=/' ${_LICENSE_COOKIE} >> ${_LICENSE_CATALOG_TMP} -. endif -. for lic in ${_LICENSE} -. for var in NAME PERMS GROUPS DISTFILES +. endif +. for lic in ${_LICENSE} +. for var in NAME PERMS GROUPS DISTFILES @${ECHO_CMD} "_LICENSE_${var}_${lic} =${_LICENSE_${var}_${lic}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor -. endfor +. endfor +. endfor # Report -. if ${_LICENSE_COMB} == "dual" +. if ${_LICENSE_COMB} == "dual" @${ECHO_CMD} "This package has dual licenses (any of):" >> ${_LICENSE_REPORT_TMP} -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${ECHO_CMD} "This package has multiple licenses (all of):" >> ${_LICENSE_REPORT_TMP} -. endif -. for lic in ${_LICENSE} +. endif +. for lic in ${_LICENSE} @${ECHO_CMD} "- ${lic} (${_LICENSE_NAME_${lic}})" >> ${_LICENSE_REPORT_TMP} -. endfor -. endif -.endif +. endfor +. endif +. endif # Cookie (done here) @${TOUCH} ${_LICENSE_COOKIE} # Package list entries, and installation -.if !defined(NO_LICENSES_INSTALL) +. if !defined(NO_LICENSES_INSTALL) PLIST_FILES+= ${_LICENSE_CATALOG} \ ${_LICENSE_REPORT} -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" PLIST_FILES+= ${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} -. if defined(_LICENSE_FILE_${lic}) +. else +. for lic in ${_LICENSE} +. if defined(_LICENSE_FILE_${lic}) PLIST_FILES+= ${_LICENSE_DIR}/${lic} -. endif -. endfor -.endif +. endif +. endfor +. endif install-license: @${MKDIR} ${STAGEDIR}${_LICENSE_DIR} @${INSTALL_DATA} ${_LICENSE_CATALOG_TMP} ${STAGEDIR}${_LICENSE_CATALOG} @${INSTALL_DATA} ${_LICENSE_REPORT_TMP} ${STAGEDIR}${_LICENSE_REPORT} -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${INSTALL_DATA} ${_LICENSE_FILE} ${STAGEDIR}${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} +. else +. for lic in ${_LICENSE} @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${STAGEDIR}${_LICENSE_DIR}/${lic} -. endfor -.endif -.endif +. endfor +. endif +. endif -.else # !LICENSE +. else # !LICENSE check-license: -. if defined(LICENSE_VERBOSE) +. if defined(LICENSE_VERBOSE) @${ECHO_MSG} "===> License check disabled, port has not defined LICENSE" -. endif +. endif -.endif # LICENSE +. endif # LICENSE .endif Index: Mk/bsd.linux-apps.mk =================================================================== --- Mk/bsd.linux-apps.mk +++ Mk/bsd.linux-apps.mk @@ -40,14 +40,14 @@ Linux_APPS_Post_Include= bsd.linux-apps.mk #new -. if defined(OVERRIDE_LINUX_NONBASE_PORTS) -. if ${OVERRIDE_LINUX_NONBASE_PORTS} == "f10" || ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6" || ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6_64" +. if defined(OVERRIDE_LINUX_NONBASE_PORTS) +. if ${OVERRIDE_LINUX_NONBASE_PORTS} == "f10" || ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6" || ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6_64" LINUX_DIST_SUFFIX= -${OVERRIDE_LINUX_NONBASE_PORTS} LINUX_BASEPORT_NAME= -${OVERRIDE_LINUX_NONBASE_PORTS:S/_64//} -. else +. else IGNORE= valid values for OVERRIDE_LINUX_NONBASE_PORTS are: \"f10\", \"c6\", and \"c6_64\" -. endif -. elif defined(USE_LINUX) +. endif +. elif defined(USE_LINUX) LINUX_DIST_SUFFIX= -${USE_LINUX} LINUX_BASEPORT_NAME= -${USE_LINUX:S/_64//} . else @@ -229,11 +229,11 @@ gdkpixbuf2_c6_FILE= ${LINUXBASE}/usr/lib/libgdk_pixbuf-2.0.so.0 gdkpixbuf2_c6_64_FILE= ${LINUXBASE}/usr/lib64/libgdk_pixbuf-2.0.so.0 gdkpixbuf2_DETECT= ${gdkpixbuf2${LINUX_DIST_SUFFIX:S/-/_/}_FILE} -.if ${USE_LINUX} == "f10" +. if ${USE_LINUX} == "f10" gdkpixbuf2_PORT= x11-toolkits/linux${LINUX_BASEPORT_NAME}-gtk2 -.else # default to CentOS 6. +. else # default to CentOS 6. gdkpixbuf2_PORT= graphics/linux${LINUX_BASEPORT_NAME}-gdk-pixbuf2 -.endif +. endif gnutls_f10_FILE= ${LINUXBASE}/usr/lib/libgnutls.so.26.4.6 gnutls_c6_FILE= ${LINUXBASE}/usr/lib/libgnutls.so.26.14.12 Index: Mk/bsd.linux-rpm.mk =================================================================== --- Mk/bsd.linux-rpm.mk +++ Mk/bsd.linux-rpm.mk @@ -44,12 +44,12 @@ NO_WRKSUBDIR= yes NO_BUILD= yes -. if ${USE_LINUX} == "c6" || ${USE_LINUX} == "c6_64" || ${USE_LINUX} == "yes" # default to CentOS +. if ${USE_LINUX} == "c6" || ${USE_LINUX} == "c6_64" || ${USE_LINUX} == "yes" # default to CentOS # Do not build CentOS 6 ports if overridden by f10 -. if defined(OVERRIDE_LINUX_NONBASE_PORTS) && ${OVERRIDE_LINUX_NONBASE_PORTS} == "f10" +. if defined(OVERRIDE_LINUX_NONBASE_PORTS) && ${OVERRIDE_LINUX_NONBASE_PORTS} == "f10" IGNORE= This port requires CentOS ${LINUX_DIST_VER}. Please remove OVERRIDE_LINUX_NONBASE_PORTS=f10 in /etc/make.conf. -. endif -. endif +. endif +. endif .endif @@ -57,50 +57,50 @@ Linux_RPM_Post_Include= bsd.linux-rpm.mk -.if ${USE_LINUX} == "f10" +. if ${USE_LINUX} == "f10" USE_LINUX?= "f10" LINUX_DIST= fedora LINUX_DIST_VER= 10 -.else # default to CentOS +. else # default to CentOS LINUX_DIST= centos LINUX_DIST_VER= 6.7 -.endif +. endif -.if defined(LINUX_DIST) +. if defined(LINUX_DIST) DIST_SUBDIR?= rpm/${LINUX_RPM_ARCH}/${LINUX_DIST}/${LINUX_DIST_VER} -. if ${LINUX_DIST} == "fedora" +. if ${LINUX_DIST} == "fedora" # we do not want to define MASTER_SITES and MASTER_SITE_* if they are already defined # ex.: MASTER_SITES=file:///... -. ifndef MASTER_SITES +. ifndef MASTER_SITES MASTER_SITES= ${MASTER_SITE_FEDORA_LINUX} -. if ${LINUX_DIST_VER} == 10 +. if ${LINUX_DIST_VER} == 10 MASTER_SITE_SUBDIR?= ../releases/${LINUX_DIST_VER}/Everything/${LINUX_RPM_ARCH}/os/Packages \ ../updates/${LINUX_DIST_VER}/${LINUX_RPM_ARCH} MASTER_SITE_SRC_SUBDIR?= ../releases/${LINUX_DIST_VER}/Everything/source/SRPMS \ ../updates/${LINUX_DIST_VER}/SRPMS -. else +. else MASTER_SITE_SUBDIR?= ${LINUX_DIST_VER}/${LINUX_RPM_ARCH}/os/Fedora/RPMS \ updates/${LINUX_DIST_VER}/${LINUX_RPM_ARCH} MASTER_SITE_SRC_SUBDIR?= ${LINUX_DIST_VER}/SRPMS \ updates/${LINUX_DIST_VER}/SRPMS -. endif -. endif -. elif ${LINUX_DIST} == "centos" +. endif +. endif +. elif ${LINUX_DIST} == "centos" MASTER_SITES?= ${MASTER_SITE_CENTOS_LINUX} ${MASTER_SITE_CENTOS_LINUX_UPDATES} MASTER_SITE_SUBDIR?= centos/${LINUX_DIST_VER}/os/${LINUX_REPO_ARCH}/Packages/ \ centos/${LINUX_DIST_VER}/updates/${LINUX_REPO_ARCH}/Packages/ -. if ${LINUX_DIST_VER} == "5" #needed for Qt... +. if ${LINUX_DIST_VER} == "5" #needed for Qt... LINUX_RPM_ARCH= i386 MASTER_SITE_SUBDIR= centos/5/os/i386/Packages/ -. endif -. if defined(PACKAGE_BUILDING) +. endif +. if defined(PACKAGE_BUILDING) _SRC_GROUP=:SOURCE MASTER_SITES+= http://vault.centos.org/%SUBDIR%/:SOURCE MASTER_SITE_SUBDIR+= ${LINUX_DIST_VER}/os/Source/SPackages/:SOURCE -. endif -. endif -.endif +. endif +. endif +. endif PKGNAMEPREFIX?= linux-${USE_LINUX}- @@ -125,36 +125,36 @@ # The following glue is supposed to handle this. # FIXME: Sensibly refactor this part, it looks like spaghetti. -. if defined(OVERRIDE_LINUX_NONBASE_PORTS) && ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6_64" +. if defined(OVERRIDE_LINUX_NONBASE_PORTS) && ${OVERRIDE_LINUX_NONBASE_PORTS} == "c6_64" _32BIT_LINUX_RPM_ARCH= i686 -. if ${DISTFILES} == ${DISTNAME}${EXTRACT_SUFX} && ${USE_LINUX_RPM} != "nolib" +. if ${DISTFILES} == ${DISTNAME}${EXTRACT_SUFX} && ${USE_LINUX_RPM} != "nolib" _32BIT_LIB_DISTFILES:= ${DISTFILES:S/${LINUX_RPM_ARCH}/${_32BIT_LINUX_RPM_ARCH}/g} -. elif defined(LIB_DISTFILES) +. elif defined(LIB_DISTFILES) _32BIT_LIB_DISTFILES= ${LIB_DISTFILES:S/${LINUX_RPM_ARCH}/${_32BIT_LINUX_RPM_ARCH}/g} -. endif +. endif BIN_DISTFILES:= ${BIN_DISTFILES} ${_32BIT_LIB_DISTFILES} DISTFILES+= ${_32BIT_LIB_DISTFILES} -. endif +. endif DISTFILES+= ${LIB_DISTFILES} -. if defined(PACKAGE_BUILDING) +. if defined(PACKAGE_BUILDING) DISTFILES+= ${SRC_DISTFILES} MASTER_SITE_SUBDIR+= ${MASTER_SITE_SRC_SUBDIR} ALWAYS_KEEP_DISTFILES= yes -. endif +. endif -.if !defined(USE_LINUX_RPM_BAD_PERMS) +. if !defined(USE_LINUX_RPM_BAD_PERMS) EXTRACT_CMD?= ${TAR} EXTRACT_BEFORE_ARGS?= --no-same-permissions --no-same-owner -xf EXTRACT_AFTER_ARGS?= -.else +. else EXTRACT_DEPENDS+= rpm2archive:archivers/rpm4 EXTRACT_CMD?= rpm2archive EXTRACT_BEFORE_ARGS?= < EXTRACT_AFTER_ARGS?= | ${TAR} xf - --no-same-permissions --no-same-owner -.endif +. endif DISTINFO_FILE?= ${MASTERDIR}/distinfo.${LINUX_RPM_ARCH} @@ -166,13 +166,13 @@ . if defined(PORTDOCS) && defined(NOPORTDOCS) pre-patch: linux-rpm-clean-portdocs -. if !target(linux-rpm-clean-portdocs) +. if !target(linux-rpm-clean-portdocs) linux-rpm-clean-portdocs: -. for x in ${PORTDOCS} +. for x in ${PORTDOCS} @${RM} -f ${WRKSRC}/${DOCSDIR_REL}/${x} -. endfor +. endfor @${RMDIR} ${WRKSRC}/${DOCSDIR_REL} -. endif +. endif . endif . if ${USE_LINUX} != "f10" @@ -181,38 +181,38 @@ . if defined(AUTOMATIC_PLIST) -. if ${USE_LINUX} == "f10" +. if ${USE_LINUX} == "f10" _LINUX_BASE_SUFFIX= f10 -. elif ${USE_LINUX} == "c6" || ${USE_LINUX} == "yes" +. elif ${USE_LINUX} == "c6" || ${USE_LINUX} == "yes" _LINUX_BASE_SUFFIX= c6 -. elif ${USE_LINUX} == "c6_64" +. elif ${USE_LINUX} == "c6_64" _LINUX_BASE_SUFFIX= c6 -. else +. else # other linux_base ports do not provide a pkg-plist file IGNORE= uses AUTOMATIC_PLIST with an unsupported USE_LINUX, \"${USE_LINUX}\". Supported values are \"yes\", \"f10\", \"c6\", and \"c6_64\" -. endif +. endif PLIST?= ${WRKDIR}/.PLIST.linux-rpm pre-install: linux-rpm-generate-plist -. if !target(linux-rpm-generate-plist) +. if !target(linux-rpm-generate-plist) linux-rpm-generate-plist: cd ${WRKSRC} && \ ${FIND} * ! -type d | ${SORT} > ${PLIST} -. endif +. endif . endif . if !target(do-install) do-install: -. if ${BRANDELF_DIRS} +. if ${BRANDELF_DIRS} @cd ${WRKSRC} && ${FIND} ${BRANDELF_DIRS} -type f -print0 \ | ${XARGS} -0 ${FILE} | ${GREP} ELF | ${CUT} -d : -f 1 \ | ${XARGS} ${BRANDELF} -t Linux -. endif -. if ${BRANDELF_FILES} +. endif +. if ${BRANDELF_FILES} @cd ${WRKSRC} && ${BRANDELF} -t Linux ${BRANDELF_FILES} -. endif +. endif cd ${WRKSRC} && ${FIND} * -type d -exec ${MKDIR} "${STAGEDIR}${PREFIX}/{}" \; cd ${WRKSRC} && ${FIND} * ! -type d | ${CPIO} -pm -R root:wheel ${STAGEDIR}${PREFIX} . endif Index: Mk/bsd.ocaml.mk =================================================================== --- Mk/bsd.ocaml.mk +++ Mk/bsd.ocaml.mk @@ -98,28 +98,28 @@ # ocaml-findlib-1.4.1_1 wants to edit our ld.conf file, which does not # work well with staging. -.if defined(USE_OCAML_LDCONFIG) -. if !target(ocaml-ldconfig) +. if defined(USE_OCAML_LDCONFIG) +. if !target(ocaml-ldconfig) OCAMLFIND_LDCONF?= /dev/null -. endif -.endif +. endif +. endif OCAMLFIND_DESTDIR?= ${PREFIX}/${OCAML_SITELIBDIR} OCAMLFIND_LDCONF?= ${PREFIX}/${OCAML_LDCONF} -.if defined(USE_OCAML) -. if !defined(NO_OCAML_BUILDDEPENDS) +. if defined(USE_OCAML) +. if !defined(NO_OCAML_BUILDDEPENDS) EXTRACT_DEPENDS+= ${OCAMLC_DEPEND} PATCH_DEPENDS+= ${OCAMLC_DEPEND} BUILD_DEPENDS+= ${OCAMLC_DEPEND} -. endif -. if !defined(NO_OCAML_RUNDEPENDS) +. endif +. if !defined(NO_OCAML_RUNDEPENDS) RUN_DEPENDS+= ${OCAMLC_DEPEND} -. endif +. endif PLIST_SUB+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" -.endif +. endif -.if defined(USE_OCAML_FINDLIB) +. if defined(USE_OCAML_FINDLIB) # # We'll additionally add ocamlfind to RUN_DEPENDS, since # if the port requires ocamlfind to install - it requires @@ -136,69 +136,69 @@ # OCAML_PKGDIRS?= ${PORTNAME} _USES_install+= 735:ocaml-findlib -. if !target(ocaml-findlib) +. if !target(ocaml-findlib) ocaml-findlib: -. for DIR in ${OCAML_PKGDIRS} -. if defined(USE_OCAMLFIND_PLIST) +. for DIR in ${OCAML_PKGDIRS} +. if defined(USE_OCAMLFIND_PLIST) @${FIND} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${DIR}/ -type f -print | ${SED} -e \ 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} -. endif +. endif @${ECHO_CMD} "@unexec ${OCAMLFIND} remove ${DIR} 2>/dev/null" \ >> ${TMPPLIST} -. endfor -. endif -.endif +. endfor +. endif +. endif -.if defined(USE_OCAML_CAMLP4) +. if defined(USE_OCAML_CAMLP4) BUILD_DEPENDS+= ${CAMLP4_DEPEND} -.endif +. endif -.if defined(USE_OCAML_TK) -. if !defined(NO_OCAMLTK_BUILDDEPENDS) +. if defined(USE_OCAML_TK) +. if !defined(NO_OCAMLTK_BUILDDEPENDS) EXTRACT_DEPENDS+= ${OCAMLTK_DEPENDS} PATCH_DEPENDS+= ${OCAMLTK_DEPENDS} BUILD_DEPENDS+= ${OCAMLTK_DEPENDS} -. endif -. if !defined(NO_OCAMLTK_RUNDEPENDS) +. endif +. if !defined(NO_OCAMLTK_RUNDEPENDS) RUN_DEPENDS+= ${OCAMLTK_DEPENDS} -. endif -.endif +. endif +. endif -.if defined(USE_OCAML_LDCONFIG) +. if defined(USE_OCAML_LDCONFIG) # # Directories under PREFIX for appending to ld.conf # OCAML_LDLIBS?= ${OCAML_SITELIBDIR}/${PORTNAME} _USES_install+= 740:ocaml-ldconfig -. if !target(ocaml-ldconfig) +. if !target(ocaml-ldconfig) ocaml-ldconfig: -. for LIB in ${OCAML_LDLIBS} +. for LIB in ${OCAML_LDLIBS} @${ECHO_CMD} "@postexec ${ECHO_CMD} "%D/${LIB}" >> %D/${OCAML_LDCONF}" \ >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${SED} -i \"\" -e '/${LIB:S#/#\/#g}/d' %D/${OCAML_LDCONF}" >> ${TMPPLIST} -. endfor -. endif -.endif +. endfor +. endif +. endif -.if defined(USE_OCAML_WASH) -. if !target(ocaml-wash) +. if defined(USE_OCAML_WASH) +. if !target(ocaml-wash) _USES_install+= 745:ocaml-wash ocaml-wash: # If ld.conf is empty @${ECHO_CMD} "@postunexec if [ ! -s %D/${OCAML_LDCONF} ]; then ${RM} -f %D/${OCAML_LDCONF}; fi || true" >> ${TMPPLIST} -. endif -.endif +. endif +. endif .endif #!defined(OCAML_include) .if defined(_POSTMKINCLUDED) -.if defined(USE_OCAML_FINDLIB) +. if defined(USE_OCAML_FINDLIB) pre-install: ${STAGEDIR}${OCAMLFIND_DESTDIR} ${STAGEDIR}${OCAMLFIND_DESTDIR}: @${MKDIR} ${.TARGET} -.endif +. endif .endif # _POSTMKINCLUDED Index: Mk/bsd.options.mk =================================================================== --- Mk/bsd.options.mk +++ Mk/bsd.options.mk @@ -175,40 +175,40 @@ stage:800:post # Set the default values for the global options, as defined by portmgr -.if !defined(NOPORTDOCS) +. if !defined(NOPORTDOCS) PORT_OPTIONS+= DOCS -.else +. else OPTIONS_WARNINGS+= "NOPORTDOCS" WITHOUT+= DOCS OPTIONS_WARNINGS_UNSET+= DOCS -.endif +. endif -.if !defined(WITHOUT_NLS) +. if !defined(WITHOUT_NLS) PORT_OPTIONS+= NLS -.else +. else WITHOUT+= NLS -.endif +. endif -.if !defined(NOPORTEXAMPLES) +. if !defined(NOPORTEXAMPLES) PORT_OPTIONS+= EXAMPLES -.else +. else OPTIONS_WARNINGS+= "NOPORTEXAMPLES" WITHOUT+= EXAMPLES OPTIONS_WARNINGS_UNSET+= EXAMPLES -.endif +. endif -.if defined(DEVELOPER) +. if defined(DEVELOPER) PORT_OPTIONS+= TEST -.endif +. endif PORT_OPTIONS+= IPV6 # Add per arch options -.for opt in ${OPTIONS_DEFINE_${ARCH}} -.if empty(OPTIONS_DEFINE:M${opt}) +. for opt in ${OPTIONS_DEFINE_${ARCH}} +. if empty(OPTIONS_DEFINE:M${opt}) OPTIONS_DEFINE+= ${opt} -.endif -.endfor +. endif +. endfor # Add per arch defaults OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${ARCH}} @@ -216,37 +216,37 @@ _ALL_EXCLUDE= ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE} \ ${OPTIONS_SLAVE} ${OPTIONS_EXCLUDE_${OPSYS}} -.for opt in ${OPTIONS_DEFINE:O:u} -. if !${_ALL_EXCLUDE:M${opt}} -. for opt_implied in ${${opt}_IMPLIES} -. if ${_ALL_EXCLUDE:M${opt_implied}} +. for opt in ${OPTIONS_DEFINE:O:u} +. if !${_ALL_EXCLUDE:M${opt}} +. for opt_implied in ${${opt}_IMPLIES} +. if ${_ALL_EXCLUDE:M${opt_implied}} _ALL_EXCLUDE+= ${opt} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor # Remove options the port maintainer doesn't want -.for opt in ${_ALL_EXCLUDE:O:u} +. for opt in ${_ALL_EXCLUDE:O:u} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}} OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} -. for otype in SINGLE RADIO MULTI GROUP -. for m in ${OPTIONS_${otype}} +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} OPTIONS_${otype}_${m}:= ${OPTIONS_${otype}_${m}:N${opt}} +. endfor . endfor . endfor -.endfor # Remove empty SINGLE/GROUP/RADIO/MULTI # Can be empty because of exclude/slaves -.for otype in SINGLE RADIO MULTI GROUP -. for m in ${OPTIONS_${otype}} -. if empty(OPTIONS_${otype}_${m}) +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} +. if empty(OPTIONS_${otype}_${m}) OPTIONS_${otype}:= ${OPTIONS_${otype}:N${m}} -. endif +. endif +. endfor . endfor -.endfor # Sort options ALL_OPTIONS:= ${OPTIONS_DEFINE:O:u} @@ -254,117 +254,117 @@ # complete list COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS} -.for otype in SINGLE RADIO MULTI GROUP -. for m in ${OPTIONS_${otype}} +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} COMPLETE_OPTIONS_LIST+= ${OPTIONS_${otype}_${m}} +. endfor . endfor -.endfor ## Now create the list of activated options -.if defined(OPTIONS_OVERRIDE) +. if defined(OPTIONS_OVERRIDE) # Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done # before NEW_OPTIONS= PORT_OPTIONS:= ${OPTIONS_OVERRIDE} -.else +. else NEW_OPTIONS= ${COMPLETE_OPTIONS_LIST} ## Set default options defined by the port maintainer PORT_OPTIONS+= ${OPTIONS_DEFAULT} ## Set system-wide defined options (set by user in make.conf) -. for opt in ${OPTIONS_SET} -. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) +. for opt in ${OPTIONS_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor ## Remove the options excluded system-wide (set by user in make.conf) -. for opt in ${OPTIONS_UNSET} +. for opt in ${OPTIONS_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endfor +. endfor ## Set the options specified per-port (set by user in make.conf) -. for opt in ${${OPTIONS_NAME}_SET} -. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) +. for opt in ${${OPTIONS_NAME}_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor ## Unset the options excluded per-port (set by user in make.conf) -. for opt in ${${OPTIONS_NAME}_UNSET} +. for opt in ${${OPTIONS_NAME}_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endfor +. endfor ## options files (from dialog) -. if exists(${OPTIONS_FILE}) && !make(rmconfig) +. if exists(${OPTIONS_FILE}) && !make(rmconfig) . include "${OPTIONS_FILE}" -. endif +. endif . sinclude "${OPTIONS_FILE}.local" ### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile # XXX once WITH_DEBUG is not magic any more, do remove the :NDEBUG from here. -.for opt in ${ALL_OPTIONS:NDEBUG} -.if defined(WITH_${opt}) +. for opt in ${ALL_OPTIONS:NDEBUG} +. if defined(WITH_${opt}) OPTIONS_WARNINGS+= "WITH_${opt}" OPTIONS_WARNINGS_SET+= ${opt} PORT_OPTIONS+= ${opt} -.endif -.if defined(WITHOUT_${opt}) +. endif +. if defined(WITHOUT_${opt}) OPTIONS_WARNINGS+= "WITHOUT_${opt}" OPTIONS_WARNINGS_UNSET+= ${opt} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} -.endif -.endfor +. endif +. endfor _OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME} -.for _k in SET UNSET SET_FORCE UNSET_FORCE -.if defined(${_OPTIONS_UNIQUENAME}_${_k}) +. for _k in SET UNSET SET_FORCE UNSET_FORCE +. if defined(${_OPTIONS_UNIQUENAME}_${_k}) WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:" WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}" -.endif -.endfor +. endif +. endfor -.if defined(OPTIONS_WARNINGS) +. if defined(OPTIONS_WARNINGS) WARNING+= "You are using the following deprecated options: ${OPTIONS_WARNINGS}" WARNING+= "If you added them on the command line, you should replace them by" WARNING+= "WITH=\"${OPTIONS_WARNINGS_SET}\" WITHOUT=\"${OPTIONS_WARNINGS_UNSET}\"" WARNING+= "" WARNING+= "If they are global options set in your make.conf, you should replace them with:" -.if defined(OPTIONS_WARNINGS_SET) +. if defined(OPTIONS_WARNINGS_SET) WARNING+= "OPTIONS_SET=${OPTIONS_WARNINGS_SET}" -.endif -.if defined(OPTIONS_WARNINGS_UNSET) +. endif +. if defined(OPTIONS_WARNINGS_UNSET) WARNING+= "OPTIONS_UNSET=${OPTIONS_WARNINGS_UNSET}" -.endif +. endif WARNING+= "" WARNING+= "If they are local to this port, you should use:" -.if defined(OPTIONS_WARNINGS_SET) +. if defined(OPTIONS_WARNINGS_SET) WARNING+= "${OPTIONS_NAME}_SET=${OPTIONS_WARNINGS_SET}" -.endif -.if defined(OPTIONS_WARNINGS_UNSET) +. endif +. if defined(OPTIONS_WARNINGS_UNSET) WARNING+= "${OPTIONS_NAME}_UNSET=${OPTIONS_WARNINGS_UNSET}" -.endif -.endif +. endif +. endif ## Finish by using the options set by the port config dialog, if any -. for opt in ${OPTIONS_FILE_SET} -. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) +. for opt in ${OPTIONS_FILE_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor -.for opt in ${OPTIONS_FILE_UNSET} +. for opt in ${OPTIONS_FILE_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -.endfor +. endfor -.endif +. endif ## FORCE ## Set system-wide defined options (set by user in make.conf) @@ -397,52 +397,52 @@ ## Cmdline always win over the rest -.for opt in ${WITH} -. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) +. for opt in ${WITH} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -.endfor +. endif +. endfor -.for opt in ${WITHOUT} +. for opt in ${WITHOUT} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -.endfor +. endfor ## Enable options implied by other options # _PREVENTS is handled in bsd.port.mk:pre-check-config ## 1) Build dependency chain in A.B format: _DEPCHAIN= -.for opt in ${COMPLETE_OPTIONS_LIST} -. for o in ${${opt}_IMPLIES} +. for opt in ${COMPLETE_OPTIONS_LIST} +. for o in ${${opt}_IMPLIES} _DEPCHAIN+= ${opt}.$o +. endfor . endfor -.endfor ## 2) Check each dependency pair and if LHS is in PORT_OPTIONS then add RHS. ## All of RHS of "RHS.*" (i.e. indirect dependency) are also added for ## fast convergence. _PORT_OPTIONS:= ${PORT_OPTIONS} -.for _count in _0 ${COMPLETE_OPTIONS_LIST} +. for _count in _0 ${COMPLETE_OPTIONS_LIST} count= ${_count} ### Check if all of the nested dependency are resolved already. -. if ${count} == _0 || ${_PORT_OPTIONS} != ${PORT_OPTIONS} +. if ${count} == _0 || ${_PORT_OPTIONS} != ${PORT_OPTIONS} PORT_OPTIONS:= ${_PORT_OPTIONS} -. for dc in ${_DEPCHAIN} -. for opt in ${_PORT_OPTIONS} +. for dc in ${_DEPCHAIN} +. for opt in ${_PORT_OPTIONS} _opt=${opt} ### Add all of direct and indirect dependency only if ### they are not in ${PORT_OPTIONS}. -. if !empty(_opt:M${dc:R}) -. for d in ${dc:E} ${_DEPCHAIN:M${dc:E}.*:E} -. if empty(_PORT_OPTIONS:M$d) +. if !empty(_opt:M${dc:R}) +. for d in ${dc:E} ${_DEPCHAIN:M${dc:E}.*:E} +. if empty(_PORT_OPTIONS:M$d) _PORT_OPTIONS+= $d -. endif -. endfor -. endif +. endif +. endfor +. endif +. endfor . endfor -. endfor -. endif -.endfor +. endif +. endfor # Finally, add options required by slave ports PORT_OPTIONS+= ${OPTIONS_SLAVE} @@ -451,157 +451,157 @@ PORT_OPTIONS:= ${PORT_OPTIONS:O:u} ## Now some compatibility -.if empty(PORT_OPTIONS:MDOCS) +. if empty(PORT_OPTIONS:MDOCS) NOPORTDOCS= yes -.endif +. endif -.if empty(PORT_OPTIONS:MEXAMPLES) +. if empty(PORT_OPTIONS:MEXAMPLES) NOPORTEXAMPLES= yes -.endif +. endif -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} WITH_DEBUG= yes -.endif +. endif -.if defined(NO_OPTIONS_SORT) +. if defined(NO_OPTIONS_SORT) ALL_OPTIONS= ${OPTIONS_DEFINE} -.endif +. endif -.for target in ${_OPTIONS_TARGETS:C/:.*//:u} +. for target in ${_OPTIONS_TARGETS:C/:.*//:u} _OPTIONS_${target}?= -.endfor +. endfor -.for opt in ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE:O:u} +. for opt in ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE:O:u} # PLIST_SUB PLIST_SUB?= SUB_LIST?= -. if defined(OPTIONS_SUB) -. if ! ${PLIST_SUB:M${opt}=*} -. if ${PORT_OPTIONS:M${opt}} +. if defined(OPTIONS_SUB) +. if ! ${PLIST_SUB:M${opt}=*} +. if ${PORT_OPTIONS:M${opt}} PLIST_SUB:= ${PLIST_SUB} ${opt}="" NO_${opt}="@comment " -. else +. else PLIST_SUB:= ${PLIST_SUB} ${opt}="@comment " NO_${opt}="" +. endif . endif -. endif -. if ! ${SUB_LIST:M${opt}=*} -. if ${PORT_OPTIONS:M${opt}} +. if ! ${SUB_LIST:M${opt}=*} +. if ${PORT_OPTIONS:M${opt}} SUB_LIST:= ${SUB_LIST} ${opt}="" NO_${opt}="@comment " -. else +. else SUB_LIST:= ${SUB_LIST} ${opt}="@comment " NO_${opt}="" +. endif . endif . endif -. endif -. if ${PORT_OPTIONS:M${opt}} -. if defined(${opt}_USE) -. for option in ${${opt}_USE} +. if ${PORT_OPTIONS:M${opt}} +. if defined(${opt}_USE) +. for option in ${${opt}_USE} _u= ${option:C/=.*//g} USE_${_u:tu}+= ${option:C/.*=//g:C/,/ /g} -. endfor -. endif -. if defined(${opt}_VARS) -. for var in ${${opt}_VARS:C/=.*//:O:u} +. endfor +. endif +. if defined(${opt}_VARS) +. for var in ${${opt}_VARS:C/=.*//:O:u} _u= ${var} -. if ${_u:M*+} +. if ${_u:M*+} ${_u:C/.$//:tu}+= ${${opt}_VARS:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} -. else +. else ${_u:tu}= ${${opt}_VARS:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} -. endif -. endfor -. endif -. if defined(${opt}_CONFIGURE_ENABLE) +. endif +. endfor +. endif +. if defined(${opt}_CONFIGURE_ENABLE) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--enable-/} -. endif -. if defined(${opt}_CONFIGURE_WITH) +. endif +. if defined(${opt}_CONFIGURE_WITH) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--with-/} -. endif -. for configure in CONFIGURE CMAKE QMAKE -. if defined(${opt}_${configure}_ON) -${configure}_ARGS+= ${${opt}_${configure}_ON} . endif -. endfor -. for flags in ${_OPTIONS_FLAGS} -. if defined(${opt}_${flags}) +. for configure in CONFIGURE CMAKE QMAKE +. if defined(${opt}_${configure}_ON) +${configure}_ARGS+= ${${opt}_${configure}_ON} +. endif +. endfor +. for flags in ${_OPTIONS_FLAGS} +. if defined(${opt}_${flags}) ${flags}+= ${${opt}_${flags}} -. endif -. endfor -. for deptype in ${_OPTIONS_DEPENDS} -. if defined(${opt}_${deptype}_DEPENDS) +. endif +. endfor +. for deptype in ${_OPTIONS_DEPENDS} +. if defined(${opt}_${deptype}_DEPENDS) ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS} -. endif -. endfor -. for target in ${_OPTIONS_TARGETS} +. endif +. endfor +. for target in ${_OPTIONS_TARGETS} _target= ${target:C/:.*//} _prio= ${target:C/.*:(.*):.*/\1/} _type= ${target:C/.*://} _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-on -. endfor -. else -. if defined(${opt}_USE_OFF) -. for option in ${${opt}_USE_OFF} +. endfor +. else +. if defined(${opt}_USE_OFF) +. for option in ${${opt}_USE_OFF} _u= ${option:C/=.*//g} USE_${_u:tu}+= ${option:C/.*=//g:C/,/ /g} -. endfor -. endif -. if defined(${opt}_VARS_OFF) -. for var in ${${opt}_VARS_OFF:C/=.*//:O:u} +. endfor +. endif +. if defined(${opt}_VARS_OFF) +. for var in ${${opt}_VARS_OFF:C/=.*//:O:u} _u= ${var} -. if ${_u:M*+} +. if ${_u:M*+} ${_u:C/.$//:tu}+= ${${opt}_VARS_OFF:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} -. else +. else ${_u:tu}= ${${opt}_VARS_OFF:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} -. endif -. endfor -. endif -. if defined(${opt}_CONFIGURE_ENABLE) +. endif +. endfor +. endif +. if defined(${opt}_CONFIGURE_ENABLE) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--disable-/:C/=.*//} -. endif -. if defined(${opt}_CONFIGURE_WITH) +. endif +. if defined(${opt}_CONFIGURE_WITH) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--without-/:C/=.*//} -. endif -. for configure in CONFIGURE CMAKE QMAKE -. if defined(${opt}_${configure}_OFF) -${configure}_ARGS+= ${${opt}_${configure}_OFF} . endif -. endfor -. for flags in ${_OPTIONS_FLAGS} -. if defined(${opt}_${flags}_OFF) +. for configure in CONFIGURE CMAKE QMAKE +. if defined(${opt}_${configure}_OFF) +${configure}_ARGS+= ${${opt}_${configure}_OFF} +. endif +. endfor +. for flags in ${_OPTIONS_FLAGS} +. if defined(${opt}_${flags}_OFF) ${flags}+= ${${opt}_${flags}_OFF} -. endif -. endfor -. for deptype in ${_OPTIONS_DEPENDS} -. if defined(${opt}_${deptype}_DEPENDS_OFF) +. endif +. endfor +. for deptype in ${_OPTIONS_DEPENDS} +. if defined(${opt}_${deptype}_DEPENDS_OFF) ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF} -. endif -. endfor -. for target in ${_OPTIONS_TARGETS} +. endif +. endfor +. for target in ${_OPTIONS_TARGETS} _target= ${target:C/:.*//} _prio= ${target:C/.*:(.*):.*/\1/} _type= ${target:C/.*://} _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off -. endfor -. endif -.endfor +. endfor +. endif +. endfor .undef (SELECTED_OPTIONS) .undef (DESELECTED_OPTIONS) -.for opt in ${ALL_OPTIONS} -. if ${PORT_OPTIONS:M${opt}} +. for opt in ${ALL_OPTIONS} +. if ${PORT_OPTIONS:M${opt}} SELECTED_OPTIONS:= ${opt} ${SELECTED_OPTIONS} -. else +. else DESELECTED_OPTIONS:= ${opt} ${DESELECTED_OPTIONS} -. endif -.endfor -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} -. for opt in ${OPTIONS_${otype}_${m}} -. if ${PORT_OPTIONS:M${opt}} +. endif +. endfor +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} +. for opt in ${OPTIONS_${otype}_${m}} +. if ${PORT_OPTIONS:M${opt}} SELECTED_OPTIONS:= ${opt} ${SELECTED_OPTIONS} -. else +. else DESELECTED_OPTIONS:= ${opt} ${DESELECTED_OPTIONS} -. endif +. endif +. endfor . endfor . endfor -.endfor .endif Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk +++ Mk/bsd.port.mk @@ -1075,19 +1075,19 @@ .include "${PORTSDIR}/Mk/bsd.commands.mk" .if defined(X_BUILD_FOR) -.if !defined(.PARSEDIR) +. if !defined(.PARSEDIR) IGNORE= Cross building can only be done when using bmake(1) as make(1) -.endif +. endif # Do not define CPP on purpose -.if !defined(HOSTCC) +. if !defined(HOSTCC) HOSTCC:= ${CC} HOSTCXX:= ${CXX} -.endif -.if !exists(/usr/${X_BUILD_FOR}/usr/bin/cc) +. endif +. if !exists(/usr/${X_BUILD_FOR}/usr/bin/cc) X_SYSROOT= ${LOCALBASE}/${X_BUILD_FOR} -.else +. else X_SYSROOT= /usr/${X_BUILD_FOR} -.endif +. endif CC= ${X_SYSROOT}/usr/bin/cc CXX= ${X_SYSROOT}/usr/bin/c++ NM= ${X_BUILD_FOR}-nm @@ -1108,37 +1108,37 @@ .else -.if !target(makepatch) +. if !target(makepatch) makepatch: @${SETENV} WRKDIR=${WRKDIR} PATCHDIR=${PATCHDIR} \ PATCH_WRKSRC=${PATCH_WRKSRC} \ STRIP_COMPONENTS="${PATCH_STRIP:S/-p//}" \ ${SH} ${SCRIPTSDIR}/smart_makepatch.sh -.endif +. endif # Start of options section -.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) +. if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) # Get the default maintainer MAINTAINER?= ports@FreeBSD.org # Get the architecture -.if !defined(ARCH) +. if !defined(ARCH) ARCH!= ${UNAME} -p -.endif +. endif _EXPORTED_VARS+= ARCH # Get the operating system type -.if !defined(OPSYS) +. if !defined(OPSYS) OPSYS!= ${UNAME} -s -.endif +. endif _EXPORTED_VARS+= OPSYS -.if !defined(_OSRELEASE) +. if !defined(_OSRELEASE) _OSRELEASE!= ${UNAME} -r -.endif +. endif _EXPORTED_VARS+= _OSRELEASE # Get the operating system revision @@ -1146,89 +1146,89 @@ _EXPORTED_VARS+= OSREL # Get __FreeBSD_version -.if !defined(OSVERSION) -.if exists(/usr/include/sys/param.h) +. if !defined(OSVERSION) +. if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h -.elif exists(${SRC_BASE}/sys/sys/param.h) +. elif exists(${SRC_BASE}/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h -.else +. else .error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. -.endif -.endif +. endif +. endif _EXPORTED_VARS+= OSVERSION # Convert OSVERSION to major release number _OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} # Sanity checks for chroot/jail building. # Skip if OSVERSION specified on cmdline for testing. Only works for bmake. -.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} -.if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} +. if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} +. if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number. -.elif ${_OSVERSION_MAJOR} != ${OSREL:R} +. elif ${_OSVERSION_MAJOR} != ${OSREL:R} .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. -.endif -.endif +. endif +. endif # Only define tools here (for transition period with between pkg tools) .include "${PORTSDIR}/Mk/bsd.commands.mk" -.if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) -.if !defined(_PKG_VERSION) +. if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) +. if !defined(_PKG_VERSION) _PKG_VERSION!= ${PKG_BIN} -v -.endif +. endif _PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION} -.if ${_PKG_STATUS} == "<" +. if ${_PKG_STATUS} == "<" IGNORE= pkg(8) must be version ${MINIMAL_PKG_VERSION} or greater, but you have ${_PKG_VERSION}. You must upgrade the ${PKG_ORIGIN} port first -.endif +. endif _PKG_CHECKED= 1 -.endif +. endif _EXPORTED_VARS+= _PKG_CHECKED MASTERDIR?= ${.CURDIR} -.if ${MASTERDIR} != ${.CURDIR} +. if ${MASTERDIR} != ${.CURDIR} SLAVE_PORT?= yes MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} -.else +. else SLAVE_PORT?= no MASTER_PORT?= -.endif +. endif # If they exist, include Makefile.inc, then architecture/operating # system specific Makefiles, then local Makefile.local. -.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) +. if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/../Makefile.inc) +. if exists(${MASTERDIR}/../Makefile.inc) .include "${MASTERDIR}/../Makefile.inc" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) +. if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) .include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}" USE_SUBMAKE= yes -.elif exists(${MASTERDIR}/Makefile.${OPSYS}) +. elif exists(${MASTERDIR}/Makefile.${OPSYS}) .include "${MASTERDIR}/Makefile.${OPSYS}" USE_SUBMAKE= yes -.elif exists(${MASTERDIR}/Makefile.${ARCH}) +. elif exists(${MASTERDIR}/Makefile.${ARCH}) .include "${MASTERDIR}/Makefile.${ARCH}" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/Makefile.local) +. if exists(${MASTERDIR}/Makefile.local) .include "${MASTERDIR}/Makefile.local" USE_SUBMAKE= yes -.elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) +. elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) .include "${.CURDIR}/Makefile.local" USE_SUBMAKE= yes -.endif +. endif -.for _CATEGORY in ${CATEGORIES} +. for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} -.endfor +. endfor _PORTDIRNAME= ${.CURDIR:T} PORTDIRNAME?= ${_PORTDIRNAME} PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} @@ -1252,58 +1252,58 @@ LDCONFIG_DIR= libdata/ldconfig LDCONFIG32_DIR= libdata/ldconfig32 -.endif +. endif # At least KDE needs TMPDIR for the package building, # so we're setting it to the known default value. -.if defined(PACKAGE_BUILDING) +. if defined(PACKAGE_BUILDING) TMPDIR?= /tmp -.endif # defined(PACKAGE_BUILDING) +. endif # defined(PACKAGE_BUILDING) -.if defined(WITH_DEBUG_PORTS) -.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} +. if defined(WITH_DEBUG_PORTS) +. if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} WITH_DEBUG= yes -.endif -.endif +. endif +. endif .include "${PORTSDIR}/Mk/bsd.options.mk" # Start of pre-makefile section. -.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) +. if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) -.if defined(PORTNAME) +. if defined(PORTNAME) .include "${PORTSDIR}/Mk/bsd.sanity.mk" -.endif +. endif _PREMKINCLUDED= yes -.if defined(PORTVERSION) -.if ${PORTVERSION:M*[-_,]*}x != x +. if defined(PORTVERSION) +. if ${PORTVERSION:M*[-_,]*}x != x IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' -.endif +. endif DISTVERSION?= ${PORTVERSION:S/:/::/g} -.elif defined(DISTVERSION) +. elif defined(DISTVERSION) PORTVERSION= ${DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g} -.endif +. endif PORTREVISION?= 0 -.if ${PORTREVISION} != 0 +. if ${PORTREVISION} != 0 _SUF1= _${PORTREVISION} -.endif +. endif PORTEPOCH?= 0 -.if ${PORTEPOCH} != 0 +. if ${PORTEPOCH} != 0 _SUF2= ,${PORTEPOCH} -.endif +. endif PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} -.if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC) && empty(DISTNAME) && empty(USE_GITHUB:Mnodefault) +. if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC) && empty(DISTNAME) && empty(USE_GITHUB:Mnodefault) _GITHUB_MUST_SET_DISTNAME= yes -.else +. else DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL} -.endif +. endif INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} @@ -1313,17 +1313,17 @@ WWWDIR?= ${PREFIX}/www/${PORTNAME} ETCDIR?= ${PREFIX}/etc/${PORTNAME} -.if defined(USE_LINUX_RPM) +. if defined(USE_LINUX_RPM) .include "${PORTSDIR}/Mk/bsd.linux-rpm.mk" -.endif +. endif -.if defined(USE_LINUX_APPS) +. if defined(USE_LINUX_APPS) .include "${PORTSDIR}/Mk/bsd.linux-apps.mk" -.endif +. endif -.if defined(USE_XORG) || defined(XORG_CAT) +. if defined(USE_XORG) || defined(XORG_CAT) .include "${PORTSDIR}/Mk/bsd.xorg.mk" -.endif +. endif PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates @@ -1334,140 +1334,140 @@ SCRIPTDIR?= ${MASTERDIR}/scripts PKGDIR?= ${MASTERDIR} -.if defined(USE_LINUX_PREFIX) +. if defined(USE_LINUX_PREFIX) PREFIX:= ${LINUXBASE} NO_MTREE= yes -.else +. else PREFIX?= ${LOCALBASE} -.endif +. endif -.if defined(USE_LINUX_PREFIX) +. if defined(USE_LINUX_PREFIX) LDCONFIG_CMD?= ${LINUXBASE}/sbin/ldconfig -r ${LINUXBASE} -.endif +. endif PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg -.if defined(USE_LOCAL_MK) +. if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" -.endif +. endif -.if defined(USE_OPENSSL) +. if defined(USE_OPENSSL) .include "${PORTSDIR}/Mk/bsd.openssl.mk" -.endif +. endif -.if defined(USE_EMACS) +. if defined(USE_EMACS) .include "${PORTSDIR}/Mk/bsd.emacs.mk" -.endif +. endif -.if defined(USE_PHP) +. if defined(USE_PHP) .include "${PORTSDIR}/Mk/bsd.php.mk" -.endif +. endif -.if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL) +. if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL) .include "${PORTSDIR}/Mk/bsd.fpc.mk" -.endif +. endif -.if defined(USE_JAVA) +. if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" -.endif +. endif -.if defined(USE_RUBY) || defined(USE_LIBRUBY) +. if defined(USE_RUBY) || defined(USE_LIBRUBY) .include "${PORTSDIR}/Mk/bsd.ruby.mk" -.endif +. endif -.if defined(USE_OCAML) +. if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" -.endif +. endif -.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) +. if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) .include "${PORTSDIR}/Mk/bsd.apache.mk" -.endif +. endif -.if defined(USE_QT4) || defined(USE_QT5) +. if defined(USE_QT4) || defined(USE_QT5) .include "${PORTSDIR}/Mk/bsd.qt.mk" -.endif +. endif -.if defined(USE_TEX) +. if defined(USE_TEX) .include "${PORTSDIR}/Mk/bsd.tex.mk" -.endif +. endif -.if defined(USE_GECKO) +. if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" -.endif +. endif -.if defined(WANT_GNOME) || defined(USE_GNOME) || defined(INSTALLS_ICONS) +. if defined(WANT_GNOME) || defined(USE_GNOME) || defined(INSTALLS_ICONS) USES+= gnome -.endif +. endif -.if defined(USE_MATE) +. if defined(USE_MATE) USES+= mate -.endif +. endif -.if defined(USE_BDB) +. if defined(USE_BDB) USES+=bdb:${USE_BDB} -.endif +. endif -.if defined(USE_MYSQL) +. if defined(USE_MYSQL) USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} -.if defined(WANT_MYSQL_VER) -.if empty(USE_MYSQL) +. if defined(WANT_MYSQL_VER) +. if empty(USE_MYSQL) USE_MYSQL:=${WANT_MYSQL_VER} -.else +. else USE_MYSQL:=${USE_MYSQL},${WANT_MYSQL_VER} -.endif -.endif +. endif +. endif USES+=mysql:${USE_MYSQL} -.endif +. endif -.if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) +. if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" -.endif +. endif -.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) +. if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) .include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endif -.if defined(USE_SDL) +. if defined(USE_SDL) .include "${PORTSDIR}/Mk/bsd.sdl.mk" -.endif +. endif -.if defined(USE_KDE4) || defined(KDE4_BUILDENV) +. if defined(USE_KDE4) || defined(KDE4_BUILDENV) .include "${PORTSDIR}/Mk/bsd.kde4.mk" -.endif +. endif -.if !defined(UID) +. if !defined(UID) UID!= ${ID} -u -.endif +. endif DESTDIRNAME?= DESTDIR # setup empty variables for USES targets -.for target in sanity fetch extract patch configure build install test package stage +. for target in sanity fetch extract patch configure build install test package stage _USES_${target}?= -.endfor +. endfor # Loading features -.for f in ${USES} +. for f in ${USES} _f:= ${f:C/\:.*//} -.if !defined(${_f}_ARGS) +. if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} -.endif -.endfor -.for f in ${USES} +. endif +. endfor +. for f in ${USES} .include "${USESDIR}/${f:C/\:.*//}.mk" -.endfor +. endfor EXTRACT_SUFX?= .tar.gz # You can force skipping these test by defining IGNORE_PATH_CHECKS -.if !defined(IGNORE_PATH_CHECKS) -.if ! ${PREFIX:M/*} +. if !defined(IGNORE_PATH_CHECKS) +. if ! ${PREFIX:M/*} .BEGIN: @${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" @${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." @${FALSE} -.endif -.endif +. endif +. endif # Owner and group of the WWW user WWWOWN?= www @@ -1479,23 +1479,23 @@ WITH_PKGNG?= yes WITH_PKG?= ${WITH_PKGNG} -.endif +. endif # End of pre-makefile section. # Start of post-makefile section. -.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) +. if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) -.if defined(_POSTMKINCLUDED) +. if defined(_POSTMKINCLUDED) DEV_ERROR+= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" @${FALSE} -.endif +. endif _POSTMKINCLUDED= yes -.if defined(BUNDLE_LIBS) +. if defined(BUNDLE_LIBS) PKG_NOTES+= no_provide_shlib PKG_NOTE_no_provide_shlib= yes -.endif +. endif TEST_ARGS?= ${MAKE_ARGS} TEST_ENV?= ${MAKE_ENV} @@ -1509,10 +1509,10 @@ HOME=${WRKDIR} # Respect TMPDIR passed via make.conf or similar and pass it down # to configure and make. -.if defined(TMPDIR) +. if defined(TMPDIR) MAKE_ENV+= TMPDIR="${TMPDIR}" CONFIGURE_ENV+= TMPDIR="${TMPDIR}" -.endif # defined(TMPDIR) +. endif # defined(TMPDIR) QA_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ @@ -1524,18 +1524,18 @@ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ PKGBASE=${PKGBASE} -.if !empty(USES:Mdesktop-file-utils) +. if !empty(USES:Mdesktop-file-utils) QA_ENV+= USESDESKTOPFILEUTILS=yes -.endif -.if !empty(USES:Mlibtool*) +. endif +. if !empty(USES:Mlibtool*) QA_ENV+= USESLIBTOOL=yes -.endif -.if !empty(USES:Mshared-mime-info) +. endif +. if !empty(USES:Mshared-mime-info) QA_ENV+= USESSHAREDMIMEINFO=yes -.endif -.if !empty(USES:Mterminfo) +. endif +. if !empty(USES:Mterminfo) QA_ENV+= USESTERMINFO=yes -.endif +. endif CO_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ @@ -1549,43 +1549,43 @@ PORT_OPTIONS="${PORT_OPTIONS}" \ PORTSDIR="${PORTSDIR}" -.if defined(X_BUILD_FOR) +. if defined(X_BUILD_FOR) BUILD_DEPENDS+= ${X_BUILD_FOR}-cc:devel/${X_BUILD_FOR}-xdev PKG_ENV+= ABI_FILE=${X_SYSROOT}/usr/lib/crt1.o MAKE_ENV+= NM=${NM} \ STRIPBIN=${X_BUILD_FOR}-strip \ PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${X_SYSROOT}" -.endif +. endif WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work -.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) +. if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT} -.endif +. endif # If the distname is not extracting into a specific subdirectory, have the # ports framework force extract into a subdirectory so that metadata files # do not get in the way of the build, and vice-versa. -.if defined(NO_WRKSUBDIR) +. if defined(NO_WRKSUBDIR) # Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, # the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the # most unlikely to conflict as we can. WRKSRC?= ${WRKDIR}/${PKGNAME} EXTRACT_WRKDIR:= ${WRKSRC} -.else +. else WRKSRC?= ${WRKDIR}/${DISTNAME} EXTRACT_WRKDIR:= ${WRKDIR} -.endif -.if defined(WRKSRC_SUBDIR) +. endif +. if defined(WRKSRC_SUBDIR) WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} -.endif +. endif -.if defined(CONFIGURE_OUTSOURCE) +. if defined(CONFIGURE_OUTSOURCE) CONFIGURE_CMD?= ${WRKSRC}/${CONFIGURE_SCRIPT} CONFIGURE_WRKSRC?= ${WRKDIR}/.build BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} TEST_WRKSRC?= ${CONFIGURE_WRKSRC} -.endif +. endif PATCH_WRKSRC?= ${WRKSRC} CONFIGURE_WRKSRC?= ${WRKSRC} @@ -1612,60 +1612,60 @@ # sub-configure will not # survive double space CFLAGS:= ${CFLAGS:C/ $//} -.if defined(WITHOUT_CPU_CFLAGS) -.if defined(_CPUCFLAGS) -.if !empty(_CPUCFLAGS) +. if defined(WITHOUT_CPU_CFLAGS) +. if defined(_CPUCFLAGS) +. if !empty(_CPUCFLAGS) CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} -.endif -.endif -.endif +. endif +. endif +. endif # Reset value from bsd.own.mk. -.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) -.if !defined(INSTALL_STRIPPED) +. if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) +. if !defined(INSTALL_STRIPPED) STRIP= #none MAKE_ENV+= DONTSTRIP=yes STRIP_CMD= ${TRUE} -.endif +. endif DEBUG_FLAGS?= -g CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} -.if defined(INSTALL_TARGET) +. if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} -.endif -.endif +. endif +. endif -.if !defined(WITHOUT_SSP) +. if !defined(WITHOUT_SSP) .include "${PORTSDIR}/Mk/bsd.ssp.mk" -.endif +. endif # XXX PIE support to be added here MAKE_ENV+= NO_PIE=yes # We prefer to pass MK_*=no but it was only supported after a certain # revision. Passing WITHOUT_* may conflict with a make.conf or src.conf's # WITH_* value. Note that ports *do* pull in src.conf. -.if (${OSVERSION} >= 903510 && ${OSVERSION} < 1000000) || \ +. if (${OSVERSION} >= 903510 && ${OSVERSION} < 1000000) || \ (${OSVERSION} >= 1003503 && ${OSVERSION} < 1100000) || \ ${OSVERSION} >= 1100000 # We will control debug files. Don't let builds that use /usr/share/mk # split out debug symbols since the plist won't know to expect it. MAKE_ENV+= MK_DEBUG_FILES=no MAKE_ENV+= MK_KERNEL_SYMBOLS=no -.else +. else MAKE_ENV+= WITHOUT_DEBUG_FILES=yes MAKE_ENV+= WITHOUT_KERNEL_SYMBOLS=yes -.endif +. endif -.if defined(NOPORTDOCS) +. if defined(NOPORTDOCS) PLIST_SUB+= PORTDOCS="@comment " -.else +. else PLIST_SUB+= PORTDOCS="" -.endif +. endif -.if defined(NOPORTEXAMPLES) +. if defined(NOPORTEXAMPLES) PLIST_SUB+= PORTEXAMPLES="@comment " -.else +. else PLIST_SUB+= PORTEXAMPLES="" -.endif +. endif CONFIGURE_SHELL?= ${SH} MAKE_SHELL?= ${SH} @@ -1673,147 +1673,147 @@ CONFIGURE_ENV+= SHELL=${CONFIGURE_SHELL} CONFIG_SHELL=${CONFIGURE_SHELL} MAKE_ENV+= SHELL=${MAKE_SHELL} NO_LINT=YES -.if defined(PATCHFILES) && ${PATCHFILES:M*.zip} +. if defined(PATCHFILES) && ${PATCHFILES:M*.zip} PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip -.endif +. endif # Check the compatibility layer for amd64/ia64 -.if ${ARCH} == "amd64" || ${ARCH} =="ia64" -.if exists(/usr/lib32) +. if ${ARCH} == "amd64" || ${ARCH} =="ia64" +. if exists(/usr/lib32) HAVE_COMPAT_IA32_LIBS?= YES -.endif -.if !defined(HAVE_COMPAT_IA32_KERN) +. endif +. if !defined(HAVE_COMPAT_IA32_KERN) HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo -.if empty(HAVE_COMPAT_IA32_KERN) +. if empty(HAVE_COMPAT_IA32_KERN) .undef HAVE_COMPAT_IA32_KERN -.endif -.endif -.endif +. endif +. endif +. endif _EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN -.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" -.if ${ARCH} == "amd64" || ${ARCH} == "ia64" -.if !defined(HAVE_COMPAT_IA32_KERN) +. if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" +. if ${ARCH} == "amd64" || ${ARCH} == "ia64" +. if !defined(HAVE_COMPAT_IA32_KERN) IGNORE= requires a kernel with compiled-in IA32 compatibility -.elif !defined(HAVE_COMPAT_IA32_LIBS) +. elif !defined(HAVE_COMPAT_IA32_LIBS) IGNORE= requires 32-bit libraries installed under /usr/lib32 -.endif +. endif _LDCONFIG_FLAGS=-32 LIB32DIR= lib32 -.else +. else IGNORE= requires i386 (or compatible) platform to run -.endif -.else +. endif +. else LIB32DIR= lib -.endif +. endif PLIST_SUB+= LIB32DIR=${LIB32DIR} -.if ${WITH_PKG} == devel +. if ${WITH_PKG} == devel PKG_ORIGIN= ports-mgmt/pkg-devel -.endif +. endif -.if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) +. if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} -.endif +. endif -.if defined(USE_GCC) +. if defined(USE_GCC) .include "${PORTSDIR}/Mk/bsd.gcc.mk" -.endif +. endif -.if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) +. if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ READELF SIZE STRINGS BINUTILS_NO_MAKE_ENV?= -. for b in ${BINUTILS} +. for b in ${BINUTILS} ${b}= ${LOCALBASE}/bin/${b:C/PP/++/:tl} -. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) +. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) CONFIGURE_ENV+= ${b}="${${b}}" -. endif -. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" +. endif +. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" MAKE_ENV+= ${b}="${${b}}" -. endif -. endfor -.endif +. endif +. endfor +. endif -.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) +. if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) .include "${PORTSDIR}/Mk/bsd.ldap.mk" -.endif +. endif -.if defined(USE_RC_SUBR) +. if defined(USE_RC_SUBR) SUB_FILES+= ${USE_RC_SUBR} -.endif +. endif -.if defined(USE_RCORDER) +. if defined(USE_RCORDER) SUB_FILES+= ${USE_RCORDER} -.endif +. endif -.if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" +. if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" USE_LDCONFIG= ${PREFIX}/lib -.endif -.if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" +. endif +. if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" IGNORE= has USE_LDCONFIG32 set to yes, which is not correct -.endif +. endif -.if defined(USE_LINUX_PREFIX) && defined(USE_LDCONFIG) +. if defined(USE_LINUX_PREFIX) && defined(USE_LDCONFIG) # we need ${LINUXBASE}/sbin/ldconfig USE_LINUX?= yes -.endif +. endif -.if defined(USE_LINUX) +. if defined(USE_LINUX) -. if !defined(LINUX_OSRELEASE) +. if !defined(LINUX_OSRELEASE) LINUX_OSRELEASE!= ${ECHO_CMD} `${SYSCTL} -n compat.linux.osrelease 2>/dev/null` -. endif +. endif _EXPORTED_VARS+= LINUX_OSRELEASE # install(1) also does a brandelf on strip, so don't strip with FreeBSD tools. STRIP= -. if exists(${LINUXBASE}/usr/bin/strip) +. if exists(${LINUXBASE}/usr/bin/strip) STRIP_CMD= ${LINUXBASE}/usr/bin/strip -. else +. else STRIP_CMD= ${TRUE} -. endif +. endif # Allow the user to specify another linux_base version. -. if defined(OVERRIDE_LINUX_BASE_PORT) -. if ${USE_LINUX:tl} == yes || (${USE_LINUX} == "c6" && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64") +. if defined(OVERRIDE_LINUX_BASE_PORT) +. if ${USE_LINUX:tl} == yes || (${USE_LINUX} == "c6" && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64") USE_LINUX= ${OVERRIDE_LINUX_BASE_PORT} -. endif -. endif +. endif +. endif # NOTE: when you update the default linux_base version (case "yes"), # don't forget to update the Handbook! -. if exists(${PORTSDIR}/emulators/linux_base-${USE_LINUX}) +. if exists(${PORTSDIR}/emulators/linux_base-${USE_LINUX}) LINUX_BASE_PORT= ${LINUXBASE}/bin/sh:emulators/linux_base-${USE_LINUX} -. else -. if ${USE_LINUX:tl} == "yes" +. else +. if ${USE_LINUX:tl} == "yes" USE_LINUX= c6 LINUX_BASE_PORT= ${LINUXBASE}/etc/redhat-release:emulators/linux_base-c6 -. elif ${USE_LINUX} == "c6_64" +. elif ${USE_LINUX} == "c6_64" LINUX_BASE_PORT= ${LINUXBASE}/etc/redhat-release:emulators/linux_base-c6 -. else +. else IGNORE= cannot be built: there is no emulators/linux_base-${USE_LINUX}, perhaps wrong use of USE_LINUX or OVERRIDE_LINUX_BASE_PORT -. endif -. endif +. endif +. endif -. if ${USE_LINUX} == "c6_64" || (defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64") -. if ${ARCH} != "amd64" +. if ${USE_LINUX} == "c6_64" || (defined(OVERRIDE_LINUX_BASE_PORT) && ${OVERRIDE_LINUX_BASE_PORT} == "c6_64") +. if ${ARCH} != "amd64" IGNORE= Cannot install 64 bit Linux on non-64bit platforms -. endif +. endif LINUX_RPM_ARCH?= x86_64 LINUX_REPO_ARCH?= x86_64 -. elif ${USE_LINUX} == "c6" || ${USE_LINUX} == "yes" # default to CentOS +. elif ${USE_LINUX} == "c6" || ${USE_LINUX} == "yes" # default to CentOS LINUX_RPM_ARCH?= i686 LINUX_REPO_ARCH?= i386 -. elif ${USE_LINUX} == "f10" +. elif ${USE_LINUX} == "f10" LINUX_RPM_ARCH?= i386 LINUX_REPO_ARCH?= i386 -. endif +. endif RUN_DEPENDS+= ${LINUX_BASE_PORT} -.endif +. endif PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' @@ -1831,34 +1831,34 @@ _GL_glw_LIB_DEPENDS= libGLw.so:graphics/libGLw _GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut -.if defined(USE_GL) -. if ${USE_GL:tl} == "yes" +. if defined(USE_GL) +. if ${USE_GL:tl} == "yes" USE_GL= glu -. endif -. for _component in ${USE_GL} -. if !defined(_GL_${_component}_LIB_DEPENDS) && \ +. endif +. for _component in ${USE_GL} +. if !defined(_GL_${_component}_LIB_DEPENDS) && \ !defined(_GL_${_component}_RUN_DEPENDS) IGNORE= uses unknown GL component -. else +. else USE_XORG+= ${_GL_${_component}_USE_XORG} BUILD_DEPENDS+= ${_GL_${_component}_BUILD_DEPENDS} LIB_DEPENDS+= ${_GL_${_component}_LIB_DEPENDS} RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS} -. endif -. endfor -.endif +. endif +. endfor +. endif -.if defined(_DESTDIR_VIA_ENV) +. if defined(_DESTDIR_VIA_ENV) MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} -.else +. else MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} -.endif +. endif -.if defined(NO_PREFIX_RMDIR) +. if defined(NO_PREFIX_RMDIR) CO_ENV+= NO_PREFIX_RMDIR=1 -.else +. else CO_ENV+= NO_PREFIX_RMDIR=0 -.endif +. endif METADIR= ${WRKDIR}/.metadir @@ -1883,92 +1883,92 @@ glib-compile-schemas \ ccache-update-links -.if defined(USE_LOCAL_MK) +. if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" -.endif +. endif -.if defined(USE_XORG) || defined(XORG_CAT) +. if defined(USE_XORG) || defined(XORG_CAT) .include "${PORTSDIR}/Mk/bsd.xorg.mk" -.endif +. endif -.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) +. if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) .include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endif -.if defined(USE_JAVA) +. if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" -.endif +. endif -.if defined(USE_OCAML) +. if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" -.endif +. endif -.if defined(USE_LINUX_RPM) +. if defined(USE_LINUX_RPM) .include "${PORTSDIR}/Mk/bsd.linux-rpm.mk" -.endif +. endif -.if defined(USE_LINUX_APPS) +. if defined(USE_LINUX_APPS) .include "${PORTSDIR}/Mk/bsd.linux-apps.mk" -.endif +. endif -.if defined(USE_QT4) || defined(USE_QT5) +. if defined(USE_QT4) || defined(USE_QT5) .include "${PORTSDIR}/Mk/bsd.qt.mk" -.endif +. endif -.if defined(USE_SDL) +. if defined(USE_SDL) .include "${PORTSDIR}/Mk/bsd.sdl.mk" -.endif +. endif -.if defined(USE_PHP) +. if defined(USE_PHP) .include "${PORTSDIR}/Mk/bsd.php.mk" -.endif +. endif -.if defined(USE_WX) || defined(USE_WX_NOT) +. if defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" -.endif +. endif -.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) +. if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) .include "${PORTSDIR}/Mk/bsd.apache.mk" -.endif +. endif -.if defined(USE_AUTOTOOLS) +. if defined(USE_AUTOTOOLS) .include "${PORTSDIR}/Mk/bsd.autotools.mk" -.endif +. endif -.if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL) +. if defined(USE_FPC) || defined(WANT_FPC_BASE) || defined(WANT_FPC_ALL) .include "${PORTSDIR}/Mk/bsd.fpc.mk" -.endif +. endif -.if defined(USE_GECKO) +. if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" -.endif +. endif -.if defined(USE_KDE4) +. if defined(USE_KDE4) .include "${PORTSDIR}/Mk/bsd.kde4.mk" -.endif +. endif -.if exists(${PORTSDIR}/Makefile.inc) +. if exists(${PORTSDIR}/Makefile.inc) .include "${PORTSDIR}/Makefile.inc" USE_SUBMAKE= yes -.endif +. endif # Loading features -.for f in ${_USES_POST} +. for f in ${_USES_POST} _f:= ${f:C/\:.*//} -.if !defined(${_f}_ARGS) +. if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} -.endif -.endfor -.for f in ${_USES_POST} +. endif +. endfor +. for f in ${_USES_POST} .include "${USESDIR}/${f:C/\:.*//}.mk" -.endfor +. endfor -.if defined(USE_XORG) +. if defined(USE_XORG) # Add explicit X options to avoid problems with false positives in configure -.if defined(GNU_CONFIGURE) +. if defined(GNU_CONFIGURE) CONFIGURE_ARGS+=--x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include -.endif -.endif +. endif +. endif # Macro for doing in-place file editing using regexps REINPLACE_ARGS?= -i.bak @@ -2009,46 +2009,46 @@ # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. # gcc 4.x enable strict aliasing optimization with -O2 which is known to break # a lot of ports. -.if !defined(WITHOUT_NO_STRICT_ALIASING) -.if ${CC} != "icc" -.if empty(CFLAGS:M-fno-strict-aliasing) +. if !defined(WITHOUT_NO_STRICT_ALIASING) +. if ${CC} != "icc" +. if empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing -.endif -.endif -.endif +. endif +. endif +. endif -.for lang in C CXX -.if defined(USE_${lang}STD) +. for lang in C CXX +. if defined(USE_${lang}STD) ${lang}FLAGS:= ${${lang}FLAGS:N-std=*} -std=${USE_${lang}STD} -.endif +. endif -.if defined(${lang}FLAGS_${ARCH}) +. if defined(${lang}FLAGS_${ARCH}) ${lang}FLAGS+= ${${lang}FLAGS_${ARCH}} -.endif -.endfor +. endif +. endfor # Multiple make jobs support -.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) +. if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) _MAKE_JOBS?= # MAKE_JOBS_NUMBER= 1 -.else -.if defined(MAKE_JOBS_NUMBER) +. else +. if defined(MAKE_JOBS_NUMBER) _MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER} -.else -.if !defined(_SMP_CPUS) +. else +. if !defined(_SMP_CPUS) _SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus -.endif +. endif _EXPORTED_VARS+= _SMP_CPUS _MAKE_JOBS_NUMBER= ${_SMP_CPUS} -.endif -.if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) +. endif +. if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) MAKE_JOBS_NUMBER= ${MAKE_JOBS_NUMBER_LIMIT} -.else +. else MAKE_JOBS_NUMBER= ${_MAKE_JOBS_NUMBER} -.endif +. endif _MAKE_JOBS?= -j${MAKE_JOBS_NUMBER} BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. -.endif +. endif .include "${PORTSDIR}/Mk/bsd.ccache.mk" @@ -2058,13 +2058,13 @@ FETCH_REGET?= 1 FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} -.if defined(RANDOMIZE_MASTER_SITES) -.if exists(/usr/games/random) +. if defined(RANDOMIZE_MASTER_SITES) +. if exists(/usr/games/random) RANDOM_CMD?= /usr/games/random RANDOM_ARGS?= -w -f - _RANDOMIZE_SITES= |${RANDOM_CMD} ${RANDOM_ARGS} -.endif -.endif +. endif +. endif TOUCH?= /usr/bin/touch TOUCH_FLAGS?= -f @@ -2073,35 +2073,35 @@ PATCH?= /usr/bin/patch PATCH_STRIP?= -p0 PATCH_DIST_STRIP?= -p0 -.if defined(PATCH_DEBUG) +. if defined(PATCH_DEBUG) PATCH_DEBUG_TMP= yes PATCH_ARGS?= -d ${PATCH_WRKSRC} -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} -E ${PATCH_DIST_STRIP} -.else +. else PATCH_DEBUG_TMP= no PATCH_ARGS?= -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} -d ${PATCH_WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} -.endif -.if !defined(QUIET) +. endif +. if !defined(QUIET) PATCH_SILENT= PATCH_SILENT=yes -.endif -.if defined(BATCH) +. endif +. if defined(BATCH) PATCH_ARGS+= --batch PATCH_DIST_ARGS+= --batch -.endif +. endif # Prevent breakage with VERSION_CONTROL=numbered PATCH_ARGS+= -V simple -.if defined(PATCH_CHECK_ONLY) +. if defined(PATCH_CHECK_ONLY) PATCH_ARGS+= -C PATCH_DIST_ARGS+= -C -.endif +. endif -.if ${PATCH} == "/usr/bin/patch" +. if ${PATCH} == "/usr/bin/patch" PATCH_ARGS+= --suffix .orig PATCH_DIST_ARGS+= --suffix .orig -.endif +. endif TAR?= /usr/bin/tar @@ -2111,13 +2111,13 @@ EXTRACT_AFTER_ARGS?= --no-same-owner --no-same-permissions # Figure out where the local mtree file is -.if !defined(MTREE_FILE) && !defined(NO_MTREE) -.if ${PREFIX} == /usr +. if !defined(MTREE_FILE) && !defined(NO_MTREE) +. if ${PREFIX} == /usr MTREE_FILE= /etc/mtree/BSD.usr.dist -.else +. else MTREE_FILE= ${PORTSDIR}/Templates/BSD.local.dist -.endif -.endif +. endif +. endif MTREE_CMD?= /usr/sbin/mtree MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p @@ -2151,9 +2151,9 @@ # The user can override the NO_PACKAGE by specifying this from # the make command line -.if defined(FORCE_PACKAGE) +. if defined(FORCE_PACKAGE) .undef NO_PACKAGE -.endif +. endif DESCR?= ${PKGDIR}/pkg-descr PLIST?= ${PKGDIR}/pkg-plist @@ -2167,11 +2167,11 @@ TMPPLIST_SORT?= ${WRKDIR}/.PLIST.mktmp.sorted TMPGUCMD?= ${WRKDIR}/.PLIST.gucmd -.if defined(PKG_NOCOMPRESS) +. if defined(PKG_NOCOMPRESS) PKG_SUFX?= .tar -.else +. else PKG_SUFX?= .txz -.endif +. endif # where pkg_add records its dirty deeds. PKG_DBDIR?= /var/db/pkg @@ -2180,9 +2180,9 @@ INSTALL_TARGET+= ${LATE_INSTALL_ARGS} # Integrate with the license auditing framework -.if !defined (DISABLE_LICENSES) +. if !defined (DISABLE_LICENSES) .include "${PORTSDIR}/Mk/bsd.licenses.mk" -.endif +. endif # Popular master sites .include "${PORTSDIR}/Mk/bsd.sites.mk" @@ -2197,200 +2197,200 @@ # as per grouping rules (:something) # Organize _{MASTER,PATCH}_SITES_{DEFAULT,[^/:]+} according to grouping # rules (:something) -.for _S in ${MASTER_SITES} +. for _S in ${MASTER_SITES} _S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_S} MASTER_SITES line has" @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" @${FALSE} -. endif -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. endif +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES" @${FALSE} -. endif +. endif _MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endfor -. else +. endfor +. else _MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endif -.endfor -.for _S in ${PATCH_SITES} +. endif +. endfor +. for _S in ${PATCH_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_S} PATCH_SITES line has" @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" @${FALSE} -. endif -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. endif +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" @${FALSE} -. endif +. endif _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endfor -. else +. endfor +. else _PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endif -.endfor +. endif +. endfor # Feed internal _{MASTER,PATCH}_SITE_SUBDIR_n where n is a group designation # as per grouping rules (:something) # Organize _{MASTER,PATCH}_SITE_SUBDIR_{DEFAULT,[^/:]+} according to grouping # rules (:something) -.for _S in ${MASTER_SITE_SUBDIR} +. for _S in ${MASTER_SITE_SUBDIR} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" @${FALSE} -. endif -. if defined(_MASTER_SITES_${_group}) +. endif +. if defined(_MASTER_SITES_${_group}) _MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endfor -. else -. if defined(_MASTER_SITES_DEFAULT) +. endif +. endfor +. else +. if defined(_MASTER_SITES_DEFAULT) _MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endif -.endfor -.for _S in ${PATCH_SITE_SUBDIR} +. endif +. endif +. endfor +. for _S in ${PATCH_SITE_SUBDIR} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" @${FALSE} -. endif -. if defined(_PATCH_SITES_${_group}) +. endif +. if defined(_PATCH_SITES_${_group}) _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endfor -. else -. if defined(_PATCH_SITES_DEFAULT) +. endif +. endfor +. else +. if defined(_PATCH_SITES_DEFAULT) _PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endif -.endfor +. endif +. endif +. endfor # Substitute subdirectory names # XXX simpler/faster solution but not the best space wise, suggestions please -.for _S in ${MASTER_SITES} +. for _S in ${MASTER_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -. if !defined(_MASTER_SITE_SUBDIR_${_group}) +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} +. if !defined(_MASTER_SITE_SUBDIR_${_group}) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} -. else +. else _S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}} -. else +. else MASTER_SITES_TMP= -. for site in ${_MASTER_SITES_${_group}} +. for site in ${_MASTER_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} -. else -. for dir in ${_MASTER_SITE_SUBDIR_${_group}} +. else +. for dir in ${_MASTER_SITE_SUBDIR_${_group}} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -. endif +. endfor +. endif +. endfor +. endif +. endif _MASTER_SITES_${_group}:= ${MASTER_SITES_TMP} -. endfor -. endif -.endfor -.if defined(_MASTER_SITE_SUBDIR_DEFAULT) +. endfor +. endif +. endfor +. if defined(_MASTER_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_MASTER_SITES_DEFAULT:M*%SUBDIR%/*} -. if empty(_S_TEMP) +. if empty(_S_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT} -. else +. else MASTER_SITES_TMP= -. for site in ${_MASTER_SITES_DEFAULT} +. for site in ${_MASTER_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} -. else -. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} +. else +. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -.else +. endfor +. endif +. endfor +. endif +. else MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} -.endif +. endif _MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} MASTER_SITES_TMP= -.for _S in ${PATCH_SITES} +. for _S in ${PATCH_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -. if !defined(_PATCH_SITE_SUBDIR_${_group}) +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} +. if !defined(_PATCH_SITE_SUBDIR_${_group}) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} -. else +. else _S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} -. else +. else PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_${_group}} +. for site in ${_PATCH_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_${_group}} +. else +. for dir in ${_PATCH_SITE_SUBDIR_${_group}} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -. endif +. endfor +. endif +. endfor +. endif +. endif _PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} -. endfor -. endif -.endfor -.if defined(_PATCH_SITE_SUBDIR_DEFAULT) +. endfor +. endif +. endfor +. if defined(_PATCH_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} -. if empty(_S_TEMP) +. if empty(_S_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} -. else +. else PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_DEFAULT} +. for site in ${_PATCH_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} +. else +. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -.else +. endfor +. endif +. endfor +. endif +. else PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} -.endif +. endif _PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} PATCH_SITES_TMP= @@ -2401,13 +2401,13 @@ # If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository # for everything, but don't search it twice by appending it to the end. -.if defined(MASTER_SITE_FREEBSD) +. if defined(MASTER_SITE_FREEBSD) _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP} _MASTER_SITE_BACKUP:= # empty -.else +. else _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE} _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP} -.endif +. endif NOFETCHFILES?= @@ -2417,45 +2417,45 @@ _MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} _PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} _G_TEMP= DEFAULT -.for _D in ${DISTFILES} +. for _D in ${DISTFILES} _D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} -. if !empty(_D_TEMP) -. for _group in ${_D_TEMP:S/^://:S/,/ /g} -. if !defined(_MASTER_SITES_${_group}) +. if !empty(_D_TEMP) +. for _group in ${_D_TEMP:S/^://:S/,/ /g} +. if !defined(_MASTER_SITES_${_group}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} -. if empty(_G_TEMP_TEMP) +. if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} -. endif -. endif -. endfor +. endif +. endif +. endfor _DISTFILES+= ${_D:C/:[^:]+$//} -. else +. else _DISTFILES+= ${_D} -. endif -.endfor +. endif +. endfor _G_TEMP= DEFAULT -.for _P in ${PATCHFILES} +. for _P in ${PATCHFILES} _P_TEMP= ${_P:C/:[^-:][^:]*$//} _P_groups= ${_P:S/^${_P:C/:[^:]+$//}//:S/^://} _P_file= ${_P_TEMP:C/:-[^:]+$//} _P_strip= ${_P_TEMP:S/^${_P_TEMP:C/:-[^:]*$//}//:S/^://} -. if !empty(_P_groups) -. for _group in ${_P_groups:S/,/ /g} -. if !defined(_PATCH_SITES_${_group}) +. if !empty(_P_groups) +. for _group in ${_P_groups:S/,/ /g} +. if !defined(_PATCH_SITES_${_group}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} -. if empty(_G_TEMP_TEMP) +. if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} -. endif -. endif -. endfor -. endif +. endif +. endif +. endfor +. endif _PATCHFILES:= ${_PATCHFILES} ${_P_file} -. if !empty(_P_strip) +. if !empty(_P_strip) _PATCH_DIST_STRIP_CASES:= ${_PATCH_DIST_STRIP_CASES} ("${_P_file}") printf %s "${_P_strip}" ;; -. endif -.endfor +. endif +. endfor _P_groups= _P_file= _P_strip= @@ -2471,62 +2471,62 @@ MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|} MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; } -.for srt in ${MASTER_SORT_REGEX} +. for srt in ${MASTER_SORT_REGEX} MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } -.endfor +. endfor MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } # # Hackery to enable simple fetch targets with several dynamic MASTER_SITES # _MASTER_SITES_ENV= _MASTER_SITES_DEFAULT=${_MASTER_SITES_DEFAULT:Q} -.for _F in ${DISTFILES} +. for _F in ${DISTFILES} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} -. if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} -. if defined(_MASTER_SITES_${_group}) +. if !empty(_F_TEMP) +. for _group in ${_F_TEMP:S/,/ /g} +. if defined(_MASTER_SITES_${_group}) _MASTER_SITES_ENV+= _MASTER_SITES_${_group}=${_MASTER_SITES_${_group}:Q} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor _PATCH_SITES_ENV= _PATCH_SITES_DEFAULT=${_PATCH_SITES_DEFAULT:Q} -.for _F in ${PATCHFILES} +. for _F in ${PATCHFILES} _F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} -. if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} -. if defined(_PATCH_SITES_${_group}) +. if !empty(_F_TEMP) +. for _group in ${_F_TEMP:S/,/ /g} +. if defined(_PATCH_SITES_${_group}) _PATCH_SITES_ENV+= _PATCH_SITES_${_group}=${_PATCH_SITES_${_group}:Q} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor CKSUMFILES= ${ALLFILES} # List of all files, with ${DIST_SUBDIR} in front. Used for checksum. -.if defined(DIST_SUBDIR) -.if defined(CKSUMFILES) && ${CKSUMFILES}!="" +. if defined(DIST_SUBDIR) +. if defined(CKSUMFILES) && ${CKSUMFILES}!="" _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} -.endif -.else +. endif +. else _CKSUMFILES?= ${CKSUMFILES} -.endif +. endif # This is what is actually going to be extracted, and is overridable # by user. EXTRACT_ONLY?= ${_DISTFILES} -.if !target(maintainer) +. if !target(maintainer) maintainer: @${ECHO_CMD} "${MAINTAINER}" -.endif +. endif -.if !defined(CATEGORIES) +. if !defined(CATEGORIES) check-categories: @${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." @${FALSE} -.else +. else VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ benchmarks biology cad chinese comms converters databases \ @@ -2543,21 +2543,21 @@ x11-toolkits x11-wm xfce zope check-categories: -.for cat in ${CATEGORIES} -. if empty(VALID_CATEGORIES:M${cat}) +. for cat in ${CATEGORIES} +. if empty(VALID_CATEGORIES:M${cat}) @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ ${FALSE}; -. endif -.endfor -.endif +. endif +. endfor +. endif PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} -.if exists(${PACKAGES}) +. if exists(${PACKAGES}) PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} -.else +. else PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} -.endif +. endif WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' @@ -2574,19 +2574,19 @@ # A default message to print if do-configure fails. CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." -.if defined(GNU_CONFIGURE) +. if defined(GNU_CONFIGURE) # Maximum command line length -.if !defined(CONFIGURE_MAX_CMD_LEN) +. if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax -.endif +. endif _EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN GNU_CONFIGURE_PREFIX?= ${PREFIX} GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} CONFIG_SITE?= ${PORTSDIR}/Templates/config.site CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} -.if defined(X_BUILD_FOR) +. if defined(X_BUILD_FOR) CONFIGURE_ARGS+= --host=${X_BUILD_FOR} -.endif +. endif CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} HAS_CONFIGURE= yes @@ -2607,7 +2607,7 @@ else \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ fi ; -.endif +. endif # Passed to most of script invocations SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ @@ -2615,44 +2615,44 @@ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} -.if defined(BATCH) +. if defined(BATCH) SCRIPTS_ENV+= BATCH=yes -.endif +. endif -.if ${PREFIX} == /usr +. if ${PREFIX} == /usr MANPREFIX?= /usr/share -.else +. else MANPREFIX?= ${PREFIX} -.endif +. endif MANDIRS+= ${MANPREFIX}/man -.for sect in 1 2 3 4 5 6 7 8 9 +. for sect in 1 2 3 4 5 6 7 8 9 MAN${sect}PREFIX?= ${MANPREFIX} -.endfor +. endfor MANLPREFIX?= ${MANPREFIX} MANNPREFIX?= ${MANPREFIX} -.if ${PREFIX} == /usr +. if ${PREFIX} == /usr INFO_PATH?= share/info -.else +. else INFO_PATH?= info -.endif +. endif -.if defined(INFO) +. if defined(INFO) RUN_DEPENDS+= indexinfo:print/indexinfo -. for D in ${INFO:H} +. for D in ${INFO:H} RD:= ${D} -. if ${RD} != "." -. if !defined(INFO_SUBDIR) +. if ${RD} != "." +. if !defined(INFO_SUBDIR) INFO_SUBDIR:= ${RD} -. elif ${INFO_SUBDIR} != ${RD} +. elif ${INFO_SUBDIR} != ${RD} BROKEN= only one subdirectory in INFO is allowed -. endif -. endif +. endif +. endif .undef RD -. endfor -.endif +. endfor +. endif DOCSDIR_REL?= ${DOCSDIR:S,^${PREFIX}/,,} EXAMPLESDIR_REL?= ${EXAMPLESDIR:S,^${PREFIX}/,,} @@ -2694,169 +2694,169 @@ ################################################################ # Check the machine architectures -.if defined(ONLY_FOR_ARCHS) -.for __ARCH in ${ONLY_FOR_ARCHS} -.if ${ARCH:M${__ARCH}} != "" +. if defined(ONLY_FOR_ARCHS) +. for __ARCH in ${ONLY_FOR_ARCHS} +. if ${ARCH:M${__ARCH}} != "" __ARCH_OK?= 1 -.endif -.endfor -.else +. endif +. endfor +. else __ARCH_OK?= 1 -.endif +. endif -.if defined(NOT_FOR_ARCHS) -.for __NARCH in ${NOT_FOR_ARCHS} -.if ${ARCH:M${__NARCH}} != "" +. if defined(NOT_FOR_ARCHS) +. for __NARCH in ${NOT_FOR_ARCHS} +. if ${ARCH:M${__NARCH}} != "" .undef __ARCH_OK -.endif -.endfor -.endif +. endif +. endfor +. endif -.if !defined(__ARCH_OK) -.if defined(ONLY_FOR_ARCHS) +. if !defined(__ARCH_OK) +. if defined(ONLY_FOR_ARCHS) IGNORE= is only for ${ONLY_FOR_ARCHS}, -.else # defined(NOT_FOR_ARCHS) +. else # defined(NOT_FOR_ARCHS) IGNORE= does not run on ${NOT_FOR_ARCHS}, -.endif +. endif IGNORE+= while you are running ${ARCH} -.if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) +. if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) -.elif defined(ONLY_FOR_ARCHS_REASON) +. elif defined(ONLY_FOR_ARCHS_REASON) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) -.endif +. endif -.if defined(NOT_FOR_ARCHS_REASON_${ARCH}) +. if defined(NOT_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) -.elif defined(NOT_FOR_ARCHS_REASON) +. elif defined(NOT_FOR_ARCHS_REASON) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) -.endif +. endif -.endif +. endif # Check the user interaction and legal issues -.if !defined(NO_IGNORE) -.if (defined(IS_INTERACTIVE) && defined(BATCH)) +. if !defined(NO_IGNORE) +. if (defined(IS_INTERACTIVE) && defined(BATCH)) IGNORE= is an interactive port -.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) +. elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) IGNORE= is not an interactive port -.elif (defined(NO_CDROM) && defined(FOR_CDROM)) +. elif (defined(NO_CDROM) && defined(FOR_CDROM)) IGNORE= may not be placed on a CDROM: ${NO_CDROM} -.elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) +. elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) IGNORE= is restricted: ${RESTRICTED} -.elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) +. elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) IGNORE= may not be packaged: ${NO_PACKAGE} -.elif defined(BROKEN) -.if !defined(TRYBROKEN) +. elif defined(BROKEN) +. if !defined(TRYBROKEN) IGNORE= is marked as broken: ${BROKEN} -.endif -.elif defined(BROKEN_${ARCH}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${ARCH}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${ARCH}: ${BROKEN_${ARCH}} -.endif -.elif defined(BROKEN_${OPSYS}_${OSREL:R}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}_${OSREL:R}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS} ${OSREL}: ${BROKEN_${OPSYS}_${OSREL:R}} -.endif -.elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS} ${OSREL} ${ARCH}: ${BROKEN_${OPSYS}_${OSREL:R}_${ARCH}} -.endif -.elif defined(BROKEN_${OPSYS}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS}: ${BROKEN_${OPSYS}} -.endif -.elif defined(FORBIDDEN) +. endif +. elif defined(FORBIDDEN) IGNORE= is forbidden: ${FORBIDDEN} -.endif +. endif # Define the text to be output to LEGAL -.if defined(LEGAL_TEXT) +. if defined(LEGAL_TEXT) LEGAL= ${LEGAL_TEXT} -.elif defined(RESTRICTED) +. elif defined(RESTRICTED) LEGAL= ${RESTRICTED} -.elif defined(NO_CDROM) +. elif defined(NO_CDROM) LEGAL= ${NO_CDROM} -.elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) +. elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) LEGAL= ${NO_PACKAGE} -.endif +. endif -.if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) +. if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} clean: @${IGNORECMD} -.endif +. endif -.if defined(IGNORE) -.if defined(IGNORE_SILENT) +. if defined(IGNORE) +. if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} -.else +. else IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}. | ${FMT} 75 79 ; exit 1 -.endif +. endif _TARGETS= check-sanity fetch checksum extract patch configure all build \ install reinstall test package stage restage -.for target in ${_TARGETS} -.if !target(${target}) +. for target in ${_TARGETS} +. if !target(${target}) ${target}: @${IGNORECMD} -.if defined(INSTALLS_DEPENDS) +. if defined(INSTALLS_DEPENDS) @${FALSE} -.endif -.endif -.endfor +. endif +. endif +. endfor -.endif +. endif -.endif +. endif -.if defined(IGNORE) || defined(NO_PACKAGE) +. if defined(IGNORE) || defined(NO_PACKAGE) ignorelist: package-name -.else +. else ignorelist: @${DO_NADA} -.endif +. endif -.if defined(IGNORE) || defined(NO_PACKAGE) +. if defined(IGNORE) || defined(NO_PACKAGE) ignorelist-verbose: -.if defined(IGNORE) +. if defined(IGNORE) @${ECHO_CMD} "${PKGNAME}|IGNORE: "${IGNORE:Q} -.else +. else @${ECHO_CMD} "${PKGNAME}|NO_PACKAGE: "${NO_PACKAGE:Q} -.endif -.else +. endif +. else ignorelist-verbose: @${DO_NADA} -.endif +. endif ################################################################ # Clean directories for ftp or CDROM. ################################################################ -.if !defined(LICENSE) +. if !defined(LICENSE) -.if defined(RESTRICTED) +. if defined(RESTRICTED) clean-restricted: delete-distfiles delete-package clean-restricted-list: delete-distfiles-list delete-package-list RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} -.else +. else clean-restricted: clean-restricted-list: -.endif +. endif -.if defined(NO_CDROM) +. if defined(NO_CDROM) clean-for-cdrom: delete-distfiles delete-package clean-for-cdrom-list: delete-distfiles-list delete-package-list RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} -.else +. else clean-for-cdrom: clean-for-cdrom-list: -.endif +. endif -.endif # !defined(LICENSE) +. endif # !defined(LICENSE) -.if defined(ALL_HOOK) +. if defined(ALL_HOOK) all: @cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ @@ -2865,27 +2865,27 @@ BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" \ CONFLICTS="${CONFLICTS}" \ ${ALL_HOOK} -.endif +. endif -.if !target(all) +. if !target(all) all: stage -.endif +. endif -.if !defined(DEPENDS_TARGET) -.if defined(DEPENDS_PRECLEAN) +. if !defined(DEPENDS_TARGET) +. if defined(DEPENDS_PRECLEAN) DEPENDS_TARGET= clean DEPENDS_ARGS= NOCLEANDEPENDS=yes -.endif -.if make(reinstall) +. endif +. if make(reinstall) DEPENDS_TARGET+= reinstall -.else +. else DEPENDS_TARGET+= install -.endif -.if defined(DEPENDS_CLEAN) +. endif +. if defined(DEPENDS_CLEAN) DEPENDS_TARGET+= clean DEPENDS_ARGS+= NOCLEANDEPENDS=yes -.endif -.endif +. endif +. endif ################################################################ # @@ -2893,12 +2893,12 @@ # target or not. # ################################################################ -.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ +. if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ && !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ || defined(CONFIG_DONE_${PKGBASE:tu}) || \ defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes -.endif +. endif ################################################################ # The following are used to create easy dummy targets for @@ -2910,38 +2910,38 @@ ################################################################ # Disable checksum -.if defined(NO_CHECKSUM) && !target(checksum) +. if defined(NO_CHECKSUM) && !target(checksum) checksum: fetch @${DO_NADA} -.endif +. endif # Disable build -.if defined(NO_BUILD) && !target(build) +. if defined(NO_BUILD) && !target(build) build: configure @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} -.endif +. endif # Disable test -.if defined(NO_TEST) && !target(test) +. if defined(NO_TEST) && !target(test) test: stage @${DO_NADA} -.endif +. endif # Disable package -.if defined(NO_PACKAGE) && !target(package) +. if defined(NO_PACKAGE) && !target(package) package: -.if defined(IGNORE_SILENT) +. if defined(IGNORE_SILENT) @${DO_NADA} -.else +. else @${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. -.endif -.endif +. endif +. endif # Disable describe -.if defined(NO_DESCRIBE) && !target(describe) +. if defined(NO_DESCRIBE) && !target(describe) describe: @${DO_NADA} -.endif +. endif ################################################################ # More standard targets start here. @@ -2956,32 +2956,32 @@ pre-everything:: @${DO_NADA} -.if defined(TRYBROKEN) && defined(BROKEN) +. if defined(TRYBROKEN) && defined(BROKEN) buildanyway-message: @${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." -.endif +. endif options-message: -.if defined(GNOME_OPTION_MSG) && (!defined(PACKAGE_BUILDING) || !defined(BATCH)) +. if defined(GNOME_OPTION_MSG) && (!defined(PACKAGE_BUILDING) || !defined(BATCH)) @for m in ${GNOME_OPTION_MSG}; do \ ${ECHO_MSG} $$m; \ done -.else +. else @${DO_NADA} -.endif -.if defined(_OPTIONS_READ) +. endif +. if defined(_OPTIONS_READ) @${ECHO_MSG} "===> Found saved configuration for ${_OPTIONS_READ}" -.endif +. endif ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR}: @${MKDIR} ${.TARGET} # Warn user about deprecated packages. Advisory only. -.if !target(check-deprecated) +. if !target(check-deprecated) # Try and keep these messages in sync with the ones in Mk/Scripts/create-manifest.sh check-deprecated: -.if ${MAINTAINER} == "ports@FreeBSD.org" +. if ${MAINTAINER} == "ports@FreeBSD.org" @${ECHO_MSG} "===> NOTICE:" @${ECHO_MSG} @${ECHO_MSG} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is" @@ -2994,27 +2994,27 @@ @${ECHO_MSG} @${ECHO_MSG} "https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port" @${ECHO_MSG} -.endif -.if defined(DEPRECATED) +. endif +. if defined(DEPRECATED) @${ECHO_MSG} "===> NOTICE:" @${ECHO_MSG} @${ECHO_MSG} "This port is deprecated; you may wish to reconsider installing it:" @${ECHO_MSG} @${ECHO_MSG} ${DEPRECATED:Q}. @${ECHO_MSG} -.if defined(EXPIRATION_DATE) +. if defined(EXPIRATION_DATE) @${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}." @${ECHO_MSG} -.endif -.endif -.endif +. endif +. endif +. endif # Check if the port is listed in the vulnerability database AUDITFILE?= ${PKG_DBDIR}/vuln.xml check-vulnerable: -.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ +. if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ && exists(${AUDITFILE}) @${SETENV} \ dp_ECHO_MSG="${ECHO_MSG}" \ @@ -3023,7 +3023,7 @@ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ ${SH} ${SCRIPTSDIR}/check-vulnerable.sh -.endif +. endif # Quote simply quote all variables, except FETCH_ENV, some ports are creative # with it, and it needs to be quoted twice to pass through the echo/eval in @@ -3047,78 +3047,78 @@ dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_TARGET='${.TARGET}' -.if defined(DEVELOPER) +. if defined(DEVELOPER) _DO_FETCH_ENV+= dp_DEVELOPER=yes -.else +. else _DO_FETCH_ENV+= dp_DEVELOPER= -.endif +. endif # Fetch -.if !target(do-fetch) +. if !target(do-fetch) do-fetch: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # # Prints out a list of files to fetch (useful to do a batch fetch) -.if !target(fetch-list) +. if !target(fetch-list) fetch-list: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # Used by fetch-urlall-list and fetch-url-list -.if !target(fetch-url-list-int) +. if !target(fetch-url-list-int) fetch-url-list-int: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # Prints out all the URL for all the DISTFILES and PATCHFILES. -.if !target(fetch-urlall-list) +. if !target(fetch-urlall-list) fetch-urlall-list: @cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int -.endif +. endif # Prints the URL for all the DISTFILES and PATCHFILES that are not here -.if !target(fetch-url-list) +. if !target(fetch-url-list) fetch-url-list: fetch-url-list-int -.endif +. endif # Extract @@ -3126,7 +3126,7 @@ clean-wrkdir: @${RM} -rf ${WRKDIR} -.if !target(do-extract) +. if !target(do-extract) do-extract: @for file in ${EXTRACT_ONLY}; do \ if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ @@ -3138,13 +3138,13 @@ ${CHMOD} -R ug-s ${WRKDIR}; \ ${CHOWN} -R 0:0 ${WRKDIR}; \ fi -.endif +. endif # Patch -.if !target(do-patch) +. if !target(do-patch) do-patch: -.if defined(PATCHFILES) +. if defined(PATCHFILES) @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" @(set -e; \ cd ${_DISTDIR}; \ @@ -3165,8 +3165,8 @@ *) ${CAT} $$i ;; \ esac | ${PATCH} ${PATCH_DIST_ARGS} `patch_dist_strip $$i` ; \ done ) -.endif -.if defined(EXTRA_PATCHES) +. endif +. if defined(EXTRA_PATCHES) @set -e ; \ for i in ${EXTRA_PATCHES}; do \ case $$i in \ @@ -3182,7 +3182,7 @@ *) ${CAT} $$patch_file ;; \ esac | ${PATCH} ${PATCH_ARGS} $$patch_strip ; \ done -.endif +. endif @set -e ;\ if [ -d ${PATCHDIR} ]; then \ if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \ @@ -3211,12 +3211,12 @@ done; \ fi; \ fi -.endif +. endif -.if !target(run-autotools-fixup) +. if !target(run-autotools-fixup) run-autotools-fixup: # Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. -.if ${OSVERSION} >= 1000000 && !defined(WITHOUT_FBSD10_FIX) +. if ${OSVERSION} >= 1000000 && !defined(WITHOUT_FBSD10_FIX) -@for f in `${FIND} ${WRKDIR} -type f \( -name config.libpath -o \ -name config.rpath -o -name configure -o -name libtool.m4 -o \ -name ltconfig -o -name libtool -o -name aclocal.m4 -o \ @@ -3233,18 +3233,18 @@ ${TOUCH} ${TOUCH_FLAGS} -mr $${f}.fbsd10bak $${f} ; \ ${RM} -f $${f}.fbsd10bak ; \ done -.endif -.endif +. endif +. endif # Configure -.if !target(do-configure) +. if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi -.if defined(GNU_CONFIGURE) +. if defined(GNU_CONFIGURE) @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ | ${XARGS} -n 1 ${DIRNAME}); \ for _D in $${CONFIG_GUESS_DIRS}; do \ @@ -3255,8 +3255,8 @@ ${CP} ${TEMPLATES}/config.sub $${_D}/config.sub; \ ${CHMOD} a+rx $${_D}/config.sub; \ done -.endif -.if defined(HAS_CONFIGURE) +. endif +. if defined(HAS_CONFIGURE) @${MKDIR} ${CONFIGURE_WRKSRC} @(cd ${CONFIGURE_WRKSRC} && \ ${SET_LATE_CONFIGURE_ARGS} \ @@ -3273,13 +3273,13 @@ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ ${FALSE}; \ fi) -.endif -.endif +. endif +. endif # Build # XXX: ${MAKE_ARGS:N${DESTDIRNAME}=*} would be easier but it is not valid with the old fmake DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ @@ -3288,17 +3288,17 @@ fi; \ ${FALSE}; \ fi) -.endif +. endif # Check conflicts -.if !target(check-conflicts) +. if !target(check-conflicts) check-conflicts: check-build-conflicts check-install-conflicts -.endif +. endif -.if !target(check-build-conflicts) +. if !target(check-build-conflicts) check-build-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) +. if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ @@ -3317,12 +3317,12 @@ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1;\ fi -.endif -.endif +. endif +. endif -.if !target(identify-install-conflicts) +. if !target(identify-install-conflicts) identify-install-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) +. if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ @@ -3341,13 +3341,13 @@ ${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ sleep 10; \ fi -.endif -.endif +. endif +. endif -.if !target(check-install-conflicts) +. if !target(check-install-conflicts) check-install-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) -.if defined(DEFER_CONFLICTS_CHECK) +. if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) +. if defined(DEFER_CONFLICTS_CHECK) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ @@ -3365,7 +3365,7 @@ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi -.else +. else @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ @@ -3384,20 +3384,20 @@ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi -.endif # defined(DEFER_CONFLICTS_CHECK) -.endif -.endif +. endif # defined(DEFER_CONFLICTS_CHECK) +. endif +. endif # Install -.if !target(do-install) && !defined(NO_INSTALL) +. if !target(do-install) && !defined(NO_INSTALL) do-install: @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endif +. endif # Test -.if !target(do-test) && defined(TEST_TARGET) +. if !target(do-test) && defined(TEST_TARGET) DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:C,^${DESTDIRNAME}=.*,,g} do-test: @(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ @@ -3407,18 +3407,18 @@ fi; \ ${FALSE}; \ fi) -.elif !target(do-test) +. elif !target(do-test) do-test: @${DO_NADA} -.endif +. endif # Package -.if !target(do-package) +. if !target(do-package) PKG_CREATE_ARGS= -r ${STAGEDIR} -m ${METADIR} -p ${TMPPLIST} -.if defined(PKG_CREATE_VERBOSE) +. if defined(PKG_CREATE_VERBOSE) PKG_CREATE_ARGS+= -v -.endif +. endif do-package: create-manifest do-package: ${TMPPLIST} @if [ -d ${PACKAGES} ]; then \ @@ -3454,30 +3454,30 @@ cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ exit 1; \ fi -.endif +. endif # Some support rules for do-package -.if !target(delete-package) +. if !target(delete-package) delete-package: @${ECHO_MSG} "===> Deleting package for ${PKGNAME}" # When staging, the package may only be in the workdir if not root @${RM} -f ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : -.endif +. endif -.if !target(delete-package-list) +. if !target(delete-package-list) delete-package-list: @${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} -f ${PKGFILE})" -.endif +. endif # Used by scripts and users to install a package from local repository. # Poudriere -i uses this, please keep. -.if !target(install-package) -.if defined(FORCE_PKG_REGISTER) +. if !target(install-package) +. if defined(FORCE_PKG_REGISTER) _INSTALL_PKG_ARGS= -f -.endif -.if defined(INSTALLS_DEPENDS) +. endif +. if defined(INSTALLS_DEPENDS) _INSTALL_PKG_ARGS+= -A -.endif +. endif install-package: @if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ _pkgfile="${WRKDIR_PKGFILE}"; \ @@ -3485,13 +3485,13 @@ _pkgfile="${PKGFILE}"; \ fi; \ ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} -.endif +. endif # Utility targets follow -.if !target(check-already-installed) -.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) +. if !target(check-already-installed) +. if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) check-already-installed: @${ECHO_MSG} "===> Checking if ${PKGBASE} already installed"; \ pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \ @@ -3509,61 +3509,61 @@ ${ECHO_MSG} " in your environment or the \"make install\" command line."; \ exit 1; \ fi -.endif -.endif +. endif +. endif -.if !target(check-umask) +. if !target(check-umask) check-umask: @if [ `${SH} -c umask` != 0022 ]; then \ ${ECHO_MSG} "===> Warning: your umask is \"`${SH} -c umask`"\".; \ ${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ ${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ fi -.endif +. endif -.if !target(install-mtree) +. if !target(install-mtree) install-mtree: @${DO_NADA} -.endif +. endif -.if !target(install-ldconfig-file) +. if !target(install-ldconfig-file) install-ldconfig-file: -. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) -. if defined(USE_LDCONFIG) -. if !defined(USE_LINUX_PREFIX) -. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) +. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) +. if defined(USE_LDCONFIG) +. if !defined(USE_LINUX_PREFIX) +. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing ldconfig configuration file" -. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} +. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} -. endif +. endif @${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} -. if ${PREFIX} != ${LOCALBASE} +. if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG_DIR}" >> ${TMPPLIST} +. endif +. endif . endif . endif -. endif -. endif -. if defined(USE_LDCONFIG32) -. if !defined(INSTALL_AS_USER) +. if defined(USE_LDCONFIG32) +. if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" -. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} +. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} -. endif +. endif @${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} -. if ${PREFIX} != ${LOCALBASE} +. if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG32_DIR}" >> ${TMPPLIST} +. endif +. endif . endif . endif . endif -. endif -.endif -.if !target(create-users-groups) -.if defined(GROUPS) || defined(USERS) +. if !target(create-users-groups) +. if defined(GROUPS) || defined(USERS) _UG_INSTALL= ${WRKDIR}/users-groups-install.sh _UG_DEINSTALL= ${WRKDIR}/users-groups-deinstall.sh PKGPREINSTALL+= ${_UG_INSTALL} @@ -3586,11 +3586,11 @@ dp_UID_OFFSET="${UID_OFFSET}" \ dp_USERS_BLACKLIST="${USERS_BLACKLIST}" \ ${SH} ${SCRIPTSDIR}/do-users-groups.sh "${USERS}" "${GROUPS}" -.endif -.endif +. endif +. endif -.if !defined(DISABLE_SECURITY_CHECK) -.if !target(security-check) +. if !defined(DISABLE_SECURITY_CHECK) +. if !target(security-check) security-check: ${TMPPLIST} # Scan PLIST for: # 1. setugid files @@ -3625,11 +3625,11 @@ ${ECHO_MSG} "$${www_site}"; \ fi; \ fi -.endif -.else # i.e. defined(DISABLE_SECURITY_CHECK) +. endif +. else # i.e. defined(DISABLE_SECURITY_CHECK) security-check: @${ECHO_MSG} " WARNING: Security check has been disabled." -.endif # !defined(DISABLE_SECURITY_CHECK) +. endif # !defined(DISABLE_SECURITY_CHECK) ################################################################ # Skeleton targets start here @@ -3659,21 +3659,21 @@ # Empty pre-* and post-* targets -.for stage in pre post -.for name in pkg check-sanity fetch extract patch configure build stage install package +. for stage in pre post +. for name in pkg check-sanity fetch extract patch configure build stage install package -.if exists(${SCRIPTDIR}/${stage}-${name}) -.if !target(${stage}-${name}-script) +. if exists(${SCRIPTDIR}/${stage}-${name}) +. if !target(${stage}-${name}-script) ${stage}-${name}-script: @ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/${.TARGET:S/-script$//} -.endif -.endif +. endif +. endif -.endfor -.endfor +. endfor +. endfor -.if !target(pretty-print-www-site) +. if !target(pretty-print-www-site) pretty-print-www-site: @www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ if [ -n "$${www_site}" ]; then \ @@ -3681,7 +3681,7 @@ ${ECHO_MSG} -n "web site"; \ ${ECHO_MSG} " for further information"; \ fi -.endif +. endif ################################################################ # Some more targets supplied for users' convenience @@ -3691,39 +3691,39 @@ # # Special target to verify patches -.if !target(checkpatch) +. if !target(checkpatch) checkpatch: @cd ${.CURDIR} && ${MAKE} ${PATCH_SILENT} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_REAL_SEQ} -.endif +. endif # Reinstall # # Special target to re-run install -.if !target(reinstall) +. if !target(reinstall) reinstall: @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} -DFORCE_PKG_REGISTER install -.endif +. endif -.if !target(restage) +. if !target(restage) restage: @${RM} -rf ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && ${MAKE} stage -.endif +. endif # Deinstall # # Special target to remove installation -.if !target(deinstall) +. if !target(deinstall) deinstall: -.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) +. if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${.TARGET}" @${ECHO_MSG} "===> Returning to user credentials" -.else +. else @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" @if ${PKG_INFO} -e ${PKGBASE}; then \ p=`${PKG_INFO} -q -O ${PKGBASE}`; \ @@ -3733,21 +3733,21 @@ ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ fi @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} -.endif -.endif +. endif +. endif # Deinstall-all # # Special target to remove installation of all ports of the same origin -.if !target(deinstall-all) +. if !target(deinstall-all) deinstall-all: -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +. if ${UID} != 0 && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${.TARGET}" @${ECHO_MSG} "===> Returning to user credentials" -.else +. else @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}" @deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ for oldpkgorigin in $$(${GREP} "|${PKGORIGIN}|" ${PORTSDIR}/MOVED | ${CUT} -f 1 -d '|' | ${SORT} -u); do \ @@ -3762,12 +3762,12 @@ ${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \ fi; \ ${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} -.endif -.endif +. endif +. endif # Cleaning up -.if !target(do-clean) +. if !target(do-clean) do-clean: @if [ -d ${WRKDIR} ]; then \ if [ -w ${WRKDIR} ]; then \ @@ -3776,34 +3776,34 @@ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ fi; \ fi -.endif +. endif -.if !target(clean) +. if !target(clean) clean: -.if !defined(NOCLEANDEPENDS) +. if !defined(NOCLEANDEPENDS) @cd ${.CURDIR} && ${MAKE} limited-clean-depends -.endif +. endif @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" -.if target(pre-clean) +. if target(pre-clean) @cd ${.CURDIR} && ${MAKE} pre-clean -.endif +. endif @cd ${.CURDIR} && ${MAKE} do-clean -.if target(post-clean) +. if target(post-clean) @cd ${.CURDIR} && ${MAKE} post-clean -.endif -.endif +. endif +. endif -.if !target(pre-distclean) +. if !target(pre-distclean) pre-distclean: @${DO_NADA} -.endif +. endif -.if !target(distclean) +. if !target(distclean) distclean: pre-distclean clean @cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" -.endif +. endif -.if !target(delete-distfiles) +. if !target(delete-distfiles) delete-distfiles: @${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}" @(if [ "X${RESTRICTED_FILES}" != "X" -a -d ${_DISTDIR} ]; then \ @@ -3816,12 +3816,12 @@ fi; \ done; \ fi) -.if defined(DIST_SUBDIR) +. if defined(DIST_SUBDIR) -@${RMDIR} ${_DISTDIR} >/dev/null 2>&1 || ${TRUE} -.endif -.endif +. endif +. endif -.if !target(delete-distfiles-list) +. if !target(delete-distfiles-list) delete-distfiles-list: @${ECHO_CMD} "# ${PKGNAME}" @if [ "X${RESTRICTED_FILES}" != "X" ]; then \ @@ -3833,10 +3833,10 @@ fi; \ done; \ fi -.if defined(DIST_SUBDIR) +. if defined(DIST_SUBDIR) @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" -.endif -.endif +. endif +. endif # Generates patches. @@ -3857,7 +3857,7 @@ _CHECKSUM_INIT_ENV= \ dp_SHA256=${SHA256} -.if !target(makesum) +. if !target(makesum) # Some port change the options with OPTIONS_*_FORCE when make(makesum) to be # able to add all distfiles in one go. # For this to work, we need to call the do-fetch script directly here so that @@ -3865,20 +3865,20 @@ # As we're fetching new distfiles, that are not in the distinfo file, disable # checksum and sizes checks. makesum: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif +. endif @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ @@ -3888,11 +3888,11 @@ dp_ECHO_MSG='${ECHO_MSG}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ ${SH} ${SCRIPTSDIR}/makesum.sh ${DISTFILES:C/.*/'&'/} -.endif +. endif -.if !target(checksum) +. if !target(checksum) checksum: fetch -.if !empty(_CKSUMFILES) +. if !empty(_CKSUMFILES) @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ @@ -3908,8 +3908,8 @@ dp_DISABLE_SIZE='${DISABLE_SIZE}' \ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ ${SH} ${SCRIPTSDIR}/checksum.sh ${_CKSUMFILES:C/.*/'&'/} -.endif -.endif +. endif +. endif ################################################################ # The special package-building targets @@ -3918,37 +3918,37 @@ # Nobody should want to override this unless PKGNAME is simply bogus. -.if !target(package-name) +. if !target(package-name) package-name: @${ECHO_CMD} ${PKGNAME} -.endif +. endif # Build a package but don't check the package cookie -.if !target(repackage) +. if !target(repackage) repackage: pre-repackage package pre-repackage: @${RM} -f ${PACKAGE_COOKIE} -.endif +. endif # Build a package but don't check the cookie for installation, also don't # install package cookie -.if !target(package-noinstall) +. if !target(package-noinstall) package-noinstall: package -.endif +. endif ################################################################ # Dependency checking ################################################################ -.if !target(depends) +. if !target(depends) depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends -.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST +. for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST ${deptype:tl}-depends: -.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) +. if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) @${SETENV} \ dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ dp_DEPTYPE="${deptype}_DEPENDS" \ @@ -3970,26 +3970,26 @@ PORTSDIR="${PORTSDIR}" \ dp_MAKE="${MAKE}" \ ${SH} ${SCRIPTSDIR}/do-depends.sh -.endif -.endfor +. endif +. endfor -.endif +. endif # Dependency lists: both build and runtime, recursive. Print out directory names. _UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} _DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} -.for d in ${_UNIFIED_DEPENDS:M*\:/*} +. for d in ${_UNIFIED_DEPENDS:M*\:/*} # Fight .for variable interpolation differently for each version of make... -.if defined(.PARSEDIR) +. if defined(.PARSEDIR) _PORTSDIR_STR= $${PORTSDIR}/ DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." -.else +. else _PORTSDIR_STR= $$$${PORTSDIR}/ DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." -.endif -.endfor +. endif +. endfor all-depends-list: @${ALL-DEPENDS-LIST} @@ -4009,28 +4009,28 @@ CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} -.if !target(clean-depends) +. if !target(clean-depends) clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done -.endif +. endif -.if !target(limited-clean-depends) +. if !target(limited-clean-depends) limited-clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIMITED-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done -.endif +. endif -.if !target(deinstall-depends) +. if !target(deinstall-depends) deinstall-depends: @for dir in $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} deinstall); \ done -.endif +. endif -.if !target(fetch-specials) +. if !target(fetch-specials) fetch-specials: @${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" @for dir in ${_DEPEND_SPECIALS}; do \ @@ -4040,22 +4040,22 @@ esac; \ (cd $$dir; ${MAKE} fetch); \ done -.endif +. endif -.if !target(fetch-recursive) +. if !target(fetch-recursive) fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} fetch); \ done -.endif +. endif -.if !target(fetch-recursive-list) +. if !target(fetch-recursive-list) fetch-recursive-list: @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} fetch-list); \ done -.endif +. endif # Used by fetch-required and fetch-required list, this script looks # at each of the dependencies. If 3 items are specified in the tuple, @@ -4090,46 +4090,46 @@ echo cd $$dir; cd $$dir; ${MAKE} $$targ; \ done -.if !target(fetch-required) +. if !target(fetch-required) fetch-required: fetch -.if defined(NO_DEPENDS) +. if defined(NO_DEPENDS) @${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" -.else +. else @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" -.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN -.if defined(${deptype}_DEPENDS) +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) @targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif +. endif +. endfor +. endif -.endif +. endif -.if !target(fetch-required-list) +. if !target(fetch-required-list) fetch-required-list: fetch-list -.if !defined(NO_DEPENDS) -.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN -.if defined(${deptype}_DEPENDS) +. if !defined(NO_DEPENDS) +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) @targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif -.endif +. endif +. endfor +. endif +. endif -.if !target(checksum-recursive) +. if !target(checksum-recursive) checksum-recursive: @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} checksum); \ done -.endif +. endif # Dependency lists: build and runtime. Print out directory names. build-depends-list: -.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) +. if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) @${BUILD-DEPENDS-LIST} -.endif +. endif BUILD-DEPENDS-LIST= \ for dir in $$(${ECHO_CMD} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${SED} -E -e 's,([^: ]*):([^: ]*)(:[^ ]*)?,\2,g' -e 'y/ /\n/'| ${SORT} -u); do \ @@ -4145,9 +4145,9 @@ done | ${SORT} -u run-depends-list: -.if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) +. if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) @${RUN-DEPENDS-LIST} -.endif +. endif RUN-DEPENDS-LIST= \ for dir in $$(${ECHO_CMD} "${_LIB_RUN_DEPENDS:C,.*:([^:]*).*,\1,}" | ${SED} -e 'y/ /\n/' | ${SORT} -u); do \ @@ -4163,17 +4163,17 @@ done | ${SORT} -u test-depends-list: -.if defined(TEST_DEPENDS) +. if defined(TEST_DEPENDS) @${TEST-DEPENDS-LIST} -.endif +. endif # Package (recursive runtime) dependency list. Print out both directory names # and package names. package-depends-list: -.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) +. if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) @${PACKAGE-DEPENDS-LIST} -.endif +. endif _LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} PACKAGE-DEPENDS-LIST?= \ @@ -4223,9 +4223,9 @@ ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} PKG_NOTES_ENV?= -.for note in ${PKG_NOTES} +. for note in ${PKG_NOTES} PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} -.endfor +. endfor create-manifest: @${SETENV} \ @@ -4317,24 +4317,24 @@ # If this ever changes, portmgr should contact the portsnap maintainer # first to avoid gratuitous breakage. -. if !target(describe) +. if !target(describe) _EXTRACT_DEPENDS=${EXTRACT_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _PATCH_DEPENDS=${PATCH_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _FETCH_DEPENDS=${FETCH_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} _RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :]+)(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} -. if exists(${DESCR}) +. if exists(${DESCR}) _DESCR=${DESCR} -. else +. else _DESCR=/dev/null -. endif +. endif -. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) +. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr -. else +. else INDEX_OUT=/dev/stdout -. endif +. endif describe: @(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ @@ -4350,24 +4350,24 @@ ;; \ esac; \ done < ${DESCR}; ${ECHO_CMD}) >>${INDEX_OUT} -. endif +. endif www-site: -.if exists(${DESCR}) +. if exists(${DESCR}) @${AWK} '$$1 ~ /^WWW:/ {print $$2}' ${DESCR} | ${HEAD} -1 -.else +. else @${ECHO_CMD} -.endif +. endif -.if !target(readmes) +. if !target(readmes) readmes: readme -.endif +. endif -.if !target(readme) +. if !target(readme) readme: @${RM} -f ${.CURDIR}/README.html @cd ${.CURDIR} && ${MAKE} ${.CURDIR}/README.html -.endif +. endif ${.CURDIR}/README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" @@ -4402,44 +4402,44 @@ fi; -.if !target(pretty-print-build-depends-list) +. if !target(pretty-print-build-depends-list) pretty-print-build-depends-list: -.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ +. if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) @${_PRETTY_PRINT_DEPENDS_LIST} -.endif -.endif +. endif +. endif -.if !target(pretty-print-run-depends-list) +. if !target(pretty-print-run-depends-list) pretty-print-run-depends-list: -.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) +. if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) @${_PRETTY_PRINT_DEPENDS_LIST} -.endif -.endif +. endif +. endif _SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -.if !target(apply-slist) +. if !target(apply-slist) apply-slist: -.if defined(SUB_FILES) -.for file in ${SUB_FILES} -.if !exists(${FILESDIR}/${file}.in) +. if defined(SUB_FILES) +. for file in ${SUB_FILES} +. if !exists(${FILESDIR}/${file}.in) @${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 -.else +. else @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} -.endif -.endfor -.for i in pkg-message pkg-install pkg-deinstall pkg-req -.if ${SUB_FILES:M${i}*}!="" +. endif +. endfor +. for i in pkg-message pkg-install pkg-deinstall pkg-req +. if ${SUB_FILES:M${i}*}!="" ${i:S/-//:tu}= ${WRKDIR}/${SUB_FILES:M${i}*} -.endif -.endfor -.endif -.endif +. endif +. endfor +. endif +. endif # Generate packing list. Also tests to make sure all required package # files exist. -.if !target(generate-plist) +. if !target(generate-plist) generate-plist: ${WRKDIR} @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} ${TMPPLIST:H} @@ -4453,36 +4453,36 @@ fi # Keep PLIST_DIRSTRY as compatibility -.for dir in ${PLIST_DIRS} ${PLIST_DIRSTRY} +. for dir in ${PLIST_DIRS} ${PLIST_DIRSTRY} @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} -.endfor +. endfor -.if defined(USE_LINUX_PREFIX) -.if defined(USE_LDCONFIG) +. if defined(USE_LINUX_PREFIX) +. if defined(USE_LDCONFIG) @${ECHO_CMD} "@postexec ${LDCONFIG_CMD}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LDCONFIG_CMD}" >> ${TMPPLIST} -.endif -.else -.if defined(USE_LDCONFIG) -.if !defined(INSTALL_AS_USER) +. endif +. else +. if defined(USE_LDCONFIG) +. if !defined(INSTALL_AS_USER) @${ECHO_CMD} "@postexec ${LDCONFIG} -m ${USE_LDCONFIG}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LDCONFIG} -R" >> ${TMPPLIST} -.else +. else @${ECHO_CMD} "@postexec ${LDCONFIG} -m ${USE_LDCONFIG} || ${TRUE}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LDCONFIG} -R || ${TRUE}" >> ${TMPPLIST} -.endif -.endif -.if defined(USE_LDCONFIG32) -.if !defined(INSTALL_AS_USER) +. endif +. endif +. if defined(USE_LDCONFIG32) +. if !defined(INSTALL_AS_USER) @${ECHO_CMD} "@postexec ${LDCONFIG} -32 -m ${USE_LDCONFIG32}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LDCONFIG} -32 -R" >> ${TMPPLIST} -.else +. else @${ECHO_CMD} "@postexec ${LDCONFIG} -32 -m ${USE_LDCONFIG32} || ${TRUE}" >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${LDCONFIG} -32 -R || ${TRUE}" >> ${TMPPLIST} -.endif -.endif -.endif -.endif +. endif +. endif +. endif +. endif ${TMPPLIST}: @cd ${.CURDIR} && ${MAKE} generate-plist @@ -4490,57 +4490,57 @@ ${TMPPLIST_SORT}: ${TMPPLIST} @${SORT} -u ${TMPPLIST} >${TMPPLIST_SORT} -.for _type in EXAMPLES DOCS -.if !target(add-plist-${_type:tl}) -.if defined(PORT${_type}) && !defined(NOPORT${_type}) +. for _type in EXAMPLES DOCS +. if !target(add-plist-${_type:tl}) +. if defined(PORT${_type}) && !defined(NOPORT${_type}) add-plist-${_type:tl}: -.for x in ${PORT${_type}} +. for x in ${PORT${_type}} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \ ${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \ fi;fi -.endfor +. endfor @${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} -.endif -.endif -.endfor +. endif +. endif +. endfor -.if !target(add-plist-data) -.if defined(PORTDATA) +. if !target(add-plist-data) +. if defined(PORTDATA) add-plist-data: -.for x in ${PORTDATA} +. for x in ${PORTDATA} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${DATADIR}/${x} ]; then \ ${ECHO_CMD} ${DATADIR}/${x} >> ${TMPPLIST}; \ fi;fi -.endfor +. endfor @${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} -.endif -.endif +. endif +. endif -.if !target(add-plist-info) -.if defined(INFO) +. if !target(add-plist-info) +. if defined(INFO) add-plist-info: -.for i in ${INFO} +. for i in ${INFO} @${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}:@info\ :g >> ${TMPPLIST} -.endfor -.endif -.endif +. endfor +. endif +. endif # If we're installing into a non-standard PREFIX, we need to remove that directory at # deinstall-time -.if !target(add-plist-post) -.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ +. if !target(add-plist-post) +. if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ ${PREFIX} != "/usr" && !defined(NO_PREFIX_RMDIR)) add-plist-post: @${ECHO_CMD} "@dir ${PREFIX}" >> ${TMPPLIST} -.endif -.endif +. endif +. endif -.if !target(install-rc-script) -.if defined(USE_RC_SUBR) +. if !target(install-rc-script) +. if defined(USE_RC_SUBR) install-rc-script: @${ECHO_MSG} "===> Staging rc.d startup script(s)" @for i in ${USE_RC_SUBR}; do \ @@ -4549,10 +4549,10 @@ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "$${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done -.endif -.endif +. endif +. endif -.if !target(check-man) +. if !target(check-man) check-man: stage @${ECHO_MSG} "====> Checking man pages (check-man)" @mdirs= ; \ @@ -4568,12 +4568,12 @@ done ; \ done ; \ exit $$err -.endif +. endif # Compress all manpage not already compressed which are not hardlinks # Find all manpages which are not compressed and are hadlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others # Fixes all dead symlinks left by the previous round -.if !target(compress-man) +. if !target(compress-man) compress-man: @${ECHO_MSG} "====> Compressing man pages (compress-man)" @mdirs= ; \ @@ -4600,190 +4600,190 @@ ${RM} -f $$link ; \ done; \ done -.endif +. endif -.if !target(stage-dir) +. if !target(stage-dir) stage-dir: @${MKDIR} ${STAGEDIR}${PREFIX} -.if !defined(NO_MTREE) +. if !defined(NO_MTREE) @${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null -.endif -.endif +. endif +. endif -.if !target(makeplist) +. if !target(makeplist) makeplist: stage @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist -.endif +. endif -.if !target(check-plist) +. if !target(check-plist) check-plist: stage @${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist @${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" -.endif +. endif -.if !target(check-orphans) +. if !target(check-orphans) check-orphans: check-plist -.endif +. endif -.if !target(stage-qa) +. if !target(stage-qa) stage-qa: @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh -.if !defined(DEVELOPER) +. if !defined(DEVELOPER) @${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" -.endif -.endif +. endif +. endif # Fake installation of package so that user can pkg delete it later. -.if !target(fake-pkg) +. if !target(fake-pkg) STAGE_ARGS= -i ${STAGEDIR} -.if !defined(NO_PKG_REGISTER) +. if !defined(NO_PKG_REGISTER) fake-pkg: create-manifest -.if defined(INSTALLS_DEPENDS) +. if defined(INSTALLS_DEPENDS) @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" -.else +. else @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" -.endif -.if defined(INSTALLS_DEPENDS) +. endif +. if defined(INSTALLS_DEPENDS) @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.else +. else @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CMD} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.endif +. endif @${RM} -rf ${METADIR} -.endif -.endif +. endif +. endif # Depend is generally meaningless for arbitrary ports, but if someone wants # one they can override this. This is just to catch people who've gotten into # the habit of typing `make depend all install' as a matter of course. # Same goes for tags -.for _t in depend tags -.if !target(${_t}) +. for _t in depend tags +. if !target(${_t}) ${_t}: -.endif -.endfor +. endif +. endfor -.if !defined(NOPRECIOUSMAKEVARS) +. if !defined(NOPRECIOUSMAKEVARS) # These won't change, so we can pass them through the environment -.for var in ${_EXPORTED_VARS} -.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) +. for var in ${_EXPORTED_VARS} +. if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) .MAKEFLAGS: ${var}=${${var}:Q} -.endif -.endfor -.endif +. endif +. endfor +. endif -.if !target(pre-check-config) +. if !target(pre-check-config) pre-check-config: -.for single in ${OPTIONS_SINGLE} -. for opt in ${OPTIONS_SINGLE_${single}} -. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) -. if !empty(PORT_OPTIONS:M${opt}) -. if defined(OPTFOUND) +. for single in ${OPTIONS_SINGLE} +. for opt in ${OPTIONS_SINGLE_${single}} +. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) +. if !empty(PORT_OPTIONS:M${opt}) +. if defined(OPTFOUND) OPTIONS_WRONG_SINGLE+= ${single} -. else +. else OPTFOUND= true -. endif -. endif -. else +. endif +. endif +. else # if conditional and if the condition is unchecked, remove opt from the list of # set options PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} OPTNOCHECK= true -. endif -. endfor -. if !defined(OPTFOUND) && !defined(OPTNOCHECK) +. endif +. endfor +. if !defined(OPTFOUND) && !defined(OPTNOCHECK) OPTIONS_WRONG_SINGLE+= ${single} -. endif +. endif . undef OPTFOUND . undef OPTNOCHECK -.endfor +. endfor .undef single -.for radio in ${OPTIONS_RADIO} -. for opt in ${OPTIONS_RADIO_${radio}} -. if !empty(PORT_OPTIONS:M${opt}) -. if defined(OPTFOUND) +. for radio in ${OPTIONS_RADIO} +. for opt in ${OPTIONS_RADIO_${radio}} +. if !empty(PORT_OPTIONS:M${opt}) +. if defined(OPTFOUND) OPTIONS_WRONG_RADIO+= ${radio} -. else +. else OPTFOUND= true -. endif -. endif -. endfor +. endif +. endif +. endfor . undef OPTFOUND -.endfor +. endfor -.for multi in ${OPTIONS_MULTI} -. for opt in ${OPTIONS_MULTI_${multi}} -. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) -. if !empty(PORT_OPTIONS:M${opt}) +. for multi in ${OPTIONS_MULTI} +. for opt in ${OPTIONS_MULTI_${multi}} +. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) +. if !empty(PORT_OPTIONS:M${opt}) OPTFOUND= true -. endif -. else +. endif +. else # if conditional and if the condition is unchecked, remove opt from the list of # set options PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} OPTNOCHECK= true -. endif -. endfor -. if !defined(OPTFOUND) && !defined(OPTNOCHECK) +. endif +. endfor +. if !defined(OPTFOUND) && !defined(OPTNOCHECK) OPTIONS_WRONG_MULTI+= ${multi} -. endif +. endif . undef OPTFOUND . undef OPTNOCHECK -.endfor +. endfor .undef multi -.for opt in ${PORT_OPTIONS} -. for conflict in ${${opt}_PREVENTS} -. if ${PORT_OPTIONS:M${conflict}} -. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) +. for opt in ${PORT_OPTIONS} +. for conflict in ${${opt}_PREVENTS} +. if ${PORT_OPTIONS:M${conflict}} +. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) OPTIONS_WRONG_PREVENTS+= ${opt} -. endif +. endif OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} -. endif -. endfor -.endfor +. endif +. endfor +. endfor .undef conflict .undef opt -.endif #pre-check-config +. endif #pre-check-config -.if !target(_check-config) +. if !target(_check-config) _check-config: pre-check-config -.for multi in ${OPTIONS_WRONG_MULTI} +. for multi in ${OPTIONS_WRONG_MULTI} @${ECHO_MSG} "====> You must check at least one option in the ${multi} multi" -.endfor -.for single in ${OPTIONS_WRONG_SINGLE} +. endfor +. for single in ${OPTIONS_WRONG_SINGLE} @${ECHO_MSG} "====> You must select one and only one option from the ${single} single" -.endfor -.for radio in ${OPTIONS_WRONG_RADIO} +. endfor +. for radio in ${OPTIONS_WRONG_RADIO} @${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" -.endfor -.if defined(OPTIONS_WRONG_PREVENTS) +. endfor +. if defined(OPTIONS_WRONG_PREVENTS) @${ECHO_MSG} "====> Two or more enabled options conflict with each other" -. for prevents in ${OPTIONS_WRONG_PREVENTS} +. for prevents in ${OPTIONS_WRONG_PREVENTS} @${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" -. if defined(${prevents}_PREVENTS_MSG) +. if defined(${prevents}_PREVENTS_MSG) @${ECHO_MSG} "======> ${${prevents}_PREVENTS_MSG}" -. endif -. endfor -.endif -.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) +. endif +. endfor +. endif +. if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) _CHECK_CONFIG_ERROR= true -.endif -.endif # _check-config +. endif +. endif # _check-config -.if !target(check-config) +. if !target(check-config) check-config: _check-config -.if !empty(_CHECK_CONFIG_ERROR) +. if !empty(_CHECK_CONFIG_ERROR) @${FALSE} -.endif -.endif # check-config +. endif +. endif # check-config -.if !target(sanity-config) +. if !target(sanity-config) sanity-config: _check-config -.if !empty(_CHECK_CONFIG_ERROR) +. if !empty(_CHECK_CONFIG_ERROR) @echo -n "Config is invalid. Re-edit? [Y/n] "; \ read answer; \ case $$answer in \ @@ -4791,10 +4791,10 @@ exit 0; \ esac; \ cd ${.CURDIR} && ${MAKE} config -.endif -.endif # sanity-config +. endif +. endif # sanity-config -.if !target(pre-config) +. if !target(pre-config) pre-config: D4P_ENV= PKGNAME="${PKGNAME}" \ PORT_OPTIONS="${PORT_OPTIONS}" \ @@ -4812,31 +4812,31 @@ D4PHEIGHT="${D4PHEIGHT}" \ D4PWIDTH="${D4PWIDTH}" \ D4PFULLSCREEN="${D4PFULLSCREEN}" -.if exists(${PKGHELP}) +. if exists(${PKGHELP}) D4P_ENV+= PKGHELP="${PKGHELP}" -.endif -.for opt in ${ALL_OPTIONS} +. endif +. for opt in ${ALL_OPTIONS} D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" -.endfor -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} +. endfor +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} D4P_ENV+= OPTIONS_${otype}_${m}="${OPTIONS_${otype}_${m}}" \ ${m}_DESC=""${${m}_DESC:Q}"" -. for opt in ${OPTIONS_${otype}_${m}} +. for opt in ${OPTIONS_${otype}_${m}} D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" -. endfor -. endfor -.endfor +. endfor +. endfor +. endfor .undef m .undef otype .undef opt -.endif # pre-config +. endif # pre-config -.if !target(do-config) +. if !target(do-config) do-config: -.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) +. if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) @${ECHO_MSG} "===> No options to configure" -.else +. else @optionsdir=${OPTIONS_FILE:H}; \ if [ ! -w "${PORT_DBDIR}" -a "`stat -f %u ${PORT_DBDIR:H}`" = 0 ]; \ then \ @@ -4885,85 +4885,85 @@ fi; \ ${RM} -f $${TMPOPTIONSFILE} @cd ${.CURDIR} && ${MAKE} sanity-config -.endif -.endif # do-config +. endif +. endif # do-config -.if !target(config) -.if !defined(NO_DIALOG) +. if !target(config) +. if !defined(NO_DIALOG) config: pre-config do-config -.else +. else config: @${ECHO_MSG} "===> Skipping 'config' as NO_DIALOG is defined" -.endif -.endif # config +. endif +. endif # config -.if !target(config-recursive) +. if !target(config-recursive) config-recursive: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} config-conditional); \ done -.endif # config-recursive +. endif # config-recursive -.if !target(config-conditional) +. if !target(config-conditional) config-conditional: -.if !empty(NEW_OPTIONS) +. if !empty(NEW_OPTIONS) @cd ${.CURDIR} && ${MAKE} config; -.endif -.endif # config-conditional +. endif +. endif # config-conditional -.if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) +. if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) .include "${PORTSDIR}/Mk/bsd.options.desc.mk" MULTI_EOL= : you have to choose at least one of them SINGLE_EOL= : you have to select exactly one of them RADIO_EOL= : you can only select none or one of them showconfig: check-config -.if !empty(COMPLETE_OPTIONS_LIST) +. if !empty(COMPLETE_OPTIONS_LIST) @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": -.for opt in ${ALL_OPTIONS} +. for opt in ${ALL_OPTIONS} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" -. if !empty(${opt}_DESC) +. if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} -. endif +. endif @${ECHO_MSG} "" -.endfor +. endfor #multi and conditional multis -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} -. if empty(${m}_DESC) +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} +. if empty(${m}_DESC) @${ECHO_MSG} "====> Options available for the ${otype:tl} ${m}${${otype}_EOL}" -. else +. else @${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" -. endif -. for opt in ${OPTIONS_${otype}_${m}} +. endif +. for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" -. if !empty(${opt}_DESC) +. if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} -. endif +. endif @${ECHO_MSG} "" -. endfor -. endfor -.endfor +. endfor +. endfor +. endfor .undef otype .undef m .undef opt @${ECHO_MSG} "===> Use 'make config' to modify these settings" -.endif -.endif # showconfig +. endif +. endif # showconfig -.if !target(showconfig-recursive) +. if !target(showconfig-recursive) showconfig-recursive: @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} showconfig); \ done -.endif # showconfig-recursive +. endif # showconfig-recursive -.if !target(rmconfig) +. if !target(rmconfig) rmconfig: -.if exists(${OPTIONS_FILE}) +. if exists(${OPTIONS_FILE}) -@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \ optionsdir=${OPTIONS_FILE:H}; \ if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" -a ! -w "${OPTIONS_FILE}" ]; then \ @@ -4975,20 +4975,20 @@ ${RM} -f ${OPTIONS_FILE}; \ ${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ fi -.else +. else @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" -.endif -.endif # rmconfig +. endif +. endif # rmconfig -.if !target(rmconfig-recursive) +. if !target(rmconfig-recursive) rmconfig-recursive: @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and dependencies"; @for dir in ${.CURDIR} $$(${ALL-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} rmconfig); \ done -.endif # rmconfig-recursive +. endif # rmconfig-recursive -.if !target(pretty-print-config) +. if !target(pretty-print-config) MULTI_START= [ MULTI_END= ] GROUP_START= [ @@ -4998,23 +4998,23 @@ RADIO_START= ( RADIO_END= ) pretty-print-config: -.for opt in ${ALL_OPTIONS} +. for opt in ${ALL_OPTIONS} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " -.endfor -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} +. endfor +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} @${ECHO_MSG} -n "${m}${${otype}_START} " -. for opt in ${OPTIONS_${otype}_${m}} +. for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " -. endfor +. endfor @${ECHO_MSG} -n "${${otype}_END} " -. endfor -.endfor +. endfor +. endfor .undef otype .undef m .undef opt @${ECHO_MSG} "" -.endif # pretty-print-config +. endif # pretty-print-config desktop-categories: @categories=""; \ @@ -5119,7 +5119,7 @@ ${DESKTOP_CATEGORIES_ADDITIONAL} \ ${DESKTOP_CATEGORIES_RESERVED} -.if defined(DESKTOP_ENTRIES) +. if defined(DESKTOP_ENTRIES) check-desktop-entries: @set -- ${DESKTOP_ENTRIES} XXX; \ if [ `${EXPR} \( $$# - 1 \) % 6` -ne 0 ]; then \ @@ -5173,10 +5173,10 @@ shift 6; \ num=`${EXPR} $$num + 1`; \ done -.endif +. endif -.if !target(install-desktop-entries) -.if defined(DESKTOP_ENTRIES) +. if !target(install-desktop-entries) +. if defined(DESKTOP_ENTRIES) install-desktop-entries: @set -- ${DESKTOP_ENTRIES} XXX; \ while [ $$# -gt 6 ]; do \ @@ -5207,48 +5207,48 @@ fi; \ shift 6; \ done -.endif -.endif +. endif +. endif -.if defined(WARNING) +. if defined(WARNING) WARNING_WAIT?= 10 show-warnings: @${ECHO_MSG} "/!\\ WARNING /!\\" -.for m in ${WARNING} +. for m in ${WARNING} @${ECHO_MSG} "${m}" -.endfor +. endfor @${ECHO_MSG} @sleep ${WARNING_WAIT} -.endif +. endif -.if defined(DEVELOPER) -.if defined(DEV_WARNING) +. if defined(DEVELOPER) +. if defined(DEV_WARNING) DEV_WARNING_WAIT?= 10 show-dev-warnings: @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile warnings, please consider fixing /!\\" @${ECHO_MSG} -.for m in ${DEV_WARNING} +. for m in ${DEV_WARNING} @${ECHO_MSG} ${m} -.endfor +. endfor @${ECHO_MSG} -.if defined(DEV_WARNING_FATAL) +. if defined(DEV_WARNING_FATAL) @${FALSE} -.else +. else @sleep ${DEV_WARNING_WAIT} -.endif -.endif +. endif +. endif -.if defined(DEV_ERROR) +. if defined(DEV_ERROR) show-dev-errors: @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" @${ECHO_MSG} -.for m in ${DEV_ERROR} +. for m in ${DEV_ERROR} @${ECHO_MSG} "${m}" -.endfor +. endfor @${ECHO_MSG} @${FALSE} -.endif -.endif #DEVELOPER +. endif +. endif #DEVELOPER # Please note that the order of the following targets is important, and # should not be modified. @@ -5314,11 +5314,11 @@ 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ ${_OPTIONS_install} ${_USES_install} \ ${_OPTIONS_stage} ${_USES_stage} -.if defined(DEVELOPER) +. if defined(DEVELOPER) _STAGE_SEQ+= 995:stage-qa -.else +. else stage-qa: stage -.endif +. endif _TEST_DEP= stage _TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ 800:post-test \ @@ -5334,119 +5334,119 @@ ${_OPTIONS_package} ${_USES_package} # Enforce order for -jN builds -.for _t in ${_TARGETS_STAGES} +. for _t in ${_TARGETS_STAGES} # Check if the port need to change the default order of some targets... -. if defined(TARGET_ORDER_OVERRIDE) +. if defined(TARGET_ORDER_OVERRIDE) _tmp_seq:= -. for _entry in ${_${_t}_SEQ} +. for _entry in ${_${_t}_SEQ} # for _target because :M${_target} does not work with fmake -. for _target in ${_entry:C/^[0-9]+://} -. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} +. for _target in ${_entry:C/^[0-9]+://} +. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} _tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} -. else +. else _tmp_seq:= ${_tmp_seq} ${_entry} -. endif -. endfor -. endfor +. endif +. endfor +. endfor _${_t}_SEQ:= ${_tmp_seq} -. endif -. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} -. if target(${s}) -. if ! ${NOTPHONY:M${s}} -_PHONY_TARGETS+= ${s} . endif +. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} +. if target(${s}) +. if ! ${NOTPHONY:M${s}} +_PHONY_TARGETS+= ${s} +. endif _${_t}_REAL_SEQ+= ${s} -. endif -. endfor -. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} -. if target(${s}) -. if ! ${NOTPHONY:M${s}} +. endif +. endfor +. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} +. if target(${s}) +. if ! ${NOTPHONY:M${s}} _PHONY_TARGETS+= ${s} -. endif +. endif _${_t}_REAL_SUSEQ+= ${s} -. endif -. endfor +. endif +. endfor .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} -.endfor +. endfor # Define all of the main targets which depend on a sequence of other targets. # See above *_SEQ and *_DEP. The _DEP will run before this defined target is # ran. The _SEQ will run as this target once _DEP is satisfied. -.for target in extract patch configure build stage install package +. for target in extract patch configure build stage install package # Check if config dialog needs to show and execute it if needed. If is it not # needed (_OPTIONS_OK), then just depend on the cookie which is defined later # to depend on the *_DEP and execute the *_SEQ. # If options are required, execute config-conditional and then re-execute the # target noting that config is no longer needed. -.if !target(${target}) && defined(_OPTIONS_OK) +. if !target(${target}) && defined(_OPTIONS_OK) _PHONY_TARGETS+= ${target} ${target}: ${${target:tu}_COOKIE} -.elif !target(${target}) +. elif !target(${target}) ${target}: config-conditional @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} -.elif target(${target}) && defined(IGNORE) -.endif +. elif target(${target}) && defined(IGNORE) +. endif -.if !exists(${${target:tu}_COOKIE}) +. if !exists(${${target:tu}_COOKIE}) # Define the real target behavior. Depend on the target's *_DEP. Execute # the target's *_SEQ. Also handle su and USE_SUBMAKE needs. -.if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) -. if defined(USE_SUBMAKE) +. if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) +. if defined(USE_SUBMAKE) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && ${MAKE} ${_${target:tu}_REAL_SEQ} -. else # !USE_SUBMAKE +. else # !USE_SUBMAKE ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} -. endif # USE_SUBMAKE +. endif # USE_SUBMAKE @${ECHO_MSG} "===> Switching to root credentials for '${target}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${_${target:tu}_REAL_SUSEQ}" @${ECHO_MSG} "===> Returning to user credentials" @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -.else # No SU needed -. if defined(USE_SUBMAKE) +. else # No SU needed +. if defined(USE_SUBMAKE) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && \ ${MAKE} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -. else # !USE_SUBMAKE +. else # !USE_SUBMAKE ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -. endif # USE_SUBMAKE -.endif # SU needed +. endif # USE_SUBMAKE +. endif # SU needed -.else # exists(cookie) +. else # exists(cookie) ${${target:tu}_COOKIE}:: @if [ -e ${.TARGET} ]; then \ ${DO_NADA}; \ else \ cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ fi -.endif # !exists(cookie) +. endif # !exists(cookie) -.endfor # foreach(targets) +. endfor # foreach(targets) .PHONY: ${_PHONY_TARGETS} check-sanity fetch pkg -.if !target(check-sanity) +. if !target(check-sanity) check-sanity: ${_SANITY_REAL_SEQ} -.endif +. endif -.if !target(fetch) +. if !target(fetch) fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} -.endif +. endif -.if !target(pkg) +. if !target(pkg) pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} -.endif +. endif -.if !target(test) +. if !target(test) test: ${_TEST_DEP} ${_TEST_REAL_SEQ} -.endif +. endif -.endif +. endif # End of post-makefile section. .endif Index: Mk/bsd.port.subdir.mk =================================================================== --- Mk/bsd.port.subdir.mk +++ Mk/bsd.port.subdir.mk @@ -60,77 +60,77 @@ # to child makes explicitly, instead of recomputing them tens of thousands of times. .if !defined(NOPRECIOUSMAKEVARS) -.if !defined(ARCH) +. if !defined(ARCH) ARCH!= ${UNAME} -p -.endif +. endif _EXPORTED_VARS+= ARCH -.if !defined(OSVERSION) -.if exists(/usr/include/sys/param.h) +. if !defined(OSVERSION) +. if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h -.elif exists(${SRC_BASE}/sys/sys/param.h) +. elif exists(${SRC_BASE}/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h -.else +. else OSVERSION!= ${SYSCTL} -n kern.osreldate -.endif -.endif +. endif +. endif _EXPORTED_VARS+= OSVERSION WITH_PKG= yes WITH_PKGNG= yes -.if !defined(_OSRELEASE) +. if !defined(_OSRELEASE) _OSRELEASE!= ${UNAME} -r -.endif +. endif _EXPORTED_VARS+= _OSRELEASE -.if !defined(OSREL) +. if !defined(OSREL) OSREL= ${_OSRELEASE:C/[-(].*//} -.endif +. endif _EXPORTED_VARS+= OSREL -.if !defined(OPSYS) +. if !defined(OPSYS) OPSYS!= ${UNAME} -s -.endif +. endif _EXPORTED_VARS+= OPSYS -.if ${ARCH} == "amd64" || ${ARCH} =="ia64" -.if !defined(HAVE_COMPAT_IA32_KERN) +. if ${ARCH} == "amd64" || ${ARCH} =="ia64" +. if !defined(HAVE_COMPAT_IA32_KERN) HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo -.if empty(HAVE_COMPAT_IA32_KERN) +. if empty(HAVE_COMPAT_IA32_KERN) .undef HAVE_COMPAT_IA32_KERN -.endif -.endif -.endif +. endif +. endif +. endif _EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN -.if !defined(CONFIGURE_MAX_CMD_LEN) +. if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax -.endif +. endif _EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN -.if !defined(_JAVA_VERSION_LIST_REGEXP) +. if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP!= ${MAKE} -V _JAVA_VERSION_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_VERSION_LIST_REGEXP -.if !defined(_JAVA_VENDOR_LIST_REGEXP) +. if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP!= ${MAKE} -V _JAVA_VENDOR_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_VENDOR_LIST_REGEXP -.if !defined(_JAVA_OS_LIST_REGEXP) +. if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP!= ${MAKE} -V _JAVA_OS_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_OS_LIST_REGEXP -.if !defined(_JAVA_PORTS_INSTALLED) +. if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED!= ${MAKE} -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_PORTS_INSTALLED -.if !defined(UID) +. if !defined(UID) UID!= ${ID} -u -.endif +. endif _EXPORTED_VARS+= UID .endif @@ -168,20 +168,20 @@ TARGETS+= tags .for __target in ${TARGETS} -.if !target(${__target}) -.if defined(SUBDIR) && !empty(SUBDIR) +. if !target(${__target}) +. if defined(SUBDIR) && !empty(SUBDIR) ${__target}: ${SUBDIR:S/^/_/:S/$/.${__target}/} -.else +. else ${__target}: -.endif -.endif +. endif +. endif .endfor .if defined(SUBDIR) && !empty(SUBDIR) -.for __target in ${TARGETS} checksubdirs describe readmes +. for __target in ${TARGETS} checksubdirs describe readmes ${SUBDIR:S/^/_/:S/$/.${__target}/}: _SUBDIRUSE -.endfor +. endfor _SUBDIRUSE: .USE @OK=""; sub=${.TARGET:S/^_//:R}; \ @@ -206,19 +206,19 @@ DIRPRFX=${DIRPRFX}$$edir/; \ fi -.for _subdir in ${SUBDIR:S/^/_/} +. for _subdir in ${SUBDIR:S/^/_/} ${_subdir}:: ${_subdir:S/$/.all/} -.endfor +. endfor .endif .if !target(install) -.if !target(beforeinstall) +. if !target(beforeinstall) beforeinstall: -.endif -.if !target(afterinstall) +. endif +. if !target(afterinstall) afterinstall: -.endif +. endif install: afterinstall afterinstall: realinstall realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} @@ -227,11 +227,11 @@ IGNOREDIR= Mk Templates Tools distfiles packages pkg Keywords .if !target(checksubdirs) -.if defined(PORTSTOP) +. if defined(PORTSTOP) checksubdirs: checksubdir ${SUBDIR:S/^/_/:S/$/.checksubdirs/} -.else +. else checksubdirs: checksubdir -.endif +. endif .endif .if !target(checksubdir) @@ -258,24 +258,24 @@ .endif .if !target(describe) -.if defined(PORTSTOP) +. if defined(PORTSTOP) # This is a bit convoluted to deal with the fact that make will overlap I/O from child make processes # if they write more than 2k: this will corrupt the INDEX file. make -P does not do this, but it adds # extraneous output and redirects stderr, so we lose error reporting from child makes. Instead we have # to roll our own implementation of make -P and make sure that each child make writes to their own file, # which we will combine at the end. This gives substantial performance benefits over doing a make -j1 -.if defined(BUILDING_INDEX) +. if defined(BUILDING_INDEX) describe: ${SUBDIR:S/^/describe./} -.for i in ${SUBDIR} +. for i in ${SUBDIR} describe.$i: @cd ${.CURDIR}; ${MAKE} -B ${i:S/^/_/:S/$/.describe/} > ${INDEX_TMPDIR}/${INDEXFILE}.desc.${i} -.endfor -.else +. endfor +. else describe: ${SUBDIR:S/^/_/:S/$/.describe/} -.endif -.else +. endif +. else describe: @for sub in ${SUBDIR}; do \ if ${TEST} -d ${.CURDIR}/$${sub}; then \ @@ -288,17 +288,17 @@ ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ fi; \ done -.endif +. endif .endif .if !target(readmes) -.if defined(PORTSTOP) +. if defined(PORTSTOP) readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/} @${ECHO_MSG} "===> Creating README.html for all ports" @perl ${PORTSDIR}/Tools/make_readmes < ${INDEXDIR}/${INDEXFILE} -.else +. else readmes: readme -.endif +. endif .endif .if !target(readme) @@ -316,14 +316,14 @@ @${ECHO_CMD} "===> Creating README.html" @> $@.tmp .for entry in ${SUBDIR} -.if exists(${entry}) -.if defined(PORTSTOP) +. if exists(${entry}) +. if defined(PORTSTOP) @${ECHO_CMD} -n ''"`${ECHO_CMD} ${entry} | ${HTMLIFY}`"': ' >> $@.tmp -.else +. else @${ECHO_CMD} -n ''"`cd ${entry}; ${MAKE} package-name | ${HTMLIFY}`: " >> $@.tmp -.endif +. endif @${ECHO_CMD} `cd ${entry}; ${MAKE} -V COMMENT` | ${HTMLIFY} >> $@.tmp -.endif +. endif .endfor @${SORT} -t '>' +1 -2 $@.tmp > $@.tmp2 .if exists(${DESCR}) @@ -349,11 +349,11 @@ # Pass in the cached invariant variables to child makes. .if !defined(NOPRECIOUSMAKEVARS) -.for var in ${_EXPORTED_VARS} -.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) +. for var in ${_EXPORTED_VARS} +. if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) .MAKEFLAGS: ${var}=${${var}:Q} -.endif -.endfor +. endif +. endfor .endif PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www Index: Mk/bsd.qt.mk =================================================================== --- Mk/bsd.qt.mk +++ Mk/bsd.qt.mk @@ -33,28 +33,28 @@ _QT_RELNAME= qt${_QT_VERSION:R:R} _QT_VERSION= # empty -.for ver in ${_QT_SUPPORTED} -. if defined(USE_QT${ver}) -. if empty(_QT_VERSION) +. for ver in ${_QT_SUPPORTED} +. if defined(USE_QT${ver}) +. if empty(_QT_VERSION) _QT_VERSION= ${QT${ver}_VERSION} -. else +. else # Reject different USE_QT*. IGNORE?= can't be installed: different Qt versions specified via USE_QT[${_QT_SUPPORTED:S/ //g}] #' -. endif -. endif -.endfor +. endif +. endif +. endfor -.if empty(_QT_VERSION) +. if empty(_QT_VERSION) # The file was included without USE_QT*. IGNORE?= can't be installed: bsd.qt.mk may only be included via USE_QT[${_QT_SUPPORTED:S/ //g}] #' -.endif +. endif -.if defined(QT_DIST) +. if defined(QT_DIST) QT_NONSTANDARD= yes -. if ! ${.MAKEFLAGS:MPREFIX=*} +. if ! ${.MAKEFLAGS:MPREFIX=*} PREFIX= ${QT_PREFIX} -. endif +. endif MASTER_SITES= ${MASTER_SITE_QT} # Useless, as it must be defined before including bsd.port.pre.mk (at least @@ -67,24 +67,24 @@ LICENSE?= LGPL21 -. if !exists(${PKGDIR}/pkg-descr) +. if !exists(${PKGDIR}/pkg-descr) DESCR?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/pkg-descr -. endif +. endif # Stage support. DESTDIRNAME= INSTALL_ROOT -. if ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/ DISTNAME= qt-everywhere-opensource-src-${_QT_VERSION} DIST_SUBDIR= KDE -. else -. if ${_QT_VERSION:M*-*} +. else +. if ${_QT_VERSION:M*-*} # Pre-releases. MASTER_SITE_SUBDIR= development_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ -. else +. else MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ -. endif +. endif DISTNAME= ${QT_DIST:S,^,qt,:S,$,-opensource-src-${_QT_VERSION},} DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} DIST_SUBDIR= KDE/Qt/${_QT_VERSION} @@ -99,16 +99,16 @@ # better not to fix what is not explicitly broken there. LDFLAGS+= -Wl,--as-needed -. if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \ +. if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \ defined(DISABLE_SIZE) && defined(NO_CHECKSUM) # Ensure that the "makesum" target (with its inner "fetch" one) uses # devel/qt*/distinfo for every port. QT_DIST= 3d base canvas3d connectivity declarative doc enginio graphicaleffects imageformats \ location multimedia quick1 quickcontrols script sensors serialport svg tools \ translations webchannel webkit webkit-examples websockets x11extras xmlpatterns -. endif +. endif -. if ${QT_DIST} == "base" && ${PORTNAME} != "qmake" +. if ${QT_DIST} == "base" && ${PORTNAME} != "qmake" # Qt configure requires pkg-config to detect dependencies. USES+= pkgconfig @@ -116,14 +116,14 @@ # script) can find the mkspecs we create ourselves in devel/qmake5. CONFIGURE_ENV+= QMAKESPEC="${QMAKESPEC}" MAKE_ENV+= QMAKESPEC="${QMAKESPEC}" -. endif +. endif # -nomake is only used by qtbase's configure script. # Other ports from other Qt modules will automatically build examples and # tests if the directories exist because of mkspecs/features/qt_parts.prf. EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \ ${DISTNAME:S,$,/tests,:S,^,--exclude ,} -. endif # ! ${_QT_VERSION:M4*} +. endif # ! ${_QT_VERSION:M4*} CONFIGURE_ENV+= MAKE="${MAKE:T}" @@ -141,26 +141,26 @@ -translationdir ${PREFIX}/${QT_L10NDIR_REL} \ -sysconfdir ${PREFIX}/${QT_ETCDIR_REL} -. if ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} CONFIGURE_ARGS+=-fast \ -system-libjpeg -system-libpng \ -system-libmng -system-libtiff -system-zlib \ -no-phonon-backend \ -examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/examples \ -demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos -. else +. else CONFIGURE_ARGS+=-nomake examples -nomake tests \ -archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \ -libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \ -qmldir ${PREFIX}/${QT_QMLDIR_REL} \ -examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \ -testsdir ${PREFIX}/${QT_TESTDIR_REL} -. if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2) +. if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2) CONFIGURE_ARGS+=-no-sse2 -. endif -. endif +. endif +. endif -. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG) +. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG) WITH_DEBUG= yes STRIP= # It's done prior to bsd.qt.mk inclusion. CONFIGURE_ARGS+=-debug -separate-debug-info @@ -168,63 +168,63 @@ QMAKE_ARGS+= QT_CONFIG+="debug separate_debug_info" \ QT_CONFIG-="release" PLIST_SUB+= DEBUG="" -. else +. else CONFIGURE_ARGS+=-release -no-separate-debug-info QMAKE_ARGS+= QT_CONFIG+="release" \ QT_CONFIG-="debug separate_debug_info" PLIST_SUB+= DEBUG="@comment " -. endif +. endif -. if defined(WANT_QT_VERBOSE_CONFIGURE) +. if defined(WANT_QT_VERBOSE_CONFIGURE) CONFIGURE_ARGS+=-verbose -. endif +. endif -. if ${QT_DIST} == "base" || ${_QT_VERSION:M4*} -. if ${_QT_VERSION:M4*} +. if ${QT_DIST} == "base" || ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} _EXTRA_PATCHES_QT4= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h -. else +. else _EXTRA_PATCHES_QT5= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src_corelib_global_qcompilerdetection.h -. endif +. endif EXTRA_PATCHES?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \ ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \ ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool \ ${_EXTRA_PATCHES_QT4} ${_EXTRA_PATCHES_QT5} -. endif +. endif # Override settings installed in qconfig.h and *.pri files. The flags will be # installed along with the port, but have to be passed as arguments while # building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups") # are needed to disable some features. -. if !defined(${QT_MODNAME}) || empty(${QT_MODNAME}) +. if !defined(${QT_MODNAME}) || empty(${QT_MODNAME}) # Used for both qconfig-*.h and qt_config_*.pri; it can't be empty. QT_MODNAME= ${PORTNAME} -. endif +. endif QT_DEFINES?= # For qconfig.h flags (without "QT_" prefix). QT_CONFIG?= # For *.pri files QT_CONFIG flags. -. if ${QT_DEFINES} +. if ${QT_DEFINES} QMAKE_ARGS+= DEFINES+="${QT_DEFINES:O:u:C/^([^-])/QT_\1/:C/^-/QT_NO_/:O}" -. if ${QT_DEFINES:N-*} +. if ${QT_DEFINES:N-*} # Use a script to cleanup qconfig-modules.h (see qt-post-install). PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -. endif -. endif -. if ${QT_CONFIG:N-*} +. endif +. endif +. if ${QT_CONFIG:N-*} QMAKE_ARGS+= QT_CONFIG+="${QT_CONFIG:N-*:O:u}" -. endif -. if ${QT_CONFIG:M-*} +. endif +. if ${QT_CONFIG:M-*} QMAKE_ARGS+= QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}" -. endif +. endif PLIST_SUB+= SHORTVER=${_QT_VERSION:R} \ FULLVER=${_QT_VERSION:C/-.*//} -.endif # defined(QT_DIST) +. endif # defined(QT_DIST) -.if ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} QT_BINDIR_REL?= bin QT_LIBDIR_REL?= lib/${_QT_RELNAME} QT_PLUGINDIR_REL?= ${QT_LIBDIR_REL}/plugins QT_IMPORTDIR_REL?= ${QT_LIBDIR_REL}/imports -.endif +. endif # A wrapper (qtchooser) is used to invoke binaries. QT_BINDIR_REL?= ${QT_ARCHDIR_REL}/bin @@ -243,17 +243,17 @@ QT_TESTDIR_REL?=${QT_DATADIR_REL}/tests # Not customizable. -.if ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} QT_MKSPECDIR_REL= ${QT_DATADIR_REL}/mkspecs _QT_LIBVER= # empty _QT_BINSUFX= -${_QT_RELNAME} -.else +. else QT_MKSPECDIR_REL= ${QT_ARCHDIR_REL}/mkspecs _QT_LIBVER= ${_QT_VERSION:R:R} _QT_BINSUFX= # empty -.endif +. endif LRELEASE?= ${QT_BINDIR}/lrelease${_QT_BINSUFX} LUPDATE?= ${QT_BINDIR}/lupdate${_QT_BINSUFX} @@ -276,11 +276,11 @@ PLIST_SUB+= QT_PREFIX="${QT_PREFIX}" -.for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \ +. for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \ QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC QT_${dir}DIR= ${QT_PREFIX}/${QT_${dir}DIR_REL} PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" -.endfor +. endfor .endif # !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include) @@ -288,7 +288,7 @@ Qt_Post_Include= bsd.qt.mk -.if !defined(QT_NONSTANDARD) +. if !defined(QT_NONSTANDARD) CONFIGURE_ENV+= QTDIR="${QT_PREFIX}" QMAKE="${QMAKE}" \ MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \ QMAKESPEC="${QMAKESPEC}" @@ -296,7 +296,7 @@ --with-qt-libraries=${QT_LIBDIR} \ --with-extra-includes=${LOCALBASE}/include \ --with-extra-libs=${LOCALBASE}/lib -.endif # !defined(QT_NONSTANDARD) +. endif # !defined(QT_NONSTANDARD) _USE_QT_ALL= assistant clucene dbus declarative designer doc gui help \ imageformats l10n linguist linguisttools multimedia \ @@ -520,20 +520,20 @@ sql-pgsql_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlpsql.so -.if ${_QT_VERSION:M4*} +. if ${_QT_VERSION:M4*} sql-sqlite2_PORT= databases/${_QT_RELNAME}-sqlite-plugin -.endif +. endif sql-sqlite3_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlite.so -.for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds -.if ${_QT_VERSION:M4*} +. for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds +. if ${_QT_VERSION:M4*} sql-${db}_PORT?= databases/${_QT_RELNAME}-${db}-plugin -.else +. else sql-${db}_PORT?= databases/${_QT_RELNAME}-sqldrivers-${db} -.endif +. endif sql-${db}_PATH?= ${QT_PLUGINDIR}/sqldrivers/libqsql${db:C/^sql//}.so -.endfor +. endfor svg_PORT= graphics/${_QT_RELNAME}-svg svg_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Svg.so @@ -578,51 +578,51 @@ xmlpatterns-tool_PATH= ${QT_BINDIR}/xmlpatterns _USE_QT_ALL+= ${_USE_QT${_QT_VERSION:R:R}_ONLY} -.for comp in ${_USE_QT_ALL} +. for comp in ${_USE_QT_ALL} ${comp}_BUILD_DEPENDS?= ${${comp}_PATH}:${${comp}_PORT} ${comp}_RUN_DEPENDS?= ${${comp}_PATH}:${${comp}_PORT} ${comp}_build_BUILD_DEPENDS?= ${${comp}_BUILD_DEPENDS} ${comp}_run_RUN_DEPENDS?= ${${comp}_RUN_DEPENDS} _USE_QT_ALL_SUFFIXED+= ${comp} ${comp}_build ${comp}_run -.endfor +. endfor _USE_QT= ${USE_QT${_QT_VERSION:R:R}} -.for comp in ${_USE_QT:O:u} -. if ${_USE_QT_ALL_SUFFIXED:M${comp}} +. for comp in ${_USE_QT:O:u} +. if ${_USE_QT_ALL_SUFFIXED:M${comp}} BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} -. else +. else IGNORE?= can't be installed: unknown USE_QT${_QT_VERSION:R:R} component '${comp}' #' -. endif -.endfor +. endif +. endfor -.if defined(QT_DIST) && ! ${_QT_VERSION:M4*} -. if ${QT_DIST} == "base" +. if defined(QT_DIST) && ! ${_QT_VERSION:M4*} +. if ${QT_DIST} == "base" # qtbase requires some tools to be symlinked to the build directory. _QT_TOOLS= # empty -. if ${PORTNAME} != "qmake" +. if ${PORTNAME} != "qmake" _QT_TOOLS+= ${QMAKE} -. endif -. if ${PORTNAME} != "buildtools" +. endif +. if ${PORTNAME} != "buildtools" _QT_TOOLS+= ${MOC} ${RCC} -. endif -. if ${PORTNAME} != "qdoc" +. endif +. if ${PORTNAME} != "qdoc" _QT_TOOLS+= qdoc -. endif -. if ${PORTNAME} != "dbus" +. endif +. if ${PORTNAME} != "dbus" _QT_TOOLS+= qdbuscpp2xml qdbusxml2cpp -. endif -. if ${PORTNAME} != "widgets" +. endif +. if ${PORTNAME} != "widgets" _QT_TOOLS+= ${UIC} -. endif +. endif pre-configure: qtbase-pre-configure qtbase-pre-configure: -. for tool in ${_QT_TOOLS} +. for tool in ${_QT_TOOLS} @${TEST} -e ${QT_BINDIR}/${tool:T} && \ ${LN} -sf ${QT_BINDIR}/${tool:T} ${CONFIGURE_WRKSRC}/bin/${tool:T} || \ ${TRUE} -. endfor +. endfor # Add ${LOCALBASE}/lib to DEFAULT_LIBDIRS, which we use to filter out # certain paths from pkg-config calls (see the explanation in @@ -634,12 +634,12 @@ ${REINPLACE_CMD} -e "/DEFAULT_LIBDIRS=/ s,\\\\\"\\\\n,\\\\n${LOCALBASE}/lib&," \ ${WRKSRC}/configure -. if ${PORTNAME} != "qmake" +. if ${PORTNAME} != "qmake" _QMAKE= ${CONFIGURE_WRKSRC}/bin/qmake post-configure: qmake-configure -. endif -. endif # ${QT_DIST} == "base" +. endif +. endif # ${QT_DIST} == "base" pre-configure: qt5-pre-configure qt5-pre-configure: @@ -669,7 +669,7 @@ post-install: qt-post-install qt-post-install: -. if ${QT_DEFINES:N-*} +. if ${QT_DEFINES:N-*} # We can't use SUB_FILES with a shared pkg-deinstall.in. # We need it to be a script instead of a group of @unexecs, otherwise # qconfig-modules.h cleanup will be run in pre-deinstall stage, which is @@ -681,7 +681,7 @@ @${MKDIR} ${STAGEDIR}${QT_INCDIR}/QtCore/modules @${ECHO_CMD} -n \ > ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h -. for def in ${QT_DEFINES:N-*:O:u:C/=.*$//} +. for def in ${QT_DEFINES:N-*:O:u:C/=.*$//} @${ECHO_CMD} "#if !defined(QT_${def}) && !defined(QT_NO_${def})" \ >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h ${ECHO_CMD} "# define QT_${def}" \ @@ -690,19 +690,19 @@ >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h @${ECHO_CMD} \ >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h -. endfor +. endfor @${ECHO_CMD} "${QT_PREFIX}/${QT_INCDIR_REL}/QtCore/modules/qconfig-${QT_MODNAME}.h" \ >> ${TMPPLIST} @${ECHO_CMD} "@exec echo '#include ' >> ${QT_PREFIX}/${QT_INCDIR_REL}/QtCore/qconfig-modules.h" \ >> ${TMPPLIST} -. endif # ${QT_DEFINES:N-*} -. if ${QT_CONFIG:N-*} +. endif # ${QT_DEFINES:N-*} +. if ${QT_CONFIG:N-*} @${MKDIR} ${STAGEDIR}${QT_MKSPECDIR}/modules ${ECHO_CMD} "QT_CONFIG += ${QT_CONFIG:N-*:O:u}" \ > ${STAGEDIR}${QT_MKSPECDIR}/modules/qt_config_${QT_MODNAME}.pri @${ECHO_CMD} "${QT_PREFIX}/${QT_MKSPECDIR_REL}/modules/qt_config_${QT_MODNAME}.pri" \ >> ${TMPPLIST} -. endif # ${QT_CONFIG:N-*} -.endif # defined(QT_DIST) && ! ${_QT_VERSION:M4*} +. endif # ${QT_CONFIG:N-*} +. endif # defined(QT_DIST) && ! ${_QT_VERSION:M4*} .endif # defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include) Index: Mk/bsd.ruby.mk =================================================================== --- Mk/bsd.ruby.mk +++ Mk/bsd.ruby.mk @@ -130,23 +130,23 @@ .include "${PORTSDIR}/Mk/bsd.default-versions.mk" -.if defined(RUBY_DEFAULT_VER) +. if defined(RUBY_DEFAULT_VER) WARNING+= "RUBY_DEFAULT_VER is defined, consider using DEFAULT_VERSIONS=ruby=${RUBY_DEFAULT_VER} instead" -.endif +. endif RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} RUBY_VER?= ${RUBY_DEFAULT_VER} -.if defined(RUBY) -.if !exists(${RUBY}) +. if defined(RUBY) +. if !exists(${RUBY}) IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable. -.endif +. endif _RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' -.if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" +. if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig. Please specify a properly installed ruby executable. -.endif +. endif _RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = RbConfig::CONFIG' -e @@ -159,13 +159,13 @@ _RUBY_SYSLIBDIR!= ${_RUBY_CONFIG} 'puts C["libdir"]' _RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' _RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' -.else +. else RUBY?= ${LOCALBASE}/bin/${RUBY_NAME} -.if defined(RUBY_VER) +. if defined(RUBY_VER) # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. if ${RUBY_VER} == 2.1 +. if ${RUBY_VER} == 2.1 # # Ruby 2.1 # @@ -175,7 +175,7 @@ RUBY_PATCHLEVEL= 0 RUBY21= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 2.2 +. elif ${RUBY_VER} == 2.2 # # Ruby 2.2 # @@ -185,7 +185,7 @@ RUBY_PATCHLEVEL= 0 RUBY22= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 2.3 +. elif ${RUBY_VER} == 2.3 # # Ruby 2.3 # @@ -197,36 +197,36 @@ # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. else +. else # # Other versions # IGNORE= Only ruby 2.1, 2.2 and 2.3 are supported _INVALID_RUBY_VER= 1 -. endif -.endif # defined(RUBY_VER) +. endif +. endif # defined(RUBY_VER) -.if !defined(_INVALID_RUBY_VER) +. if !defined(_INVALID_RUBY_VER) RUBY21?= "@comment " RUBY22?= "@comment " RUBY23?= "@comment " -.if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}) -.if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes" +. if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}) +. if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes" BROKEN= does not build with Ruby ${RUBY_VER} -.else +. else BROKEN= ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} -.endif -.endif +. endif +. endif -.if ${RUBY_PATCHLEVEL} == 0 +. if ${RUBY_PATCHLEVEL} == 0 RUBY_VERSION?= ${RUBY_RELVERSION} RUBY_DISTVERSION?= ${RUBY_RELVERSION} -.else +. else RUBY_VERSION?= ${RUBY_RELVERSION}.${RUBY_PATCHLEVEL} RUBY_DISTVERSION?= ${RUBY_RELVERSION}-p${RUBY_PATCHLEVEL} -.endif +. endif RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION} @@ -243,11 +243,11 @@ _RUBY_SYSLIBDIR?= ${PREFIX}/lib _RUBY_SITEDIR?= ${_RUBY_SYSLIBDIR}/ruby/site_ruby _RUBY_VENDORDIR?= ${_RUBY_SYSLIBDIR}/ruby/vendor_ruby -.endif -.endif +. endif +. endif # defined(RUBY) -.if !defined(_INVALID_RUBY_VER) +. if !defined(_INVALID_RUBY_VER) RUBY_DEFAULT_SUFFIX?= ${RUBY_DEFAULT_VER:S/.//} @@ -333,35 +333,35 @@ RUBY22=${RUBY22} \ RUBY23=${RUBY23} -.if defined(USE_RUBY_RDOC) +. if defined(USE_RUBY_RDOC) MAKE_ENV+= RUBY_RDOC=${RUBY_RDOC} -.endif +. endif # require check -.if defined(RUBY_REQUIRE) +. if defined(RUBY_REQUIRE) USE_RUBY= yes -.if exists(${RUBY}) +. if exists(${RUBY}) RUBY_PROVIDED!= ${RUBY} -e '\ Ruby = ${RUBY_RELVERSION_CODE}; \ value = begin; ${RUBY_REQUIRE}; end and puts value' -.else +. else RUBY_PROVIDED= "should be" # the latest version is going to be installed -.endif +. endif -.if empty(RUBY_PROVIDED) +. if empty(RUBY_PROVIDED) .undef RUBY_PROVIDED -.endif -.endif +. endif +. endif -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} RUBY_FLAGS+= -d -.endif +. endif # # extconf.rb support # -.if defined(USE_RUBY_EXTCONF) +. if defined(USE_RUBY_EXTCONF) USE_RUBY= yes RUBY_EXTCONF?= extconf.rb @@ -371,23 +371,23 @@ do-configure: ruby-extconf-configure ruby-extconf-configure: -.if defined(RUBY_EXTCONF_SUBDIRS) -.for d in ${RUBY_EXTCONF_SUBDIRS} +. if defined(RUBY_EXTCONF_SUBDIRS) +. for d in ${RUBY_EXTCONF_SUBDIRS} @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure" @cd ${CONFIGURE_WRKSRC}/${d}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} -.endfor -.else +. endfor +. else @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" @cd ${CONFIGURE_WRKSRC}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} -.endif -.endif +. endif +. endif # # setup.rb support # -.if defined(USE_RUBY_SETUP) +. if defined(USE_RUBY_SETUP) RUBY_SETUP?= setup.rb do-configure: ruby-setup-configure @@ -410,43 +410,43 @@ @${ECHO_MSG} "===> Running ${RUBY_SETUP} to install" @cd ${INSTALL_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} -.endif +. endif -.if defined(USE_LIBRUBY) +. if defined(USE_LIBRUBY) LIB_DEPENDS+= ${DEPEND_LIBRUBY} -.endif +. endif -.if defined(USE_RUBY) -.if !defined(RUBY_NO_BUILD_DEPENDS) +. if defined(USE_RUBY) +. if !defined(RUBY_NO_BUILD_DEPENDS) EXTRACT_DEPENDS+= ${DEPEND_RUBY} PATCH_DEPENDS+= ${DEPEND_RUBY} BUILD_DEPENDS+= ${DEPEND_RUBY} -.endif -.if !defined(RUBY_NO_RUN_DEPENDS) +. endif +. if !defined(RUBY_NO_RUN_DEPENDS) RUN_DEPENDS+= ${DEPEND_RUBY} -.endif -.endif +. endif +. endif # documents RUBY_NO_RD_HTML= yes -.if defined(RUBY_RD_HTML) +. if defined(RUBY_RD_HTML) .undef RUBY_NO_RD_HTML -.endif +. endif -.if defined(NOPORTDOCS) +. if defined(NOPORTDOCS) RUBY_NO_RD_HTML= yes -.endif +. endif -.if defined(RUBY_RD_FILES) && !defined(RUBY_NO_RD_HTML) +. if defined(RUBY_RD_FILES) && !defined(RUBY_NO_RD_HTML) USE_RUBY_RDTOOL= yes RUBY_RD_HTML_FILES= ${RUBY_RD_FILES:S/.rb$//:S/.rd././:S/.rd$//:S/$/.html/} PLIST_SUB+= RUBY_RD_HTML_FILES="" -.if !empty(RUBY_RD_FILES) +. if !empty(RUBY_RD_FILES) _USES_install+= 290:ruby-rd-build ruby-rd-build: @${ECHO_MSG} "===> Generating HTML documents from RD documents" @@ -455,17 +455,17 @@ ${ECHO_MSG} "${RUBY_RD2} $$rd > $$html"; \ ${RUBY_RD2} $$rd > $$html; \ done -.endif +. endif -.else +. else RUBY_RD_HTML_FILES= # empty PLIST_SUB+= RUBY_RD_HTML_FILES="@comment " -.endif +. endif -.if !defined(NOPORTDOCS) && defined(USE_RUBY_RDTOOL) +. if !defined(NOPORTDOCS) && defined(USE_RUBY_RDTOOL) BUILD_DEPENDS+= ${DEPEND_RUBY_RDTOOL} -.endif +. endif -.endif # _INVALID_RUBY_VER +. endif # _INVALID_RUBY_VER .endif Index: Mk/bsd.sanity.mk =================================================================== --- Mk/bsd.sanity.mk +++ Mk/bsd.sanity.mk @@ -16,9 +16,9 @@ .endif .if exists(${.CURDIR}/../../Mk/bsd.port.mk) -.if ${.CURDIR:H:T} != ${PKGCATEGORY} +. if ${.CURDIR:H:T} != ${PKGCATEGORY} DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives" -.endif +. endif .else DEV_WARNING+= "Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing." .endif @@ -95,9 +95,9 @@ .endif .for a in 1 2 3 4 5 6 7 8 9 L N -.if defined(MAN${a}) +. if defined(MAN${a}) DEV_WARNING+= "MAN${a} macros are deprecated when using stage directory" -.endif +. endif .endfor .if defined(MLINKS) @@ -113,9 +113,9 @@ .endif .if defined(LICENSE) -.if ${LICENSE:MBSD} +. if ${LICENSE:MBSD} DEV_WARNING+= "LICENSE must not contain BSD, instead use BSD[234]CLAUSE" -.endif +. endif .endif .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install" @@ -124,25 +124,25 @@ .if defined(USE_PYTHON) && (${USE_PYTHON} == "yes" || ${USE_PYTHON:C/[-0-9.+]*//} == "") _PYTHON_VAL := ${USE_PYTHON} -.if ${_PYTHON_VAL} != "yes" +. if ${_PYTHON_VAL} != "yes" DEV_ERROR+= "USE_PYTHON=${_PYTHON_VAL} is no longer supported, please use USES=python:${_PYTHON_VAL}" -.else +. else DEV_ERROR+= "USE_PYTHON=yes is no longer supported, please use USES=python" -.endif +. endif .endif .if defined(USE_PYTHON_RUN) -.if ${USE_PYTHON_RUN} != "yes" +. if ${USE_PYTHON_RUN} != "yes" DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:${USE_PYTHON_RUN},run" -.else +. else DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:run" -.endif +. endif .endif .if defined(USE_PYTHON_BUILD) -.if ${USE_PYTHON_BUILD} != "yes" +. if ${USE_PYTHON_BUILD} != "yes" DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:${USE_PYTHON_BUILD},build" -.else +. else DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:build" -.endif +. endif .endif .if defined(PYDISTUTILS_INSTALLNOSINGLE) @@ -223,19 +223,19 @@ WANT_MYSQL_VER_ALT= USES=mysql:${WANT_MYSQL_VER} .for a in ${SANITY_DEPRECATED} -.if defined(${a}) +. if defined(${a}) DEV_WARNING+= "${a} is deprecated, please use ${${a}_ALT}" -.endif +. endif .endfor .for a in ${SANITY_NOTNEEDED} -.if defined(${a}) +. if defined(${a}) DEV_WARNING+= "${a} is not needed: ${${a}_REASON}" -.endif +. endif .endfor .for a in ${SANITY_UNSUPPORTED} -.if defined(${a}) +. if defined(${a}) DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}" -.endif +. endif .endfor Index: Mk/bsd.sdl.mk =================================================================== --- Mk/bsd.sdl.mk +++ Mk/bsd.sdl.mk @@ -124,62 +124,62 @@ # If USE_SDL is defined, make dependencies for the libraries # .if !defined(BEFOREPORTMK) -.if !defined(SDL_Include_post) -.if defined(USE_SDL) +. if !defined(SDL_Include_post) +. if defined(USE_SDL) SDL_Include_post= bsd.sdl.mk # # Keep some backward compatibility # -.if ${USE_SDL}=="yes" +. if ${USE_SDL}=="yes" USE_SDL= sdl -.endif +. endif # # Check if all the values given in USE_SDL are valid. # _USE_SDL= -.for component in ${USE_SDL} -. if ${_USE_SDL_ALL:M${component}}=="" +. for component in ${USE_SDL} +. if ${_USE_SDL_ALL:M${component}}=="" IGNORE= cannot install: unknown SDL component ${component} -. endif +. endif _USE_SDL+= ${_REQUIRES_${component}} ${component} -.endfor +. endfor # # Uniquefy[sp] the list of libs required # __USE_SDL= -.for component in ${_USE_SDL} -. if ${__USE_SDL:M${component}}=="" +. for component in ${_USE_SDL} +. if ${__USE_SDL:M${component}}=="" __USE_SDL+= ${component} -. endif -.endfor +. endif +. endfor # # Finally make the list of libs required # -.for component in ${__USE_SDL} +. for component in ${__USE_SDL} LIB_DEPENDS+= ${_LIB_${component}}:${_SUBDIR_${component}}/${_PORTDIR_${component}} -.endfor +. endfor # # "Normal" dependencies and variables # -.if ${__USE_SDL:Msdl} != "" +. if ${__USE_SDL:Msdl} != "" BUILD_DEPENDS+= ${SDL_CONFIG}:${_SUBDIR_sdl}/${_PORTDIR_sdl} SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG} MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG} -.endif -.if ${__USE_SDL:Msdl2} != "" +. endif +. if ${__USE_SDL:Msdl2} != "" BUILD_DEPENDS+= ${SDL2_CONFIG}:${_SUBDIR_sdl2}/${_PORTDIR_sdl2} SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} -.endif +. endif -.endif -.endif +. endif +. endif .endif Index: Mk/bsd.sites.mk =================================================================== --- Mk/bsd.sites.mk +++ Mk/bsd.sites.mk @@ -515,34 +515,34 @@ # default: ${DISTVERSION} # GH_TUPLE - above shortened to account:project:tagname[:group] # -.if defined(USE_GITHUB) -. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master +. if defined(USE_GITHUB) +. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master IGNORE?= Using master as GH_TAGNAME is invalid. \ Must use a tag or commit hash so the upstream does \ not "reroll" as soon as the branch is updated -. endif -. if defined(GH_TUPLE) -.for _tuple in ${GH_TUPLE} +. endif +. if defined(GH_TUPLE) +. for _tuple in ${GH_TUPLE} _t_tmp=${_tuple} -.if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g} +. if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_tuple} GH_TUPLE line has" @${ECHO_MSG} "a tag containing something else than [a-zA-Z0-9_]" @${FALSE} -.endif -.endfor +. endif +. endfor GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@} GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@} GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@} -. endif +. endif # We are cheating and using backend URLS for Github here. See ports/194898 # comment #15 for explanation as to why and how to deal with it if it breaks. MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR% MASTER_SITE_GITHUB_CLOUD+= https://cloud.github.com/downloads/%SUBDIR% -. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault} +. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault} MASTER_SITES+= GH -. endif +. endif GH_ACCOUNT_DEFAULT= ${PORTNAME} GH_ACCOUNT?= ${GH_ACCOUNT_DEFAULT} GH_PROJECT_DEFAULT= ${PORTNAME} @@ -552,103 +552,103 @@ GH_TAGNAME?= ${GH_TAGNAME_DEFAULT} # Iterate over GH_ACCOUNT, GH_PROJECT and GH_TAGNAME to extract groups _GITHUB_GROUPS= DEFAULT -. for _A in ${GH_ACCOUNT} +. for _A in ${GH_ACCOUNT} _S_TEMP= ${_A:S/^${_A:C@:[^/:]+$@@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your GH_ACCOUNT" @${FALSE} -. endif -. if !${_GITHUB_GROUPS:M${_group}} +. endif +. if !${_GITHUB_GROUPS:M${_group}} _GITHUB_GROUPS+= ${_group} -. endif +. endif GH_ACCOUNT_${_group}= ${_A:C@^(.*):[^/:]+$@\1@} -. endfor -. else +. endfor +. else GH_ACCOUNT_DEFAULT= ${_A:C@^(.*):[^/:]+$@\1@} -. endif -. endfor -. for _P in ${GH_PROJECT} +. endif +. endfor +. for _P in ${GH_PROJECT} _S_TEMP= ${_P:S/^${_P:C@:[^/:]+$@@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your GH_PROJECT" @${FALSE} -. endif -. if !${_GITHUB_GROUPS:M${_group}} +. endif +. if !${_GITHUB_GROUPS:M${_group}} _GITHUB_GROUPS+= ${_group} -. endif +. endif GH_PROJECT_${_group}= ${_P:C@^(.*):[^/:]+$@\1@} -. endfor -. else +. endfor +. else GH_PROJECT_DEFAULT= ${_P:C@^(.*):[^/:]+$@\1@} -. endif -. endfor -. for _T in ${GH_TAGNAME} +. endif +. endfor +. for _T in ${GH_TAGNAME} _S_TEMP= ${_T:S/^${_T:C@:[^/:]+$@@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your GH_TAGNAME" @${FALSE} -. endif -. if !${_GITHUB_GROUPS:M${_group}} +. endif +. if !${_GITHUB_GROUPS:M${_group}} _GITHUB_GROUPS+= ${_group} -. endif +. endif GH_TAGNAME_${_group}= ${_T:C@^(.*):[^/:]+$@\1@} -. endfor -. else +. endfor +. else GH_TAGNAME_DEFAULT= ${_T:C@^(.*):[^/:]+$@\1@} -. endif -. endfor +. endif +. endfor # Put the default values back into the variables so that the *default* behavior # is not changed. GH_ACCOUNT:= ${GH_ACCOUNT_DEFAULT} GH_PROJECT:= ${GH_PROJECT_DEFAULT} GH_TAGNAME:= ${GH_TAGNAME_DEFAULT} -. if defined(GH_TAGNAME) +. if defined(GH_TAGNAME) GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,} # Github silently converts tags starting with v to not have v in the filename # and extraction directory. It also replaces + with -. GH_TAGNAME_EXTRACT= ${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g} -. endif -. if defined(_GITHUB_MUST_SET_DISTNAME) +. endif +. if defined(_GITHUB_MUST_SET_DISTNAME) # GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice -. if ${GH_TAGNAME} != ${DISTVERSIONFULL} +. if ${GH_TAGNAME} != ${DISTVERSIONFULL} DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED} -. else +. else DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED} +. endif . endif -. endif # This new scheme rerolls distfiles. Also ensure they are renamed to avoid # conflicts. Use _GITHUB_REV in case github changes their zipping or structure # which has happened before. _GITHUB_REV= 0 -. if ${MASTER_SITES:MGH} +. if ${MASTER_SITES:MGH} DISTNAME:= ${DISTNAME}_GH${_GITHUB_REV} -. endif +. endif _GITHUB_EXTRACT_SUFX= .tar.gz # Put the DEFAULT distfile first -. if !${USE_GITHUB:Mnodefault} && defined(_GITHUB_MUST_SET_DISTNAME) +. if !${USE_GITHUB:Mnodefault} && defined(_GITHUB_MUST_SET_DISTNAME) DISTFILES+= ${DISTNAME}${_GITHUB_EXTRACT_SUFX} -. endif +. endif # If there are non default groups -. if !empty(_GITHUB_GROUPS:NDEFAULT) +. if !empty(_GITHUB_GROUPS:NDEFAULT) # Then for each of the remaining groups, add DISTFILES and MASTER_SITES # entries with the correct group and create {WRKSRC,DISTNAME,DISTFILES}_group # helper variables. -. for _group in ${_GITHUB_GROUPS:NDEFAULT} +. for _group in ${_GITHUB_GROUPS:NDEFAULT} GH_ACCOUNT_${_group}?= ${GH_ACCOUNT_DEFAULT} GH_PROJECT_${_group}?= ${GH_PROJECT_DEFAULT} GH_TAGNAME_${_group}?= ${GH_TAGNAME_DEFAULT} @@ -659,9 +659,9 @@ DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_group} MASTER_SITES:= ${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}/tar.gz/${GH_TAGNAME_${_group}}?dummy=/:${_group}@} WRKSRC_${_group}:= ${WRKDIR}/${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_EXTRACT} -. endfor -. endif -.endif # defined(USE_GITHUB) +. endfor +. endif +. endif # defined(USE_GITHUB) .endif # !defined(IGNORE_MASTER_SITE_GITHUB) .if !defined(IGNORE_MASTER_SITE_GNOME) @@ -1046,12 +1046,12 @@ _PERL_CPAN_FLAG=${MASTER_SITE_SUBDIR:C/(CPAN):.*$/\1/} _PERL_CPAN_ID= ${MASTER_SITE_SUBDIR:C/^CPAN:(.)(.)(.*)$/\1\/\1\2\/\1\2\3/} -.if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan" +. if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan" _PERL_CPAN_SORT=authors/id/${_PERL_CPAN_ID} MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIR%\///:S/%SUBDIRPLUS%\//${PORTNAME:C/-.*//}\//} -.else +. else MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIRPLUS%\///} -.endif +. endif .endif @@ -1161,19 +1161,19 @@ # Updated: 2013-03-25 .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE) MASTER_SITE_SOURCEFORGE+= http://downloads.sourceforge.net/project/%SUBDIR%/ -.for mirror in heanet sunet iweb switch freefr garr aarnet jaist master \ +. for mirror in heanet sunet iweb switch freefr garr aarnet jaist master \ nchc ncu internode waix hivelocity superb-dca3 ufpr tenet \ netcologne ignum kent MASTER_SITE_SOURCEFORGE+= \ http://${mirror}.dl.sourceforge.net/project/%SUBDIR%/ -.endfor +. endfor .endif .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE_JP) -.for mirror in iij jaist keihanna osdn +. for mirror in iij jaist keihanna osdn MASTER_SITE_SOURCEFORGE_JP+= \ http://${mirror}.dl.sourceforge.jp/%SUBDIR%/ -.endfor +. endfor .endif .if !defined(IGNORE_MASTER_SITE_SOURCEWARE) @@ -1400,86 +1400,86 @@ .if defined(MASTER_SITES) && ${MASTER_SITES:N*\:/*} -.for _site__ in ${MASTER_SITES} +. for _site__ in ${MASTER_SITES} _site_=${_site__} -. if ${_site_:M*\:/*} +. if ${_site_:M*\:/*} MASTER_SITES_EXP+= ${_site_} MASTER_SITES_EXP:= ${MASTER_SITES_EXP} -. else +. else _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@} -. if ${_site_urlpath_:M*/*} +. if ${_site_urlpath_:M*/*} _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@} _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!} -. else +. else _site_url_= ${_site_urlpath_} .undef _site_subdir_ -. endif +. endif _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://} -. for _abbrev_ in ${MASTER_SITES_ABBREVS} -. if ${_site_url_} == ${_abbrev_:C/:.*//} +. for _abbrev_ in ${MASTER_SITES_ABBREVS} +. if ${_site_url_} == ${_abbrev_:C/:.*//} _site_url_= ${_abbrev_:C/.*://} -. endif -. endfor -. if !defined(MASTER_SITE_SUBDIR) -. for _subdir_ in ${MASTER_SITES_SUBDIRS} -. if ${_site_url_} == ${_subdir_:C/:.*//} +. endif +. endfor +. if !defined(MASTER_SITE_SUBDIR) +. for _subdir_ in ${MASTER_SITES_SUBDIRS} +. if ${_site_url_} == ${_subdir_:C/:.*//} _site_subdir_?= ${_subdir_:C/.*://} -. endif -. endfor -. endif -. ifdef MASTER_SITE_${_site_url_} -. ifdef _site_subdir_ +. endif +. endfor +. endif +. ifdef MASTER_SITE_${_site_url_} +. ifdef _site_subdir_ MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//} -. else +. else MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//} -. endif +. endif MASTER_SITES_EXP:= ${MASTER_SITES_EXP} -. endif -. endif -.endfor +. endif +. endif +. endfor MASTER_SITES= ${MASTER_SITES_EXP} .endif .if defined(PATCH_SITES) && ${PATCH_SITES:N*\:/*} -.for _site__ in ${PATCH_SITES} +. for _site__ in ${PATCH_SITES} _site_=${_site__} -. if ${_site_:M*\:/*} +. if ${_site_:M*\:/*} PATCH_SITES_EXP+= ${_site_} PATCH_SITES_EXP:= ${PATCH_SITES_EXP} -. else +. else _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@} -. if ${_site_urlpath_:M*/*} +. if ${_site_urlpath_:M*/*} _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@} _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!} -. else +. else _site_url_= ${_site_urlpath_} .undef _site_subdir_ -. endif +. endif _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://} -. for _abbrev_ in ${MASTER_SITES_ABBREVS} -. if ${_site_url_} == ${_abbrev_:C/:.*//} +. for _abbrev_ in ${MASTER_SITES_ABBREVS} +. if ${_site_url_} == ${_abbrev_:C/:.*//} _site_url_= ${_abbrev_:C/.*://} -. endif -. endfor -. if !defined(MASTER_SITE_SUBDIR) -. for _subdir_ in ${MASTER_SITES_SUBDIRS} -. if ${_site_url_} == ${_subdir_:C/:.*//} +. endif +. endfor +. if !defined(MASTER_SITE_SUBDIR) +. for _subdir_ in ${MASTER_SITES_SUBDIRS} +. if ${_site_url_} == ${_subdir_:C/:.*//} _site_subdir_?= ${_subdir_:C/.*://} -. endif -. endfor -. endif -. ifdef MASTER_SITE_${_site_url_} -. ifdef _site_subdir_ +. endif +. endfor +. endif +. ifdef MASTER_SITE_${_site_url_} +. ifdef _site_subdir_ PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//} -. else +. else PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//} -. endif +. endif PATCH_SITES_EXP:= ${PATCH_SITES_EXP} -. endif -. endif -.endfor +. endif +. endif +. endfor PATCH_SITES= ${PATCH_SITES_EXP} .endif Index: Mk/bsd.ssp.mk =================================================================== --- Mk/bsd.ssp.mk +++ Mk/bsd.ssp.mk @@ -24,7 +24,7 @@ LDFLAGS+= -fstack-protector # -lssp_nonshared is needed on i386 where /usr/lib/libc.so is not an ldscript # This is currently unused XXX -. if defined(SSP_NEED_NONSHARED) +. if defined(SSP_NEED_NONSHARED) LDFLAGS+= -lssp_nonshared -. endif +. endif .endif Index: Mk/bsd.tex.mk =================================================================== --- Mk/bsd.tex.mk +++ Mk/bsd.tex.mk @@ -169,42 +169,42 @@ .for _UU in ${USE_TEX:tu} _U:= ${_UU} # ugly but necessary in for loop _VOP:= -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXMF) && empty(_U:M*[<>=]*) +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXMF) && empty(_U:M*[<>=]*) _U:= ${_U}>=20150523_3 -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MBASE) && empty(_U:M*[<>=]*) +. endif +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MBASE) && empty(_U:M*[<>=]*) _U:= ${_U}>=20150521_5 -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MKPATHSEA) || \ +. endif +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MKPATHSEA) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MPTEXENC) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXLUA) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXLUAJIT) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MSYNCTEX) _U:= ${_U}:lib -. endif -. if !empty(_U:M*[<>=]*) +. endif +. if !empty(_U:M*[<>=]*) _VOP:= ${_U:C/^[^<>=]*//:C/\:.*$//} -. endif -. if empty(_U:M*\:*) +. endif +. if empty(_U:M*\:*) _C:= BUILD RUN -. else +. else _C:= ${_U:C/.*://:S/,/ /g:C/[<>=][^\:]*//g} -. endif +. endif #. warning DEBUG: ${_U}: _VOP=${_VOP}, _C=${_C} -. for _CC in ${_C:tu} +. for _CC in ${_C:tu} _V:=${_UU:C/[<>=][^\:]*//:C/\:.*$//} -. if defined(_USE_TEX_${_V}_PORT) -. if !empty(_VOP) -. for _T in ${_USE_TEX_${_V}_PKGNAME}${_VOP}:${_USE_TEX_${_V}_PORT} +. if defined(_USE_TEX_${_V}_PORT) +. if !empty(_VOP) +. for _T in ${_USE_TEX_${_V}_PKGNAME}${_VOP}:${_USE_TEX_${_V}_PORT} TEX_${_CC}_DEPENDS+= ${_T} -. endfor -. else -. for _T in ${_USE_TEX_${_V}_DEP}:${_USE_TEX_${_V}_PORT} +. endfor +. else +. for _T in ${_USE_TEX_${_V}_DEP}:${_USE_TEX_${_V}_PORT} TEX_${_CC}_DEPENDS+= ${_T} -. endfor -. endif -. endif -. endfor +. endfor +. endif +. endif +. endfor .endfor .for _C in EXTRACT BUILD LIB RUN @@ -219,14 +219,14 @@ !empty(USE_TEX:Mupdmap) .PHONY: do-texhash do-texhash: -. if !empty(USE_TEX:Mtexhash-bootstrap) +. if !empty(USE_TEX:Mtexhash-bootstrap) @${ECHO_CMD} "@exec ${LOCALBASE}/bin/mktexlsr " \ "${TEXHASHDIRS:S,^,%D/,}" >> ${TMPPLIST} @for D in ${TEXHASHDIRS}; do \ ${ECHO_CMD} "@rmtry $$D/ls-R"; \ ${ECHO_CMD} "@dir $$D"; \ done >> ${TMPPLIST} -. else +. else @${ECHO_CMD} "@exec for D in ${TEXHASHDIRS:S,^,${PREFIX}/,}; do " \ "if [ -r \$$D/ls-R ]; then " \ "${LOCALBASE}/bin/mktexlsr \$$D; " \ @@ -235,14 +235,14 @@ "if [ -r \$$D/ls-R ]; then " \ "${LOCALBASE}/bin/mktexlsr \$$D; " \ "fi; done" >> ${TMPPLIST} -. endif +. endif post-install-script: do-texhash .endif .if !empty(USE_TEX:Mfmtutil) .PHONY: do-fmtutil -. for F in ${TEX_FORMATS} +. for F in ${TEX_FORMATS} do-fmtutil: post-install-$F do-fmtutil-$F do-fmtutil-$F: ${TEST} -n '${TEX_FORMAT_${F:tu}}' @@ -273,7 +273,7 @@ _PLIST_FILES+= ${TEX_FORMAT_${F:tu}_FILES} _PLIST_DIRSTRY+=${TEX_FORMAT_${F:tu}_DIRS} _PLIST_FILES+= ${TEX_FORMAT_${F:tu}_BIN} -. endfor +. endfor post-install-script: do-fmtutil PLIST_FILES= ${_PLIST_FILES:O:u} PLIST_DIRSTRY= ${_PLIST_DIRSTRY:O:u} ${TEXMFVARDIR}/web2c Index: Mk/bsd.wx.mk =================================================================== --- Mk/bsd.wx.mk +++ Mk/bsd.wx.mk @@ -145,20 +145,20 @@ # Set _WX_SHVER_comp_ver to 0 and _WX_FILE_comp_ver for libs appropiately. # Set _WX_DEPTYPE_comp_ver for "python" to "run", and others to "lib". -. for comp in ${_WX_COMPS_ALL} +. for comp in ${_WX_COMPS_ALL} _WX_COMP= ${comp} -. for ver in ${_WX_VERS_ALL} -. if defined(_WX_LIB_${comp}_${ver}) +. for ver in ${_WX_VERS_ALL} +. if defined(_WX_LIB_${comp}_${ver}) _WX_SHVER_${comp}_${ver}= 0 _WX_FILE_${comp}_${ver}= ${LOCALBASE}/lib/lib${_WX_LIB_${comp}_${ver}}.so.${_WX_SHVER_${comp}_${ver}} -. endif -. if ${_WX_COMP} == "python" +. endif +. if ${_WX_COMP} == "python" _WX_DEPTYPE_${comp}_${ver}= run -. else +. else _WX_DEPTYPE_${comp}_${ver}= lib -. endif -. endfor -. endfor +. endif +. endfor +. endfor .endif # !_WX_Defined_Done # @@ -198,33 +198,33 @@ # Fill _HAVE_WX with the installed components. . undef _HAVE_WX -. for __WANT_WX in ${_WANT_WX} +. for __WANT_WX in ${_WANT_WX} # Check if _WANT_WX contains more than one word. -. if defined(_HAVE_WX) +. if defined(_HAVE_WX) IGNORE?= selected multiple values for WANT_WX: ${_WANT_WX} -. endif +. endif _HAVE_WX= # # Check for all versions. -. if ${_WANT_WX:tl} == "yes" -. for comp in ${_WX_COMPS_ALL} -. for ver in ${_WX_VER_FINAL} +. if ${_WANT_WX:tl} == "yes" +. for comp in ${_WX_COMPS_ALL} +. for ver in ${_WX_VER_FINAL} _WX_COMP= _WX_FILE_${comp}_${ver} -. if defined(${_WX_COMP}) && exists(${${_WX_COMP}}) +. if defined(${_WX_COMP}) && exists(${${_WX_COMP}}) _HAVE_WX+= ${comp}-${ver} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Check for a specific version. -. elif ${_WX_VERS_ALL:M${__WANT_WX}} -. for comp in ${_WX_COMPS_ALL} -. if exists(${_WX_FILE_${comp}_${__WANT_WX}}) +. elif ${_WX_VERS_ALL:M${__WANT_WX}} +. for comp in ${_WX_COMPS_ALL} +. if exists(${_WX_FILE_${comp}_${__WANT_WX}}) _HAVE_WX+= ${comp} -. endif -. endfor -. else +. endif +. endfor +. else IGNORE?= selected an invalid value for WANT_WX: ${__WANT_WX} -. endif -. endfor +. endif +. endfor .endif # _WANT_WX # Requested by the user. @@ -257,19 +257,19 @@ # Detect duplicated components. _WX_COMPS_FINAL= # -.for comp in ${WX_COMPS} +. for comp in ${WX_COMPS} _WX_COMP= ${comp:C/:([[:alpha:]]+)$//} -. for __WX_COMP in ${_WX_COMP} -. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" +. for __WX_COMP in ${_WX_COMP} +. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP} -. endif -. endfor -. for newcomp in ${_WX_COMP} -. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) +. endif +. endfor +. for newcomp in ${_WX_COMP} +. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) _WX_COMPS_FINAL+= ${newcomp} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # Set defaults (if one isn't present). @@ -288,69 +288,69 @@ # _WX_VER_MERGED - List of requested version without disallowed ones. # -.for list in VER VER_NOT +. for list in VER VER_NOT _WX_${list}_LIST= # -. for ver in ${USE_WX${list:C/VER//}} +. for ver in ${USE_WX${list:C/VER//}} _WX_VER_CHECK:= ${ver:C/^([[:digit:]]+(\.[[:digit:]]+)*)$/\1-\1/} _WX_VER_MIN:= ${_WX_VER_CHECK:C/([[:digit:]]+(\.[[:digit:]]+)*)[-+].*/\1/} _WX_VER_MAX:= ${_WX_VER_CHECK:C/.*-([[:digit:]]+(\.[[:digit:]]+)*)/\1/} # Minimum version not specified. -. if ${_WX_VER_MIN} == ${_WX_VER_CHECK} +. if ${_WX_VER_MIN} == ${_WX_VER_CHECK} . undef _WX_VER_MIN -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" _WX_VER_MIN?= ${v} -. endif -. endfor -. endif +. endif +. endfor +. endif # Maximum version not specified. -. if ${_WX_VER_MAX} == ${_WX_VER_CHECK} -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" +. if ${_WX_VER_MAX} == ${_WX_VER_CHECK} +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" _WX_VER_MAX= ${v} -. endif -. endfor -. endif +. endif +. endfor +. endif # Expand versions and add valid ones to each list. -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \ +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \ ${_WX_${list}_LIST:M${v}} == "" _WX_${list}_LIST+= ${v} -. endif -. endfor -. endfor -.endfor +. endif +. endfor +. endfor +. endfor # Merge the lists into a single list of valid versions. _WX_VER_MERGED= # -.for ver in ${_WX_VER_LIST} -. if ${_WX_VER_NOT_LIST:M${ver}} == "" +. for ver in ${_WX_VER_LIST} +. if ${_WX_VER_NOT_LIST:M${ver}} == "" _WX_VER_MERGED+= ${ver} -. endif -.endfor +. endif +. endfor # Check for a null version. -.if empty(_WX_VER_MERGED) +. if empty(_WX_VER_MERGED) IGNORE?= selected a null or invalid wxWidgets version -.endif +. endif # Avoid versions which have unavailable components. -.for ver in ${_WX_VER_MERGED} -. for comp in ${_WX_COMPS_FINAL} -. if !defined(_WX_PORT_${comp}_${ver}) +. for ver in ${_WX_VER_MERGED} +. for comp in ${_WX_COMPS_FINAL} +. if !defined(_WX_PORT_${comp}_${ver}) _WX_WRONG_COMPS+= ${comp} _WX_WRONG_VERS+= ${ver} _WX_VER_MERGED:= ${_WX_VER_MERGED:N${ver}} -. endif -. endfor -.endfor +. endif +. endfor +. endfor -.if empty(_WX_VER_MERGED) +. if empty(_WX_VER_MERGED) IGNORE?= selected wxWidgets versions (${_WX_WRONG_VERS}) which do not have the selected components (${_WX_WRONG_COMPS}) -.endif +. endif # # Unicode support. @@ -359,11 +359,11 @@ # Create a list of capable versions. _WX_VER_UC= # -.for ver in ${_WX_VER_MERGED} -. if ${_WX_VERS_UC_ALL:M${ver}} != "" +. for ver in ${_WX_VER_MERGED} +. if ${_WX_VERS_UC_ALL:M${ver}} != "" _WX_VER_UC+= ${ver} -. endif -.endfor +. endif +. endfor # Set Unicode variables. @@ -373,11 +373,11 @@ # Remove unusable installed versions. -.for ver in ${_WX_VER_INSTALLED} -. if ${_WX_VER_FINAL:M${ver}} == "" +. for ver in ${_WX_VER_INSTALLED} +. if ${_WX_VER_FINAL:M${ver}} == "" _WX_VER_INSTALLED:= ${_WX_VER_INSTALLED:N${ver}} -. endif -.endfor +. endif +. endfor # # Choose final version. @@ -391,15 +391,15 @@ # 4) _WX_VER_FINAL - Available versions. -.for list in _WX_VER_FINAL ${_WX_VERS_LISTS} -. if defined(${list}) -. for ver in ${${list}} -. if ${_WX_VER_FINAL:M${ver}} != "" +. for list in _WX_VER_FINAL ${_WX_VERS_LISTS} +. if defined(${list}) +. for ver in ${${list}} +. if ${_WX_VER_FINAL:M${ver}} != "" _WX_VER= ${ver} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor # # Set variables. @@ -434,33 +434,33 @@ # Detect invalid and duplicated components. _WX_COMPS_FINAL= # -.for comp in ${WX_COMPS} +. for comp in ${WX_COMPS} _WX_COMP= ${comp:C/:([[:alpha:]]+)$//} -. if ${_WX_COMP} == ${comp} +. if ${_WX_COMP} == ${comp} _WX_DEP_TYPE= ${_WX_DEPTYPE_${comp}_${_WX_VER}} -. else +. else _WX_DEP_TYPE= ${comp:C/.+:([[:alpha:]]+)$/\1/} -. endif +. endif _WX_COMP_NEW= ${_WX_COMP}_${_WX_DEP_TYPE} -. for __WX_COMP in ${_WX_COMP} -. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" +. for __WX_COMP in ${_WX_COMP} +. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP} -. endif -. endfor -. for __WX_DEP_TYPE in ${_WX_DEP_TYPE} -. if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == "" +. endif +. endfor +. for __WX_DEP_TYPE in ${_WX_DEP_TYPE} +. if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == "" IGNORE?= selected an invalid wxWidgets dependency type: ${__WX_DEP_TYPE} -. endif -. endfor -. if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER}) +. endif +. endfor +. if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER}) IGNORE?= selected a wxWidgets component (${_WX_COMP}) which is not available for the selected version (${_WX_VER}) -. endif -. for newcomp in ${_WX_COMP_NEW} -. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) +. endif +. for newcomp in ${_WX_COMP_NEW} +. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) _WX_COMPS_FINAL+= ${newcomp} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # Add dependencies. # @@ -468,23 +468,23 @@ # _WX_COMP - Component part. # _WX_DEP_TYPE - Dependency type part. -.for comp in ${_WX_COMPS_FINAL} +. for comp in ${_WX_COMPS_FINAL} _WX_COMP= ${comp:C/_([[:alpha:]]+)$//} _WX_DEP_TYPE= ${comp:C/.+_([[:alpha:]]+)$/\1/} # XXX Need a .for loop here so the variable is expanded before the assignment. -. for comp_part in ${_WX_COMP} -. if ${_WX_DEP_TYPE} == "lib" -. if defined(_WX_LIB_${_WX_COMP}_${_WX_VER}) +. for comp_part in ${_WX_COMP} +. if ${_WX_DEP_TYPE} == "lib" +. if defined(_WX_LIB_${_WX_COMP}_${_WX_VER}) LIB_DEPENDS+= lib${_WX_LIB_${comp_part}_${_WX_VER}}.so:${_WX_PORT_${comp_part}_${_WX_VER}} -. else +. else BUILD_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} RUN_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} -. endif -. else +. endif +. else ${_WX_DEP_TYPE:tu}_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # # Set build related variables. @@ -493,15 +493,15 @@ MAKE_ENV+= WX_CONFIG=${WX_CONFIG} CONFIGURE_ENV+= WX_CONFIG=${WX_CONFIG} -.if defined(WX_CONF_ARGS) -. if ${WX_CONF_ARGS:tl} == "absolute" +. if defined(WX_CONF_ARGS) +. if ${WX_CONF_ARGS:tl} == "absolute" CONFIGURE_ARGS+= --with-wx-config=${WX_CONFIG} -. elif ${WX_CONF_ARGS:tl} == "relative" +. elif ${WX_CONF_ARGS:tl} == "relative" CONFIGURE_ARGS+= --with-wx=${LOCALBASE} \ --with-wx-config=${WX_CONFIG:T} -. else +. else IGNORE?= selected an invalid wxWidgets configure argument type: ${WX_CONF_ARGS} -. endif -.endif +. endif +. endif .endif # _POSTMKINCLUDED Index: Mk/bsd.xorg.mk =================================================================== --- Mk/bsd.xorg.mk +++ Mk/bsd.xorg.mk @@ -27,11 +27,11 @@ # proto - install .pc file, needs pathfix, most only needed at build time. # xserver - there's only one atm, I guess everything can fit into the port itself -.if defined(XORG_CAT) +. if defined(XORG_CAT) # Default variables, common to all new modular xorg ports. -.if !defined(USES) || ! ${USES:Mtar*} +. if !defined(USES) || ! ${USES:Mtar*} USES+= tar:bzip2 -.endif +. endif GNU_CONFIGURE= yes # for some reason this makes mkfontscale and others fail in the install target #INSTALL_TARGET= install-strip @@ -45,55 +45,55 @@ USES+= pkgconfig # All xorg ports needs xorg-macros. -. if ${PORTNAME} != xorg-macros +. if ${PORTNAME} != xorg-macros USE_XORG+= xorg-macros -. endif +. endif -. if ${XORG_CAT} == "app" +. if ${XORG_CAT} == "app" # Nothing at the moment -. endif +. endif -. if ${XORG_CAT} == "data" +. if ${XORG_CAT} == "data" # Nothing at the moment. -. endif +. endif -. if ${XORG_CAT} == "driver" +. if ${XORG_CAT} == "driver" USE_XORG+= xorg-server xproto randrproto xi renderproto xextproto \ inputproto kbproto fontsproto videoproto dri2proto xf86driproto \ presentproto glproto xineramaproto resourceproto scrnsaverproto # work around a llvm bug on i386, llvm bug #15806 # reproduced with clang 3.2 (current release) and 3.1 -. if ${ARCH} == i386 +. if ${ARCH} == i386 CFLAGS+= -fno-optimize-sibling-calls -. endif +. endif CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4' USES+= libtool -. endif +. endif -. if ${XORG_CAT} == "font" +. if ${XORG_CAT} == "font" FONTNAME?= ${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/} CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts CONFIGURE_ENV+= FONTROOTDIR=${PREFIX}/share/fonts -. if !defined(NOFONT) +. if !defined(NOFONT) USES+= fonts BUILD_DEPENDS+= mkfontdir:x11-fonts/mkfontdir \ bdftopcf:x11-fonts/bdftopcf PLIST_FILES+= "@comment ${FONTSDIR}/fonts.dir" \ "@comment ${FONTSDIR}/fonts.scale" +. endif . endif -. endif -. if ${XORG_CAT} == "lib" +. if ${XORG_CAT} == "lib" USES+= pathfix libtool USE_LDCONFIG= yes CONFIGURE_ARGS+=--enable-malloc0returnsnull -. endif +. endif -. if ${XORG_CAT} == "proto" +. if ${XORG_CAT} == "proto" USES+= pathfix -. endif +. endif -. if ${XORG_CAT} == "xserver" +. if ${XORG_CAT} == "xserver" DISTFILES?= xorg-server-${PORTVERSION}.tar.bz2 WRKSRC= ${WRKDIR}/xorg-server-${PORTVERSION} USES+= pathfix @@ -102,9 +102,9 @@ LIB_PC_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/dri USE_XORG+= pciaccess xextproto videoproto fontsproto dri2proto fontutil:build -. endif +. endif -.endif +. endif .endif @@ -287,20 +287,20 @@ xxf86misc_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/xxf86misc.pc:x11/libXxf86misc xxf86vm_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/xxf86vm.pc:x11/libXxf86vm -.for _module in ${USE_XORG:M*\:both:C/\:.*//g} -. if ${XORG_MODULES:M${_module}} == "" +. for _module in ${USE_XORG:M*\:both:C/\:.*//g} +. if ${XORG_MODULES:M${_module}} == "" IGNORE= requires unknown xorg module (${_module}) -. endif +. endif RUN_DEPENDS+= ${${_module}_BUILD_DEPENDS} -.endfor +. endfor -.for _module in ${USE_XORG:C/\:.*//g} -. if ${XORG_MODULES:M${_module}} == "" +. for _module in ${USE_XORG:C/\:.*//g} +. if ${XORG_MODULES:M${_module}} == "" IGNORE= requires unknown xorg module (${_module}) -. endif +. endif LIB_PC_DEPENDS+= ${${_module}_LIB_PC_DEPENDS} BUILD_DEPENDS+= ${${_module}_BUILD_DEPENDS} -.endfor +. endfor RUN_DEPENDS+= ${LIB_PC_DEPENDS} BUILD_DEPENDS+= ${LIB_PC_DEPENDS}