diff --git a/CHANGES b/CHANGES index 710d36ae6446..b840bc11fdeb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4204 +1,4219 @@ Updating Information for FreeBSD ports developers This file is maintained by portmgr@FreeBSD.org and copyrighted by the FreeBSD Foundation. This file contains major changes to ports and the ports infrastructure. Intended audience are ports committers, maintainers and other developers. User oriented changes should be submitted for inclusion in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. -20230111: +20240229: +AUTHOR: tijl@FreeBSD.org + + A new command SETENVI that clears the environment and a new variable + WRK_ENV that contains a basic environment to use with SETENVI have + been added. + Ports that run (parts of) the upstream build system directly using + commands like "${SETENV} ${MAKE_ENV} ${MAKE_CMD} ..." should change + that to "${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ...". This way + the build system runs with a clean environment without interference + from the user environment or ports framework environment. Ports can + add extra environment variables to WRK_ENV similar to CONFIGURE_ENV, + MAKE_ENV, TEST_ENV, and so on, but WRK_ENV is used in all targets + while the latter are target-specific. + +20240111: AUTHOR: bapt@FreeBSD.org MAN[1-8LN]PREFIX variable has been removed from the framework, use PREFIX directly. 20230929: AUTHOR: sunpoet@FreeBSD.org USE_PYTHON=cryptography{,_build,_test} has been added to the ports tree. 20230722 entry is obsoleted now. All existing USES=pycryptography* have been converted to USE_PYTHON=cryptography{,_build,_test} in PR 273727. Usage: USE_PYTHON=cryptography_build adds security/py-cryptography to BUILD_DEPENDS USE_PYTHON=cryptography adds security/py-cryptography to RUN_DEPENDS USE_PYTHON=cryptography_test adds security/py-cryptography to TEST_DEPENDS 20230823: AUTHOR: tcberner@FreeBSD.org USES=llvm.mk now supports 'export' (default) and 'noexport' arguments. When export is set, CC, CXX and CPP will be set to the path corresponding to the chosen llvm-version. 20230821: AUTHOR: jhale@FreeBSD.org A new uses 'ebur128' has been added to transparently depend on the proper variant of 'rust' or 'legacy' depending on the default version set by the user. Usage: USES=ebur128:ARGS Valid ARGS: , build, lib, run, test : (default) same as lib build: add BUILD_DEPENDS lib: add LIB_DEPENDS run: add RUN_DEPENDS test: add TEST_DEPENDS If you prefer not to use rust, add the following to your make.conf: DEFAULT_VERSIONS+=ebur128=legacy 20230728: AUTHOR: andrew@tao11.riddles.org.uk, fuz@FreeBSD.org A new uses 'guile' has been added to transparently depend on the proper variant of guile depending on the default version set by the user and the demands of the port. See Mk/Uses/guile.mk for in-depth documentation. 20230722: AUTHOR: tcberner@FreeBSD.org A new uses 'pycryptography' has been added to transparently depend on the proper variant of 'rust' or 'legacy' depending on the default version set by the user. Supported arguments: ,build,run Passing no arguments () is equivalent to passing both build and run. Usage: USES=pycryptography:build -> adds a BUILD_DEPENDS only USES=pycryptography:run -> adds a RUN_DEPENDS only USES=pycryptography:test -> adds a TEST_DEPENDS only USES=pycryptography:build,run or USES=pycryptography -> adds a BUILD_ and RUN_DEPENDS 20230712: AUTHOR: zirias@FreeBSD.org USE_GITLAB has been changed to allow fetching by tag name. This was done by removing the GL_COMMIT variable and introducing GL_TAGNAME instead. Similar to USE_GITHUB/GH_TAGNAME, you can still use a commit hash with GL_TAGNAME (the full 40-character hash is required for that). If not specified, GL_TAGNAME defaults to DISTVERSIONFULL. Note fetching by tag name might not work on gitlab installations running very old versions; in that case, you must still specify a commit hash. For now, GL_COMMIT is still recognized but deprecated, using it will issue a warning in developer mode. 20230712: AUTHOR: 0mp@FreeBSD.org Two new targets are now available: fetch-url-recursive-list and fetch-urlall-recursive-list. They are the recursive variants of the well-established targets fetch-url-list and fetch-urlall-list, which allow for listing the complete URLs of DISTFILES and PATCHFILES of a port. The recursive variants add the URLs of the port's dependencies to the output. 20230430: AUTHOR: zirias@FreeBSD.org USES=magick has been updated based on flavorized ports. A new argument 'x11' is available to specifically depend on the flavor with X11 support. Fallback to DEFAULT_VERSIONS now happens independently for the version (currently 6 or 7) and the flavor (currently x11 or nox11). Only use arguments for version or flavor if your port really requires it. Also, there is no need to add options for selecting the -nox11 flavor any more, as the user setting in DEFAULT_VERSIONS will be honored. 20230111: AUTHOR: vishwin@FreeBSD.org USE_PYTHON=pep517 has been added to facilitate building using the new format. USE_PYTHON=pep517 takes no arguments. Operation is similar to USE_PYTHON=distutils, although the build backend specified in pyproject.toml shall be specified in BUILD_DEPENDS. A usage guide and implementation primer is available at: https://wiki.freebsd.org/Python/PEP-517 20221217: AUTHOR: tcberner@FreeBSD.org USES=llvm has been added to more easily depend on llvm. USES=llvm supports two kinds of arguments: * mode : defaults to build build: add a BUILD_DEPENDS on chosen llvm-port run: add a RUN_DEPENDS on chosen llvm-port lib: add a LIB_DEPENDS on chosen llvm-port * version : defaults to ${LLVM_DEFAULT} number: use explicitly the specified version min=number: use specified min if ${LLVM_DEFAULT} is lower max=number: use specified max if ${LLVM_DEFAULT} is higher An example usage might be: USES= llvm or USES= llvm:13,build or USES= llvm:min=14,lib The following variables are exposed to be used in the ports tree at the moment: * LLVM_VERSION version chosen from the arguments to llvm.mk * LLVM_PORT chosen llvm port * LLVM_CONFIG llvm-config of the chosen port * LLVM_LIBLLVM libLLVM.so of the chosen port * LLVM_PREFIX installation prefix of the chosen port 20221026: AUTHOR: bapt@FreeBSD.org 3 new features are available now: PIE, RELRO, BIND_NOW, each port can specify the inability to support any via _UNSAFE All 3 are off by default, the intent is to activate following the freebsd base activation of the same features. End users can activate/deactivate globally via WITH_/WITHOUT_ 20221014: AUTHOR: adamw@FreeBSD.org USES=luajit has been added to support a unified luajit version. The default here is luajit-devel, which should be the right version for nearly everybody. luajit-openresty is a drop-in replacement for anything that luajit-devel works in, though not necessarily the other way around. If a program uses the openresty-specific API then you will need USES=luajit:luajit-openresty. The standard USES for most ports: USES=luajit For anything that requires the openresty API: USES=luajit:luajit-openresty 20220911: AUTHOR: zirias@FreeBSD.org kde.mk, qt.mk and pyqt.mk now use a colon for component suffixes Suffixes for build, run and test (for pyqt) dependencies used an underscore previously. This was not in line with most other USES, using a colon for that purpose. So if you previously had for example USE_QT= buildtools_build replace it with USE_QT= buildtools:build 20220907: AUTHOR: se@FreeBSD.org The convention of a WWW: line at the end of each port's pkg-descr file has been changed to a WWW= definition in the port's Makefile. All ports have been converted to follow this new scheme. The portlint and portfmt ports will be updated, but may erroneously flag the new convention as incorrect until the new versions have been installed. 20220826: AUTHOR: tcberner@FreeBSD.org A new Uses for 'vala' has been added. To depend on libvala, use USES=vala:lib to only add a build-time dependency, use USES=vala:build 20220821: AUTHOR: kde@FreeBSD.org qt.mk now supports both Qt 5 and Qt 6. To make use of Qt6 write: USES=qt:6 USE_QT=list of Qt6 components Please take a look at qt.mk to see the available components. 20220722: AUTHOR: portmgr@FreeBSD.org 'Created by' are being removed from the ports makefiles. Created by lines have historically been used to attribute contributions to the original creators of the ports. However, those might no longer be contributing to the port 20220430: AUTHOR: tcberner@FreeBSD.org A new USES has been added to handle dependency on gstreamer. Instead of writing USE_GSTREAMER1=[list of components] you now have to write USES=gstreamer USE_GSTREAMER=[list of components] If your port previously set just USE_GSTREAMER=yes this now is simply USES=gstreamer 20220415: AUTHOR: amdmi3@FreeBSD.org A new USES has been added to handle testing with pytest. USES= pytest Introduces dependency on pytest and adds do-test target which calls pytest with the right environment and arguments. Additionally, PYTEST_{IGNORED,BROKEN}_TESTS knobs are provided for skipping failing tests in a convenient and documented way. 20220218: AUTHOR: jrm@FreeBSD.org A new USES has been added to change an ELF binary's feature control note. USES= elfctl ELF_FEATURES= +noaslr,wxneeded:foo \ -noprotmax:foo \ +nostackgap:bar Turns on noaslr and wxneeded and turns off noprotmax for the ELF binary foo and turns on nostackgap for the ELF binary bar. The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC}. File modifications are made post-build as certain test targets may run on the build-tree binaries. 20220127: AUTHOR: kde@FreeBSD.org PyQt modules have been merged into devel/py-qt5-pyqt. This allows us to simplify PyQt framework and to be in adequacy with the packages that the author of these libraries proposes, namely: * PyQt - devel/py-qt5-pyqt * PyQt-Charts - x11-toolkits/py-qt5-chart * PyQt-NetworkAuth – net/py-qt5-networkauth * PyQt-WebEngine – www/py-qt5-webengine * SIP – devel/py-sip * py-sip - devel/py-qt5-sip * PyQt-builder - devel/py-qtbuilder * Qscintilla - devel/py-qt5-qscintilla2 Ports depending on PyQt, must be declared with USE_PYQT=pyqt5 instead of USE_PYQT=core gui svg etc. 20220117: AUTHOR: tobik@FreeBSD.org Standalone USE_GL, USE_GNOME, USE_MATE, USE_PHP, USE_SDL, USE_XORG have been deprecated for a while. For migration purposes the framework automatically loaded the corresponding USES={gl,gnome,mate,php,sdl,xorg} with a warning. The migration period is now over and you must add the USES manually for USE_* to have any effect. 20220111: AUTHOR: se@FreeBSD.org The CPU_AND, CPU_ANDNOT, CPU_OR, and CPU_XOR macros in 14-CURRENT and 13-STABLE after this date have been made compatible with GLIBC conventions. Specifically, they now take 3 arguments instead of 2. Ports can check whether the CPU_ALLOC macro is defined and then use the 3 parameter form, e.g.: #ifdef CPU_ALLOC CPU_AND(dst, dst, src); #else CPU_AND(dst, src); #endif 20211211: AUTHOR: tcberner@FreeBSD.org A new USES has been added to depend on ImageMagick. USES=magick adds a LIB_DEPENDS on graphics/ImageMagick${IMAGEMAGICK_DEFAULT}. If a specific version is required, use for example USES=magick:6 resp. USES=magick:7 If only a build, run or test is required, use for example USES=magick:build resp. USES=magick:6,build,test If a dependency on the nox11 flavor is required, use for example USES=magick:nox11 resp. USES=magick:7,nox11,run,test See magick.mk for more details on the available flags. 20211122: AUTHOR: bapt@FreeBSD.org The default compression for INDEX file as fetch via make fetchindex has switched from .bz2 to .xz (.zst is also available). The .bz2 format is still available but is considered deprecated and may be removed in the future. 20211010: AUTHOR: bapt@FreeBSD.org INSTALLS_ICONS has been replace by a trigger on gtk-update-icon-cache. the macro does nothing anymore. 20211010: AUTHOR: bapt@FreeBSD.org A new USES has been added, to simplify the integration of triggers in the ports tree. 20210801: AUTHOR: delphij@FreeBSD.org WANT_OPENLDAP_SASL is removed now that OpenLDAP is always built with SASL support. 20210730: AUTHOR: tcberner@FreeBSD.org A new USES has been added to depend on the mlt multimedia framework. Ports that depend on mlt should now use USES=mlt: to specify their dependency. At the moment the supported version is 6, but will be extended to also allow for selection of mlt 7 shortly. 20210604: AUTHOR: mat@FreeBSD.org The prepare-commit-msg hook was enhanced to auto-fill the first line of the commit with the category/port in case only one port was committed to. 20210525: AUTHOR: amdmi3@FreeBSD.org PYTHON_REL has been switched from a 4 digits number to a 5 digits number to handle python 3.10.0. Ports checking for python 3.7.10 should compare PYTHON_REL against 30710 and ports checking for python 3.10.0 should compare PYTHON_REL against 31000. 20210420: AUTHOR: mat@FreeBSD.org A prepare-commit-msg hook was added to the repository. This hooks prepares the commit message template for specific ports tree usage. To make use of it, the easiest way is to run: git config --add core.hooksPath .hooks 20201120: AUTHOR: gnome@FreeBSD.org New default version for librsvg2. Current versions of graphics/librsvg2 are using parts written in rust. For architectures that do not have support for rust, and for people who prefer not to have, or are not able to compile rust software due to hardware limitations, the version can be chosen via this new flag. The default on almost all architectures is rust. If you prefer no to use rust, add the following to your make.conf: DEFAULT_VERSIONS+=librsvg2=legacy 20210327: AUTHOR: bapt@FreeBSD.org New @touch keyword Its purpose is to ensure that a file is being created at install time while not necessary tracked by the package. 20201120: AUTHOR: pauamma@gundo.com New virtual category: education. This category comprises ports that are mainly educational in nature or purpose, such as: * course-writing or course-delivery applications, * classroom or school management applications (eg, scheduling classes), * applications, utilities, or games primarily or substantially designed to help the user learn a specific topic or study in general, like typing tutors, flashcard applications, or educational games. 20201110: AUTHOR: bapt@FreeBSD.org Patents are a complicated topic, and their regulation varies depending on jurisdiction. Patents are not necessarily related to the license and so should not be connected to the license framework. Patent limitations within the ports tree have been removed and left to the user or consumer to deal with their local legislation to determine if they can use the software without legal restrictions. 20201022: AUTHOR: bapt@FreeBSD.org New @rmempty keyword Its purpose is to delete empty files at deinstallation time. It is meant to be used for generated files/untracked by the package manager files. It respects rootdir 20201022: AUTHOR: bapt@FreeBSD.org @shell has been rewritten in lua It provides the exact same feature set as the previous version but it is now sandboxed and rootdir compliant (see the pkg -r option). 20201001: AUTHOR: manu@FreeBSD.org The @sample keyword was rewritten in lua. It behaves exactly like the previous one but it is sandboxed and is rootdir compliant (see pkg -r option). 20201001: AUTHOR: bapt@FreeBSD.org packages scripts and keywords can both be written in lua (version 5.3), see pkg-lua-script(5) for the API. Note that all scripts written in lua will: - run inside a capsicum sandbox, - be rootdir compatible (see pkg -r option) - be cross installation compatible example: installing packages in an arm64 rootdir on and amd64 host. 20200531: AUTHOR: kde@FreeBSD.org pyqt.mk gained support for test-only dependencies. If a component, say py-qt5-gui is only required for testing, you can add USE_PYQT= gui_test 20200514: AUTHOR: mat@FreeBSD.org Add PATCH_CONTINUE_ON_FAIL to allow patching to go through all the patches even if one fail. This helps when upgrading ports with a large number of patches, like www/chromium where having to fix one patch, re-do the patching, fix the fallout, 800 times, is really painful. 20200414: AUTHOR: bapt@FreeBSD.org package scripts can now be done in lua, the following are supported: - pkg-pre-install.lua - pkg-post-install.lua - pkg-pre-deinstall.lua - pkg-post-deinstall.lua see pkg-lua-script(5) for more details. 20200414: AUTHOR: mat@FreeBSD.org USES=lua gained flavors. Ports using USES=lua:module or lua:flavors will be flavored. A range of supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ) for ports not supporting all lua versions. USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of flavored lua ports, in a similar way as PHP or Python flavors. 20200115: AUTHOR: bapt@FreeBSD.org ${PREFIX}/share/man is now a valid location for manpages ${PREFIX}/man being considered as deprecated. 20191009: AUTHOR: bapt@FreeBSD.org The ipv6 virtual category is gone, it does not make sense anymore in 2019 where the norm in applications is to have support both ipv4 and ipv6. 20191001: AUTHOR: bapt@FreeBSD.org BINARY_WRAPPERS allow to push in front of the PATH wrappers for binaries. This is useful when 2 tools do provide the same feature, but the configure scripts do test for some variables which are not in one of the tool. 20190919: AUTHOR: madpilot@FreeBSD.org USES=xfce now defaults to gtk3, so for ported applications requiring GTK2 XFCE support USES=xfce:gtk2 should be used. 20190903: AUTHOR: bapt@FreeBSD.org The ports tree now supports overlays overlays are a way to help users to integrate their own ports tree with the official ports tree without having to maintain clone of the official tree and remerge on regular basis. The ports tree will lookup in the overlays (in the order the are listed in OVERLAY variable) for the dependencies and the USES. It will use the first found. in order to use it the user have to declare his overlays that way in their make.conf: OVERLAYS= overlay1 overlay2 overlay3 20181225: AUTHOR: kde@FreeBSD.org cmake.mk now defaults to out-of-sourcetree builds. The option 'outsource' has been removed. Ports that need an intree build now can pass 'insource'. 20181110: AUTHOR: bapt@FreeBSD.org texinfo files are now installed in ${PREFIX}/share/info 20180630: AUTHOR: kde@FreeBSD.org bsd.qt.mk has been replaced by qt.mk. This changes the way ports have to depend on Qt slightly. Previously one would have written USE_QT4=foo bar or USE_QT5=foo bar while now one has to write USES=qt:4 USE_QT=foo bar respectively USES=qt:5 USE_QT=foo bar Further qmake.mk no longer respects QT_NONSTANDARD. Ports that don't want to get the configure environment provided by qmake.mk should add the argument no_env, ports that don't want the configure target should specify no_configure. 20180506: AUTHOR: brnrd@FreeBSD.org All USE_ and WANT_ variables for PHP have been removed and marked UNSUPPORTED. Use USES= php: as a replacement. USE_PHPIZE, USE_PHPEXT, USE_ZENDEXT, USE_PHP_BUILD, WANT_PHP_CLI, WANT_PHP_CGI, WANT_PHP_MOD, WANT_PHP_WEB, WANT_PHP_EMB 20180311: AUTHOR: brnrd@FreeBSD.org USE_APACHE has been replaced by USES=apache. 20180308: AUTHOR: mat@FreeBSD.org Ports using USES=php:phpize, php:ext, php:zend, and php:pecl are now flavored. They will automatically get flavors (php56, php70, php71, php72) depending of the versions they support (set with IGNORE_WITH_PHP). As a consequence, ports using USES=pear and USES=horde are also flavored. As all packages must have different package names, the following variables must be used in PKGNAMEPREFIX/SUFFIX: Variable + Values + -------------------------------------------------------------------------------------- PHP_PKGNAMEPREFIX | php56- php72- | PHP Extensions | | and modules -------------------------------------------------------------------------------------- PHP_PKGNAMESUFFIX | -php56 -php72 | PHP Applications -------------------------------------------------------------------------------------- PECL_PKGNAMEPREFIX | php56-pecl- | PECL extensions | | automatic -------------------------------------------------------------------------------------- PEAR_PKGNAMEPREFIX | php56-pear- | PEAR modules | | without PEAR_CHANNEL PEAR__PKGNAMEPREFIX | php56-pear-channel- | with PEAR_CHANNEL | | automatic In all the ports with PHP dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PHP_FLAVOR}' after the origin. For example: RUN_DEPENDS= ${PEAR_PKGNAMEPREFIX}Validate>=0.5.0:devel/pear-Validate@${PHP_FLAVOR} \ ${PECL_PKGNAMEPREFIX}smbclient>=0.8.0:net/pecl-smbclient@${PHP_FLAVOR} \ PHP applications (for example, www/wordpress) can also get flavors, add the flavors keyword to USES=php, for example: USES=php:flavors, and add ${PHP_PKGNAMESUFFIX} to its PKGNAMESUFFIX. 20180125: AUTHOR: mat@FreeBSD.org Add support to passing directories to EXTRA_PATCHES. Instead of: EXTRA_PATCHES= ${PATCHDIR}/feat-foo-patch-file.c \ ${PATCHDIR}/feat-foo-patch-file.h \ ${PATCHDIR}/feat-foo-patch-file2.c Move those files to ${PATCHDIR}/feat-foo/, name them patch-*, and set: EXTRA_PATCHES= ${PATCHDIR}/feat-foo 20180116: AUTHOR: mat@FreeBSD.org The deprecated PYTHON_DEFAULT_VERSION, PYTHON2_DEFAULT_VERSION, and PYTHON3_DEFAULT_VERSION have been removed. 20180106: AUTHOR: kde@FreeBSD.org USES=qmake now accepts a new variable, QMAKE_CONFIGURE_ARGS. Starting with Qt 5.8.0, qmake can use configure.json files to help define configuration options and configuration time checks. These options are generally in the form '-foo -no-bar', and must be passed after "--" at the end of qmake's command line. The QMAKE_CONFIGURE_ARGS variable allows one to set those options, and USES=qmake takes care of passing them at the right position when invoking qmake. 20180102: AUTHOR: kde@FreeBSD.org There is a new USES=eigen to depend on math/eigen[23]. Usage: USES=eigen:[,] version: 2 or 3 (required) type: build (default), run For example: USES=eigen:2,build,run will add a BUILD- and RUN_DEPENDS on math/eigen2, and USES=eigen:3 will add a BUILD_DEPENDS on math/eigen3. 20171231: AUTHOR: kde@FreeBSD.org USES=cmake now supports two additional list variables: * CMAKE_ON : List of variables to turn on * CMAKE_OFF : List of variables to turn off This can be used as a shortcut to append these to CMAKE_ARGS. For example ports that previously set CMAKE_ARGS= -DVAR1:BOOL=TRUE -DVAR2:BOOL=TRUE -DVAR3:BOOL=FALSE can now set this as CMAKE_ON= VAR1 VAR2 CMAKE_OFF= VAR3 20171130: AUTHOR: mat@FreeBSD.org Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if the port is using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored, for example, deskutils/calibre. By default it will only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT. Define BUILD_ALL_PYTHON_FLAVORS in your make.conf to generate all possible flavors. A port can set USE_PYTHON=allflavors to have all the flavors and not simply the default ones. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin. For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} 20171130: AUTHOR: mat@FreeBSD.org To help with flavored ports, helpers are available. In these, replace <*> with the flavor name. *_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variable. *_CONFLICTS *_CONFLICTS_BUILD *_CONFLICTS_INSTALL *_PKG_DEPENDS *_EXTRACT_DEPENDS *_PATCH_DEPENDS *_FETCH_DEPENDS *_BUILD_DEPENDS *_LIB_DEPENDS *_RUN_DEPENDS *_TEST_DEPENDS will append to the variable. For example: flavor2_PKGNAMESUFFIX= -foo can replace: .if ${FLAVOR:U} == flavor2 PKGNAMESUFFIX= -foo .endif 20171130: AUTHOR: mat@FreeBSD.org Flavors are a way to have multiple variations of a port. The port is built multiple times, with the variations. To declare flavors, set the FLAVORS variable to the flavors you want defined. The first flavor will be the default: FLAVORS= flavor1 flavor2 The flavors MUST be lowercase, and can contain [[:lower:][:digit:]_]. Then, when building the port, pass the FLAVOR as an argument after make to select the flavor. $ make install FLAVOR=flavor2 In the port, you can then change the behavior depending on the value of the FLAVOR variable. Note that the different flavors MUST have different PKGNAMEs. Be sure to guard against an empty FLAVOR variable by using ${FLAVOR:U}: .if ${FLAVOR:U} == flavor2 PKGNAMESUFFIX= -foo OPTIONS_DEFAULT+= FOO .endif A tools guide is available at: https://wiki.freebsd.org/Ports/FlavorsTools A port migration guide is available at: https://wiki.freebsd.org/Ports/FlavorsMigration 20171020: AUTHOR: ak@FreeBSD.org The USES=fmake has been removed. It was created to help migration from old FreeBSD make (pmake) and there are no more users of it left in the ports tree. 20171012: AUTHOR: mat@FreeBSD.org Remove WANT_GNOME and HAVE_GNOME, they were in disuse, and made useless by options. 20171011: AUTHOR: bapt@FreeBSD.org New BINARY_ALIAS variable has been added, when defined it will create symlinks of some given binaries in a directory which will be prepended to the PATH. The syntax is the following: BINARY_ALIAS= target1=source1 target2=source2 For example to have a "swig" binary in the path which will be pointing at swig3.0 and a "sed" pointing at GNU sed: gsed BINARY_ALIAS= swig=swig3.0 sed=gsed 20170625: AUTHOR: kde@FreeBSD.org The default generator for USES=cmake ports has been switched to ninja. Previously it was possible to opt-in to using ninja instead of make(1) by setting CMAKE_NINJA, now ports need to opt-out. Ports that do not build with ninja must switch from USES=cmake: to USES=cmake:,noninja 20170417: AUTHOR: kwm@FreeBSD.org New USES: meson, to handle properly the meson building system. 20170313: AUTHOR: tijl@FreeBSD.org HTTPS certificates are now verified when "make makesum" fetches distfiles. If this fails make sure you have a CA certificate bundle installed such as security/ca_root_nss. If it still fails and there are other HTTPS sites with a valid certificate consider removing the site from MASTER_SITES. If the site cannot be removed you can disable certificate verification by adding the following line to the port Makefile: FETCH_ENV= SSL_NO_VERIFY_PEER=1 SSL_NO_VERIFY_HOSTNAME=1 20170218: AUTHOR: kde@FreeBSD.org * Qt 4's binaries have been moved to lib/qt4/bin to match what is already done to Qt 5's binaries. Since these binaries are no longer in ${LOCALBASE}/bin, they also do not have the -qt4 suffix in their names any more. * Consequently, there are no Qt 4 or Qt 5 binaries in the default $PATH, and misc/qtchooser is now used to select the actual Qt binaries. In other words, calling "qmake" or "moc" now goes through qtchooser, which prefers Qt 5 binaries by default. The ports framework handles this automatically. The UPDATING entry covers this in more detail. * Qt 5.7.1 requires a C++11-capable compiler to be used. qmake and CMake pass the appropriate flags to the compiler (such as -std=c++11) automatically, but if your port fetches Qt's build flags via pkg-config (which can be the case for autotools-based ports), you might need to take care of this manually by setting USE_CXXSTD in your Makefile: USE_CXXSTD= c++11 20160116: AUTHOR: mat@FreeBSD.org A new EXTRA_PATCH_TREE has been added. Points to a directory hierarchy with the same layout as the ports tree, where local patches can be found. This allows a third party to keep their patches in some other source control system if needed. For example, if you have EXTRA_PATCH_TREE=/patches, when building lang/perl5.24, any file named patch-* in /patches/lang/perl5.24/ will be used to patch the Perl distribution. 20160116: AUTHOR: mat@FreeBSD.org During extraction of the do-patch target into a separate script, the "-d PATCH_WRKSRC" had to be removed from the PATCH_ARGS and PATCH_DIST_ARGS variables. If using these variables directly, you will need to adapt the Makefile. For example: ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/extra-patch needs to be changed to: ${PATCH} -d ${PATCH_WRKSRC} ${PATCH_ARGS} < ${FILESDIR}/extra-patch 20161218: AUTHOR: tcberner@FreeBSD.org QT_PREFIX has been dropped, in favour of using PREFIX directly. 20160911: AUTHOR: amdmi3@FreeBSD.org Support has been added for complete set of Creative Commons licenses CC-(BY|BY-ND|BY-NC|BY-NC-ND|BY-NC-SA|BY-SA)-(1.0|2.0|2.5|3.0|4.0) 20160909: AUTHOR: amdmi3@FreeBSD.org Verbose build logs are now preferred and enabled by default for cmake, ninja and GNU configure. Ports which still produce quiet build logs (hiding actual commands) are strongly advised to switch to verbose logs. 20160908: AUTHOR: amdmi3@FreeBSD.org Support has been added for NONE license, use it when the port doesn't have cleanly defined licensing terms. Note that without clean license allowing you to use and distribute the code it would be be illegal to do so in many jurisdictions, so for ports with NONE license no distfiles or packages are distributed. 20160824: AUTHOR: mat@FreeBSD.org To complete the USE_GITHUB framework, a GH_SUBDIR variable has been added. It automatically moves a secondary distfile to the right place inside WRKSRC. It also extends the GH_TUPLE variable to make it as easy to use as possible. Before: GH_TUPLE= Regaddi:Chart.js:f13f99b:chart_js \ FVANCOP:ChartNew.js:77e7f87:chartnew_js post-extract: @${RMDIR} ${WRKSRC}/database ${WRKSRC}/3rd/Chart.js @${MV} ${WRKSRC_database} ${WRKSRC}/database @${MV} ${WRKSRC_chart_js} ${WRKSRC}/3rd/Chart.js After: GH_TUPLE= Regaddi:Chart.js:f13f99b:chart_js/3rd/Chart.js \ FVANCOP:ChartNew.js:77e7f87:chartnew_js/3rd/ChartNew.js It also works if not using GH_TUPLE but the regular GH_ACCOUNT/PROJECT/TAGNAME variables: GH_SUBDIR= 3rd/Chart.js:chart_js 3rd/ChartNew.js:chartnew_js 20160824: AUTHOR: kde@FreeBSD.org A new USES file has been introduced: USES=kde:4, which replaces the old bsd.kde4.mk file in preparation for upcoming KDE Frameworks and Plasma5 ports. Ports depending on KDE4 have to switch from USE_KDE4=foo bar to USES=kde:4 USE_KDE=foo bar and make sure to switch from using KDE4_PREFIX to the new name KDE_PREFIX in the Makefiles as well as plists. 20160821: AUTHOR: kde@FreeBSD.org A new USES file has been introduced: USES=grantlee:[4,5], which introduces a LIB_DEPENDS on either devel/grantlee (Qt4) or devel/grantlee5 (Qt5). Uses/grantlee.mk also exports the GRANTLEE_VERSION variable to users, and the GRANTLEE_VERSION_FULL and GRANTLEE_VERSION_SHORT pkg-plist substitutions. 20160817: AUTHOR: mat@FreeBSD.org This adds the possibility to use regular expressions for the makeplist stage of the PLIST_SUB life. From time to time, the values are too generic, and they get in the way of other stuff. This adds the possibility to have a VAR_regex=regex that will be used instead of the VAR=string to search for possible replacements. For example, in lang/perl5*, there is PERL_ARCH=mach, which will get replaced in paths if a file is called, say "machine", will end up being "%%PERL_ARCH%%ine". Adding PERL_ARCH_regex="\bmach\b" will ensure only full words are replaced, so machine will stay machine, but "lib/mach/foo "will still be replaced by "lib/%%PERL_ARCH%%/foo". 20160803: AUTHOR: mat@FreeBSD.org Every PHP (or Zend) extension now installs its own .ini file in /usr/local/etc/php. A PHP extension will be automatically activated when installed. The order into which extensions are loaded is automatically guessed. In some very rare cases, the guess will be wrong, and PHP_MOD_PRIO will need to be set. Refer to the USES=php section of the Porter's Handbook for more information. 20160628: AUTHOR: mat@FreeBSD.org USEify USES=php. The following variables have been folded into arguments: - USE_PHPIZE -> USES=php:phpize - USE_PHPEXT -> USES=php:ext - USE_ZENDEXT -> USES=php:zend - USE_PHP_BUILD -> USES=php:build - WANT_PHP_CLI -> USES=php:cli - WANT_PHP_CGI -> USES=php:cgi - WANT_PHP_MOD -> USES=php:mod - WANT_PHP_WEB -> USES=php:web - WANT_PHP_EMB -> USES=php:embed 20160627: AUTHOR: mat@FreeBSD.org USE_OPENSSL has been replaced by USES=ssl. 20160625: AUTHOR: adamw@FreeBSD.org A new ${opt}_CMAKE_BOOL OPTIONS helper has been added. Instead of: FOO_CMAKE_ON= -DWITH_FOO:BOOL=YES -DWITH_BAR:BOOL=YES FOO_CMAKE_OFF= -DWITH_FOO:BOOL=NO -DWITH_BAR:BOOL=NO you can use this shortcut: SOMEOPT_CMAKE_BOOL= WITH_FOO WITH_BAR 20160525: AUTHOR: mat@FreeBSD.org A new stage-qa test has been added, it reports all shared libraries dependencies that are not part of the port list of dependencies. It help finds what is called proxy dependencies. A is needed by B, and B is needed by C. If C also needs A, then it needs to be registered, and this check will tell you to do so. Right now, it is only reporting the problems, but if you add PROXYDEPS_FATAL=yes to your environment, it will give an error and will force you to fix the dependencies. 20160525: AUTHOR: bapt@FreeBSD.org New keyword @xmlcatmgr has been added, to handle the XML and SGML catalog maintainance, in order to improve consistency and correctness of the generation of the catalog. If the catalog file has an extension being '.xml' it will be automatically added to the XML catalog, otherwise it will be added to the SGML catalog 20160512: AUTHOR: emaste@FreeBSD.org "make makesum" now writes the current timestamp to distinfo when it is run. This is done to support development and prototyping efforts for reproducible package builds, which require some concept of a "last updated" time. The TIMESTAMP can currently be ignored for ports that have no distinfo, and for updates done without using "make makesum." 20160428 AUTHOR: mat@FreeBSD.org USE_RUBYGEMS has been replaced by USES=gem. 20160426: AUTHOR: mat@FreeBSD.org USE_MYSQL and USE_BDB have been replaced by USES=mysql and USES=bdb. WANT_BDB_VER=XX should be replaced by USES=bdb:XX. 20160414: AUTHOR: mat@FreeBSD.org USE_RC_SUBR=yes has not done anything for a long time, it will now give an error. 20160413: AUTHOR: jbeich@FreeBSD.org Introducing CONFIGURE_OUTSOURCE. It changes HAS_CONFIGURE and GNU_CONFIGURE by invoking configure, build and install stage outside of source tree e.g., $ mkdir ../.build $ cd ../.build $ ${OLDPWD}/configure $ gmake $ gmake install 20160402: AUTHOR: bapt@FreeBSD.org Adding ${PORTSDIR} in dependency lines is no longer necessary meaning RUN_DEPENDS= foo:${PORTSDIR}/bar/foo can now be written RUN_DEPENDS= foo:bar/foo if the path after ':' is not absolute the framework will automatically prepend ${PORTSDIR}/ 20160301: AUTHOR: mat@FreeBSD.org Introduce GH_TUPLE. GH_TUPLE allows one to put all the GH_{ACCOUNT,PROJECT,TAGNAME} into one variable, in the form of account:project:tagname[:group]. It is helpful when there are many submodules. 20160207: AUTHOR: kwm@FreeBSD.org The GNOME and MATE framework activation changed. To use the frameworks now either gnome or mate needs to be added USES. The usage of USE_GNOME, USE_MATE, INSTALLS_ICONS and for example GLIB_SCHEMAS stays the same. Like with USES, the use of USE_GNOME and so after bsd.port.pre.mk is now forbidden. 20160112: AUTHOR: amdmi3@FreeBSD.org Support has been added for "or later" variants of GNU licenses (e.g. LICENSE=GPLv2+) and for Public Domain (LICENSE=PD). Complete list of new LICENSE values: AGPLv3+ GPLv1+ GPLv2+ GPLv3+ GPLv3RLE+ LGPL20+ LGPL21+ LGPL3+ PD 20160110: AUTHOR: bapt@FreeBSD.org USE_FIREBIRD and USE_SQLITE has been replaced by USES=firebird and USES=sqlite 20151105: AUTHOR: mat@FreeBSD.org Change the meaning of NO_WRKSUBDIR to force a WRKDIR != WRKSRC. Right now, NO_WRKSUBDIR means that the extraction does not produce a subdirectory, and that everything goes straight into WRKDIR. It is problematic, because during the build of a port, quite a few files are created in there, and then, a stage directory, where everything is installed, and then a pkg directory where the package is created, and those often conflict, or get in the way, of the building process. With this, NO_WRKSUBDIR will extract the distfiles directly into WRKSRC instead of WRKDIR. In this case, WRKSRC is artificial and is based on PKGNAME and not DISTNAME, mitigate conflicts with rc files. 20151022: AUTHOR: amdmi3@FreeBSD.org Improved support for USES=shebangfix - We now support multiple values for *_OLD_CMD - We replace more variants by default (/bin/${lang}, /usr/bin/${lang}, /usr/bin/env ${lang}). - shebangfix now also supports lua if USES=lua is specified - Pattern matching has been improved: we now only match whole worlds, e.g. "/usr/bin/perl5.005" is no longer erroneously replaced with "${perl_CMD}5.005". Note that *_OLD_CMD entries which contain spaces must now be quoted. 20150928: AUTHOR: amdmi3@FreeBSD.org Implemented complete support for test target. You can now `make test' on any port to run test sequence, no-op by default. If a port defines TEST_TARGET, it'll run sub-make with specified target, usually `check' or `test', useful if upstream supports that. The port may instead define custom do-test target, as well as usual satellite targets: {pre,do,post}-test, {pre,do,post}-test-OPT, {pre,do,post}-test-OPT-off `make test' builds and stages port first, so test may use both WRKDIR and STAGEDIR, and both BUILD and RUN depends are available for test target. Additionally, TEST_DEPENDS is now properly supported and may be used to define additional depends specifically for testing. Framework may define default tests for specific cases. For instance, perl5.mk and cran.mk provide default test target on their own. 20150926: AUTHOR: bapt@FreeBSD.org @sample now accept arguments, so it can now be used the following way: @sample afile.sample or @sample path/to/example etc/target 20150926: AUTHOR: bapt@FreeBSD.org New keywords are supported in pkg since 1.5.x: @preexec : execute the during pre-install scripts @postexec : execute the during post-install scripts @preunexec : execute the during pre-deinstall scripts @postunexec : execute the during post-deinstall scripts @exec does not specify when it should be executed and is now considered as deprecated. 20150914: AUTHOR: mat@FreeBSD.org Introducing the %%PERL5_MAN1%% PLIST_SUB entry, as Perl now installs man1 pages in the same prefix as man3 pages. 20150828: AUTHOR: mat@FreeBSD.org _VARS and _VARS_OFF have been introduced to allow for a generic way to set/append to variables. OPT1_VARS= foo=bar baz+=bam will set FOO to bar and append bam to BAZ if OPT1 is enabled. _VARS_OFF works the same way, if the option is disabled. 20150818: AUTHOR: kde@FreeBSD.org The CMAKE_ENV option has been deprecated. It no longer has any effect, and the CONFIGURE_ENV variable should be used instead. 20150818: AUTHOR: mat@FreeBSD.org _IMPLIES and _PREVENTS have been introduced to register dependency, or conflicts between options. OPTIONS_DEFINE= FOO BAR BAZ FOO_IMPLIES= BAR BAZ_PREVENTS= BAR If the FOO option is selected, the BAR option will be enabled as well. If the BAZ and BAR options are both enabled, an error will be given. 20150817: AUTHOR: mat@FreeBSD.org UNIQUENAME and LATEST_LINK have been removed. LATEST_LINK was only used by ports-mgmt/pkg{,-devel} and PKGBASE can be used in its stead. UNIQUENAME was used by USE_LDCONFIG where it was not unique enough, and as old compat shims with options. 20150716: AUTHOR: kwm@FreeBSD.org USE_GHOSTSCRIPT was replaced by USES=ghostscript. The ghostscript USES accepts version, build, run, nox11 and for version 9 the agpl argument. If no version is specified, the default 9 for GHOSTSCRIPT_DEFAULT is honored. 20150701: AUTHOR: mat@FreeBSD.org Make option target helpers have been added, it allows replacing: .include post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh .if ${PORT_OPTIONS:MPTHREAD} ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|-lpthread|g;' \ ${WRKSRC}/hints/freebsd.sh .else ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%||g;' \ ${WRKSRC}/hints/freebsd.sh .endif with: post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh post-patch-PTHREAD-on: ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|-lpthread|g;' \ ${WRKSRC}/hints/freebsd.sh post-patch-PTHREAD-off: ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%||g;' \ ${WRKSRC}/hints/freebsd.sh 20150622: AUTHOR: bapt@FreeBSD.org Remove USE_RCORDER, USE_RC_SUBR has been modified to support PREFIX=/usr automatically 20150529: AUTHOR: mat@FreeBSD.org Extend the multiple distfiles USE_GITHUB framework by allowing it to fetch only additional distfiles, but not the main one. Set USE_GITHUB=nodefault and use the GH_* variables with groups as usual. 20150528: AUTHOR: mat@FreeBSD.org USE_GITHUB can now fetch multiple distfiles. It uses a grouping feature similar to MASTER_SITES/PATCH_SITES. Some helpful variables are provided: WRKSRC_ for putting things in the right place in post-extract, and DISTNAME_/DISTFILE_ for use with EXTRACT_ONLY. A simple example: PORTNAME= bar PORTVERSION= 1.0 USE_GITHUB= yes GH_ACCOUNT= foo GH_PROJECT= ${PORTNAME}-images:images post-extract: @${MV} ${WRKSRC_images} ${WRKSRC}/images It will fetch those two distfiles: $ make fetch-urlall-list https://codeload.github.com/foo/bar/tar.gz/1.0?dummy=/foo-bar-1.0_GH0.tar.gz https://codeload.github.com/foo/bar-images/tar.gz/1.0?dummy=/foo-bar-images-1.0-1.0.tar.gz It will then extract them to ${WRKDIR} in their respectives directories. 20150526: AUTHOR: antoine@FreeBSD.org PYTHON_REL has been switched from a 3 digits number to a 4 digits number to handle python 2.7.10. Ports checking for python 2.7.9 should compare PYTHON_REL against 2709 and ports checking for python 2.7.10 should compare PYTHON_REL against 2710. 20150521: AUTHOR: mat@FreeBSD.org GH_COMMIT support has been removed, see the 20150319 for more informations. 20150419: AUTHOR: tijl@FreeBSD.org USE_AUTOTOOLS has been deprecated. It can be replaced with USES=autoreconf and GNU_CONFIGURE=yes. Support for USE_AUTOTOOLS=libtoolize has been removed. It can be replaced with "USES=autoreconf libtool". 20150409: AUTHOR: bapt@FreeBSD.org Add a new USES=gnustep to handle the GNUstep ports. Now the dependencies on GNUstep libraries is done via the regular LIB_DEPENDS USE_GNUSTEP is now a macro that accept many arguments: back, build, gui, back Depending on the feature needed for a given port Reuse USES=objc to avoid duplicating code 20150408: AUTHOR: bapt@FreeBSD.org Add a new USES=waf to handle the waf building system, allowing to factorise code. Plug waf into MAKE_CMD and CONFIGURE_CMD so the regular defined targets can be reused. Always define _MAKE_JOBS so that when bsd.port.mk will stop overwritting _MAKE_JOBS when parallel jobs are disabled we can enforce -j1 (which is needed to really disable parallelisation with waf WAF_CMD has been created to allow one to override the location of the waf script relatively to WRKSRC CONFIGURE_TARGET is by default defined to "configure" ALL_TARGET is by default defined to "build" INSTALL_TARGET is by default defined to "install" USES=waf is by default stagedir safe 20150407: AUTHOR: bapt@FreeBSD.org USE_XZ and USE_BZIP2 are not supported anymore, they have been replaced by USES=tar:bzip2 and tar:xz 20150328: AUTHOR: bapt@FreeBSD.org New "metaport" USES to take care of predefining correctly the needed macros as expected by meta ports. 20150323: AUTHOR: bapt@FreeBSD.org Remove "@fc" and "@fontsdir". All fonts should always use @fcfontsdir which Properly takes care of the fonts.dir and fonts.scale cache files as well as ensure to properly update the fontconfig cache New "fonts" USES. It defines the default variables needed for fonts and also takes care of the run time dependencies 20150326: AUTHOR: bdrewery@FreeBSD.org PTHREAD_CFLAGS and PTHREAD_LIBS have been removed. Please see entry 20130207 for more information. 20150319: AUTHOR: bdrewery@FreeBSD.org MASTER_SITE GHR (GITHUB_RELEASE) has been removed. The same functionality can be achieved with just USE_GITHUB/GH_ACCOUNT/GH_PROJECT. GH_TAGNAME defaults to DISTVERSION. If the tag needs to be adjusted then change GH_TAGNAME. No GH_COMMIT is needed. 20150319: AUTHOR: bdrewery@FreeBSD.org USE_GITHUB has been updated to make GH_COMMIT optional. Using this new scheme allows only setting the _tag_ or _commit hash_ in GH_TAGNAME and not having to know the hash for a tag. This scheme will download a tarball that has a different checksum than before due to a changed directory name for extraction. GH_TAGNAME can now be any length of the hash as long as it is unique. There is no longer a 7-character requirement. The following MASTER_SITES are provided to retain the old checksum and directory structure (that require GH_COMMIT): GH -> GHL GITHUB -> GITHUB_LEGACY 20150305: AUTHOR: olivierd@FreeBSD.org Dependencies on the Xfce ports have been migrated to USES. Instead of USE_XFCE= configenv, you should use USES= xfce. 20150224: AUTHOR: makc@FreeBSD.org New USE_QT4 component has been introduced to reduce buildtime dependencies for Qt 4 ports that use localization support. Instead of USE_QT4=linguist you should now use USE_QT4=linguisttools_build. Conversion of existing ports may require USE_QT4 adjustment for missing components. 20141217: AFFECTS: users of lang/perl5.* AUTHOR: mat@FreeBSD.org Perl now links libperl.so with all .so it builds. The stage-qa checks have been extended to check that libperl.so is in fact linked with .so in SITE_ARCH and errors out if none of the .so build by a port are linked with it. It also checks that the rpath and runpath elf attributes are present. 20141130: AUTHOR: tijl@FreeBSD.org The devel/gettext port has been split up in devel/gettext-runtime which contains runtime libraries such as libintl, and devel/gettext-tools which contains build tools such as msgfmt. You can use USES=gettext-runtime to set a LIB/BUILD/RUN_DEPENDS on devel/gettext-runtime and USES=gettext-tools to set a BUILD/RUN_DEPENDS on devel/gettext-tools. USES=gettext is now the same as "USES=gettext-runtime gettext-tools", meaning a LIB_DEPENDS on devel/gettext-runtime and a BUILD_DEPENDS on devel/gettext-tools. 20141126: AUTHOR: mat@FreeBSD.org The way Perl modules are installed has changed. Before, we had site_perl : lib/perl5/site_perl/5.18 site_perl/perl_arch : lib/perl5/site_perl/5.18/mach perl_man3 : lib/perl5/5.18/man/man3 Now we have : site_perl : lib/perl5/site_perl site_arch : lib/perl5/site_perl/mach/5.18 perl_man3 : lib/perl5/site_perl/man/man3 Modules without any .so will be installed at the same place regardless of the Perl version, minimizing the upgrade when the major Perl version is changed. It uses a version dependent directory for modules with compiled bits. As PERL_ARCH is no longer needed in plists, it has been removed from PLIST_SUB. The USE_PERL5=fixpacklist keyword is removed, the .packlist file is now always removed, as is perllocal.pod. The old site_perl and site_perl/arch directories have been kept in the default Perl @INC for all Perl ports, and will be phased out as these old Perl versions expire. 20141122: AUTHOR: crees@FreeBSD.org Dependencies on the PostgreSQL ports have been migrated to USES. Instead of USE_PGSQL, please use USES=pgsql instead. USE_PGSQL=yes becomes USES=pgsql WANT_PGSQL_VER=91+ becomes USES=pgsql:9.1+ USE_PGSQL=server becomes USES=pgsql and WANT_PGSQL=server 20141118: AUTHOR: mat@FreeBSD.org To ease future work, a new SITE_ARCH variable and PLIST_SUB replacement containing SITE_PERL/PERL_ARCH has been added. 20141102: AUTHOR: bdrewery@FreeBSD.org SSP is now default. This can be disabled with WITHOUT_SSP. SSP_CFLAGS defaults to -fstack-protector. SSP will be used on all amd64 releases. It will only be used on i386 releases over 10.0. 20141007: AUTHOR: mat@FreeBSD.org The @cwd [path] construct in plist files is deprecated. Instead of adding those lines to the plist: @cwd / etc/rc.d/foo var/db/bar @cwd /some @exec mkdir -p %D/nested/dir add this: /etc/rc.d/foo /var/db/bar @exec mkdir -p /some/nested/dir 20141002: AUTHOR: bapt@FreeBSD.org New BUNDLE_LIBS knobs to allow a port to tell pkg(8) not to compute provided libraries, this is to be used when a port bundles libraries it doesn't want to expose to other ports. 20141001: AUTHOR: tijl@FreeBSD.org Support for autoconf213, autoheader213, aclocal14 and automake14 has been removed from USE_AUTOTOOLS. 20140930: AUTHOR: bdrewery@FreeBSD.org Building ports in a chroot or jail have always required a particular environment be setup. This was not clear though and the ports framework did not enforce it. These requirements are: 1. Either a SRC_BASE/sys/sys/param.h, or /usr/include/sys/param.h be present with the __FreeBSD_version_ number of the target system, or OSVERSION be set in the environment. Lack of these would fallback on kern.osreldate before, which is no longer the case. 2. UNAME_r,UNAME_v,UNAME_s all must be set for the target system. Not having these values in sync will now cause the build to error until it is resolved. Setting these in the environment can be done via your own wrapper scripts, or /etc/login.conf (along with cap_mkdb /etc/login.conf) or via /etc/make.conf using appropriate values. Note that OSVERSION is redundant if a proper param.h is in the environment: OSVERSION+= 1100036 UNAME_ENV+= OSVERSION=${OSVERSION} UNAME_ENV+= UNAME_s=FreeBSD UNAME_ENV+= UNAME_r=11.0-CURRENT UNAME_ENV+= UNAME_v="${UNAME_s} ${UNAME_r}" .MAKEFLAGS: ${UNAME_ENV} MAKE_ENV+= ${UNAME_ENV} CONFIGURE_ENV+= ${UNAME_ENV} SCRIPTS_ENV+= ${UNAME_ENV} 20140922: AUTHOR: bapt@FreeBSD.org pkg(8) now handles the directories under PREFIX automatically, and will automatically remove them as needed. A new @dir keyword has been introduced to handle directories specially: - directories with special owner, group, or permissions (access mode) - empty directories - directories out of PREFIX As a consequence @dirrm and @dirrmtry are now considered deprecated. Credentials can now be passed in arguments to keywords (the empty keyword means "regular file"): @(user,group,mode) file1 @dir(user,group,mode) directory_with_special_owner_or_mode PLIST_DIRSTRY is now considered deprecated, use PLIST_DIRS instead. 20140917: AUTHOR: tijl@FreeBSD.org Support for USE_AUTOTOOLS=libtool, USE_GNOME=ltasneededhack, USE_GNOME=lthack and USE_GNOME=ltverhack has been removed. Ports should use USES=libtool instead. Support for USE_AUTOTOOLS=libltdl has been removed. Ports should use LIB_DEPENDS=libltdl.so:${PORTSDIR}/devel/libltdl 20140916: AUTHOR: tijl@FreeBSD.org The installation of *.la files without some form of USES=libtool in the port Makefile will now result in a stage-qa error. Previously this would only cause a warning. The :keepla argument to USES=libtool is no longer special. It is now only needed if a port uses *.la files at run time and no longer to fix link problems in other ports. 20140901: AUTHOR: bapt@FreeBSD.org Support for pkg_install has been removed. Note that WITH_PKGNG is now called WITH_PKG (still used to define 'devel') WITH_PKGNG remains for compatibility @stopdaemon support has gone, pkg(8) has a generic mechanism to provide the same function, see HANDLE_RC_SCRIPTS in pkg.conf(5). 20140901: AUTHOR: bapt@FreeBSD.org Support for NO_STAGE has been removed. 20140825: AUTHOR: antoine@FreeBSD.org Support for NOPORTDATA has been removed. 20140809: AUTHOR: mva@FreeBSD.org The Python language bits of the ports framework have been converted to USES. Instead of USE_PYTHON, please use USES=python instead. USE_PYTHON=yes becomes USES=python USE_PYTHON=2.7+ becomes USES=python:2.7+ USE_PYTHON_BUILD=3.3 becomes USES=python:3.3,build ... Additionally, several Python specific features have been converted to USES-inspired USE_PYTHON=,. USE_PYDISTUTILS becomes USE_PYTHON=distutils PYDISTUTILS_AUTOPLIST becomes USE_PYTHON=autoplist ... Please read the header comments of Uses/python.mk for more details about the new and changed bits and pieces. You will find a list of deprecated variables and how to replace them in your own ports at the end of the header comment. 20140715: AUTHOR: bapt@FreeBSD.org LIB_DEPENDS only supports one form: lib*.so 20140708: AUTHOR: mva@FreeBSD.org Support for installations based on the easy_install setup.py target has been removed from the Ports framework for Python software. The PYEASYINSTALL_* knobs and support for USE_PYDISTUTILS=easy_install have been removed. 20140623: AUTHOR: bapt@FreeBSD.org IGNOREFILES is not supported anymore, it was an unsafe feature allowing to use unchecked files downloaded from untrusted places to be used in the ports tree. 20140607: AUTHOR: mva@FreeBSD.org New PYTHON_CONCURRENT_INSTALL knob to support the parallel installation of ports for different python versions. If set to yes, the knob indicates that the port can be installed for different python versions at the same time. The port will use a unique prefix for certain directories using USES=uniquefiles:dirs (see the uniquefiles.mk Uses for details about the directories). Binaries receive an additional suffix, based on ${PYTHON_VER}. The values for the uniquefiles USES are set as follows: UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} UNIQUE_SUFFIX= -${PYTHON_VER} If the port is installed for the current default python version, scripts and binaries in ${PREFIX}/bin ${PREFIX}/sbin ${PREFIX}/libexec are linked from the prefixed version to the prefix-less original name, e.g. bin/foo-2.7 --> bin/foo. 20140529: AUTHOR: miwi@FreeBSD.org USE_GMAKE is no longer supported, please use USES=gmake instead 20140526: AUTHOR: bapt@FreeBSD.org USE_DOS2UNIX is no longer supported, USES=dos2unix should be used instead 20140525: AUTHOR: mat@FreeBSD.org Add a USE_PERL5=fixpacklist to account for ports creating a .packlist file referencing ${STAGEDIR} when not using USE_PERL5=configure or USE_PERL5=modbuildtiny. 20140505: AUTHOR: bapt@FreeBSD.org :U and :L syntax is not supported anymore in the ports tree, :tu and :tl should be used instead This makes the ports tree incompatible with make(1) version that does not support :tu and :tl (aka FreeBSD 8.3 and earlier) 20140428: AUTHOR: bapt@FreeBSD.org EXTRA_PATCHES has been extended to support a new syntax: EXTRA_PATCHES= file:-pX Where X is the pathname strip count passed to patch(1) 20140423: AUTHOR: tijl@FreeBSD.org The semantics of USES=libtool have changed. It now deletes .la libraries from the staging area to reduce overlinking. USES=libtool:keepla can be used in case they need to be kept. This form still modifies .la libraries to remove references to other libraries to reduce overlinking. Note that .la libraries have to kept around as long as there are .la libraries from other ports that refer to them. Those ports need to use some form of USES=libtool first such that those references are removed. 20140419: AUTHOR: bdrewery@FreeBSD.org check-orphans has been renamed to check-plist. It now checks: A. Files in STAGEDIR that are missing from plist. To make check-plist ignore a file *as an orphan* do one of the following: 1. Install it 2. post-install: ${RM} ${STAGEDIR}file 3. Put the file behind an OPTION with a PLIST_SUB: %%OPTION%%file 4. Add to plist as a @comment @comment file @comment @dirrmtry dir B. Files in plist missing from STAGEDIR C. Files in plist which are owned by dependencies/MTREEs 20140416: AUTHOR: bdrewery@FreeBSD.org The default target for 'make' now runs 'make stage' if the port supports it, otherwise 'make build' as before. 20140411: AUTHOR: bdrewery@FreeBSD.org A new plist keyword has been added, @sample. It accepts a file (must end in .sample): @sample file.conf.sample This will install file.conf.sample and copy it to file.conf. The file.conf will be removed if it matches file.conf.sample on deinstall. This replaces older patterns of: @unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; then rm -f %D/etc/pkgtools.conf; fi etc/pkgtools.conf.sample @exec [ -f %B/pkgtools.conf ] || cp %B/%f %B/pkgtools.conf 20140312: AUTHOR: bapt@FreeBSD.org Two new USES were added to finish handling distfiles formats a consistent way: USES=tar[:[xz|bzip2|Z|tgz]] handles distributions files in format: - plain tar - tar.xz - tar.bz2 - tar.Z - tgz USES=lha handles distributions files info LHA format 20140307: AUTHOR: rene@FreeBSD.org Two new USES were added by bapt@FreeBSD.org : USES=zip handles distribution files in Zip format. InfoZip files need USES=zip:infozip USES=makeself handles distribution files in makeself format. 20140303: AUTHOR: kde@FreeBSD.org Add support for Qt 5 via USE_QT5. USE_QT5 is analogous to USE_QT4, the only difference is the list of available components (see Mk/bsd.qt.mk for details). USES=qmake supports Qt 5 as well. 20140224: AUTHOR: bapt@FreeBSD.org Deprecate support for KNOBS, the new option framework allows to express a more consistent, user friendly and visible way the same feature. 20140127: AUTHOR: mat@FreeBSD.org Add two new options helpers: ${OPT}_${TYPE}_DEPENDS_OFF= will automatically add: ${TYPE_DEPENDS}+= in case OPT is 'off' ${OPT}_${FLAG}_OFF= will automatically add: ${FLAG}+= in case OPT is 'off' 20140111: AUTHOR: mva@FreeBSD.org New USES=uniquefiles to make files or directories unique by adding a prefix or suffix to them. Files listed in UNIQUE_PREFIX_FILES will receive the prefix set via UNIQUE_PREFIX. The same applies to UNIQUE_SUFFIX_FILES, but with the chosen UNIQUE_SUFFIX. UNIQUE_PREFIX and UNIQUE_SUFFIX are set to PKGNAMEPREFIX and PKGNAMESUFFIX by default. The uniquefiles USES enables ports to name files in special ways, e.g. by outlining that the port does not support X11 (-nox11). A binary named bin/foo thus can be easily renamed to bin/foo-featureA via USES= uniquefiles UNIQUE_SUFFIX= -featureA UNIQUE_SUFFIX_FILES= bin/foo The uniquefiles USES automatically adjusts the plist at installation time. There is no need to consider the prefix or suffix in the pkg-plist file itself. If the original name of the renamed file is bin/foo, this exact name should be put into pkg-plist. The dirs argument to USES=uniquefiles will cause certain standard directories, such as DOCSDIR or EXAMPLESDIR to be prepended with the UNIQUE_PREFIX. The change to the directories will hapen prior to configuring or building the port, so that the port Makefile as well as the port's build logic are aware of the changed name. Since the uniquefiles USES effectively manipulates the port's installation and file layout, it will only be available for stagedir-aware ports. Ports with NO_STAGE=yes will be unable to use the uniquefiles USES. 20131218: AUTHOR: mva@FreeBSD.org lang/python (and as such the 'python' binary and accomplices) has been removed as default dependency for the USE_PYTHON, USE_PYTHON_BUILD and USE_PYTHON_RUN knobs. Ports need to use a designated (default) python interpreter to build and install and in most cases for execution in the user environment. Ports that install python scripts, which are not limited to a certain python version (or version range), can include lang/python as build and/or run dependency. USE_PYTHON=yes and similar knobs will only pull in the default python version (e.g. lang/python27), but none of the meta ports or lang/python itself. Please use lang/python as build or run-time dependency only, if there is no other way to get a port working properly, since the usage of lang/python complicates package builds for different python versions. 20131213: AUTHOR: tijl@FreeBSD.org New USES=fortran to replace USE_FORTRAN. USE_FORTRAN=yes can be replaced with USES=fortran or USES=fortran:gcc. USE_FORTRAN=ifort can be replaced with USES=fortran:ifort. USE_FORTRAN=f77 is deprecated and the version of gcc it depends on (lang/gcc34) is scheduled to be removed. Note that USE_FORTRAN=yes also makes GCC the C/C++ compiler while USES=fortran only sets the Fortran compiler and can be used together with Clang as C/C++ compiler. 20131208: AUTHOR: mva@FreeBSD.org New USES=twisted, to replace the old USE_TWISTED knob. twisted can be configured with the arguments run or build to replace the previous USE_TWISTED_RUN and USE_TWISTED_BUILD knobs. The twisted components can be added as comma-separated arguments. If you previously wrote USE_TWISTED= yes USE_TWISTED= conch names USE_TWISTED_RUN= yes you now would write USES= twisted USES= twisted:conch,names USES= twisted:run 20131119: AUTHOR: kwm@FreeBSD.org The USE_GNOME component ltverhack no longer has a hard dependancy on libtool. If USE_AUTOTOOLS=libtool isn't defined it will try to patch ltmain.sh and or libtool in ${WRKSRC}. If those files are located somewhere else in ${WRKSRC} then it is possible to overwrite ltverhack_PATCH_FILES with there new locations. configure script --distable-static will work also after using the "new" ltverhack. Please keep in mind that USE_AUTOTOOLS implies GNU_CONFIGURE so you might need to add that back for the port to work. 20131031: AUTHOR: rene@FreeBSD.org Add a new USES for kernel module ports. USES=kmod takes no arguments and: - adds kld to CATEGORIES - sets SSP_UNSAFE - sets IGNORE if the kernel sources are not found - defines KMODDIR to /boot/modules by default, add it to PLIST_SUB and MAKE_ENV, and create it upon installation - handles cross-referencing kernel modules upon installation and deinstallation 20131021: AUTHOR: amdmi3@FreeBSD.org share/applications directory was added to the mtree, meaning that you no longer need to create or remove it in your ports. 20131008: AUTHOR: bapt@FreeBSD.org New "compiler" USES to be able to select the compiler based on the features it provides. Supported arguments are: - c++11-lang: the port needs a c++11 aware compiler what ever standard library it uses, implies features - c++11-lib: the port needs a c++11 standard library, implies features - c11: the ports needs a c11 aware compiler implies features - features: this will create a COMPILER_FEATURES variable which contains the list of features ${CC} do support, implies env. - env: the COMPILER_TYPE will be set to either gcc or clang. By default the uses will try to use clang33 from ports when nothing in base is relevant except if the user explicitly defines FAVORITE_COMPILER=gcc in his make.conf 20131008: AUTHOR: makc@FreeBSD.org New USES: qmake, configure tool widely used among Qt based projects. New framework is stage-friendly. To convert existing ports remove custom configure target, adjust QMAKE_ENV, QMAKE_ARGS, QMAKE_PRO if required (see Mk/Uses/qmake.mk for details). 20131005: AUTHOR: bdrewery@FreeBSD.org PATCHFILES now support an optional :-pX flag that notes which patch strip level to use. This allows multiple patches in 1 port to use different PATCH_DIST_STRIP values without changing PATCH_DIST_STRIP. Syntax: PATCHFILES= patch[:-pX][:distgroup] 20131003: AUTHOR: bapt@FreeBSD.org New USES: scons, to handle properly the scons building system, this this also gives the scons packages user the ability to respect MAKE_JOBS. 20130924: AUTHOR: bapt@FreeBSD.org Stage aware ports can now create package without the requirement from being root. If a port really needs root anyway it should add NEED_ROOT in its Makefile. For a port that needs special credential on files DO NOT RELY on chown in post-install section but rely on @own, @group in pkg-plist Be careful about rights on directories as pkg_install cannot store them they needs to be done via @exec chown. 20130923: AUTHOR: bapt@FreeBSD.org The ports tree is now staged by default. With pkgng the sequence hasn't changed, the main difference is that creating package is now independent from installing it. With pkg_install, the package is now created first and make install, do install the package. New macros: - STAGEDIR: PATH to the directory where the port will be staged. - NO_STAGE: Keep the old behaviour of the ports tree (aka no staging area) Unsupported macro if NO_STAGE is not set: - MAN* with staging man page compression and handling of hardlinks and symlinks is automatically done in the stage. the manpages becomes then a "normal" plist files and should be tracked in pkg-plist. - MANCOMPRESSED the compress-man target is able to only compress when it needed. New target: - stage: this installs everything into the stage directory - makeplist: this will create a pkg-plist and print it to stdout. This is a sample plist and it should always be _reviewed_ not directly used. NOTE: with staging only what is in the plist will be installed, nothing more, meaning a port staged cannot have leftovers except directories left. It is really important to double check the pkg-plist to make sure all the files the maintainer wants to package are in! make makeplist can help in that area. 20130923: AUTHOR: mva@FreeBSD.org * New USES: zope This replaces the previous USE_ZOPE knob. All other zope related knobs for port Makefiles still exist. See Mk/Uses/zope.mk for details. 20130920: AUTHOR: bdrewery@FreeBSD.org SSP support has been added to ports with WITH_SSP_PORTS for i386 and amd64 on FreeBSD 10, and amd64 on earlier versions. SSP_UNSAFE is added to disable in a port if it fails to build, but this should only be used in rare circumstances such as kernel modules. Otherwise, the port may just be failing due to lack of respecting LDFLAGS. On FreeBSD 10, this uses an ldscript in /usr/lib/libc.so to pull in libssp_nonshared.a to address issues linking on i386 [1]. On earlier FreeBSD versions the WITH_SSP_PORTS knob will add -lssp_nonshared to LDFLAGS on i386. This is not needed on amd64. However, several hundred ports do not currently respect LDFLAGS, so this support is disabled currently as it causes build failures if a dependency is looking for the stack_chk symbols. [1] http://svnweb.freebsd.org/base/head/lib/libc/libc.ldscript?revision=251668&view=markup 20130919: AUTHOR: gahr@FreeBSD.org * New USES: tcl, tk This uses replaces all the previous USE_TCL, USE_TCL_BUILD, USE_TCL_RUN, USE_TCL_WRAPPER, USE_TK, USE_TK_BUILD, USE_TK_RUN and USE_TK_WRAPPER macros. See the Mk/Uses/tcl.mk and the commit message of r327607 for details. Moreover, the default Tcl/Tk version is now specified in terms of bsd.default-versions.mk. It is now possible to specify one's preferred Tcl/Tk version using DEFAULT_VERSIONS+= tcltk=x.y in make.conf. 20130918: AUTHOR: bapt@FreeBSD.org The perl framework is not included unconditionally and the old framework is not recognized anymore, the following MACROS has been removed: * PERL_CONFIGURE * USE_PERL5_RUN * USE_PERL5_BUILD * PERL_MODBUILD 20130904: AUTHOR: madpilot@FreeBSD.org To allow ports to work with the iconv implementation in 10-CURRENT after commit r254273 the USES=iconv options now conditionally adds a dependency depending on the FreeBSD version. It also defines a few utility variables which can be used in the ports: ICONV_CMD: location of the iconv binary. after r254273: /usr/bin/iconv before: ${LOCALBASE}/bin/iconv ICONV_LIB: ld(1) flags to get the iconv DSO. after r254273: empty before: -liconv ICONV_CONFIGURE_ARG: String that can be passed to configure scripts to hint the location of the libiconv library. after r254273: empty before: --with-libiconv-prefix=${LOCALBASE} 20130902: AUTHOR: bapt@FreeBSD.org USE_GNOME=pkgconfig is not supported anymore by the ports tree, please uses: USES=pkgconfig 20130831: AUTHOR: bdrewery@FreeBSD.org crees has added USE_PACKAGE_DEPENDS_ONLY which works like USE_PACKAGE_DEPENDS but will not fallback on source if a package is missing. 20130731: AUTHOR: bapt@FreeBSD.org * New USES: perl5 This uses replaces all the previous perl macros. Here is how to migrate: Always include perl5: USES= perl5 If USE_PERL5 is undefined then perl5 will be a build and run dependency Migrating to new USE_PERL5: ======================================================= | BEFORE | AFTER | ======================================================= | PERL_CONFIGURE=yes | USE_PERL5= configure | ------------------------------------------------------- | USE_PERL5_RUN=yes | USE_PERL5=run | ------------------------------------------------------- | USE_PERL5_BUILD=yes | USE_PERL5=build | ------------------------------------------------------- | PERL_MODBUILD=yes | USE_PERL5=modbuild | ------------------------------------------------------- | USE_PERL5=yes | | ------------------------------------------------------- | USE_PERL5=5.14+ | USE_PERL5= 5.14+ | ------------------------------------------------------- | PERL_CONFIGURE= 5.14+ | USE_PERL5=5.14+ configure | ------------------------------------------------------- | PERL_MODBUILD= 5.14+ | USE_PERL5=5.14+ modbuild | ------------------------------------------------------- 20130726: AUTHOR: rene@FreeBSD.org * With the removal of QT 3/KDE 3, the following are no longer recognized: - USE_KDEBASE_VER - USE_KDELIBS_VER - USE_QT_VER Mk/bsd.kde.mk has been removed, it was only used for QT 3/KDE 3. 20130628: AUTHOR: bapt@FreeBSD.org * New USES: imake This uses replaces USE_IMAKE, it handles dependency on imake. Its only argument is 'env', which prevent from defining the do-configure target. * New LATE_INSTALL_TARGET This content of this new macro is appended to INSTALL_TARGET 20130620: AUTHOR: bapt@FreeBSD.org * New USES: fmake This uses will allow to build ports using the legacy FreeBSD make, for ports not compatible with bmake 20130614: AUTHOR: bapt@FreeBSD.org * New macros to help dealing with ports that have options: OPTIONS_SUB=yes when set in a port, all the option names are automatically added to the PLIST_SUB with "@comment " value in case the option is off and empty value in case the options is on. ${OPT}_CONFIGURE_ENABLE= will automatically add: CONFIGURE_ARGS+=--enable- in case OPT is activated CONFIGURE_ARGS+=--disable- in case OPT is deactivated ${OPT}_CONFIGURE_ON= will automatically add: CONFIGURE_ARGS+= in case OPT is activated ${OPT}_CONFIGURE_OFF= will automatically add: CONFIGURE_ARGS+= in case OPT is deactivated ${OPT}_CFLAGS will append the specified new flags to CFLAGS if OPT is 'on' ${OPT}_CXXFLAGS will append the specified new flags to CXXFLAGS if OPT is 'on' ${OPT}_LDFLAGS will append the specified new flags to LDFLAGS if OPT is 'on' ${OPT}_CONFIGURE_ENV will append the specified variables to CONFIGURE_ENV if OPT is 'on' ${OPT}_MAKE_ENV will append the specified variables to MAKE_ENV if OPT is 'on' ${OPT}_USES will append the speficied uses to USES if OPT is 'on' ${OPT}_DISTFILES will append the specified distiles to DISTFILES if OPT in 'on' ${OPT}_CMAKE_ON= will automatically add: CMAKE_ARGS+= in case OPT is activated ${OPT}_CMAKE_OFF= will automatically add: CMAKE_ARGS+= in case OPT is deactivated ${OPT}_${TYPE}_DEPENDS= will automatically add: ${TYPE_DEPENDS}+= in case OPT is 'on' 20130614: AUTHOR: bapt@FreeBSD.org * New 'display' USES macro to handle building ports that may require a a display to build. USES= display[:install] will start Xvfb and set the DISPLAY environment variable before the installation phase and stop it at the end. (install is the implicit value) USES= display:build will start Xvfb and set the DISPLAY environment variable before the build phase and stop it at the end. 20130607: AUTHOR: bdrewery@FreeBSD.org * Checks were added to block GH_TAGNAME=master as this is not a valid setup. A known hash or tag should be used for GH_TAGNAME instead of a branch name. As soon as a branch is updated, the known checksum in the distinfo would then be invalid. 20130606: AUTHOR: bdrewery@FreeBSD.org * WRKSRC_SUBDIR has been added to simplify overriding WRKSRC to use a subdirectory: WRKSRC= ${WRKDIR}/${DISTNAME}/src Becomes: WRKSRC_SUBDIR= src 20130606: AUTHOR: bapt@FreeBSD.org The OPTIONS macro is no longer recognized, please use the new options framework. 20130509: AUTHOR: kwm@FreeBSD.org * Two new USES macros to handle mime data of ports. USES= desktop-file-utils Handles MimeType in .desktop files that are installed in share/applications. USES= shared-mime-info For supporting mime xml files installed in share/mime/packages. The desktop-file-utils USES is only needed if the .desktop files installed by the port has a MimeType field. USE_GNOME=desktopfileutils is deprecated. The shared-mime-info USES handles mime types xml files. Please note that only the packages/${NAME}.xml file should be listed in the plist. The shared-mime-info port will clean up the share/mime/* directories and generated files. Both USES have there own post-install and code that adds @exec/@unexec lines to the pkg-plist. This means that when a port switches to the USES macro, the related post-install command and @exec/@unexec lines can be removed from the prot. 20130507: AUTHOR: bapt@FreeBSD.org * New USES macro to handle setting correct shebang to scripts By default it will fix bash, perl, php, ruby and python on all files specified in the SHEBANG_FILES macro (glob pattern relative to ${WRKSRC}) Paths can be customized, and number of languages supported can be extended. * USE_GETTEXT, USE_NCURSES, USE_READLINE are no longer recognized 20130506: AUTHOR: bapt@FreeBSD.org * New USES macro to handle linking on ncurses and on readline USES= ncurses will set env and make the port link to base version of ncurses if no port version is installed otherwise it will link against port version USES= ncurses:port will for the port to link against the ports version of ncurses USES= ncurses:base will force to link against base version of ncurses. USES= readline will make the port link against base version of readline except on 10+ where it will force dependency on the port version of readline USES= readline:port will anyway force dependency on the port version of readline. 20130426: AUTHOR: mva@FreeBSD.org * USE_ICONV has been deprecated and converted into the iconv USE feature USES= iconv 20130425: AUTHOR: bapt@FreeBSD.org * USE_CDRTOOLS is no longer recognized * USE_FREETYPE is no longer recognized 20130423: AUTHOR: jgh@FreeBSD.org * New USES macro to handle support for gettext dependency: USES= gettext:build will add gettext into BUILD_DEPENDS USES= gettext:run will add gettext into RUN_DEPENDS USES= gettext:lib will add gettext into LIB_DEPENDS It deprecates USE_GETTEXT which will be removed as soon as it is not used anymore 20130422: AUTHOR: bdrewery@FreeBSD.org * The entry for 20120830 to change CCACHE_DIR was not fully supported by all ports. There is now a CCACHE_DIR variable that can be used in /etc/make.conf for more complete coverage: CCACHE_DIR=/var/cache/ccache 20130422: AUTHOR: bapt@FreeBSD.org * New USES macro to handle support for pkgconf (pkg-config) dependency: USES= pkgconfig[:build] will add pkgconf into BUILD_DEPENDS USES= pkgconfig:run will add pkgconf into RUN_DEPENDS USES= pkgconfig:both will add pkgconf into both RUN and BUILD DEPENDS It deprecates USE_PKGCONFIG which will be removed as soon as it is not used anymore 20130320: AUTHOR: jgh@FreeBSD.org * New USES macro to handle support for Zenoss ports and Zenpacks: USES= zenoss 20130319: AUTHOR: makc@FreeBSD.org * New USES macro should be used instead of deprecated USE_CMAKE and CMAKE_OUTSOURCE: USES= cmake:outsource to perform out-of-source build (equivalent to former pair usage of USE_CMAKE/CMAKE_OUTSOURCE) USES= cmake In-source build (equivalent to plain USE_CMAKE=yes) can be used if project doesn't support out-of-source build. 20130319: AUTHOR: bapt@FreeBSD.org * The options framework now uses ports-mgmt/dialog4ports contributed by Ilya A. Arkhipov. It boostraps it if not present when one calls make config. dialog4ports provides a new UI able to represent all the features provided by the new options framework. 20130315: AUTHOR: bdrewery@FreeBSD.org * USE_QMAIL_RUN, USE_QMAIL_BUILD and WANT_QMAIL have been removed and converted into the qmail USE feature USES= qmail:run will add qmail into RUN_DEPENDS USES= qmail:build will add qmail into BUILD_DEPENDS USES= qmail[:both] will add qmail into both RUN and BUILD DEPENDS USES= qmail:vars will set QMAIL_PREFIX 20130315: AUTHOR: bapt@FreeBSD.org * Add new Keywords directory and first info.yaml keyword (@info). Keywords directory will contain all the custom plist keywords allowing to extend pkg-plist with new keywords. Only works with pkgng. 20130307: AUTHOR: bapt@FreeBSD.org * New USES macro to handle on demand features, 2 examples has been added to the ports tree: pathfix: to replace USE_GNOME= gnomehack fuse: to replace USE_FUSE= yes 20130207: AUTHOR: gahr@FreeBSD.org * Use of PTHREAD_CFLAGS and PTHREAD_LIBS is unsupported. The former expands to the empty string, while the second is simply -pthread. Please use -pthread directly in your LDFLAGS, if needed. 20121214: AUTHOR: flo@FreeBSD.org * Add a USE_FUSE macro to handle fuse dependencies. It makes sure sysutils/fusefs-libs gets installed and depending on fuse being in base or not it installs sysutils/fusefs-kmod. 20121210: AUTHOR: bapt@FreeBSD.org * OPTIONS has been extended 2 new macros are available: OPTIONS_RADIO - allows only 0 or 1 options to be selected OPTIONS_GROUP - allows 0 or N options among to be selected 20121010: AUTHOR: bapt@FreeBSD.org * IPV6 option is now activated by default for the whole ports tree 20121010: AUTHOR: bapt@FreeBSD.org * The ports tree is now using pkgng as the default package manager for HEAD. This only affects users of CURRENT -- users of other branches need not take any action. To keep pkg_install as the default package manager, use the new WITHOUT_PKGNG knob in make.conf 20120830: AUTHOR: beat@FreeBSD.org * CCACHE support for building ports has been added (depends on devel/ccache). Therefore new user settable variables are available: WITH_CCACHE_BUILD - Enable CCACHE support (Default off) NO_CCACHE - Disable CCACHE support for example for certain ports if CCACHE is enabled. By default CCACHE uses $HOME/.ccache as cache directory. To use a non-default cache directory this could be overwritten like: MAKE_ENV+= CCACHE_DIR=/var/cache/ccache 20120820: AUTHOR: gahr@FreeBSD.org * GitHub support has been integrated into bsd.sites.mk. In order to fetch distfiles from GitHub, a port must define USE_GITHUB along with the following variables: GH_ACCOUNT - account name of the GitHub user hosting the project default: not set, mandatory GH_PROJECT - name of the project on GitHub default: ${PORTNAME} GH_TAGNAME - name of the tag to download (master, 2.0.1, ...) default: ${DISTVERSION} GH_COMMIT - first 7 digits of the commit that generated GH_TAGNAME (man git-describe(1)) default: not set, mandatory The port www/tivoka is an example how to use this mechanism. 20120726: AUTHOR: bapt@FreeBSD.org * new macro USE_PKGCONFIG has been introduce in place of USE_GNOME= pkgconfig USE_PKGCONFIG= yes and USE_PKGCONFIG= build for build only dependency USE_PKGCONFIG= run for run only dependency USE_PKGCONFIG= both for both build and run dependency 20120715: AUTHOR: beat@FreeBSD.org * The ports tree moved from CVS to Subversion. A Subversion to CVS exporter is in place to continue the support of CVSup but do not commit to pcvs directly. All commits have to be done in the new port Subversion repository on svn.FreeBSD.org. You will find more information about Subversion in the Ports Subversion Primer in the FreeBSD wiki, in the "Committer's Guide" and the "Porter's Handbook". If you are in doubt or unsure about a Subversion operation please contact ports@FreeBSD.org. 20120529: AUTHOR: crees@FreeBSD.org * OPTIONS has been updated with many changes and improvements. Old-style OPTIONS declarations will continue to work for a while, but do not introduce any into existing or new ports. For further information, see the Porter's Handbook section on Makefile Options. 20110923: AUTHOR: amdmi3@FreeBSD.org * LDFLAGS is now passed to both the configure and make environments, and should be handled just like CPPFLAGS (see previous entry). Summarizing both LDFLAGS and CPPFLAGS changes, where you would have used CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" MAKE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" now just use CPPFLAGS+= "-I${LOCALBASE}/include" LDFLAGS+= "-L${LOCALBASE}/lib" Note that it's advised to append these variables (+=) instead of overriding (=) to allow customization by user. 20110320: AUTHOR: gerald@FreeBSD.org * CPPFLAGS is now passed to both the configure and make environments, so this no longer needs to happen in individual ports by adding this to CONFIGURE_ENV or MAKE_ENV. Rather, just set CPPFLAGS in the port Makefile (if necessary). For example, where you would have used CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" MAKE_ENV= SOMETHING=foo CPPFLAGS="-I${LOCALBASE}/include" now just use CPPFLAGS= "-I${LOCALBASE}/include" MAKE_ENV SOMETHING=foo 20100831: AUTHOR: autotools@FreeBSD.org * USE_GETTEXT has been cleaned up. 'build' BUILD time dependency only 'run' RUN time dependency only 'yes' LIBRARY dependency 20100606: AUTHOR: gerald@FreeBSD.org * USE_GCC=4.3 is deprecated (and no port uses it anymore). USE_GCC=4.3+ is transparently rewritten to USE_GCC=4.4+ and lang/gcc43 will be disconnected from the USE_GCC infrastructure soon. 20100524: AUTHOR: alepulver@FreeBSD.org * The license support files (bsd.licenses.mk and bsd.licenses.db.mk) from GSoc 2008/2009 have been committed. A new PH entry will be available soon, but for the moment look at: http://wiki.freebsd.org/PortsLicenseInfrastructure Or, alternatively, the comments at the beginning of the mentioned files. 20090906: AUTHOR: flz@FreeBSD.org * There is now a unified way to create users and groups in your ports. First, make sure they are added to both ports/GIDs and ports/UIDs, then add the following in your port: USERS= foo GROUPS= foo ... if you want your port to create the foo user and group. 20090812: AUTHOR: portmgr@FreeBSD.org * sourceforge.net has changed their URL layout to be more flexible for their users. A new bsd.sites.mk macro SFP has been added for projects that moved from http://${mirror}/sourceforge/%SUBDIR%/ to http://${mirror}/project/%SUBDIR%/ Note that %SUBDIR% is now highly individual for each project and might need changing as well. 20090521: AUTHOR: portmgr@FreeBSD.org * bsd.port.options.mk is now clear to be widely used. 20090516: AUTHOR: pgollucci@FreeBSD.org * APACHE_COMPAT is dead! * USE_APACHE=yes is dead! * WITH_APACHE13, WITH_APACHE2, WITH_APACHE20, and WITH_APACHE22 are dead You should set USE_APACHE=13|20|22+. WITH_APACHE option can be used to conditional include support for ANY version of Apache based on APACHE_PORT. Currently www/apache13 20090207: AUTHOR: pgollucci@FreeBSD.org * devel/libslang dropped in favor of devel/libslang2 * WITH_SLANG2 has been removed. WITH_SLANG now implies devel/libslang2. 20080905: AUTHOR: hrs@FreeBSD.org * print/ghostscript-* and related ports have been renamed in the following way: print/ghostscript-gnu -> print/ghostscript7 print/ghostscript-gnu-nox11 -> print/ghostscript7-nox11 print/ghostscript-gnu-commfont -> print/ghostscript7-commfont print/ghostscript-gpl -> print/ghostscript8 print/ghostscript-gpl-nox11 -> print/ghostscript8-nox11 japanese/ghostscript-gnu-jpnfont -> print/ghostscript7-jpnfont korean/ghostscript-gnu-korfont -> print/ghostscript7-korfont * USE_GHOSTSCRIPT now supports a version number which the port requires. The valid value is "7" or "8". If other value is specified, value of WITH_GHOSTSCRIPT_VER is used. * WITH_GHOSTSCRIPT_GNU has been removed in favor of WITH_GHOSTSCRIPT_VER. The valid value of WITH_GHOSTSCRIPT_VER is "7" or "8", and the default value is "8". 20080821: AUTHOR: rafan@FreeBSD.org * CONFIGURE_ARGS is updated to use correct syntax for newer autoconf on the configure target. Individual ports no longer need to change CONFIGURE_TARGET to have the '--build=' prefix. 20080721: AUTHOR: pav@FreeBSD.org * Default OpenLDAP version was changed from 2.3 to 2.4. * USE_GTK and USE_XPM variables are no longer recognized. 20080523: AUTHOR: flz@FreeBSD.org * By default, ports-mgmt/pkg_install now sets up a wrapper to use ports pkg_install (when installed) instead of base when the former is more recent. This can be disabled in the options menu, or with the WITHOUT_WRAPPER knob. 20080414: AUTHOR: pav@FreeBSD.org * @rmtry is now supported in pkg-plist. * USE_DISPLAY made more powerful, see comments in bsd.port.mk for details. * ${PW} is now defined. * LIB_DEPENDS can now be used with libraries with + sign in their name without the need for escaping. 20080312: AUTHOR: pav@FreeBSD.org * USE_XPM no longer implies USE_XLIB. * USE_LDCONFIG can now be used to Linux binary ports that install shared libraries instead of INSTALLS_SHLIB. 20070908: AUTHOR: gabor@FreeBSD.org, linimon@FreeBSD.org * The Perl-related code parts have been extracted from bsd.port.mk to bsd.perl.mk. This includes the user-settable knobs (e.g. USE_PERL5) and infrastructure parts of the code, like default targets. The new code is designed to be conditionally included based on either USE_PERL5_*, PERL_CONFIGURE, or PERL_MODBUILD being set. However, some of the default settings remain in bsd.port.mk while we make sure that all ports comply with this. * A convenient version handling has been implemented for Perl-related knobs. With this new feature one can require a minimal, a maximal or an exact version, that the given port needs. For the full description and some examples, please see the documentation in bsd.perl.mk. 20070804: AUTHOR: gabor@FreeBSD.org The following functional changes were made to bsd.*.mk and to Tools/scripts/security-check.awk: * The variable definitions that cover command line tools, e.g. MKDIR, were extracted from bsd.port.mk into bsd.commands.mk, so that we can reuse them within the infrastructure later. * The old DESTDIR implementation was removed both from the infrastructure, and from the individual ports. Variables like TARGETDIR should not longer be used. * A new DESTDIR implementation has been added, implemented in bsd.destdir.mk. The new implementation puts no requirements on the individual ports. 20070730: AUTHOR: python@FreeBSD.org * The default Python version has been changed from 2.4.x to 2.5.x. * A number of variables have been added to bsd.python.mk to support the more integrated support for Python eggs, including: PYDISTUTILS_PKGNAME, PYDISTUTILS_PKGVERSION, PYEASYINSTALL_EGG, PYDISTUTILS_NOEGGINFO, PYDISTUTILS_EGGINFO, PYEASYINSTALL_ARCHDEP * More detailed descriptions of the variables can be found in the comments in bsd.python.mk. 20070723: AUTHOR: rafan@FreeBSD.org * The default CONFIGURE_ARGS when GNU_CONFIGURE is set now contains --mandir and --infodir if configure script supports them. 20070712: AUTHOR: maho@FreeBSD.org * Add knob USE_FORTRAN for ports which uses FORTRAN. All ports uses FORTRAN compiler should use this knob. Usages are: USE_FORTRAN=yes (default;gfortran42), USE_FORTRAN=ifc (Intel FORTRAN compiler) and USE_FORTRAN=g77 (/usr/bin/f77 or g77-34). 20070701: AUTHOR: portmgr@FreeBSD.org The following change was made to the ports infrastructure: * Virtual category 'kld' was added. If the port installs kernel loadable modules, it should be included in this category. 20070524: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * The 'make-deinstall-all' target now checks for moved ports. * The installation directories PORTEXAMPLES and PORTDATA are now defined. * The USE_MAKESELF knob is added for ports that use the makeself archiver. * The description of fetch-list was updated. The targets fetch-required-list, fetch-url-list, and fetch-urlall-list were added. * 'make search' will also now search in ports/MOVED. * The default method for 'make update' is now portsnap. Previously, you had to manually select one of 3 methods: SUP_UPDATE, CVS_UPDATE, or PORTSNAP_UPDATE. The latter is now obsolete. * Several Makevar definitions have been moved to the pre-makefile section: DATADIR, DOCSDIR, ETCDIR, EXAMPLESDIR, WWWDIR. 20070403: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * The default dependency of USE_GHOSTSCRIPT has been changed from ghostscript-gnu to ghostscript-gpl. The WITH_GHOSTSCRIPT_GPL variable is now no-op. New WITH_GHOSTSCRIPT_GNU variable was added. * bsd.tcl.mk was overhauled. Most importantly, the semantics of USE_TCL* and USE_TK* variables was changed. USE_TCL and USE_TK now implies both build and run dependencies, USE_TCL_RUN and USE_TK_BUILD variables were introduced. Existing ports in the tree were modified. * Unused category 'tcl81' was removed, and new categories 'tcl' and 'tk' were added. 20070324: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * Default LIBTOOLFILES value was changed from literal `configure' to ${CONFIGURE_SCRIPT}. * bsd.efl.mk was moved to ports/Mk. USE_EFL family of macros is now generally available to all ports. * New macros COPYTREE_BIN and COPYTREE_SHARE were added, to allow for easy installation of a tree hierarchy, either with executable (bin) or read-only (share) permissions on files. * A new variable WWWDIR was added, with default value of ${PREFIX}/www/${PORTNAME}. * Variables DOCSDIR_REL, DATADIR_REL, EXAMPLESDIR_REL and WWWDIR_REL were added for porter's convenience. They contain the values of their respective non-REL variables, except relative to installation PREFIX. 20070313: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * bsd.ocaml.mk and bsd.xfce.mk were added. * The FETCH_CMD was refactored so that ports can override the command, the arguments, or both. 20070306: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * The remaining vestiges of FreeBSD 4.X support were removed. Any remaining users of 4.X should have stayed with the RELEASE_4_EOL tag. * It is now possible to include USE_PHP after bsd.port.pre.mk. * 'make search' should now work with non-default ${PORTSDIR}. 20070130: AUTHOR: portmgr@FreeBSD.org The following changes were made to the ports infrastructure: * DEPENDS variable was removed, please use other *_DEPENDS variables instead. * A new pkg-plist keyword is available, @stopdaemon. It will call forcestop on all rc.subr scripts installed by the port on deinstall, effectively stopping services on deinstall/upgrade. * rc.subr script suffix is now available in Makefile as RC_SUBR_SUFFIX. * New variable USE_CDRTOOLS was introduced. It replaced direct dependencies on sysutils/cdrtools port. It now automatically support switching to cdrtools-cjk port when user specified WITH_CJK. All ports were converted. * USE_DOS2UNIX, infrastructure for converting DOS to UNIX line feeds, was enhanced by a new variable DOS2UNIX_REGEX. It allows to specify a find -iregex parameter to limit touched files by file extensions. * Support for partially translated manpages was added. For examples of usage, please refer to Porter's Handbook. * USE_TCL/USE_TK variables were changed to provide runtime dependency. New variables USE_TCL_BUILD and USE_TK_BUILD were added. All unintuitive quirks of these variables were fixed. * USE_LDCONFIG was fixed to work properly for ports, that specify @cwd in the pkg-plists. * Old bsd.java.mk version 1.0 macros were removed. * New category: ports-mgmt * New virtual category: gnustep * Unused 'picobsd' category was removed. 20070118: AUTHOR: maho@FreeBSD.org We'd like to ask all ports maintainers, who are using Fortran77 (f77 in base), to switch to Fortran90/95 (gfortran42, lang/gcc42). Please refer to http://people.freebsd.org/~maho/gfortran/gfortran.html for details. 20061014: AUTHOR: gnome@FreeBSD.org The following changes have been introduced to the GNOME porting process during the GNOME 2.16 update: * GNOME is now installed into LOCALBASE. Any port which makes use of the gnomeprefix component will have its PREFIX forced to LOCALBASE 20060930: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * The bsd.port.mk pre and post includes have been split into 3 pieces instead of 2, to allow OPTIONS to be able to influence dependencies. This is still experimental and not yet enabled by any port. This adds the file 'bsd.port.options.mk'. * bsd.gcc.mk has been updated to understand gfortran. * emulators/linux_base is now removed. linux_base-fc4 has been the default for some time. * The USE_FIREBIRD macro was added to bsd.database.mk. 20060914: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * PKGVERSION was introduced as an intermediate variable refactored out of PKGNAME. * bsd.lua.mk was added to support lua-related ports. * DESTDIR was removed from bsd.scons.mk because it was problematic. * Some quotes were added to the 'missing' target to improve handling of duplicate origins. 20060903: AUTHOR: sat@FreeBSD.org The following functional changes were made to bsd.sites.mk: * MASTER_SITES variable can now look like MACRO1/subdir1 MACRO2/subdir2, and be expanded in a way that you expect it to, that is apply different subdirs to different sites. You can safely replace ${M_S_FOO:S/%SUBDIR%/bar/} with FOO/bar. * If M_S_SUBDIR is unset, a macro in M_S won't set it anymore, but rather substitute %SUBDIR% all by itself. Now it's possible to use macros with different default subdirs and they will expand in a proper way. 20060805: AUTHOR: sat@FreeBSD.org The following functional changes were made to bsd.sites.mk: * MASTER_SITES variable can now contain special macros which are expanded into traditional URL[:group] syntax and cause some convenient effects, e.g. set a default M_S_SUBDIR. * A macro is any space-delimited word in MASTER_SITES without a forward slash. * If MASTER_SITE_ is defined, then the macro is expanded to its value. * Abbreviated macros are provided for extremely popular locations, e.g. CPAN and SF. To avoid further obfuscation their unabbreviated equivalents should be avoided. * Popular macros can trigger M_S_SUBDIR to default to a predefined value, e.g. ${PORTNAME:L} for SF and ${PORTNAME:C/-.*//} for CPAN. * Abbreviations and M_S_SUBDIR defaults are defined by MASTER_SITES_ABBREVS and MASTER_SITES_SUBDIRS, both set in bsd.sites.mk. * If a macro belongs to a group (e.g. SF:source1), all the sites it expands into also belong to the same group. * Macros and traditional URL's can be mixed safely, their order stays intact. 20060804: AUTHOR: gabor@FreeBSD.org The following functional changes were made to bsd.*.mk and to Tools/scripts/security-check.awk: * Add DESTDIR support to let one install ports into a jail from outside. A package is installed under ${DESTDIR}${PREFIX} now and registered under ${DESTDIR}/var/db/pkg. * TARGETDIR variable has been added for referencing ${DESTDIR}${PREFIX}. * LOCALBASE, LINUXBASE and X11BASE variables point to the final destination now, LOCALBASE_REL, LINUXBASE_REL and X11BASE_REL can be used for the old behavior. The behavior has not been changed in PLIST_SUB. Note, that the three variables are still overridable with a hack, so this change doesn't affect POLA, but necessary for DESTDIR support. * OSVERSION is now determined from the userland, not from the kernel. Cross-compiling between releases is still not supported, but this behavior is more correct for jails with differing userland from the kernel version. * Add some sanity check for PREFIX and DESTDIR. This can be skipped by defining IGNORE_PATH_CHECKS, but very discouraged. * Deinstalling from DESTDIR, determining if a port is already installed in DESTDIR, etc. are implemented by chrooting those specific commands. * Text changes to reflect that we are installing to DESTDIR, removing from DESTDIR, etc. Note, that this change implements only the infrastructure support. Ports should also be implemented to respect DESTDIR. 20060717: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * Introduces IA32_BINARY_PORT for certain cases where a given port fetches and installs compiled i386 binaries. * Adds some infrastructure for support of 32-bit i386 apps on amd64. * Again fix USE_LDCONFIG logic to make it work with non-default PREFIX to fix bug introduced in previous revision. 20060705: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * Change all bogus uses of BROKEN to IGNORE. (Note: the BROKEN_WITH_* forms are retained for compatibility but deprecated.) Internally, these variables all had already set IGNORE, not BROKEN, so they were really misnomers. * Fix USE_LDCONFIG with non-default PREFIX. * Fix DESKTOP_ENTRIES processing on 4.x. * Add 'make missing' to show missing dependencies. * Add bsd.scons.mk and bsd.wx.mk. 20060616: AUTHOR: portmgr@FreeBSD.org The patch in ports/95841 to get rid of remnants of FORCE_PKG_REGISTER was backed out because it broke kdelibs3*. 20060616: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * Update default MySQL version from 4.1 to 5.0 [1] * Update default PHP version from 4 to 5 [2] * Update default LDAP version from 2.2 to 2.3 [3] * Add support for LDAP version 2.4 [4] * Update default linux_base from '8' (Redhat 8) to 'fc4' (Fedora Core 4) [5] * Switch default Linux X implementation from XFree86 to X.org to track the above [5] * Deprecate INSTALLS_SHLIB and replace it by USE_LDCONFIG. If set to "yes", the old behavior is preserved. Otherwise, it can be set to a list of directories to be added to ${PREFIX}/libdata/ldconfig/${UNIQUENAME}. Note that this directory is used by ldconfig startup script, it is meant to replace ldconfig scripts installed by some ports as (sometimes 000.${UNQUENAME}.sh) [6] * Adds USE_LDCONFIG32 which is like USE_LDCONFIG but the target file is ${PREFIX}/libdata/ldconfig32/${UNIQUENAME} instead. (Note: this should only be used on 64-bit architectures) [6] * Set the default LANG for tr to be C to avoid some build problems [7] * Include bsd.java.mk in both pre and post sections [8] * Get rid of remnants of FORCE_PKG_REGISTER [9] * Always print options with make showconfig [10] PR: 92805 [1], 92806 [2], 96793 [3], 97515 [4], 96849 [5], 91933 [6], 91381 [7], 97020 [8], 95841 [9], 97133 [10] 20060523: AUTHOR: portmgr@FreeBSD.org The following functional changes were made to bsd.port.mk: * include bsd.emacs.mk only when USE_EMACS is set [5] * Correct the implementation of pretty-print-run-depends-list [8] * Use a consistent name for the cookies file when PKGNAMEPREFIX/SUFFIX are set after bsd.port.pre.mk. [9] * Include bsd.tcl.mk if USE_TCL_BUILD is defined [10] * Set PERL_MM_USE_DEFAULT in BATCH mode [11] * Add the {ONLY,NOT}_FOR_ARCH_REASON and {ONLY,NOT}_FOR_ARCH_REASON_${ARCH} variables to allow better customization of the error string reported to users when they attempt a build on an unsupported architecture. [12] * Avoid errors from duplicated targets when parsing MLINKS on ports without a default value set. [13] * Fix handling of MLINKS when invalid entries are listed [14] * Enforce sanity of DESKTOP_ENTRIES. If the Categories field is omitted, try to map ports categories to their freedesktop.org counterpart [15] PR: 95238 [5], 94164 [8], 94219 [9], 92355 [10], 95579 [11], 94675 [12], 66109 [13], 66110 [14], 95603 [15] 20060121: AUTHOR: portmgr@FreeBSD.org The following changes affecting ports developers were introduced: * Gamin is a default FAM system * New virtual categories: hamradio and rubygems * Virtual category 'offix' was removed * New USE_DOS2UNIX variable for converting DOS linefeeds to UNIX * Variables like BROKEN and FORBIDDEN should no longer be quoted * New NOFETCHFILES variable to prevent downloading from MASTER_SITES while still allowing MASTER_SITE_OVERRIDE * New plist macro @dirrmtry with functionality of @unexec rmdir || true * USE_REINPLACE no longer needs to be defined, REINPLACE_CMD is always available Detailed documentation of new features is available in Porter's Handbook. 20051108: AUTHOR: portmgr@FreeBSD.org The following changes were introduced: * Add bsd.database.mk - move out from bsd.port.mk USE_MYSQL and USE_PGSQL. - add support for Berkeley DB and SQLite (via USE_BDB and USE_SQLITE knobs). * Escape '+' in make search * Add "makepatch" target to simplify creation of patches during porting * Replace deprecated MACHINE_ARCH with ARCH * Remove support of OpenLDAP 2.1 * Add bsd.tcl.mk It introduces USE_TCL/USE_TCL_BUILD knobs to support various version of tcl (8.0 -> 8.4) * Fix cosmetic bugs in security-check target * Add support for INDEX-7 and above (up to INDEX-9 actually) * Add "package-recursive" to bsd.port.subdir.mk * Remove check for FreeBSD version < 460101 * New category: net-im * Add .desktop file facilities It introduces DESKTOPDIR and DESKTOP_ENTRIES knobs * Add SHA256 support to "*checksum" targets * Fix USE_PYTHON with OPTIONS * Force NO_LINT to MAKE_ENV to avoid library breaks * Fix typo: s/RC_ORDER/USE_RCORDER/g * Add support for PostgreSQL 8.1 * Add bsd.apache.mk USE_APACHE knob enhancements 20051105: AUTHOR: gnome@FreeBSD.org GNOME has been upgraded from 2.10.2 to 2.12.1. This update brings with it many important porting changes: - gtk20's pkg-config file no longer contains the X11 pango modules. Therefore, if your port requires these modules, you may have to manually patch them in to your port's Makefiles. Contact gnome@FreeBSD.org if you have questions on this. - A new USE_GNOME component, ltverhack, has been added. This pseudo-component hacks libtool so that shared library versions are more consistent with other operating systems. Using this component can prevent unnecessary shared library version changes. - A new macro, INSTALLS_ICONS, has been added. If your port installs Freedesktop-style icons to ${LOCALBASE}/share/icons or ${X11BASE}/share/icons, then you should use this macro. NOTE: use of this macro requires your port to set either USE_GNOME or WANT_GNOME. 20050618: AUTHOR: netchild@FreeBSD.org - USE_LINUX now implies NO_FILTER_SHLIBS=yes. It also doesn't use FreeBSD tools to strip binaries anymore, so it's not necessary anymore to override STRIP and STRIP_CMD. - USE_LINUX_PREFIX implies NO_MTREE now. - In the USE_LINUX case, USE_XLIB now depends upon the Linux X11 libraries instead upon the native FreeBSD libraries. - The variable LINUX_BASE_PORT contains a string which is suitable as an item in *_DEPENDS, so if a port BATCH_DEPENDS or FETCH_DEPENDS upon the default (or overridden) Linux base, ${LINUX_BASE_PORT} should be used instead of a hardcoded reference. - If USE_LINUX or OVERRIDE_LINUX_BASE doesn't point to an existing linux_base port and if USE_LINUX isn't set to "yes" (case insensitive), the port will be marked as IGNORE. 20050609: AUTHOR: portmgr@FreeBSD.org The following changes were introduced: * Improve documentation of CONFLICTS. * Fix add-plist-docs target to work correctly with wildcards. * Fix USE_MYSQL and USE_PGSQL knobs to work in partial ports tree. * Introduce 2 new variables: USE_FAM and WANT_FAM_SYSTEM. * Suppress "Vulnerability check disabled" message if DISABLE_VULNERABILITIES is defined. * Switch default MySQL version to 4.1 * Add support for OpenLDAP v.23 * Fix add-plist-info and add-plist-post targets to avoid warnings from ports which redefine them. * Fix add-plist-docs target to handle NOPORTDOCS knob properly. * Use INSTALLDIRS="site" in configure for perl ports. * Fix NO_(CHECKSUM|BUILD|INSTALL|PACKAGE) knobs if OPTIONS are defined. * Add an ability to depend on versioned installed package. Example: BUILD_DEPENDS=p5-Tree-Simple>=1.12:${PORTSDIR}/devel/p5-Tree-Simple Please note, it's experimental feature, work is currently in progress. 20050325: AUTHOR: jdp@FreeBSD.org The CVSup port has been upgraded with a patch to correct the handling of the "refuse" file for files that are in the CVS Attic. This solves a problem some people were having, where CVSup would delete their ports/INDEX* files even though the files were listed in the "refuse" file. The bug fix is in the cvsupd server, so mirror sites must upgrade their servers in order for this fix to help. Meanwhile, adding "ports/Attic/INDEX*" to the refuse file serves as a work-around. 20050321: AUTHOR: kwm@FreeBSD.org The gstreamer-plugins gconf dependency moved to its own port in devel. When your application needs gstreamer-plug-gconf, just add USE_GSTREAMER=gconf to you Makefile 20050319: AUTHOR: gnome@FreeBSD.org New GNOME components have been added to bsd.gnome.mk. See http://www.FreeBSD.org/gnome/docs/gnome2_porting.html for the complete list of available GNOME 2 components. Py-gnome2 lost many of its GNOME dependencies to a new port, py-gnome-extras. Therefore, ports that used to depend on the pygnome2 component for modules such as gtkhtml2, gnomepanel, etc. should replace the pygnome2 dependency with pygnomeextras. 20050314: AUTHOR: edwin@FreeBSD.org New variable for in /etc/make.conf: IGNORE_MASTER_SITE_xxx If you prefer a certain mastersite for a collection of master-sites, set this in your /etc/make.conf: MASTER_SITE_xxx=http://z.x.y/%SUBDIR%/ If you insist on only using the ones you specify, set this in your /etc/make.conf: IGNORE_MASTER_SITE_xxx=yes MASTER_SITE_xxx=http://z.x.y/%SUBDIR%/ Use "make -V MASTER_SITES" to see the differences. 20050313: AUTHOR: ahze@FreeBSD.org, kwm@FreeBSD.org The following changes were committed: * USE_GNOME=gstreamerplugins has been deprecated. The new method which uses bsd.gstreamer.mk is: USE_GSTREAMER=plugin-name Example: USE_GSTREAMER= dvd or WANT_GSTREAMER= yes .include .if defined(WITH_DVD) USE_GSTREAMER= dvd .endif * misc/gnomehier now creates a mtree file and each port using USE_GNOME=gnomehier or gnomeprefix now use the BSD.gnome-x11.dist mtree file to help "keep" directories and not accidentally add gnome directories to a port. 20050207: AUTHOR: portmgr@FreeBSD.org The following changes were committed: * Change bento to pointyhat names in comments. * Document DISABLE_VULNERABILITIES variable. * Add WWW: line for 'search' target. * Speedup check-vulnerable invocation, if portaudit is installed. * Run install-info for all .info files. * Run add-plist-docs more strictly and prevent some situations with leftover files in the future. * Introduce two new variables: MASTER_PORT and SLAVE_PORT. The results from these variables is only used as information for users. * Honor OPTIONS if PACKAGE_BUILDING or BATCH are defined. * Move all USE_GCC entries to new file - bsd.gcc.mk. 'test-gcc' target allows users to check gcc version if USE_GCC is used. Give maintainers opportunity to add '+' character to USE_GCC version for using specified and higher versions. Example: USE_GCC=3.3+ builds ports with gcc version 3.3 and higher (3.4, 4.0). * Install startup scripts with the help of USE_RC_SUBR variable. * Add three new targets: config-recursive, rmconfig-recursive and config-conditional. You can set or delete OPTIONS for all dependencies before every build. config-conditional target is used to skip configuring ports which have already been configured. * Fix using of WANT_PGSQL_VER variable if PostgreSQL is already installed. 20041231: AUTHOR: netchild@FreeBSD.org USE_LINUX_PREFIX doesn't implies USE_LINUX anymore. 20041209: AUTHOR: portmgr@FreeBSD.org The following changes were committed: * Define new macros: DATE, FMT, MKTEMP, OBJDUMP, and use command macro SORT. * Change layout of comments to 4 column tabs, remove lots of spaces and eight-column-tabs. * Introduce 2 new variables: SUB_FILES and SUB_LIST: Example: SUB_FILES= pkg-message pkg-install SUB_LIST+= "VERSION=${VERSION}" This looks for ${FILESDIR}/pkg-message.in and ${FILESDIR}/pkg-install.in Substitutions in SUB_LIST are applied to these files and the output is redirected to ${WRKDIR}. PKGMESSAGE will be set to ${WRKDIR}/pkg-message. PKGINSTALL will be set to ${WRKDIR}/pkg-install. * Document DEPRECATED and EXPIRATION_DATE variables. * Sanitize the intermittent output by the build infrastructure so that cutting and pasting from it no longer interferes with GNATS-tags. * Honor configure arguments for USE_XLIB if USE/WITH_LIBTOOL_ is used. * Properly document 'describe' target. * Properly remove directories at deinstallation time if ports sets a non-standard PREFIX. * Defaults INDEXFILE to INDEX-6 on 6-CURRENT. 20041119: AUTHOR: portmgr@FreeBSD.org The following changes were committed: * Fix INDEX build if MAINTAINER is not defined. * Remove USE_QT2 option, since qt2 is obsolete. * Better define and explain ARCH option. * Add new script Tools/make_readmes, to speedup 'readmes' target. Avoid recursing into individual port directories and run it at top level, after the category README.html files have been created. * Fix 'search' target and enable a case-insensitive search on 5-x. * Extend 'search' target and enable search by categories. * Remove 'tk42' and 'tcl76' categories since they're obsolete. * Introduce DISTVERSION variable, that can be set instead of PORTVERSION and is automatically converted in a conforming PORTVERSION. Example: DISTVERSION= 10Alpha3 extends 10Alpha3 to 10.a3 DISTVERSION= 3Beta7-pre2 extends 3Beta7-pre2 to 3.b7.p2 * Use --suffix option instead of -b for patch(1), to make it compatible with BSD patch(1). * Fix {WANT,WITH}_MYSQL_VER behavior, to deal with conflicting versions. 20041116: AUTHOR: gnome@FreeBSD.org The way OMF files are handled has been changed to use the new INSTALLS_OMF macro (similar to INSTALLS_SHLIB). Details about the new macro can be found at http://www.FreeBSD.org/gnome/docs/porting.html and bsd.gnome.mk. 20041113: AUTHOR: portmgr@FreeBSD.org Since INDEX version in CVS is always too old, portmgr decided to remove it. You will still be able to build your own INDEX or use 'fetchindex' target in /usr/ports/. 20041109: AUTHOR: gnome@FreeBSD.org The way GConf schema files are handled has been changed to use the new GCONF_SCHEMAS macro (similar to MAN). Details about the new macro can be found at http://www.FreeBSD.org/gnome/docs/porting.html and bsd.gnome.mk. 20040803: AUTHOR: ade@FreeBSD.org As part of the ongoing autotools cleanup, devel/autoconf has been replaced with devel/autoconf253, and devel/automake with devel/automake15. Consumers of the various autotools knobs from bsd.autotools.mk should not notice any differences. This update completes the transition of autotools to true versioned packages (cf: tcl/tk) 20040723: AUTHOR: anholt@FreeBSD.org The XFREE86_VERSION variable is replaced by the X_WINDOW_SYSTEM variable. XFREE86_VERSION may no longer be used by ports Makefiles. X_WINDOW_SYSTEM may currently be set to xorg, xfree86-4, and xfree86-3 (please use :L in checking it). Several X_*_PORT variables are provided by bsd.port.mk which map to the appropriate port for the X_WINDOW_SYSTEM chosen. 20040719: AUTHOR: ale@FreeBSD.org There has been a big update to PHP ports and bsd.php.mk to add more flexibility and new features. Now a port may depend on a specific set of PHP extensions. To do so, simply replace: USE_PHP= yes with: USE_PHP= ext1 ext2 ext3 ... in the port Makefile. A list of all PHP extensions is included in bsd.php.mk. If the requirement is a build dependency too, the port should also define: USE_PHP_BUILD=yes Moreover, the new knob WANT_PHP_SCR has been added to indicate that the port requires the 'php' binary to run. Last but not least, many common operations to build/install/register a PHP extension can now be omitted from the port Makefile if it defines: USE_PHPEXT= yes For more information on this point and on additional variables, see bsd.php.mk. 20040717: AUTHOR: eik@FreeBSD.org OpenLDAP version 2.2 is now the default. When your port links against the openldap client libraries use USE_OPENLDAP= yes and do not depend on a particular version. A user (or package building cluster) can select the desired flavor with WANT_OPENLDAP_VER and WANT_OPENLDAP_SASL, but these must not be used in ports Makefiles. 20040709: AUTHOR: portmgr@FreeBSD.org USE_LIBTOOL_VER now configures a port to use the ports version of libtool instead of its included version. This was put in place to reduce the number of ad hoc patches to individual ports' libtools to prevent .la file installation as well as fix various threading problems. To restore the previous libtool behavior, use the new macro, USE_INC_LIBTOOL_VER. It works the exact same way as USE_LIBTOOL_VER in that it takes a libtool version as its argument. For example, to use the included version of libtool with extra hacks provided by libtool-1.5, add the following to your Makefile: USE_INC_LIBTOOL_VER= 15 To use the ports version of libtool-1.5, add the following to your Makefile: USE_LIBTOOL_VER= 15 Note: these macros are mutually exclusive. Your port should only include one or the other if it needs to make use of libtool. 20040707: AUTHOR: gnome@FreeBSD.org The way GConf schema files are installed has changed to support the upcoming GNOME 2.8 GConf. Details about the change can be found at http://www.FreeBSD.org/gnome/docs/porting.html. All existing ports have been converted to the new style, and portlint has been updated to flag old-style GConf schema installation. 20040610: AUTHOR: portmgr@FreeBSD.org The following behavioral or feature changes were committed: * Support verbose index builds with INDEX_VERBOSE * Support glob expressions in USE_GETTEXT to allow more flexibility in the face of future gratuitous library version bumps by the gettext developers: USE_GETTEXT=yEs # Works as before (case-insensitive) USE_GETTEXT=[5-7] # Accepts any of those libintl.so.x versions # in the LIB_DEPENDS * Extend 'make search' support to allow much more flexible searching From the PR: Besides the good old key and name variables, this patch adds support for path, info, maint, cat, bdeps, and rdeps, which match on the appropriate fields, plus their exclusion counterparts: xkey, xname, etc. Examples: Find all ports whose names contain "pear-" but not "html" or "http": make search name=pear- xname='ht(tp|ml)' Find ports whose names contain "pear-" and which don't have apache listed in build-time dependencies: make search name=pear- xbdeps=apache The positive variables (name, key, maint, etc) are AND-ed, their negative versions are OR-ed; in other words, matching any x- variable will cause the port to be skipped, mismatch on any non-x- variable will cause it to be skipped. Examples: Find ports that are both in the 'www' category and maintained by Thierry Thomas: make search maint=thierry@ path=/www/ Find ports in the 'archivers' category that are either not orphaned or don't have "zip" in their names (contrived): make search cat=archivers xmaint=ports@freebsd xname=zip It is possible to select fields to display. Example: Find PEAR ports that don't build-depend on apache, displaying only Port:, Path:, and Info: lines: make search name=pear- xbdeps=apache display=name,path,info Case-sensitivity can now be turned of with icase=1. Example: Find ports with @freebsd.org maintainer addresses without the "proper" capitalization (@FreeBSD.org), display their paths and maintainer addresses: make search maint=@freebsd\\.org icase=0 display=maint,path The key and xkey variables can be limited in scope to displayed fields by setting keylim to 1. Example: Find ports that contain "apache" in either of the name, path, info fields, ignore the rest of the record (dependencies, maintainer address, etc): make search key=apache display=name,path,info keylim=1 The following variables can be set e.g. in /etc/make.conf to control default search behavior: PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps PORTSEARCH_KEYLIM?=0 PORTSEARCH_XKEYLIM?=0 PORTSEARCH_IGNORECASE?=1 * Extend USE_PERL5_BUILD and USE_PERL5 to add EXTRACT and PATCH dependencies * While building index, treat non-existent dependencies as fatal. Previously the error was being hidden by the stderr redirection. * Don't always retry BROKEN ports when package building (it is taking too much time to continually rebuild ports that are usually going to really be broken). Set TRYBROKEN if you want to attempt a build of a BROKEN port. 20040604: AUTHOR: ade@FreeBSD.org Over the past few weeks, we have been testing the next incarnation of ports/Mk/bsd.autotools.mk on the road to bringing at least some semblance of sanity back to this corner of the ports collection. By far and away the easiest way to see the changes will be to view the new file once committed, but here is a summary of the changes: 1. USE_LIBTOOL, USE_AUTOCONF, USE_AUTOHEADER, USE_AUTOMAKE have been fully deprecated. Ports attempting to use these variables after the commit will error out, and most obviously break INDEX generation, with a helpful error message. Instead, ports must now specifically choose the version of any of these tools that they need with the corresponding USE_*_VER variables. Note that these variables understand any and all versions of autotools ports in the tree, there is no longer a need to have specific version numbers hardcoded in the infrastructure of bsd.autotools.mk (as there is now). In particular, this will immediately open up automake18 and autoconf259 for general use and beating. 2. Similarly for WANT_LIBTOOL, WANT_AUTOCONF, and WANT_AUTOMAKE. Again, these have been fully deprecated, and the equivalent WANT_*_VER versions should be used. In order to preserve existing behavior for these variables, please note the 20040314 entry in ports/CHANGES for the appropriate version numbers to use for any ports in the GNATS queue. Both WANT_* and USE_* bring in the relevant tool as a build dependency, and set up a reasonably large number of variables pointing to the right programs to be using in the port. The only difference at the moment, is that USE_* will run an extra autotools-related configuration step, whereas WANT_* merely requests the environment. 3. The helper knob USE_LIBLTDL has been added which currently simply adds a LIB dependency on the libltdl port. 4. Three new variables have been introduced, WANT_{LIBTOOL,AUTOCONF,AUTOMAKE}_RUN=yes. These variables will do nothing by themselves (a Work-In-Progress), but if the appropriate autotool version is defined (either through WANT_*_VER or USE_*_VER), this will add the relevant dependency to RUN_DEPENDS. Steps 3 and 4 now essentially negate the need for any kind of direct dependency within a non-autotools port Makefile on devel/autoconf*, devel/automake*, devel/libtool*, and devel/libltdl. 20040416: AUTHOR: java@FreeBSD.org There has been a couple of bsd.java.mk tweaks and fixes. . Features from Stage 2 has been removed. A port can no longer use the JDK dependency features by setting JAVA_HOME. Use JAVA_PREFERRED_PORT instead (see below). . The default JDK port now depends on OS version: java/diablo-jdk13 for 4.x, and java/jdk14 for 5.x . It is now possible for the user (and the porters) to define a list of preferred JDK ports to build and run ports. The port will use the first JDK port from the list that matches the requirements specified in the Makefile. JAVA_PREFERRED_PORT contains a list of suitable JDK ports (sorted by preference). Names for JDKs may be found in bsd.java.mk, listed in ${_JAVA_PORTS_ALL} (e.g. "JAVA_PORT_NATIVE_BSDJAVA_1_4"). . JAVA_PORT_VERSION is now set to the full version number of the chosen JDK (e.g. "1.4.2"). Porters will find hints regarding how to obtain the same behavior as before in the header of bsd.java.mk. 20040414: AUTHOR: gnome@FreeBSD.org When writing a port that uses GTK+ 2.X, you can now list the dependency with "USE_GNOME=gtk20" which is preferable to LIB_DEPENDS because the GTK+ library version only needs to be changed in bsd.gnome.mk. Please see http://www.FreeBSD.org/gnome/docs/porting.html for all the available GNOME components as well as detailed instructions on creating ports that use the GNOME infrastructure. 20040404: AUTHOR: gnome@FreeBSD.org The glib20 and gtk20 ports were updated to 2.4.0. This new version is completely source and binary compatible with the previous 2.2.x series. However, certain API calls have been deprecated. If your port defines the following macros, they may refuse to build with the new versions of glib20 and gtk20: GTK_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED G_DISABLE_DEPRECATED The temporary solution is to either patch your port's Makefiles to, or use an in-place regular expression to remove these macros. The more permanent solution is to wait until the port's authors update their code to use current API calls. 20040402: AUTHOR: java@FreeBSD.org There has been a big update to bsd.java.mk. However, this update is mostly backwards compatible, so it shouldn't affect most java port maintainers. There is some new functionality and minor changes worth documenting here though. bsd.java.mk now provides a new set of macros to be used by ports that require a JDK. When USE_JAVA is set, the following variables may be set in order to give to precision regarding the requirements of the port: . JAVA_VERSION A list of space-separated suitable java versions for the port. An optional "+" allows you to specify a range of versions. (allowed values: 1.1[+] 1.2[+] 1.3[+] 1.4[+]) (NOTE: Used to be set by bsd.java.mk) . JAVA_OS A list of space-separated suitable JDK port operating systems for the port. (allowed values: native linux) (NOTE: Used to be set by bsd.java.mk) . JAVA_VENDOR A list of space-separated suitable JDK port vendors for the port. (allowed values: freebsd bsdjava sun ibm blackdown) (NOTE: Used to be set by bsd.java.mk) . JAVA_BUILD When set, it means that the selected JDK port should be added to build dependencies for the port. . JAVA_RUN This variable works exactly the same as JAVA_BUILD but regarding run dependencies. Here are some of the macros defined after setting USE_JAVA: . JAVA_PORT The name of the JDK port (e.g. java/jdk14) . JAVA_HOME The home of the JDK port in the local base . JAVA_PORT_VERSION The version of the JDK port. (NOTE: Used to be JAVA_VERSION, see above) . JAVA_PORT_OS The operating system used by the JDK port. (NOTE: Used to be JAVA_OS, see above) . JAVA_PORT_VENDOR The vendor of the JDK port. (NOTE: Used to be JAVA_VENDOR, see above) Plus many macros for the commonly used java executables: APPLETVIEWER, JAR, JAVA, JAVAC, JAVADOC, JAVAH, JAVAP, JAVA_KEYTOOL, JAVA_N2A, JAVA_POLICYTOOL, JAVA_SERIALVER, RMIC, RMID and RMIREGISTRY. bsd.java.mk 2.0 is mostly backward compatible with the previous version, save for the notes above and changed internal variables. Using the new features is strongly encouraged, since the old bsd.java.mk 1.0 features will be deprecated and may be removed in the future. You will find more detailed info (as well as a quick tutorial) at: http://www.esil.univ-mrs.fr/~hquiroz/freebsd/bsd.java.mk-2.0.html 20040316: AUTHOR: gnome@FreeBSD.org The print/freetype2 port has been updated to 2.1.7. This update changes some of the internal FreeType API. Applications may need to be patched to support this new API. If a source files includes freetype/freetype.h, make sure ft2build.h is included before freetype/freetype.h. The proper way to do this is: #include #include FT_FREETYPE_H However, the following will work as well, but is deprecated: #include #include 20040314: AUTHOR: ade@FreeBSD.org USE_LIBTOOL, USE_AUTOCONF, and USE_AUTOMAKE are now considered deprecated, and will be removed on or around June 1st 2004. All ports should now choose the specific version of the tool, using USE_LIBTOOL_VER, USE_AUTOCONF_VER, and USE_AUTOMAKE_VER. The old "system default" behavior can be written as follows: Old New USE_LIBTOOL=yes USE_LIBTOOL_VER=13 USE_AUTOCONF=yes USE_AUTOCONF_VER=213 USE_AUTOMAKE=yes USE_AUTOMAKE_VER=14 20040304: AUTHOR: eik@FreeBSD.org New variable MASTER_SITE_SOURCEFORGE_EXTENDED. It has the ten official sourceforge.net download mirrors, whereas MASTER_SITE_SOURCEFORGE only has five. To check if your port is mirrored there, go to click on ${DISTFILES} and you'll see five or ten mirrors, corresponding to the variables above. 20040226: AUTHOR: knu@FreeBSD.org The default version of Ruby is now 1.8 on all platforms including the i386. Users on the i386 platform need to follow the instructions described in the UPDATING file to cope with this upgrade. Next time ruby is major upgraded, you won't need to do this kind of messy work because some subtle changes have been made to the ruby port infrastructure to make it easier to handle multiple versions of ruby. 20040217: AUTHOR: gnome@FreeBSD.org Mozilla will now default to using GTK2, and will only compile against Gtk+-1.2 if explicitly requested. This is in exact opposite to the old behavior. The valid values of WITH_MOZILLA are now: mozilla (www/mozilla, GTK2) mozilla-devel (www/mozilla-devel, GTK2) mozilla-gtk1 (www/mozilla-gtk1, GTK1) mozilla-devel-gtk1 (www/mozilla-devel-gtk1, GTK1) As before, WITH_MOZILLA can be set in /etc/make.conf, but doing so is not advised unless you desire the development versions. GTK2 browsers will automatically compile against GTK2 mozilla, and GTK1 browsers (galeon1, galeon1, and galeon1) will automatically compile against GTK1. Again, the only people who will need to take action are those who desire development versions (which are inactive at this time anyway). Those who want GTK1 mozilla-devel must set WITH_MOZILLA=mozilla-devel-gtk1 or they will be pleasantly surprised with their very own GTK2 installation on the next update. WITH_MOZILLA=mozilla-gtk2 and WITH_MOZILLA=mozilla-devel-gtk2 are still honored for the time being, but their use is now deprecated. Any new ports are not required to consider their values, and so eventually WITH_MOZILLA _will_ have to be changed. Hopefully galeon2 can catch up to peoples' expectations from galeon1 soon, and we can remove the GTK1 ports altogether. 20040204: AUTHOR: portmgr@FreeBSD.org The bsd.php.mk file has been moved out of the lang/php4 port into the Mk directory. This will make it much easier to include PHP support in PHP-dependent ports. Instead of including bsd.php.mk directly, a port can simply set USE_PHP=yes, and the ports system with Do the Right Thing. All trailing whitespace has been removed from bsd.port.mk. Enhance the new OPTIONS code by only including saved options if the port defines OPTIONS, attempt to use LATEST_LINK as the unique name for a port (fall back to ${PKGNAMEPREFIX}${PORTNAME} otherwise), bring the ===> messages in line with the existing ones by using PKGNAME instead of PORTNAME, use PKGNAME in the dialog, use ECHO_CMD instead of ECHO_MSG to write the OPTIONSFILE, display a message during compilation indicating that user-specified options have been found, and make the output of the showconfig target a little more user-friendly. A new USE_ICONV macro has been added that takes the place of an explicit LIB_DEPENDS on converters/libiconv. This will help with future shared lib version bumps. A new USE_GETTEXT macro has been added that takes the place of an explicit LIB_DEPENDS on devel/gettext. This will help with future shared lib version bumps. Module::Build is a system for building, testing, and installing Perl modules. It will eventually replace the obsoleted ExtUtils::MakeMaker. Many new Perl modules have already switched to using Build.PL instead of Makefile.PL. To facilitate building those modules, a new PERL_MODBUILD macro has been added. Use that in place of PERL_CONFIGURE when porting Perl modules that make use of the Module::Build framework. Certain ports want to check for the availability of SDL libraries before including them. This change adds a new WANT_SDL macro similar to WANT_GNOME. By setting this, the porter indicates that her port can optional use SDL if present on the system. WANT_SDL should be defined _before_ bsd.port.pre.mk is included. After including bsd.port.pre.mk, the list of available SDL components will be returned in the HAVE_SDL macro. For details on how to process this component list, refer to bsd.sdl.mk. The OpenBSD and NetBSD projects diverged from the FreeBSD ports tree years ago, and it no longer make sense to include obsolete references to incorrect paths in the FreeBSD ports system. This change removes the NetBSD and OpenBSD PORTSDIR compatibility bits from bsd.port.mk. The comment for PKGDIR read, ``A direction containing any package creating file.'' The word ``direction'' should be ``directory.'' This has been fixed. A new DIRNAME macro has been added that points to /usr/bin/dirname. All direct use of dirname in ports can be switched to this macro. Direct use of commands dirname, id, and rm have been corrected to use their macro equivalents instead. Some useless ${HEAD} -n 1 statements have been removed. A strange comment in the do-install target and an out of place ``fi'' have been fixed as well. On 5-CURRENT after the 5.2-RELEASE split, the default Perl version has been updated from 5.6.1 to 5.8.2. As well, some Perl definitions in bsd.port.mk have been moved to their correct locations which corrects the PERL_LEVEL definition. The following optimizations have been added to the ports system to speed up recursive operations such as make describe, make index, make ignorelist, etc. bsd.gnome.mk is now only included if a port defines USE_GNOME, WANT_GNOME, and/or USE_GTK. More variables are cached and passed down through bsd.port.subdir.mk. Perl is no longer invoked when a simple ``echo'' will do. More subshell variable assignments have been hidden behind conditionals so that the commands are not spawned every time. Finally, dependency lists are only constructed if ports actually declare dependencies. These optimizations give make index approximately a 43% speedup. If CPUFLAGS is not defined (this _CPUCFLAGS is empty), trying to remove _CPUCFLAGS from CFLAGS will result in an error. This change fixes that. On recent versions of 5.X, /etc/rc.subr exists, and there is no reason to install another copy in ${LOCALBASE}/etc. The reason this was ever done was to workaround some build issues on bento. However, testing OSVERSION seems to work in spite of those build issues. The ports system now supports MySQL 3.23, 4.0, 4.1, and 5.0. Also, the ability to scale to newer versions was also but in place. An .endif comment indicated that the .if block checked WANT_MYSQL when, in fact, it was checking WANT_MYSQL_VER. This has been corrected. The PTHREAD{CFLAGS,LIBS} macros have been made overridable on all versions of FreeBSD to allow for alternate threading implementations (e.g. -lc_r, -lthr, -mt, etc.). The default threading library has been changed to -lpthread from -lc_r on -CURRENT. The new SIZE support broke distfiles fetching on FreeBSD < 4.8. On those versions of FreeBSD, the SIZE distfile attribute is now ignored. Also, defining DISABLE_SIZE in, for example, /etc/make.conf, will ignore the SIZE attribute on all versions of FreeBSD. This is useful with alternate values for FETCH_CMD. A new vulnerabilities database has been added to the ports system in order to keep more accurate, up-to-date, track of security vulnerabilities. The ports system now knows how to query that database and dynamically prevents the installation of vulnerable ports. In order to allow for more rapid development of the package tools, the ports system will prefer to use pkg_* tools found in ${LOCALBASE} over those in the base system. However, all PKG_* macros are still overridable. A new physical category, net-mgmt, has been created to house network management ports. The /var/db/port.mkversion file never really took off, and is now very obsolete. Replace the code used to generate and check this file with a simple OSVERSION check. The ports system now requires FreeBSD 4.3 or higher. The last round of bsd.*.mk changes broke ports that had duplicate distinfo entries (e.g. linux_base). This is now fixed. Along with this fix, only distfiles with a bad checksum will be refetched, where as distfiles missing from distinfo will not be refetched. The PLIST_{DIRS,FILES} macros were passed to the final package list unchanged by PLIST_SUB. This is not always desirable. Now, those macros are passed through PLIST_SUB. The previous OPTIONS code assumed users would be running port build as root. If this was not the case, OPTIONS configuration would fail. Now, the bits of the config and rmconfig targets that require write access to system directories are run under SU_CMD. The makesum target will now add a SIZE attribute for each distfile by default. This can be overridden by defining NO_SIZE in a port's Makefile. Note: this could probably be expanded to omit SIZE attributes for specific distfiles in the future. 20040129: AUTHOR: trevor@FreeBSD.org SIZE lines in distinfo files: if you set USE_SIZE when you do "make makesum", the byte sizes of the distfiles will be listed in the distinfo file. Then, if a distfile is replaced on its master site with one of a different size than that listed, "make fetch" will fail with a "size mismatch" error before downloading the file and the user will be asked to fetch the file by hand. Also, a user will know the size of the distfiles before fetching and decide to fetch later. 20040129: AUTHOR: erwin@FreeBSD.org Start of CHANGES file. FORMAT: This file contains a list, in reverse chronological order, of major breakages or added features in tracking ports. Not all things will be listed here, and it only starts on January 29, 2004. Copyright information: Copyright 2004-2020 FreeBSD Foundation All Rights Reserved. Redistribution, publication, translation and use, with or without modification, in full or in part, in any form or format of this document are permitted without further permission from the author. THIS DOCUMENT IS PROVIDED BY FREEBSD FOUNDATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Contact portmgr@FreeBSD.org if you have any questions about your use of this document. diff --git a/Mk/Uses/angr.mk b/Mk/Uses/angr.mk index a1e41b042dae..6a5ae2a433ea 100644 --- a/Mk/Uses/angr.mk +++ b/Mk/Uses/angr.mk @@ -1,65 +1,65 @@ # Shared namespace for angr-related ports. # # Feature: angr # Usage: USES=angr[:ARGS] # Valid ARGS: binaries, nose # # binaries The port requires the special angr binaries to be present for # testing. # nose The port is using nosetests for the test target. # # Variables, which can be set by the port: # # ANGR_VERSION - The version of the angr project programs. # ANGR_BINARIES_TAGNAME - The tagname of the angr binaries. # ANGR_NOSETESTS - The path to the nosetests program. # # Other information: # - USES=angr:nose implies USES=python:test unless USES=python has already # been specified yet. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ANGR_MK) _INCLUDE_USES_ANGR_MK= yes # Arguments validation. _valid_ARGS= binaries nose . for _arg in ${angr_ARGS} . if !${_valid_ARGS:M${_arg}} IGNORE= USES=angr: invalid argument: ${_arg} . endif . endfor # Set the default angr version for all angr-related ports. ANGR_VERSION?= 9.0.5405 ANGR_BINARIES_TAGNAME?= v${ANGR_VERSION} . if "${angr_ARGS:Mbinaries}" != "" USE_GITHUB?= yes GH_TUPLE+= angr:binaries:${ANGR_BINARIES_TAGNAME}:binaries # Provide the binaries directory where it is expected by the test scripts. pre-test: angr-provide-test-binaries angr-provide-test-binaries: @${LN} -Fs ${WRKSRC_binaries} ${WRKDIR}/binaries . endif # "${angr_ARGS:Mbinaries}" != "" . if "${angr_ARGS:Mnose}" != "" # Ensure that python.mk variables are available. . if !${USES:Mpython*} python_ARGS= test _USES_POST+= python:test .include "${USESDIR}/python.mk" . endif # !${USES:Mpython*} TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} TEST_WRKSRC?= ${WRKSRC}/tests ANGR_NOSETESTS?= nosetests-${PYTHON_VER} do-test: - @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) + @(cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${ANGR_NOSETESTS}) . endif # "${angr_ARGS:Mnose}" != "" .endif diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index e91e4522e8f7..2ee0596e0a6e 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -1,361 +1,361 @@ # Provide support for building Haskell packages using Cabal. # # Feature: cabal # Usage: USES=cabal or USES=cabal:ARGS # Valid ARGS: hpack, nodefault # # hpack: The port doesn't have a .cabal file and needs devel/hs-hpack to # generate it from package.yaml file # nodefault: Do not fetch the default distribution file from Hackage. If # USE_GITHUB or USE_GITLAB is specified in the port, this argument # is implied. # # Variables, which can be set by the port: # # USE_CABAL List of Haskell packages required to build a port. # Should be listed along with version, like profunctors-5.3 # Package revision can be specified too with # usual "_" syntax: invariant-0.5.1_1 # When creating a new port, the initial list can be built # using make-use-cabal auxiliary target. # # CABAL_REVISION Specifies a Haskell package revision. Set this to an # integer to pull in revised .cabal file from Hackage. # # CABAL_FLAGS List of Cabal flags to be passed verbatim into --flags # argument of cabal-install utility. Used for both # cabal configure and cabal build. # # CABAL_EXECUTABLES List of executable Cabal targets to be built and installed. # Consult the .cabal file of the project being ported to find # out possible values for this variable. # default: ${PORTNAME} # # HACKAGE_DISTNAME Use this knob if PORTNAME or PORTVERSION doesn't match # with package name and version on Hackage. # default: ${PORTNAME}-${PORTVERSION} # # opt_USE_CABAL Variant of USE_CABAL to be used with options framework. # opt_CABAL_FLAGS Variant of CABAL_FLAGS to be used with options framework. # Note that it works a bit differently from CABAL_FLAGS: # it appends "${opt_CABAL_FLAGS}" when the option is enabled # and "-${opt_CABAL_FLAGS}" otherwise. # opt_CABAL_EXECUTABLES Variant of CABAL_EXECUTABLES to be used with # options framework. # # CABAL_WRAPPER_SCRIPTS A subset of ${CABAL_EXECUTABLES} containing Haskell # programs to be wrapped into a shell script that sets # *_datadir environment variables before running the program. # This is needed for Haskell programs that install their # data files under share/ directory. # # FOO_DATADIR_VARS Additional environment vars to add to FOO executable's # wrapper script. # # CABAL_PROJECT Sets how to treat existing cabal.project file. Possible # values are "remove" and "append". # # SKIP_CABAL_PLIST Set to "yes" to prevent Haskell executables from being # added to the pkg-plist automatically. # # MAINTAINER: haskell@FreeBSD.org .if !defined(_INCLUDE_USES_CABAL_MK) _INCLUDE_USES_CABAL_MK= yes _valid_ARGS= hpack nodefault _cabal_project_valid_VALUES= append remove . for arg in ${cabal_ARGS} . if !${_valid_ARGS:M${arg}} IGNORE= USES=cabal: invalid arguments: ${arg} . endif . endfor . if defined(CABAL_PROJECT) && !${_cabal_project_valid_VALUES:M${CABAL_PROJECT}} IGNORE= CABAL_PROJECT: invalid value: ${CABAL_PROJECT} . endif . if ${ARCH} == i386 && defined(USE_CABAL) && ${USE_CABAL:Mbasement-0.0.1[4-5]} # Upstream issue: https://github.com/haskell-foundation/foundation/issues/565 BROKEN= ${USE_CABAL:Mbasement-0.0.1[4-5]} package doesn't compile on i386 . endif PKGNAMEPREFIX?= hs- CABAL_EXECUTABLES?= ${PORTNAME} CABAL_CMD?= cabal CABAL_PORT= devel/hs-cabal-install CABAL_HOME= ${WRKDIR}/cabal-home CABAL_HOME_ENV=XDG_DATA_HOME=${CABAL_HOME} XDG_CONFIG_HOME=${CABAL_HOME} XDG_CACHE_HOME=${CABAL_HOME} HOME=${CABAL_HOME} CABAL_LIBEXEC= libexec/cabal CABAL_EXTRACT_SUFX= .tar.gz CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} CABAL_DEPSDIR= ${WRKSRC}/${CABAL_DEPS_SUBDIR} CABAL_DEPS_SUBDIR= _cabal_deps # A special cookie used to signify that the user is a maintainer updating the port # using cabal-* targets. The presense of this cookie disables cabal-post-patch. CABAL_COOKIE= ${WRKDIR}/.cabal_update_done.${PORTNAME}.${PREFIX:S/\//_/g} HPACK_CMD?= hpack _CABAL2TUPLE_CMD= cabal2tuple . if defined(BUILD_DEPENDS) && ${BUILD_DEPENDS:Mghc?*\:lang/ghc?*} CABAL_WITH_ARGS= --with-compiler=${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} \ --with-hsc2hs=${LOCALBASE}/bin/hsc2hs-${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} . else BUILD_DEPENDS+= ghc:lang/ghc . endif . if "${PORTNAME}" != "cabal-install" BUILD_DEPENDS+= cabal:${CABAL_PORT} . endif . if ${cabal_ARGS:Mhpack} EXTRACT_DEPENDS+= hpack:devel/hs-hpack . endif # Inherited via lang/ghc we need to depend on libffi.so and libgmp.so (stage q/a) LIB_DEPENDS+= libgmp.so:math/gmp \ libffi.so:devel/libffi DIST_SUBDIR?= cabal . if !defined(USE_GITHUB) && !defined(USE_GITLAB) && !${cabal_ARGS:Mnodefault} _hackage_is_default= yes . else _hackage_is_default= no . endif . if defined(HACKAGE_DISTNAME) && ${_hackage_is_default} == no IGNORE= HACKAGE_DISTNAME is set, but it makes no sense if the default MASTER_SITES isn't HACKAGE . endif MASTER_SITES+= HACKAGE/${_hackage_group} . if defined(HACKAGE_DISTNAME) WRKSRC?= ${WRKDIR}/${HACKAGE_DISTNAME} . endif HACKAGE_DISTNAME?= ${PORTNAME}-${PORTVERSION} . if ${_hackage_is_default} == yes DISTFILES+= ${HACKAGE_DISTNAME}/${HACKAGE_DISTNAME}${CABAL_EXTRACT_SUFX} . ifdef CABAL_REVISION DISTFILES+= ${HACKAGE_DISTNAME}/revision/${CABAL_REVISION}.cabal . endif . else _hackage_group= :cabal_mk_hackage . endif _USES_extract= 701:cabal-post-extract _USES_patch= 701:cabal-post-patch _USES_configure=301:cabal-pre-configure _USES_stage= 751:cabal-post-install-script BUILD_TARGET?= ${CABAL_EXECUTABLES:S/^/exe:&/} _use_cabal= ${USE_CABAL:O:u} . for package in ${_use_cabal} . for pkg_without_group xgroup in ${package:C/:.*$$//} x${package:S/${package:C/:.*$$//}//:C/^.*://} . for pkg_name xrev in ${pkg_without_group:C/_[0-9]+//} x${pkg_without_group:C/[^_]*//:S/_//} . if ${xgroup} == "x" DISTFILES+= ${pkg_name}/${pkg_name}${CABAL_EXTRACT_SUFX}${_hackage_group} . if ${xrev} != "x" DISTFILES+= ${pkg_name}/revision/${xrev:S/^x//}.cabal${_hackage_group} . endif . else DISTFILES+= ${pkg_name}${CABAL_EXTRACT_SUFX}:${xgroup:S/^x//} . if ${xrev} != "x" DISTFILES+= ${pkg_name}/revision/${xrev:S/^x//}.cabal:${xgroup:S/^x//} . endif . endif # ${xgroup} == "x" _CABAL_EXTRACT_ONLY+= ${pkg_name}/${pkg_name}${CABAL_EXTRACT_SUFX} . endfor . endfor . endfor . if !defined(EXTRACT_ONLY) EXTRACT_ONLY= ${_DISTFILES:N*\.cabal} . else . if !defined(SKIP_CABAL_EXTRACT) EXTRACT_ONLY+= ${_CABAL_EXTRACT_ONLY} . endif . endif . if defined(CABAL_REPOSITORIES) && !empty(CABAL_REPOSITORIES) . for r in ${CABAL_REPOSITORIES} CABAL2TUPLE_ARGS+= --group=${r} --master-site=${MASTER_SITES:M*\:${r}:[1]:S/:${r}//:S|/package/||} . endfor . endif # Auxiliary targets used during port creation/updating. # Populates Haskell package list from Hackage. # Fetches and unpacks package source from Hackage using only PORTNAME and PORTVERSION. # If Hackage isn't a default MASTER_SITE (for instance, when USE_GITHUB is present) # this target requires distinfo to be present too. cabal-extract: check-cabal . if ${_hackage_is_default} == no @${ECHO_MSG} "===> Recursing down to make extract" @${MAKE} -C ${.CURDIR} extract SKIP_CABAL_EXTRACT=yes USE_CABAL= ${RM} -r ${CABAL_HOME} . endif @${ECHO_MSG} "===> Fetching Hackage index into ${CABAL_HOME}/.cabal" - ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update . if ${_hackage_is_default} == yes cd ${WRKDIR} && \ - ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${HACKAGE_DISTNAME} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${HACKAGE_DISTNAME} . else . if ${cabal_ARGS:Mhpack} @${ECHO_MSG} "===> Running ${HPACK_CMD} to generate .cabal file" - cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} ${HPACK_CMD} + cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${HPACK_CMD} . endif . endif # Remove Haskell dependencies that come from GH_TUPLE @${RM} -r ${WRKSRC}/dist-newstyle . ifdef CABAL_REPOSITORIES @${ECHO_MSG} "===> Fetching additional Cabal repositories index into ${CABAL_HOME}/.cabal" @cd ${WRKSRC} && \ - ${SETENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update . endif # Create a cookie for cabal-post-patch @${TOUCH} ${EXTRACT_COOKIE} ${CABAL_COOKIE} # Calls cabal build --dry-run on the Haskell package located in ${WRKSRC} # This is a Cabal way of doing configure step of the building process # This pulls in all source dependencies, resolves them and generates build plan cabal-configure: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} # Calls cabal build on the Haskell package located in ${WRKSRC} cabal-build: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} # Generates USE_CABAL= ... line ready to be pasted into the port based on the plan.json file generated by cabal configure. make-use-cabal: check-cabal2tuple @${ECHO_MSG} "===> Processing plan.json" @${_CABAL2TUPLE_CMD} ${CABAL2TUPLE_ARGS} ${WRKSRC} || (${ECHO_CMD} "Did you forget to make cabal-configure ?" ; exit 1) . if ${_hackage_is_default} == yes @if ${GREP} -q 'x-revision' ${WRKSRC}/*.cabal; then \ ${ECHO_MSG} "Downloaded .cabal file contains x-revision, make sure to add CABAL_REVISION=" `${GREP} 'x-revision' ${WRKSRC}/*.cabal | ${SED} -e s/x-revision://`; \ fi . endif check-cabal: @if ! type ${CABAL_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> cabal executable not found, install ${CABAL_PORT} or set CABAL_CMD"; exit 1; \ fi; \ check-cabal2tuple: @if ! type ${_CABAL2TUPLE_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> cabal2tuple executable not found, install \"ports-mgmt/hs-cabal2tuple\""; exit 1; \ fi # Main targets implementation. cabal-post-extract: . if !defined(SKIP_CABAL_EXTRACT) . if "${CABAL_PROJECT}" == "remove" # Remove the project file if requested ${RM} ${WRKSRC}/cabal.project . endif . ifndef(CABAL_PROJECT) @${TEST} ! -f ${WRKSRC}/cabal.project || \ (${ECHO_CMD} "cabal.project file is already present in WRKSRC! Set CABAL_PROJECT variable." && false) . endif # Copy revised .cabal file if present . if defined(CABAL_REVISION) && ${_hackage_is_default} == yes ${CP} ${DISTDIR}/${DIST_SUBDIR}/${HACKAGE_DISTNAME}/revision/${CABAL_REVISION}.cabal `find ${WRKSRC} -name '*.cabal' -depth 1` . endif # Move extracted dependencies into ${CABAL_DEPSDIR} directory ${MKDIR} ${CABAL_DEPSDIR} . for package in ${_use_cabal} . for pkg_without_group in ${package:C/:.*$$//} . for pkg_name xrev in ${pkg_without_group:C/_[0-9]+//} x${pkg_without_group:C/[^_]*//:S/_//} # Copy revised .cabal file if present . if ${xrev} != "x" ${CP} ${DISTDIR}/${DIST_SUBDIR}/${pkg_name}/revision/${xrev:S/^x//}.cabal `find ${WRKDIR}/${pkg_name} -name '*.cabal' -depth 1` . endif # Move the dependency source itself cd ${WRKDIR} && \ ${MV} ${pkg_name} ${CABAL_DEPSDIR}/ . endfor . endfor . endfor # Create the cabal-install config ${MKDIR} ${CABAL_HOME}/.cabal ${ECHO_CMD} "jobs: ${MAKE_JOBS_NUMBER}" > ${CABAL_HOME}/.cabal/config . endif # SKIP_CABAL_EXTRACT cabal-post-patch: . if !defined(SKIP_CABAL_EXTRACT) @${TEST} ! -f ${CABAL_COOKIE} || \ (${ECHO_CMD} "===> Patching done, skipping cabal-post-patch" && false) # Append our stuff to possibly existing cabal.project.local ${ECHO_CMD} "" >> ${WRKSRC}/cabal.project.local ${ECHO_CMD} "-- added by USES=cabal" >> ${WRKSRC}/cabal.project.local ${ECHO_CMD} "packages:" >> ${WRKSRC}/cabal.project.local . for package in ${_use_cabal} . for pkg_without_group in ${package:C/:.*$$//} . for pkg_name in ${pkg_without_group:C/_[0-9]+//} ${ECHO_CMD} " ${CABAL_DEPS_SUBDIR}/${pkg_name}" >> ${WRKSRC}/cabal.project.local . endfor . endfor . endfor . endif # SKIP_CABAL_EXTRACT && !CABAL_COOKIE cabal-pre-configure: # Generate .cabal file with hpack if requested . if ${cabal_ARGS:Mhpack} - cd ${WRKSRC} && ${SETENV} ${CABAL_HOME_ENV} hpack + cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} hpack . endif . if !target(do-build) do-build: cd ${WRKSRC} && \ - ${SETENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} . endif . if !target(do-install) do-install: . if defined(CABAL_WRAPPER_SCRIPTS) && !empty(CABAL_WRAPPER_SCRIPTS) ${MKDIR} ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC} . endif . for exe in ${CABAL_EXECUTABLES} . if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${INSTALL_PROGRAM} \ $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC}/${exe} ${ECHO_CMD} '#!/bin/sh' > ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'export ${exe:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} . for dep in ${${exe}_DATADIR_VARS} ${ECHO_CMD} 'export ${dep:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} . endfor ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'exec ${PREFIX}/${CABAL_LIBEXEC}/${exe} "$$@"' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${exe} . else ${INSTALL_PROGRAM} \ $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ ${STAGEDIR}${PREFIX}/bin/${exe} . endif . endfor . endif . if !defined(SKIP_CABAL_PLIST) cabal-post-install-script: . for exe in ${CABAL_EXECUTABLES} ${ECHO_CMD} 'bin/${exe}' >> ${TMPPLIST} . if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${ECHO_CMD} '${CABAL_LIBEXEC}/${exe}' >> ${TMPPLIST} . endif . endfor . endif .endif diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index ea012141d66b..ca0a4fef23bd 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -1,415 +1,416 @@ # This file contains logic to ease porting of Rust packages or # binaries using the `cargo` command. # # Feature: cargo # Usage: USES=cargo # Valid ARGS: none # # MAINTAINER: rust@FreeBSD.org .if !defined(_INCLUDE_USES_CARGO_MK) _INCLUDE_USES_CARGO_MK= yes . if !empty(cargo_ARGS) IGNORE+= USES=cargo takes no arguments . endif .sinclude "${MASTERDIR}/Makefile.crates" # List of static dependencies. The format is cratename-version. # CARGO_CRATES will be downloaded from MASTER_SITE_CRATESIO. CARGO_CRATES?= # List of features to build (space separated list). # Use special token --no-default-features to disable default # features by passing it to cargo build/install/test. CARGO_FEATURES?= # Name of the local directory for vendoring crates. CARGO_VENDOR_DIR?= ${WRKSRC}/cargo-crates # Default path for cargo manifest. CARGO_CARGOTOML?= ${WRKSRC}/Cargo.toml CARGO_CARGOLOCK?= ${WRKSRC}/Cargo.lock # Save crates inside ${DISTDIR}/rust/crates by default. CARGO_DIST_SUBDIR?= rust/crates # Generate list of DISTFILES. # Prefer canonical file extension .crate going forward . if make(makesum) CARGO_CRATE_EXT= .crate . else # If there is a rust/crates/*.tar.gz in distinfo keep using the old # extension. We need to delay eval until the last moment for # DISTINFO_FILE. We cache the command output to avoid multiple # slow grep runs for every CARGO_CRATE_EXT access. CARGO_CRATE_EXT= ${defined(_CARGO_CRATE_EXT_CACHE):?${_CARGO_CRATE_EXT_CACHE}:${:!if ${GREP} -q '\(${CARGO_DIST_SUBDIR}/.*\.tar\.gz\)' "${DISTINFO_FILE}" 2>/dev/null; then ${ECHO_CMD} .tar.gz; else ${ECHO_CMD} .crate; fi!:_=_CARGO_CRATE_EXT_CACHE}} . endif _CARGO_CRATES:= ${CARGO_CRATES:N*@git+*} _CARGO_GIT_SOURCES:= ${CARGO_CRATES:M*@git+*} # enumerate crates for unqiue and sane distfile group names _CARGO_CRATES:= ${empty(_CARGO_CRATES):?:${_CARGO_CRATES:range:@i@$i ${_CARGO_CRATES:[$i]}@}} # split up crates into (index, crate, name, version) 4-tuples _CARGO_CRATES:= ${_CARGO_CRATES:C/^([-_a-zA-Z0-9]+)-([0-9].*)/\0 \1 \2/} . for _index _crate _name _version in ${_CARGO_CRATES} # Resolving CRATESIO alias is very inefficient with many MASTER_SITES, consume MASTER_SITE_CRATESIO directly MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_name}/${_version},:S,$,:_cargo_${_index},} DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:_cargo_${_index} # Provide pointer to the crate's extraction dir WRKSRC_crate_${_name}= ${CARGO_VENDOR_DIR}/${_crate} # ... also with version suffix in case of multiple versions of the # same crate WRKSRC_crate_${_crate}= ${CARGO_VENDOR_DIR}/${_crate} . endfor _CARGO_AWK= ${AWK} -vCP="${CP}" -vFIND="${FIND}" -vGREP="${GREP}" \ -vCARGO_VENDOR_DIR="${CARGO_VENDOR_DIR}" \ -vGIT_SOURCES="${_CARGO_GIT_SOURCES}" \ -vWRKDIR="${WRKDIR}" -vWRKSRC="${WRKSRC}" \ -f${SCRIPTSDIR}/split-url.awk \ -f${SCRIPTSDIR}/cargo-crates-git-common.awk -f . if !empty(_CARGO_GIT_SOURCES) . for _index _site _filename _wrksrc _crates in ${:!${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-fetch.awk /dev/null!} MASTER_SITES+= ${_site}:_cargo_git${_index} DISTFILES+= ${_filename}:_cargo_git${_index} . for _crate in ${_crates:S/,/ /g} # Make sure the build dependencies checks below can work for git sourced crates too _CARGO_CRATES+= @git ${_crate} ${_crate} @git # Provide pointer to the crate's extraction dir # # This might not point to the actual crate's sources since a # single git source can contain multiple crates. We cannot collect # subdir information until after the full extraction is done and we # cannot set make variables at that point. This is better than # nothing. WRKSRC_crate_${_crate}= ${WRKDIR}/${_wrksrc} . endfor . endfor . endif # Build dependencies. CARGO_BUILDDEP?= yes . if ${CARGO_BUILDDEP:tl} == "yes" BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.76.0:lang/${RUST_DEFAULT} . elif ${CARGO_BUILDDEP:tl} == "any-version" BUILD_DEPENDS+= ${RUST_DEFAULT}>=0:lang/${RUST_DEFAULT} . endif # Location of toolchain (default to lang/rust's toolchain) CARGO?= ${LOCALBASE}/bin/cargo RUSTC?= ${LOCALBASE}/bin/rustc RUSTDOC?= ${LOCALBASE}/bin/rustdoc # Location of the cargo output directory. CARGO_TARGET_DIR?= ${WRKDIR}/target # Default target platform (affects some RUSTFLAGS if passed) CARGO_BUILD_TARGET?= ${_CARGO_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _CARGO_RUST_ARCH_amd64= x86_64 _CARGO_RUST_ARCH_i386= i686 _CARGO_RUST_ARCH_riscv64= riscv64gc # Environment for cargo # - CARGO_HOME: local cache of the registry index # - CARGO_BUILD_JOBS: configure number of jobs to run # - CARGO_TARGET_DIR: location of where to place all generated artifacts # - RUST_BACKTRACE: produce backtraces when something in the build panics # - RUSTC: path of rustc binary (default to lang/rust) # - RUSTDOC: path of rustdoc binary (default to lang/rust) # - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs CARGO_ENV+= \ CARGO_HOME=${WRKDIR}/cargo-home \ CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \ CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ CARGO_TARGET_${CARGO_BUILD_TARGET:S/-/_/g:tu}_LINKER="${CC}" \ RUSTC=${RUSTC} \ RUSTDOC=${RUSTDOC} \ RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:C/.+/-C link-arg=&/}" . if ${ARCH} != powerpc CARGO_ENV+= RUST_BACKTRACE=1 . endif _CARGO_MSG= "===> Additional optimization to port applied" WITH_LTO= yes # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk . if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} . elif ${ARCH:Mpowerpc*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} . elif ${ARCH} == aarch64 || ${ARCH} == armv7 RUSTFLAGS+= -C target-cpu=${CPUTYPE:C/\+.+//g} . else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} . endif # Helper to shorten cargo calls. -_CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} -CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} +_CARGO_RUN= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} +CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} \ + CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${CARGO} # User arguments for cargo targets. CARGO_BUILD_ARGS?= CARGO_INSTALL_ARGS?= CARGO_INSTALL_PATH?= . CARGO_TEST_ARGS?= CARGO_UPDATE_ARGS?= # Use module targets ? CARGO_BUILD?= yes CARGO_CONFIGURE?= yes CARGO_INSTALL?= yes CARGO_TEST?= yes # rustc stashes intermediary files in TMPDIR (default /tmp) which # might cause issues for users that for some reason space limit # their /tmp. WRKDIR should have plenty of space. # Allow users and ports to still overwrite it. . if ${TMPDIR:U/tmp} == /tmp TMPDIR= ${WRKDIR} . endif # Manage crate features. . if !empty(CARGO_FEATURES:M--no-default-features) CARGO_BUILD_ARGS+= --no-default-features CARGO_INSTALL_ARGS+= --no-default-features CARGO_TEST_ARGS+= --no-default-features . endif . if !empty(CARGO_FEATURES:N--no-default-features) CARGO_BUILD_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' . endif . if !defined(WITH_DEBUG) CARGO_BUILD_ARGS+= --release CARGO_TEST_ARGS+= --release . else CARGO_INSTALL_ARGS+= --debug . endif . if ${_CARGO_CRATES:Mcmake} BUILD_DEPENDS+= cmake:devel/cmake-core . endif . if ${_CARGO_CRATES:Mgettext-sys} CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \ GETTEXT_INCLUDE_DIR=${LOCALBASE}/include \ GETTEXT_LIB_DIR=${LOCALBASE}/lib . endif . if ${_CARGO_CRATES:Mjemalloc-sys} BUILD_DEPENDS+= gmake:devel/gmake . endif . if ${_CARGO_CRATES:Mlibgit2-sys} # Use the system's libgit2 instead of building the bundled version CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1 . endif . if ${_CARGO_CRATES:Mlibssh2-sys} # Use the system's libssh2 instead of building the bundled version CARGO_ENV+= LIBSSH2_SYS_USE_PKG_CONFIG=1 . endif . if ${_CARGO_CRATES:Monig_sys} # onig_sys always prefers the system library but will try to link # statically with it. Since devel/oniguruma doesn't provide a static # library it'll link to libonig.so instead. Strictly speaking setting # RUSTONIG_SYSTEM_LIBONIG is not necessary, but will force onig_sys to # always use the system's libonig as returned by `pkg-config oniguruma`. CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 . endif . if ${_CARGO_CRATES:Mopenssl-src} DEV_WARNING+= "Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=${CARGO_CRATES:Mopenssl-src-[0-9]*} (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately." . endif . if ${_CARGO_CRATES:Mopenssl-sys} # Make sure that openssl-sys can find the correct version of OpenSSL CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \ OPENSSL_INCLUDE_DIR=${OPENSSLINC} . endif . if ${_CARGO_CRATES:Mpkg-config} .include "${USESDIR}/pkgconfig.mk" . endif . if ${_CARGO_CRATES:Mzstd-sys} # Use the system's zstd instead of building the bundled version CARGO_ENV+= ZSTD_SYS_USE_PKG_CONFIG=1 . endif . for _index _crate _name _version in ${_CARGO_CRATES} # Split up semantic version and try to sanitize it by removing # pre-release identifier (-) or build metadata (+) . if ${_version:S/./ /:S/./ /:C/[-+].*//:_:[#]} == 3 . for _major _minor _patch in $_ # FreeBSD 12.0 changed ABI: r318736 and r320043 # https://github.com/rust-lang/libc/commit/78f93220d70e # https://github.com/rust-lang/libc/commit/969ad2b73cdc . if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 38)) DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on FreeBSD 12.0. Consider updating to the latest version \(higher than 0.2.37\)." . endif . if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 49)) DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)." . endif # FreeBSD 12.0 updated base OpenSSL in r339270: # https://github.com/sfackler/rust-openssl/commit/276577553501 . if ${_name} == openssl && !exists(${PATCHDIR}/patch-openssl-1.1.1) && ${_major} == 0 && (${_minor} < 10 || (${_minor} == 10 && ${_patch} < 4)) DEV_WARNING+= "CARGO_CRATES=${_crate} does not support OpenSSL 1.1.1. Consider updating to the latest version \(higher than 0.10.3\)." . endif . endfor . endif . endfor _USES_extract+= 600:cargo-extract cargo-extract: # target for preparing crates directory. It will put all crates in # the local crates directory. @${ECHO_MSG} "===> Moving crates to ${CARGO_VENDOR_DIR}" @${MKDIR} ${CARGO_VENDOR_DIR} . for _index _crate _name _version in ${_CARGO_CRATES} . if ${_index} != @git @${MV} ${WRKDIR}/${_crate} ${CARGO_VENDOR_DIR}/${_crate} @${PRINTF} '{"package":"%s","files":{}}' \ $$(${SHA256} -q ${_DISTDIR}/${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}) \ > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json @if [ -r ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig ]; then \ ${MV} ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig \ ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig-cargo; \ fi . endif . endfor . if ${CARGO_CONFIGURE:tl} == "yes" _USES_configure+= 250:cargo-configure # configure hook. Place a config file for overriding crates-io index # by local source directory. cargo-configure: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh . if defined(_CARGO_MSG) @${ECHO_MSG} ${_CARGO_MSG} . endif @${ECHO_MSG} "===> Cargo config:" @${MKDIR} ${WRKDIR}/.cargo @: > ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.cargo]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config.toml . if !empty(_CARGO_GIT_SOURCES) @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-configure.awk \ /dev/null >> ${WRKDIR}/.cargo/config.toml . endif @${CAT} ${WRKDIR}/.cargo/config.toml @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "opt-level = 2" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "debug = false" >> ${CARGO_CARGOTOML}; \ fi @${ECHO_MSG} "===> Updating Cargo.lock" @${CARGO_CARGO_RUN} update \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_UPDATE_ARGS} . endif . if !target(do-build) && ${CARGO_BUILD:tl} == "yes" do-build: @${CARGO_CARGO_RUN} build \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_BUILD_ARGS} . endif . if !target(do-install) && ${CARGO_INSTALL:tl} == "yes" do-install: . for path in ${CARGO_INSTALL_PATH} @${CARGO_CARGO_RUN} install \ --no-track \ --path "${path}" \ --root "${STAGEDIR}${PREFIX}" \ --verbose \ --verbose \ ${CARGO_INSTALL_ARGS} . endfor . endif . if !target(do-test) && ${CARGO_TEST:tl} == "yes" do-test: @${CARGO_CARGO_RUN} test \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_TEST_ARGS} . endif # # Helper targets for port maintainers # # cargo-audit generates a vulnerability report using # security/cargo-audit based on the crates in Cargo.lock. cargo-audit: configure @if ! type cargo-audit > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"security/cargo-audit\""; exit 1; \ fi @${ECHO_MSG} "===> Checking for vulnerable crates" @${CARGO} audit --file ${CARGO_CARGOLOCK} # cargo-crates will output the crates list from Cargo.lock. If there # is no Cargo.lock for some reason, try and generate it first. cargo-crates: cargo-crates-generate-lockfile @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} # cargo-crates-generate-lockfile will try to generate a Cargo.lock file # if it does not exist. cargo-crates-generate-lockfile: extract @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ cd ${WRKSRC}; ${_CARGO_RUN} generate-lockfile \ --manifest-path ${CARGO_CARGOTOML} \ --verbose; \ fi # cargo-crates-licenses will try to grab license information from # all downloaded crates. cargo-crates-licenses: configure @${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ -exec ${GREP} -H '^license' {} \; \ | ${SED} \ -e 's@^${CARGO_VENDOR_DIR}/@@' \ -e 's@/Cargo.toml:license.*= *"@|@' \ -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' # cargo-crates-merge will in-place update CARGO_CRATES in the port # based on the crates list from Cargo.lock. If there is no Cargo.lock # for some reason, try and generate it first. cargo-crates-merge: @if ! type portedit > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/portfmt\""; exit 1; \ fi @${MAKE} clean cargo-crates-generate-lockfile @f="${MASTERDIR}/Makefile"; [ -r "${MASTERDIR}/Makefile.crates" ] && f="${MASTERDIR}/Makefile.crates"; \ ${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | \ portedit merge -i $$f; \ ${MAKE} clean makesum; \ ${ECHO_MSG} "${DISTINFO_FILE} and CARGO_CRATES in $$f were updated"; .endif diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk index d8a13e8f7e7a..8229fa9cbb55 100644 --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -1,184 +1,185 @@ # Provide support for CMake based projects # # Feature: cmake # Usage: USES=cmake or USES=cmake:ARGS # Valid ARGS: insource, run, noninja, testing # ARGS description: # insource do not perform an out-of-source build # noninja don't use ninja instead of make # Setting this should be an exception, and hints to an issue # inside the ports build system. # A few corner cases never use ninja, and are handled, to reduce # the usage of 'noninja'.: # 1) fortran ports # 2) ports that set BUILD_- or INSTALL_WRKSRC to # something different than CONFIGURE_WRKSRC # run add a runtime dependency on cmake # testing add the test target based on ctest # Additionally, CMAKE_TESTING_ON, CMAKE_TESTING_OFF, CMAKE_TESTING_ARGS, CMAKE_TESTING_TARGET # can be defined to override the default values. # _internal Not to be used by any other ports than the ones created from the release-tarball of cmake # # # Additional variables that affect cmake behaviour: # # User defined variables: # CMAKE_NOCOLOR - Disable colour build output # Default: not set, unless BATCH or PACKAGE_BUILDING is defined # # Variables for ports: # CMAKE_ON Appends -D:bool=ON to the CMAKE_ARGS, # CMAKE_OFF Appends -D:bool=OFF to the CMAKE_ARGS. # CMAKE_ARGS - Arguments passed to cmake # Default: see below # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). # Projects may have their own build profiles. # CMake supports the following types: Debug, # Release, RelWithDebInfo and MinSizeRel. # Debug and Release profiles respect system # CFLAGS, RelWithDebInfo and MinSizeRel will set # CFLAGS to "-O2 -g" and "-Os -DNDEBUG". # Default: Release, if WITH_DEBUG is not set, # Debug otherwise # CMAKE_SOURCE_PATH - Path to the source directory # Default: ${WRKSRC} # # MAINTAINER: kde@FreeBSD.org .if !defined(_INCLUDE_USES_CMAKE_MK) _INCLUDE_USES_CMAKE_MK= yes _valid_ARGS= insource run noninja testing _internal _CMAKE_VERSION= 3.28.3 # Sanity check . 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 # Check whehter other flags than only '_internal' are passed (this should be equivalent to PORT = devel/cmake-core . if ${cmake_ARGS} != _internal CMAKE_BIN= ${LOCALBASE}/bin/cmake BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core . if ${cmake_ARGS:Mrun} RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core . endif . if defined(WITH_DEBUG) CMAKE_BUILD_TYPE?= Debug . elif defined(WITH_DEBUGINFO) CMAKE_BUILD_TYPE?= RelWithDebInfo . else CMAKE_BUILD_TYPE?= Release . endif #defined(WITH_DEBUG) PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" . if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO) INSTALL_TARGET?= install/strip . endif CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_C_FLAGS_DEBUG:STRING="${CFLAGS}" \ -DCMAKE_C_FLAGS_RELEASE:STRING="${CFLAGS} -DNDEBUG" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_CXX_FLAGS_DEBUG:STRING="${CXXFLAGS}" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS} -DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \ -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON # Handle the option-like CMAKE_ON and CMAKE_OFF lists. . for _bool_kind in ON OFF . if defined(CMAKE_${_bool_kind}) CMAKE_ARGS+= ${CMAKE_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/} . endif . endfor CMAKE_INSTALL_PREFIX?= ${PREFIX} . if defined(BATCH) || defined(PACKAGE_BUILDING) CMAKE_NOCOLOR= yes . endif . if defined(CMAKE_NOCOLOR) CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF . endif _CMAKE_MSG= "===> Performing in-source build" CMAKE_SOURCE_PATH?= ${WRKSRC} . if empty(cmake_ARGS:Minsource) _CMAKE_MSG= "===> Performing out-of-source build" CONFIGURE_WRKSRC= ${WRKDIR}/.build BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} TEST_WRKSRC?= ${CONFIGURE_WRKSRC} . endif # By default we use the ninja generator. # Except, if cmake:run is set (cmake not wanted as generator) # fortran is used, as the ninja-generator does not handle it. # or if CONFIGURE_WRKSRC does not match BUILD_WRKSRC or INSTALL_WRKSRC # as the build.ninja file won't be where ninja expects it. . if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) . if "${CONFIGURE_WRKSRC}" == "${BUILD_WRKSRC}" && "${CONFIGURE_WRKSRC}" == "${INSTALL_WRKSRC}" # USES=gmake sets MAKE_CMD and ninja.mk does too (it also messes with MAKEFILE and MAKE_CMD). . if ! empty(USES:Mgmake) BROKEN= USES=gmake is incompatible with cmake's ninja-generator (try cmake:noninja) . endif # USES=emacs appends EMACS= to MAKE_ARGS, which then get passed to ninja. # Since ninja doesn't support that kind of variable-setting on the command-line, # it errors out. . if ! empty(USES:Memacs) BROKEN= USES=emacs is incompatible with cmake's ninja-generator (try cmake:noninja) . endif . include "${USESDIR}/ninja.mk" . endif . endif . 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} + @cd ${CONFIGURE_WRKSRC}; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} \ + ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} . endif . if !target(do-test) && ${cmake_ARGS:Mtesting} CMAKE_TESTING_ON?= BUILD_TESTING CMAKE_TESTING_TARGET?= test # Handle the option-like CMAKE_TESTING_ON and CMAKE_TESTING_OFF lists. . for _bool_kind in ON OFF . if defined(CMAKE_TESTING_${_bool_kind}) CMAKE_TESTING_ARGS+= ${CMAKE_TESTING_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/} . endif . endfor do-test: @cd ${BUILD_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} . endif . endif . if !empty(cmake_ARGS:M_internal) MASTER_SITES?= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ https://www.cmake.org/files/v${DISTVERSION}/ . endif .endif #!defined(_INCLUDE_USES_CMAKE_MK) diff --git a/Mk/Uses/elixir.mk b/Mk/Uses/elixir.mk index fbfe407907d6..89d29aa9c46d 100644 --- a/Mk/Uses/elixir.mk +++ b/Mk/Uses/elixir.mk @@ -1,124 +1,124 @@ # Handle Elixir related ports # # Feature: elixir # Usage: USES=elixir # Valid ARGS: does not require args # # Additional variables: # # ELIXIR_APP_NAME - Elixir app name as installed in Elixir's lib directory # ELIXIR_LIB_ROOT - Elixir default library path # ELIXIR_APP_ROOT - Root directory for this Elixir app # ELIXIR_HIDDEN - Applications to be hidden from the code path; usually ${PORTNAME} # ELIXIR_LOCALE - An UTF-8 locale to be used by Elixir during builds (any UTF-8 locale is good) # MIX_CMD - The "mix" command # MIX_COMPILE - The "mix" command used to compile an Elixir app # MIX_REWRITE - Automatically replace Mix dependencies with code paths # MIX_BUILD_DEPS - List of BUILD_DEPENDS in category/portname format # (commonly referenced to as "deps" in Erlang and Elixir) # MIX_RUN_DEPS - List of RUN_DEPENDS in category/portname format # MIX_DOC_DIRS - Extra doc directories to be installed in DOCSDIR # MIX_DOC_FILES - Extra doc files to be installed in DOCSDIR (usually README.md) # MIX_ENV - Environment for the Mix build (same format as MAKE_ENV) # MIX_ENV_NAME - Name of the Mix build environment, usually "prod" # MIX_BUILD_NAME - Name of the build output in _build/, usually ${MIX_ENV_NAME} # MIX_TARGET - Name of the Mix target, usually "compile" # MIX_EXTRA_APPS - List of sub-applications to be built, if any # MIX_EXTRA_DIRS - List of extra directories to be installed in ELIXIR_APP_ROOT # MIX_EXTRA_FILES - List of extra files to be installed in ELIXIR_APP_ROOT # # MAINTAINER: olgeni@FreeBSD.org .if !defined(_INCLUDE_USES_ELIXIR_MK) _INCLUDE_USES_ELIXIR_MK=yes . if !empty(elixir_ARGS) IGNORE= USES=elixir does not require args . endif ELIXIR_APP_NAME?= ${PORTNAME} ELIXIR_LIB_ROOT?= ${LOCALBASE}/lib/elixir/lib ELIXIR_APP_ROOT?= ${PREFIX}/lib/elixir/lib/${ELIXIR_APP_NAME} ELIXIR_HIDDEN?= "^${ELIXIR_APP_NAME}$$" ELIXIR_LOCALE?= en_US.UTF-8 MIX_CMD?= ${LOCALBASE}/bin/mix -MIX_COMPILE?= ${SETENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET} +MIX_COMPILE?= ${SETENVI} ${WRK_ENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET} MIX_REWRITE?= MIX_BUILD_DEPS?= MIX_RUN_DEPS?= MIX_DOC_DIRS?= MIX_DOC_FILES?= README.md MIX_ENV?= MIX_ENV_NAME?= prod MIX_BUILD_NAME?= prod MIX_TARGET?= compile MIX_EXTRA_APPS?= MIX_EXTRA_DIRS?= MIX_EXTRA_FILES?= BUILD_DEPENDS+= elixir:lang/elixir RUN_DEPENDS+= elixir:lang/elixir . for depend in ${MIX_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} . endfor . for depend in ${MIX_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} . endfor . if !target(do-build) do-build: . if ${MIX_REWRITE} != "" @${REINPLACE_CMD} -i '' -E -e "s@\{.*(only|optional): .*},?@@" ${WRKSRC}/mix.exs . 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 @${RM} ${WRKSRC}/mix.lock @cd ${WRKSRC} && ${MIX_COMPILE} . for app in ${MIX_EXTRA_APPS} @${RM} ${WRKSRC}/${app}/mix.lock @cd ${WRKSRC}/${app} && ${MIX_COMPILE} . endfor . endif # .if !target(do-build) . if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT} @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/lib cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${STAGEDIR}${ELIXIR_APP_ROOT}/lib @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin ${INSTALL_DATA} ${WRKSRC}/_build/${MIX_BUILD_NAME}/lib/${ELIXIR_APP_NAME}/ebin/* \ ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin if [ -d ${WRKSRC}/priv ]; then \ ${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ fi . if ${MIX_DOC_FILES} != "" || ${MIX_DOC_DIRS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} . endif . for file in ${MIX_DOC_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} . endfor . for dir in ${MIX_DOC_DIRS} cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${DOCSDIR} . endfor . for file in ${MIX_EXTRA_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${ELIXIR_APP_ROOT} . 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} ${INSTALL_DATA} ${WRKSRC}/${app}/_build/${MIX_BUILD_NAME}/lib/*/ebin/* \ ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin . endfor . endif # .if !target(do-install) .endif #!defined(_INCLUDE_USES_ELIXIR_MK) diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk index 62e9e6e34f29..acdd6c031cdd 100644 --- a/Mk/Uses/erlang.mk +++ b/Mk/Uses/erlang.mk @@ -1,140 +1,140 @@ # Handle Erlang related ports # # Feature: erlang # Usage: USES=erlang # Valid ARGS: rebar, rebar3, enc or no argument (custom build) # # Additional variables: # # ERL_APP_NAME - Erlang app name as installed in Erlang's lib dir (minus version) # ERL_APP_ROOT - Root directory for this Erlang app # REBAR_CMD - Path to the "rebar" command # REBAR3_CMD - Path to the "rebar3" command # REBAR_PROFILE - Rebar profile # REBAR_TARGETS - Rebar target list (usually compile, maybe escriptize) # ERL_BUILD_NAME - Build name for rebar3 # ERL_BUILD_DEPS - List of BUILD_DEPENDS in category/portname format # ERL_RUN_DEPS - List of RUN_DEPENDS in category/portname format # ERL_DOCS - List of documentation files and directories # # MAINTAINER: olgeni@FreeBSD.org .if !defined(_INCLUDE_USES_ERLANG_MK) _INCLUDE_USES_ERLANG_MK=yes ERL_APP_NAME?= ${PORTNAME} ERL_APP_ROOT?= ${PREFIX}/lib/erlang/lib/${ERL_APP_NAME}-${PORTVERSION} REBAR_CMD= ${LOCALBASE}/bin/rebar REBAR3_CMD= ${LOCALBASE}/bin/rebar3 REBAR_PROFILE?= default REBAR_TARGETS?= compile ERL_BUILD_NAME?= default ERL_BUILD_DEPS?= ERL_RUN_DEPS?= ERL_DOCS?= README* # VERSION is used in every Erlang pkg-plist PLIST_SUB+= VERSION="${PORTVERSION}" BUILD_DEPENDS+= erl:lang/erlang RUN_DEPENDS+= erl:lang/erlang . if ${erlang_ARGS:Menc} BUILD_DEPENDS+= enc:devel/erlang-native-compiler . endif . if ${erlang_ARGS:Mrebar} BUILD_DEPENDS+= rebar>=0:devel/rebar . endif . if ${erlang_ARGS:Mrebar3} BUILD_DEPENDS+= rebar3>=0:devel/rebar3 . endif . for depend in ${ERL_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} . endfor . for depend in ${ERL_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} . endfor . if ${erlang_ARGS:Mrebar} ERLANG_COMPILE= ${REBAR_CMD} . endif . if ${erlang_ARGS:Mrebar3} ERLANG_COMPILE= HOME=${WRKDIR} ${REBAR3_CMD} . endif _USES_patch+= 650:post-patch-erlang post-patch-erlang: @${FIND} ${WRKSRC} -name .gitignore -delete # Attempt to remove all traces of {vsn, ....}; replace with actual PORTVERSION @if [ -f ${WRKSRC}/src/${ERL_APP_NAME}.app.src ]; then \ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \ ${WRKSRC}/src/${ERL_APP_NAME}.app.src; \ fi @if [ -f ${WRKSRC}/ebin/${ERL_APP_NAME}.app ]; then \ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \ ${WRKSRC}/ebin/${ERL_APP_NAME}.app; \ fi @${GREP} -l "%%LOCALBASE%%" $$(${FIND} ${WRKSRC} -type f) \ | ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%LOCALBASE%%@${LOCALBASE}@" @${GREP} -l "%%PORTVERSION%%" $$(${FIND} ${WRKSRC} -type f) \ | ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%PORTVERSION%%@${PORTVERSION}@" # Always try to build with the system version of rebar and rebar3 @if [ -f ${WRKSRC}/rebar.config ]; then \ ${REINPLACE_CMD} -i '' -e "s@\./rebar3@${REBAR3_CMD}@; s@\./rebar@${REBAR_CMD}@" \ ${WRKSRC}/rebar.config; \ fi @${RM} ${WRKSRC}/src/*.orig ${WRKSRC}/include/*.orig . if !target(do-build) do-build: # This will cause calls to local rebar and rebar3 to fail; makes it easier to spot them @${RM} ${WRKSRC}/rebar ${WRKSRC}/rebar3 . 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} && ${SETENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} + @cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} . endfor . endif # !target(do-build) . 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} ${INSTALL_DATA} ${WRKSRC}/_build/${ERL_BUILD_NAME}/lib/${ERL_APP_NAME}/ebin/* \ ${STAGEDIR}${ERL_APP_ROOT}/ebin . else ${INSTALL_DATA} ${WRKSRC}/ebin/* ${STAGEDIR}${ERL_APP_ROOT}/ebin . endif if [ -d ${WRKSRC}/include ]; then \ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/include; \ cd ${WRKSRC}/include && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/include; \ fi if [ -d ${WRKSRC}/priv ]; then \ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/priv; \ fi . if ${ERL_DOCS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} . 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} @${MKDIR} ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin . endif . endif # !target(do-install) .endif #!defined(_INCLUDE_USES_ERLANG_MK) diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk index 8c4539a274ca..e085c45fcab0 100644 --- a/Mk/Uses/gem.mk +++ b/Mk/Uses/gem.mk @@ -1,152 +1,152 @@ # Support rubygem packages # # Feature: gem # Usage: USES=gem[:noautoplist] # Valid args: noautoplist Don't generate the plist automatically # # MAINTAINER: ruby@FreeBSD.org .if !defined(_INCLUDE_USES_GEM_MK) _INCLUDE_USES_GEM_MK= yes _valid_ARGS= noautoplist # Sanity check . 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 # "USES=gem" implies "USES=ruby" .include "${USESDIR}/ruby.mk" PKGNAMEPREFIX?= rubygem- EXTRACT_SUFX= .gem # disabled to be able that extract other archives into the gem folder like cargo archives which are required to compile gems that require rust #EXTRACT_ONLY?= BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems EXTRACT_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems RUN_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER} CACHE_DIR= ${GEMS_BASE_DIR}/cache DOC_DIR= ${GEMS_BASE_DIR}/doc EXT_DIR= ${GEMS_BASE_DIR}/extensions GEMS_DIR= ${GEMS_BASE_DIR}/gems PLUGINS_DIR= ${GEMS_BASE_DIR}/plugins SPEC_DIR= ${GEMS_BASE_DIR}/specifications GEM_NAME?= ${DISTNAME} GEM_LIB_DIR?= ${GEMS_DIR}/${GEM_NAME} GEM_DOC_DIR?= ${DOC_DIR}/${GEM_NAME} GEM_SPEC?= ${SPEC_DIR}/${GEM_NAME}.gemspec GEM_CACHE?= ${CACHE_DIR}/${GEM_NAME}.gem GEMSPEC= ${PORTNAME}.gemspec GEM_ENV+= RB_USER_INSTALL=yes USE_LOCALE?= en_US.UTF-8 GEM_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ REV="${RUBY_GEM}" \ GEMS_BASE_DIR="${GEMS_BASE_DIR}" \ GEMS_DIR="${GEMS_DIR}" \ DOC_DIR="${DOC_DIR}" \ CACHE_DIR="${CACHE_DIR}" \ SPEC_DIR="${SPEC_DIR}" \ EXT_DIR="${EXT_DIR}" \ PLUGINS_DIR="${PLUGINS_DIR}" \ GEM_NAME="${GEM_NAME}" \ GEM_LIB_DIR="${GEM_LIB_DIR}" \ GEM_DOC_DIR="${GEM_DOC_DIR}" \ GEM_SPEC="${GEM_SPEC}" \ GEM_CACHE="${GEM_CACHE}" \ EXTRACT_SUFX="${EXTRACT_SUFX}" RUBYGEMBIN= ${LOCALBASE}/bin/gem . if defined(GEMS_SKIP_SUBDIR) # do not define a DIST_SUBDIR, currently required to have cargo archives available in the gem source directory to be able to compile it #DIST_SUBDIR= . else DIST_SUBDIR= rubygem . endif . if defined(DISTFILES) # this should maybe be reworked, as if a gem port is used together with cargo archives, the DISTFILES also includes the cargo archives # this is currently overwritten in the port that requires this # the cargo archives should be filtered out here or better we should only have here gem archives included GEMFILES?= ${DISTFILES:C/:[^:]+$//} . else GEMFILES?= ${DISTNAME}${EXTRACT_SUFX} . 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} RUBYGEM_ARGS+= --document rdoc,ri . else RUBYGEM_ARGS+= --no-document . endif _USES_extract+= 590:gem-extract gem-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 \ + @${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} + @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Extraction failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) . if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ + @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) . endif . if !target(do-install) do-install: - (cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- ${CONFIGURE_ARGS}) + (cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- ${CONFIGURE_ARGS}) ${RM} -r ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info/ ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f -name '*.so' -exec ${STRIP_CMD} {} + ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f \( -name mkmf.log -or -name gem_make.out \) -delete ${FIND} ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext -type f -not -name '*.so' -delete 2> /dev/null || ${TRUE} ${FIND} ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext -type d -empty -delete 2> /dev/null || ${TRUE} ${RM} -r ${STAGEDIR}${PREFIX}/${CACHE_DIR} 2> /dev/null || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR} 2> /dev/null || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} 2> /dev/null || ${TRUE} . if !${PORT_OPTIONS:MDOCS} -@${RMDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR} . endif . endif . if empty(gem_ARGS:Mnoautoplist) _USES_install+= 820:gem-autoplist gem-autoplist: @${ECHO_CMD} ${GEM_SPEC} >> ${TMPPLIST} . if ${PORT_OPTIONS:MDOCS} @${FIND} -ds ${STAGEDIR}${PREFIX}/${DOC_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} . 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 @if [ -d ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} ]; then \ ${FIND} -ds ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ fi . endif .endif diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 95af91448885..32884f3f3607 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -1,292 +1,292 @@ # This file contains logic to ease porting of Go binaries using the # `go` command. # # Feature: go # Usage: USES=go # Valid ARGS: (none), N.NN, N.NN-devel, modules, no_targets, run # # (none) Setup GOPATH and build in GOPATH mode using default Go version. # N.NN[-devel] Specify Go version # modules If the upstream uses Go modules, this can be set to build # in modules-aware mode. # no_targets Indicates that Go is needed at build time as a part of # make/CMake build. This will setup build environment like # GO_ENV, GO_BUILDFLAGS but will not create post-extract and # do-{build,install,test} targets. # run Indicates that Go is needed at run time and adds it to # RUN_DEPENDS. # # You can set the following variables to control the process. # # GO_MODULE # The name of the module as specified by "module" directive in go.mod. # In most cases, this is the only required variable for ports that # use Go modules. # # GO_PKGNAME # The name of the package when building in GOPATH mode. This # is the directory that will be created in ${GOPATH}/src. If not set # explicitly and GH_SUBDIR or GL_SUBDIR is present, GO_PKGNAME will # be inferred from it. # It is not needed when building in modules-aware mode. # # GO_TARGET # The packages to build. The default value is ${GO_PKGNAME}. # GO_TARGET can also be a tuple in the form package:path where path can be # either a simple filename or a full path starting with ${PREFIX}. # # GO_TESTTARGET # The packages to test. The default value is `./...` (the current package # and all subpackages). # # CGO_CFLAGS # Additional CFLAGS variables to be passed to the C compiler by the `go` # command # # CGO_LDFLAGS # Additional LDFLAGS variables to be passed to the C compiler by the `go` # command # # GO_BUILDFLAGS # Additional build arguments to be passed to the `go build` command # # GO_TESTFLAGS # Additional build arguments to be passed to the `go test` command # # MAINTAINER: go@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. GO_VALID_VERSIONS= 1.19 1.20 1.21 1.22 1.23-devel # Check arguments sanity . if !empty(go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun) IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun} . endif # Parse Go version GO_VERSION= ${go_ARGS:Nmodules:Nno_targets:Nrun:C/^$/${GO_DEFAULT}/} . if empty(GO_VALID_VERSIONS:M${GO_VERSION}) IGNORE?= USES=go has invalid version number: ${GO_VERSION} . endif GO_SUFFIX= ${GO_VERSION:S/.//:C/.*-devel/-devel/} GO_PORT= lang/go${GO_SUFFIX} # Settable variables . if empty(GO_PKGNAME) . if !empty(GH_SUBDIR) GO_PKGNAME= ${GH_SUBDIR:S|^src/||} . elif !empty(GL_SUBDIR) GO_PKGNAME= ${GL_SUBDIR:S|^src/||} . else GO_PKGNAME= ${PORTNAME} . endif . endif GO_TARGET?= ${GO_PKGNAME} GO_TESTTARGET?= ./... . if !defined(PIE_UNSAFE) && defined(WITH_PIE) && ${ARCH} == amd64 GO_BUILDFLAGS+= -buildmode=pie . else GO_BUILDFLAGS+= -buildmode=exe . endif GO_BUILDFLAGS+= -v -trimpath . if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) GO_BUILDFLAGS+= -ldflags=-s . endif GO_TESTFLAGS+= -v . if ${GO_VERSION} != 1.17 GO_BUILDFLAGS+= -buildvcs=false GO_TESTFLAGS+= -buildvcs=false . endif CGO_ENABLED?= 1 CGO_CFLAGS+= -I${LOCALBASE}/include CGO_LDFLAGS+= -L${LOCALBASE}/lib . if ${ARCH} == armv6 || ${ARCH} == armv7 GOARM?= ${ARCH:C/armv//} . endif GO_GOPROXY?= https://proxy.golang.org GO_GOSUMDB?= sum.golang.org # Read-only variables GO_CMD= ${LOCALBASE}/bin/go${GO_SUFFIX} GO_WRKDIR_BIN= ${WRKDIR}/bin GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" \ GOAMD64=${GOAMD64} \ GOARM=${GOARM} \ GOTMPDIR="${WRKDIR}" . if ${go_ARGS:Mmodules} GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g} GO_MODCACHE= file://${GO_GOPATH}/pkg/mod/cache/download GO_WRKSRC= ${WRKSRC} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="${GO_WRKDIR_BIN}" \ GO111MODULE=on \ GOFLAGS=-modcacherw \ GOSUMDB=${GO_GOSUMDB} . if defined(GO_MODULE) GO_MODNAME= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\1/} . if empty(DISTFILES:Mgo.mod\:*) && empty(DISTFILES:Mgo.mod) # Unless already setup for download by other means, # arrange to pull go.mod and distribution archive from GOPROXY. GO_MODVERSION= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M@*:S/^@//:S/^$/${DISTVERSIONFULL}/} GO_MODFILE= ${GO_MODVERSION}.mod GO_DISTFILE= ${GO_MODVERSION}.zip MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/ DISTFILES+= ${GO_MODFILE} ${GO_DISTFILE} WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} . endif EXTRACT_ONLY?= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} \ ca_root_nss>0:security/ca_root_nss USES+= zip . else GO_ENV+= GO_NO_VENDOR_CHECKS=1 . endif . else GO_GOPATH= ${WRKDIR} GO_WRKSRC= ${WRKDIR}/src/${GO_PKGNAME} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="" \ GO111MODULE=off . endif BUILD_DEPENDS+= ${GO_CMD}:${GO_PORT} BINARY_ALIAS+= go=go${GO_SUFFIX} gofmt=gofmt${GO_SUFFIX} . if ${go_ARGS:Mrun} RUN_DEPENDS+= ${GO_CMD}:${GO_PORT} . endif _USES_POST+= go .endif # !defined(_INCLUDE_USES_GO_MK) .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) _INCLUDE_USES_GO_POST_MK= yes . if ${go_ARGS:Mmodules} && defined(GO_MODULE) _USES_fetch+= 200:go-pre-fetch 800:go-post-fetch # Check that pkg can be installed or is already available, # otherwise it will be impossible to install go and fetch dependencies. go-pre-fetch: . if defined(CLEAN_FETCH_ENV) && !exists(${PKG_BIN}) @${ECHO_MSG} "===> CLEAN_FETCH_ENV is defined, cannot download Go modules (pkg and go are required)"; \ exit 1 . endif # Download all required build dependencies to GOMODCACHE. go-post-fetch: @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; @(cd ${DISTDIR}/${DIST_SUBDIR}; \ [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ - ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) + ${SETENVI} ${WRK_ENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) . endif _USES_extract+= 800:go-post-extract . if ${go_ARGS:Mmodules} && defined(GO_MODULE) # Module-aware build mode. Although not strictly necessary (all build dependencies should be # already in MODCACHE), vendor them so we can patch them if needed. go-post-extract: @${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies"; - @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) + @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; - @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) + @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) . else # Legacy (GOPATH) build mode, setup directory structure expected by Go for the main module. go-post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} . endif . if !target(do-build) && empty(go_ARGS:Mno_targets) do-build: (cd ${GO_WRKSRC}; \ for t in ${GO_TARGET}; do \ out=$$(${BASENAME} $$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/')); \ pkg=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^([^:]*).*$$/\1/' -e 's/^${PORTNAME}$$/./'); \ ${ECHO_MSG} "===> Building $${out} from $${pkg}"; \ - ${SETENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ -o ${GO_WRKDIR_BIN}/$${out} \ $${pkg}; \ done) . endif . if !target(do-install) && empty(go_ARGS:Mno_targets) do-install: for t in ${GO_TARGET}; do \ dst=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/'); \ src=$$(${BASENAME} $${dst}); \ case $${dst} in \ /*) dst=${STAGEDIR}$${dst}; ${MKDIR} $$(${DIRNAME} $${dst}) ;; \ *) dst=${STAGEDIR}${PREFIX}/bin/$${src} ;; \ esac; \ ${ECHO_MSG} "===> Installing $${src} as $${dst}"; \ ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/$${src} $${dst}; \ done . endif . if !target(do-test) && empty(go_ARGS:Mno_targets) do-test: (cd ${GO_WRKSRC}; \ for t in ${GO_TESTTARGET}; do \ ${ECHO_MSG} "===> Testing $${t}"; \ - ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ done) . endif . if ${go_ARGS:Mmodules} && defined(GO_MODULE) gomod-clean: . if exists(${GO_CMD}) @${ECHO_MSG} "===> Cleaning Go module cache" - @${SETENV} ${GO_ENV} ${GO_CMD} clean -modcache + @${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} clean -modcache . else @${ECHO_MSG} "===> Skipping since ${GO_CMD} is not installed" . endif # Hook up to distclean . if !target(post-clean) && !make(clean) post-clean: gomod-clean @${RM} -r ${GO_GOPATH} . endif . endif # Helper targets for port maintainers . if ${go_ARGS:Mmodules} && !defined(GO_MODULE) _MODULES2TUPLE_CMD= modules2tuple gomod-vendor-deps: @if ! type ${GO_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"${GO_PORT}\""; exit 1; \ fi; \ if ! type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; exit 1; \ fi gomod-vendor: gomod-vendor-deps patch - @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ + @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt gomod-vendor-diff: gomod-vendor-deps patch - @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ + @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${SED} 's|GH_TUPLE=| |; s| \\$$||' | ${GREP} -v ' \\' > ${WRKDIR}/GH_TUPLE-new.txt && \ echo ${GH_TUPLE} | ${TR} -s " " "\n" | ${SED} "s|^| |" > ${WRKDIR}/GH_TUPLE-old.txt && \ ${DIFF} ${WRKDIR}/GH_TUPLE-old.txt ${WRKDIR}/GH_TUPLE-new.txt || exit 0 . endif .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) diff --git a/Mk/Uses/imake.mk b/Mk/Uses/imake.mk index 06981bc9f819..6848907e8934 100644 --- a/Mk/Uses/imake.mk +++ b/Mk/Uses/imake.mk @@ -1,48 +1,48 @@ # Provide support for imake based projects # # Feature: imake # Usage: USES=imake # Valid ARGS: env: do not define any target # notall: do not pass -a to xmkmf # noman: do not add install-man to # INSTALL_TARGET # # MAINTAINER: x11@FreeBSD.org .if !defined(_INCLUDE_USES_IMAKE_MK) _INCLUDE_USES_IMAKE_MK= yes . if ${imake_ARGS:Nnotall:Nenv:Nnoman} IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument . endif BUILD_DEPENDS+= imake:devel/imake . if defined(USE_GCC) IMAKECPP= ${CPP} IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX} . else IMAKECPP= tradcpp IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX} BUILD_DEPENDS+= tradcpp:devel/tradcpp . endif MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" . if ! ${imake_ARGS:Mnotall} XMKMF_ARGS+= -a . endif . if ! ${imake_ARGS:Menv} . if !target(do-configure) do-configure: - @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) + @(cd ${CONFIGURE_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) . endif . if ! ${imake_ARGS:Mnoman} LATE_INSTALL_ARGS= install.man . endif . endif .endif diff --git a/Mk/Uses/lazarus.mk b/Mk/Uses/lazarus.mk index 6088ea029b23..ef5569ab8eb9 100644 --- a/Mk/Uses/lazarus.mk +++ b/Mk/Uses/lazarus.mk @@ -1,154 +1,154 @@ # Support for Lazarus-based ports. # # Feature: lazarus # Usage: USES=lazarus # Valid ARGS: (none), gtk2, qt5, qt6, flavors # # (none) - This automatically build lazarus-app with gtk2 interface # # gtk2 - This automatically build lazarus-app with gtk2 interface # # qt5 - This automatically build lazarus-app with qt5 interface # # qt6 - This automatically build lazarus-app with qt6 interface # # flavors - This automatically build lazarus-app with flavors feature # # If the port not requires compile lazarus project files automatically, you can # defined the following: # # NO_LAZBUILD= yes # # Variables for ports: # # LAZARUS_PROJECT_FILES - List of lpi files. It must not be empty # Default: empty # LAZARUS_DIR - Path to lazarus installation directory # Default: ${LOCALBASE}/share/lazarus-${LAZARUS_VER} # LAZBUILD_ARGS - lazbuild extra args. It could be -d most of cases. # See man lazbuild for more information # Default: empty # LAZARUS_NO_FLAVORS - Do NOT build these lazarus flavors. # If LAZARUS_NO_FLAVORS is not define then all # valid lazarus flavors are assumed. # # Example: # # USES+= lazarus:flavors # LAZARUS_NO_FLAVORS=qt5 # .if !defined(_INCLUDE_USES_LAZARUS_MK) LAZARUS_Include_MAINTAINER= acm@FreeBSD.org _INCLUDE_USES_LAZARUS_MK= yes . if defined(DEFAULT_LAZARUS_VER) WARNING+= "DEFAULT_LAZARUS_VER is defined, consider using DEFAULT_VERSIONS=lazarus=${DEFAULT_LAZARUS_VER} instead" . endif . if ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors} IGNORE= Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors} . endif . if !empty(LAZARUS_NO_FLAVORS) . if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6} IGNORE= Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6} . endif . endif DEFAULT_LAZARUS_VER= ${LAZARUS_DEFAULT} DEFAULT_FPC_VER= ${FPC_DEFAULT} # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. LAZARUS_VER= ${DEFAULT_LAZARUS_VER} FPC_VER= ${DEFAULT_FPC_VER} LAZARUS_ARCH= ${ARCH:S/amd64/x86_64/} LAZARUS_PROJECT_FILES?= # empty LAZARUS_DIR?= ${LOCALBASE}/share/lazarus-${LAZARUS_VER} ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64 . if !defined(WANT_FPC_DEVEL) FPC_DEVELSUFFIX= # . else FPC_DEVELSUFFIX= -devel . endif BUILDNAME= ${LAZARUS_ARCH}-${OPSYS:tl} LCL_UNITS_DIR= ${LOCALBASE}/share/lazarus-${LAZARUS_VER}/lcl/units/${BUILDNAME} MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME} BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ ${MKINSTDIR}/utils-lexyacc.fpm:lang/fpc${FPC_DEVELSUFFIX} LAZARUS_FLAVORS= gtk2 qt5 qt6 . if ${lazarus_ARGS:Mflavors} . if defined(LAZARUS_NO_FLAVORS) . for flavor in ${LAZARUS_NO_FLAVORS} FLAVORS:= ${LAZARUS_FLAVORS:N${flavor}} . endfor . else FLAVORS:= ${LAZARUS_FLAVORS} . endif . if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif . endif LAZARUS_PKGNAMESUFFIX= -${FLAVOR} . if !defined(WANT_LAZARUS_DEVEL) LAZARUS_DEVELSUFFIX= # . else LAZARUS_DEVELSUFFIX= -devel . endif . if ${lazarus_ARGS:Mgtk2} || ${FLAVOR} == gtk2 LIB_DEPENDS+= libglib-2.0.so:devel/glib20 \ libgtk-x11-2.0.so:x11-toolkits/gtk20 \ libatk-1.0.so:accessibility/at-spi2-core \ libpango-1.0.so:x11-toolkits/pango \ libgdk_pixbuf-2.0.so:graphics/gdk-pixbuf2 LCL_PLATFORM= gtk2 BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus${LAZARUS_DEVELSUFFIX} . endif . if ${lazarus_ARGS:Mqt5} || ${FLAVOR} == qt5 LIB_DEPENDS+= libQt5Pas.so:x11-toolkits/qt5pas LCL_PLATFORM= qt5 BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt5${LAZARUS_DEVELSUFFIX} . endif . if ${lazarus_ARGS:Mqt6} || ${FLAVOR} == qt6 LIB_DEPENDS+= libQt6Pas.so:x11-toolkits/qt6pas LCL_PLATFORM= qt6 BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt6${LAZARUS_DEVELSUFFIX} . endif LAZBUILD_CMD= ${LOCALBASE}/bin/lazbuild LAZBUILD_ARGS?= # empty _USES_POST+= lazarus .endif # End of _INCLUDE_USES_LAZARUS_MK .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LAZARUS_POST_MK) _INCLUDE_USES_LAZARUS_POST_MK= yes . if !defined(NO_LAZBUILD) . if !target(do-build) do-build: . for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} --lazarusdir=${LAZARUS_DIR} ${PROJECT_FILE}) . endfor . endif # !target(do-build) . endif .endif # End of _INCLUDE_USES_LAZARUS_POST_MK diff --git a/Mk/Uses/mate.mk b/Mk/Uses/mate.mk index 34ccb7d831c3..dc4272bb90a0 100644 --- a/Mk/Uses/mate.mk +++ b/Mk/Uses/mate.mk @@ -1,225 +1,225 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Please view me with 4 column tabs! # ======================= USERS ================================= # # There are no significant user-definable settings in here. # This file is a framework to make it easier to create MATE ports. # # ======================= /USERS ================================ # # Please make sure all changes to this file are passed through the maintainer. # Do not commit them yourself (unless of course you're the Port's Wraith ;). # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_MATE_MK) _INCLUDE_USES_MATE_MK= yes _USES_POST+= mate . if !empty(mate_ARGS) IGNORE= USES=mate takes no arguments . endif # This section defines possible names of MATE components and all information # necessary for ports to use those components. # Ports can use this as follows: # # USE_MATE= caja common desktop # # .include # # As a result proper LIB_DEPENDS/RUN_DEPENDS will be added and CONFIGURE_ENV # and MAKE_ENV defined. # # non-version specific components. Do not use :build/:run on those. _USE_MATE_ALL= autogen intlhack intltool # MATE components, you can use the :build or :run if need. Without the :build # and :run, it will be added in both build and run dependency. It will check # for the library dependency first. If not exists then do the build/run on # the *.pc file instead. _USE_MATE_ALL+= caja common controlcenter desktop dialogs docutils icontheme \ libmatekbd libmateweather \ marco menus mixer notificationdaemon panel polkit pluma \ session settingsdaemon caja_DETECT= ${LOCALBASE}/libdata/pkgconfig/libcaja-extension.pc caja_BUILD_DEPENDS= ${caja_DETECT}:x11-fm/caja caja_LIB_DEPENDS= libcaja-extension.so:x11-fm/caja caja_RUN_DEPENDS= ${caja_DETECT}:x11-fm/caja common_DETECT= ${LOCALBASE}/bin/mate-autogen common_BUILD_DEPENDS= ${common_DETECT}:devel/mate-common common_RUN_DEPENDS= ${common_DETECT}:devel/mate-common controlcenter_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-window-settings-2.0.pc controlcenter_BUILD_DEPENDS= ${controlcenter_DETECT}:sysutils/mate-control-center controlcenter_LIB_DEPENDS= libmate-window-settings.so:sysutils/mate-control-center controlcenter_RUN_DEPENDS= ${controlcenter_DETECT}:sysutils/mate-control-center desktop_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-desktop-2.0.pc desktop_BUILD_DEPENDS= ${desktop_DETECT}:x11/mate-desktop desktop_LIB_DEPENDS= libmate-desktop-2.so:x11/mate-desktop desktop_RUN_DEPENDS= ${desktop_DETECT}:x11/mate-desktop dialogs_DETECT= ${LOCALBASE}/bin/matedialog dialogs_BUILD_DEPENDS= ${dialogs_DETECT}:x11/mate-dialogs dialogs_RUN_DEPENDS= ${dialogs_DETECT}:x11/mate-dialogs docutils_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-doc-utils.pc docutils_BUILD_DEPENDS= ${docutils_DETECT}:textproc/mate-doc-utils docutils_RUN_DEPENDS= ${docutils_DETECT}:textproc/mate-doc-utils icontheme_DETECT= ${LOCALBASE}/share/icons/mate/index.theme icontheme_BUILD_DEPENDS=${icontheme_DETECT}:x11-themes/mate-icon-theme icontheme_RUN_DEPENDS= ${icontheme_DETECT}:x11-themes/mate-icon-theme intltool_DETECT= ${LOCALBASE}/bin/intltool-extract intltool_BUILD_DEPENDS= ${intltool_DETECT}:textproc/intltool intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \ 's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \ 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}!="" USE_MATE+= intltool . endif libmatekbd_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatekbd.pc libmatekbd_BUILD_DEPENDS= ${libmatekbd_DETECT}:x11/libmatekbd libmatekbd_LIB_DEPENDS= libmatekbd.so:x11/libmatekbd libmatekbd_RUN_DEPENDS= ${libmatekbd_DETECT}:x11/libmatekbd libmateweather_DETECT= ${LOCALBASE}/libdata/pkgconfig/mateweather.pc libmateweather_BUILD_DEPENDS= ${libmateweather_DETECT}:net/libmateweather libmateweather_LIB_DEPENDS= libmateweather.so:net/libmateweather libmateweather_RUN_DEPENDS= ${libmateweather_DETECT}:net/libmateweather marco_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmarco-private.pc marco_BUILD_DEPENDS= ${marco_DETECT}:x11-wm/marco marco_LIB_DEPENDS= libmarco-private.so:x11-wm/marco marco_RUN_DEPENDS= ${marco_DETECT}:x11-wm/marco menus_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmate-menu.pc menus_BUILD_DEPENDS= ${menus_DETECT}:x11/mate-menus menus_LIB_DEPENDS= libmate-menu.so:x11/mate-menus menus_RUN_DEPENDS= ${menus_DETECT}:x11/mate-menus mixer_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatemixer.pc mixer_BUILD_DEPENDS= ${mixer_DETECT}:audio/libmatemixer mixer_LIB_DEPENDS= libmatemixer.so:audio/libmatemixer mixer_RUN_DEPENDS= ${mixer_DETECT}:audio/libmatemixer notificationdaemon_DETECT= ${LOCALBASE}/libexec/mate-notification-daemon notificationdaemon_BUILD_DEPENDS= ${notificationdaemon_DETECT}:deskutils/mate-notification-daemon notificationdaemon_RUN_DEPENDS= ${notificationdaemon_DETECT}:deskutils/mate-notification-daemon panel_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatepanelapplet-4.0.pc panel_BUILD_DEPENDS= ${panel_DETECT}:x11/mate-panel panel_LIB_DEPENDS= libmate-panel-applet-4.so:x11/mate-panel panel_RUN_DEPENDS= ${panel_DETECT}:x11/mate-panel polkit_DETECT= ${LOCALBASE}/libexec/polkit-mate-authentication-agent-1 polkit_BUILD_DEPENDS= ${polkit_DETECT}:sysutils/mate-polkit polkit_RUN_DEPENDS= ${polkit_DETECT}:sysutils/mate-polkit pluma_DETECT= ${LOCALBASE}/libdata/pkgconfig/pluma.pc pluma_BUILD_DEPENDS= ${pluma_DETECT}:editors/pluma pluma_RUN_DEPENDS= ${pluma_DETECT}:editors/pluma session_DETECT= ${LOCALBASE}/bin/mate-session session_BUILD_DEPENDS= ${session_DETECT}:x11/mate-session-manager session_RUN_DEPENDS= ${session_DETECT}:x11/mate-session-manager settingsdaemon_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-settings-daemon.pc settingsdaemon_BUILD_DEPENDS= ${settingsdaemon_DETECT}:sysutils/mate-settings-daemon settingsdaemon_RUN_DEPENDS= ${settingsdaemon_DETECT}:sysutils/mate-settings-daemon # End component definition section . 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_GNOME:C/^([^:]+).*/\1/} . if ${_USE_MATE_ALL:M${component}}=="" .error cannot install: Unknown component USE_MATE=${component} . endif . endfor . for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} . if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS} . endif . if defined(${component}_DETECT) . if ${USE_MATE:M${component}\:build}!="" BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} . elif ${USE_MATE:M${component}\:run}!="" RUN_DEPENDS+= ${${component}_RUN_DEPENDS} . else . if defined(${component}_LIB_DEPENDS) LIB_DEPENDS+= ${${component}_LIB_DEPENDS} . else BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} RUN_DEPENDS+= ${${component}_RUN_DEPENDS} . endif . endif . endif . if defined(${component}_CONFIGURE_TARGET) CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS} . endif . if defined(${component}_CONFIGURE_ENV) CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV} . endif . if defined(${component}_MAKE_ENV) MAKE_ENV+= ${${component}_MAKE_ENV} . endif . if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET} . endif . if defined(${component}_PRE_PATCH) MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH} . endif . endfor . endif # USE_MATE check .endif # End of optional part. .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_MATE_POST_MK) _INCLUDE_USES_MATE_POST_MK= yes . if ${USE_MATE:Mautogen}!="" CONFIGURE_ENV+= NOCONFIGURE=yes _USES_configure+= 295:mate-pre-configure mate-pre-configure: - @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) + @(cd ${CONFIGURE_WRKSRC} ; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ./autogen.sh) . endif . if defined(MATE_PRE_PATCH) _USES_configure+= 445:mate-pre-configure-script mate-pre-configure-script: @${MATE_PRE_PATCH:C/^;//1} . endif .endif # End of use part. diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk index 8c266cdfafee..e7c5fd5b5068 100644 --- a/Mk/Uses/perl5.mk +++ b/Mk/Uses/perl5.mk @@ -1,333 +1,333 @@ # Provide support to use perl5 # # PERL5 - Set to full path of perl5, either in the system or # installed from a port. # PERL - Set to full path of perl5, either in the system or # installed from a port, but without the version number. # Use this if you need to replace "#!" lines in scripts. # PERL_VERSION - Full version of perl5 (see below for current value). # # PERL_VER - Short version of perl5 (major.minor without patchlevel) # # PERL_LEVEL - Perl version as an integer of the form MNNNPP, where # M is major version, N is minor version, and P is # the patch level. E.g., PERL_VERSION=5.14.4 would give # a PERL_LEVEL of 501404. This can be used in comparisons # to determine if the version of perl is high enough, # whether a particular dependency is needed, etc. # PERL_ARCH - Directory name of architecture dependent libraries # (value: mach). # PERL_PORT - Name of the perl port that is installed # (for example: perl5.24) # SITE_PERL - Directory name where site specific perl packages go. # This value is added to PLIST_SUB. # SITE_ARCH - Directory name where arch site specific perl packages go. # This value is added to PLIST_SUB. # USE_PERL5 - If set, this port uses perl5 in one or more of the extract, # patch, build, run or test phases. # It can also have configure, modbuild and modbuildtiny when # the port needs to run Makefile.PL, Build.PL and a # Module::Build::Tiny flavor of Build.PL. # # MAINTAINER: perl@FreeBSD.org .if !defined(_INCLUDE_USES_PERL5_MK) _INCLUDE_USES_PERL5_MK= yes . if !empty(perl5_ARGS) IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments . endif USE_PERL5?= run build # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . if ${PERL5_DEFAULT} == 5.34 .include "${PORTSDIR}/lang/perl5.34/version.mk" . elif ${PERL5_DEFAULT} == 5.36 .include "${PORTSDIR}/lang/perl5.36/version.mk" . elif ${PERL5_DEFAULT} == 5.38 .include "${PORTSDIR}/lang/perl5.38/version.mk" . 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 IGNORE= Invalid perl5 version ${PERL5_DEFAULT} . endif PERL_VER?= ${PERL_VERSION:C/\.[0-9]+$//} . 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 perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} . 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 PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} . else PERL_LEVEL=0 . endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) PERL_ARCH?= mach # there must always be a default to prevent dependency failures such # as "ports/lang: not found". Also, perl5-devel is taken care in the # 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} >= 503800 PERL_PORT?= perl5.38 . elif ${PERL_LEVEL} >= 503600 PERL_PORT?= perl5.36 . else # ${PERL_LEVEL} < 503600 PERL_PORT?= perl5.34 . endif SITE_PERL_REL?= lib/perl5/site_perl SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} SITE_ARCH_REL?= ${SITE_PERL_REL}/${PERL_ARCH}/${PERL_VER} SITE_ARCH?= ${LOCALBASE}/${SITE_ARCH_REL} SITE_MAN3_REL?= ${SITE_PERL_REL}/man/man3 SITE_MAN3?= ${PREFIX}/${SITE_MAN3_REL} SITE_MAN1_REL?= ${SITE_PERL_REL}/man/man1 SITE_MAN1?= ${PREFIX}/${SITE_MAN1_REL} PERL5?= ${LOCALBASE}/bin/perl${PERL_VERSION} PERL?= ${LOCALBASE}/bin/perl CONFIGURE_ENV+= ac_cv_path_PERL=${PERL} ac_cv_path_PERL_PATH=${PERL} \ PERL_USE_UNSAFE_INC=1 MAKE_ENV+= PERL_USE_UNSAFE_INC=1 QA_ENV+= SITE_ARCH_REL=${SITE_ARCH_REL} LIBPERL=libperl.so.${PERL_VER} # Define the want perl first if defined . 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|\..*||} _want_perl_minor= ${want_perl_ver:S|^${want_perl_major}||:S|^.||:C|\..*||} _want_perl_patch= ${want_perl_ver:S|^${want_perl_major}||:S|^.${_want_perl_minor}||:S|^.||:C|\..*||} 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 # 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) masked_PERL_LEVEL= ${PERL_LEVEL:C|(.....)$|00000|} . elif empty(_want_perl_patch) masked_PERL_LEVEL= ${PERL_LEVEL:C|(..)$|00|} . else masked_PERL_LEVEL= ${PERL_LEVEL} . endif . 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} 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} 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 IGNORE= improper use of USE_PERL5 . endif . endif _USE_PERL5_VALID= build configure extract modbuild modbuildtiny patch run \ test _USE_PERL5_UNKNOWN= . for component in ${_USE_PERL5} . if empty(_USE_PERL5_VALID:M${component}) _USE_PERL5_UNKNOWN+= ${component} . endif . endfor . if !empty(_USE_PERL5_UNKNOWN) IGNORE= has unknown USE_PERL5 components: ${_USE_PERL5_UNKNOWN} . endif _USES_POST+= perl5 .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PERL5_POST_MK) _INCLUDE_USES_PERL5_POST_MK= yes PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ PERL_VER=${PERL_VER} \ PERL5_MAN1=${SITE_MAN1_REL} \ PERL5_MAN3=${SITE_MAN3_REL} \ SITE_PERL=${SITE_PERL_REL} \ SITE_ARCH=${SITE_ARCH_REL} # handle perl5 specific manpages . for sect in 3 . if defined(P5MAN${sect}) _MANPAGES+= ${P5MAN${sect}:S%^%${PREFIX}/lib/perl5/${PERL_VER}/man/man${sect}/%} . endif . endfor MANDIRS+= ${PREFIX}/${SITE_PERL_REL}/man . if ${_USE_PERL5:Mmodbuild} || ${_USE_PERL5:Mmodbuildtiny} _USE_PERL5+= configure ALL_TARGET?= # empty CONFIGURE_ARGS+=--install_path lib="${PREFIX}/${SITE_PERL_REL}" \ --install_path arch="${PREFIX}/${SITE_ARCH_REL}" \ --install_path script="${PREFIX}/bin" \ --install_path bin="${PREFIX}/bin" \ --install_path libdoc="${PERLMANPREFIX}/man/man3" \ --install_path bindoc="${PERLMANPREFIX}/man/man1" CONFIGURE_SCRIPT?= Build.PL PL_BUILD?= Build CONFIGURE_ARGS+=--destdir ${STAGEDIR} DESTDIRNAME= --destdir . if ${_USE_PERL5:Mmodbuild} CONFIGURE_ARGS+=--perl="${PERL}" . if ${PORTNAME} != Module-Build BUILD_DEPENDS+= p5-Module-Build>=0.4206:devel/p5-Module-Build . endif CONFIGURE_ARGS+=--create_packlist 1 . endif . if ${_USE_PERL5:Mmodbuildtiny} . if ${PORTNAME} != Module-Build-Tiny BUILD_DEPENDS+= p5-Module-Build-Tiny>=0.043:devel/p5-Module-Build-Tiny . endif CONFIGURE_ARGS+=--create_packlist 1 . endif . elif ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+=INSTALLDIRS="site" . endif # modbuild . 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) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" . endif # defined(BATCH) && !defined(IS_INTERACTIVE) . endif # configure . if ${_USE_PERL5:Mextract} EXTRACT_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mpatch} PATCH_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mbuild} BUILD_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mrun} RUN_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mtest} TEST_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" LD="${CC}" PREFIX="${PREFIX}" \ INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" CONFIGURE_SCRIPT?= Makefile.PL PERLMANPREFIX?= ${PREFIX}/${SITE_PERL_REL} .undef HAS_CONFIGURE . if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi @cd ${CONFIGURE_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} \ + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} \ ${PERL5} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} . 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 . if ${_USE_PERL5:Mmodbuild*} . if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) . endif # !target(do-build) . if !${USES:Mgmake} . if !target(do-install) do-install: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) . endif # !target(do-install) . endif # ! USES=gmake . endif # modbuild PACKLIST_DIR?= ${PREFIX}/${SITE_ARCH_REL}/auto # In all those, don't use - before the command so that the user does # not wonder what has been ignored by this message "*** Error code 1 (ignored)" _USES_install+= 560:fix-perl-things fix-perl-things: # Remove STAGEDIR from .packlist and add the file to the plist. @(if [ -d ${STAGEDIR}${PACKLIST_DIR} ] ; then \ ${FIND} ${STAGEDIR}${PACKLIST_DIR} -name .packlist | while read f ; do \ ${SED} -i '' 's|^${STAGEDIR}||' "$$f"; \ ${ECHO_CMD} $$f | ${SED} -e 's|^${STAGEDIR}||' >> ${TMPPLIST}; \ done \ fi) || : # Starting with perl 5.20, the empty bootstrap files are not installed any more # by ExtUtils::MakeMaker. As we don't need them anyway, remove them. # Module::Build continues to install them, so remove the files unconditionally. @${FIND} ${STAGEDIR} -name '*.bs' -size 0 -delete || : # Some ports use their own way of building perl modules and generate # perllocal.pod, remove it here so that those ports don't include it # by mistake in their plists. It is sometime compressed, so use a # shell glob for the removal. Also, remove the directories that # contain it to not leave orphans directories around. @${RM} ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod* || : @${RMDIR} -p ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH} 2>/dev/null || : # Starting at ExtUtils::MakeMaker 7.06 and Perl 5.25.1, the base README.pod is # no longer manified into a README.3, as the README.pod is installed and can be # read with perldoc, remove the README.3 files that may be generated. @[ -d "${STAGEDIR}${SITE_MAN3}" ] && \ ${FIND} ${STAGEDIR}${SITE_MAN3} -name '*::README.3' -delete || : # Starting at ExtUtils::MakeMaker 7.31_06 and Perl 5.27.1, the base README.pod is # no longer installed. So remove any that can be there. @[ -d "${STAGEDIR}${PREFIX}/${SITE_PERL_REL}" ] && \ ${FIND} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL} -name README.pod -delete || : . 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*} - @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} + @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} . elif ${USE_PERL5:Mconfigure} - @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} + @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} . endif # USE_PERL5:Mmodbuild* . endif # do-test .endif # defined(_POSTMKINCLUDED) diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk index 18196b6768a1..b197f1ffcfb5 100644 --- a/Mk/Uses/pyqt.mk +++ b/Mk/Uses/pyqt.mk @@ -1,268 +1,268 @@ # Handle PyQt related ports # # Feature: pyqt # Usage: USES=pyqt:ARGS # Valid ARGS: 5, 6 # # MAINTAINER: kde@FreeBSD.org # # Internal Port variables for PyQt ports: # PYQT_DIST - This port is part of PyQt5/6 itself. Variables and # targets are then set assuming a certain tarball and # port layout. # USE_PYQT - List of PyQt components to depend on # * foo:build only build depend # * foo:run only run depend # * foo:test only test depend # * foo build and run depend (default) # PYQT_SIPDIR - where sip files will be installed to # PYQT_APIDIR - where api files will be installed to # PYQT_DOCDIR - where doc files will be installed to # PYQT_EXAMPLESDIR - where examples will be installed to .if !defined(_INCLUDE_USES_PYQT_MK) _INCLUDE_USES_PYQT_MK= yes # At the moment we support PyQt bindings versions 5 and 6 # option is for internal use by the py-sip ports. _PYQT_SUPPORTED= 5 6 sip . if empty(pyqt_ARGS) IGNORE= pyqt needs a qt-version (${_PYQT_SUPPORTED}) . endif # At the moment we support PyQt bindings versions 5 and 6 . for ver in ${_PYQT_SUPPORTED:O:u} . if ${pyqt_ARGS:M${ver}} . if empty(_PYQT_VERSION) _PYQT_VERSION= ${ver} . else IGNORE?= cannot be installed: different PYQT versions specified via pyqt:[${_PYQT_SUPPORTED:S/ //g}] . endif . endif . endfor . if empty(_PYQT_VERSION) IGNORE?= USES=pyqt needs a version number (valid values: ${_PYQT_SUPPORTED}) _PYQT_VERSION= 0 . endif PYQT_MAINTAINER= kde@FreeBSD.org MASTER_SITE_RIVERBANK= https://www.riverbankcomputing.com/static/Downloads/%SUBDIR%/ MASTER_SITES_SIP= https://pypi.python.org/packages/source/s/sip/ MASTER_SITES_PYQT5= https://pypi.python.org/packages/source/P/PyQt5/ MASTER_SITES_PYQT6= https://pypi.python.org/packages/source/P/PyQt6/ MASTER_SITES_PYQT= ${MASTER_SITES_PYQT${_PYQT_VERSION}} MASTER_SITES_PYQT5SIP= https://pypi.python.org/packages/source/P/PyQt5-sip/ MASTER_SITES_PYQT6SIP= https://pypi.python.org/packages/source/P/PyQt6-sip/ MASTER_SITES_PYQTSIP= ${MASTER_SITES_PYQT${_PYQT_VERSION}SIP} MASTER_SITES_PYQT63D= https://pypi.python.org/packages/source/P/PyQt6-3D/ MASTER_SITES_PYQT3D= ${MASTER_SITES_PYQT${_PYQT_VERSION}3D} MASTER_SITES_PYQT5CHART= https://pypi.python.org/packages/source/P/PyQtChart/ MASTER_SITES_PYQT6CHART= https://pypi.python.org/packages/source/P/PyQt6-Charts/ MASTER_SITES_PYQTCHART= ${MASTER_SITES_PYQT${_PYQT_VERSION}CHART} MASTER_SITES_PYQT6DATAVIS3D= https://pypi.python.org/packages/source/P/PyQt6-DataVisualization/ MASTER_SITES_PYQTDATAVIS3D= ${MASTER_SITES_PYQT${_PYQT_VERSION}DATAVIS3D} MASTER_SITES_PYQT5NETWORKAUTH= https://pypi.python.org/packages/source/P/PyQtNetworkAuth/ MASTER_SITES_PYQT6NETWORKAUTH= https://pypi.python.org/packages/source/P/PyQt6-NetworkAuth/ MASTER_SITES_PYQTNETWORKAUTH= ${MASTER_SITES_PYQT${_PYQT_VERSION}NETWORKAUTH} MASTER_SITES_PYQTBUILDER= https://pypi.io/packages/source/P/PyQt-builder/ MASTER_SITES_PYQT5WEBENGINE= https://pypi.python.org/packages/source/P/PyQtWebEngine/ MASTER_SITES_PYQT6WEBENGINE= https://pypi.python.org/packages/source/P/PyQt6-WebEngine/ MASTER_SITES_PYQTWEBENGINE= ${MASTER_SITES_PYQT${_PYQT_VERSION}WEBENGINE} #https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.12.0/QScintilla_src-2.12.0.tar.gz MASTER_SITES_QSCI2= RIVERBANK/QScintilla/${PORTVERSION} \ SF/pyqt/QScintilla2/QScintilla-${PORTVERSION} \ GENTOO # PORTEPOCH is important here, because version-comparisons in *_DEPENDS # take it into account (visually, 6.5.1 >= 5.5.3,1, but it isn't). # Adding the epoch directly into the version here cannot be done, # because the DISTVERSION of each of these ports is obtained from the # *_VERSION variable (and PORTEPOCH is set in each individual port). # # Where noted, the ports are epoched and the py-${comp}-PATH variables, # below, should have a suitable epoch appended to the version. SIP_VERSION= 6.8.3 # ,1 SIP4_VERSION= 4.19.25 QSCI2_VERSION= 2.14.1 PYQT5_VERSION= 5.15.10 PYQT6_VERSION= 6.6.1 PYQT63D_VERSION= 6.6.0 PYQT5CHART_VERSION= 5.15.6 PYQT6CHART_VERSION= 6.6.0 PYQT6DATAVIS3D_VERSION= 6.6.0 PYQT5NETWORKAUTH_VERSION=5.15.5 PYQT6NETWORKAUTH_VERSION=6.6.0 PYQT5WEBENGINE_VERSION= 5.15.6 PYQT6WEBENGINE_VERSION= 6.6.0 PYQT5SIP_VERSION= 12.13.0 PYQT6SIP_VERSION= 13.6.0 PYQTBUILDER_VERSION= 1.15.4 SIP4_DISTNAME= sip-${SIP4_VERSION} PYQT5_DISTNAME= PyQt5-${PYQT5_VERSION} PYQT6_DISTNAME= PyQt6-${PYQT6_VERSION} PYQT5SIP_DISTNAME= PyQt5_sip-${PYQT5SIP_VERSION} PYQT6SIP_DISTNAME= PyQt6_sip-${PYQT6SIP_VERSION} PYQT63D_DISTNAME= PyQt6_3D-${PYQT63D_VERSION} PYQT5CHART_DISTNAME= PyQtChart-${PYQT5CHART_VERSION} PYQT6CHART_DISTNAME= PyQt6_Charts-${PYQT6CHART_VERSION} PYQT6DATAVIS3D_DISTNAME= PyQt6_DataVisualization-${PYQT6DATAVIS3D_VERSION} PYQT5NETWORKAUTH_DISTNAME= PyQtNetworkAuth-${PYQT5NETWORKAUTH_VERSION} PYQT6NETWORKAUTH_DISTNAME= PyQt6_NetworkAuth-${PYQT6NETWORKAUTH_VERSION} PYQT5WEBENGINE_DISTNAME= PyQtWebEngine-${PYQT5WEBENGINE_VERSION} PYQT6WEBENGINE_DISTNAME= PyQt6_WebEngine-${PYQT6WEBENGINE_VERSION} PYQT5_DISTINFO_FILE= ${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo PYQT6_DISTINFO_FILE= ${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo QSCI2_DISTNAME= QScintilla_src-${QSCI2_VERSION} PYQT5_LICENSE= GPLv3 PYQT6_LICENSE= GPLv3 _USE_PYQT_ALL= pyqt5 pyqt6 3d chart datavis3d networkauth webengine _USE_SIP_ALL= sip pysip _USE_QSCINTILLA= qscintilla2 _USE_PYQTBUILDER= qtbuilder # Unversioned variables for the rest of the file PYQT_VERSION= ${PYQT${_PYQT_VERSION}_VERSION} PYQT3D_VERSION= ${PYQT${_PYQT_VERSION}3D_VERSION} PYQTCHART_VERSION= ${PYQT${_PYQT_VERSION}CHART_VERSION} PYQTDATAVIS3D_VERSION= ${PYQT${_PYQT_VERSION}DATAVIS3D_VERSION} PYQTNETWORKAUTH_VERSION=${PYQT${_PYQT_VERSION}NETWORKAUTH_VERSION} PYQTWEBENGINE_VERSION=${PYQT${_PYQT_VERSION}WEBENGINE_VERSION} PYQT_RELNAME= py-qt${_PYQT_VERSION} PYQT_PY_RELNAME= ${PYTHON_PKGNAMEPREFIX}qt${_PYQT_VERSION} PYQT_MASTERSITES= ${MASTER_SITES_PYQT${_PYQT_VERSION}} PYQT_DISTNAME= ${PYQT${_PYQT_VERSION}_DISTNAME} PYQT3D_DISTNAME= ${PYQT${_PYQT_VERSION}3D_DISTNAME} PYQTCHART_DISTNAME= ${PYQT${_PYQT_VERSION}CHART_DISTNAME} PYQTDATAVIS3D_DISTNAME= ${PYQT${_PYQT_VERSION}DATAVIS3D_DISTNAME} PYQTNETWORKAUTH_DISTNAME=${PYQT${_PYQT_VERSION}NETWORKAUTH_DISTNAME} PYQTWEBENGINE_DISTNAME=${PYQT${_PYQT_VERSION}WEBENGINE_DISTNAME} PYQT_DISTINFO_FILE= ${PYQT${_PYQT_VERSION}_DISTINFO_FILE} PYQT_LICENSE= ${PYQT${_PYQT_VERSION}_LICENSE} # PATH (see note about epochs, above) py-sip_PATH= ${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION},1 py-pysip_PATH= ${PYQT_PY_RELNAME}-sip>=${PYQTSIP_VERSION} py-qscintilla2_PATH= ${PYQT_PY_RELNAME}-qscintilla2>=${QSCI2_VERSION} py-qtbuilder_PATH= ${PYTHON_PKGNAMEPREFIX}PyQt-builder>=${PYQTBUILDER_VERSION} py-pyqt5_PATH= ${PYQT_PY_RELNAME}-pyqt>=${PYQT_VERSION} py-pyqt6_PATH= ${PYQT_PY_RELNAME}-pyqt>=${PYQT_VERSION} py-3d_PATH= ${PYQT_PY_RELNAME}-3d>=${PYQT3D_VERSION} py-chart_PATH= ${PYQT_PY_RELNAME}-chart>=${PYQTCHART_VERSION} py-datavis3d_PATH= ${PYQT_PY_RELNAME}-datavis3d>=${PYQTDATAVIS3D_VERSION} py-networkauth_PATH= ${PYQT_PY_RELNAME}-networkauth>=${PYQTNETWORKAUTH_VERSION} py-webengine_PATH= ${PYQT_PY_RELNAME}-webengine>=${PYQTWEBENGINE_VERSION} # PORT py-sip_PORT= devel/py-sip py-qtbuilder_PORT= devel/py-qtbuilder py-pysip_PORT= devel/${PYQT_RELNAME}-sip py-qscintilla2_PORT= devel/${PYQT_RELNAME}-qscintilla2 py-positioning_PORT= devel/${PYQT_RELNAME}-positioning py-pyqt5_PORT= devel/${PYQT_RELNAME}-pyqt py-pyqt6_PORT= devel/${PYQT_RELNAME}-pyqt py-3d_PORT= graphics/${PYQT_RELNAME}-3d py-chart_PORT= x11-toolkits/${PYQT_RELNAME}-chart py-datavis3d_PORT= x11-toolkits/${PYQT_RELNAME}-datavis3d py-networkauth_PORT= net/${PYQT_RELNAME}-networkauth py-webengine_PORT= www/${PYQT_RELNAME}-webengine # The versionned executable of sip SIP= ${LOCALBASE}/bin/sip-build-${PYTHON_VER} # Relative directories _VERSION_SUBDIR_REL= PyQt${_PYQT_VERSION}/${PYTHON_VER} _APIDIR_REL= share/${_VERSION_SUBDIR_REL}/qsci _DOCDIR_REL= share/doc/${_VERSION_SUBDIR_REL} _EXAMPLEDIR_REL= share/examples/${_VERSION_SUBDIR_REL} _SIPDIR_REL= PyQt${_PYQT_VERSION}/bindings _DESIGNERDIR_REL= ${QT_PLUGINDIR_REL}/designer/${_VERSION_SUBDIR_REL} _QMLDIR_REL= ${QT_QMLDIR_REL}/${_VERSION_SUBDIR_REL} # Absolute directories PYQT_APIDIR= ${PREFIX}/${_APIDIR_REL} PYQT_DOCDIR= ${PREFIX}/${_DOCDIR_REL} PYQT_EXAMPLEDIR= ${PREFIX}/${_EXAMPLEDIR_REL} PYQT_SIPDIR?= ${PYTHON_SITELIBDIR}/${_SIPDIR_REL} PYQT_DESIGNERDIR= ${PREFIX}/${_DESIGNERDIR_REL} PYQT_QMLDIR= ${PREFIX}/${_QMLDIR_REL} PLIST_SUB+= PYQT_APIDIR=${_APIDIR_REL} \ PYQT_DOCDIR=${_DOCDIR_REL} \ PYQT_EXAMPLEDIR=${_EXAMPLEDIR_REL} \ PYQT_SIPDIR=${PYQT_SIPDIR} \ PYQT_DESIGNERDIR=${_DESIGNERDIR_REL} \ PYQT_QMLDIR=${_QMLDIR_REL} \ PYQT_SIPVERSION=${SIP_VERSION} \ PYQT_QSCIVERSION=${QSCI2_VERSION} \ PYQT_PYQTVERSION=${PYQT_VERSION} . if defined(PYQT_DIST) LICENSE?= ${PYQT_LICENSE} PLIST_SUB+= PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}" SIP_ARGS+= --qmake ${QMAKE} \ --verbose \ --build-dir build \ --protected-is-public \ --api-dir ${PYQT_APIDIR} \ --jobs ${MAKE_JOBS_NUMBER} . if ${PORTNAME} == "pyqt" SIP_ARGS+= --confirm-license . endif . if ${PORTNAME} == "pyqt" . if !target(post-patch) post-patch: ${REINPLACE_CMD} -e "s#%%PYQT_DESIGNERDIR%%#${PYQT_DESIGNERDIR}#" ${WRKSRC}/project.py ${REINPLACE_CMD} -e "s#%%PYQT_QMLDIR%%#${PYQT_QMLDIR}#" ${WRKSRC}/project.py . endif # !target(post-patch) . endif . if !target(do-build) do-build: - (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build) + (cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build) . endif # !target(do-build) . if !target(do-install) do-install: - (cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) + (cd ${WRKSRC} ; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) . endif # !target(do-install) . endif # defined(PYQT_DIST) # Set build, run and test 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_SIP_ALL} \ ${_USE_QSCINTILLA} \ ${_USE_PYQTBUILDER} . for comp in ${_USE_PYQT_ALL:O:u} _USE_PYQT_ALL_SUFFIXED+= py-${comp} py-${comp}:build py-${comp}:run py-${comp}:test py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_TEST_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_build_BUILD_DEPENDS?= ${py-${comp}_BUILD_DEPENDS} py-${comp}_run_RUN_DEPENDS?= ${py-${comp}_RUN_DEPENDS} py-${comp}_test_TEST_DEPENDS?= ${py-${comp}_TEST_DEPENDS} . endfor _USE_PYQT= ${USE_PYQT:O:u} . for comp in ${_USE_PYQT} . if ${_USE_PYQT_ALL_SUFFIXED:Mpy-${comp}} BUILD_DEPENDS+= ${py-${comp:S/:/_/}_BUILD_DEPENDS} RUN_DEPENDS+= ${py-${comp:S/:/_/}_RUN_DEPENDS} TEST_DEPENDS+= ${py-${comp:S/:/_/}_TEST_DEPENDS} . else IGNORE?= cannot be installed: unknown USE_PYQT component ${comp} #' . endif . endfor .endif # defined(_INCLUDE_USES_PYQT_MK) diff --git a/Mk/Uses/pytest.mk b/Mk/Uses/pytest.mk index 62e435270cbd..4d0a0039672f 100644 --- a/Mk/Uses/pytest.mk +++ b/Mk/Uses/pytest.mk @@ -1,69 +1,69 @@ # handle testing with pytest # # Feature: pytest # Usage: USES=pytest[:4] # # It implies USES=python:test automatically if no USES=python has been # specified yet # # It provides the following additional variables to set by the ports: # # PYTEST_ARGS additional args to pytest (defaults to empty). # PYTEST_IGNORED_TESTS lists of `pytest -k` patterns of tests to ignore # (defaults to empty). For tests which are not # expected to pass, such as ones requiring a database # access. # PYTEST_BROKEN_TESTS lists of `pytest -k` patterns of tests to ignore # (defaults to empty). For broken tests which require # fixing. # # The following variables may be set by the user: # # PYTEST_ENABLE_IGNORED_TESTS enable tests which are otherwise ignored by # PYTEST_IGNORED_TESTS. # PYTEST_ENABLE_BROKEN_TESTS enable tests which are otherwise ignored by # PYTEST_BROKEN_TESTS. # PYTEST_ENABLE_ALL_TESTS enable tests which are otherwise ignored by # PYTEST_IGNORED_TESTS and PYTEST_BROKEN_TESTS. # # MAINTAINER: amdmi3@FreeBSD.org .if !defined(_INCLUDE_USES_PYTEST_MK) _INCLUDE_USES_PYTEST_MK= yes . if !${USES:Mpython*} python_ARGS= test . include "${USESDIR}/python.mk" . endif . if empty(pytest_ARGS) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} . elif ${pytest_ARGS} == "4" TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest4>=0:devel/py-pytest4@${PY_FLAVOR} . else IGNORE= Incorrect 'USES+=pytest:${pytest_ARGS}' expecting 'USES+=pytest[:4]' . endif PYTEST_IGNORED_TESTS?= # empty PYTEST_BROKEN_TESTS?= # empty PYTEST_ARGS?= # empty _PYTEST_ALL_IGNORED_TESTS?= # empty . if !defined(PYTEST_ENABLE_IGNORED_TESTS) && !defined(PYTEST_ENABLE_ALL_TESTS) _PYTEST_ALL_IGNORED_TESTS+= ${PYTEST_IGNORED_TESTS} . endif . if !defined(PYTEST_ENABLE_BROKEN_TESTS) && !defined(PYTEST_ENABLE_ALL_TESTS) _PYTEST_ALL_IGNORED_TESTS+= ${PYTEST_BROKEN_TESTS} . endif _PYTEST_FILTER_EXPRESSION= ${_PYTEST_ALL_IGNORED_TESTS:C/^(.)/and not \1/:tW:C/^and //} . if !target(do-test) do-test: - @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest \ + @cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest \ -k '${_PYTEST_FILTER_EXPRESSION}' \ -v -rs -o addopts= \ ${PYTEST_ARGS} . endif .endif diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 5ef639cf7907..dad34dac322e 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -1,998 +1,998 @@ # Provide support for Python related ports. This includes detecting Python # interpreters, ports providing package and modules for python as well as # consumer ports requiring Python at build or run time. # # Feature: python # Usage: USES=python[:version-spec][,arg,...] # Valid ARGS: , patch, build, run, test, env # # version-spec Declarative specification for the Python version(s) the # port supports. Subsets and ranges can be specified: # # * # * - # * + # * - # # Examples: # # USES=python:2.7 # Supports Python 2.7 Only # USES=python:3.8+ # Supports Python 3.8 or later # USES=python:3.8-3.10 # Supports Python 3.8 to 3.10 # USES=python:-3.8 # Supports Python up to 3.8 # USES=python # Supports 3.8+ # # NOTE: should be as specific as possible, matching the versions # upstream declares support for, without being incorrect. In particular, # USES=python *without* a means 3.8+, # including unreleased versions, which is probably incorrect. # # Not specifying a should only be used when a more specific # cannot be specified due to syntax limitations, for # example: 2.7,3.8-3.9, but even in this case, X.Y+ (2.7+), or -X.Y (-3.8) # is preferred and likely more correct. # # patch Python is needed at patch time. Adds dependency to PATCH_DEPENDS. # build Python is needed at build time. Adds dependency to BUILD_DEPENDS. # run Python is needed at run time. Adds dependency to RUN_DEPENDS. # test Python is needed at test time. Adds dependency to TEST_DEPENDS. # env Does not depend on Python but needs the environment set up. This # is mainly used when depending on flavored python ports, or when a # correct PYTHON_CMD is required. It has the same effect as setting # PYTHON_NO_DEPENDS. # # If build, run and test are omitted, Python will be added as BUILD_DEPENDS, # RUN_DEPENDS and TEST_DEPENDS. # patch is independant, it does not prevent the default build/run/test # dependency. # env or PYTHON_NO_DEPENDS can be set to not add any dependencies. # # Exported variables: # # PYTHON_VERSION - The chosen Python interpreter including the version, # e.g. python2.7, python3.8, etc. # # Variables, which can be set by the port: # # USE_PYTHON - A list of additional features and functionality to # enable. Supported features are: # # concurrent - Indicates that the port can be installed for # different python versions at the same time. The port # is supposed to use a unique prefix for certain # directories using USES=uniquefiles:dirs (see the # uniquefiles.mk Uses for details about the # directories), if set to yes. Binaries receive an # additional suffix, based on ${PYTHON_VER}. # # The values for the uniquefiles USES are set as # follows: # # UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} # UNIQUE_SUFFIX= -${PYTHON_VER} # # If the port is installed for the current default # python version, scripts and binaries in # # ${PREFIX}/bin # ${PREFIX}/sbin # ${PREFIX}/libexec # # are linked from the prefixed version to the # prefix-less original name, e.g. # bin/foo-2.7 --> bin/foo. # # cryptography_build # - Depend on security/cryptography at build-time. # # cryptography - Depend on security/cryptography at run-time. # # cryptography_test # - Depend on security/cryptography at test-time. # # cython - Depend on lang/cython at build-time. # # cython_run - Depend on lang/cython at run-time. # # cython_test - Depend on lang/cython for tests. # # flavors - Force creation of flavors for Python 2 and 3 default # versions, where applicable. # # noflavors - Disable automatic creation of flavors if they would # otherwise be created and they are not wanted. # # allflavors - Generate flavors for all possible versions and not # simply the default ones. Only to be used for py-* # ports that are part of the Python distribution, but # kept as separate ports. # # optsuffix - Set PKGNAMESUFFIX to PYTHON_PKGNAMESUFFIX if not the # default python version. # # distutils - Use distutils as do-configure, do-build and # do-install targets. implies flavors. # # pep517 - Follow the PEP-517 standard to build and install wheels # as do-build and do-install targets. implies flavors. # # autoplist - Automatically generates the packaging list for a # port that uses distutils when defined. # requires: distutils # # py3kplist - Automatically generates Python 3.x compatible # __pycache__ entries from a Python 2.x packaging list # when defined. Use this for ports that do *not* use # standard Python packaging mechanisms such as # distutils, and support *both* Python 2.x and 3.x. # Not needed, if USE_PYTHON=autoplist is set. # # pythonprefix - Says that the port installs in ${PYTHONBASE} instead # of ${PREFIX}. # # noegginfo - Skip an egg-info entry from plist, if defined. # # nose - Run tests with nose (devel/py-nose) # # nose2 - Run tests with nose2 (devel/py-nose2) # # pytest - Run tests with latest pytest (devel/py-pytest) # # pytest4 - Run tests with pytest 4.x (devel/py-pytest4) # # unittest - Run tests with unittest # # unittest2 - Run tests with unittest2 (devel/py-unittest2) # # PYTHON_CMD - Python's command line file name, including the # version number (used for dependencies). # default: ${PYTHONBASE}/bin/${PYTHON_VERSION} # # PEP517_BUILD_CMD - Command sequence for a PEP-517 build frontend that builds a wheel. # default: ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING} # # PEP517_BUILD_DEPEND - Port needed to execute ${PEP517_BUILD_CMD}. # default: ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} # # PEP517_BUILD_CONFIG_SETTING # - Options for the build backend. Must include -C or --config-setting per option. # default: # # PEP517_INSTALL_CMD - Command sequence for a PEP-517 install frontend that installs a wheel. # default: ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl # # PEP517_INSTALL_DEPEND - Port needed to execute ${PEP517_INSTALL_CMD}. # default: ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR} # # PYSETUP - Name of the setup script used by the distutils # package. # default: setup.py # # PYDISTUTILS_PKGNAME # - Internal name in the distutils for egg-info. # default: ${PORTNAME} # # PYDISTUTILS_PKGVERSION # - Internal version in the distutils for egg-info. # default: ${PORTVERSION} # # PYDISTUTILS_CONFIGURE_TARGET # - Pass this command to distutils on configure stage. # default: config # # PYDISTUTILS_BUILD_TARGET # - Pass this command to distutils on build stage. # default: build # # PYDISTUTILS_INSTALL_TARGET # - Pass this command to distutils on install stage. # default: install # # PYDISTUTILS_CONFIGUREARGS # - Arguments to config with distutils. # default: # # PYDISTUTILS_BUILDARGS # - Arguments to build with distutils. # default: # # PYDISTUTILS_INSTALLARGS # - Arguments to install with distutils. # default: -c -O1 --prefix=${PREFIX} --single-version-externally-managed --root=${STAGEDIR} # # PYDISTUTILS_EGGINFO # - Canonical name for egg-info. # default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info # # PYTEST_BROKEN_TESTS - Lists of 'pytest -k' patterns to skip tests which # require fixing. # default: # # PYTEST_IGNORED_TESTS - Lists of 'pytest -k' patterns to skip tests which are # not expected to pass, e.g. requiring a database access. # default: # # The following variables can be read by ports and must not be modified: # # PYTHONBASE - The installation prefix of the chosen Python # interpreter, e.g. /usr/local # # PYTHON_DISTVERSION # - Version number suitable for ${DISTVERSION}. # # PYTHON_PORTSDIR - The port directory of the chosen Python interpreter # # PYTHON_REL - The release number of the chosen Python interpreter # without dots, e.g. 20706, 30801, ... # # PYTHON_SUFFIX - The major-minor release number of the chosen Python # interpreter without dots, e.g. 27, 38, ... # Used for prefixes and suffixes. # # PYTHON_MAJOR_VER - The major release version of the chosen Python # interpreter, e.g. 2, 3, ... # # PYTHON_VER - The major-minor release version of the chosen Python # interpreter, e.g. 2.7, 3.8, ... # # PYTHON_ABIVER - Additional ABI flags set by the chosen Python # interpreter, e.g. md # # PYTHON_INCLUDEDIR - Location of the Python include files. # default: ${PYTHONBASE}/include/${PYTHON_VERSION} # # PYTHON_LIBDIR - Base of the python library tree # default: ${PYTHONBASE}/lib/${PYTHON_VERSION} # # PYTHON_SITELIBDIR - Location of the site-packages tree. Don't change, # unless you know what you do. # default: ${PYTHON_LIBDIR}/site-packages # # There are PREFIX-clean variants of the PYTHON_*DIR variables above. # They are meant to be used by ports instead of the above variables, so the # ports respect ${PREFIX} (unless USE_PYTHON=pythonprefix is specified). # # PYTHONPREFIX_INCLUDEDIR default: ${PREFIX}/include/${PYTHON_VERSION} # PYTHONPREFIX_LIBDIR default: ${PREFIX}/lib/${PYTHON_VERSION} # PYTHONPREFIX_SITELIBDIR default: ${PYTHONPREFIX_LIBDIR}/site-packages # # PYTHON_PLATFORM - Python's idea of the OS release. # This is faked with ${OPSYS} and ${OSREL} until we # find out how to delay defining a variable until # after a certain target has been built. # # PYTHON_PKGNAMEPREFIX # - Use this as a ${PKGNAMEPREFIX} to distinguish # packages for different Python versions. # default: py${PYTHON_SUFFIX}- # # PYTHON_PKGNAMESUFFIX # - Use this as a ${PKGNAMESUFFIX} to distinguish # packages for different Python versions. # default: -py${PYTHON_SUFFIX} # # Using USES=python also will add some useful entries to SUB_LIST and PLIST_SUB: # # PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR} # PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR} # PYTHON_PLATFORM=${PYTHON_PLATFORM} # PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} # PYTHON_SUFFIX=${PYTHON_SUFFIX} # PYTHON_VER=${PYTHON_VER} # PYTHON_VERSION=${PYTHON_VERSION} # # where PYTHON_INCLUDEDIR, PYTHON_LIBDIR and PYTHON_SITELIBDIR have their PREFIX # stripped for PLIST_SUB. # # PYTHON2 and PYTHON3 will also be set according to the Python version: # # PYTHON2="" PYTHON3="@comment " for Python 2.x # PYTHON2="@comment " PYTHON3="" for Python 3.x # # PYDISTUTILS_INSTALLNOSINGLE # - Deprecated without replacement # # Dependency lines of selected Python modules: # # PY_SETUPTOOLS - setuptools port based on USE_PYTHON=distutils # PYGAME - pygame port # PYNUMPY - NumPy port # PY_MERCURIAL - mercurial port, PKGNAME varies based on default # Python version # PY_BOOST - Boost Python libraries port # # The following variables may be set by the user: # # PYTEST_ENABLE_ALL_TESTS - Enable tests skipped by PYTEST_BROKEN_TESTS # and PYTEST_IGNORED_TESTS. # PYTEST_ENABLE_BROKEN_TESTS - Enable tests skipped by PYTEST_BROKEN_TESTS. # PYTEST_ENABLE_IGNORED_TESTS - Enable tests skipped by PYTEST_IGNORED_TESTS. # # MAINTAINER: python@FreeBSD.org .if !defined(_INCLUDE_USES_PYTHON_MK) _INCLUDE_USES_PYTHON_MK= yes # What Python version and what Python interpreters are currently supported? # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _PYTHON_VERSIONS= 3.9 3.8 3.10 3.11 2.7 # preferred first _PYTHON_PORTBRANCH= 3.9 # ${_PYTHON_VERSIONS:[1]} _PYTHON_BASECMD= ${LOCALBASE}/bin/python _PYTHON_RELPORTDIR= lang/python # List all valid USE_PYTHON features here _VALID_PYTHON_FEATURES= allflavors \ autoplist \ concurrent \ cryptography_build \ cryptography \ cryptography_test \ cython \ cython_run \ cython_test \ distutils \ flavors \ noegginfo \ noflavors \ nose \ nose2 \ optsuffix \ pep517 \ py3kplist \ pytest \ pytest4 \ pythonprefix \ unittest \ unittest2 _INVALID_PYTHON_FEATURES= . for var in ${USE_PYTHON} . if empty(_VALID_PYTHON_FEATURES:M${var}) _INVALID_PYTHON_FEATURES+= ${var} . endif . endfor . if !empty(_INVALID_PYTHON_FEATURES) IGNORE= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} . endif # Make each individual feature available as _PYTHON_FEATURE_ . for var in ${USE_PYTHON} _PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} . endfor . if defined(_PYTHON_FEATURE_PYTEST) && defined(_PYTHON_FEATURE_PYTEST4) IGNORE= uses either USE_PYTHON=pytest or USE_PYTHON=pytest4, not both of them . endif # distutils automatically generates flavors depending on the supported # versions. . if defined(_PYTHON_FEATURE_DISTUTILS) _PYTHON_FEATURE_FLAVORS= yes . endif # pep517 automatically generates flavors depending on the supported # versions. . if defined(_PYTHON_FEATURE_PEP517) _PYTHON_FEATURE_FLAVORS= yes . endif . if defined(_PYTHON_FEATURE_NOFLAVORS) .undef _PYTHON_FEATURE_FLAVORS . endif # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection .undef _PYTHON_BUILD_DEP .undef _PYTHON_RUN_DEP .undef _PYTHON_TEST_DEP _PYTHON_ARGS= ${python_ARGS:S/,/ /g} . if ${_PYTHON_ARGS:Mpatch} _PYTHON_PATCH_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Npatch} . endif . if ${_PYTHON_ARGS:Mbuild} _PYTHON_BUILD_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nbuild} . endif . if ${_PYTHON_ARGS:Mrun} _PYTHON_RUN_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nrun} . endif . if ${_PYTHON_ARGS:Mtest} _PYTHON_TEST_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Ntest} . endif . if ${_PYTHON_ARGS:Menv} PYTHON_NO_DEPENDS= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nenv} . 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) && \ !defined(_PYTHON_TEST_DEP) && !defined(PYTHON_NO_DEPENDS) _PYTHON_BUILD_DEP= yes _PYTHON_RUN_DEP= yes _PYTHON_TEST_DEP= yes . endif . if ${_PYTHON_ARGS} == 2.7 DEV_WARNING+= "lang/python27 reached End of Life and will be removed somewhere in the future, please convert to a modern version of python" . elif ${_PYTHON_ARGS} == 2 DEV_ERROR+= "USES=python:2 is no longer supported, use USES=python:2.7" . elif ${_PYTHON_ARGS} == 3 DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.8+ or an appropriate version range" . endif # ${_PYTHON_ARGS} == 2.7 _PYTHON_VERSION:= ${PYTHON_DEFAULT} . if empty(_PYTHON_ARGS) _PYTHON_ARGS= 3.8+ . endif # Validate Python version whether it meets the version restriction. _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[1-9]?[0-9])$/\1-\1/} _PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[1-9]?[0-9])[-+].*/\1/} _PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[1-9][0-9]} _PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[1-9]?[0-9])/\1/} _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[1-9][0-9]} # At this point we should have no argument left in ${_PYTHON_ARGS} # except a version spec _V1= [1-9].[0-9] _V2= [1-9].[1-9][0-9] _PYTHON_ARGS:= ${_PYTHON_ARGS:N${_V1}-${_V1}:N${_V1}-${_V2}:N${_V2}-${_V2}:N${_V1}:N${_V2}:N${_V1}+:N${_V2}+:N-${_V1}:N-${_V2}} . if !empty(_PYTHON_ARGS) IGNORE= uses unknown USES=python arguments: ${_PYTHON_ARGS} . endif # Pattern to convert python versions (X.Y or X.YY) to comparable format X.YY _VC= C/^([1-9]\.)([0-9])$$/\10\2/ .undef _PYTHON_VERSION_NONSUPPORTED . if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least . elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most . endif # If we have an unsupported version of Python, try another. . if defined(_PYTHON_VERSION_NONSUPPORTED) .undef _PYTHON_VERSION . for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) _PYTHON_VERSION= ${ver} . endif . endfor . if !defined(_PYTHON_VERSION) IGNORE= needs an unsupported version of Python . endif . endif # defined(_PYTHON_VERSION_NONSUPPORTED) # Automatically generates FLAVORS if empty . if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) . undef _VALID_PYTHON_VERSIONS . for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) . if empty(_VALID_PYTHON_VERSIONS:M${ver}) _VALID_PYTHON_VERSIONS+= ${ver} . endif . endif . endfor # Get all possible flavors depending on version requirements . if defined(_VALID_PYTHON_VERSIONS) _ALL_PYTHON_FLAVORS= ${_VALID_PYTHON_VERSIONS:S/.//:S/^/py/} . else _ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/} . endif # Decide how many flavors we want. By default, only generate the default # versions. . if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) FLAVORS= ${_ALL_PYTHON_FLAVORS} . else . for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} _f= py${_v:S/.//} . if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} . if !empty(FLAVORS) FLAVORS:= ${FLAVORS} ${_f} . else FLAVORS:= ${_f} . endif . endif . endfor . endif . if !empty(FLAVORS) && empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif . endif . if ${FLAVOR:Mpy[23][0-9]}${FLAVOR:Mpy[23][1-9][0-9]} _PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./} . endif . if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT} . if defined(_PYTHON_FEATURE_OPTSUFFIX) DEV_WARNING+= "USE_PYTHON=optsuffix is deprecated, consider migrating to using unconditional PKGNAMESUFFIX or PKGNAMEPREFIX" PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} . endif . endif # To avoid having dependencies with @ and empty flavor: # _PYTHON_VERSION is either set by (first that matches): # - If using Python flavors, from the current Python flavor # - If using a version restriction (USES=python:3.8+), from the first # acceptable default Python version. # - From PYTHON_DEFAULT PY_FLAVOR= py${_PYTHON_VERSION:S/.//} PYTHON_VERSION= python${_PYTHON_VERSION} # Got the correct python version, set some publicly accessible variables PYTHON_VER= ${_PYTHON_VERSION} PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} PYTHON_MAJOR_VER= ${PYTHON_VER:R} PYTHON_REL= # empty 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}) .include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version" . endif # Create a 5 integer version string, prefixing 0 to the minor and patch # tokens if it's a single character. Only use the first 3 tokens of # PORTVERSION to support pre-release versions (rc3, alpha4, etc) of # any Python port (lang/pythonXY) PYTHON_REL= ${PYTHON_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9])$/.0\1/:C/\.([0-9]\.[0-9]+)/.0\1/:S/.//g} # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} . if ${PYTHON_MAJOR_VER} > 2 . if exists(${PYTHON_CMD}-config) PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags . endif . endif . if ${PYTHON_REL} >= 30807 PYTHON_EXT_SUFFIX= .cpython-${PYTHON_SUFFIX} . else PYTHON_EXT_SUFFIX= # empty . endif . if ${PYTHON_MAJOR_VER} < 3 DEPRECATED?= Uses Python 2.7 which is EOLed upstream . endif . if !defined(PYTHONBASE) PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ 2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1 . endif _EXPORTED_VARS+= PYTHONBASE PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER} PYTHON_LIBDIR= ${PYTHONBASE}/lib/python${_PYTHON_VERSION} PYTHON_PLATFORM= ${OPSYS:tl}${OSREL:C/\.[0-9.]*//} PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- PYTHON_PKGNAMESUFFIX= -py${PYTHON_SUFFIX} PYTHONPREFIX_INCLUDEDIR= ${PYTHON_INCLUDEDIR:S;${PYTHONBASE};${PREFIX};} PYTHONPREFIX_LIBDIR= ${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};} PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};} # Used for recording the installed files. _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp # Ports bound to a certain python version SHOULD # - use the PYTHON_PKGNAMEPREFIX # - use directories using the PYTHON_PKGNAMEPREFIX # - install binaries using the required PYTHON_VER, with # the default python version creating a symlink to the original binary # name (for staging-aware ports). # # What makes a port 'bound' to a certain python version? # - it installs data into PYTHON_SITELIBDIR, PYTHON_INCLUDEDIR, ... # - it links against libpython*.so # - it uses USE_PYTHON=distutils # # cryptography* support . if ${PYCRYPTOGRAPHY_DEFAULT} == rust CRYPTOGRAPHY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>=41.0.7,1:security/py-cryptography@${PY_FLAVOR} . else CRYPTOGRAPHY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography-legacy>=3.4.8_1,1:security/py-cryptography-legacy@${PY_FLAVOR} . endif . if defined(_PYTHON_FEATURE_CRYPTOGRAPHY_BUILD) BUILD_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} . endif . if defined(_PYTHON_FEATURE_CRYPTOGRAPHY) RUN_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} . endif . if defined(_PYTHON_FEATURE_CRYPTOGRAPHY_TEST) TEST_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} . endif # cython* support . if defined(_PYTHON_FEATURE_CYTHON) BUILD_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} . endif . if defined(_PYTHON_FEATURE_CYTHON_RUN) RUN_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} . endif . if defined(_PYTHON_FEATURE_CYTHON_TEST) TEST_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} . endif . if defined(_PYTHON_FEATURE_CONCURRENT) . if !defined(_PYTHON_FEATURE_FLAVORS) && (${_PYTHON_VERSION_MINIMUM:M3*} || ${_PYTHON_VERSION_MAXIMUM:M2*}) DEV_WARNING+= "USE_PYTHON=concurrent when only one of Python 2 or 3 is supported AND not using flavors does not make any sense" . endif _USES_POST+= uniquefiles:dirs . if defined(_PYTHON_FEATURE_FLAVORS) && ${FLAVOR} == ${FLAVORS:[1]} UNIQUE_DEFAULT_LINKS= yes . elif !defined(_PYTHON_FEATURE_FLAVORS) && ${_PYTHON_VERSION} == ${PYTHON_DEFAULT} UNIQUE_DEFAULT_LINKS= yes . else UNIQUE_DEFAULT_LINKS= no . endif UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} UNIQUE_SUFFIX= -${PYTHON_VER} UNIQUE_SUFFIX_TYPES+= SUFFIX_MAN UNIQUE_SUFFIX_MAN_WITH_EXT= .[1-9ln] UNIQUE_SUFFIX_MAN_EXTRA_EXT= .gz . if defined(_PYTHON_FEATURE_AUTOPLIST) _UNIQUE_FIND_SUFFIX_FILES= ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} . else _UNIQUE_FIND_SUFFIX_FILES= ${SED} -e 's|^${PREFIX}/||' ${TMPPLIST} 2>/dev/null . endif UNIQUE_FIND_SUFFIX_FILES+= ${_UNIQUE_FIND_SUFFIX_FILES} | \ ${EGREP} -he '^bin/.*$$|^sbin/.*$$|^libexec/.*$$' UNIQUE_FIND_SUFFIX_MAN_FILES+= ${_UNIQUE_FIND_SUFFIX_FILES} | \ ${EGREP} -he '^man/man[1-9ln]/.*$$|^share/man/man[1-9ln]/.*$$' . endif # defined(_PYTHON_FEATURE_CONCURRENT) _CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} . if defined(_PYTHON_FEATURE_DISTUTILS) && \ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools && \ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools58 && \ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools44 . if ${PYTHON_VER} == 2.7 BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} . else BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} . endif . endif . if defined(_PYTHON_FEATURE_PEP517) . if ${PYTHON_MAJOR_VER} < 3 DEV_ERROR+= "USES=python:2.7 is incompatible with USE_PYTHON=pep517" . endif . if defined(_PYTHON_FEATURE_DISTUTILS) DEV_ERROR+= "USE_PYTHON=distutils is incompatible with USE_PYTHON=pep517" . endif . if defined(_PYTHON_FEATURE_PY3KPLIST) DEV_ERROR+= "USE_PYTHON=py3kplist is incompatible with USE_PYTHON=pep517" . endif . if defined(_PYTHON_FEATURE_NOEGGINFO) DEV_ERROR+= "USE_PYTHON=noegginfo is incompatible with USE_PYTHON=pep517" . endif . endif # distutils support PYSETUP?= setup.py PYDISTUTILS_SETUP?= -c \ "import sys; import setuptools; \ __file__='${PYSETUP}'; sys.argv[0]='${PYSETUP}'; \ exec(compile(open(__file__, 'rb').read().replace(b'\\r\\n', b'\\n'), __file__, 'exec'))" PYDISTUTILS_CONFIGUREARGS?= # empty PYDISTUTILS_BUILDARGS?= # empty PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} . if defined(_PYTHON_FEATURE_DISTUTILS) . if !defined(PYDISTUTILS_INSTALLNOSINGLE) PYDISTUTILS_INSTALLARGS+= --single-version-externally-managed . endif PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR} . endif PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ ${PYDISTUTILS_INSTALLARGS} PYDISTUTILS_PKGNAME?= ${PORTNAME} PYDISTUTILS_PKGVERSION?=${PORTVERSION} 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} # PEP-517 support PEP517_BUILD_CMD?= ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING} PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl PEP517_INSTALL_DEPEND?= ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR} # nose support . if defined(_PYTHON_FEATURE_NOSE) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR} . endif # nose2 support . if defined(_PYTHON_FEATURE_NOSE2) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose2>=0:devel/py-nose2@${PY_FLAVOR} . endif # pytest support . if defined(_PYTHON_FEATURE_PYTEST) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>=7,1:devel/py-pytest@${PY_FLAVOR} . elif defined(_PYTHON_FEATURE_PYTEST4) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest4>=4.6,1:devel/py-pytest4@${PY_FLAVOR} . endif . if defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) PYTEST_BROKEN_TESTS?= # empty PYTEST_IGNORED_TESTS?= # empty _PYTEST_SKIPPED_TESTS?= # empty . if !defined(PYTEST_ENABLE_ALL_TESTS) . if !defined(PYTEST_ENABLE_BROKEN_TESTS) _PYTEST_SKIPPED_TESTS+= ${PYTEST_BROKEN_TESTS} . endif . if !defined(PYTEST_ENABLE_IGNORED_TESTS) _PYTEST_SKIPPED_TESTS+= ${PYTEST_IGNORED_TESTS} . endif . endif # !defined(PYTEST_ENABLE_ALL_TESTS) _PYTEST_FILTER_EXPRESSION= ${_PYTEST_SKIPPED_TESTS:C/^(.)/and not \1/:tW:C/^and //} . endif # defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) # unittest2 support . if defined(_PYTHON_FEATURE_UNITTEST2) TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}unittest2>=0:devel/py-unittest2@${PY_FLAVOR} . endif . 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} 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 . if defined(_PYTHON_FEATURE_AUTOPLIST) && (defined(_PYTHON_FEATURE_DISTUTILS) || defined(_PYTHON_FEATURE_PEP517)) _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} _USES_stage+= 934:add-plist-pymod add-plist-pymod: @${SED} -e 's|^"\(.*\)"$$|\1|' \ -e 's|^${STAGEDIR}${PREFIX}/||' \ -e 's|^${PREFIX}/||' \ -e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ -e 's|^\(share/man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ -e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} . else . if ${PYTHON_REL} >= 30200 && 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 https://www.python.org/dev/peps/pep-3147/) PYMAGICTAG= ${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)' _USES_stage+= 935:add-plist-python add-plist-python: @${AWK} '\ /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ {print} \ ' \ pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} . endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) . endif # defined(_PYTHON_FEATURE_AUTOPLIST) && (defined(_PYTHON_FEATURE_DISTUTILS) || defined(_PYTHON_FEATURE_PEP517)) # Fix for programs that build python from a GNU auto* environment CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" # By default CMake picks up the highest available version of Python package. # Enforce the version required by the port or the default. CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} CMAKE_ARGS+= -DPython_EXECUTABLE:FILEPATH="${PYTHON_CMD}" CMAKE_ARGS+= -DPython${PYTHON_MAJOR_VER}_EXECUTABLE:FILEPATH="${PYTHON_CMD}" # Python 3rd-party modules PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.26,1:math/py-numpy@${PY_FLAVOR} . if defined(_PYTHON_FEATURE_DISTUTILS) . if ${PYTHON_MAJOR_VER} < 3 PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} . else #PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools58>0:devel/py-setuptools58@${PY_FLAVOR} PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} . endif . else PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} . endif # Common Python modules that can be needed but only for some versions of Python. . if ${PYTHON_REL} >= 30000 PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} . endif . if ${PYTHON_VER} != ${PYTHON_DEFAULT} PY_MERCURIAL= ${PYTHON_PKGNAMEPREFIX}mercurial>=5.9:devel/mercurial@${PY_FLAVOR} . else PY_MERCURIAL= mercurial>=5.9:devel/mercurial@${PY_FLAVOR} . endif CMAKE_ARGS+= -DBOOST_PYTHON_SUFFIX:STRING=${PYTHON_SUFFIX} PY_BOOST_LIB= boost_python${PYTHON_SUFFIX} PY_BOOST= lib${PY_BOOST_LIB}.so:devel/boost-python-libs@${PY_FLAVOR} # dependencies . for _stage in PATCH BUILD RUN TEST . if defined(_PYTHON_${_stage}_DEP) ${_stage}_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} . endif . endfor # set $PREFIX as Python's one . if defined(_PYTHON_FEATURE_PYTHONPREFIX) PREFIX= ${PYTHONBASE} . endif # Substitutions for SUB_FILES SUB_LIST+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR} \ PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR} \ PYTHON_PLATFORM=${PYTHON_PLATFORM} \ PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} \ PYTHON_SUFFIX=${PYTHON_SUFFIX} \ PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERSION=${PYTHON_VERSION} # Substitutions for pkg-plist # Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the # base directory in the plist file. PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ PYTHON_PLATFORM=${PYTHON_PLATFORM} \ PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ PYTHON_SUFFIX=${PYTHON_SUFFIX} \ PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERSION=${PYTHON_VERSION} . if ${PYTHON_MAJOR_VER} < 3 SUB_LIST+= PYTHON2="" PYTHON3="@comment " PLIST_SUB+= PYTHON2="" PYTHON3="@comment " . else SUB_LIST+= PYTHON2="@comment " PYTHON3="" PLIST_SUB+= PYTHON2="@comment " PYTHON3="" . endif _USES_POST+= python .endif # _INCLUDE_USES_PYTHON_MK .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) _INCLUDE_USES_PYTHON_POST_MK= yes # py-distutils support PYDISTUTILS_CONFIGURE_TARGET?= config PYDISTUTILS_BUILD_TARGET?= build PYDISTUTILS_INSTALL_TARGET?= install . if defined(_PYTHON_FEATURE_DISTUTILS) LDSHARED?= ${CC} -shared MAKE_ENV+= LDSHARED="${LDSHARED}" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= . 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}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) . endif . if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) . endif . if !target(do-install) do-install: - @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) + @(cd ${INSTALL_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) . endif . endif # defined(_PYTHON_FEATURE_DISTUTILS) . if defined(_PYTHON_FEATURE_PEP517) . if !empty(PEP517_BUILD_DEPEND) BUILD_DEPENDS+= ${PEP517_BUILD_DEPEND} . endif . if !empty(PEP517_INSTALL_DEPEND) BUILD_DEPENDS+= ${PEP517_INSTALL_DEPEND} . endif . if !target(do-configure) do-configure: @${DO_NADA} . endif . if !target(do-build) do-build: - @cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_BUILD_CMD} + @cd ${BUILD_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_BUILD_CMD} . endif . if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} - @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} + @cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} @${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST} @${REINPLACE_CMD} \ -e '/\.pyc$$/d' \ -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../lib/|lib/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libdata/|libdata/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libexec/|libexec/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ ${_PYTHONPKGLIST} @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} . endif . endif # defined(_PYTHON_FEATURE_PEP517) . if defined(_PYTHON_FEATURE_NOSE) . if !target(do-test) do-test: - cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m nose ${TEST_ARGS:NDESTDIR=*} -v + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose ${TEST_ARGS:NDESTDIR=*} -v . endif . endif # defined(_PYTHON_FEATURE_NOSE) . if defined(_PYTHON_FEATURE_NOSE2) . if !target(do-test) do-test: - cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m nose2 ${TEST_ARGS:NDESTDIR=*} -v + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose2 ${TEST_ARGS:NDESTDIR=*} -v . endif . endif # defined(_PYTHON_FEATURE_NOSE2) . if defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) . if !target(do-test) do-test: - cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -k '${_PYTEST_FILTER_EXPRESSION}' -rs -v -o addopts= ${TEST_ARGS:NDESTDIR=*} + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -k '${_PYTEST_FILTER_EXPRESSION}' -rs -v -o addopts= ${TEST_ARGS:NDESTDIR=*} . endif . endif # defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) . if defined(_PYTHON_FEATURE_UNITTEST) . if !target(do-test) do-test: - cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest ${TEST_ARGS:NDESTDIR=*} -v + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest ${TEST_ARGS:NDESTDIR=*} -v . endif . endif # defined(_PYTHON_FEATURE_UNITTEST) . if defined(_PYTHON_FEATURE_UNITTEST2) . if !target(do-test) do-test: - cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest2 ${TEST_ARGS:NDESTDIR=*} -v + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest2 ${TEST_ARGS:NDESTDIR=*} -v . endif . endif # defined(_PYTHON_FEATURE_UNITTEST2) .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk index e6fc0758026a..926d98002b53 100644 --- a/Mk/Uses/qmake.mk +++ b/Mk/Uses/qmake.mk @@ -1,150 +1,150 @@ # There are three Qt related USES files with different access to Qt. # - qmake: The port requires Qt's qmake to build -- creates the configure target # - auto includes qt.mk # - qt-dist: The port is a port for a part of Qt5 # - auto inclues qt.mk # - qt.mk - Dependency handling. USE_QT=foo bar # # # Provide support for qmake-based projects # # Feature: qmake # Usage: USES=qmake or USES=qmake:ARGS # Must be used along with 'USE_QT*=#' # Valid ARGS: norecursive outsource # ARGS description: # norecursive Don't pass -recursive argument to qmake binary # outsource Perform an out-of-source build # no_env Suppress modification of configure and make environment. # no_configure Don't add the configure target -- this is implied by # HAS_CONFIGURE=yes and GNU_CONFIGURE=yes # # # Variables for ports: # QMAKE_ENV - Environment passed to qmake. # Default: ${CONFIGURE_ENV} # QMAKE_ARGS - Arguments passed to qmake. # Default: see below # QMAKE_CONFIGURE_ARGS - Extra arguments passed to qmake after everything # else, such as "-foo -no-bar". The arguments are usually # set in configure.json. This variable is specific to # qmake from Qt 5. # Default: empty # QMAKE_SOURCE_PATH - Path to qmake project files. # Default: ${WRKSRC} if out-of-source build is # requested, empty otherwise. # # User defined variables: # QMAKE_VERBOSE - Enable verbose configure output. # # MAINTAINER: kde@FreeBSD.org .if !defined(_INCLUDE_USES_QMAKE_MK) _INCLUDE_USES_QMAKE_MK= yes # Suck in qt.mk .include "${USESDIR}/qt.mk" _VALID_ARGS= norecursive outsource no_env no_configure . for arg in ${qmake_ARGS} . if empty(_VALID_ARGS:M${arg}) IGNORE= Incorrect 'USES+= qmake' usage: argument '${arg}' is not recognized . endif . endfor # Check whether we need to add the configure target _ADD_CONFIGURE_TARGET= yes . if !empty(qmake_ARGS:Mno_configure) || defined(HAS_CONFIGURE) || defined(GNU_CONFIGURE) _ADD_CONFIGURE_TARGET= # unset . endif # QMAKESPEC belongs to bsd.qt.mk. QMAKE_ENV?= ${CONFIGURE_ENV} QMAKE_ARGS+= -spec ${QMAKESPEC} \ QMAKE_CC="${CC}" QMAKE_CXX="${CXX}" \ QMAKE_LINK_C="${CC}" QMAKE_LINK_C_SHLIB="${CC}" \ QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \ QMAKE_CFLAGS="${CFLAGS}" \ QMAKE_CXXFLAGS="${CXXFLAGS}" \ QMAKE_LFLAGS="${LDFLAGS}" \ QMAKE_LIBS="${LIBS}" \ QMAKE_CFLAGS_DEBUG="" \ QMAKE_CFLAGS_RELEASE="" \ QMAKE_CXXFLAGS_DEBUG="" \ QMAKE_CXXFLAGS_RELEASE="" \ PREFIX="${PREFIX}" . if defined(WITH_DEBUG) PLIST_SUB+= DEBUG="" QMAKE_ARGS+= CONFIG+="debug separate_debug_info" \ CONFIG-="release" . else PLIST_SUB+= DEBUG="@comment " QMAKE_ARGS+= CONFIG+="release" \ CONFIG-="debug separate_debug_info" . endif # defined(WITH_DEBUG) # We set -recursive by default to keep qmake from running in the build stage. . if ! ${qmake_ARGS:Mnorecursive} QMAKE_ARGS+= -recursive . endif . if defined(QMAKE_VERBOSE) QMAKE_ARGS+= -d . 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} CONFIGURE_WRKSRC= ${WRKDIR}/.build BUILD_WRKSRC= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC= ${BUILD_WRKSRC} TEST_WRKSRC= ${BUILD_WRKSRC} QMAKE_SOURCE_PATH?= ${WRKSRC} . else QMAKE_SOURCE_PATH?= # empty . endif # Add qmake to USE_QT -- unless it's qmake itself . if !${PORTNAME} == qmake && ${_QT_VER:M5} USE_QT+= qmake:build . endif . if empty(qmake_ARGS:Mno_env) DESTDIRNAME= INSTALL_ROOT CONFIGURE_ENV+= QTDIR="${QT_ARCHDIR}" QMAKE="${QMAKE}" \ MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \ QMAKESPEC="${QMAKESPEC}" CONFIGURE_ARGS+= --with-qt-includes=${QT_INCDIR} \ --with-qt-libraries=${QT_LIBDIR} \ --with-extra-includes=${LOCALBASE}/include \ --with-extra-libs=${LOCALBASE}/lib . endif _USES_POST+= qmake .endif # _QMAKE_MK_INCLUDED # ============================================================================= # # ============================================================================= .if defined(_POSTMKINCLUDED) && !defined(_QMAKE_MK_POST_INCLUDED) _QMAKE_MK_POST_INCLUDED= qmake.mk # Define a custom target to make it usable by bsd.qt.mk for internal Qt # configuration. qmake-configure: @${MKDIR} ${_QMAKE_WRKSRC} @cd ${_QMAKE_WRKSRC} && \ - ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ + ${SETENVI} ${WRK_ENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ ${QMAKE_SOURCE_PATH} \ ${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS} . if !target(do-configure) && !empty(_ADD_CONFIGURE_TARGET) _USES_configure+= 450:qmake-configure . endif .endif # !defined(_INCLUDE_USES_QMAKE_MK) diff --git a/Mk/Uses/ruby.mk b/Mk/Uses/ruby.mk index c4631b64d2a9..8900de1ef1d9 100644 --- a/Mk/Uses/ruby.mk +++ b/Mk/Uses/ruby.mk @@ -1,365 +1,365 @@ # Provide support for Ruby releated ports. # # Feature: ruby # Usage: USES=ruby[:args,..] # Valid ARGS: build, extconf, run, setup # ARGS description: # build Says that ruby is required only for build time. # extconf Says that the port uses extconf.rb to configure. # none Says that no dependency is added to the port. # Intended to be used with lang/ruby*. # run Says that ruby is required only for run time. # setup Says that the port uses setup.rb to configure and # build. # # [variables that a user may define] # # RUBY_VER - (See below) # RUBY_DEFAULT_VER - Set to (e.g.) "3.1" if you want to refer to "ruby31" # just as "ruby". # RUBY_ARCH - (See below) # # [variables that each port can define] # # RUBY - Set to full path of ruby. If you set this, the values # of the following variables are automatically obtained # from the ruby executable: RUBY_VER, RUBY_VERSION, # RUBY_ARCH, RUBY_LIBDIR, RUBY_ARCHLIBDIR, # RUBY_SITELIBDIR, and RUBY_SITEARCHLIBDIR. # RUBY_VER - Set to the alternative short version of ruby in the # form of `x.y' (see below for current value). # RUBY_EXTCONF - Set to the alternative name of extconf.rb # (default: extconf.rb). # RUBY_EXTCONF_SUBDIRS - Set to list of subdirectories, if multiple modules # are included. # RUBY_SETUP - Set to the alternative name of setup.rb # (default: setup.rb). # # [variables that each port should not (re)define] # # RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports # (default: ruby${RUBY_SUFFIX}-) # RUBY_VERSION - Full version of ruby without preview/beta suffix in # the form of `x.y.z' (see below for current value). # RUBY_VERSION_CODE - Integer version of RUBY_VERSION in the form of # `xyz'. # RUBY_DISTVERSION - DISTVERSION for the standard ruby ports (ruby, # ruby-gdbm, etc.). # RUBY_PORTVERSION - PORTVERSION for the standard ruby ports (ruby, # ruby-gdbm, etc.). # RUBY_PORTREVISION - PORTREVISION for the standard ruby ports. # RUBY_PORTEPOCH - PORTEPOCH for the standard ruby ports. # RUBY_DISTNAME - DISTNAME for the standard ruby ports, i.e. the # basename of the ruby distribution tarball. # RUBY_PATCHFILES - PATCHFILES for the standard ruby ports, i.e. the # basename of the ruby distribution tarball. # RUBY_WRKSRC - WRKSRC for the ruby port. # MASTER_SITE_SUBDIR_RUBY - MASTER_SITE_SUBDIR for the ruby distfiles. # # RUBY_SHLIBVER - Major version of libruby (see below for current # value). # RUBY_ARCH - Set to target architecture name. # (e.g. i386-freebsd7) # RUBY_SUFFIX - Suffix for ruby binaries and directories # (${RUBY_VER:S/.//}). # RUBY_WITHOUT_SUFFIX - Always ${LOCALBASE}/bin/ruby. # RUBY_WITH_SUFFIX - Always ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX}. # # RUBY_MODNAME - Set to the module name (default: ${PORTNAME}). # # RUBY_BASE_PORT - Port path of base ruby without PORTSDIR, without # suffix except version. # RUBY_PORT - Port path of ruby without PORTSDIR. # # DEPEND_RUBY - BUILD_DEPENDS/RUN_DEPENDS entry for ruby. # # RUBY_LIBDIR - Installation path for architecture independent # libraries. # RUBY_ARCHLIBDIR - Installation path for architecture dependent # libraries. # RUBY_SITELIBDIR - Installation path for site architecture independent # libraries. # RUBY_SITEARCHLIBDIR - Installation path for site architecture dependent # libraries. # RUBY_DOCDIR - Installation path for documents. # RUBY_EXAMPLESDIR - Installation path for examples. # RUBY_RIDIR - Installation path for site architecture independent ri # documents. # RUBY_SITERIDIR - Installation path for site architecture dependent ri # documents. # RUBY_MODDOCDIR - Installation path for the module's documents. # RUBY_MODEXAMPLESDIR - Installation path for the module's examples. # # MAINTAINER: ruby@FreeBSD.org .if !defined(_INCLUDE_USES_RUBY_MK) _INCLUDE_USES_RUBY_MK= yes _valid_ARGS= build extconf none run setup # "USES=gem" implies "USES=ruby" . if defined(_INCLUDE_USES_GEM_MK) ruby_ARGS= . endif # Sanity check . for arg in ${ruby_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= ruby:${ruby_ARGS}' usage: argument [${arg}] is not recognized . endif . endfor . if defined(RUBY_DEFAULT_VER) WARNING+= "RUBY_DEFAULT_VER is defined, consider using DEFAULT_VERSIONS=ruby=${RUBY_DEFAULT_VER} instead" . endif RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} RUBY_VER?= ${RUBY_DEFAULT_VER} . 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 _RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' . 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 _RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = RbConfig::CONFIG' -e RUBY_VERSION!= ${_RUBY_CONFIG} 'puts C["ruby_version"]' RUBY_SUFFIX?= # empty RUBY_ARCH!= ${_RUBY_CONFIG} 'puts C["target"]' _RUBY_SYSLIBDIR!= ${_RUBY_CONFIG} 'puts C["libdir"]' _RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' _RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' . else RUBY?= ${LOCALBASE}/bin/ruby${RUBY_SUFFIX} . if defined(RUBY_VER) # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . if ${RUBY_VER} == 3.0 # # Ruby 3.0 # RUBY_DISTVERSION= 3.0.6 RUBY_PORTREVISION= 1 . elif ${RUBY_VER} == 3.1 # # Ruby 3.1 # RUBY_DISTVERSION= 3.1.4 RUBY_PORTREVISION= 1 . elif ${RUBY_VER} == 3.2 # # Ruby 3.2 # RUBY_DISTVERSION= 3.2.3 RUBY_PORTREVISION= 0 . elif ${RUBY_VER} == 3.3 # # Ruby 3.3 # RUBY_DISTVERSION= 3.3.0 RUBY_PORTREVISION= 0 # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . else # # Other versions # IGNORE= Only ruby 3.0, 3.1, 3,2 and 3.3 are supported _INVALID_RUBY_VER= 1 . endif RUBY_PORTEPOCH= 1 RUBY_VERSION= ${RUBY_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} . endif # defined(RUBY_VER) . if !defined(_INVALID_RUBY_VER) RUBY30?= "@comment " RUBY31?= "@comment " RUBY32?= "@comment " RUBY33?= "@comment " . 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 BROKEN= ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} . endif . endif RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION} RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-${RUBY_VER}/" \ --with-rubylibprefix="${PREFIX}/lib/ruby" \ --docdir="${RUBY_DOCDIR}" \ --with-soname=ruby${RUBY_SUFFIX} CONFIGURE_TARGET?= ${ARCH}-portbld-${OPSYS:tl}${OSREL:C/\..*//} RUBY_ARCH?= ${ARCH}-${OPSYS:tl}${OSREL:C/\..*//} _RUBY_SYSLIBDIR?= ${PREFIX}/lib _RUBY_SITEDIR?= ${_RUBY_SYSLIBDIR}/ruby/site_ruby _RUBY_VENDORDIR?= ${_RUBY_SYSLIBDIR}/ruby/vendor_ruby . endif . endif # defined(RUBY) . if !defined(_INVALID_RUBY_VER) RUBY_DEFAULT_SUFFIX?= ${RUBY_DEFAULT_VER:S/.//} RUBY_PORTVERSION?= ${RUBY_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} MASTER_SITE_SUBDIR_RUBY?= ${RUBY_VER} RUBY_DISTNAME?= ruby-${RUBY_DISTVERSION} RUBY_WRKSRC?= ${WRKDIR}/${RUBY_DISTNAME} RUBY_RELVERSION_CODE?= ${RUBY_RELVERSION:S/.//g} RUBY_VERSION_CODE?= ${RUBY_VERSION:S/.//g} RUBY_VER= ${RUBY_VERSION:C/([[:digit:]]+\.[[:digit:]]+).*/\1/} RUBY_SUFFIX= ${RUBY_VER:S/.//} RUBY_WITHOUT_SUFFIX?= ${LOCALBASE}/bin/ruby RUBY_WITH_SUFFIX?= ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX} RUBY_PKGNAMEPREFIX?= ruby${RUBY_SUFFIX}- RUBY_SHLIBVER?= ${RUBY_VER:S/.//} RUBY_CONFIGURE_ARGS+= --program-prefix="" . if ${RUBY_VER} != ${RUBY_DEFAULT_VER} DEPENDS_ARGS+= RUBY_VER=${RUBY_VER} . endif RUBY_CONFIGURE_ARGS+= --program-suffix="${RUBY_SUFFIX}" RUBY_MODNAME?= ${PORTNAME} # Ports RUBY_BASE_PORT?= lang/ruby${RUBY_VER:S/.//} RUBY_PORT?= ${RUBY_BASE_PORT} # Depends DEPEND_RUBY?= ${RUBY}:${RUBY_PORT} # Directories RUBY_LIBDIR?= ${_RUBY_SYSLIBDIR}/ruby/${RUBY_VER} RUBY_ARCHLIBDIR?= ${RUBY_LIBDIR}/${RUBY_ARCH} RUBY_SITELIBDIR?= ${_RUBY_SITEDIR}/${RUBY_VER} RUBY_SITEARCHLIBDIR?= ${RUBY_SITELIBDIR}/${RUBY_ARCH} RUBY_VENDORLIBDIR?= ${_RUBY_VENDORDIR}/${RUBY_VER} RUBY_VENDORARCHLIBDIR?= ${RUBY_VENDORLIBDIR}/${RUBY_ARCH} RUBY_DOCDIR?= ${PREFIX}/share/doc/ruby${RUBY_SUFFIX} RUBY_EXAMPLESDIR?= ${PREFIX}/share/examples/ruby${RUBY_SUFFIX} RUBY_RIDIR?= ${PREFIX}/share/ri/${RUBY_VER}/system RUBY_SITERIDIR?= ${PREFIX}/share/ri/${RUBY_VER}/site RUBY_MODDOCDIR?= ${RUBY_DOCDIR}/${RUBY_MODNAME} RUBY_MODEXAMPLESDIR?= ${RUBY_EXAMPLESDIR}/${RUBY_MODNAME} # PLIST PLIST_RUBY_DIRS= RUBY_LIBDIR="${RUBY_LIBDIR}" \ RUBY_ARCHLIBDIR="${RUBY_ARCHLIBDIR}" \ RUBY_SITELIBDIR="${RUBY_SITELIBDIR}" \ RUBY_SITEARCHLIBDIR="${RUBY_SITEARCHLIBDIR}" \ RUBY_VENDORLIBDIR="${RUBY_VENDORLIBDIR}" \ RUBY_VENDORARCHLIBDIR="${RUBY_VENDORARCHLIBDIR}" \ RUBY_MODDOCDIR="${RUBY_MODDOCDIR}" \ RUBY_MODEXAMPLESDIR="${RUBY_MODEXAMPLESDIR}" \ RUBY_DOCDIR="${RUBY_DOCDIR}" \ RUBY_EXAMPLESDIR="${RUBY_EXAMPLESDIR}" \ RUBY_RIDIR="${RUBY_RIDIR}" \ RUBY_SITERIDIR="${RUBY_SITERIDIR}" PLIST_SUB+= ${PLIST_RUBY_DIRS:C,DIR="(${LOCALBASE}|${PREFIX})/,DIR=",} \ RUBY_VERSION="${RUBY_VERSION}" \ RUBY_VER="${RUBY_VER}" \ RUBY_SHLIBVER="${RUBY_SHLIBVER}" \ RUBY_ARCH="${RUBY_ARCH}" \ RUBY_SUFFIX="${RUBY_SUFFIX}" \ RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" . if ${PORT_OPTIONS:MDEBUG} RUBY_FLAGS+= -d . endif # # extconf.rb support # . if ${ruby_ARGS:Mextconf} RUBY_EXTCONF?= extconf.rb CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}" CONFIGURE_ENV+= RB_USER_INSTALL=yes do-configure: ruby-extconf-configure ruby-extconf-configure: . 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} + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} . endfor . else @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" @cd ${CONFIGURE_WRKSRC}; \ - ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} . endif . endif # # setup.rb support # . if ${ruby_ARGS:Msetup} RUBY_SETUP?= setup.rb do-configure: ruby-setup-configure ruby-setup-configure: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure" @cd ${BUILD_WRKSRC}; \ - ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS} + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS} do-build: ruby-setup-build ruby-setup-build: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to build" @cd ${BUILD_WRKSRC}; \ - ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup do-install: ruby-setup-install ruby-setup-install: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to install" @cd ${INSTALL_WRKSRC}; \ - ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} . endif . if !${ruby_ARGS:Mbuild} && !${ruby_ARGS:Mrun} && !${ruby_ARGS:Mnone} EXTRACT_DEPENDS+= ${DEPEND_RUBY} PATCH_DEPENDS+= ${DEPEND_RUBY} BUILD_DEPENDS+= ${DEPEND_RUBY} RUN_DEPENDS+= ${DEPEND_RUBY} . elif ${ruby_ARGS:Mbuild} EXTRACT_DEPENDS+= ${DEPEND_RUBY} PATCH_DEPENDS+= ${DEPEND_RUBY} BUILD_DEPENDS+= ${DEPEND_RUBY} . elif ${ruby_ARGS:Mrun} RUN_DEPENDS+= ${DEPEND_RUBY} . endif . endif # _INVALID_RUBY_VER .endif diff --git a/Mk/bsd.commands.mk b/Mk/bsd.commands.mk index 069b5e4c6030..8ab99a18e22b 100644 --- a/Mk/bsd.commands.mk +++ b/Mk/bsd.commands.mk @@ -1,135 +1,136 @@ # bsd.commands.mk - Common commands used within the ports infrastructure # # # DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF, EVEN IF YOU DID NOT GET # A RESPONSE FROM THE MAINTAINER(S) WITHIN A REASONABLE TIMEFRAME! ALL # UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! # COMMANDS_Include_MAINTAINER= portmgr@FreeBSD.org .if !defined(_COMMANDSMKINCLUDED) _COMMANDSMKINCLUDED= yes AWK?= /usr/bin/awk BASENAME?= /usr/bin/basename BRANDELF?= /usr/bin/brandelf BSDMAKE?= /usr/bin/make BZCAT?= /usr/bin/bzcat BZIP2_CMD?= /usr/bin/bzip2 CAT?= /bin/cat CHGRP?= /usr/bin/chgrp CHMOD?= /bin/chmod CHOWN?= /usr/sbin/chown CHROOT?= /usr/sbin/chroot COMM?= /usr/bin/comm CP?= /bin/cp CPIO?= /usr/bin/cpio CUT?= /usr/bin/cut DC?= /usr/bin/dc . if exists(/usr/bin/dialog) DIALOG?= /usr/bin/dialog . else DIALOG?= /usr/bin/bsddialog . endif DIALOG4PORTS?= ${LOCALBASE}/bin/portconfig DIFF?= /usr/bin/diff DIRNAME?= /usr/bin/dirname EGREP?= /usr/bin/egrep ELFCTL?= /usr/bin/elfctl EXPR?= /bin/expr FALSE?= false # Shell builtin FILE?= /usr/bin/file FIND?= /usr/bin/find FLEX?= /usr/bin/flex FMT?= /usr/bin/fmt FMT_80?= ${FMT} 75 79 GMAKE?= gmake GREP?= /usr/bin/grep GUNZIP_CMD?= /usr/bin/gunzip -f GZCAT?= /usr/bin/gzcat GZIP?= -9 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP} HEAD?= /usr/bin/head ID?= /usr/bin/id IDENT?= /usr/bin/ident JOT?= /usr/bin/jot LDCONFIG?= /sbin/ldconfig LHA_CMD?= ${LOCALBASE}/bin/lha LN?= /bin/ln LS?= /bin/ls MKDIR?= /bin/mkdir -p MKTEMP?= /usr/bin/mktemp MOUNT?= /sbin/mount MOUNT_DEVFS?= ${MOUNT} -t devfs devfs # XXX: this is a work-around for an obscure bug where # mount -t nullfs returns zero status on errors within # a make target MOUNT_NULLFS?= /sbin/mount_nullfs MV?= /bin/mv NPROC?= /bin/nproc OBJCOPY?= /usr/bin/objcopy OBJDUMP?= /usr/bin/objdump PASTE?= /usr/bin/paste PAX?= /bin/pax PRINTF?= /usr/bin/printf PS_CMD?= /bin/ps PW?= /usr/sbin/pw READELF?= /usr/bin/readelf REALPATH?= /bin/realpath RLN?= ${INSTALL} -l rs RM?= /bin/rm -f RMDIR?= /bin/rmdir SED?= /usr/bin/sed SETENV?= /usr/bin/env +SETENVI?= /usr/bin/env -i SH?= /bin/sh SORT?= /usr/bin/sort STRIP_CMD?= /usr/bin/strip STAT?= /usr/bin/stat # Command to run commands as privileged user # Example: "/usr/local/bin/sudo -E sh -c" to use "sudo" instead of "su" SU_CMD?= /usr/bin/su root -c SYSCTL?= /sbin/sysctl TAIL?= /usr/bin/tail TEST?= test # Shell builtin TR?= /usr/bin/tr TRUE?= true # Shell builtin UMOUNT?= /sbin/umount UNAME?= /usr/bin/uname UNMAKESELF_CMD?= ${LOCALBASE}/bin/unmakeself UNZIP_CMD?= ${LOCALBASE}/bin/unzip UNZIP_NATIVE_CMD?= /usr/bin/unzip WHICH?= /usr/bin/which XARGS?= /usr/bin/xargs XMKMF?= ${LOCALBASE}/bin/xmkmf YACC?= /usr/bin/yacc XZ?= -Mmax XZCAT= /usr/bin/xzcat ${XZ} XZ_CMD?= /usr/bin/xz ${XZ} MD5?= /sbin/md5 SHA256?= /sbin/sha256 SOELIM?= /usr/bin/soelim # 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 # the echo command. ECHO_CMD?= echo # Shell builtin # Used to print all the '===>' style prompts - override this to turn them off. ECHO_MSG?= ${ECHO_CMD} .elif !defined(_PKGTOOLSDEFINED) _PKGTOOLSDEFINED= yes PKG_BIN?= ${LOCALBASE}/sbin/pkg-static PKG_REGISTER?= ${PKG_BIN} register PKG_DELETE?= ${PKG_BIN} delete -y PKG_INFO?= ${PKG_BIN} info -g PKG_VERSION?= ${PKG_BIN} version PKG_CREATE?= ${PKG_BIN} create PKG_ADD?= ${PKG_BIN} add PKG_QUERY?= ${PKG_BIN} query .endif diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk index 162e2836e236..91ea9516c846 100644 --- a/Mk/bsd.java.mk +++ b/Mk/bsd.java.mk @@ -1,481 +1,481 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.java.mk - Support for Java-based ports. # # # For FreeBSD committers: # Please send all suggested changes to the maintainer instead of committing # them yourself. # .if !defined(Java_Include) Java_Include= bsd.java.mk Java_Include_MAINTAINER= java@FreeBSD.org #------------------------------------------------------------------------------- # Variables that each port can define: # # USE_JAVA Should be defined to the remaining variables to have any # effect # # JAVA_VERSION List of space-separated suitable java versions for the # port. An optional "+" allows you to specify a range of # versions. (allowed values: 8[+] 11[+] 17[+] 18[+] 19[+] # 20[+] 21[+]) # # JAVA_OS List of space-separated suitable JDK port operating systems # for the port. (allowed values: native linux) # # JAVA_VENDOR List of space-separated suitable JDK port vendors for the # port. (allowed values: openjdk oracle) # # JAVA_BUILD When set, it means that the selected JDK port should be # added to build dependencies for the port. # # JAVA_EXTRACT This variable works exactly the same as JAVA_BUILD but # regarding extract dependencies. # # JAVA_RUN This variable works exactly the same as JAVA_BUILD but # regarding run dependencies. # # USE_ANT Should be defined when the port uses Apache Ant. Ant is thus # considered to be the sub-make command. When no 'do-build' # target is defined by the port, a default one will be set # that simply runs Ant according to MAKE_ENV, MAKE_ARGS and # ALL_TARGET. Read the documentation in bsd.port.mk for more # information. # #------------------------------------------------------------------------------- # Variables defined for the port: # # JAVA_PORT The name of the JDK port. (e.g. 'java/openjdk8') # # JAVA_PORT_VERSION The version of the JDK port. (e.g. '8') # # JAVA_PORT_OS The operating system used by the JDK port. (e.g. 'linux') # # JAVA_PORT_VENDOR The vendor of the JDK port. (e.g. 'openjdk') # # JAVA_PORT_OS_DESCRIPTION Description of the operating system used by the # JDK port. (e.g. 'Linux') # # JAVA_PORT_VENDOR_DESCRIPTION Description of the vendor of the JDK port. # (e.g. 'OpenJDK BSD Porting Team') # # JAVA_HOME Path to the installation directory of the JDK. (e.g. # '/usr/local/openjdk8') # # JAVAC Path to the Java compiler to use. (e.g. # '/usr/local/openjdk8/bin/javac' or '/usr/local/bin/javac') # # JAR Path to the JAR tool to use. (e.g. # '/usr/local/openjdk8/bin/jar' or '/usr/local/bin/fastjar') # # APPLETVIEWER Path to the appletviewer utility. (e.g. # '/usr/local/linux-jdk1.8.0/bin/appletviewer') # # JAVA Path to the java executable. Use this for executing Java # programs. (e.g. '/usr/local/openjdk8/bin/java') # # JAVADOC Path to the javadoc utility program. # # JAVAH Path to the javah program. # # JAVAP Path to the javap program. # # JAVA_KEYTOOL Path to the keytool utility program. # # JAVA_N2A Path to the native2ascii tool. # # JAVA_POLICYTOOL Path to the policytool program. # # JAVA_SERIALVER Path to the serialver utility program. # # RMIC Path to the RMI stub/skeleton generator, rmic. # # RMIREGISTRY Path to the RMI registry program, rmiregistry. # # RMID Path to the RMI daemon program. # # JAVA_CLASSES Path to the archive that contains the JDK class files. On # most JDKs, this is ${JAVA_HOME}/jre/lib/rt.jar. # # JAVASHAREDIR The base directory for all shared Java resources. # # JAVAJARDIR The directory where a port should install JAR files. # # JAVALIBDIR The directory where JAR files installed by other ports # are located. # #------------------------------------------------------------------------------- # Porter's hints # # To retrieve the Major version number from JAVA_PORT_VERSION (e.g. "1.8"): # -> ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/} # #------------------------------------------------------------------------------- # There are the following stages: # # Stage 1: Define constants # Stage 2: Determine which JDK ports are installed and which JDK ports are # suitable # Stage 3: Decide the exact JDK to use (or install) # Stage 4: Add any dependencies if necessary # Stage 5: Define all settings for the port to use # . if defined(USE_JAVA) . if !defined(JAVA_VERSION) && empty(USE_JAVA:C/[0-9]*[\.]*[0-9]*[+]*//) JAVA_VERSION=${USE_JAVA} . endif #------------------------------------------------------------------------------- # Stage 1: Define constants # # System-global directories # NB: If the value of JAVALIBDIR is altered here it must also be altered # in java/javavmwrapper/Makefile. JAVASHAREDIR?= ${PREFIX}/share/java JAVAJARDIR?= ${JAVASHAREDIR}/classes JAVALIBDIR?= ${LOCALBASE}/share/java/classes # Add appropriate substitutions to PLIST_SUB and LIST_SUB PLIST_SUB+= JAVASHAREDIR="${JAVASHAREDIR:S,^${PREFIX}/,,}" \ JAVAJARDIR="${JAVAJARDIR:S,^${PREFIX}/,,}" SUB_LIST+= JAVASHAREDIR="${JAVASHAREDIR}" \ JAVAJARDIR="${JAVAJARDIR}" \ JAVALIBDIR="${JAVALIBDIR}" . if defined(JAVA_VERSION) SUB_LIST+= JAVA_VERSION="${JAVA_VERSION}" . endif . if defined(JAVA_VENDOR) SUB_LIST+= JAVA_VENDOR="${JAVA_VENDOR}" . endif . if defined(JAVA_OS) SUB_LIST+= JAVA_OS="${JAVA_OS}" . endif # The complete list of Java versions, os and vendors supported. __JAVA_VERSION_LIST= 8 11 17 18 19 20 21 _JAVA_VERSION_LIST= ${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/} _JAVA_OS_LIST= native linux _JAVA_VENDOR_LIST= openjdk oracle # Set all meta-information about JDK ports: # port location, corresponding JAVA_HOME, JDK version, OS, vendor _JAVA_PORT_NATIVE_OPENJDK_JDK_8_INFO= PORT=java/openjdk8 HOME=${LOCALBASE}/openjdk8 \ VERSION=8 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_11_INFO= PORT=java/openjdk11 HOME=${LOCALBASE}/openjdk11 \ VERSION=11 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_17_INFO= PORT=java/openjdk17 HOME=${LOCALBASE}/openjdk17 \ VERSION=17 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_18_INFO= PORT=java/openjdk18 HOME=${LOCALBASE}/openjdk18 \ VERSION=18 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_19_INFO= PORT=java/openjdk19 HOME=${LOCALBASE}/openjdk19 \ VERSION=19 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_20_INFO= PORT=java/openjdk20 HOME=${LOCALBASE}/openjdk20 \ VERSION=20 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_21_INFO= PORT=java/openjdk21 HOME=${LOCALBASE}/openjdk21 \ VERSION=21 OS=native VENDOR=openjdk _JAVA_PORT_LINUX_ORACLE_JDK_8_INFO= PORT=java/linux-oracle-jdk18 HOME=${LOCALBASE}/linux-oracle-jdk1.8.0 \ VERSION=8 OS=linux VENDOR=oracle # Verbose description for each VENDOR _JAVA_VENDOR_openjdk= "OpenJDK BSD Porting Team" _JAVA_VENDOR_oracle= Oracle # Verbose description for each OS _JAVA_OS_native= Native _JAVA_OS_linux= Linux # List all JDK ports in order of preference __JAVA_PORTS_ALL= \ JAVA_PORT_NATIVE_OPENJDK_JDK_8 \ JAVA_PORT_NATIVE_OPENJDK_JDK_11 \ JAVA_PORT_NATIVE_OPENJDK_JDK_17 \ JAVA_PORT_NATIVE_OPENJDK_JDK_18 \ JAVA_PORT_NATIVE_OPENJDK_JDK_19 \ JAVA_PORT_NATIVE_OPENJDK_JDK_20 \ JAVA_PORT_NATIVE_OPENJDK_JDK_21 \ JAVA_PORT_LINUX_ORACLE_JDK_8 _JAVA_PORTS_ALL= ${JAVA_PREFERRED_PORTS} \ JAVA_PORT_NATIVE_OPENJDK_JDK_${JAVA_DEFAULT} \ ${__JAVA_PORTS_ALL} # Set the name of the file that indicates that a JDK is indeed installed, as a # relative path within the JAVA_HOME directory. _JDK_FILE=bin/javac #------------------------------------------------------------------------------- # Stage 2: Determine which JDK ports are suitable and which JDK ports are # suitable # # 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}) check-makevars:: @${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined -- clearing." .undef ${variable} . endif . endfor # Error checking: JAVA_VERSION . if defined(JAVA_VERSION) . if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP= ${_JAVA_VERSION_LIST:C/\+/\\+/:ts|} . endif check-makevars:: @( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \ (${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}) . endif # Error checking: JAVA_VENDOR . if defined(JAVA_VENDOR) . if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP= ${_JAVA_VENDOR_LIST:ts|} . endif check-makevars:: @( test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -Eq "${_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}) . endif # Error checking: JAVA_OS . if defined(JAVA_OS) . if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP= ${_JAVA_OS_LIST:ts|} . endif check-makevars:: @( test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -Eq "${_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}"; \ ${FALSE}) . endif # 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) JAVA_BUILD= jdk . endif JAVA_RUN= jre . endif # JDK dependency setting . undef _JAVA_PORTS_INSTALLED . undef _JAVA_PORTS_POSSIBLE . if defined(JAVA_VERSION) _JAVA_VERSION= ${JAVA_VERSION:S/^8+/8 11+/:S/^11+/11 17+/:S/^17+/17 18+/:S/^18+/18 19+/:S/^19+/19 20+/:S/^20+/20 21+/:S/^21+/21/} . else _JAVA_VERSION= ${__JAVA_VERSION_LIST} . endif . if defined(JAVA_OS) _JAVA_OS= ${JAVA_OS} . else _JAVA_OS= ${_JAVA_OS_LIST} . endif . if defined(JAVA_VENDOR) _JAVA_VENDOR= ${JAVA_VENDOR} . else _JAVA_VENDOR= ${_JAVA_VENDOR_LIST} . endif . 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=*:S,VERSION=,,} 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}) __JAVA_PORTS_INSTALLED+= ${A_JAVA_PORT} . 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}} __JAVA_PORTS_POSSIBLE+= ${A_JAVA_PORT} . endif . endfor . endfor . endfor . endfor . if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED= ${__JAVA_PORTS_INSTALLED:C/ [ ]+/ /g} . endif _JAVA_PORTS_POSSIBLE= ${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g} #------------------------------------------------------------------------------- # Stage 3: Decide the exact JDK to use (or install) # # Find an installed JDK port that matches the requirements of the port . undef _JAVA_PORTS_INSTALLED_POSSIBLE . for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE} __JAVA_PORTS_INSTALLED_POSSIBLE+= ${_JAVA_PORTS_INSTALLED:M${A_JAVA_PORT}} . 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) _JAVA_PORT= $i _JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit= 1 . 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) _JAVA_PORT= $i _JAVA_PORTS_POSSIBLE_shortcircuit= 1 . endif . endfor . endif _JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,} JAVA_HOME= ${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,} JAVA_PORT_VERSION= ${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,} JAVA_PORT_OS= ${_JAVA_PORT_INFO:MOS=*:S,OS=,,} JAVA_PORT_VENDOR= ${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} JAVA_PORT_VENDOR_DESCRIPTION:= ${JAVA_PORT_VENDOR:S/^/\${_JAVA_VENDOR_/:S/$/}/} JAVA_PORT_OS_DESCRIPTION:= ${JAVA_PORT_OS:S/^/\${_JAVA_OS_/:S/$/}/} #------------------------------------------------------------------------------- # Stage 4: Add any dependencies if necessary # # Ant Support: USE_ANT --> JAVA_BUILD=jdk . if defined(USE_ANT) JAVA_BUILD= jdk . endif # Add the JDK port to the dependencies DEPEND_JAVA= ${JAVA}:${JAVA_PORT} . if defined(JAVA_EXTRACT) EXTRACT_DEPENDS+= ${DEPEND_JAVA} . 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 BUILD_DEPENDS+= ${DEPEND_JAVA} . endif . if defined(JAVA_RUN) RUN_DEPENDS+= ${DEPEND_JAVA} . endif # Ant support: default do-build target . 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) do-build: - @(cd ${BUILD_WRKSRC}; \ - ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ + ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) . endif . if !target(do-test) && defined(TEST_TARGET) TEST_DEPENDS+= ${DEPEND_JAVA} TEST_DEPENDS+= ${ANT}:devel/apache-ant do-test: - @(cd ${TEST_WRKSRC}; \ - ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) + @(cd ${TEST_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ + ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) . endif . endif #----------------------------------------------------------------------------- # Stage 5: Define all settings for the port to use # # At this stage both JAVA_HOME and JAVA_PORT are definitely given a value. # # Define the location of the Java compiler. # Only define JAVAC if a JDK is needed . 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) JAVAC?= ${JAVA_HOME}/bin/javac . endif . endif # Define the location of some more executables. APPLETVIEWER?= ${JAVA_HOME}/bin/appletviewer JAR?= ${JAVA_HOME}/bin/jar JAVA?= ${JAVA_HOME}/bin/java JAVADOC?= ${JAVA_HOME}/bin/javadoc JAVAH?= ${JAVA_HOME}/bin/javah JAVAP?= ${JAVA_HOME}/bin/javap JAVA_N2A?= ${JAVA_HOME}/bin/native2ascii JAVA_SERIALVER?=${JAVA_HOME}/bin/serialver RMIC?= ${JAVA_HOME}/bin/rmic RMIREGISTRY?= ${JAVA_HOME}/bin/rmiregistry JAVA_KEYTOOL?= ${JAVA_HOME}/bin/keytool JAVA_POLICYTOOL?= ${JAVA_HOME}/bin/policytool RMID?= ${JAVA_HOME}/bin/rmid # Set the location of the ZIP or JAR file with all standard Java classes. JAVA_CLASSES= ${JAVA_HOME}/jre/lib/rt.jar #------------------------------------------------------------------------------- # Additional Java support # Debug target # Use it to check Java dependency while porting java-debug: @${ECHO_CMD} "# User specified parameters:" @${ECHO_CMD} "JAVA_VERSION= ${JAVA_VERSION} (${_JAVA_VERSION})" @${ECHO_CMD} "JAVA_OS= ${JAVA_OS} (${_JAVA_OS})" @${ECHO_CMD} "JAVA_VENDOR= ${JAVA_VENDOR} (${_JAVA_VENDOR})" @${ECHO_CMD} "JAVA_BUILD= ${JAVA_BUILD}" @${ECHO_CMD} "JAVA_RUN= ${JAVA_RUN}" @${ECHO_CMD} "JAVA_EXTRACT= ${JAVA_EXTRACT}" @${ECHO_CMD} "JAVA_DEFAULT= ${JAVA_DEFAULT}" @${ECHO_CMD} @${ECHO_CMD} "# JDK port dependency selection process:" @${ECHO_CMD} "_JAVA_PORTS_POSSIBLE= ${_JAVA_PORTS_POSSIBLE}" @${ECHO_CMD} "_JAVA_PORTS_INSTALLED= ${_JAVA_PORTS_INSTALLED}" @${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}" @${ECHO_CMD} "_JAVA_PORT= ${_JAVA_PORT}" @${ECHO_CMD} "_JAVA_PORT_INFO= ${_JAVA_PORT_INFO:S/\t/ /}" @${ECHO_CMD} @${ECHO_CMD} "# Selected JDK port:" @${ECHO_CMD} "JAVA_PORT= ${JAVA_PORT}" @${ECHO_CMD} "JAVA_HOME= ${JAVA_HOME}" @${ECHO_CMD} "JAVA_PORT_VERSION= ${JAVA_PORT_VERSION}" @${ECHO_CMD} "JAVA_PORT_OS= ${JAVA_PORT_OS} (${JAVA_PORT_OS_DESCRIPTION})" @${ECHO_CMD} "JAVA_PORT_VENDOR= ${JAVA_PORT_VENDOR} (${JAVA_PORT_VENDOR_DESCRIPTION})" @${ECHO_CMD} @${ECHO_CMD} "# Additional variables:" @${ECHO_CMD} "JAVAC= ${JAVAC}" @${ECHO_CMD} "JAVA_CLASSES= ${JAVA_CLASSES}" . endif .endif diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 1ec1e6c52c66..0671ec0d817d 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,5637 +1,5654 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # # Please view me with 4 column tabs! # This is the master file for the most common elements to all port # Makefile in the ports system. For a more general overview of its # use and importance, see the Porter's Handbook. # There are two different types of "maintainers" in the ports framework. # The maintainer alias of the bsd.port.mk file is listed below in the # FreeBSD_MAINTAINER entry. You should consult them if you have any # questions/suggestions regarding this file. # # DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF, EVEN IF YOU DID NOT GET # A RESPONSE FROM THE MAINTAINER(S) WITHIN A REASONABLE TIMEFRAME! ALL # UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! FreeBSD_MAINTAINER= portmgr@FreeBSD.org # For each port, the MAINTAINER variable is what you should consult for # contact information on the person(s) to contact if you have questions/ # suggestions about that specific port. By default (if no MAINTAINER # is listed), a port is maintained by the subscribers of the ports@FreeBSD.org # mailing list, and any correspondence should be directed there. # # MAINTAINER - The e-mail address of the contact person for this port. # Default: ports@FreeBSD.org # # These are meta-variables that are automatically set to the system # you are running on. These are provided in case you need to take # different actions for different values. # # ARCH - The architecture of the target machine, such as would be # returned by "uname -p". # OPSYS - Portability clause. This is the operating system the # makefile is being used on. Automatically set to # "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. # OSREL - The release version of the operating system as a text # string (e.g., "12.4"). # OSVERSION - The operating system version as a comparable integer; # the value of __FreeBSD_version (e.g., 1302000). # # This is the beginning of the list of all variables that need to be # defined in a port, listed in order that they should be included # to fit in with existing conventions. (Exception: MAINTAINER actually # should appear after EXTRACT_ONLY and before MASTER_SITE_BACKUP). # # These variables are used to identify your port. # # PORTNAME - Name of software. Mandatory. # PORTVERSION - Version of software. Mandatory when no DISTVERSION is given. # PORTREVISION - Version of port. Optional. Commonly used to indicate # that an update has happened that affects the port # framework itself, but not the distributed software # (e.g., local patches or Makefile changes). # PORTEPOCH - Optional. In certain odd cases, the PORTREVISION logic # can be fooled by ports that appear to go backwards # numerically (e.g. if port-0.3 is newer than port-1998). # In this case, incrementing PORTEPOCH forces the revision. # Default: 0 (no effect). # PKGNAME - Always defined as # ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}. # Do not define this in your Makefile. # PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc. # Optional. # PKGNAMESUFFIX - Suffix to specify compilation options or a version # designator (in case there are different versions of # one port as is the case for Tcl). # Optional. # PKGVERSION - Version of package. # Do not define this in your Makefile. # DISTVERSION - Vendor version of the distribution. # Default: ${PORTVERSION} # DISTNAME - Name of port or distribution used in generating # WRKSRC and DISTFILES below. # Default: # ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} # CATEGORIES - A list of descriptive categories into which this port falls. # Mandatory. # # These variable describe how to fetch files required for building the port. # # DISTFILES - Name(s) of archive file(s) containing distribution. # Set this to an empty string if the port doesn't require it. # Default: ${DISTNAME}${EXTRACT_SUFX} # EXTRACT_SUFX - Suffix for archive names # You never have to set both DISTFILES and EXTRACT_SUFX. # Default: .tar.bz2 if USES=tar:bzip2 is set, .tar.xz if # USES=tar:xz USE_XZ is set, .tar.gz otherwise). # MASTER_SITES - Primary location(s) for distribution files if not found # locally. See bsd.sites.mk for common choices for # MASTER_SITES. # MASTER_SITE_SUBDIR # - Subdirectory of MASTER_SITES. Will sometimes need to be # set to ${PORTNAME} for (e.g.) MASTER_SITE_SOURCEFORGE. # Only guaranteed to work for choices of ${MASTER_SITES} # defined in bsd.sites.mk. # Default: not set. # PATCHFILES - Name(s) of additional files that contain distribution # patches. Make will look for them at PATCH_SITES (see below). # They will automatically be uncompressed before patching if # the names end with ".gz", ".bz2" or ".Z". # For each file you can optionally specify a strip # flag of patch(1) after a colon if it has a different # base directory, e.g. "file1 file2:-p1 file3". # You can also use a :group at the end for matching up to # dist file groups. See Porters Handbook for more information. # Syntax: PATCHFILES= patch[:-pX][:group] # Default: not set. # PATCH_SITES - Primary location(s) for distribution patch files # if not found locally. # DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} and # ${PATCHFILES} will be put in this subdirectory of # ${DISTDIR} (see below). Also they will be fetched in this # subdirectory from FreeBSD mirror sites. # ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. # EXTRACT_ONLY - If set, a subset of ${DISTFILES} you want to # actually extract. # # (NOTE: by convention, the MAINTAINER entry (see above) should go here.) # # COMMENT - A short description of the package (less than 70 characters) # WWW - URL users can get more information on the provided package # was previously part of pkg-descr # # The following variables are typically set in /etc/make.conf to indicate # the user's preferred location to fetch files from. You should rarely # need to set these. # # MASTER_SITE_BACKUP # - Backup location(s) for distribution files and patch # files if not found locally and ${MASTER_SITES}/${PATCH_SITES}. # This should *not* be changed. # Default: # http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ # MASTER_SITE_OVERRIDE # - If set, prepend the MASTER_SITES setting with this value. # MASTER_SITE_FREEBSD # - If set, prepend ${MASTER_SITE_BACKUP} in MASTER_SITES. # # Set these if your port should not be built under certain circumstances. # These are string variables; you should set them to the reason why # they are necessary. # # RESTRICTED - Prevent the distribution of distfiles and packages to # the FTP sites or on CDROM (e.g. forbidden by license # considerations). # NO_CDROM - Packages and distfiles may not go on CDROM (e.g. must # not be re-sold) but can go on FTP sites. # NO_PACKAGE - Port should not be packaged for ftp sites or CDROMs, # but distfiles can be put on ftp sites and CDROMs. # FORBIDDEN - Package build should not be attempted because of # security vulnerabilities. # LEGAL_TEXT - Port has legal issues (e.g., special permission to distribute, lacks a license). # LEGAL_PACKAGE - Port has no legal issues but defines NO_PACKAGE # IGNORE - Package build should be skipped entirely (e.g. # because of serious unfixable problems in the build, # because it cannot be manually fetched, etc). Error # logs will not appear on pointyhat, so this should be # used sparingly. # IGNORE_${ARCH} - Port should be ignored on ${ARCH}. # IGNORE_${OPSYS} - Port should be ignored on ${OPSYS}. # IGNORE_${OPSYS}_${OSREL:R} - Port should be ignored on a single # release of ${OPSYS}, e.g IGNORE_FreeBSD_13 # would affect all point releases of FreeBSD 13. # IGNORE_${OPSYS}_${OSREL:R}_${ARCH} - Port should be ignored on a # single release of ${OPSYS} and specific architecture, # e.g IGNORE_FreeBSD_13_i386 would affect all point # releases of FreeBSD 13 in i386. # BROKEN - Port is believed to be broken. Package builds can # still be attempted using TRYBROKEN to test this # assumption. # BROKEN_${ARCH} - Port is believed to be broken on ${ARCH}. Package builds # can still be attempted using TRYBROKEN to # test this assumption. # BROKEN_${OPSYS} - Port is believed to be broken on ${OPSYS}. Package builds # can still be attempted using TRYBROKEN to # test this assumption. # BROKEN_${OPSYS}_${OSREL:R} - Port is believed to be broken on a single # release of ${OPSYS}, e.g BROKEN_FreeBSD_13 # would affect all point releases of FreeBSD 13 # unless TRYBROKEN is also set. # BROKEN_${OPSYS}_${OSREL:R}_${ARCH} - Port is believed to be broken on a # single release of ${OPSYS} and specific architecture, # e.g BROKEN_FreeBSD_13 would affect all point # releases of FreeBSD 13 in i386 # unless TRYBROKEN is also set. # DEPRECATED - Port is deprecated to install. Advisory only. # EXPIRATION_DATE # - If DEPRECATED is set, determines a date when # the port is planed to remove. The date format is # ISO 8601 (YYYY-MM-DD). # # DISABLE_VULNERABILITIES # - If set, do not check if the port is listed in the # vulnerabilities database. # # In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles # or patchfiles have redistribution restrictions, set the following # to the list of such files. # # RESTRICTED_FILES # - List of files that cannot be redistributed. # Default: "${DISTFILES} ${PATCHFILES}" if RESTRICTED # or NO_CDROM is set, empty otherwise. # # These variables are booleans, so you don't need to set them to the reason. # # IS_INTERACTIVE # - Set this if your port needs to interact with the user # during any step in a package build. User can then decide # to skip this port by setting ${BATCH}, or compiling only # the interactive ports by setting ${INTERACTIVE}. # Default: not set. # USE_SUBMAKE - Set this if you want that each of the port's main 7 targets # (extract, patch, configure, build, stage, install and # package) to be executed in a separate make(1) process. # Useful when one of the stages needs to influence make(1) # variables of the later stages using ${WRKDIR}/Makefile.inc # generated on the fly. # Default: not set. # # NO_ARCH - Set this if port is architecture neutral. # # NO_ARCH_IGNORE - Set this to a list files to ignore when NO_ARCH is checked # in stage-qa (i.e. architecture specific files that are # 'bundled' with the port). # # Set these if your port only makes sense to certain architectures. # They are lists containing names for them (e.g., "amd64 i386"). # (Defaults: not set.) # # ONLY_FOR_ARCHS # - Only build ports if ${ARCH} matches one of these. # NOT_FOR_ARCHS - Only build ports if ${ARCH} doesn't match one of these. # ONLY_FOR_ARCHS_REASON # ONLY_FOR_ARCHS_REASON_${ARCH} # - Reason why it's only for ${ONLY_FOR_ARCHS}s # NOT_FOR_ARCHS_REASON # NOT_FOR_ARCHS_REASON_${ARCH} # - Reason why it's not for ${NOT_FOR_ARCHS}s # IA32_BINARY_PORT # - Set this instead of ONLY_FOR_ARCHS if the given port # fetches and installs compiled i386 binaries. # # Dependency checking. Use these if your port requires another port # not in the list below. (Default: empty.) # # EXTRACT_DEPENDS # - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "extract" stage. "path" is # the name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # PATCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "patch" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends in the "fetch" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the # existence (if it is a full pathname) or search for # it in your $PATH (if it is an executable) and go # into "dir" to do a "make all install" if it's not # found. If the third field ("target") exists, it will # be used instead of ${DEPENDS_TARGET}. The first field # also supports a package name with a version range, in # the form package>=1.2 if a particular version is desired. # BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to build (between the "extract" and # "build" stages, inclusive). The test done to # determine the existence of the dependency is the # same as FETCH_DEPENDS. If the third field ("target") # exists, it will be used instead of ${DEPENDS_TARGET}. # RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to run. The test done to determine # the existence of the dependency is the same as # FETCH_DEPENDS. This will be checked during the # "install" stage and the name of the dependency will # be put into the package as well. If the third field # ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this # package depends on. "lib" is the name of a shared library. # TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "test" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # DEPENDS_TARGET # - The default target to execute when a port is calling a # dependency. # Default: install # # These variables control options about how a port gets built and/or # are shorthand notations for common sets of dependencies. # Use these if your port uses some of the common software packages. By # convention these should be set to 'yes', although they only need to be # defined. Defaults: not set, unless explicitly indicated below. # # Note: the distinction between the USE_* and WANT_* variables, and the # WITH_* and WITHOUT_* variables, are that the former are restricted to # usage inside the ports framework, and the latter are reserved for user- # settable options. (Setting USE_* in /etc/make.conf is always wrong). # # WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set # # WITHOUT_SSP - Disable SSP. # # SSP_CFLAGS - Defaults to -fstack-protector. This value # is added to CFLAGS and the necessary flags # are added to LDFLAGS. Note that SSP_UNSAFE # can be used in Makefiles by port maintainers # if a port breaks with it (it should be # extremely rare). # PIE_CFLAGS - Defaults to -fPIE -fPIC. This value # is added to CFLAGS and the necessary flags # are added to LDFLAGS. Note that PIE_UNSAFE # can be used in Makefiles by port maintainers # if a port breaks with it. ## # USE_LOCALE - LANG and LC_ALL are set to the value of this variable in # CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8 ## # USE_GCC - If set, this port requires this version of gcc, either in # the system or installed from a port. # USE_CSTD - Override the default C language standard (gnu89, gnu99) # USE_CXXSTD Override the default C++ language standard # USE_BINUTILS - Use binutils suite from port instead of the version in base. # CFLAGS_${ARCH} Append the cflags to CFLAGS only on the specified architecture # CXXFLAGS_${ARCH} # Append the cxxflags to CXXFLAGS only on the specified architecture ## # LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture ## # USE_OPENLDAP - If set, this port uses the OpenLDAP libraries. # Implies: WANT_OPENLDAP_VER?=24 # WANT_OPENLDAP_VER # - Legal values are: 24 # If set to an unknown value, the port is marked BROKEN. ## # USE_JAVA - If set, this port relies on the Java language. # Implies inclusion of bsd.java.mk. (Also see # that file for more information on USE_JAVA_*). # USE_OCAML - If set, this port relies on the OCaml language. # Implies inclusion of bsd.ocaml.mk. (Also see # that file for more information on USE_OCAML*). ## # USE_GECKO - If set, this port uses the Gecko/Mozilla product. # See bsd.gecko.mk for more details. ## # USE_WX - If set, this port uses the WxWidgets library and related # components. See bsd.wx.mk for more details. ## # USE_LINUX_PREFIX # - Controls the action of PREFIX (see above). Only use this # if the port is a Linux infrastructure port (e.g. contains libs # or a sound server which supports the FreeBSD native one), # use the default prefix if it's a leaf port (e.g. a game or # program). # Implies NO_LICENSES_INSTALL=yes, NO_MTREE=yes, and causes # Linux ldconfig to be used when USE_LDCONFIG is defined. ## # USE_TEX - A list of the TeX dependencies the port has. # ## # USE_RC_SUBR - If set, the ports startup/shutdown script uses the common # routines found in /etc/rc.subr. # If this is set to a list of files, these files will be # automatically added to ${SUB_FILES}, some %%VAR%%'s will # automatically be expanded, they will be installed in # ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they # will be installed in /etc/rc.d/ and added to the packing list. ## # Conflict checking. Use if your port cannot be installed at the same time as # another package. # # CONFLICTS - A list of package name patterns that the port conflicts # with, separated by blanks. The names may include shell # pattern meta-characters "*", "?", "[", "]", and "!". # Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_* # # CONFLICTS_BUILD # - Check conflict prior to the build. # # CONFLICTS_INSTALL # - Check conflict prior to the installation stage. # # Various directory definitions and variables to control them. # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. # # LOCALBASE - Where ports install things. # Default: /usr/local # LINUXBASE - Where Linux ports install things. # Default: /compat/linux # PREFIX - Where *this* port installs its files. # Default: ${LINUXBASE} if USE_LINUX_PREFIX is set, # otherwise ${LOCALBASE} # # IGNORE_PATH_CHECKS # - There are some sanity checks against PREFIX. # You can disable these checks with defining # this variable, but this is not recommended! # Only do this if you really know what you are # doing. These sanity checks are the following: # - PREFIX has to be an absolute path. # - PREFIX can't have a trailing slash. # # BUNDLE_LIBS Teach pkg(8) to not automatically add all shared libraries # installed by a port as shared libraries "provided" for # other packages (i.e., do not expose them in the solver). # This has to be used for ports that bundle third party # libraries for internal usage. # MASTERDIR - Where the port finds patches, package files, etc. Define # this is you have two or more ports that share most of the # files. # Default: ${.CURDIR} # PORTSDIR - The root of the ports tree. # Default: /usr/ports # DISTDIR - Where to search for and store copies of original sources # Default: ${PORTSDIR}/distfiles # PACKAGES - A top level directory where all packages go (rather than # going locally to each port). # Default: ${PORTSDIR}/packages # WRKDIRPREFIX - The place to root the temporary working directory # hierarchy. This path must *not* end in '/'. # Default: none # WRKDIR - A temporary working directory that gets *clobbered* on clean # Default: ${WRKDIRPREFIX}${.CURDIR}/work # WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually # unpacks to. # Default: ${WRKDIR}/${DISTNAME} # WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually # builds in. # Default: not set # NO_WRKSUBDIR - Assume port unpacks without a subdirectory, and extract it in # ${WRKSRC} instead of ${WRKDIR}. # PATCHDIR - A directory containing any additional patches you made # to port this software to FreeBSD. # Default: ${MASTERDIR}/files # SCRIPTDIR - A directory containing any auxiliary scripts # Default: ${MASTERDIR}/scripts # FILESDIR - A directory containing any miscellaneous additional files. # Default: ${MASTERDIR}/files # PKGDIR - A directory containing any package creation files. # Default: ${MASTERDIR} # SRC_BASE - The root of the src tree. (Some ports require this to get # kernel sources). Default: /usr/src # UID_FILES - A list of files containing information about registered UIDs. # Note that files have decreasing priority. # GID_FILES - A list of files containing information about registered GIDs. # Note that files have decreasing priority. # # Variables that serve as convenient "aliases" for your *-install targets. # Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". # # INSTALL_PROGRAM # - A command to install binary executables. (By # default, also strips them, unless ${STRIP} is # overridden to be the empty string). # INSTALL_KLD - As INSTALL_PROGRAM, but without the STRIP. # INSTALL_LIB - As INSTALL_DATA, but also strips the file. # INSTALL_SCRIPT # - A command to install executable scripts. # INSTALL_DATA - A command to install sharable data and static libs. # INSTALL_MAN - A command to install manpages and documentation. # COPYTREE_BIN # COPYTREE_SHARE # - Similiar to INSTALL_PROGRAM and INSTALL_DATA commands but # working on whole trees of directories, takes 3 arguments, # last one is find(1) arguments and optional. # Example use: # cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR} "! -name *\.bak" # # Installs all directories and files from ${WRKSRC}/doc # to ${DOCSDIR} except sed(1) backup files. # # Set the following to specify all .info files your port installs. # # INFO - A list of .info files (omitting the trailing ".info"); # only one entry per document! These files are listed in # the path relative to ${INFO_PATH}. # INFO_PATH - Path, where all .info files will be installed by your # port, relative to ${PREFIX} # # Set the following to specify all documentation your port installs into # ${DOCSDIR} # # PORTDOCS - A list of files and directories relative to DOCSDIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no documentation files are # installed. # Useful for dynamically generated documentation. # # Set the following to specify all documentation your port installs into # ${EXAMPLESDIR} # # PORTEXAMPLES - A list of files and directories relative to EXAMPLESDIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no examples files are # installed. # Useful for dynamically generated examples. # # Set the following to specify all files and directories your port installs into # ${DATADIR} # # PORTDATA - A list of files and directories relative to DATADIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no data files are # installed. # Useful for dynamically generated data files. # # Default targets and their behaviors: # # fetch - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port. # fetch-list - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. # fetch-recursive # - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port and dependencies. # fetch-recursive-list # - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # fetch-required # - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port and dependencies. # fetch-required-list # - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # fetch-url-list # - Show list of URLS to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. # fetch-url-recursive-list # - Show list of URLS to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # fetch-urlall-list # - Show list of URLS to retrieve ${DISTFILES} and # ${PATCHFILES} for this port. # fetch-urlall-recursive-list # - Show list of URLS to retrieve ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # all-depends-list # - Show all directories which are dependencies # for this port. # build-depends-list # - Show all directories which are build-dependencies # for this port. # package-depends-list # - Show all directories which are package-dependencies # for this port. This is based upon the dependency # tree as recorded in the Makefiles of the ports # collection, not as recorded in the currently # installed ports. # actual-package-depends # - Like package-depends-list but with the difference # that the dependencies of the currently installed # ports are used instead of the dependencies as # recorded in the ports collection. # run-depends-list # - Show all directories which are run-dependencies # for this port. # test-depends-list # - Show all directories which are test-dependencies # for this port. # install-missing-packages # - Install missing dependencies from package and mark # them as automatically installed. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure # scripts or nothing, depending on what's available. # build - Actually compile the sources. # install - Install the results of a build. # reinstall - Install the results of a build, deinstalling any previous # installation if needed. # deinstall - Remove the installation. # deinstall-all - Remove all installations with the same PKGORIGIN. # test - Run tests for the port. # package - Create a package from an _installed_ port. # package-recursive # - Create a package for a port and _all_ of its dependencies. # describe - Try to generate a one-line description for each port for # use in INDEX files and the like. # describe-json - Generate a JSON-compliant representation of each port. # check-plist - Checks for files missing from the plist, and files in the # plist that are not installed by the port. # check-sanity - Perform some basic checks of the port layout. # checkpatch - Do a "patch -C" instead of a "patch". Note that it may # give incorrect results if multiple patches deal with # the same file. # checksum - Use distinfo to ensure that your distfiles are valid. # checksum-recursive # - Run checksum in this port and all dependencies. # makesum - Generate distinfo (only do this for your own ports!). # clean - Remove ${WRKDIR} and other temporary files used for building. # clean-depends - Do a "make clean" for all dependencies. # config - Configure options for this port (using ${DIALOG}). # Automatically run prior to extract, patch, configure, build, # install, and package. # config-recursive # - Configure options for this port for a port and all its # dependencies. # showconfig - Display options config for this port. # showconfig-recursive # - Display options config for this port and all its # dependencies. # rmconfig - Remove the options config for this port. # rmconfig-recursive # - Remove the options config for this port and all its # dependencies. # # Default sequence for "all" is: # # check-sanity fetch checksum extract patch configure build # # Please read the comments in the targets section below; you # should be able to use the pre-* or post-* targets/scripts # (which are available for every stage except checksum) or # override the do-* targets to do pretty much anything you want. # # The TARGET_ORDER_OVERRIDE variable can be set to multiple : # to change the ordering of targets, have a look at the _SEQ variables at the # end of this file for the default order and priorities. # # NEVER override the "regular" targets unless you want to open # a major can of worms. # # Set these variables if your port doesn't need some of the steps. # Note that there are no NO_PATCH or NO_CONFIGURE variables because # those steps are empty by default. NO_EXTRACT is not allowed anymore # since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user # variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. # # NO_BUILD - Use a dummy (do-nothing) build target. # NO_INSTALL - Use a dummy (do-nothing) install target. # NO_TEST - Use a dummy (do-nothing) test target. # # Here are some variables used in various stages. # # For options see bsd.options.mk # +# WRK_ENV - Environment used when running the upstream build system. +# Target-specific environment variables can be defined using +# CONFIGURE_ENV, MAKE_ENV, TEST_ENV, and similar variables. +# # For fetch: # # FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. # Default: "/usr/bin/fetch" # FETCH_ARGS - Arguments to ftp/http fetch command. # Default: "-Fpr" # FETCH_CMD - ftp/http fetch command. # Default: ${FETCH_BINARY} ${FETCH_ARGS} # FETCH_BEFORE_ARGS # - Arguments to ${FETCH_CMD} before filename. # Default: none # FETCH_AFTER_ARGS # - Arguments to ${FETCH_CMD} following filename. # Default: none # FETCH_ENV - Environment to pass to ${FETCH_CMD}. # Default: none # FETCH_REGET - Times to retry fetching of files on checksum errors. # Default: 1 # CLEAN_FETCH_ENV # - Disable package dependency in fetch target for mass # fetching. User settable. # # For extract: # # EXTRACT_CMD - Command for extracting archive # Default: ${TAR} # EXTRACT_BEFORE_ARGS # - Arguments to ${EXTRACT_CMD} before filename. # Default: "-xf" # EXTRACT_AFTER_ARGS # - Arguments to ${EXTRACT_CMD} following filename. # Default: "--no-same-owner --no-same-permissions" # For patch: # # EXTRA_PATCHES - Define this variable if you have patches not in # ${PATCHDIR}. This usually happens when you need to # do some pre-processing before some distribution # patches can be applied. In that case, fetch them as # extra distfiles, put the processed results in # ${WRKDIR}, then point EXTRA_PATCHES to them. # The patches specified by this variable will be # applied after the normal distribution patches but # before those in ${PATCHDIR}. This can also contain # directories, all the files named patch-* in those directories # will be applied. # EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches # Points to a directory hierarchy with the same layout # as the ports tree, where local patches can be found. # This allows a third party to keep their patches in # some other source control system if needed. # PATCH_WRKSRC - Directory to apply patches in. # Default: ${WRKSRC} # # For configure: # # HAS_CONFIGURE - If set, this port has its own configure script. The # configure stage will not do anything if this is not set. # GNU_CONFIGURE - If set, you are using GNU configure (optional). Implies # HAS_CONFIGURE. # CONFIGURE_OUTSOURCE - If set, this port builds in an empty ${CONFIGURE_WRKSRC} # not being under ${WRKSRC}. # CONFIGURE_WRKSRC # - Directory to run configure in. # Default: ${WRKSRC} # CONFIGURE_SCRIPT # - Name of configure script, relative to ${CONFIGURE_WRKSRC}. # Default: "Makefile.PL" if USES=perl5 and USE_PERL5=configure # are set, "configure" otherwise. # CONFIGURE_TARGET # - The name of target to call when GNU_CONFIGURE is # defined. # Default: ${ARCH}-portbld-${OPSYS:tl}${OSREL} # GNU_CONFIGURE_PREFIX # - The directory passed as prefix to the configure script if # GNU_CONFIGURE is set. # Default: ${PREFIX} # CONFIGURE_ARGS # - Pass these args to configure if ${HAS_CONFIGURE} is set. # Default: "--prefix=${GNU_CONFIGURE_PREFIX} # --infodir=${PREFIX}/${INFO_PATH} --localstatedir=/var # --mandir=${PREFIX}/man --build=${CONFIGURE_TARGET}" if # GNU_CONFIGURE is set, "CC=${CC} CFLAGS=${CFLAGS} # PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib # INSTALLARCHLIB=${PREFIX}/lib" if USES=perl5 and # USE_PERL5=configure are set, empty otherwise. # CONFIGURE_ENV - Pass these env (shell-like) to configure if # ${HAS_CONFIGURE} is set. # CONFIGURE_LOG - The name of configure log file. It will be printed to # the screen if configure fails. # Default: config.log # CONFIGURE_FAIL_MESSAGE # - A message displayed to users when configure # fails (note: this assumes the do-configure # target has not been overwritten). This message # will be passed through /usr/bin/fmt before # being shown to the user. # # WITHOUT_FBSD10_FIX Disable FreeBSD 10.0 autotools workaround. # # For build and install: # # MAKEFILE - Name of the makefile. # Default: Makefile # ALL_TARGET - Default target for sub-make in build stage. # Default: all # BUILD_WRKSRC - Directory to do build in (default: ${WRKSRC}). # MAKE_ENV - Additional environment vars passed to sub-make in build # and install stages. # Default: see below # MAKE_ARGS - Any extra arguments to sub-make in build and install stages. # Default: none ## # MAKE_JOBS_UNSAFE # - Disallow multiple jobs even when user set a global override. # To be used with known bad ports. # DISABLE_MAKE_JOBS # - Set to disable the multiple jobs feature. User settable. # MAKE_JOBS_NUMBER # - Override the number of make jobs to be used. User settable. # MAKE_JOBS_NUMBER_LIMIT # - Set a limit for maximum number of make jobs allowed to be # used. ## ccache # # WITH_CCACHE_BUILD # - Enable CCACHE support (devel/ccache). User settable. # CCACHE_DIR # - Which directory to use for ccache (default: $HOME/.ccache) # NO_CCACHE # - Disable CCACHE support for example for certain ports if # CCACHE is enabled. User settable. # # For test: # # TEST_TARGET - Target for sub-make in test stage. If not defined, # no default test target is provided. # Default: (none) # TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). # TEST_ENV - Additional environment vars passed to sub-make in test # stage # Default: ${MAKE_ENV} # TEST_ARGS - Any extra arguments to sub-make in test stage # Default: ${MAKE_ARGS} # # For install: # # INSTALL_TARGET # - Default target for sub-make in install stage. # Default: install # INSTALL_WRKSRC # - Directory to install from # Default: ${WRKSRC} # NO_MTREE - If set, will not invoke mtree from bsd.port.mk from # the "install" target. # MTREE_FILE - The name of the mtree file. # Default: ${PORTSDIR}/Templates/BSD.local.dist or # /etc/mtree/BSD.usr.dist if ${PREFIX} == "/usr". # PLIST_DIRS - Directories to be added to packing list # PLIST_FILES - Files and symbolic links to be added to packing list # # PLIST - Name of the `packing list' file. # Change this to ${WRKDIR}/PLIST or something if you # need to write to it. (It is not a good idea for a port # to write to any file outside ${WRKDIR} during a normal # build.) # Default: ${PKGDIR}/pkg-plist # TMPPLIST - Name of the `packing list' file after processing # Default: ${WRKDIR}/.PLIST.mktmp # PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST} # Default: see below # # SUB_FILES - Files that should be passed through sed(1) and redirected to # ${WRKDIR}. # - For each file specified in SUB_FILES, there must be a # corresponding file in ${FILESDIR} whose suffix is ".in". For # instance, if the Makefile specifies "SUB_FILES= pkg-message" # then there must be a file called pkg-message.in in # ${FILESDIR}. # - The substitution process is the same as PLIST_FILES, as # described below except that any line beginning with @comment # is deleted. # SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} # Some pairs are added by default: e.g. PREFIX=${PREFIX} # # USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of # directories to be searched for shared libraries. # Otherwise, this is a list of directories to be added to that # list. The directory names are written to # ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then # used by the ldconfig startup script. # This mechanism replaces ldconfig scripts installed by some # ports, often under such names as 000.${UNQUENAME}.sh. # If USE_LINUX_PREFIX is defined, the Linux version of # ldconfig will be used instead of the native FreeBSD # version, and the directory list given will be ignored. # USE_LDCONFIG32 # - Same as USE_LDCONFIG but the target file is # ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead. # Note: that should only be used on 64-bit architectures. # # DOCSDIR - Name of the directory to install the packages docs in. # Default: ${PREFIX}/share/doc/${PORTNAME} # DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} # EXAMPLESDIR - Name of the directory to install the packages examples in. # Default: ${PREFIX}/share/examples/${PORTNAME} # EXAMPLESDIR_REL # - The EXAMPLESDIR relative to ${PREFIX} # DATADIR - Name of the directory to install the packages shared data in. # Default: ${PREFIX}/share/${PORTNAME} # DATADIR_REL - The DATADIR relative to ${PREFIX} # # WWWDIR - Name of the directory to install the packages www data in. # Default: ${PREFIX}/www/${PORTNAME} # WWWDIR_REL - The WWWDIR relative to ${PREFIX} # # USERS - List of users to create at install time. Each login must # have a corresponding entry in ${UID_FILES}. # GROUPS - List of groups to create at install time. Each group must # have a corresponding entry in ${GID_FILES}. # # DESKTOPDIR - Name of the directory to install ${DESKTOP_ENTRIES} in. # Default: ${PREFIX}/share/applications # DESKTOP_ENTRIES # - List of desktop entry files to generate and install in # ${DESKTOPDIR}. The format is # "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify # Rules: # * Only add desktop entries for applications which do not # require a terminal (i.e. X11 applications). # * If the upstream distribution already installs .desktop # files, you do not need to use this. # * If you require a more elaborate .desktop file than this # variable permits, write it yourself and install it # in ${DESKTOPDIR}. # Notes: # * Comment, Icon and StartupNotify may be empty # strings (""). Categories may be an empty string in some # cases (see below). The other fields are mandatory. # * If Comment is an empty string, port ${COMMENT} will be # used. # * If set, Icon must be either absolute path (usually # ${PREFIX}/share/pixmaps/${PORTNAME}.png) or icon name # without extension if installed icons follow Icon Theme # Specification. # * If Categories is an empty string, bsd.port.mk will try # to deduce a default value using the CATEGORIES variable. # If the deduction fails, you will have to set Categories # manually. You should check the generated value using # "make desktop-categories", and override it if necessary. # * Exec will also be used to name the .desktop file. # * StartupNotify may be true, false or empty (see Desktop # Entry Specification for details). # * The files will be automatically added to ${PLIST}. # Example: # "X Window Information" \ # "Get information about X windows" \ # "${PREFIX}/share/pixmaps/wininfo.png" \ # "${PREFIX}/bin/wininfo" \ # "System;" \ # "" # See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html # for an explanation of the fields. If you need to create more # than one file, just chain them into a single variable. # # Note that the install target will automatically add manpages (see # above) and also substitute special sequences of characters (delimited # by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For # instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of # "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL. # ${TMPPLIST} is generated before the do-install stage. If you are # generating the packing list on-the-fly, make sure it's generated before # do-install is called! # # This is used in all stages: # # SCRIPTS_ENV - Additional environment vars passed to scripts in # ${SCRIPTDIR} executed by bsd.port.mk. # Default: see below # # Finally, variables to change if you want a special behavior. These # are for debugging purposes. Don't set them in your Makefile. # # ECHO_MSG - Used to print all the '===>' style prompts - override this # to turn them off. # Default: ${ECHO_CMD} # PATCH_DEBUG - If set, print out more information about the patches as # it attempts to apply them. # PKG_DBDIR - Where package installation is recorded; this directory # must not contain anything else. # Default: /var/db/pkg # PORT_DBDIR - Where port configuration options are recorded. # Default: /var/db/ports # NO_PKG_REGISTER # - Don't register a port installation as a package. # FORCE_PKG_REGISTER # - If set, it will overwrite any existing package # registration information in ${PKG_DBDIR}/${PKGNAME}. # NO_DEPENDS - Don't verify build of dependencies. # STRICT_DEPENDS # - Verify dependencies but consider missing dependencies as # fatal. # CHECKSUM_ALGORITHMS # - Different checksum algorithms to check for verifying the # integrity of the distfiles. The absence of the algorithm # in distinfo doesn't make it fail. # Default: sha256 # NO_CHECKSUM - Don't verify the checksum. Typically used when # when you noticed the distfile you just fetched has # a different checksum and you intend to verify if # the port still works with it. # USE_PACKAGE_DEPENDS # - Try to install dependencies from existing packages instead # of building the port from scratch. Fallback on source # if an existing package is not present. # USE_PACKAGE_DEPENDS_ONLY # - Like USE_PACKAGE_DEPENDS, but do not fallback on source. # INSTALL_AS_USER # - Define this to install as the current user, intended # for systems where you have no root access. # DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field # has been specified in distinfo. This is useful # when using an alternate FETCH_CMD. # PKG_CREATE_VERBOSE # - If set, pass the -v option to pkg create which # ensures periodic output during packaging and # will help prevent timeouts by build monitors # PKG_COMPRESSION_FORMAT # - the compression format used when creating a package, see # pkg-create(8) for valid formats # PKG_COMPRESSION_LEVEL # - the compression level to use when creating a package, see # pkg-create(8) for valid values # # End of the list of all variables that need to be defined in a port. # Most port authors should not need to understand anything after this point. # LANG= C LC_ALL= C .export LANG LC_ALL # These need to be absolute since we don't know how deep in the ports # tree we are and thus can't go relative. They can, of course, be overridden # by individual Makefiles or local system make configuration. _LIST_OF_WITH_FEATURES= bind_now debug debuginfo lto pie relro sanitize ssp testing _DEFAULT_WITH_FEATURES= ssp PORTSDIR?= /usr/ports LOCALBASE?= /usr/local LINUXBASE?= /compat/linux DISTDIR?= ${PORTSDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} INDEXDIR?= ${PORTSDIR} SRC_BASE?= /usr/src USESDIR?= ${PORTSDIR}/Mk/Uses SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib STAGEDIR?= ${WRKDIR}/stage NOTPHONY?= FLAVORS?= FLAVOR?= OVERLAYS?= REWARNFILE= ${WRKDIR}/reinplace_warnings.txt # Disallow forced FLAVOR as make argument since we cannot change it to the # proper default. .if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR) .error FLAVOR may not be passed empty as a make argument. .endif # Store env FLAVOR for later .if !defined(_FLAVOR) _FLAVOR:= ${FLAVOR} .endif .if !defined(PORTS_FEATURES) && empty(${PORTS_FEATURES:MFLAVORS}) PORTS_FEATURES+= FLAVORS .endif MINIMAL_PKG_VERSION= 1.17.2 _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} \ ${PKGCONFIG_LINKDIR} # Ensure .CURDIR contains an absolute path without a trailing slash. Failed # builds can occur when PORTSDIR is a symbolic link, or with something like # make -C /usr/ports/category/port/. .CURDIR:= ${.CURDIR:tA} # Ensure .CURDIR doesn't contain a colon, which breaks makefile targets .if ${.CURDIR:S/:/\:/g} != ${.CURDIR} .error The current directory path contains ':', this is not supported .endif # make sure bmake treats -V as expected .MAKE.EXPAND_VARIABLES= yes .include "${PORTSDIR}/Mk/bsd.commands.mk" # Do not leak flavors to childs make .MAKEOVERRIDES:= ${.MAKEOVERRIDES:NFLAVOR} .if defined(CROSS_TOOLCHAIN) . if !defined(CROSS_SYSROOT) IGNORE= CROSS_SYSROOT should be defined . endif .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" # Do not define CPP on purpose . if !defined(HOSTCC) HOSTCC:= ${CC} HOSTCXX:= ${CXX} . endif . if !defined(CC_FOR_BUILD) CC_FOR_BUILD:= ${HOSTCC} CXX_FOR_BUILD:= ${HOSTCXX} . endif CONFIGURE_ENV+= HOSTCC="${HOSTCC}" HOSTCXX="${HOSTCXX}" CC_FOR_BUILD="${CC_FOR_BUILD}" CXX_FOR_BUILD="${CXX_FOR_BUILD}" CC= ${XCC} --sysroot=${CROSS_SYSROOT} CXX= ${XCXX} --sysroot=${CROSS_SYSROOT} CPP= ${XCPP} --sysroot=${CROSS_SYSROOT} . for _tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS ${_tool}= ${CROSS_BINUTILS_PREFIX}${_tool:tl} . endfor LD+= --sysroot=${CROSS_SYSROOT} STRIP_CMD= ${CROSS_BINUTILS_PREFIX}strip # only bmake support the below STRIPBIN= ${STRIP_CMD} .export.env STRIPBIN .endif # # DESTDIR section to start a chrooted process if invoked with DESTDIR set # .if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) && \ !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) .include "${PORTSDIR}/Mk/bsd.destdir.mk" .else . 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 # Start of options section . if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) # Get the default maintainer MAINTAINER?= ports@FreeBSD.org # Get the architecture . if !defined(ARCH) ARCH!= ${UNAME} -p . endif HOSTARCH:= ${ARCH} . if defined(CROSS_TOOLCHAIN) ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} . endif _EXPORTED_VARS+= ARCH . if ${ARCH} == powerpc64 . if !defined(PPC_ABI) PPC_ABI!= ${CC} -dM -E - < /dev/null | ${AWK} '/_CALL_ELF/{print "ELFv"$$3}' . if ${PPC_ABI} != ELFv2 PPC_ABI= ELFv1 . endif . endif _EXPORTED_VARS+= PPC_ABI . endif # Get operating system versions for a cross build . if defined(CROSS_SYSROOT) . if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) .error CROSS_SYSROOT does not include /usr/include/sys/param.h. . endif OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h _OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null . endif # Get the operating system type . if !defined(OPSYS) OPSYS!= ${UNAME} -s . endif _EXPORTED_VARS+= OPSYS . if !defined(_OSRELEASE) _OSRELEASE!= ${UNAME} -r . endif _EXPORTED_VARS+= _OSRELEASE # Get the operating system revision OSREL?= ${_OSRELEASE:C/-.*//} _EXPORTED_VARS+= OSREL # Get __FreeBSD_version . 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) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h . else .error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. . endif . endif _EXPORTED_VARS+= OSVERSION . if ${OPSYS} == FreeBSD && (${OSVERSION} < 1302000 ) _UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\ are guaranteed to build on this system. Please upgrade to a supported release. . if defined(ALLOW_UNSUPPORTED_SYSTEM) WARNING+= "${_UNSUPPORTED_SYSTEM_MESSAGE}" . else show-unsupported-system-error: @${ECHO_MSG} "/!\\ ERROR: /!\\" @${ECHO_MSG} @${ECHO_MSG} "${_UNSUPPORTED_SYSTEM_MESSAGE}" | ${FMT_80} @${ECHO_MSG} @${ECHO_MSG} "No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM." | ${FMT_80} @${ECHO_MSG} @${FALSE} . endif . endif # 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(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE) .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number. . endif . elif ${_OSVERSION_MAJOR} != ${OSREL:R} .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. . 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) _PKG_VERSION!= ${PKG_BIN} -v . endif # XXX hack for smooth transition towards pkg 1.17 _PKG_BEFORE_PKGEXT!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} 1.17.0 . if ${_PKG_BEFORE_PKGEXT} == "<" _PKG_TRANSITIONING_TO_NEW_EXT= yes _EXPORTED_VARS+= _PKG_TRANSITIONING_TO_NEW_EXT WARNING+= "It is strongly recommended to upgrade to a newer version of pkg first" . endif # XXX End of hack _PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION} . 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 _PKG_CHECKED= 1 . endif _EXPORTED_VARS+= _PKG_CHECKED MASTERDIR?= ${.CURDIR} . if ${MASTERDIR} != ${.CURDIR} SLAVE_PORT?= yes MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} . else SLAVE_PORT?= no MASTER_PORT?= . endif # If they exist, include Makefile.inc, then architecture/operating # system specific Makefiles, then local Makefile.local. . if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" USE_SUBMAKE= yes . endif . if exists(${MASTERDIR}/../Makefile.inc) .include "${MASTERDIR}/../Makefile.inc" USE_SUBMAKE= yes . endif . if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) .include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}" USE_SUBMAKE= yes . elif exists(${MASTERDIR}/Makefile.${OPSYS}) .include "${MASTERDIR}/Makefile.${OPSYS}" USE_SUBMAKE= yes . elif exists(${MASTERDIR}/Makefile.${ARCH}) .include "${MASTERDIR}/Makefile.${ARCH}" USE_SUBMAKE= yes . endif . if exists(${MASTERDIR}/Makefile.local) .include "${MASTERDIR}/Makefile.local" USE_SUBMAKE= yes . elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) .include "${.CURDIR}/Makefile.local" USE_SUBMAKE= yes . endif . for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} . endfor _PORTDIRNAME= ${.CURDIR:T} PORTDIRNAME?= ${_PORTDIRNAME} PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} # Now that PKGORIGIN is set, look for origin-specific variables. # These are typically set in a make.conf, in the form: # # category_portname_VARS= varname=value othervar+=value novar@ # # e.g. devel_llvm10_VARS= MAKE_JOBS_NUMBER=2 . for var in ${${PKGORIGIN:S/\//_/}_VARS:C/=.*//:O:u} . if ${var:M*@} . undef ${var:C/.$//} . elif ${var:M*+} ${var:C/.$//}+= ${${PKGORIGIN:S/\//_/}_VARS:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} . else ${var}= ${${PKGORIGIN:S/\//_/}_VARS:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} . endif . endfor # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports UID_FILES?= ${PORTSDIR}/UIDs GID_FILES?= ${PORTSDIR}/GIDs UID_OFFSET?= 0 GID_OFFSET?= 0 # predefined accounts from src/etc/master.passwd # alpha numeric sort order USERS_BLACKLIST= _dhcp _pflogd _ypldap auditdistd bin bind daemon games hast kmem mailnull man news nobody operator pop proxy root smmsp sshd toor tty unbound uucp www # predefined accounts from src/etc/group # alpha numeric sort order GROUPS_BLACKLIST= _dhcp _pflogd _ypldap audit authpf bin bind daemon dialer ftp games guest hast kmem mail mailnull man network news nobody nogroup operator proxy smmsp sshd staff sys tty unbound uucp wheel www LDCONFIG_DIR= libdata/ldconfig LDCONFIG32_DIR= libdata/ldconfig32 # At least KDE needs TMPDIR for the package building, # so we're setting it to the known default value. . if defined(PACKAGE_BUILDING) TMPDIR?= /tmp . endif # defined(PACKAGE_BUILDING) # If user specified WITH_FEATURE=yes for a feature that is disabled by default # treat it as enabled by default . for feature in ${_LIST_OF_WITH_FEATURES} . if ${_DEFAULT_WITH_FEATURES:N${feature}} . if defined(WITH_${feature:tu}) _DEFAULT_WITH_FEATURES+= ${feature} . endif . endif . endfor . for feature in ${_LIST_OF_WITH_FEATURES} # Create _{WITH,WITHOUT}_FEATURE vars based on user-provided {WITH,WITHOUT}_FEATURE . if defined(WITH_${feature:tu}) _WITH_${feature:tu}= ${WITH_${feature:tu}} . endif . if defined(WITHOUT_${feature:tu}) _WITHOUT_${feature:tu}= ${WITHOUT_${feature:tu}} . endif # For each Feature we support, process the # WITH_FEATURE_PORTS and WITHOUT_FEATURE_PORTS variables . if ${_DEFAULT_WITH_FEATURES:M${feature}} . if defined(WITHOUT_${feature:tu}_PORTS) . if ${WITHOUT_${feature:tu}_PORTS:M${PKGORIGIN}} _WITHOUT_${feature:tu}= yes .undef _WITH_${feature:tu} . endif . endif . else . if defined(WITH_${feature:tu}_PORTS) . if ${WITH_${feature:tu}_PORTS:M${PKGORIGIN}} _WITH_${feature:tu}= yes .undef _WITHOUT_${feature:tu} . endif . endif . endif . endfor . if defined(USE_LTO) WITH_LTO= ${USE_LTO} WARNING+= USE_LTO is deprecated in favor of WITH_LTO . endif .include "${PORTSDIR}/Mk/bsd.default-versions.mk" .include "${PORTSDIR}/Mk/bsd.options.mk" . endif # End of options section. # Start of pre-makefile section. . if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) . if defined(_PREMKINCLUDED) DEV_ERROR+= "you cannot include bsd.port[.pre].mk twice" . endif _PREMKINCLUDED= yes . if defined(PORTVERSION) . if ${PORTVERSION:M*[-_,]*}x != x IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' . endif . if defined(DISTVERSION) DEV_ERROR+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME" . endif DISTVERSION?= ${PORTVERSION:S/:/::/g} . 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 PORTREVISION?= 0 . if ${PORTREVISION} != 0 _SUF1= _${PORTREVISION} . endif PORTEPOCH?= 0 . if ${PORTEPOCH} != 0 _SUF2= ,${PORTEPOCH} . endif PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL} INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates KEYWORDS?= ${PORTSDIR}/Keywords WRAPPERSDIR?= ${PORTSDIR}/Mk/Wrappers/ PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files SCRIPTDIR?= ${MASTERDIR}/scripts PKGDIR?= ${MASTERDIR} PREFIX?= ${LOCALBASE} PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg . if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" . endif . for odir in ${OVERLAYS} .sinclude "${odir}/Mk/bsd.overlay.mk" . endfor . if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" . endif . if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" . endif . if defined(USE_APACHE_BUILD) USES+= apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g} . elif defined(USE_APACHE_RUN) USES+= apache:run,${USE_APACHE_RUN:C/2([0-9])/2.\1/g} . elif defined(USE_APACHE) USE_APACHE:= ${USE_APACHE:S/common/server,/} USES+= apache:${USE_APACHE:C/2([0-9])/2.\1/g} . endif . if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" . endif . if defined(USE_MYSQL) USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} . if defined(WANT_MYSQL_VER) . if empty(USE_MYSQL) USE_MYSQL:=${WANT_MYSQL_VER} . else USE_MYSQL:=${USE_MYSQL},${WANT_MYSQL_VER} . endif . endif USES+=mysql:${USE_MYSQL} . endif . if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" . endif UID?= ${.MAKE.UID} DESTDIRNAME?= DESTDIR # setup empty variables for USES targets . for target in sanity fetch extract patch configure build install test package stage _USES_${target}?= . endfor # Loading features . for f in ${USES} _f:= ${f:C/\:.*//} . if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} . endif . endfor . for f in ${USES} .undef _usefound . for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} _usefile= ${udir}/${f:C/\:.*//}.mk . if exists(${_usefile}) && !defined(_usefound) _usefound= .include "${_usefile}" . endif . endfor . if !defined(_usefound) ERROR+= "Unknown USES=${f:C/\:.*//}" . endif . endfor . if !empty(FLAVORS) . if ${FLAVORS:Mall} DEV_ERROR+= "FLAVORS cannot contain 'all', it is a reserved value" . endif . for f in ${FLAVORS} . if ${f:C/[[:lower:][:digit:]_]//g} _BAD_FLAVOR_NAMES+= ${f} . endif . endfor . if !empty(_BAD_FLAVOR_NAMES) DEV_ERROR+= "FLAVORS contains flavors that are not all [a-z0-9_]: ${_BAD_FLAVOR_NAMES}" . endif . endif . if !empty(FLAVOR) . if empty(FLAVORS) IGNORE= FLAVOR is defined (to ${FLAVOR}) while this port does not have FLAVORS . elif ! ${FLAVORS:M${FLAVOR}} IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS} . endif . endif . if !empty(FLAVORS) && empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif # Reorder FLAVORS so the default is first if set by the port. . if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) FLAVORS:= ${FLAVOR} ${FLAVORS:N${FLAVOR}} . endif . if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) _DID_FLAVORS_HELPERS= yes _FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX _FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \ FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \ RUN_DEPENDS TEST_DEPENDS # These overwrite the current value . for v in ${_FLAVOR_HELPERS_OVERRIDE} . if defined(${FLAVOR}_${v}) ${v}= ${${FLAVOR}_${v}} . endif . endfor # These append to the current value . for v in ${_FLAVOR_HELPERS_APPEND} . if defined(${FLAVOR}_${v}) ${v}+= ${${FLAVOR}_${v}} . endif . endfor . for v in BROKEN IGNORE . if defined(${FLAVOR}_${v}) ${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}} . endif . endfor . if defined(FLAVORS_SUB) PLIST_SUB+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@} PLIST_SUB+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment " SUB_LIST+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@} SUB_LIST+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment " . endif . endif # defined(${FLAVOR}) EXTRACT_SUFX?= .tar.gz . if defined(USE_LINUX_PREFIX) PREFIX= ${LINUXBASE} DATADIR?= ${PREFIX}/usr/share/${PORTNAME} DOCSDIR?= ${PREFIX}/usr/share/doc/${PORTNAME}-${PORTVERSION} NO_LICENSES_INSTALL= yes NO_MTREE= yes . endif # You can force skipping these test by defining IGNORE_PATH_CHECKS . 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 DATADIR?= ${PREFIX}/share/${PORTNAME} DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} ETCDIR?= ${PREFIX}/etc/${PORTNAME} EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} WWWDIR?= ${PREFIX}/www/${PORTNAME} # Owner and group of the WWW user WWWOWN?= www WWWGRP?= www # Keep PKGNG_ORIGIN/WITH_PKGNG for compat with scripts which are looking for it PKG_ORIGIN?= ports-mgmt/pkg PKGNG_ORIGIN= ${PKG_ORIGIN} WITH_PKGNG?= yes WITH_PKG?= ${WITH_PKGNG} . endif # End of pre-makefile section. # Start of post-makefile section. . if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) . if defined(_POSTMKINCLUDED) DEV_ERROR+= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" @${FALSE} . endif _POSTMKINCLUDED= yes . if defined(BUNDLE_LIBS) PKG_NOTES+= no_provide_shlib PKG_NOTE_no_provide_shlib= yes . endif . if defined(DEPRECATED) PKG_NOTES+= deprecated PKG_NOTE_deprecated=${DEPRECATED} . endif . if defined(EXPIRATION_DATE) PKG_NOTES+= expiration_date PKG_NOTE_expiration_date= ${EXPIRATION_DATE} . endif . if !empty(FLAVOR) PKG_NOTES+= flavor PKG_NOTE_flavor= ${FLAVOR} . endif +WRK_ENV+= HOME=${WRKDIR} \ + PWD="$${PWD}" +. for e in OSVERSION PATH TERM TMPDIR \ + UNAME_b UNAME_i UNAME_K UNAME_m UNAME_n \ + UNAME_p UNAME_r UNAME_s UNAME_U UNAME_v +. ifdef ${e} +WRK_ENV+= ${e}=${${e}:Q} +. endif +. endfor + TEST_ARGS?= ${MAKE_ARGS} TEST_ENV?= ${MAKE_ENV} PKG_ENV+= PORTSDIR=${PORTSDIR} CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ XDG_CONFIG_HOME=${WRKDIR} \ XDG_CACHE_HOME=${WRKDIR}/.cache \ HOME=${WRKDIR} MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ XDG_CONFIG_HOME=${WRKDIR} \ XDG_CACHE_HOME=${WRKDIR}/.cache \ HOME=${WRKDIR} # Respect TMPDIR passed via make.conf or similar and pass it down # to configure and make. . if defined(TMPDIR) MAKE_ENV+= TMPDIR="${TMPDIR}" CONFIGURE_ENV+= TMPDIR="${TMPDIR}" . endif # defined(TMPDIR) QA_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ LINUXBASE=${LINUXBASE} \ LOCALBASE=${LOCALBASE} \ REWARNFILE=${REWARNFILE} \ "STRIP=${STRIP}" \ TMPPLIST=${TMPPLIST} \ CURDIR='${.CURDIR}' \ PKGMESSAGES='${_PKGMESSAGES}' \ FLAVOR=${FLAVOR} \ FLAVORS='${FLAVORS}' \ BUNDLE_LIBS=${BUNDLE_LIBS} \ LDCONFIG_DIR="${LDCONFIG_DIR}" \ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ WANTED_LIBRARIES='${LIB_DEPENDS:C,([^:]*):([^:]*):?.*,\1,}' \ PKGBASE=${PKGBASE} \ LICENSE="${LICENSE}" \ LICENSE_PERMS="${_LICENSE_PERMS}" \ DISABLE_LICENSES="${DISABLE_LICENSES:Dyes}" \ PORTNAME=${PORTNAME} \ NO_ARCH=${NO_ARCH} \ "NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" . if !empty(USES:Mssl) QA_ENV+= USESSSL=yes . endif . if !empty(USES:Mdesktop-file-utils) QA_ENV+= USESDESKTOPFILEUTILS=yes . endif . if !empty(USES:Mlibtool*) QA_ENV+= USESLIBTOOL=yes . endif . if !empty(USES:Mshared-mime-info) QA_ENV+= USESSHAREDMIMEINFO=yes . endif . if !empty(USES:Mterminfo) QA_ENV+= USESTERMINFO=yes . endif CO_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ LOCALBASE=${LOCALBASE} \ WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} \ MTREE_FILE=${MTREE_FILE} \ TMPPLIST=${TMPPLIST} \ SCRIPTSDIR=${SCRIPTSDIR} \ PLIST_SUB_SED="${PLIST_SUB_SED}" \ PORT_OPTIONS="${PORT_OPTIONS}" \ PORTSDIR="${PORTSDIR}" . if defined(CROSS_SYSROOT) PKG_ENV+= ABI_FILE=${CROSS_SYSROOT}/bin/sh MAKE_ENV+= NM=${NM} \ STRIPBIN=${STRIPBIN} \ PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" . endif . if empty(FLAVOR) _WRKDIR= work . else _WRKDIR= work-${FLAVOR} . endif WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} BINARY_LINKDIR= ${WRKDIR}/.bin PATH:= ${BINARY_LINKDIR}:${PATH} . if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} . endif PKGCONFIG_LINKDIR= ${WRKDIR}/.pkgconfig PKGCONFIG_BASEDIR= /usr/libdata/pkgconfig . if !${MAKE_ENV:MPKG_CONFIG_LIBDIR=*} && !${CONFIGURE_ENV:MPKG_CONFIG_LIBDIR=*} MAKE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${LOCALBASE}/share/pkgconfig:${PKGCONFIG_BASEDIR} CONFIGURE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${LOCALBASE}/share/pkgconfig:${PKGCONFIG_BASEDIR} . endif . if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) . if defined(WRKSRC) DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly or set WRKSRC_SUBDIR and remove WRKSRC entirely." . endif WRKSRC?= ${WRKDIR}/${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT} . endif . if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault) . if defined(WRKSRC) DEV_WARNING+= "You are using USE_GITLAB and WRKSRC is set which is wrong. Set GL_PROJECT, GL_ACCOUNT correctly, and/or set WRKSRC_SUBDIR and remove WRKSRC entirely." . endif WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_TAGNAME} . 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) # 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 WRKSRC?= ${WRKDIR}/${DISTNAME} EXTRACT_WRKDIR:= ${WRKDIR} . endif . if defined(WRKSRC_SUBDIR) WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} . endif . 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 PATCH_WRKSRC?= ${WRKSRC} CONFIGURE_WRKSRC?= ${WRKSRC} BUILD_WRKSRC?= ${WRKSRC} INSTALL_WRKSRC?=${WRKSRC} TEST_WRKSRC?= ${WRKSRC} PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ RESETPREFIX=${PREFIX} SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} # This is used for check-stagedir.sh and check_leftover.sh to replace # directories/files with PLIST_SUB %%KEYS%%. # Remove VARS which values are PLIST_SUB_SED_MIN long or shorter PLIST_SUB_SED_MIN?= 2 PLIST_SUB_SED_tmp1= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g} # Remove VARS that are too generic # Remove empty values # Remove @comment values PLIST_SUB_SED_tmp2= ${PLIST_SUB_SED_tmp1:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*} # Handle VARS for which there is a _regex entry PLIST_SUB_SED_tmp3?= ${PLIST_SUB_SED_tmp2:C/(${PLIST_SUB:M*_regex=*:C/_regex=.*/=.*/:Q:S/\\ /|/g:S/\\//g})//:C/(.*)_regex=(.*)/\1=\2/} # Remove quotes # Replace . with \. for later sed(1) usage PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./[.]/g} # kludge to strip trailing whitespace from CFLAGS; # sub-configure will not # survive double space CFLAGS:= ${CFLAGS:C/ $//} . if defined(WITHOUT_CPU_CFLAGS) . if defined(_CPUCFLAGS) . if !empty(_CPUCFLAGS) CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} . endif . endif . endif . for f in ${_LIST_OF_WITH_FEATURES} . if defined(_WITH_${f:tu}) || ( ${_DEFAULT_WITH_FEATURES:M${f}} && !defined(_WITHOUT_${f:tu}) ) .include "${PORTSDIR}/Mk/Features/$f.mk" . endif . endfor # 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 CONFIGURE_SHELL?= ${SH} MAKE_SHELL?= ${SH} CONFIGURE_ENV+= SHELL=${CONFIGURE_SHELL} CONFIG_SHELL=${CONFIGURE_SHELL} MAKE_ENV+= SHELL=${MAKE_SHELL} NO_LINT=YES . if defined(PATCHFILES) && ${PATCHFILES:M*.zip} PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip . endif # Check the compatibility layer for amd64 . if ${ARCH} == "amd64" . if exists(/usr/lib32) HAVE_COMPAT_IA32_LIBS?= YES . 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) .undef HAVE_COMPAT_IA32_KERN . endif . endif . endif _EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN . if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" . if ${ARCH} == "amd64" . if !defined(HAVE_COMPAT_IA32_KERN) IGNORE= requires a kernel with compiled-in IA32 compatibility . elif !defined(HAVE_COMPAT_IA32_LIBS) IGNORE= requires 32-bit libraries installed under /usr/lib32 . endif _LDCONFIG_FLAGS=-32 LIB32DIR= lib32 . else IGNORE= requires i386 (or compatible) platform to run . endif . else LIB32DIR= lib . endif PLIST_SUB+= LIB32DIR=${LIB32DIR} . if ${WITH_PKG} == devel PKG_ORIGIN= ports-mgmt/pkg-devel . endif . if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} . endif . if defined(USE_GCC) .include "${PORTSDIR}/Mk/bsd.gcc.mk" . endif . if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld LDFLAGS+= -fuse-ld=bfd BINARY_ALIAS+= ld=${LD} . if !defined(USE_BINUTILS) . if exists(/usr/bin/ld.bfd) LD= /usr/bin/ld.bfd CONFIGURE_ENV+= LD=${LD} MAKE_ENV+= LD=${LD} . else USE_BINUTILS= yes . endif . endif . endif . 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} ${b}= ${LOCALBASE}/bin/${b:C/PP/++/:tl} . if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) CONFIGURE_ENV+= ${b}="${${b}}" . endif . if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" MAKE_ENV+= ${b}="${${b}}" . endif . endfor . endif . if defined(USE_RC_SUBR) SUB_FILES+= ${USE_RC_SUBR} . endif . if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" USE_LDCONFIG= ${PREFIX}/lib . endif . if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" IGNORE= has USE_LDCONFIG32 set to yes, which is not correct . endif . if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) . if defined(USE_LINUX_PREFIX) PLIST_FILES+= "@ldconfig-linux ${LINUXBASE}" . else PLIST_FILES+= "@ldconfig" . endif . endif PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' . if defined(_DESTDIR_VIA_ENV) MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} . else MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} . endif . if defined(NO_PREFIX_RMDIR) CO_ENV+= NO_PREFIX_RMDIR=1 . else CO_ENV+= NO_PREFIX_RMDIR=0 . endif METADIR= ${WRKDIR}/.metadir PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall . if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" . endif . for odir in ${OVERLAYS} .sinclude "${odir}/Mk/bsd.overlay.mk" . endfor . if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" . endif . if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" . endif . if defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" . endif . if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" . endif . if exists(${PORTSDIR}/Makefile.inc) .include "${PORTSDIR}/Makefile.inc" USE_SUBMAKE= yes . endif # Loading features . for f in ${_USES_POST} _f:= ${f:C/\:.*//} . if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} . endif . endfor . for f in ${_USES_POST} .undef _usefound . for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} _usefile= ${udir}/${f:C/\:.*//}.mk . if exists(${_usefile}) && !defined(_usefound) _usefound= .include "${_usefile}" . endif . endfor . if !defined(_usefound) ERROR+= "Unknown USES=${f:C/\:.*//}" . endif . endfor . if defined(PORTNAME) . if !defined(PACKAGE_BUILDING) || empty(.TARGETS) || make(all) || \ make(check-sanity) || make(show*-errors) || make(show*-warnings) .include "${PORTSDIR}/Mk/bsd.sanity.mk" . endif . endif . if defined(USE_LOCALE) CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} . endif # Macro for doing in-place file editing using regexps. REINPLACE_ARGS may only # be used to set or override the -i argument. Any other use is considered # invalid. REINPLACE_ARGS?= -i.bak . if defined(DEVELOPER) REINPLACE_CMD?= ${SETENV} WRKSRC=${WRKSRC} REWARNFILE=${REWARNFILE} ${SH} ${SCRIPTSDIR}/sed_checked.sh . else REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} . endif FRAMEWORK_REINPLACE_CMD?= ${SED} -i.bak # Names of cookies used to skip already completed stages EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} # How to do nothing. Override if you, for some strange reason, would rather # do something. # In general, however, DO_NADA is a relic of the past in the ports # infrastructure, and most of its usage has been removed. If you need to define # a target with DO_NADA, then there is a high chance that the ports # infrastructure should be fixed instead. DO_NADA?= ${TRUE} # Use this as the first operand to always build dependency. NONEXISTENT?= /nonexistent CHECKSUM_ALGORITHMS?= sha256 DISTINFO_FILE?= ${MASTERDIR}/distinfo MAKE_FLAGS?= -f MAKEFILE?= Makefile MAKE_CMD?= ${BSDMAKE} MAKE_ENV+= PREFIX=${PREFIX} \ LOCALBASE=${LOCALBASE} \ CC="${CC}" CFLAGS="${CFLAGS}" \ CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" # 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) CFLAGS+= -fno-strict-aliasing . endif . endif . endif . for lang in C CXX . if defined(USE_${lang}STD) ${lang}FLAGS:= ${${lang}FLAGS:N-std=*} -std=${USE_${lang}STD} . endif ${lang}FLAGS+= ${${lang}FLAGS_${ARCH}} . endfor LDFLAGS+= ${LDFLAGS_${ARCH}} # Multiple make jobs support . if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) _MAKE_JOBS?= # MAKE_JOBS_NUMBER= 1 . else . if defined(MAKE_JOBS_NUMBER) _MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER} . else . if !defined(_SMP_CPUS) _SMP_CPUS!= ${NPROC} 2>/dev/null || ${SYSCTL} -n kern.smp.cpus . endif _EXPORTED_VARS+= _SMP_CPUS _MAKE_JOBS_NUMBER= ${_SMP_CPUS} . endif . if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) MAKE_JOBS_NUMBER= ${MAKE_JOBS_NUMBER_LIMIT} . else MAKE_JOBS_NUMBER= ${_MAKE_JOBS_NUMBER} . 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 .include "${PORTSDIR}/Mk/bsd.ccache.mk" . if !make(makesum) FETCH_ENV?= SSL_NO_VERIFY_PEER=1 SSL_NO_VERIFY_HOSTNAME=1 . endif FETCH_BINARY?= /usr/bin/fetch FETCH_ARGS?= -Fpr FETCH_REGET?= 1 FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} . if defined(RANDOMIZE_MASTER_SITES) . if exists(/usr/games/random) RANDOM_CMD?= /usr/games/random . elif exists(/usr/bin/random) RANDOM_CMD?= /usr/bin/random . endif . if defined(RANDOM_CMD) && !empty(RANDOM_CMD) RANDOM_ARGS?= -w -f - _RANDOMIZE_SITES= ${RANDOM_CMD} ${RANDOM_ARGS} . endif . endif TOUCH?= /usr/bin/touch TOUCH_FLAGS?= -f DISTORIG?= .bak.orig PATCH?= /usr/bin/patch PATCH_STRIP?= -p0 PATCH_DIST_STRIP?= -p0 . if defined(PATCH_DEBUG) PATCH_DEBUG_TMP= yes PATCH_ARGS?= --forward -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward -E ${PATCH_DIST_STRIP} . else PATCH_ARGS?= --forward --quiet -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward --quiet -E ${PATCH_DIST_STRIP} . endif . if !defined(QUIET) PATCH_SILENT= PATCH_SILENT=yes . endif . if defined(BATCH) PATCH_ARGS+= --batch PATCH_DIST_ARGS+= --batch . endif # Prevent breakage with VERSION_CONTROL=numbered PATCH_ARGS+= -V simple PATCH_DIST_ARGS+= -V simple . if defined(PATCH_CHECK_ONLY) PATCH_ARGS+= -C PATCH_DIST_ARGS+= -C . endif . if ${PATCH} == "/usr/bin/patch" PATCH_ARGS+= --suffix .orig PATCH_DIST_ARGS+= --suffix .orig . endif TAR?= /usr/bin/tar # EXTRACT_SUFX is defined in .pre.mk section EXTRACT_CMD?= ${TAR} EXTRACT_BEFORE_ARGS?= -xf 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 MTREE_FILE= /etc/mtree/BSD.usr.dist . else MTREE_FILE= ${PORTSDIR}/Templates/BSD.local.dist . endif . endif MTREE_CMD?= /usr/sbin/mtree MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p _SHAREMODE?= 0644 # A few aliases for *-install targets INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE} INSTALL_KLD= ${INSTALL} ${COPY} -m ${BINMODE} INSTALL_LIB= ${INSTALL} ${COPY} ${STRIP} -m ${_SHAREMODE} INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE} INSTALL_DATA= ${INSTALL} ${COPY} -m ${_SHAREMODE} INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE} INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ BSD_INSTALL_LIB="${INSTALL_LIB}" \ BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ BSD_INSTALL_DATA="${INSTALL_DATA}" \ BSD_INSTALL_MAN="${INSTALL_MAN}" MAKE_ENV+= ${INSTALL_MACROS} SCRIPTS_ENV+= ${INSTALL_MACROS} # Macro for copying entire directory tree with correct permissions # In the -exec shell commands, we add add a . as the first argument, it would # end up being $0 aka the script name, which is not part of $@, so we force it # to be able to use $@ directly. COPYTREE_BIN= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ ${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${BINMODE} "$$@"'\'' . {} + \)' COPYTREE_BIN COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ ${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${_SHAREMODE} "$$@"'\'' . {} + \)' COPYTREE_SHARE # The user can override the NO_PACKAGE by specifying this from # the make command line . if defined(FORCE_PACKAGE) .undef NO_PACKAGE . endif DESCR?= ${PKGDIR}/pkg-descr PLIST?= ${PKGDIR}/pkg-plist PKGHELP?= ${PKGDIR}/pkg-help PKGINSTALL?= ${PKGDIR}/pkg-install PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall PKGMESSAGE?= ${PKGDIR}/pkg-message _PKGMESSAGES+= ${PKGMESSAGE} TMPPLIST?= ${WRKDIR}/.PLIST.mktmp _PLIST?= ${WRKDIR}/.PLIST # backward compatibility for users . if defined(_PKG_TRANSITIONING_TO_NEW_EXT) . if defined(PKG_NOCOMPRESS) PKG_SUFX?= .tar . else PKG_SUFX?= .txz . endif PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//} . else . if defined(PKG_SUFX) PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//} WARNING+= "PKG_SUFX is defined, it should be replaced with PKG_COMPRESSION_FORMAT" . endif PKG_SUFX= .pkg . endif . if defined(PKG_NOCOMPRESS) PKG_COMPRESSION_FORMAT?= tar . else . if ${OSVERSION} > 1400000 PKG_COMPRESSION_FORMAT?= tzst . else PKG_COMPRESSION_FORMAT?= txz . endif . endif # where pkg(8) stores its data PKG_DBDIR?= /var/db/pkg ALL_TARGET?= all INSTALL_TARGET?= install INSTALL_TARGET+= ${LATE_INSTALL_ARGS} # Popular master sites .include "${PORTSDIR}/Mk/bsd.sites.mk" # Empty declaration to avoid "variable MASTER_SITES recursive" error MASTER_SITES?= PATCH_SITES?= _MASTER_SITES_DEFAULT?= _PATCH_SITES_DEFAULT?= # Feed internal _{MASTER,PATCH}_SITES_n where n is a group designation # as per grouping rules (:something) # Organize _{MASTER,PATCH}_SITES_{DEFAULT,[^/:]+} according to grouping # rules (:something) . for _S in ${MASTER_SITES} _S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}//:S/^://} . if !empty(_S_TEMP) . for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} . 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 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 _MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} . endfor . else _MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} . 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} _G_TEMP= ${_group} . 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 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 _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} . endfor . else _PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} . 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} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} . if !empty(_S_TEMP) . for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} . 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}) _MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} . endif . endfor . else . if defined(_MASTER_SITES_DEFAULT) _MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} . 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} _G_TEMP= ${_group} . 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}) _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} . endif . endfor . else . if defined(_PATCH_SITES_DEFAULT) _PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} . endif . endif . endfor # Substitute subdirectory names # XXX simpler/faster solution but not the best space wise, suggestions please . 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}) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} . else _S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}} . else MASTER_SITES_TMP= . for site in ${_MASTER_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} . else . for dir in ${_MASTER_SITE_SUBDIR_${_group}} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} . endfor . endif . endfor . endif . endif _MASTER_SITES_${_group}:= ${MASTER_SITES_TMP} . endfor . endif . endfor . if defined(_MASTER_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_MASTER_SITES_DEFAULT:M*%SUBDIR%/*} . if empty(_S_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT} . else MASTER_SITES_TMP= . for site in ${_MASTER_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} . else . for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} . endfor . endif . endfor . endif . else MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} . endif _MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} MASTER_SITES_TMP= . 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}) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} . else _S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} . else PATCH_SITES_TMP= . for site in ${_PATCH_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} . else . for dir in ${_PATCH_SITE_SUBDIR_${_group}} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} . endfor . endif . endfor . endif . endif _PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} . endfor . endif . endfor . if defined(_PATCH_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} . if empty(_S_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} . else PATCH_SITES_TMP= . for site in ${_PATCH_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} . if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} . else . for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} . endfor . endif . endfor . endif . else PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} . endif _PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} PATCH_SITES_TMP= # The primary backup site. MASTER_SITE_BACKUP?= \ http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} # 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) _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP} _MASTER_SITE_BACKUP:= # empty . else _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE} _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP} . endif # Organize DISTFILES, PATCHFILES, _MASTER_SITES_ALL, _PATCH_SITES_ALL # according to grouping rules (:something) DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} _MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} _PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} _G_TEMP= DEFAULT . 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}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} . if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} . endif . endif . endfor _DISTFILES+= ${_D:C/:[^:]+$//} . else _DISTFILES+= ${_D} . endif . endfor _G_TEMP= DEFAULT . 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}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} . if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} . endif . endif . endfor . endif _PATCHFILES:= ${_PATCHFILES} ${_P_file} . if empty(_P_strip) _PATCHFILES2:= ${_PATCHFILES2} ${_P_file} . else _PATCHFILES2:= ${_PATCHFILES2} ${_P_file}:${_P_strip} . endif . endfor _P_groups= _P_file= _P_strip= _G_TEMP= _G_TEMP_TEMP= ALLFILES?= ${_DISTFILES} ${_PATCHFILES} # # Sort the master site list according to the patterns in MASTER_SORT # MASTER_SORT?= MASTER_SORT_REGEX?= 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} MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } . 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} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} . 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 _PATCH_SITES_ENV= _PATCH_SITES_DEFAULT=${_PATCH_SITES_DEFAULT:Q} . 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}) _PATCH_SITES_ENV+= _PATCH_SITES_${_group}=${_PATCH_SITES_${_group}:Q} . 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}!="" _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} . endif . else _CKSUMFILES?= ${CKSUMFILES} . endif # This is what is actually going to be extracted, and is overridable # by user. EXTRACT_ONLY?= ${_DISTFILES} . if !target(maintainer) maintainer: @${ECHO_CMD} "${MAINTAINER}" . endif . if !defined(CATEGORIES) check-categories: @${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." @${FALSE} . else VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ benchmarks biology budgie cad chinese comms converters \ databases deskutils devel dns docs \ editors education elisp emulators enlightenment finance french ftp \ games geography german gnome gnustep graphics \ hamradio haskell hebrew hungarian irc japanese java \ kde ${_KDE_CATEGORIES_SUPPORTED} kld korean \ lang linux lisp \ mail mate math mbone misc multimedia \ net net-im net-mgmt net-p2p net-vpn news \ parallel pear perl5 plan9 polish ports-mgmt portuguese \ print python ruby rubygems russian \ scheme science security shells spanish sysutils \ tcl textproc tk \ ukrainian vietnamese wayland windowmaker www \ x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes \ x11-toolkits x11-wm xfce zope base check-categories: . 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 PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' PKGLATESTREPOSITORY?= ${PACKAGES}/Latest PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} . if ${PKG_COMPRESSION_FORMAT} == txz PKGOLDLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT} # Temporary workaround to be deleted once every supported version of FreeBSD # have a bootstrap which handles the pkg extension. PKGOLDSIGFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT}.sig . endif _PKGS= ${PKGBASE} PORTS_FEATURES+= SUBPACKAGES . if defined(SUBPACKAGES) . if ${SUBPACKAGES:Mmain} DEV_ERROR+= "SUBPACKAGES cannot contain 'main', it is a reserved value" . endif . for sp in ${SUBPACKAGES} . if ${sp:C/[[:lower:][:digit:]_]//g} _BAD_SUBPACKAGES_NAMES+= ${sp} . endif . endfor . if !empty(_BAD_SUBPACKAGES_NAMES) DEV_ERROR+= "SUBPACKAGES cannot subpackages that are not all [a-z0-9_]: ${_BAD_SUBPACKAGES_NAMES}" . endif . endif . for sp in ${SUBPACKAGES} # If a FRAMEWORK generated package needs to override its subpackage package name # it can do it with this mechanism . if !defined(_PKGS.${sp}) _PKGS.${sp}= ${PKGBASE}-${sp} . endif _PKGS+= ${_PKGS.${sp}} PKGBASE.${sp}= ${_PKGS.${sp}} _SP.${_PKGS.${sp}}=.${sp} . endfor . if !defined(_DID_SUBPACKAGES_HELPERS) _DID_SUBPACKAGES_HELPERS= yes _SUBPACKAGE_HELPERS_FILE= DESCR PKGINSTALL PKGDEINSTALL PKGMESSAGE \ PKGPREINSTALL PKGPOSTINSTALL PKGPREDEINSTALL PKGPOSTDEINSTALL \ PKGPREUPGRADE PKGPOSTUPGRADE PKGUPGRADE . for sp in ${SUBPACKAGES} # These overwrite the current value . for v in ${_SUBPACKAGE_HELPERS_FILE} ${v}.${sp}?= ${$v}.${sp} . endfor _PKGMESSAGES.${sp}= ${PKGMESSAGE}.${sp} . if !exists(${DESCR.${sp}}) && ${sp} != debuginfo DESCR.${sp}= ${DESCR} DEV_WARNING+= "DESCR.${sp} needs to point to an existing file." . endif COMMENT.${sp}?= ${COMMENT} (subpkg: ${sp}) . endfor . endif . if exists(${PACKAGES}) PACKAGES:= ${PACKAGES:S/:/\:/g} _HAVE_PACKAGES= yes _PKGDIR= ${PKGREPOSITORY} . else _PKGDIR= ${.CURDIR} . endif . for sp in ${_PKGS} PKGNAME${_SP.${sp}}= ${sp}-${PKGVERSION} PKGNAMES+= ${PKGNAME${_SP.${sp}}} PKGFILE${_SP.${sp}}= ${_PKGDIR}/${PKGNAME${_SP.${sp}}}${PKG_SUFX} . endfor _EXTRA_PACKAGE_TARGET_DEP+= ${_PKGDIR} . for sp in ${_PKGS} WRKDIR_PKGFILE${_SP.${sp}}= ${WRKDIR}/pkg/${PKGNAME${_SP.${sp}}}${PKG_SUFX} . endfor # Integrate with the license auditing framework . if !defined (DISABLE_LICENSES) .include "${PORTSDIR}/Mk/bsd.licenses.mk" . endif CONFIGURE_SCRIPT?= configure CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} CONFIGURE_LOG?= config.log # 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)." CONFIG_SITE?= ${PORTSDIR}/Templates/config.site . if defined(GNU_CONFIGURE) # Maximum command line length . if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax . endif _EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN GNU_CONFIGURE_PREFIX?= ${PREFIX} GNU_CONFIGURE_MANPREFIX?= ${PREFIX} CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} . if defined(CROSS_TOOLCHAIN) CROSS_HOST= ${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL} CONFIGURE_ARGS+= --host=${CROSS_HOST} . endif CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} HAS_CONFIGURE= yes SET_LATE_CONFIGURE_ARGS= \ _LATE_CONFIGURE_ARGS="" ; \ if [ -z "${CONFIGURE_ARGS:M--localstatedir=*:Q}" ] && \ ${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- --localstatedir > /dev/null; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --localstatedir=/var" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--mandir'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${GNU_CONFIGURE_MANPREFIX}/man" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--disable-silent-rules'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --disable-silent-rules" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--enable-jobserver\[.*\#\]'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --enable-jobserver=${MAKE_JOBS_NUMBER}" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--infodir'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${GNU_CONFIGURE_PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ fi ; \ if [ -z "`${CONFIGURE_CMD} --version 2>&1 | ${EGREP} -i '(autoconf.*2\.13|Unrecognized option)'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_TARGET}" ; \ else \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ fi ; . endif # Passed to most of script invocations SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} . if defined(BATCH) SCRIPTS_ENV+= BATCH=yes . endif MANDIRS+= ${PREFIX}/share/man MANDIRS+= ${PREFIX}/man INFO_PATH?= share/info . if defined(INFO) RUN_DEPENDS+= indexinfo:print/indexinfo . for D in ${INFO:H} RD:= ${D} . if ${RD} != "." . if !defined(INFO_SUBDIR) INFO_SUBDIR:= ${RD} . elif ${INFO_SUBDIR} != ${RD} BROKEN= only one subdirectory in INFO is allowed . endif . endif .undef RD . endfor . endif DOCSDIR_REL?= ${DOCSDIR:S,^${PREFIX}/,,} EXAMPLESDIR_REL?= ${EXAMPLESDIR:S,^${PREFIX}/,,} DATADIR_REL?= ${DATADIR:S,^${PREFIX}/,,} WWWDIR_REL?= ${WWWDIR:S,^${PREFIX}/,,} ETCDIR_REL?= ${ETCDIR:S,^${PREFIX}/,,} PLIST_SUB+= DOCSDIR="${DOCSDIR_REL}" \ EXAMPLESDIR="${EXAMPLESDIR_REL}" \ DATADIR="${DATADIR_REL}" \ WWWDIR="${WWWDIR_REL}" \ ETCDIR="${ETCDIR_REL}" DESKTOPDIR?= ${PREFIX}/share/applications .MAIN: all ################################################################ # Many ways to disable a port. # # If we're in BATCH mode and the port is interactive, or we're # in interactive mode and the port is non-interactive, skip all # the important targets. The reason we have two modes is that # one might want to leave a build in BATCH mode running # overnight, then come back in the morning and do _only_ the # interactive ones that required your intervention. # # Ignore ports that can't be resold if building for a CDROM. # # Don't build a port if it's restricted and we don't want to get # into that. # # Don't build a port if it's broken, unless we're running a parallel # build (in case it's fixed). # # Don't build a port if it's forbidden for whatever reason. # # Don't build a port if the system is too old. ################################################################ # Check the machine architectures . if defined(ONLY_FOR_ARCHS) . for __ARCH in ${ONLY_FOR_ARCHS} . if ${ARCH:M${__ARCH}} != "" __ARCH_OK?= 1 . endif . endfor . else __ARCH_OK?= 1 . endif . if defined(NOT_FOR_ARCHS) . for __NARCH in ${NOT_FOR_ARCHS} . if ${ARCH:M${__NARCH}} != "" .undef __ARCH_OK . endif . endfor . endif . if !defined(__ARCH_OK) . if defined(ONLY_FOR_ARCHS) IGNORE= is only for ${ONLY_FOR_ARCHS:O}, . else # defined(NOT_FOR_ARCHS) IGNORE= does not run on ${NOT_FOR_ARCHS:O}, . endif IGNORE+= while you are running ${ARCH} . if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) . elif defined(ONLY_FOR_ARCHS_REASON) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) . endif . if defined(NOT_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) . elif defined(NOT_FOR_ARCHS_REASON) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) . endif . endif # Check the user interaction and legal issues . if !defined(NO_IGNORE) . for v in ${OSREL} ${OSREL:R} . for f in ${FLAVOR} . if defined($f_IGNORE_${OPSYS}_${v}) IGNORE+= "${${f}_IGNORE_${OPSYS}_${v}}" . endif . endfor . endfor . if (defined(IS_INTERACTIVE) && defined(BATCH)) IGNORE= is an interactive port . elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) IGNORE= is not an interactive port . elif (defined(NO_CDROM) && defined(FOR_CDROM)) IGNORE= may not be placed on a CDROM: ${NO_CDROM} . elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) IGNORE= is restricted: ${RESTRICTED} . elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) IGNORE= may not be packaged: ${NO_PACKAGE} . elif defined(IGNORE_${ARCH}) IGNORE= ${IGNORE_${ARCH}} . elif defined(IGNORE_${OPSYS}_${OSREL:R}_${ARCH}) IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}_${ARCH}} . elif defined(IGNORE_${OPSYS}_${OSREL:R}) IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}} . elif defined(IGNORE_${OPSYS}) IGNORE= ${IGNORE_${OPSYS}} . elif defined(BROKEN) . if !defined(TRYBROKEN) IGNORE= is marked as broken: ${BROKEN} . endif . elif defined(BROKEN_${ARCH}) . if !defined(TRYBROKEN) IGNORE= is marked as broken on ${ARCH}: ${BROKEN_${ARCH}} . 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}_${OSREL:R}) . if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS} ${OSREL}: ${BROKEN_${OPSYS}_${OSREL:R}} . endif . elif defined(BROKEN_${OPSYS}) . if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS}: ${BROKEN_${OPSYS}} . endif . elif defined(FORBIDDEN) IGNORE= is forbidden: ${FORBIDDEN} . endif # Define the text to be output to LEGAL . if defined(LEGAL_TEXT) LEGAL= ${LEGAL_TEXT} . elif defined(RESTRICTED) LEGAL= ${RESTRICTED} . elif defined(NO_CDROM) LEGAL= ${NO_CDROM} . elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) LEGAL= ${NO_PACKAGE} . endif . if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} clean: @${IGNORECMD} . endif . if defined(IGNORE) . if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} . else IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}. | ${FMT_80} ; exit 1 . endif _TARGETS= check-sanity fetch checksum extract patch configure all build \ install reinstall test package stage restage . for target in ${_TARGETS} . if !target(${target}) ${target}: @${IGNORECMD} . if defined(INSTALLS_DEPENDS) @${FALSE} . endif . endif . endfor . endif . endif # !defined(NO_IGNORE) ignorelist: . if defined(IGNORE) || defined(NO_PACKAGE) ignorelist: package-name . endif ignorelist-verbose: . if defined(IGNORE) @${ECHO_CMD} "${PKGNAME}|IGNORE: "${IGNORE:Q} . elif defined(NO_PACKAGE) @${ECHO_CMD} "${PKGNAME}|NO_PACKAGE: "${NO_PACKAGE:Q} . endif ################################################################ # Clean directories for ftp or CDROM. ################################################################ . if !defined(LICENSE) . if defined(RESTRICTED) clean-restricted: delete-distfiles delete-package clean-restricted-list: delete-distfiles-list delete-package-list RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} . else clean-restricted: clean-restricted-list: . endif . 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 clean-for-cdrom: clean-for-cdrom-list: . endif . endif # !defined(LICENSE) . if defined(ALL_HOOK) all: @cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" \ CONFLICTS="${CONFLICTS}" \ ${ALL_HOOK} . endif . if !target(all) all: stage . endif . if !defined(DEPENDS_TARGET) . if defined(DEPENDS_PRECLEAN) DEPENDS_TARGET= clean DEPENDS_ARGS= NOCLEANDEPENDS=yes . endif . if make(reinstall) DEPENDS_TARGET+= reinstall . else DEPENDS_TARGET+= install . endif . if defined(DEPENDS_CLEAN) DEPENDS_TARGET+= clean DEPENDS_ARGS+= NOCLEANDEPENDS=yes . endif . endif ################################################################ # # Do preliminary work to detect if we need to run the config # target or not. # ################################################################ . 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 ################################################################ # The following are used to create easy dummy targets for # disabling some bit of default target behavior you don't want. # They still check to see if the target exists, and if so don't # do anything, since you might want to set this globally for a # group of ports in a Makefile.inc, but still be able to # override from an individual Makefile. ################################################################ # Disable build . if defined(NO_BUILD) && !target(build) build: configure @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} . endif # Disable package . if defined(NO_PACKAGE) && !target(package) package: . if !defined(IGNORE_SILENT) @${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. . endif . endif ################################################################ # More standard targets start here. # # These are the body of the build/install framework. If you are # not happy with the default actions, and you can't solve it by # adding pre-* or post-* targets/scripts, override these. ################################################################ . if defined(TRYBROKEN) && defined(BROKEN) buildanyway-message: @${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." . endif # Warn user about deprecated packages. Advisory only. . 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" @${ECHO_MSG} "===> NOTICE:" @${ECHO_MSG} @${ECHO_MSG} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is" @${ECHO_MSG} "more likely to have unresolved issues, not be up-to-date, or even be removed in" @${ECHO_MSG} "the future. To volunteer to maintain this port, please create an issue at:" @${ECHO_MSG} @${ECHO_MSG} "https://bugs.freebsd.org/bugzilla" @${ECHO_MSG} @${ECHO_MSG} "More information about port maintainership is available at:" @${ECHO_MSG} @${ECHO_MSG} "https://docs.freebsd.org/en/articles/contributing/#ports-contributing" @${ECHO_MSG} . 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) @${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}." @${ECHO_MSG} . 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) \ && exists(${AUDITFILE}) @${SETENV} \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_PKG_BIN="${PKG_BIN}" \ dp_PORTNAME="${PORTNAME}" \ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ ${SH} ${SCRIPTSDIR}/check-vulnerable.sh . 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 # do-fetch. _DO_FETCH_ENV= \ dp_DISABLE_SIZE='${DISABLE_SIZE}' \ dp_DISTDIR='${_DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_DIST_SUBDIR='${DIST_SUBDIR}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_FETCH_AFTER_ARGS='${FETCH_AFTER_ARGS}' \ dp_FETCH_BEFORE_ARGS='${FETCH_BEFORE_ARGS}' \ dp_FETCH_CMD='${FETCH_CMD}' \ dp_FETCH_ENV=${FETCH_ENV:Q} \ dp_FORCE_FETCH_ALL='${FORCE_FETCH_ALL}' \ dp_FORCE_FETCH_LIST='${FORCE_FETCH_LIST}' \ dp_MASTER_SITE_BACKUP='${_MASTER_SITE_BACKUP}' \ dp_MASTER_SITE_OVERRIDE='${_MASTER_SITE_OVERRIDE}' \ dp_MASTER_SORT_AWK='${MASTER_SORT_AWK}' \ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_TARGET='${.TARGET}' . if defined(DEVELOPER) _DO_FETCH_ENV+= dp_DEVELOPER=yes . else _DO_FETCH_ENV+= dp_DEVELOPER= . endif # Fetch . if !target(do-fetch) do-fetch: . 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) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} . endif . endif # # Prints out a list of files to fetch (useful to do a batch fetch) . if !target(fetch-list) fetch-list: . 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) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} . endif . endif # Used by fetch-urlall-list and fetch-url-list . if !target(fetch-url-list-int) fetch-url-list-int: . 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) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} . endif . endif . if !target(fetch-url-recursive-list-int) fetch-url-recursive-list-int: fetch-url-list-int @recursive_cmd="fetch-url-list-int"; \ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # Prints out all the URL for all the DISTFILES and PATCHFILES. . if !target(fetch-urlall-list) fetch-urlall-list: @cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int . endif . if !target(fetch-urlall-recursive-list) fetch-urlall-recursive-list: fetch-urlall-list @recursive_cmd="fetch-urlall-list"; \ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # Prints the URL for all the DISTFILES and PATCHFILES that are not here . if !target(fetch-url-list) fetch-url-list: fetch-url-list-int . endif . if !target(fetch-url-recursive-list) fetch-url-recursive-list: fetch-url-list @recursive_cmd="fetch-url-list"; \ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # Extract clean-wrkdir: @${RM} -r ${WRKDIR} . if !target(do-extract) do-extract: ${EXTRACT_WRKDIR} @for file in ${EXTRACT_ONLY}; do \ if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ then \ ${ECHO_MSG} "===> Failed to extract \"${_DISTDIR}/$$file\"."; \ exit 1; \ fi; \ done @if [ ${UID} = 0 ]; then \ ${CHMOD} -R ug-s ${WRKDIR}; \ ${CHOWN} -R 0:0 ${WRKDIR}; \ fi . endif # Patch . if !target(do-patch) do-patch: @${SETENV} \ dp_BZCAT="${BZCAT}" \ dp_CAT="${CAT}" \ dp_DISTDIR="${_DISTDIR}" \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_EXTRA_PATCHES="${EXTRA_PATCHES}" \ dp_EXTRA_PATCH_TREE="${EXTRA_PATCH_TREE}" \ dp_GZCAT="${GZCAT}" \ dp_OPSYS="${OPSYS}" \ dp_PATCH="${PATCH}" \ dp_PATCHDIR="${PATCHDIR}" \ dp_PATCHFILES="${_PATCHFILES2}" \ dp_PATCH_ARGS=${PATCH_ARGS:Q} \ dp_PATCH_DEBUG_TMP="${PATCH_DEBUG_TMP}" \ dp_PATCH_DIST_ARGS="${PATCH_DIST_ARGS}" \ dp_PATCH_CONTINUE_ON_FAIL=${PATCH_CONTINUE_ON_FAIL:Dyes} \ dp_PATCH_SILENT="${PATCH_SILENT}" \ dp_PATCH_WRKSRC=${PATCH_WRKSRC} \ dp_PKGNAME="${PKGNAME}" \ dp_PKGORIGIN="${PKGORIGIN}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_UNZIP_NATIVE_CMD="${UNZIP_NATIVE_CMD}" \ dp_XZCAT="${XZCAT}" \ ${SH} ${SCRIPTSDIR}/do-patch.sh . endif . if !target(run-autotools-fixup) run-autotools-fixup: # Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. . if !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 \ -name acinclude.m4 \)` ; do \ ${SED} -i.fbsd10bak \ -e 's|freebsd1\*)|freebsd1.\*)|g' \ -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ $${f} ; \ cmp -s $${f}.fbsd10bak $${f} || \ ${ECHO_MSG} "===> FreeBSD 10 autotools fix applied to $${f}"; \ ${TOUCH} ${TOUCH_FLAGS} -mr $${f}.fbsd10bak $${f} ; \ ${RM} $${f}.fbsd10bak ; \ done . endif . endif # 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) @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ | ${XARGS} -n 1 ${DIRNAME}); \ for _D in $${CONFIG_GUESS_DIRS}; do \ ${RM} $${_D}/config.guess; \ ${CP} ${TEMPLATES}/config.guess $${_D}/config.guess; \ ${CHMOD} a+rx $${_D}/config.guess; \ ${RM} $${_D}/config.sub; \ ${CP} ${TEMPLATES}/config.sub $${_D}/config.sub; \ ${CHMOD} a+rx $${_D}/config.sub; \ done . endif . if defined(HAS_CONFIGURE) @${MKDIR} ${CONFIGURE_WRKSRC} @(cd ${CONFIGURE_WRKSRC} && \ ${SET_LATE_CONFIGURE_ARGS} \ - if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ + if ! ${SETENVI} ${WRK_ENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ INSTALL="/usr/bin/install -c" \ INSTALL_DATA="${INSTALL_DATA}" \ INSTALL_LIB="${INSTALL_LIB}" \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \ ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT_80} ; \ ${FALSE}; \ fi) . endif . endif # Build -DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} +DO_MAKE_BUILD?= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ + ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} . if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) . endif # Check conflicts . if !target(check-conflicts) check-conflicts: check-build-conflicts check-install-conflicts . endif . if !target(check-build-conflicts) check-build-conflicts: . if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They will not build together."; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1;\ fi . endif . endif . if !target(identify-install-conflicts) CONFLICT_WARNING_WAIT?= 10 identify-install-conflicts: . if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ sleep ${CONFLICT_WARNING_WAIT}; \ fi . endif . endif . 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) @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi . else @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi . endif # defined(DEFER_CONFLICTS_CHECK) . endif . endif # 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}) + @(cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} \ + ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) . endif # Test . if !target(do-test) && defined(TEST_TARGET) -DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} +DO_MAKE_TEST?= ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ + ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} do-test: @(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Tests failed unexpectedly."; \ (${ECHO_CMD} "${TEST_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) . endif # Package . if defined(_HAVE_PACKAGES) _EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} _PORTS_DIRECTORIES+= ${PKGREPOSITORY} . if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} _PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} ${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} ${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} . if !defined(_PKG_TRANSITIONING_TO_NEW_EXT) && ${PKG_COMPRESSION_FORMAT} == txz _EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDLATESTFILE} ${PKGOLDSIGFILE} ${PKGOLDLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} ${INSTALL} -l rs ${PKGFILE} ${PKGOLDLATESTFILE} # Temporary workaround to be deleted once every supported version of FreeBSD # have a bootstrap which handles the pkg extension. ${PKGOLDSIGFILE}: ${PKGLATESTREPOSITORY} ${INSTALL} -l rs pkg.pkg.sig ${PKGOLDSIGFILE} . endif . endif . endif # from here this will become a loop for subpackages . for sp in ${_PKGS} ${_PLIST}.${sp}: ${TMPPLIST} @if [ "${PKGBASE}" = "${sp}" ]; then \ ${SED} "/^@comment /d; /@@/d" ${TMPPLIST} > ${.TARGET} ; \ else \ ${SED} -n "s/@@${sp:S/${PKGBASE}-//}@@//p" ${TMPPLIST} > ${.TARGET} ; \ fi ${WRKDIR_PKGFILE${_SP.${sp}}}: ${_PLIST}.${sp} create-manifest ${WRKDIR}/pkg @echo "===> Building ${PKGNAME${_SP.${sp}}}" @if ! ${SETENV} ${PKG_ENV} ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR}.${sp} -p ${_PLIST}.${sp} -o ${WRKDIR}/pkg ${PKGNAME}; then \ cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ exit 1; \ fi _EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE${_SP.${sp}}} . if defined(_HAVE_PACKAGES) ${PKGFILE${_SP.${sp}}}: ${WRKDIR_PKGFILE${_SP.${sp}}} @${LN} -f ${WRKDIR_PKGFILE${_SP.${sp}}} ${PKGFILE${_SP.${sp}}} 2>/dev/null \ || ${CP} -f ${WRKDIR_PKGFILE${_SP.${sp}}} ${PKGFILE${_SP.${sp}}} _EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE${_SP.${sp}}} . endif . endfor # This will be the end of the loop . if !target(do-package) PKG_CREATE_ARGS+= -f ${PKG_COMPRESSION_FORMAT} . if defined(PKG_COMPRESSION_LEVEL) PKG_CREATE_ARGS+= -l ${PKG_COMPRESSION_LEVEL} . endif PKG_CREATE_ARGS+= -r ${STAGEDIR} . if defined(PKG_CREATE_VERBOSE) PKG_CREATE_ARGS+= -v . endif do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg . endif . if !target(delete-package) delete-package: . for sp in ${_PKGS} @${ECHO_MSG} "===> Deleting package for ${sp}" # When staging, the package may only be in the workdir if not root @${RM} ${PKGFILE${_SP.${sp}}} ${WRKDIR_PKGFILE${_SP.${sp}}} 2>/dev/null || : . endfor . endif . if !target(delete-package-list) delete-package-list: . for sp in ${_PKGS} @${ECHO_CMD} "[ -f ${PKGFILE${_SP.${sp}}} ] && (${ECHO_CMD} deleting ${PKGFILE${_SP.${sp}}}; ${RM} ${PKGFILE${_SP.${sp}}})" . endfor . 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) _INSTALL_PKG_ARGS= -f . endif . if defined(INSTALLS_DEPENDS) _INSTALL_PKG_ARGS+= -A . endif . for sp in ${_PKGS} install-package: install-package.${sp} install-package.${sp}: @if [ -f "${WRKDIR_PKGFILE${_SP.${sp}}}" ]; then \ _pkgfile="${WRKDIR_PKGFILE${_SP.${sp}}}"; \ else \ _pkgfile="${PKGFILE${_SP.${sp}}}"; \ fi; \ ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} . endfor . endif # Utility targets follow . if !target(check-already-installed) . if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) check-already-installed: @${ECHO_MSG} "===> Checking if ${PKGBASE} is already installed"; \ pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \ if [ -n "$${pkgname}" ]; then \ v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \ if [ "$${v}" = "<" ]; then \ ${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \ else \ ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ fi; \ ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \ ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \ ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \ ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ ${ECHO_MSG} " in your environment or the \"make install\" command line."; \ exit 1; \ fi . endif . endif . 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 # Needed for poudriere wait for at least a year before removing # XXX 2017-04-09 . if !target(install-mtree) install-mtree: . endif . 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) @${ECHO_MSG} "===> Installing ldconfig configuration file" . if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} . endif @${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} . if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG_DIR}" >> ${TMPPLIST} . endif . endif . endif . endif . if defined(USE_LDCONFIG32) . if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" . if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} . endif @${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} . if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG32_DIR}" >> ${TMPPLIST} . endif . endif . endif . endif . endif . if !defined(USE_LINUX_PREFIX) . if !target(fixup-lib-pkgconfig) fixup-lib-pkgconfig: @if [ -d ${STAGEDIR}${PREFIX}/lib/pkgconfig ]; then \ if [ -z "$$(${FIND} ${STAGEDIR}${PREFIX}/lib/pkgconfig -maxdepth 0 -empty)" ]; then \ if [ -n "${DEVELOPER:Dyes}" ]; then \ ${ECHO_MSG} "===> File(s) found in lib/pkgconfig while correct path is libdata/pkgconfig"; \ ${ECHO_MSG} " Applying fix but consider using USES= pathfix or adjust install path"; \ fi; \ ${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ ${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/* ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ fi; \ ${RMDIR} ${STAGEDIR}${PREFIX}/lib/pkgconfig; \ fi . endif . endif . 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} PKGPOSTDEINSTALL+= ${_UG_DEINSTALL} create-users-groups: @${SETENV} \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_GID_FILES="${GID_FILES}" \ dp_GID_OFFSET="${GID_OFFSET}" \ dp_GROUPS_BLACKLIST="${GROUPS_BLACKLIST}" \ dp_INSTALL="${INSTALL}" \ dp_OPSYS="${OPSYS}" \ dp_OSVERSION="${OSVERSION}" \ dp_PREFIX="${PREFIX}" \ dp_PW="${PW}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_UG_DEINSTALL="${_UG_DEINSTALL}" \ dp_UG_INSTALL="${_UG_INSTALL}" \ dp_UID_FILES="${UID_FILES}" \ dp_UID_OFFSET="${UID_OFFSET}" \ dp_USERS_BLACKLIST="${USERS_BLACKLIST}" \ ${SH} ${SCRIPTSDIR}/do-users-groups.sh "${USERS}" "${GROUPS}" . endif . endif _WWW= ${WWW:[1]} . if !defined(DISABLE_SECURITY_CHECK) . if !target(security-check) security-check: ${TMPPLIST} # Scan PLIST for: # 1. setugid files # 2. accept()/recvfrom() which indicates network listening capability # 3. insecure functions (gets/mktemp/tempnam/[XXX]) # 4. startup scripts, in conjunction with 2. # 5. world-writable files/dirs # # The ${NONEXISTENT} argument of ${READELF} is there so that there are always # at least two file arguments, and forces it to always output the "File: foo" # header lines. # -@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.readelf; \ ${AWK} -v prefix='${PREFIX}' ' \ match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); if (prefix == "/") prefix=""; next; } \ /^@/ { next; } \ /^\// { print; next; } \ { print prefix "/" $$0; } \ ' ${TMPPLIST} > ${WRKDIR}/.PLIST.flattened; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) 2> /dev/null > ${WRKDIR}/.PLIST.setuid; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \ | ${XARGS} -0 ${READELF} -r ${NONEXISTENT} 2> /dev/null > ${WRKDIR}/.PLIST.readelf; \ if \ ! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${SCRIPTSDIR}/security-check.awk \ ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.readelf ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \ then \ if [ ! -z "${_WWW}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} " For more information, and contact details about the security"; \ ${ECHO_MSG} " status of this software, see the following webpage: "; \ ${ECHO_MSG} "${_WWW}"; \ fi; \ fi . endif . else # i.e. defined(DISABLE_SECURITY_CHECK) security-check: @${ECHO_MSG} " WARNING: Security check has been disabled." . endif # !defined(DISABLE_SECURITY_CHECK) ################################################################ # Skeleton targets start here # # You shouldn't have to change these. Either add the pre-* or # post-* targets/scripts or redefine the do-* targets. These # targets don't do anything other than checking for cookies and # call the necessary targets/scripts. ################################################################ extract-message: @${ECHO_MSG} "===> Extracting for ${PKGNAME}" patch-message: @${ECHO_MSG} "===> Patching for ${PKGNAME}" configure-message: @${ECHO_MSG} "===> Configuring for ${PKGNAME}" build-message: @${ECHO_MSG} "===> Building for ${PKGNAME}" stage-message: @${ECHO_MSG} "===> Staging for ${PKGNAME}" install-message: @${ECHO_MSG} "===> Installing for ${PKGNAME}" test-message: @${ECHO_MSG} "===> Testing for ${PKGNAME}" package-message: @${ECHO_MSG} "===> Building packages for ${PKGNAME}" # Empty pre-* and post-* targets . if exists(${SCRIPTDIR}) . for stage in pre post . for name in pkg check-sanity fetch extract patch configure build stage install package . if !target(${stage}-${name}-script) . if exists(${SCRIPTDIR}/${stage}-${name}) ${stage}-${name}-script: @ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/${.TARGET:S/-script$//} . endif . endif . endfor . endfor . endif . if !target(pretty-print-www-site) pretty-print-www-site: @if [ -n "${_WWW}" ]; then \ ${ECHO_MSG} -n " and/or visit the "; \ ${ECHO_MSG} -n "web site"; \ ${ECHO_MSG} " for further information"; \ fi . endif ################################################################ # Some more targets supplied for users' convenience ################################################################ # Checkpatch # # Special target to verify patches . if !target(checkpatch) checkpatch: @cd ${.CURDIR} && ${MAKE} ${PATCH_SILENT} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_REAL_SEQ} . endif # Reinstall # # Special target to re-run install . if !target(reinstall) reinstall: @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} deinstall install . endif . if !target(restage) restage: @${RM} -r ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && ${MAKE} stage . endif # Deinstall # # Special target to remove installation . if !target(deinstall) deinstall: . 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 . for _sp in ${_PKGS} @${ECHO_MSG} "===> Deinstalling for ${_sp}" @if ${PKG_INFO} -e ${_sp}; then \ p=`${PKG_INFO} -q -O ${_sp}`; \ ${ECHO_MSG} "===> Deinstalling $${p}"; \ ${PKG_DELETE} -f ${_sp} ; \ else \ ${ECHO_MSG} "===> ${_sp} not installed, skipping"; \ fi . endfor @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} . endif . endif # Deinstall-all # # Special target to remove installation of all ports of the same origin . if !target(deinstall-all) deinstall-all: . 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 @${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 \ deinstall_names="$${deinstall_names} $$(${PKG_INFO} -q -O $${oldpkgorigin})"; \ done; \ if [ -n "$${deinstall_names}" ]; then \ for d in $${deinstall_names}; do \ ${ECHO_MSG} "===> Deinstalling $${d}"; \ ${PKG_DELETE} -f $${d}; \ done; \ else \ ${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \ fi; \ ${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} . endif . endif # Cleaning up . if !target(do-clean) do-clean: @if [ -d ${WRKDIR} ]; then \ if [ -w ${WRKDIR} ]; then \ ${RM} -r ${WRKDIR}; \ else \ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ fi; \ fi . endif . if !target(clean) pre-clean: clean-msg clean-msg: @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" . if empty(FLAVORS) CLEAN_DEPENDENCIES= . if !defined(NOCLEANDEPENDS) CLEAN_DEPENDENCIES+= limited-clean-depends-noflavor limited-clean-depends-noflavor: @cd ${.CURDIR} && ${MAKE} limited-clean-depends . endif . if target(pre-clean) CLEAN_DEPENDENCIES+= pre-clean-noflavor pre-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} pre-clean . endif CLEAN_DEPENDENCIES+= do-clean-noflavor do-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} do-clean . if target(post-clean) CLEAN_DEPENDENCIES+= post-clean-noflavor post-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} post-clean . endif .ORDER: ${CLEAN_DEPENDENCIES} clean: ${CLEAN_DEPENDENCIES} . endif . if !empty(_FLAVOR) _CLEANFLAVORS= ${_FLAVOR} . else _CLEANFLAVORS= ${FLAVORS} . endif . for _f in ${_CLEANFLAVORS} CLEAN_DEPENDENCIES= . if !defined(NOCLEANDEPENDS) CLEAN_DEPENDENCIES+= limited-clean-depends-${_f} limited-clean-depends-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} limited-clean-depends . endif . if target(pre-clean) CLEAN_DEPENDENCIES+= pre-clean-${_f} pre-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} pre-clean . endif CLEAN_DEPENDENCIES+= do-clean-${_f} do-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} do-clean . if target(post-clean) CLEAN_DEPENDENCIES+= post-clean-${_f} post-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} post-clean . endif .ORDER: ${CLEAN_DEPENDENCIES} clean: ${CLEAN_DEPENDENCIES} . endfor . endif . if !target(distclean) distclean: clean @cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" . endif . if !target(delete-distfiles) delete-distfiles: @${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}" @(if [ "X${RESTRICTED_FILES}" != "X" -a -d ${_DISTDIR} ]; then \ cd ${_DISTDIR}; \ for file in ${RESTRICTED_FILES}; do \ ${RM} $${file}; \ dir=$${file%/*}; \ if [ "$${dir}" != "$${file}" ]; then \ ${RMDIR} -p $${dir} >/dev/null 2>&1 || :; \ fi; \ done; \ fi) . if defined(DIST_SUBDIR) -@${RMDIR} ${_DISTDIR} >/dev/null 2>&1 || ${TRUE} . endif . endif . if !target(delete-distfiles-list) delete-distfiles-list: @${ECHO_CMD} "# ${PKGNAME}" @if [ "X${RESTRICTED_FILES}" != "X" ]; then \ for file in ${RESTRICTED_FILES}; do \ ${ECHO_CMD} "[ -f ${_DISTDIR}/$$file ] && (${ECHO_CMD} deleting ${_DISTDIR}/$$file; ${RM} ${_DISTDIR}/$$file)"; \ dir=$${file%/*}; \ if [ "$${dir}" != "$${file}" ]; then \ ${ECHO_CMD} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \ fi; \ done; \ fi . if defined(DIST_SUBDIR) @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" . endif . endif # Checksumming utilities # List all algorithms here, all the variables name must begin with dp_ _CHECKSUM_INIT_ENV= \ dp_SHA256=${SHA256} . 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 # the options consistent when fetching and when makesum'ing. # As we're fetching new distfiles, that are not in the distinfo file, disable # checksum and sizes checks. makesum: check-sanity @cd ${.CURDIR} && ${MAKE} fetch NO_CHECKSUM=yes \ DISABLE_SIZE=yes DISTFILES="${DISTFILES}" \ MASTER_SITES="${MASTER_SITES}" \ MASTER_SITE_SUBDIR="${MASTER_SITE_SUBDIR}" \ PATCH_SITES="${PATCH_SITES}" @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ dp_CKSUMFILES='${_CKSUMFILES}' \ dp_DISTDIR='${DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ ${SH} ${SCRIPTSDIR}/makesum.sh ${DISTFILES:C/.*/'&'/} . endif . if !target(checksum) checksum: fetch . if !empty(_CKSUMFILES) && !defined(NO_CHECKSUM) @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ dp_CURDIR='${.CURDIR}' \ dp_DISTDIR='${DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_DIST_SUBDIR='${DIST_SUBDIR}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_FETCH_REGET='${FETCH_REGET}' \ dp_MAKE='${MAKE}' \ dp_MAKEFLAGS='${.MAKEFLAGS}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_DISABLE_SIZE='${DISABLE_SIZE}' \ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ ${SH} ${SCRIPTSDIR}/checksum.sh ${_CKSUMFILES:C/.*/'&'/} . endif . endif # Some port's archives contains files modes that are a bit too restrictive for # some usage. For example: # BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure # When building as a regular user, dependencies are installed/built as root, so # if the archive contains files that have a mode of, say, 600, they will not be # readable by the port requesting the dependency. # This will also fix broken distribution files where directories don't have the # executable bit on. extract-fixup-modes: @${CHMOD} -R u+w,a+rX ${WRKDIR} ################################################################ # The special package-building targets # You probably won't need to touch these ################################################################ # Nobody should want to override this unless PKGNAME is simply bogus. . if !target(package-name) package-name: @${ECHO_CMD} ${PKGNAME} . endif # Build a package but don't check the package cookie . if !target(repackage) repackage: pre-repackage package pre-repackage: @${RM} ${PACKAGE_COOKIE} ${TMPPLIST}* . endif # Build a package but don't check the cookie for installation, also don't # install package cookie . if !target(package-noinstall) package-noinstall: package . endif ################################################################ # Dependency checking ################################################################ . 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 sp in ${_PKGS} ${deptype}_DEPENDS_ALL+= ${${deptype}_DEPENDS${_SP.${sp}}} . endfor ${deptype:tl}-depends: . if !empty(${deptype}_DEPENDS_ALL) && !defined(NO_DEPENDS) @${SETENV} \ dp_RAWDEPENDS="${${deptype}_DEPENDS_ALL}" \ dp_DEPTYPE="${deptype}_DEPENDS" \ dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ dp_PKG_ADD="${PKG_ADD}" \ dp_PKG_INFO="${PKG_INFO}" \ dp_WRKDIR="${WRKDIR}" \ dp_PKGNAME="${PKGNAME}" \ dp_STRICT_DEPENDS="${STRICT_DEPENDS}" \ dp_LOCALBASE="${LOCALBASE}" \ dp_LIB_DIRS="${LIB_DIRS}" \ dp_SH="${SH}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ PORTSDIR="${PORTSDIR}" \ dp_OVERLAYS="${OVERLAYS}" \ dp_MAKE="${MAKE}" \ dp_MAKEFLAGS='${.MAKEFLAGS}' \ ${SH} ${SCRIPTSDIR}/do-depends.sh . endif . endfor . endif # Dependency lists: both build and runtime, recursive. Print out directory names. _UNIFIED_DEPENDS=${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} ${TEST_DEPENDS_ALL} _DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} . for d in ${_UNIFIED_DEPENDS:M*\:/*} _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." . endfor all-depends-list: @${ALL-DEPENDS-LIST} _FLAVOR_RECURSIVE_SH= \ if [ -z "$${recursive_cmd}" ]; then \ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_cmd to be set to the recursive make target to run." >&2; \ ${FALSE}; \ fi; \ if [ "$${recursive_dirs-null}" = "null" ]; then \ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_dirs to be set to the directories to recurse." >&2; \ ${FALSE}; \ fi; \ for dir in $${recursive_dirs}; do \ unset flavor FLAVOR; \ case $${dir} in \ *@*/*) ;; \ *@*) \ flavor=$${dir\#*@}; \ dir=$${dir%@*}; \ ;; \ esac; \ case $$dir in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ (cd $$dir; ${SETENV} $${flavor:+FLAVOR=$${flavor}} ${MAKE} $${recursive_cmd}); \ done # This script is shared among several dependency list variables. See file for # usage. DEPENDS-LIST= \ ${SETENV} \ PORTSDIR="${PORTSDIR}" \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ dp_PKG_INFO="${PKG_INFO}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_OVERLAYS="${OVERLAYS}" \ ${SH} ${SCRIPTSDIR}/depends-list.sh \ ${DEPENDS_SHOW_FLAVOR:D-f} ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} DEINSTALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:N${PKG_DEPENDS}:Q} MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL}" RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL}" TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS_ALL:Q} CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} . if !target(clean-depends) clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done . endif . if !target(limited-clean-depends) limited-clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIMITED-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done . endif . if !target(deinstall-depends) deinstall-depends: @recursive_cmd="deinstall"; \ recursive_dirs="$$(${DEINSTALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif . if !target(fetch-specials) fetch-specials: @${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" @recursive_cmd="fetch"; \ recursive_dirs="${_DEPEND_SPECIALS}"; \ ${_FLAVOR_RECURSIVE_SH} . endif . if !target(fetch-recursive) fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @recursive_cmd="fetch"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif . if !target(fetch-recursive-list) fetch-recursive-list: @recursive_cmd="fetch-list"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . 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, # such as foo:graphics/foo:extract, the first item (foo) # is examined. Only if it begins with a / and does not exist on the # file-system will ``make targ'' proceed. # For more usual (dual-item) dependency tuples, the ``make targ'' # proceeds, if the exact package, which the directory WOULD'VE installed, # is not yet installed. # This is the exact behaviour of the old code, and it may need # revisiting. For example, the entire first case seems dubious, and in # the second case we, probably, should be satisfied with _any_ (earlier) # package, with the same origin as that of the dir. # # -mi FETCH_LIST?= for i in $$deps; do \ prog=$${i%%:*}; dir=$${i\#*:}; \ case $$dir in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ case $$dir in \ *:*) if [ $$prog != $${prog\#/} -o ! -e $$prog ]; then \ dir=$${dir%%:*}; \ else \ continue; \ fi;; \ *) if [ -d ${PKG_DBDIR}/$$(cd $$dir; ${MAKE} -V PKGNAME) ]; then \ continue; \ fi;; \ esac; \ echo cd $$dir; cd $$dir; ${MAKE} $$targ; \ done . if !target(fetch-required) fetch-required: fetch . if defined(NO_DEPENDS) @${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" . else @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" . for deptype in PKG EXTRACT PATCH FETCH BUILD RUN . if defined(${deptype}_DEPENDS) @targ=fetch; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} . endif . endfor . endif . endif . 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) @targ=fetch-list; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} . endif . endfor . endif . endif . if !target(checksum-recursive) checksum-recursive: @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" @recursive_cmd="checksum"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . 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) @${BUILD-DEPENDS-LIST} . endif run-depends-list: . if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) @${RUN-DEPENDS-LIST} . endif test-depends-list: . if defined(TEST_DEPENDS) @${TEST-DEPENDS-LIST} . 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) @${PACKAGE-DEPENDS-LIST} . endif _LIB_RUN_DEPENDS= ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} PACKAGE-DEPENDS-LIST?= \ if [ "${CHILD_DEPENDS}" ]; then \ installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ ${TRUE}); \ if [ "$$installed" ]; then \ break; \ fi; \ if [ -z "$$installed" ]; then \ installed="${PKGNAME}"; \ fi; \ for pkgname in $$installed; do \ ${ECHO_CMD} "$$pkgname ${.CURDIR} ${PKGORIGIN}"; \ done; \ fi; \ checked="${PARENT_CHECKED}"; \ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ unset flavor; \ case $${dir} in \ *~*) \ dir=$${dir%~*}; \ ;; \ esac; \ case $${dir} in \ *@*) \ flavor=$${dir\#*@}; \ dir=$${dir%@*}; \ ;; \ esac; \ case "$$dir" in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac ; \ dir=$$(${REALPATH} $$dir); \ if [ -d $$dir ]; then \ case $$checked in \ $$dir|$$dir\ *|*\ $$dir|*\ $$dir\ *) continue;; \ esac; \ childout=$$(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ set -- $$childout; \ childdir=""; \ while [ $$\# != 0 ]; do \ childdir="$$childdir $$2"; \ ${ECHO_CMD} "$$1 $$2 $$3"; \ shift 3; \ done; \ checked="$$dir $$childdir $$checked"; \ else \ ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ fi; \ done # FIXME: SELF_DEPENDS can only be used to depend on sub packages whose # package name has not been overrided by the framework, otherwize the # assumption made below that the package name is "PKGBASE-$$self" is broken. . for sp in ${_PKGS} ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}?= \ depfiles="" ; \ for lib in ${LIB_DEPENDS${_SP.${sp}}:C/\:.*//}; do \ depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ done ; \ for self in ${SELF_DEPENDS${_SP.${sp}}}; do \ if [ "$$self" = "main" ]; then \ printf "\"%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} ${PKGORIGIN} ${PKGVERSION}; \ else \ printf "\"%s-%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} $$self ${PKGORIGIN} ${PKGVERSION}; \ fi ; \ done ; \ ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS${_SP.${sp}}:C/(.*)\:.*/"\1"/} . endfor PKG_NOTES_ENV?= . for note in ${PKG_NOTES} PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} . endfor . for sp in ${_PKGS} PKG_NOTES.${sp}= ${PKG_NOTES} PKG_NOTES_ENV.${sp}= ${PKG_NOTES_ENV} . if ${sp} != ${PKGBASE} PKG_NOTES.${sp}+= subpackage PKG_NOTES_ENV.${sp}+= dp_PKG_NOTE_subpackage=${_SP.${sp}:S/^.//1} . endif create-manifest: create-manifest.${sp} create-manifest.${sp}: @${SETENV} \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}}' \ dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ dp_COMMENT=${COMMENT${_SP.${sp}}:Q} \ dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ dp_DEPRECATED=${DEPRECATED:Q} \ dp_DESCR='${DESCR${_SP.${sp}}}' \ dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ dp_GROUPS='${GROUPS:u:S/$/,/}' \ dp_LICENSE='${LICENSE:u:S/$/,/}' \ dp_LICENSE_COMB='${LICENSE_COMB}' \ dp_MAINTAINER='${MAINTAINER}' \ dp_METADIR='${METADIR}.${sp}' \ dp_NO_ARCH='${NO_ARCH}' \ dp_PKGBASE='${sp}' \ dp_PKGDEINSTALL='${PKGDEINSTALL${_SP.${sp}}}' \ dp_PKGINSTALL='${PKGINSTALL${_SP.${sp}}}' \ dp_PKGMESSAGES='${_PKGMESSAGES${_SP.${sp}}}' \ dp_PKGORIGIN='${PKGORIGIN}' \ dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL${_SP.${sp}}}' \ dp_PKGPOSTINSTALL='${PKGPOSTINSTALL${_SP.${sp}}}' \ dp_PKGPREDEINSTALL='${PKGPREDEINSTALL${_SP.${sp}}}' \ dp_PKGPREINSTALL='${PKGPREINSTALL${_SP.${sp}}}' \ dp_PKGVERSION='${PKGVERSION}' \ dp_PKG_BIN='${PKG_BIN}' \ dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ dp_PKG_NOTES='${PKG_NOTES.${sp}}' \ dp_PORT_OPTIONS='${PORT_OPTIONS}' \ dp_PREFIX='${PREFIX}' \ dp_USERS='${USERS:u:S/$/,/}' \ dp_WWW='${WWW}' \ ${PKG_NOTES_ENV.${sp}} \ ${SH} ${SCRIPTSDIR}/create-manifest.sh . endfor # Print out package names. package-depends: @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' . for sp in ${_PKGS} actual-package-depends: actual-package-depends.${sp} actual-package-depends.${sp}: @${ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}} . endfor # Build packages for port and dependencies package-recursive: package @recursive_cmd="package-noinstall"; \ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} # Show missing dependencies missing: @for dir in $$(${MISSING-DEPENDS-LIST}); do \ echo $${dir#${PORTSDIR}/}; \ done # Show missing dependencies by name missing-packages: @_packages=$$(${PKG_INFO} -aq); \ for dir in $$(${ALL-DEPENDS-LIST}); do \ _p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ ${ECHO_CMD} $${_p}; \ fi; \ done # Install missing dependencies from package install-missing-packages: @_dirs=$$(${MISSING-DEPENDS-LIST}); \ ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | \ ${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A" ################################################################ # Everything after here are internal targets and really # shouldn't be touched by anybody but the release engineers. ################################################################ # This target generates an index entry suitable for aggregation into # a large index. Format is: # # distribution-name|port-path|installation-prefix|comment| \ # description-file|maintainer|categories|extract-depends| \ # patch-depends|fetch-depends|build-depends|run-depends|www site # # If this ever changes, portmgr should contact the portsnap maintainer # first to avoid gratuitous breakage. . if !target(describe) _EXTRACT_DEPENDS=${EXTRACT_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _PATCH_DEPENDS=${PATCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _FETCH_DEPENDS=${FETCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _LIB_DEPENDS=${LIB_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _BUILD_DEPENDS=${BUILD_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} _RUN_DEPENDS=${RUN_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} . if exists(${DESCR}) _DESCR=${DESCR} . else _DESCR=/dev/null . endif . if defined(BUILDING_INDEX) && defined(INDEX_PORTS) INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr . else INDEX_OUT=/dev/stdout . endif . if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) describe: @(${ECHO_CMD} "${PKGNAME}|${.CURDIR}|${PREFIX}|"${COMMENT:Q}"|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|${_WWW}" >> ${INDEX_OUT}) . else # empty(FLAVORS) describe: ${FLAVORS:S/^/describe-/} . for f in ${FLAVORS} describe-${f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe . endfor . endif # empty(FLAVORS) . endif . if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) . if defined(_DESCRIBE_WITH_FLAVOR) _JSON_OBJ_NAME="\"${FLAVOR}-${.CURDIR:T}\":" . endif describe-json: @(${ECHO_CMD} "${_JSON_OBJ_NAME} { ";\ ${ECHO_CMD} \"uses\":[\"${USES:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"flavors\":[\"${FLAVORS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"options_default\":[\"${OPTIONS_DEFAULT:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"fetch_depends\":[\"${FETCH_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"extract_depends\":[\"${EXTRACT_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"patch_depends\":[\"${PATCH_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"build_depends\":[\"${BUILD_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"lib_depends\":[\"${LIB_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"run_depends\":[\"${RUN_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"test_depends\":[\"${TEST_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"pkg_depends\":[\"${PKG_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"complete_options_list\":[\"${COMPLETE_OPTIONS_LIST:ts,:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"categories\":[\"${CATEGORIES:ts,:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"license\":[\"${LICENSE:ts,:S/,/\",\"/g}\"], ;\ ${ECHO_CMD} \"deprecated\":\""${DEPRECATED:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}" \", ;\ ${ECHO_CMD} \"broken\":\"${BROKEN:Q:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}\", ;\ ${ECHO_CMD} \"distversion\":\"${DISTVERSION}\", ;\ ${ECHO_CMD} \"distversionprefix\":\"${DISTVERSIONPREFIX}\", ;\ ${ECHO_CMD} \"distversionsuffix\":\"${DISTVERSIONSUFFIX}\", ;\ ${ECHO_CMD} \"expiration_date\":\"${EXPIRATION_DATE}\", ;\ ${ECHO_CMD} \"flavor\":\"${FLAVOR}\", ;\ ${ECHO_CMD} \"gh_account\":\"${GH_ACCOUNT}\", ;\ ${ECHO_CMD} \"gh_project\":\"${GH_PROJECT}\", ;\ ${ECHO_CMD} \"gh_tagname\":\"${GH_TAGNAME}\", ;\ ${ECHO_CMD} \"gl_account\":\"${GL_ACCOUNT}\", ;\ ${ECHO_CMD} \"gl_commit\":\"${GL_COMMIT}\", ;\ ${ECHO_CMD} \"gl_project\":\"${GL_PROJECT}\", ;\ ${ECHO_CMD} \"gl_site\":\"${GL_SITE}\", ;\ ${ECHO_CMD} \"maintainer\":\"${MAINTAINER}\", ;\ ${ECHO_CMD} \"makefiles\":\"${MAKEFILES}\", ;\ ${ECHO_CMD} \"pkgbase\":\"${PKGBASE}\", ;\ ${ECHO_CMD} \"pkgname\":\"${PKGNAME}\", ;\ ${ECHO_CMD} \"pkgnamesuffix\":\"${PKGNAMESUFFIX}\", ;\ ${ECHO_CMD} \"pkgorigin\":\"${PKGORIGIN}\", ;\ ${ECHO_CMD} \"comment\":\"${COMMENT:Q:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}\", ;\ ${ECHO_CMD} \"portepoch\":\"${PORTEPOCH}\", ;\ ${ECHO_CMD} \"portname\":\"${PORTNAME}\", ;\ ${ECHO_CMD} \"portrevision\":\"${PORTREVISION}\", ;\ ${ECHO_CMD} \"portversion\":\"${PORTVERSION}\", ;\ ${ECHO_CMD} \"use_github\":\"${USE_GITHUB}\", ;\ ${ECHO_CMD} \"use_gitlab\":\"${USE_GITLAB}\", ;\ ${ECHO_CMD} \"www\":\"${WWW:Q}\" ;\ ${ECHO_CMD} "}" >> ${INDEX_OUT}) . else # empty(FLAVORS) describe-json: ${FLAVORS:S/^/describe-json-/} _LAST_FLAVOR = ${FLAVORS:[-1]} . for f in ${FLAVORS} describe-json-${f}: @if [ "${f}" == "${FLAVORS:[1]}" ]; then \ ${ECHO_CMD} "{" ;\ fi; @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe-json @if [ "${f}" != "${_LAST_FLAVOR}" ]; then \ ${ECHO_MSG} "," ;\ else \ ${ECHO_CMD} "}" ;\ fi; \ . endfor . endif # empty(FLAVORS) www-site: @${ECHO_CMD} ${_WWW} . if !target(readmes) readmes: readme . endif . if !target(readme) readme: @${RM} ${.CURDIR}/README.html @cd ${.CURDIR} && ${MAKE} ${.CURDIR}/README.html . endif ${.CURDIR}/README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" @${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ ${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ -e 's|%%PKG%%|${PKGNAME}|g' \ -e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \ -e '/%%COMMENT%%/d' \ -e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \ ${SED} -e 's|${.CURDIR}/||')"'|' \ -e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \ ${SED} -e 's/([^)]*)//;s/.*.*//')"'|g' \ -e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-www-site)"'|' \ -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-build-depends-list)"'|' \ -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-run-depends-list)"'|' \ -e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \ ${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ ${TEMPLATES}/README.port >> ${.TARGET} # The following two targets require an up-to-date INDEX in ${PORTSDIR} _PRETTY_PRINT_DEPENDS_LIST=\ if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \ ${ECHO_MSG} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; \ else \ target=${.TARGET:C/pretty-print-(.*)-depends-list/\1/} ; \ if [ "$$target" = "build" ] ; then fldnum=8 ; else fldnum=9 ; fi; \ ${ECHO_MSG} -n 'This port requires package(s) "' ; \ ${ECHO_MSG} -n `${AWK} -F\| "\\$$1 ~ /^${PKGNAME}/ {print \\$$$${fldnum};}" ${INDEXDIR}/${INDEXFILE}` ; \ ${ECHO_MSG} "\" to $$target."; \ fi; . if !target(pretty-print-build-depends-list) pretty-print-build-depends-list: . 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 . if !target(pretty-print-run-depends-list) pretty-print-run-depends-list: . if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) @${_PRETTY_PRINT_DEPENDS_LIST} . endif . endif _SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} . if !target(apply-slist) && defined(SUB_FILES) apply-slist: . for file in ${SUB_FILES} . if !exists(${FILESDIR}/${file}.in) @${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 . 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}*}!="" ${i:S/-//:tu}= ${WRKDIR}/${SUB_FILES:M${i}*} . endif . endfor . endif # Generate packing list. Also tests to make sure all required package # files exist. PLIST_SUB_SANITIZED= ${PLIST_SUB:N*_regex=*} . if !target(generate-plist) generate-plist: ${WRKDIR} @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} ${TMPPLIST:H} @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done . for sp in ${_PKGS} . if ${sp} != ${PKGBASE} @for file in ${PLIST_FILES${_SP.${sp}}}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's/^/@@${_SP.${sp}:S/^.//}@@/' >> ${TMPPLIST}; \ done . endif . endfor . if !empty(PLIST) . for f in ${PLIST} @if [ -f "${f}" ]; then \ ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${f} >> ${TMPPLIST}; \ for i in owner group mode; do ${ECHO_CMD} "@$$i"; done >> ${TMPPLIST}; \ fi . endfor . endif . for dir in ${PLIST_DIRS} @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} . endfor . for sp in ${_PKGS} . if ${sp} != ${PKGBASE} . for dir in ${PLIST_DIRS${_SP.${sp}}} @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@@${_SP.${sp}:S/^.//}@@@dir ,' >> ${TMPPLIST} . endfor . endif . endfor . endif ${TMPPLIST}: @cd ${.CURDIR} && ${MAKE} generate-plist . for _type in EXAMPLES DOCS . if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) . if !target(add-plist-${_type:tl}) . if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type}) add-plist-${_type:tl}: . 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 @${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} . endif . endif . endif . endfor . if !target(add-plist-data) . if defined(PORTDATA) add-plist-data: . 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 @${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} . endif . endif . if !target(add-plist-info) . if defined(INFO) add-plist-info: . for i in ${INFO} @${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}:@info\ :g >> ${TMPPLIST} . 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} && \ ${PREFIX} != "/usr" && ${PREFIX} != "/" && !defined(NO_PREFIX_RMDIR)) add-plist-post: @${ECHO_CMD} "@dir ${PREFIX}" >> ${TMPPLIST} . endif . endif . 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 \ _prefix=${PREFIX}; \ [ "${PREFIX}" = "/usr" ] && _prefix="" ; \ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "@(root,wheel,0755) $${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done . endif . endif . if !target(check-man) check-man: stage @${ECHO_MSG} "====> Checking man pages (check-man)" @mdirs= ; \ for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ done ; \ err=0 ; \ for dir in $$mdirs; do \ for f in $$(find $$dir -name "*.gz"); do \ ${ECHO_CMD} "===> Checking $${f##*/}" ; \ gunzip -c $$f | mandoc -Tlint -Werror && continue ; \ err=1 ; \ done ; \ done ; \ exit $$err . endif # Compress all manpage not already compressed which are not hardlinks # Find all manpages which are not compressed and are hardlinks, 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) compress-man: @${ECHO_MSG} "====> Compressing man pages (compress-man)" @mdirs= ; \ for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ done ; \ for dir in $$mdirs; do \ ${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ ${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ ${SORT} -u | while read inode ; do \ unset ref ; \ for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ if [ -z $$ref ]; then \ ref=$${f}.gz ; \ ${GZIP_CMD} $${f} ; \ continue ; \ fi ; \ ${RM} $${f} ; \ (cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ done ; \ done ; \ ${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ ${LN} -sf $$(readlink $$link).gz $$link.gz ;\ ${RM} $$link ; \ done; \ done . endif . if !target(stage-dir) stage-dir: ${STAGEDIR}${PREFIX} . if !defined(NO_MTREE) @${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null . endif . endif . if !target(makeplist) makeplist: stage @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist . endif . 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 . if !target(check-orphans) check-orphans: check-plist . endif . if !target(stage-qa) stage-qa: @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh . if !defined(DEVELOPER) @${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" . endif . endif pretty-flavors-package-names: .PHONY . if empty(FLAVORS) @${ECHO_CMD} "no flavor: ${PKGNAMES}" . else . for f in ${FLAVORS} @${ECHO_CMD} -n "${f}: " @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V PKGNAMES . endfor . endif flavors-package-names: .PHONY . if empty(FLAVORS) @${ECHO_CMD} "${PKGNAMES}" | ${XARGS} -n 1 . else . for f in ${FLAVORS} @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V PKGNAMES | ${XARGS} -n 1 . endfor . endif # Fake installation of package so that user can pkg delete it later. . if !target(fake-pkg) STAGE_ARGS= -i ${STAGEDIR} . if defined(NO_PKG_REGISTER) STAGE_ARGS= -N . endif . for sp in ${_PKGS} fake-pkg: fake-pkg.${sp} fake-pkg.${sp}: ${_PLIST}.${sp} . if defined(INSTALLS_DEPENDS) . if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" . endif @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp} . else . if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" . endif @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp} . endif @${RM} -r ${METADIR}.${sp} . endfor . 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}) ${_t}: . endif . endfor . 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}) .MAKEFLAGS: ${var}=${${var}:Q} . endif . endfor . endif PORTS_ENV_VARS+= ${_EXPORTED_VARS} . if !target(pre-check-config) pre-check-config: _CHECK_OPTIONS_NAMES= OPTIONS_DEFINE OPTIONS_GROUP OPTIONS_MULTI \ OPTIONS_RADIO OPTIONS_SINGLE _CHECK_OPTIONS_NAMES+= ${OPTIONS_GROUP:S/^/OPTIONS_GROUP_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_MULTI:S/^/OPTIONS_MULTI_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_RADIO:S/^/OPTIONS_RADIO_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_SINGLE:S/^/OPTIONS_SINGLE_/} . for var in ${_CHECK_OPTIONS_NAMES} . if defined(${var}) . for o in ${${var}} . if ${o:C/[-_[:upper:][:digit:]]//g} OPTIONS_BAD_NAMES+= ${o} . endif . endfor . endif . endfor . if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES) DEV_WARNING+= "These options name have characters outside of [-_A-Z0-9]:" DEV_WARNING+= "${OPTIONS_BAD_NAMES:O:u}" . endif . 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}) OPTIONS_WRONG_SINGLE_${single}+= ${opt} . if defined(OPTFOUND) OPTIONS_WRONG_SINGLE+= ${single} . else OPTFOUND= true . 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) OPTIONS_WRONG_SINGLE+= ${single} . endif . undef OPTFOUND . undef OPTNOCHECK . endfor .undef single . for radio in ${OPTIONS_RADIO} . for opt in ${OPTIONS_RADIO_${radio}} . if !empty(PORT_OPTIONS:M${opt}) OPTIONS_WRONG_RADIO_${radio}+= ${opt} . if defined(OPTFOUND) OPTIONS_WRONG_RADIO+= ${radio} . else OPTFOUND= true . endif . endif . endfor . undef OPTFOUND . 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}) OPTFOUND= true . 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) OPTIONS_WRONG_MULTI+= ${multi} . endif . undef OPTFOUND . undef OPTNOCHECK . 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}) OPTIONS_WRONG_PREVENTS+= ${opt} . endif OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} . endif . endfor . endfor .undef conflict .undef opt . endif #pre-check-config . if !target(_check-config) _check-config: pre-check-config . 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} @${ECHO_MSG} "====> You must select one and only one option from the ${single} single" . if defined(OPTIONS_WRONG_SINGLE_${single}) @${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_SINGLE_${single}}" . else @${ECHO_MSG} "=====> No option was selected (and one must be)" . endif . endfor . for radio in ${OPTIONS_WRONG_RADIO} @${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" @${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_RADIO_${radio}}" . endfor . if defined(OPTIONS_WRONG_PREVENTS) @${ECHO_MSG} "====> Two or more enabled options conflict with each other" . for prevents in ${OPTIONS_WRONG_PREVENTS} @${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" . 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) _CHECK_CONFIG_ERROR= true . endif . endif # _check-config . if !target(check-config) check-config: _check-config . if !empty(_CHECK_CONFIG_ERROR) @${FALSE} . endif . endif # check-config . if !target(sanity-config) sanity-config: _check-config . if !empty(_CHECK_CONFIG_ERROR) @echo -n "Config is invalid. Re-edit? [Y/n] "; \ read answer; \ case $$answer in \ [Nn]|[Nn][Oo]) \ exit 0; \ esac; \ cd ${.CURDIR} && ${MAKE} config . endif . endif # sanity-config . if !target(pre-config) pre-config: D4P_ENV= PKGNAME="${PKGNAME}" \ PORT_OPTIONS="${PORT_OPTIONS}" \ ALL_OPTIONS="${ALL_OPTIONS}" \ OPTIONS_MULTI="${OPTIONS_MULTI}" \ OPTIONS_SINGLE="${OPTIONS_SINGLE}" \ OPTIONS_RADIO="${OPTIONS_RADIO}" \ OPTIONS_GROUP="${OPTIONS_GROUP}" \ NEW_OPTIONS="${NEW_OPTIONS}" \ DIALOG4PORTS="${DIALOG4PORTS}" \ PREFIX="${PREFIX}" \ LOCALBASE="${LOCALBASE}" \ PORTSDIR="${PORTSDIR}" \ MAKE="${MAKE}" \ D4PHEIGHT="${D4PHEIGHT}" \ D4PMINHEIGHT="${D4PMINHEIGHT}" \ D4PWIDTH="${D4PWIDTH}" \ D4PFULLSCREEN="${D4PFULLSCREEN}" \ D4PALIGNCENTER="${D4PALIGNCENTER}" \ D4PASCIILINES="${D4PASCIILINES}" . if exists(${PKGHELP}) D4P_ENV+= PKGHELP="${PKGHELP}" . 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}} D4P_ENV+= OPTIONS_${otype}_${m}="${OPTIONS_${otype}_${m}}" \ ${m}_DESC=""${${m}_DESC:Q}"" . for opt in ${OPTIONS_${otype}_${m}} D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" . endfor . endfor . endfor .undef m .undef otype .undef opt . endif # pre-config . if !target(do-config) do-config: . if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) @${ECHO_MSG} "===> No options to configure" . else @optionsdir=${OPTIONS_FILE:H}; \ if [ ! -w "${PORT_DBDIR}" -a "`stat -f %u ${PORT_DBDIR:H}`" = 0 ]; \ then \ ${ECHO_MSG} "===> Switching to root credentials to create $${optionsdir}"; \ (${SU_CMD} "${SH} -c \"${MKDIR} $${optionsdir} 2> /dev/null\"") || \ (${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1); \ ${ECHO_MSG} "===> Returning to user credentials" ; \ else \ ${MKDIR} $${optionsdir} 2> /dev/null || \ (${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1) ; \ fi @TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${SETENV} ${D4P_ENV} ${SH} ${SCRIPTSDIR}/dialog4ports.sh $${TMPOPTIONSFILE} || { \ ${RM} $${TMPOPTIONSFILE}; \ ${ECHO_CMD}; \ ${ECHO_MSG} "===> Options unchanged"; \ exit 0; \ }; \ ${ECHO_CMD}; \ if [ ! -e $${TMPOPTIONSFILE} ]; then \ ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ exit 0; \ fi; \ SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ ${RM} $${TMPOPTIONSFILE}; \ TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ for i in ${COMPLETE_OPTIONS_LIST}; do \ if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ ${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ else \ ${ECHO_CMD} "OPTIONS_FILE_UNSET+=$${i}" >> $${TMPOPTIONSFILE}; \ fi; \ done; \ if [ ! -w "${OPTIONS_FILE:H}" -a "`stat -f %u ${OPTIONS_FILE:H}`" != ${UID} ]; \ then \ ${ECHO_MSG} "===> Switching to root credentials to write ${OPTIONS_FILE}"; \ ${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}"; \ ${ECHO_MSG} "===> Returning to user credentials"; \ else \ ${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}; \ fi; \ ${RM} $${TMPOPTIONSFILE} @cd ${.CURDIR} && ${MAKE} sanity-config . endif . endif # do-config . if !target(config) . if !defined(NO_DIALOG) config: pre-config do-config . else config: @${ECHO_MSG} "===> Skipping 'config' as NO_DIALOG is defined" . endif . endif # config . if !target(config-recursive) config-recursive: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; @recursive_cmd="config-conditional"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # config-recursive . if !target(config-conditional) config-conditional: . if !empty(NEW_OPTIONS) @cd ${.CURDIR} && ${MAKE} config; . endif . endif # config-conditional . 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) @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": . for opt in ${ALL_OPTIONS} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" . if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} . endif @${ECHO_MSG} "" . endfor #multi and conditional multis . 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 @${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" . endif . for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" . if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} . endif @${ECHO_MSG} "" . endfor . endfor . endfor .undef otype .undef m .undef opt @${ECHO_MSG} "===> Use 'make config' to modify these settings" . endif . endif # showconfig . if !target(showconfig-recursive) showconfig-recursive: @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and its dependencies"; @recursive_cmd="showconfig"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # showconfig-recursive . if !target(rmconfig) rmconfig: . 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 \ ${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONS_FILE} and $${optionsdir}"; \ ${SU_CMD} "${RM} ${OPTIONS_FILE} ; \ ${RMDIR} $${optionsdir}"; \ ${ECHO_MSG} "===> Returning to user credentials"; \ else \ ${RM} ${OPTIONS_FILE}; \ ${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ fi . else @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" . endif . endif # rmconfig . if !target(rmconfig-recursive) rmconfig-recursive: @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and its dependencies"; @recursive_cmd="rmconfig"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} . endif # rmconfig-recursive . if !target(pretty-print-config) MULTI_START= [ MULTI_END= ] GROUP_START= [ GROUP_END= ] SINGLE_START= ( SINGLE_END= ) RADIO_START= ( RADIO_END= ) pretty-print-config: . 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}} @${ECHO_MSG} -n "${m}${${otype}_START} " . for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " . endfor @${ECHO_MSG} -n "${${otype}_END} " . endfor . endfor .undef otype .undef m .undef opt @${ECHO_MSG} "" . endif # pretty-print-config desktop-categories: @${SETENV} \ dp_CATEGORIES="${CATEGORIES}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_SORT="${SORT}" \ dp_TR="${TR}" \ ${SH} ${SCRIPTSDIR}/desktop-categories.sh . if defined(DESKTOP_ENTRIES) check-desktop-entries: @${SETENV} \ dp_CURDIR="${.CURDIR}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_ECHO_MSG=${ECHO_MSG} \ dp_EXPR="${EXPR}" \ dp_GREP="${GREP}" \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_SED="${SED}" \ dp_VALID_DESKTOP_CATEGORIES="${VALID_DESKTOP_CATEGORIES}" \ dp_TR="${TR}" \ ${SH} ${SCRIPTSDIR}/check-desktop-entries.sh ${DESKTOP_ENTRIES} . endif . if !target(install-desktop-entries) . if defined(DESKTOP_ENTRIES) install-desktop-entries: @${SETENV} \ dp_CURDIR="${.CURDIR}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_STAGEDIR="${STAGEDIR}" \ dp_DESKTOPDIR="${DESKTOPDIR}" \ dp_TMPPLIST="${TMPPLIST}" \ dp_MAKE="${MAKE}" \ dp_SED="${SED}" \ ${SH} ${SCRIPTSDIR}/install-desktop-entries.sh ${DESKTOP_ENTRIES} . endif . endif . if !empty(BINARY_ALIAS) . if !target(create-binary-alias) create-binary-alias: ${BINARY_LINKDIR} . for target src in ${BINARY_ALIAS:C/=/ /} @if srcpath=`which -- ${src}`; then \ ${RLN} $${srcpath} ${BINARY_LINKDIR}/${target}; \ else \ ${ECHO_MSG} "===> Missing \"${src}\" to create a binary alias at \"${BINARY_LINKDIR}/${target}\""; \ ${FALSE}; \ fi . endfor . endif . endif . if !empty(PKGCONFIG_BASE) . if !target(create-base-pkgconfig) create-base-pkgconfig: ${PKGCONFIG_LINKDIR} . for pcfile in ${PKGCONFIG_BASE:S/$/.pc/} @if `test -f ${PKGCONFIG_BASEDIR}/${pcfile}`; then \ ${RLN} ${PKGCONFIG_BASEDIR}/${pcfile} ${PKGCONFIG_LINKDIR}/${pcfile}; \ else \ ${ECHO_MSG} "===> Missing \"${pcfile}\" to create a link at \"${PKGCONFIG_LINKDIR}/${pcfile}\" "; \ ${FALSE}; \ fi . endfor . endif . endif . if !empty(BINARY_WRAPPERS) . if !target(create-binary-wrappers) create-binary-wrappers: ${BINARY_LINKDIR} . for bin in ${BINARY_WRAPPERS} @${INSTALL_SCRIPT} ${WRAPPERSDIR}/${bin} ${BINARY_LINKDIR} . endfor . endif . endif . if defined(WARNING) WARNING_WAIT?= 10 show-warnings: @${ECHO_MSG} "/!\\ WARNING /!\\" @${ECHO_MSG} . for m in ${WARNING} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} . endfor @sleep ${WARNING_WAIT} . endif . if defined(ERROR) show-errors: @${ECHO_MSG} "/!\\ ERRORS /!\\" @${ECHO_MSG} . for m in ${ERROR} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} . endfor @${FALSE} . endif . 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} @${ECHO_MSG} ${m} | ${FMT_80} @${ECHO_MSG} . endfor . if defined(DEV_WARNING_FATAL) @${FALSE} . else @sleep ${DEV_WARNING_WAIT} . endif . endif . if defined(DEV_ERROR) show-dev-errors: @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" @${ECHO_MSG} . for m in ${DEV_ERROR} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} . endfor @${FALSE} . endif . endif #DEVELOPER ${_PORTS_DIRECTORIES}: @${MKDIR} ${.TARGET} # Please note that the order of the following targets is important, and # should not be modified. _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PACKAGE STAGE # Define the SEQ of actions to take when each target is ran, and which targets # it depends on before running its SEQ. # # Main target has a priority of 500, pre-target 300, post-target 700, # target-depends 150. Other targets are spaced in between those # # If you change the pre-foo and post-foo values here, go and keep them in sync # in _OPTIONS_TARGETS in bsd.options.mk _SANITY_SEQ= 050:post-chroot 100:pre-everything \ 125:show-unsupported-system-error 150:check-makefile \ 190:show-errors 200:show-warnings \ 210:show-dev-errors 220:show-dev-warnings \ 250:check-categories 300:check-makevars \ 350:check-desktop-entries 400:check-depends \ 500:check-deprecated \ 550:check-vulnerable 600:check-license 650:check-config \ 700:buildanyway-message 750:options-message ${_USES_sanity} _PKG_DEP= check-sanity _PKG_SEQ= 500:pkg-depends _FETCH_DEP= pkg _FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ 500:do-fetch 550:fetch-specials 700:post-fetch \ 850:post-fetch-script \ ${_OPTIONS_fetch} ${_USES_fetch} _EXTRACT_DEP= fetch _EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ 150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ 300:pre-extract 450:pre-extract-script 500:do-extract \ 700:post-extract 850:post-extract-script \ 999:extract-fixup-modes \ ${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} _PATCH_DEP= extract _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ 300:pre-patch 450:pre-patch-script 500:do-patch \ 700:post-patch 850:post-patch-script \ ${_OPTIONS_patch} ${_USES_patch} _CONFIGURE_DEP= patch _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ 161:create-binary-wrappers 170:create-base-pkgconfig \ 200:configure-message 210:apply-slist \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \ 850:post-configure-script \ ${_OPTIONS_configure} ${_USES_configure} _BUILD_DEP= configure _BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ 500:do-build 700:post-build 850:post-build-script \ ${_OPTIONS_build} ${_USES_build} _STAGE_DEP= build # STAGE is special in its numbering as it has install and stage, so install is # the main, and stage goes after. _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ 300:pre-install \ 400:generate-plist 450:pre-su-install 475:create-users-groups \ 500:do-install 550:kmod-post-install 600:fixup-lib-pkgconfig 700:post-install \ 750:post-install-script 800:post-stage 850:compress-man \ 860:install-rc-script 870:install-ldconfig-file \ 880:install-license 890:install-desktop-entries \ 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ ${_OPTIONS_install} ${_USES_install} \ ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage} . if defined(DEVELOPER) _STAGE_SEQ+= 995:stage-qa . else stage-qa: stage . endif _TEST_DEP= stage _TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ 800:post-test \ ${_OPTIONS_test} ${_USES_test} _INSTALL_DEP= stage _INSTALL_SEQ= 100:install-message \ 150:identify-install-conflicts \ 200:check-already-installed \ 300:create-manifest _INSTALL_SUSEQ= 400:fake-pkg 500:security-check _PACKAGE_DEP= stage ${_TESTING_PACKAGE_DEP} _PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ 500:do-package 850:post-package-script \ ${_OPTIONS_package} ${_USES_package} # Enforce order for -jN builds . for _t in ${_TARGETS_STAGES} # Check if the port need to change the default order of some targets... . if defined(TARGET_ORDER_OVERRIDE) _tmp_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}} _tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} . else _tmp_seq:= ${_tmp_seq} ${_entry} . 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 _${_t}_REAL_SEQ+= ${s} . endif . endfor . for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} . if target(${s}) . if ! ${NOTPHONY:M${s}} _PHONY_TARGETS+= ${s} . endif _${_t}_REAL_SUSEQ+= ${s} . endif . endfor .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} . 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 # 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) _PHONY_TARGETS+= ${target} ${target}: ${${target:tu}_COOKIE} . elif !target(${target}) ${target}: config-conditional @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} . elif target(${target}) && defined(IGNORE) . endif . 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) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && ${MAKE} ${_${target:tu}_REAL_SEQ} . else # !USE_SUBMAKE ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} . 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) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && \ ${MAKE} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} . 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 . else # exists(cookie) ${${target:tu}_COOKIE}:: @if [ ! -e ${.TARGET} ]; then \ cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ fi . endif # !exists(cookie) . endfor # foreach(targets) .PHONY: ${_PHONY_TARGETS} check-sanity fetch pkg . if !target(check-sanity) check-sanity: ${_SANITY_REAL_SEQ} . endif . if !target(fetch) fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} . endif . if !target(pkg) pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} . endif . if !target(test) test: ${_TEST_DEP} . if !defined(NO_TEST) test: ${_TEST_REAL_SEQ} . endif . endif . endif # End of post-makefile section. .endif # End of the DESTDIR if statement diff --git a/games/iortcw/Makefile b/games/iortcw/Makefile index 910beccfd637..9c20425cd256 100644 --- a/games/iortcw/Makefile +++ b/games/iortcw/Makefile @@ -1,84 +1,84 @@ PORTNAME= iortcw PORTVERSION= 1.51c -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= games MAINTAINER= pkubaj@FreeBSD.org COMMENT= Game engine for Return to Castle Wolfenstein WWW= https://github.com/iortcw/iortcw LICENSE= GPLv3 NOT_FOR_ARCHS= aarch64 armv6 armv7 NOT_FOR_ARCHS_REASON= fails to configure: Architecture not supported LIB_DEPENDS= libcurl.so:ftp/curl \ libfreetype.so:print/freetype2 \ libogg.so:audio/libogg \ libopus.so:audio/opus \ libopusfile.so:audio/opusfile USES= compiler:c++11-lang gl gmake jpeg openal pkgconfig sdl xorg USE_GITHUB= yes USE_GL= gl USE_SDL= sdl2 WOLFDIR= "libexec/${PORTNAME}" MAKE_ARGS= BINDIR="${STAGEDIR}${PREFIX}/bin" \ COPYDIR="${STAGEDIR}${PREFIX}/${WOLFDIR}" LDFLAGS_i386= -Wl,-znotext -PLIST_SUB= ARCH="${ARCH}" \ +PLIST_SUB= ARCH="${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc/ppc/}" \ WOLFDIR="${WOLFDIR}" SUB_FILES= iowolfded iowolfmp iowolfsp pkg-message -SUB_LIST= ARCH="${ARCH}" \ +SUB_LIST= ARCH="${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc/ppc/}" \ DISTVERSION="${DISTVERSION}" \ WOLFDIR="${PREFIX}/${WOLFDIR}" OPTIONS_DEFINE= MP SP OPTIONS_DEFAULT= MP SP OPTIONS_SUB= yes MP_DESC= Build multiplayer support SP_DESC= Build singleplayer support SP_ALL_TARGET= sp SP_DESKTOP_ENTRIES= "Return to Castle Wolfenstein" \ "Return to Castle Wolfenstein" \ "${DATADIR}/wolf512.png" \ "iowolfsp" \ "Game;" \ false SP_INSTALL_TARGET= sp-install MP_ALL_TARGET= mp MP_DESKTOP_ENTRIES= "Return to Castle Wolfenstein (MP)" \ "Return to Castle Wolfenstein Multiplayer" \ "${DATADIR}/wolf512.png" \ "iowolfmp" \ "Game;" \ false MP_INSTALL_TARGET= mp-install post-extract: ${CP} ${FILESDIR}/Makefile ${WRKSRC} post-patch: @${REINPLACE_CMD} '/\.git\/index/d' ${WRKSRC}/SP/Makefile @${REINPLACE_CMD} '/\.git\/index/d' ${WRKSRC}/MP/Makefile post-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/MP/misc/wolf512.png ${STAGEDIR}${DATADIR} post-install-MP-on: ${INSTALL_SCRIPT} ${WRKDIR}/iowolfmp ${STAGEDIR}${PREFIX}/bin/iowolfmp ${INSTALL_SCRIPT} ${WRKDIR}/iowolfded ${STAGEDIR}${PREFIX}/bin/iowolfded post-install-SP-on: ${INSTALL_SCRIPT} ${WRKDIR}/iowolfsp ${STAGEDIR}${PREFIX}/bin/iowolfsp .include diff --git a/games/iortcw/files/patch-MP_Makefile b/games/iortcw/files/patch-MP_Makefile new file mode 100644 index 000000000000..be11bab35ea7 --- /dev/null +++ b/games/iortcw/files/patch-MP_Makefile @@ -0,0 +1,73 @@ +--- MP/Makefile.orig 2019-03-16 18:09:48 UTC ++++ MP/Makefile +@@ -101,14 +101,6 @@ export ARCH + endif + export ARCH + +-# For historical compatibility reasons on non-windows +-# platform output files use i386 instead of x86 +-ifeq ($(ARCH),x86) +- ifndef MINGW +- FILE_ARCH=i386 +- endif +-endif +- + ifndef FILE_ARCH + FILE_ARCH=$(ARCH) + endif +@@ -369,7 +361,7 @@ CLIENT_EXTRA_FILES= + EXTRA_FILES= + CLIENT_EXTRA_FILES= + +-ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) ++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu" "freebsd" "netbsd" "openbsd")) + TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\" + endif + +@@ -752,7 +744,7 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd")) + + BASE_CFLAGS = -Wall -fno-strict-aliasing \ +- -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON ++ -pipe -DUSE_ICON -DARCH_STRING=\\\"$(FILE_ARCH)\\\" -DMAP_ANONYMOUS=MAP_ANON + CLIENT_CFLAGS += $(SDL_CFLAGS) + + OPTIMIZEVM = -O3 +@@ -761,7 +753,6 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + ifeq ($(ARCH),x86_64) + OPTIMIZEVM = -O3 + OPTIMIZE = $(OPTIMIZEVM) -ffast-math +- FILE_ARCH = amd64 + endif + ifeq ($(ARCH),x86) + OPTIMIZEVM = -O3 -march=i586 +@@ -787,13 +778,8 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + OPTIMIZE = $(OPTIMIZEVM) + endif + +- ifeq ($(USE_CURL),1) +- CLIENT_CFLAGS += $(CURL_CFLAGS) +- USE_CURL_DLOPEN=0 +- endif +- + SHLIBEXT=so +- SHLIBCFLAGS=-fPIC ++ SHLIBCFLAGS=-fPIC -fvisibility=hidden + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LIBS=-lpthread +@@ -805,12 +791,14 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + RENDERER_LIBS = $(SDL_LIBS) + + ifeq ($(USE_OPENAL),1) ++ CLIENT_CFLAGS += $(OPENAL_CFLAGS) + ifneq ($(USE_OPENAL_DLOPEN),1) + CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS) + endif + endif + + ifeq ($(USE_CURL),1) ++ CLIENT_CFLAGS += $(CURL_CFLAGS) + ifneq ($(USE_CURL_DLOPEN),1) + CLIENT_LIBS += $(CURL_LIBS) + endif diff --git a/games/iortcw/files/patch-MP_code_qcommon_q__platform.h b/games/iortcw/files/patch-MP_code_qcommon_q__platform.h index 770e384a9750..1e6322c627c0 100644 --- a/games/iortcw/files/patch-MP_code_qcommon_q__platform.h +++ b/games/iortcw/files/patch-MP_code_qcommon_q__platform.h @@ -1,32 +1,22 @@ --- MP/code/qcommon/q_platform.h.orig 2019-03-16 18:09:48 UTC +++ MP/code/qcommon/q_platform.h -@@ -35,11 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +@@ -221,14 +221,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + #define ID_INLINE inline + #define PATH_SEP '/' - #else - --#if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY) --#define id386 1 --#else - #define id386 0 --#endif - - #if (defined(powerc) || defined(powerpc) || defined(ppc) || \ - defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY) -@@ -224,11 +220,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - #ifdef __i386__ - #define ARCH_STRING "i386" - #elif defined __amd64__ --#undef idx64 --#define idx64 1 - #define ARCH_STRING "amd64" - #elif defined __axp__ - #define ARCH_STRING "alpha" -+#elif defined __powerpc64__ -+#define ARCH_STRING "powerpc64" -+#elif defined __powerpc__ -+#define ARCH_STRING "powerpc" -+#elif defined __riscv -+#define ARCH_STRING "riscv64" +-#ifdef __i386__ +-#define ARCH_STRING "i386" +-#elif defined __amd64__ ++#if !defined(ARCH_STRING) ++# error ARCH_STRING should be defined by the Makefile ++#endif ++ ++#if defined __x86_64__ + #undef idx64 + #define idx64 1 +-#define ARCH_STRING "amd64" +-#elif defined __axp__ +-#define ARCH_STRING "alpha" #endif #if BYTE_ORDER == BIG_ENDIAN diff --git a/games/iortcw/files/patch-SP_Makefile b/games/iortcw/files/patch-SP_Makefile new file mode 100644 index 000000000000..294a9b7c76d6 --- /dev/null +++ b/games/iortcw/files/patch-SP_Makefile @@ -0,0 +1,73 @@ +--- SP/Makefile.orig 2019-03-16 18:09:48 UTC ++++ SP/Makefile +@@ -98,14 +98,6 @@ export ARCH + endif + export ARCH + +-# For historical compatibility reasons on non-windows +-# platform output files use i386 instead of x86 +-ifeq ($(ARCH),x86) +- ifndef MINGW +- FILE_ARCH=i386 +- endif +-endif +- + ifndef FILE_ARCH + FILE_ARCH=$(ARCH) + endif +@@ -358,7 +350,7 @@ CLIENT_EXTRA_FILES= + EXTRA_FILES= + CLIENT_EXTRA_FILES= + +-ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) ++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu" "freebsd" "netbsd" "openbsd")) + TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\" + endif + +@@ -741,7 +733,7 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd" "netbsd")) + + BASE_CFLAGS = -Wall -fno-strict-aliasing \ +- -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON ++ -pipe -DUSE_ICON -DARCH_STRING=\\\"$(FILE_ARCH)\\\" -DMAP_ANONYMOUS=MAP_ANON + CLIENT_CFLAGS += $(SDL_CFLAGS) + + OPTIMIZEVM = -O3 +@@ -750,7 +742,6 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + ifeq ($(ARCH),x86_64) + OPTIMIZEVM = -O3 + OPTIMIZE = $(OPTIMIZEVM) -ffast-math +- FILE_ARCH = amd64 + endif + ifeq ($(ARCH),x86) + OPTIMIZEVM = -O3 -march=i586 +@@ -776,13 +767,8 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + OPTIMIZE = $(OPTIMIZEVM) + endif + +- ifeq ($(USE_CURL),1) +- CLIENT_CFLAGS += $(CURL_CFLAGS) +- USE_CURL_DLOPEN=0 +- endif +- + SHLIBEXT=so +- SHLIBCFLAGS=-fPIC ++ SHLIBCFLAGS=-fPIC -fvisibility=hidden + SHLIBLDFLAGS=-shared $(LDFLAGS) + + THREAD_LIBS=-lpthread +@@ -794,12 +780,14 @@ ifneq (,$(findstring "$(PLATFORM)", "freebsd" "openbsd + RENDERER_LIBS = $(SDL_LIBS) + + ifeq ($(USE_OPENAL),1) ++ CLIENT_CFLAGS += $(OPENAL_CFLAGS) + ifneq ($(USE_OPENAL_DLOPEN),1) + CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS) + endif + endif + + ifeq ($(USE_CURL),1) ++ CLIENT_CFLAGS += $(CURL_CFLAGS) + ifneq ($(USE_CURL_DLOPEN),1) + CLIENT_LIBS += $(CURL_LIBS) + endif diff --git a/games/iortcw/files/patch-SP_code_qcommon_q__platform.h b/games/iortcw/files/patch-SP_code_qcommon_q__platform.h index 84d7ad28d17e..5c657c98badd 100644 --- a/games/iortcw/files/patch-SP_code_qcommon_q__platform.h +++ b/games/iortcw/files/patch-SP_code_qcommon_q__platform.h @@ -1,32 +1,22 @@ --- SP/code/qcommon/q_platform.h.orig 2019-03-16 18:09:48 UTC +++ SP/code/qcommon/q_platform.h -@@ -35,11 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +@@ -221,14 +221,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + #define ID_INLINE inline + #define PATH_SEP '/' - #else - --#if (defined _M_IX86 || defined __i386__) && !defined(C_ONLY) --#define id386 1 --#else - #define id386 0 --#endif - - #if (defined(powerc) || defined(powerpc) || defined(ppc) || \ - defined(__ppc) || defined(__ppc__)) && !defined(C_ONLY) -@@ -224,11 +220,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - #ifdef __i386__ - #define ARCH_STRING "i386" - #elif defined __amd64__ --#undef idx64 --#define idx64 1 - #define ARCH_STRING "amd64" - #elif defined __axp__ - #define ARCH_STRING "alpha" -+#elif defined __powerpc64__ -+#define ARCH_STRING "powerpc64" -+#elif defined __powerpc__ -+#define ARCH_STRING "powerpc" -+#elif defined __riscv -+#define ARCH_STRING "riscv64" +-#ifdef __i386__ +-#define ARCH_STRING "i386" +-#elif defined __amd64__ ++#if !defined(ARCH_STRING) ++# error ARCH_STRING should be defined by the Makefile ++#endif ++ ++#if defined __x86_64__ + #undef idx64 + #define idx64 1 +-#define ARCH_STRING "amd64" +-#elif defined __axp__ +-#define ARCH_STRING "alpha" #endif #if BYTE_ORDER == BIG_ENDIAN diff --git a/games/legesmotus/files/patch-Makefile b/games/legesmotus/files/patch-Makefile deleted file mode 100644 index 58d01cbdab8c..000000000000 --- a/games/legesmotus/files/patch-Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig 2010-09-06 03:18:02 UTC -+++ Makefile -@@ -99,7 +99,7 @@ lmserver: server - - $(ALL_PKG): - +@mkdir -p $@ -- +@$(MAKE) -C $@ -f $(BASEDIR)/$@/Makefile BASEDIR="../../.." SUBDIR="$@" $(TARGET) -+ +@$(MAKE) -C $@ -f $(BASEDIR)/$@/Makefile BASEDIR=".." SUBDIR="$@" $(TARGET) - - server: common - diff --git a/games/legesmotus/files/patch-common.mk b/games/legesmotus/files/patch-common.mk index e92d58d1463d..0aa014d450e2 100644 --- a/games/legesmotus/files/patch-common.mk +++ b/games/legesmotus/files/patch-common.mk @@ -1,37 +1,23 @@ --- common.mk.orig 2010-09-03 19:22:37 UTC +++ common.mk -@@ -9,7 +9,6 @@ FRAMEWORKS = /Library/Frameworks +@@ -9,7 +9,6 @@ VERSION = 0.4.0 VERSION = 0.4.0 # These may be overridden by config.mk -DATADIR = data #UNIVERSAL = 1 #NOBUNDLE = 1 -@@ -84,13 +83,6 @@ ifeq ($(ARCHS),) - endif - endif - --# Only Mac OS X can use fat binaries --ifneq ($(filter $(ARCH),$(ARCHS)),$(ARCH)) -- ifneq ($(MACHINE)-$(ARCH),Darwin-universal) -- $(error Disallowed architecture for this platform: $(ARCH)) -- endif --endif -- - ifeq ($(MACHINE)$(NOBUNDLE),Darwin) - export MACOSX_DEPLOYMENT_TARGET=10.4 - FLAGS_SDL = -I$(FRAMEWORKS)/SDL.framework/Headers -@@ -174,12 +166,10 @@ CXXFLAGS += -Wnon-virtual-dtor +@@ -174,12 +173,10 @@ ifeq ($(DEBUG),1) ifeq ($(DEBUG),1) RELEASE = debug - CFLAGS += -g -O0 -DLM_DEBUG else RELEASE = release # Take O-flag from CFLAGS if we already have it set ifneq ($(filter -O%,$(CFLAGS)),) - CFLAGS += -O2 endif endif diff --git a/games/q3cellshading/Makefile b/games/q3cellshading/Makefile index 80fb57dccc76..ae9135d40e8a 100644 --- a/games/q3cellshading/Makefile +++ b/games/q3cellshading/Makefile @@ -1,91 +1,80 @@ PORTNAME= q3cellshading PORTVERSION= 1.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= games MASTER_SITES= SF DISTNAME= q3cel-${PORTVERSION}-src MAINTAINER= danfe@FreeBSD.org COMMENT= Quake III engine with Cell Shading capabilities WWW= https://q3cellshading.sourceforge.net/ ONLY_FOR_ARCHS= i386 ONLY_FOR_ARCHS_REASON= does not run properly; try games/ioquake3 with option USES= gmake zip +ALL_TARGET= build_release MAKE_ENV= LIBDIR="${LIBDIR}" MAKE_JOBS_UNSAFE= yes BUILD_WRKSRC= ${WRKSRC}/code/unix WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" -VM_ARCHS= i386 powerpc - OPTIONS_DEFINE= GAMELIBS OPTIMIZED_CFLAGS OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS SMP_CLIENT OPTIONS_MULTI= FLAVOR OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED SMP_CLIENT OPTIONS_SUB= yes CLIENT_DESC= Build client DEDICATED_DESC= Build dedicated server GAMELIBS_DESC= Force building game libraries SMP_CLIENT_DESC= Build SMP (threaded) client CLIENT_MAKE_ENV= CLIENT=YES CLIENT_VARS= Q3BIN+=quake3 DEDICATED_MAKE_ENV= DEDICATED=YES DEDICATED_VARS= Q3BIN+=q3ded OPTIMIZED_CFLAGS_MAKE_ENV= OPTIMIZED_CFLAGS=YES SMP_CLIENT_MAKE_ENV= SMP=YES SMP_CLIENT_VARS= Q3BIN+=quake3-smp LIBDIR= ${PREFIX}/lib/${PORTNAME} .include .if ${ARCH} == "i386" BUILD_DEPENDS+= nasm:devel/nasm .endif -.for arch in ${ARCH} -. if ${VM_ARCHS:M${arch}} != "" -HAVE_VM_COMPILED= yes -. endif -.endfor - -.if !defined(HAVE_VM_COMPILED) -MAKE_ENV+= DLL_ONLY=true -.endif - .if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT} USES+= gl xorg USE_GL= glu USE_XORG= xxf86dga xxf86vm .endif -.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) +.if ${PORT_OPTIONS:MGAMELIBS} MAKE_ENV+= GAMELIBS=YES .endif do-install: .for bin in ${Q3BIN} # Adjust program names to avoid conflicts with other Quake3 ports ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} \ ${STAGEDIR}${PREFIX}/bin/${bin:C/(quake3|q3)/\1cel/} .endfor -.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) +.if ${PORT_OPTIONS:MGAMELIBS} .for dir in baseq3 missionpack @${MKDIR} ${STAGEDIR}${LIBDIR}/${dir} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so \ ${STAGEDIR}${LIBDIR}/${dir} .endfor .endif .include "${.CURDIR}/../quake3-data/Makefile.include" .include PATCH_ARGS+= -l diff --git a/games/q3cellshading/files/patch-code-unix-Makefile b/games/q3cellshading/files/patch-code-unix-Makefile index 0c197e23fe36..271885889547 100644 --- a/games/q3cellshading/files/patch-code-unix-Makefile +++ b/games/q3cellshading/files/patch-code-unix-Makefile @@ -1,483 +1,421 @@ ---- code/unix/Makefile.orig 2006-07-18 09:52:58 UTC +--- code/unix/Makefile.orig 2024-02-13 13:27:33 UTC +++ code/unix/Makefile @@ -25,7 +25,7 @@ PLATFORM_RELEASE=$(shell uname -r) ### # Where we are building from (where the source code should be!) -MOUNT_DIR=../ +MOUNT_DIR=.. # Where we are building to, libMesaVoodooGL.so.3.3 should be here, etc. # the demo pk3 file should be here in demoq3/pak0.pk3 or baseq3/pak0.pk3 @@ -34,7 +34,7 @@ BDIR=$(MOUNT_DIR)/../run # Build name # BUILD_NAME=$(BUILD_NAME) -BUILD_NAME=quake3.x86 +BUILD_NAME=quake3 -@@ -46,8 +46,8 @@ BUILD_NAME=quake3.x86 +@@ -46,8 +46,8 @@ BASEQ3_DIR=$(BDIR)/baseq3 BASEQ3_DIR=$(BDIR)/baseq3 -BD=debug$(ARCH)$(GLIBC) -BR=release$(ARCH)$(GLIBC) +BD=debug +BR=release CDIR=$(MOUNT_DIR)/client SDIR=$(MOUNT_DIR)/server RDIR=$(MOUNT_DIR)/renderer -@@ -65,7 +65,7 @@ JPDIR=$(MOUNT_DIR)/jpeg-6 +@@ -65,7 +65,7 @@ SPLNDIR=$(MOUNT_DIR)/splines SPLNDIR=$(MOUNT_DIR)/splines # extract version info -VERSION=$(shell ./extract_ver.pl) +VERSION="Q3 1.32c" RPM_RELEASE=1 # NOTE: used by dcp rcp targets, not referenced -@@ -76,7 +76,7 @@ RPM_RELEASE=1 +@@ -76,7 +76,10 @@ RPM_RELEASE=1 ############################################################################# ## Defaults -DLL_ONLY=false -+DLL_ONLY?=false ++ARCH=$(shell uname -m) ++RPMARCH=$(ARCH) ++VENDOR=unknown ++DLL_ONLY=true # bk010215 - TODO - add all defaults / kill Ryan -@@ -136,7 +136,7 @@ ifeq ($(PLATFORM),linux) - ifeq ($(ARCH),ppc) - NEWPGCC=/loki/global/ppc/bin/gcc - CC=$(NEWPGCC) -- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce -+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -ffast-math -falign-functions=2 - else - #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205 - #NEWPGCC=/loki/global/x86/bin/gcc -@@ -146,7 +146,7 @@ ifeq ($(PLATFORM),linux) - # TTimo: legacy RELEASE_CFLAGS - # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box - # but building on the Mdk 7.2 baseline seems to work -- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce -+ RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -ffast-math -falign-functions=2 - # TTimo: use this for building on P3 gcc 2.95.3 libc2.2 for all targets (experimental! -fomit-fram-pointer removed) - # RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce - endif -@@ -162,7 +162,7 @@ ifeq ($(PLATFORM),linux) - RANLIB=ranlib - - THREAD_LDFLAGS=-lpthread -- LDFLAGS=-ldl -lm -+ LDFLAGS=-lm - GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm +@@ -199,31 +202,34 @@ GLIBC= #libc is irrelevant - ifeq ($(ARCH),axp) -@@ -197,33 +197,28 @@ else # ifeq Linux - - ifeq ($(PLATFORM),freebsd) - -+ifeq ($(ARCH),powerpc) -+ARCH=ppc -+endif -+ GLIBC= #libc is irrelevant -ifneq (,$(findstring alpha,$(shell uname -m))) -ARCH=axp -RPMARCH=alpha -VENDOR=dec -else #default to i386 -ARCH=i386 -RPMARCH=i386 -VENDOR=unknown -endif #alpha test -+BASE_CFLAGS = $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' -+GL_CFLAGS = -I$(LOCALBASE)/include ++ifeq ($(ARCH),alpha) ++ ARCH=axp ++ RPMARCH=alpha ++ VENDOR=dec ++else ifeq ($(ARCH),powerpc) ++ ARCH=ppc ++ RPMARCH=ppc ++ DLL_ONLY=false ++else ifeq ($(ARCH),i386) ++ DLL_ONLY=false ++endif -+DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror -+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG ++BASE_CFLAGS = -fsigned-char $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' ++ifeq ($(DLL_ONLY),true) ++ BASE_CFLAGS += -DDLL_ONLY ++endif -BASE_CFLAGS = -pipe -+ifdef OPTIMIZED_CFLAGS -+ ifeq ($(ARCH),i386) -+RELEASE_CFLAGS+=-ffast-math -falign-functions=2 -+ else -+RELEASE_CFLAGS+=-ffast-math -+ endif -+endif ++GL_CFLAGS = -I$(LOCALBASE)/include -GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include - --DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror + DEBUG_CFLAGS=$(BASE_CFLAGS) -g -Wall -Werror -ifeq ($(ARCH),axp) -CC=pgcc -RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -else -#NEWPGCC=/loki/global/x86/bin/gcc # raistlin012301 -#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc -NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc -CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi ) -RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce -+ifeq ($(DLL_ONLY),true) -+BASE_CFLAGS += -DDLL_ONLY ++RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG ++ ++ifdef OPTIMIZED_CFLAGS ++ ifeq ($(ARCH),i386) ++RELEASE_CFLAGS+=-ffast-math -falign-functions=2 ++ else ++RELEASE_CFLAGS+=-ffast-math ++ endif endif LIBEXT=a -@@ -237,23 +232,31 @@ RANLIB=ranlib +@@ -237,25 +243,33 @@ THREAD_LDFLAGS=-lpthread THREAD_LDFLAGS=-lpthread # don't need -ldl (FreeBSD) -LDFLAGS=-lm +LDFLAGS+=-lm #GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm #GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm -GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm +GLLDFLAGS=-L$(LOCALBASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm -ifeq ($(ARCH),axp) -TARGETS=\ - $(B)/$(PLATFORM)q3ded -else -TARGETS=\ - $(B)/$(PLATFORM)quake3 \ - $(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \ - $(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \ - $(B)/baseq3/ui$(ARCH).$(SHLIBEXT) \ - $(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \ - $(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \ - $(B)/missionpack/ui$(ARCH).$(SHLIBEXT) +ifdef CLIENT +TARGETS+=$(B)/quake3 -+endif -+ + endif + +ifdef DEDICATED +TARGETS+=$(B)/q3ded +endif + +ifdef SMP +TARGETS+=$(B)/quake3-smp +endif + +ifdef GAMELIBS +TARGETS+=\ + $(B)/baseq3/cgame.$(SHLIBEXT) \ + $(B)/baseq3/qagame.$(SHLIBEXT) \ + $(B)/baseq3/ui.$(SHLIBEXT) \ + $(B)/missionpack/cgame.$(SHLIBEXT) \ + $(B)/missionpack/qagame.$(SHLIBEXT) \ + $(B)/missionpack/ui.$(SHLIBEXT) - endif - ++endif ++ else # ifeq freebsd -@@ -283,7 +286,7 @@ SHLIBLDFLAGS=-shared - ARFLAGS=ar rv - RANLIB=ranlib - --LDFLAGS=-ldl -lm -+LDFLAGS=-lm - GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm - - TARGETS=$(B)/sgiquake3 \ -@@ -310,9 +313,9 @@ ARFLAGS=ar rv - RANLIB=ranlib - ifeq ($(PLATFORM),freebsd) --LDFLAGS=-lm -+LDFLAGS+=-lm - else --LDFLAGS=-ldl -lm -+LDFLAGS=-lm - endif # ifeq freebsd - - TARGETS=\ -@@ -348,7 +351,7 @@ build_release: - $(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)" - - #Build both debug and release builds --all:build_debug build_release -+all:build_release - - targets:makedirs $(TARGETS) - -@@ -516,20 +519,6 @@ Q3OBJ = \ + ############################################################################# +@@ -515,20 +529,6 @@ Q3OBJ = \ + $(B)/client/unix_main.o \ $(B)/client/unix_net.o \ $(B)/client/unix_shared.o \ - \ +- \ - $(B)/client/ahoptim.o \ - $(B)/client/autohint.o \ - $(B)/client/ftbase.o \ - $(B)/client/ftdebug.o \ - $(B)/client/ftglyph.o \ - $(B)/client/ftinit.o \ - $(B)/client/ftmm.o \ - $(B)/client/ftsystem.o \ - $(B)/client/raster1.o \ - $(B)/client/sfnt.o \ - $(B)/client/sfobjs.o \ - $(B)/client/smooth.o \ - $(B)/client/truetype.o --# \ + # \ # $(B)/client/q_parse.o \ # $(B)/client/math_quaternion.o \ - # $(B)/client/util_str.o \ -@@ -541,10 +530,12 @@ Q3OBJ = \ +@@ -541,12 +541,14 @@ Q3OBJ = \ # $(B)/client/q_shared.o \ ifeq ($(ARCH),i386) - Q3OBJ += $(B)/client/vm_x86.o + ifeq ($(DLL_ONLY),false) + Q3OBJ += $(B)/client/vm_x86.o + endif endif -- ifeq ($(ARCH),ppc) -+ ifeq ($(ARCH),powerpc) + ifeq ($(ARCH),ppc) ifeq ($(DLL_ONLY),false) - Q3OBJ += $(B)/client/vm_ppc.o +- Q3OBJ += $(B)/client/vm_ppc.o ++ Q3OBJ += $(B)/client/vm_ppc_new.o endif -@@ -559,10 +550,24 @@ ifeq ($(PLATFORM),freebsd) + endif + +@@ -559,10 +561,24 @@ ifeq ($(PLATFORM),freebsd) $(B)/client/linux_qgl.o \ $(B)/client/linux_glimp.o \ $(B)/client/linux_snd.o \ + $(B)/client/linux_signals.o \ $(B)/client/snd_mixa.o \ - $(B)/client/matha.o \ - $(B)/client/ftol.o \ - $(B)/client/snapvector.o + $(B)/client/matha.o + + Q3POBJ_SMP=\ + $(B)/client/linux_common.o \ + $(B)/client/linux_qgl.o \ + $(B)/client/linux_glimp_smp.o \ + $(B)/client/linux_snd.o \ + $(B)/client/linux_signals.o \ + $(B)/client/snd_mixa.o \ + $(B)/client/matha.o + + ifeq ($(ARCH),i386) + Q3POBJ += $(B)/client/ftol.o $(B)/client/snapvector.o + Q3POBJ_SMP += $(B)/client/ftol.o $(B)/client/snapvector.o + endif + else ifeq ($(PLATFORM),irix) Q3POBJ=\ -@@ -578,7 +583,6 @@ else - $(B)/client/linux_common.o \ - $(B)/client/linux_qgl.o \ - $(B)/client/linux_glimp.o \ -- $(B)/client/linux_joystick.o \ - $(B)/client/linux_snd.o \ - $(B)/client/snd_mixa.o \ - $(B)/client/matha.o \ -@@ -587,7 +591,6 @@ else - $(B)/client/linux_common.o \ - $(B)/client/linux_qgl.o \ - $(B)/client/linux_glimp_smp.o \ -- $(B)/client/linux_joystick.o \ - $(B)/client/linux_snd.o \ - $(B)/client/snd_mixa.o \ - $(B)/client/matha.o -@@ -602,12 +605,12 @@ endif #Linux +@@ -602,12 +618,12 @@ endif #IRIX endif #FreeBSD endif #IRIX -$(B)/$(PLATFORM)quake3 : $(Q3OBJ) $(Q3POBJ) +$(B)/quake3 : $(Q3OBJ) $(Q3POBJ) $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) # TTimo: splines code requires C++ linking, but splines have not been officially included in the codebase # $(CXX) -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) -$(B)/$(PLATFORM)quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) +$(B)/quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP) $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \ $(THREAD_LDFLAGS) $(LDFLAGS) -@@ -754,10 +757,10 @@ $(B)/client/irix_input.o : $(UDIR)/irix_input.c; $(DO_ - $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC) - $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS) - $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS) --$(B)/client/linux_joystick.o : $(UDIR)/linux_joystick.c; $(DO_CC) +@@ -758,6 +774,7 @@ $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) +$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC) $(GL_CFLAGS) $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS) $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS) -@@ -767,7 +770,7 @@ $(B)/client/snapvector.o : $(UDIR)/snapvector.nasm; $( - $(B)/client/vm_x86.o : $(CMDIR)/vm_x86.c; $(DO_CC) - endif +@@ -769,7 +786,7 @@ ifeq ($(DLL_ONLY),false) --ifeq ($(ARCH),ppc) -+ifeq ($(ARCH),powerpc) + ifeq ($(ARCH),ppc) ifeq ($(DLL_ONLY),false) - $(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) +-$(B)/client/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) ++$(B)/client/vm_ppc_new.o : $(CMDIR)/vm_ppc_new.c; $(DO_CC) + endif endif -@@ -912,22 +915,26 @@ Q3DOBJ = \ + +@@ -912,22 +929,26 @@ Q3DOBJ = \ $(B)/ded/unix_main.o \ $(B)/ded/unix_net.o \ $(B)/ded/unix_shared.o \ + $(B)/ded/linux_signals.o \ \ $(B)/ded/null_client.o \ $(B)/ded/null_input.o \ $(B)/ded/null_snddma.o ifeq ($(ARCH),i386) - Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o + Q3DOBJ += $(B)/ded/ftol.o $(B)/ded/snapvector.o + ifeq ($(DLL_ONLY),false) + Q3DOBJ += $(B)/ded/vm_x86.o + endif endif --ifeq ($(ARCH),ppc) -+ifeq ($(ARCH),powerpc) + ifeq ($(ARCH),ppc) ifeq ($(DLL_ONLY),false) - Q3DOBJ += $(B)/ded/vm_ppc.o +- Q3DOBJ += $(B)/ded/vm_ppc.o ++ Q3DOBJ += $(B)/ded/vm_ppc_new.o endif endif -$(B)/$(PLATFORM)q3ded : $(Q3DOBJ) +$(B)/q3ded : $(Q3DOBJ) $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) -@@ -988,6 +995,7 @@ $(B)/ded/linux_common.o : $(UDIR)/linux_common.c; $(DO +@@ -988,6 +1009,7 @@ $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_D $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC) $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC) $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC) +$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC) $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC) $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC) $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC) -@@ -1001,7 +1009,7 @@ $(B)/ded/ftol.o : $(UDIR)/ftol.nasm; $(DO_NASM) - $(B)/ded/snapvector.o : $(UDIR)/snapvector.nasm; $(DO_NASM) - endif +@@ -1003,7 +1025,7 @@ ifeq ($(DLL_ONLY),false) --ifeq ($(ARCH),ppc) -+ifeq ($(ARCH),powerpc) + ifeq ($(ARCH),ppc) ifeq ($(DLL_ONLY),false) - $(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC) +-$(B)/ded/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_DED_CC) ++$(B)/ded/vm_ppc_new.o : $(CMDIR)/vm_ppc_new.c; $(DO_DED_CC) + endif endif -@@ -1068,7 +1076,7 @@ Q3CGOBJ = \ + +@@ -1068,7 +1090,7 @@ Q3CGOBJ = \ $(B)/baseq3/cgame/q_math.o \ $(B)/baseq3/cgame/q_shared.o -$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ) +$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ) $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -@@ -1128,7 +1136,7 @@ MPCGOBJ = \ +@@ -1128,7 +1150,7 @@ MPCGOBJ = \ $(B)/missionpack/cgame/q_shared.o \ $(B)/missionpack/cgame/ui_shared.o -$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ) +$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ) $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1200,7 +1208,7 @@ Q3GOBJ = \ +@@ -1200,7 +1222,7 @@ Q3GOBJ = \ $(B)/baseq3/game/q_math.o \ $(B)/baseq3/game/q_shared.o -$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ) +$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ) $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -@@ -1278,7 +1286,7 @@ MPGOBJ = \ +@@ -1278,7 +1300,7 @@ MPGOBJ = \ $(B)/missionpack/game/q_math.o \ $(B)/missionpack/game/q_shared.o -$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ) +$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ) $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1367,7 +1375,7 @@ Q3UIOBJ = \ +@@ -1367,7 +1389,7 @@ Q3UIOBJ = \ $(B)/baseq3/ui/q_math.o \ $(B)/baseq3/ui/q_shared.o -$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ) +$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ) $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -@@ -1410,7 +1418,7 @@ $(B)/baseq3/ui/ui_spskill.o : $(Q3UIDIR)/ui_spskill.c; +@@ -1410,7 +1432,7 @@ $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamord $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC) $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC) $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC) -$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) +$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC) # bk001205 - these wre the only SHLIB compiles in 1.17 -@@ -1450,7 +1458,7 @@ MPUIOBJ = \ +@@ -1450,7 +1472,7 @@ MPUIOBJ = \ # $(B)/missionpack/ui/q_math.o \ # $(B)/missionpack/ui/q_shared.o -$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ) +$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ) $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK -@@ -1613,23 +1621,8 @@ Q3SOBJ = \ +@@ -1613,34 +1635,21 @@ Q3SOBJ = \ $(B)/q3static/unix_net.o \ $(B)/q3static/unix_shared.o \ \ - $(B)/q3static/ahoptim.o \ - $(B)/q3static/autohint.o \ - $(B)/q3static/ftbase.o \ - $(B)/q3static/ftdebug.o \ - $(B)/q3static/ftglyph.o \ - $(B)/q3static/ftinit.o \ - $(B)/q3static/ftmm.o \ - $(B)/q3static/ftsystem.o \ - $(B)/q3static/raster1.o \ - $(B)/q3static/sfnt.o \ - $(B)/q3static/sfobjs.o \ - $(B)/q3static/smooth.o \ - $(B)/q3static/truetype.o \ - \ $(B)/q3static/linux_qgl.o \ $(B)/q3static/linux_glimp.o \ - $(B)/q3static/linux_joystick.o \ $(B)/q3static/linux_snd.o \ $(B)/q3static/snd_mixa.o \ $(B)/q3static/matha.o -@@ -1779,7 +1772,6 @@ $(B)/q3static/unix_main.o : $(UDIR)/unix_main.c; $(DO_ - $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC - $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC - $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC --$(B)/q3static/linux_joystick.o : $(UDIR)/linux_joystick.c; $(DO_CC) -DQ3_STATIC - $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC - $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC - $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC -@@ -2020,7 +2012,7 @@ $(B)/q3static/bg_slidemove.o : $(GDIR)/bg_slidemove.c; + + ifeq ($(ARCH),i386) +- Q3SOBJ += $(B)/q3static/vm_x86.o ++ ifeq ($(DLL_ONLY),false) ++ Q3SOBJ += $(B)/q3static/vm_x86.o ++ endif + endif + + ifeq ($(ARCH),ppc) + ifeq ($(DLL_ONLY),false) +- Q3SOBJ += $(B)/q3static/vm_ppc.o ++ Q3SOBJ += $(B)/q3static/vm_ppc_new.o + endif + endif + +@@ -1795,7 +1804,7 @@ ifeq ($(DLL_ONLY),false) + + ifeq ($(ARCH),ppc) + ifeq ($(DLL_ONLY),false) +-$(B)/q3static/vm_ppc.o : $(CMDIR)/vm_ppc.c; $(DO_CC) -DQ3_STATIC ++$(B)/q3static/vm_ppc_new.o : $(CMDIR)/vm_ppc_new.c; $(DO_CC) -DQ3_STATIC + endif + endif + +@@ -2020,7 +2029,7 @@ $(B)/q3static/bg_slidemove.o : $(GDIR)/bg_slidemove.c; -$(B)/$(PLATFORM)q3static : $(Q3SOBJ) +$(B)/q3static : $(Q3SOBJ) $(CC) $(CFLAGS) -o $@ $(Q3SOBJ) $(GLLDFLAGS) $(LDFLAGS) -@@ -2059,9 +2051,9 @@ rpm: $(BUILD_NAME).spec - - copyfiles: - -mkdirhier $(COPYDIR) -- cp $(BR)/linuxquake3 $(COPYDIR)/quake3.x86 -- strip $(COPYDIR)/quake3.x86 -- chmod 755 $(COPYDIR)/quake3.x86 -+ cp $(BR)/linuxquake3 $(COPYDIR)/quake3 -+ strip $(COPYDIR)/quake3 -+ chmod 755 $(COPYDIR)/quake3 - cp $(BR)/linuxq3ded $(COPYDIR)/q3ded - strip $(COPYDIR)/q3ded - chmod 755 $(COPYDIR)/q3ded diff --git a/games/tremulous/Makefile b/games/tremulous/Makefile index 81d32209df19..e1e3af31fff0 100644 --- a/games/tremulous/Makefile +++ b/games/tremulous/Makefile @@ -1,146 +1,146 @@ PORTNAME= tremulous PORTVERSION= 1.1.0 -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION:R} MAINTAINER= ports@FreeBSD.org COMMENT= Free FPS game featuring two opposing teams: humans and aliens WWW= http://www.tremulous.net/ LICENSE= GPLv2 USES= cpe gmake zip -MAKE_ENV= DEFAULT_BASEDIR="${DATADIR}" PTHREAD_LIBS="-lpthread" +MAKE_ENV= DEFAULT_BASEDIR="${DATADIR}" WRKSRC= ${WRKDIR}/${PORTNAME} BUILD_WRKSRC= ${WRKSRC}/${DISTNAME}-src VM_ARCHS= amd64 i386 OPTIONS_DEFINE= GAMELIBS OPENAL OPENAL_DLOPEN OPTIMIZED_CFLAGS \ SDL_AUDIO SDL_VIDEO VORBIS OPTIONS_MULTI= FLAVOR OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED SMP_CLIENT MASTER_SERVER OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS SMP_CLIENT FLAVOR_DESC= Clients and servers CLIENT_DESC= Build client GAMELIBS_DESC= Force building game libraries DEDICATED_DESC= Build dedicated server MASTER_SERVER_DESC= Build master server OPENAL_DLOPEN_DESC= Enable dinamic loading of OpenAL SDL_AUDIO_DESC= Use SDL for audio SDL_VIDEO_DESC= Use SDL for video SMP_CLIENT_DESC= Build SMP (threaded) client .include .for arch in ${ARCH} . if ${VM_ARCHS:M${arch}} HAVE_VM_COMPILED= yes . endif .endfor .if defined(HAVE_VM_COMPILED) MAKE_ENV+= HAVE_VM_COMPILED=true .endif .if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT} # OpenAL . if ${PORT_OPTIONS:MOPENAL} USES+= openal:al MAKE_ENV+= USE_OPENAL=1 . if ${PORT_OPTIONS:MOPENAL_DLOPEN} MAKE_ENV+= USE_OPENAL_DLOPEN=1 . endif . endif # SDL . if ${PORT_OPTIONS:MSDL_AUDIO} USES+= sdl USE_SDL= sdl MAKE_ENV+= USE_SDL_AUDIO=1 . endif . if ${PORT_OPTIONS:MSDL_VIDEO} USES+= sdl USE_SDL= sdl MAKE_ENV+= USE_SDL_VIDEO=1 . else USES+= gl xorg USE_GL= gl USE_XORG= x11 xxf86dga xxf86vm . endif # Vorbis . if ${PORT_OPTIONS:MVORBIS} LIB_DEPENDS+= libvorbis.so:audio/libvorbis MAKE_ENV+= USE_CODEC_VORBIS=1 . endif .endif .if ${PORT_OPTIONS:MCLIENT} MAKE_ENV+= BUILD_CLIENT=1 PLIST_SUB+= CLIENT="" TRBIN+= tremulous .else PLIST_SUB+= CLIENT="@comment " .endif .if ${PORT_OPTIONS:MDEDICATED} MAKE_ENV+= BUILD_SERVER=1 PLIST_SUB+= DEDICATED="" TRBIN+= tremded .else PLIST_SUB+= DEDICATED="@comment " .endif .if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) MAKE_ENV+= BUILD_GAME_SO=1 PLIST_SUB+= GAMELIBS="" .else PLIST_SUB+= GAMELIBS="@comment " .endif .if ${PORT_OPTIONS:MMASTER_SERVER} LIB_DEPENDS+= libtdb.so:databases/tdb MAKE_ENV+= BUILD_MASTER_SERVER=1 PLIST_SUB+= MASTER_SERVER="" .else PLIST_SUB+= MASTER_SERVER="@comment " .endif .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} MAKE_ENV+= USE_OPTIMIZED_CFLAGS=1 .endif .if ${PORT_OPTIONS:MSMP_CLIENT} MAKE_ENV+= BUILD_CLIENT_SMP=1 PLIST_SUB+= SMP="" TRBIN+= tremulous-smp .else PLIST_SUB+= SMP="@comment " .endif post-extract: @cd ${WRKSRC} && ${TAR} zxf ${DISTNAME}-src.tar.gz post-patch: @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \ ${BUILD_WRKSRC}/src/botlib/be_interface.c @${REINPLACE_CMD} -e '/callMask = 0/s|^static||' \ ${BUILD_WRKSRC}/src/qcommon/vm_x86.c do-install: .for bin in ${TRBIN} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/build/release/${bin} \ ${STAGEDIR}${PREFIX}/bin .endfor .if ${PORT_OPTIONS:MMASTER_SERVER} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/src/master/release/tremmaster \ ${STAGEDIR}${PREFIX}/bin .endif @${MKDIR} ${STAGEDIR}${DATADIR}/base ${INSTALL_DATA} ${WRKSRC}/base/* ${STAGEDIR}${DATADIR}/base ${INSTALL_DATA} ${WRKSRC}/tremulous.xpm \ ${STAGEDIR}${PREFIX}/share/pixmaps .include diff --git a/games/tremulous/files/patch-Makefile b/games/tremulous/files/patch-Makefile index cfc579c8de14..2a84db09d8d2 100644 --- a/games/tremulous/files/patch-Makefile +++ b/games/tremulous/files/patch-Makefile @@ -1,359 +1,345 @@ ---- ./tremulous-1.1.0-src/Makefile.orig Tue Mar 21 19:28:25 2006 -+++ ./tremulous-1.1.0-src/Makefile Wed Jun 7 16:57:12 2006 -@@ -27,11 +27,20 @@ +--- tremulous-1.1.0-src/Makefile.orig 2006-03-21 22:28:25 UTC ++++ tremulous-1.1.0-src/Makefile +@@ -18,7 +18,7 @@ else + # Apple does some things a little differently... + COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/x86/) + else +- COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/x86/) ++ COMPILE_ARCH=$(shell uname -m | sed -e s/amd64/x86_64/ -e s/i.86/x86/ -e s/powerpc/ppc/) + endif + + ifeq ($(COMPILE_PLATFORM),mingw32) +@@ -27,11 +27,20 @@ endif endif endif -BUILD_CLIENT = -BUILD_CLIENT_SMP = -BUILD_SERVER = -BUILD_GAME_SO = -BUILD_GAME_QVM = +BUILD_CLIENT?=0 +BUILD_CLIENT_SMP?=0 +BUILD_GAME_QVM?=0 +BUILD_GAME_SO?=0 +BUILD_MASTER_SERVER?=0 +BUILD_SERVER?=0 +HAVE_VM_COMPILED?=false +USE_CODEC_VORBIS?=0 +USE_LOCAL_HEADERS?=0 +USE_OPENAL?=0 +USE_OPENAL_DLOPEN?=0 +USE_OPTIMIZED_CFLAGS?=0 +USE_SDL_AUDIO?=0 +USE_SDL_VIDEO?=0 ############################################################################# # -@@ -89,34 +98,10 @@ +@@ -51,10 +60,6 @@ endif + ifndef ARCH + ARCH=$(COMPILE_ARCH) + endif +- +-ifeq ($(ARCH),powerpc) +- ARCH=ppc +-endif + export ARCH + + ifneq ($(PLATFORM),$(COMPILE_PLATFORM)) +@@ -89,34 +94,10 @@ export USE_CCACHE endif export USE_CCACHE -ifndef USE_SDL -USE_SDL=1 -endif - -ifndef USE_OPENAL -USE_OPENAL=1 -endif - -ifndef USE_OPENAL_DLOPEN -USE_OPENAL_DLOPEN=0 -endif - -ifndef USE_CODEC_VORBIS -USE_CODEC_VORBIS=0 -endif - -ifndef USE_LOCAL_HEADERS -USE_LOCAL_HEADERS=1 -endif - -ifndef BUILD_MASTER_SERVER -BUILD_MASTER_SERVER=0 -endif - ############################################################################# BD=$(BUILD_DIR)/debug-$(PLATFORM)-$(ARCH) -BR=$(BUILD_DIR)/release-$(PLATFORM)-$(ARCH) +BR=$(BUILD_DIR)/release CDIR=$(MOUNT_DIR)/client SDIR=$(MOUNT_DIR)/server RDIR=$(MOUNT_DIR)/renderer -@@ -202,15 +187,13 @@ +@@ -202,15 +183,13 @@ ifeq ($(PLATFORM),linux) ifeq ($(ARCH),x86_64) OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -funroll-loops \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -fstrength-reduce + -falign-functions=2 -fstrength-reduce # experimental x86_64 jit compiler! you need GNU as HAVE_VM_COMPILED = true else ifeq ($(ARCH),x86) OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \ - -funroll-loops -falign-loops=2 -falign-jumps=2 \ - -falign-functions=2 -fstrength-reduce + -funroll-loops -falign-functions=2 -fstrength-reduce HAVE_VM_COMPILED=true else ifeq ($(ARCH),ppc) -@@ -293,7 +276,7 @@ +@@ -293,7 +272,7 @@ ifeq ($(PLATFORM),darwin) GL_CFLAGS = endif - OPTIMIZE = -O3 -ffast-math -falign-loops=16 + OPTIMIZE = -O3 -ffast-math ifeq ($(ARCH),ppc) BASE_CFLAGS += -faltivec -@@ -375,8 +358,8 @@ +@@ -375,8 +354,8 @@ ifeq ($(PLATFORM),mingw32) GL_CFLAGS = MINGW_CFLAGS = -DDONT_TYPEDEF_INT32 - OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math -falign-loops=2 \ - -funroll-loops -falign-jumps=2 -falign-functions=2 -fstrength-reduce + OPTIMIZE = -O3 -march=i586 -fomit-frame-pointer -ffast-math \ + -funroll-loops -falign-functions=2 -fstrength-reduce DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0 -@@ -412,18 +395,12 @@ +@@ -412,18 +391,12 @@ ifeq ($(PLATFORM),freebsd) ifeq ($(PLATFORM),freebsd) - ifneq (,$(findstring alpha,$(shell uname -m))) - ARCH=axp - else #default to x86 - ARCH=x86 - endif #alpha test -- -- -- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes + BASE_CFLAGS = -I$(LOCALBASE)/include -DARCH='\"$(ARCH)\"' -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -- GL_CFLAGS = -I/usr/X11R6/include + GL_CFLAGS = -I$(LOCALBASE)/include +- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes +- +- GL_CFLAGS = -I/usr/X11R6/include +- DEBUG_CFLAGS=$(BASE_CFLAGS) -g + RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -pipe ifeq ($(USE_OPENAL),1) BASE_CFLAGS += -DUSE_OPENAL=1 -@@ -436,46 +413,61 @@ +@@ -436,46 +409,61 @@ ifeq ($(PLATFORM),freebsd) BASE_CFLAGS += -DUSE_CODEC_VORBIS=1 endif - ifeq ($(USE_SDL),1) - BASE_CFLAGS += $(shell sdl11-config --cflags) -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 + ifeq ($(USE_SDL_AUDIO),1) + BASE_CFLAGS += $(shell $(SDL_CONFIG) --cflags) + else + ifeq ($(USE_SDL_VIDEO),1) + BASE_CFLAGS += $(shell $(SDL_CONFIG) --cflags) + endif endif - ifeq ($(ARCH),axp) - CC=gcc - BASE_CFLAGS += -DNO_VM_COMPILED - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations - else - ifeq ($(ARCH),x86) - CC=gcc - RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \ - -march=pentium -fomit-frame-pointer -pipe -ffast-math \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -funroll-loops -fstrength-reduce - else - BASE_CFLAGS += -DNO_VM_COMPILED + ifeq ($(USE_SDL_AUDIO),1) + BASE_CFLAGS += -DUSE_SDL_SOUND=1 endif + + ifeq ($(USE_SDL_VIDEO),1) + BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -+ endif -+ + endif + + ifeq ($(USE_OPTIMIZED_CFLAGS),1) + RELEASE_CFLAGS+=-O3 -ffast-math -funroll-loops -fomit-frame-pointer \ + -fexpensive-optimizations -+ ifeq ($(ARCH),i386) ++ ifeq ($(ARCH),x86) + RELEASE_CFLAGS+=-falign-functions=2 -fstrength-reduce + endif + endif + + HAVE_VM_COMPILED?=false + ifneq ($(HAVE_VM_COMPILED),true) + BASE_CFLAGS += -DNO_VM_COMPILED - endif - ++ endif ++ SHLIBEXT=so SHLIBCFLAGS=-fPIC SHLIBLDFLAGS=-shared $(LDFLAGS) -- THREAD_LDFLAGS=-lpthread -+ THREAD_LDFLAGS=$(PTHREAD_LIBS) + THREAD_LDFLAGS=-lpthread # don't need -ldl (FreeBSD) - LDFLAGS=-lm + LDFLAGS+=-lm - CLIENT_LDFLAGS = + CLIENT_LDFLAGS = -L$(LOCALBASE)/lib - ifeq ($(USE_SDL),1) - CLIENT_LDFLAGS += $(shell sdl11-config --libs) + ifeq ($(USE_SDL_AUDIO),1) + CLIENT_LDFLAGS += $(shell $(SDL_CONFIG) --libs) else - CLIENT_LDFLAGS += -L/usr/X11R6/$(LIB) -lGL -lX11 -lXext -lXxf86dga -lXxf86vm + ifeq ($(USE_SDL_VIDEO),1) + CLIENT_LDFLAGS += $(shell $(SDL_CONFIG) --libs) + endif -+ endif -+ -+ ifneq ($(USE_SDL_VIDEO),1) -+ CLIENT_LDFLAGS += -L$(LOCALBASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm endif ++ ifneq ($(USE_SDL_VIDEO),1) ++ CLIENT_LDFLAGS += -L$(LOCALBASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm ++ endif ++ ifeq ($(USE_OPENAL),1) + CLIENT_LDFLAGS += $(THREAD_LDFLAGS) ifneq ($(USE_OPENAL_DLOPEN),1) - CLIENT_LDFLAGS += $(THREAD_LDFLAGS) -lopenal + CLIENT_LDFLAGS += -lopenal endif endif -@@ -574,16 +566,15 @@ +@@ -574,16 +562,15 @@ ifeq ($(PLATFORM),SunOS) OPTIMIZE = -O3 -ffast-math -funroll-loops ifeq ($(ARCH),sparc) - OPTIMIZE = -O3 -ffast-math -falign-loops=2 \ - -falign-jumps=2 -falign-functions=2 -fstrength-reduce \ + OPTIMIZE = -O3 -ffast-math \ + -falign-functions=2 -fstrength-reduce \ -mtune=ultrasparc -mv8plus -mno-faster-structs \ -funroll-loops BASE_CFLAGS += -DNO_VM_COMPILED else ifeq ($(ARCH),x86) OPTIMIZE = -O3 -march=i586 -ffast-math \ - -falign-loops=2 -falign-jumps=2 -falign-functions=2 \ - -funroll-loops -fstrength-reduce + -falign-functions=2 -funroll-loops -fstrength-reduce endif endif -@@ -637,21 +628,22 @@ +@@ -637,21 +624,22 @@ ifneq ($(BUILD_SERVER),0) TARGETS = ifneq ($(BUILD_SERVER),0) - TARGETS += $(B)/tremded.$(ARCH)$(BINEXT) + TARGETS += $(B)/tremded$(BINEXT) endif ifneq ($(BUILD_CLIENT),0) - TARGETS += $(B)/tremulous.$(ARCH)$(BINEXT) - ifneq ($(BUILD_CLIENT_SMP),0) - TARGETS += $(B)/tremulous.$(ARCH)$(BINEXT) - endif + TARGETS += $(B)/tremulous$(BINEXT) -+endif -+ -+ifneq ($(BUILD_CLIENT_SMP),0) -+ TARGETS += $(B)/tremulous-smp$(BINEXT) endif ++ifneq ($(BUILD_CLIENT_SMP),0) ++ TARGETS += $(B)/tremulous-smp$(BINEXT) ++endif ++ ifneq ($(BUILD_GAME_SO),0) TARGETS += \ - $(B)/base/cgame$(ARCH).$(SHLIBEXT) \ - $(B)/base/game$(ARCH).$(SHLIBEXT) \ - $(B)/base/ui$(ARCH).$(SHLIBEXT) + $(B)/base/cgame.$(SHLIBEXT) \ + $(B)/base/game.$(SHLIBEXT) \ + $(B)/base/ui.$(SHLIBEXT) endif ifneq ($(BUILD_GAME_QVM),0) -@@ -709,14 +701,14 @@ +@@ -709,14 +697,14 @@ build_release: B=$(BR) endif build_release: B=$(BR) -build_release: makedirs tools +build_release: makedirs $(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS) $(DEPEND_CFLAGS)" ifeq ($(BUILD_MASTER_SERVER),1) $(MAKE) -C $(MASTERDIR) release endif #Build both debug and release builds -all:build_debug build_release +all:build_release targets: $(TARGETS) -@@ -901,7 +893,7 @@ - $(B)/client/tr_surface.o \ - $(B)/client/tr_world.o \ - --ifeq ($(ARCH),x86) -+ifeq ($(ARCH),i386) - Q3OBJ += $(B)/client/vm_x86.o - Q3OBJ += \ - $(B)/client/snd_mixa.o \ -@@ -910,7 +902,7 @@ - $(B)/client/snapvectora.o - endif - --ifeq ($(ARCH),x86_64) -+ifeq ($(ARCH),amd64) - Q3OBJ += $(B)/client/vm_x86_64.o - endif - -@@ -962,10 +954,10 @@ +@@ -962,10 +950,10 @@ endif $(B)/client/sdl_glimp_smp.o endif -$(B)/tremulous.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN) +$(B)/tremulous$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN) $(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN) -$(B)/tremulous-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN) +$(B)/tremulous-smp$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN) $(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \ $(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN) -@@ -1238,12 +1230,12 @@ - $(B)/ded/null_input.o \ - $(B)/ded/null_snddma.o - --ifeq ($(ARCH),x86) -+ifeq ($(ARCH),i386) - Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftola.o \ - $(B)/ded/snapvectora.o $(B)/ded/matha.o - endif - --ifeq ($(ARCH),x86_64) -+ifeq ($(ARCH),amd64) - Q3DOBJ += $(B)/ded/vm_x86_64.o - endif - -@@ -1253,7 +1245,7 @@ +@@ -1253,7 +1241,7 @@ endif endif endif -$(B)/tremded.$(ARCH)$(BINEXT): $(Q3DOBJ) +$(B)/tremded$(BINEXT): $(Q3DOBJ) $(CC) -o $@ $(Q3DOBJ) $(LDFLAGS) $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) -@@ -1374,7 +1366,7 @@ +@@ -1374,7 +1362,7 @@ CGVMOBJ = $(CGOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.as CGOBJ = $(CGOBJ_) $(B)/base/cgame/cg_syscalls.o CGVMOBJ = $(CGOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.asm -$(B)/base/cgame$(ARCH).$(SHLIBEXT) : $(CGOBJ) +$(B)/base/cgame.$(SHLIBEXT) : $(CGOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(CGOBJ) $(B)/base/vm/cgame.qvm: $(CGVMOBJ) $(CGDIR)/cg_syscalls.asm -@@ -1418,7 +1410,7 @@ +@@ -1418,7 +1406,7 @@ GVMOBJ = $(GOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.asm GOBJ = $(GOBJ_) $(B)/base/game/g_syscalls.o GVMOBJ = $(GOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.asm -$(B)/base/game$(ARCH).$(SHLIBEXT) : $(GOBJ) +$(B)/base/game.$(SHLIBEXT) : $(GOBJ) $(CC) $(SHLIBLDFLAGS) -o $@ $(GOBJ) $(B)/base/vm/game.qvm: $(GVMOBJ) $(GDIR)/g_syscalls.asm -@@ -1444,7 +1436,7 @@ +@@ -1444,7 +1432,7 @@ UIVMOBJ = $(UIOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.as UIOBJ = $(UIOBJ_) $(B)/base/ui/ui_syscalls.o UIVMOBJ = $(UIOBJ_:%.o=%.asm) $(B)/base/game/bg_lib.asm -$(B)/base/ui$(ARCH).$(SHLIBEXT) : $(UIOBJ) +$(B)/base/ui.$(SHLIBEXT) : $(UIOBJ) $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(UIOBJ) $(B)/base/vm/ui.qvm: $(UIVMOBJ) $(UIDIR)/ui_syscalls.asm diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile index e4ba7d887ebf..9ced7c1cccbc 100644 --- a/lang/ocaml/Makefile +++ b/lang/ocaml/Makefile @@ -1,129 +1,123 @@ # for committer: bump PORTREVISION for math/facile whenever ocaml gets updated PORTNAME= ocaml PORTVERSION= 4.08.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang MASTER_SITES= http://caml.inria.fr/pub/distrib/${DISTNAME:R}/ GENTOO \ http://caml.inria.fr/pub/distrib/${DISTNAME:R}/:docs DISTFILES= ${DISTNAME}${EXTRACT_SUFX} EXTRACT_ONLY= ${_DISTFILES:M*.tar.*} PKGNAMESUFFIX= ${SFX} MAINTAINER= michipili@gmail.com COMMENT= Objective Caml compiler and programming environment WWW= https://ocaml.org/ LICENSE= QPL10 LGPL20 LICENSE_COMB= multi LICENSE_NAME_QPL10= Q Public License, Version 1.0 LICENSE_FILE_QPL10= ${WRKSRC}/LICENSE LICENSE_PERMS_QPL10= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BROKEN_riscv64= fails to build: hasgot.c:3:12: use of undeclared identifier 'secure_getenv' BROKEN_mips64= No ASM support BROKEN_mips= No ASM support BUILD_DEPENDS= as:devel/binutils RUN_DEPENDS= as:devel/binutils USES= cpe compiler:c11 gmake shebangfix tar:xz USE_LDCONFIG= yes CPE_VENDOR= inria GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX=${PREFIX}/share ALL_TARGET= world.opt STRIP= PIE_UNSAFE= yes SSP_UNSAFE= yes LDFLAGS_armv6= -Wl,-znotext LDFLAGS_armv7= -Wl,-znotext LDFLAGS_i386= -Wl,-znotext SHEBANG_LANG= awk awk_OLD_CMD= /bin/awk awk_CMD= /usr/bin/awk SHEBANG_FILES= tools/ocaml-instr-graph tools/ocaml-instr-report CONFIGURE_ARGS= --prefix="${PREFIX}" CONFIGURE_ENV= LDFLAGS="${LDFLAGS}" \ ASPP="${CC} -c" \ PARTIALLD="${LD} -r" -MAKE_ENV= SYSTEM_ARCH="${ARCH:C/aarch64/arm64/:C/powerpc.*/power/}" OPTIONS_DEFINE= X11 THREADS DOCS EXAMPLES OPTIONS_DEFAULT=X11 THREADS OPTIONS_SUB= yes THREADS_CONFIGURE_ENABLE= systhreads X11_USES= xorg X11_CONFLICTS= ocaml-nox11 X11_CONFLICTS_OFF= ocaml X11_USE= XORG=x11 X11_CONFIGURE_WITH= x X11_CONFIGURE_ON= --x-includes="${LOCALBASE}/include" \ --x-libraries="${LOCALBASE}/lib" CONFLICTS= metaocaml PORTDOCS= htmlman ${DISTNAME:R}-refman.pdf DOCS_DISTFILES= ${DISTNAME:R}-refman-html.tar.gz:docs \ ${DISTNAME:R}-refman.pdf:docs .include .if ${ARCH} == aarch64 PLIST_SUB+= RAWSPACETIMELIB=" " .else PLIST_SUB+= RAWSPACETIMELIB="@comment " .endif .if ${ARCH} == armv6 || ${ARCH} == armv7 CONFIGURE_ENV+= AS="${AS} ${ASFLAGS} -meabi=5" \ CC="${CC}" .elif ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le CONFIGURE_ENV+= CC="${CC} -fuse-ld=bfd" .else CONFIGURE_ENV+= AS="${AS} ${ASFLAGS}" \ CC="${CC}" .endif -.if defined(NO_PROFILE) || ${ARCH:Mpowerpc} || ${ARCH:Mamd64} +.if defined(NO_PROFILE) PLIST_SUB+= PROF="@comment " .else PLIST_SUB+= PROF="" .endif post-patch: @${REINPLACE_CMD} \ -e '\|MKLIB=|s|ar rc|${AR} rc|' \ -e '\|RANLIB|s|ranlib|${RANLIB}|' \ -e '\|^ldflags=|s|""|"${LDFLAGS}"|' \ ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's,$$(ARCH),$$(SYSTEM_ARCH),' \ - ${WRKSRC}/Makefile ${WRKSRC}/Makefile.tools \ - ${WRKSRC}/runtime/Makefile \ - ${WRKSRC}/ocamltest/Makefile \ - ${WRKSRC}/otherlibs/systhreads/Makefile check-test: do-install @cd ${WRKSRC}/testsuite; ${RM} _log; for d in tests/* ; do \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one DIR=$${d} \ - 2>&1 | tee -a _log || ${TRUE} ; done ; \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} one \ + DIR=$${d} 2>&1 | tee -a _log || ${TRUE} ; done ; \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} report post-install: .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${STAGEDIR}${DOCSDIR}) ${INSTALL_DATA} ${_DISTDIR}${DISTNAME:R}-refman.pdf ${STAGEDIR}${DOCSDIR} .endif # Spacetime profiling is only available for native code on 64-bit targets .if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc @${REINPLACE_CMD} -e '/raw_spacetime_lib/d' ${TMPPLIST} .endif .include diff --git a/lang/ocaml/files/patch-configure b/lang/ocaml/files/patch-configure index 2cf280415341..c3e62de2bf07 100644 --- a/lang/ocaml/files/patch-configure +++ b/lang/ocaml/files/patch-configure @@ -1,100 +1,116 @@ --- configure.orig 2019-08-05 17:32:44 UTC +++ configure @@ -9857,7 +9857,7 @@ fi # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $LDFLAGS $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -13342,7 +13342,7 @@ esac ;; #( *-*-linux*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\ |*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*) : sharedlib_cflags="-fPIC" - mksharedlib="$CC -shared" + mksharedlib="$CC -shared $LDFLAGS" oc_ldflags="$oc_ldflags -Wl,-E" rpath="-Wl,-rpath," mksharedlibrpath="-Wl,-rpath," @@ -13385,6 +13385,8 @@ fi ;; #( natdynlink=true ;; #( powerpc*-*-linux*) : natdynlink=true ;; #( + powerpc*-*-freebsd*) : + natdynlink=true ;; #( i686-*-kfreebsd*) : natdynlink=true ;; #( x86_64-*-kfreebsd*) : @@ -13395,6 +13397,8 @@ fi ;; #( natdynlink=true ;; #( x86_64-*-freebsd*) : natdynlink=true ;; #( + amd64-*-freebsd*) : + natdynlink=true ;; #( i[3456]86-*-openbsd*) : natdynlink=true ;; #( x86_64-*-openbsd*) : @@ -13415,6 +13419,8 @@ fi ;; #( natdynlink=true ;; #( aarch64-*-linux*) : natdynlink=true ;; #( + aarch64-*-freebsd*) : + natdynlink=true ;; #( *) : ;; esac @@ -13488,6 +13494,14 @@ fi; system=elf ;; #( else model=ppc fi; system=elf ;; #( + powerpc64le*-*-freebsd*) : -+ arch=power; model=ppc64le; system=bsd_elf;; #( ++ arch=power; model=ppc64le; system=freebsd;; #( + powerpc*-*-freebsd*) : + arch=power; if $arch64; then : + model=ppc64 +else + model=ppc -+fi; system=bsd_elf ;; #( ++fi; system=freebsd ;; #( powerpc-*-netbsd*) : arch=power; model=ppc; system=netbsd ;; #( powerpc-*-openbsd*) : @@ -13510,6 +13524,8 @@ fi; system=elf ;; #( arch=arm; model=armv6; system=linux_eabi ;; #( armv6*-*-freebsd*) : arch=arm; model=armv6; system=freebsd ;; #( + armv7*-*-freebsd*) : + arch=arm; model=armv7; system=freebsd ;; #( earmv6*-*-netbsd*) : arch=arm; model=armv6; system=netbsd ;; #( earmv7*-*-netbsd*) : -@@ -13544,6 +13560,8 @@ fi; system=elf ;; #( +@@ -13534,6 +13550,8 @@ fi; system=elf ;; #( + arch=amd64; system=dragonfly ;; #( + x86_64-*-freebsd*) : + arch=amd64; system=freebsd ;; #( ++ amd64-*-freebsd*) : ++ arch=amd64; system=freebsd ;; #( + x86_64-*-netbsd*) : + arch=amd64; system=netbsd ;; #( + x86_64-*-openbsd*) : +@@ -13544,6 +13562,8 @@ fi; system=elf ;; #( arch=amd64; system=mingw64 ;; #( aarch64-*-linux*) : arch=arm64; system=linux ;; #( + aarch64-*-freebsd*) : + arch=arm64; system=freebsd ;; #( x86_64-*-cygwin*) : arch=amd64; system=cygwin ;; #( -@@ -13714,6 +13732,8 @@ case "$arch,$system" in #( +@@ -13714,6 +13734,8 @@ case "$arch,$system" in #( profiling=true ;; #( amd64,openbsd) : profiling=true ;; #( + amd64,dragonfly) : + profiling=true ;; #( amd64,freebsd) : profiling=true ;; #( amd64,netbsd) : -@@ -13721,6 +13741,10 @@ case "$arch,$system" in #( - arm,netbsd) : +@@ -13722,11 +13744,17 @@ case "$arch,$system" in #( profiling=true ;; #( amd64,gnu) : + profiling=true ;; #( ++ arm64,freebsd) : + profiling=true ;; #( -+ arm64,freebsd*) : ++ arm,freebsd) : + profiling=true ;; #( -+ arm,freebsd*) : - profiling=true ;; #( arm,linux*) : profiling=true ;; #( + power,elf) : + profiling=true ;; #( + power,bsd*) : ++ profiling=true ;; #( ++ power,freebsd) : + profiling=true ;; #( + power,netbsd) : + profiling=true ;; #( diff --git a/net/libnatpmp/files/patch-Makefile b/net/libnatpmp/files/patch-Makefile new file mode 100644 index 000000000000..1a8ca9ecb3ef --- /dev/null +++ b/net/libnatpmp/files/patch-Makefile @@ -0,0 +1,10 @@ +--- Makefile.orig 2022-01-22 19:25:56 UTC ++++ Makefile +@@ -72,7 +72,6 @@ ifneq (, $(findstring x86_64, $(ARCH))) + + INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR) + ifneq (, $(findstring x86_64, $(ARCH))) +-INSTALLDIRLIB = $(INSTALLPREFIX)/lib64 + endif + + INSTALLDIRBIN = $(INSTALLPREFIX)/bin