aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
Commit message (Collapse)AuthorAgeFilesLines
* Allow the use of opt_ENABLE= foo=/bar to work like opt_WITH.Mathieu Arnold2014-12-291-1/+1
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=375786
* SpellingBaptiste Daroussin2014-09-221-1/+1
| | | | | | | Submitted by: xmj Notes: svn path=/head/; revision=368865
* Add an option helper for PLIST_SUBAntoine Brodin2014-08-211-2/+2
| | | | | | | | | | | | Rename a few variables to avoid confusion with this new helper Requested by: koobs Reviewed by: mat With hat: portmgr Differential revision: https://reviews.freebsd.org/D665 Notes: svn path=/head/; revision=365573
* Add INFO macro to the helpersBaptiste Daroussin2014-07-211-2/+2
| | | | Notes: svn path=/head/; revision=362510
* - strip optional WITH parameter from argument if OPTION is set to offOlli Hauer2014-06-211-1/+1
| | | | | | | | | | | | | | | FOO_WITH= foo=bar CONFIGURE_ARGS will become now ON: --with-foo=bar OFF: --without-foo PR: 191085 Submitted by: ohauer Approved by: portmgr (antoine) Notes: svn path=/head/; revision=358699
* Switch back to default tabspace: 8Baptiste Daroussin2014-06-181-62/+59
| | | | Notes: svn path=/head/; revision=358213
* Support LIBS like LDFLAGS.Tijl Coosemans2014-06-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add LIBS="${LIBS}" to MAKE_ENV and CONFIGURE_ENV. - Add an option helper for LIBS. - Adjust all ports that already use LIBS. Also remove references to PTHREAD_CFLAGS and PTHREAD_LIBS while here. - Some ports did not support having a LIBS environment variable and required additional patches. Somewhat simplified a linker command line looks like: ${CC} ${src_LDFLAGS} ${LDFLAGS} ${src_LIBS} ${LIBS} where src_LDFLAGS and src_LIBS are controlled by upstream and LDFLAGS and LIBS can be controlled by us. If possible -L and -l flags need to be added to LIBS to make sure they appear after any -L and -l flags set by upstream. Many ports currently add -L${LOCALBASE}/lib to LDFLAGS but this may appear too early on the command line causing installed libraries to be linked in instead of freshly built ones. Additional changes: benchmarks/netio: Replace WITH_IPV6 with an IPV6 option. comms/gnokii: Replace some patches with USES=pathfix. Also remove -fPIC. graphics/gimageview: USES=libtool and install desktop file in DESKTOPDIR. graphics/visionworkbench: Remove FreeBSD 7 support. multimedia/libmovtar: New LIB_DEPENDS syntax. multimedia/opencinematools: Use standard do-build. net/siproxd: USES=libtool:keepla (port actually needs .la files for plugins) net-mgmt/nagios: Remove -fPIC. net-mgmt/nagios4: Remove -fPIC. print/cups-base: Only add -lssp_nonshared on i386 and OSVERSION < 1000036. security/p11-kit: Replace PTHREAD_LIBS in CONFIGURE_ENV with ac_cv_func_pthread_mutexattr_init=no in CONFIGURE_ARGS. This skips a test in configure that falsely detects pthread_mutexattr_init in our libc. sysutils/dar: Fix iconv detection. x11/rxvt-unicode: Remove -lstdc++ and patch configure to remove a FreeBSD hack and use $CXX as linker as on other platforms. PR: 190592 Exp-run by: antoine Approved by: portmgr (antoine) Notes: svn path=/head/; revision=357486
* Convert all :U to :tu and :L to :tlBaptiste Daroussin2014-05-051-1/+1
| | | | | | | | | | | | | | | | | Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a replacement for :U and :L (which has been marked as deprecated) bmake which is the default on FreeBSD 10+ only support by default :tu/:tl a hack has been added at the time to support :U and :L to ease migration. This hack is now not necessary anymore Note that this makes the ports tree incompatible with make(1) from FreeBSD 8.3 or earlier With hat: portmgr Notes: svn path=/head/; revision=352986
* - Rename check-orphans to check-plist. Keep the old for backwards-compat.Bryan Drewery2014-04-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Bug fixes: makeplist/check-plist: - Fix showing directories owned by RUN_DEPENDS/LIB_DEPENDS [1] - Use proper "rmdir PATH" syntax, not "rmdir >/dev/null... PATH" which pkg will not recognize. - Never consider base /etc/mtree/BSD.usr.dist or LOCLABASE Templates/BSD.local.dist as needing @dirrm handling. check-plist: - Fix showing PORTDOCS/PORTEXAMPLES files when the OPTIONS are not set. makeplist will still suggest them. - Fix showing files installed through unselected OPTIONS as orphans, by considering "@comment file" to be ignored. [2] - Fix @sample, @fc, @fcfontsdir, @fontsdir support - Fix return status when orphans are found to be non-zero - Add note when PREFIX=!LOCALBASE - Be more clear when orphans/no orphans are found. - Add a whitelist mechanism for globally approved ignores. - Add *.bak/*.orig to orphan whitelist for now. - Fix false-positive with dirs installed to /, such as with archivers/dpkg creating /var/db/dpkg - Fix false-positive with @dirrm ending in /, such as with ports-mgmt/poudriere with a @dirrmtry share/zsh/ - There are likely still some false-positives. I fixed as many as I could find. Please let me know of others. * One in particular that is not easily fixable is installing a file into a directory owned by another port where that other port is not a run-time dependency. So the leaf port may create all of the parent dirs and never clean them up. Cleaning them up is not proper unless no other package is depending on them. This will be addressed by pkg(8) once pkg_install is EOL, or sooner. - Consider @dirrm of directories owned by run-time dependencies, or /etc/mtree/* or Templates/BSD.local.dist (at LOCALBASE) as fatal errors. These should not be removed in the plist. @comment lines are not considered for this; they will not ignore an error. ===> Checking for directories owned by dependencies or MTREEs Error: Owned by dependency: @dirrmtry share/locale/af/LC_MESSAGES Error: Owned by dependency: @dirrmtry share/locale/af Error: Owned by dependency: @dirrmtry %%PERL5_MAN3%% - Detect files in plist that do not exist in the stagedir. Pkgng already did this, but now we have it unified with this check. @comment lines are not considered for this; they will not ignore an error. ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: foo Error: Missing: @dirrmtry bar - Change orphaned output due to several new errors introduced: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: foo - Send errors to stderr check_leftovers.sh: - Prefer longer values for PLIST_SUB. bsd.options.mk: - Fix NOPORTDOCS/WITHOUT_NLS/NOPORTEXAMPLES not unsetting their respective OPTIONS. - Mark NOPORTDOCS/NOPORTEXAMPLES deprecated and hook them into the OPTIONS_WARNING to tell users the new format. - check-stagedir.sh refactoring: - Switch to using new PLIST_SUB_SED - Use ! instead of , in sed(1) regex to allow files/dirs with ',' - Rework PORTEXAMPLES/PORTDOCS handling so it acts on PLIST_SUB_SED'd value and not absolutes. Also simplify the regex for these a bit to allow reuse. - No longer need DOCSDIRS/EXAMPLESDIR in env - Wrap long lines - Unset some vars in env when they are done being used to free space for larger sed vars - Cleanup redundant sed regexes - Add a Scripts/plist_sub_sed_sort.sh to prefer longer values when substituting over shorter values. - 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 [2]: @comment file @comment @dirrmtry dir Reviewed by: mat (much earlier version) Discussed with: mat, antoine, bapt, swills (various bits) With hat: portmgr PR: ports/185561 [1] Reported By: Alexander Yerenkow <yerenkow@gmail.com> [1] Tested with: pkg and pkg_install Reported by: many (false-positives) [2] This is a partial solution, we may still need a plist.ignore too. It doesn't make much sense to add files in main pkg-plist we don't care about, but maybe it does since you'll see and reconsider them being ignored someday. @comment is used as all the OPTION PLIST_SUB deactivations use @comment instead of something like @ignore. Notes: svn path=/head/; revision=351587
* Make option DEBUG work like WITH_DEBUGBaptiste Daroussin2014-03-281-0/+4
| | | | Notes: svn path=/head/; revision=349407
* Have OPTIONS_SUB also fill in SUB_LIST.Mathieu Arnold2014-03-251-0/+8
| | | | | | | | | Fix two ports that would have been broken with this change. With hat: portmgr Notes: svn path=/head/; revision=349166
* Correctly sort the DEPENDS targets.Mathieu Arnold2014-03-031-2/+2
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=346952
* Add CONFLICT{,_BUILD,_INSTALL} to the options helpers.Mathieu Arnold2014-03-031-14/+19
| | | | | | | | | PR: 187226 (based on) Submitted by: adamw Sponsored by: Absolight Notes: svn path=/head/; revision=346951
* Don't output warnings about WITH_DEBUG being on.Mathieu Arnold2014-03-031-1/+2
| | | | | | | | Requested by: eadler Sponsored by: Absolight Notes: svn path=/head/; revision=346911
* Add %%NO_OPT1%% to PLIST_SUB that is enabled when %%OPT1%% is not.Mathieu Arnold2014-02-271-2/+2
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=346379
* Really tell our users that using WITH_/WITHOUT_ to set/unset options isMathieu Arnold2014-02-241-0/+26
| | | | | | | | | deprecated. Sponsored by: Absolight Notes: svn path=/head/; revision=345870
* Use OPTIONS helpers from excluded options tooAntoine Brodin2014-02-151-1/+1
| | | | | | | | Reviewed by: bapt With hat: portmgr Notes: svn path=/head/; revision=344393
* Add two new options helpers:Mathieu Arnold2014-01-271-1/+17
| | | | | | | | | | | | | | ${OPT}_${TYPE}_DEPENDS_OFF=<something> will automatically add: ${TYPE_DEPENDS}+=<something> in case OPT is 'off' ${OPT}_${FLAG}_OFF=<something> will automatically add: ${FLAG}+=<something> in case OPT is 'off' With hat: portmgr Sponsored by: Absolight Notes: svn path=/head/; revision=341467
* fmake doesn't like previous commit (which breaks index) [1]Baptiste Daroussin2013-12-151-14/+0
| | | | | | | | | | Given we do not support for long enough old OPTIONS framework just get rid of this compat block that doesn't bring anything anymore Kick by: cperciva [1] Notes: svn path=/head/; revision=336596
* Do not set again WITHOUT_NLS in old backward compatibility if NLS is in ↵Baptiste Daroussin2013-12-151-1/+1
| | | | | | | | | OPTIONS_UNSET Reported by: eadler Notes: svn path=/head/; revision=336595
* Stop defining WITHOUT_NLS it not used anymore in the ports treeBaptiste Daroussin2013-12-131-4/+0
| | | | Notes: svn path=/head/; revision=336336
* Add support for ${opt}_QMAKE_ON/${opt}_QMAKE_OFFMax Brazhnikov2013-11-221-12/+15
| | | | | | | Approved by: portmgr (bapt) Notes: svn path=/head/; revision=334572
* Allow multiple value in ${opt}_USE= FOO=bar,baz.Mathieu Arnold2013-11-121-1/+3
| | | | | | | | | | | | | | | Which is nice in case you end up with something like : X11_USE= xorg=x11 xorg=ice xorg=sm xorg=xext xorg=xineramaproto xorg=xinerama xorg=xrandr xorg=xrender xorg=xtst now you can do : X11_USE= xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst PR: ports/183892 Approved by: bapt Notes: svn path=/head/; revision=333568
* - Remove gratuitous whitespacesAlex Kozlov2013-10-301-12/+7
| | | | | | | | | | - Use sinclude when possible - Rewrap overly long list Approved by: portmgr (bapt) Notes: svn path=/head/; revision=332153
* Allow multiple values for configure ENABLE and WITH options helpersWilliam Grzybowski2013-10-271-4/+12
| | | | | | | | | | | | | | ${opt}_CONFIGURE_ENABLE and ${opt}_CONFIGURE_WITH now accept multiple arguments and will be expanded accordingly, e.g.: OPT_CONFIGURE_ENABLE= feature1 feature2 -- will add to CONFIGURE_ARGS: OPT enabled: --enable-feature1 --enable-feature2 OPT disabled: --disable-feature1 --disable-feature2 Approved by: portmgr (bapt) Notes: svn path=/head/; revision=331760
* - Fix OPTIONS_SUB not including OPTIONS_SLAVE options in PLIST_SUBBryan Drewery2013-10-041-1/+1
| | | | | | | With hat: portmgr Notes: svn path=/head/; revision=329293
* - Add option helper opt_USE= FOO=bar -> USE_FOO=barBryan Drewery2013-10-041-0/+9
| | | | | | | | Discussed with: bapt With hat: portmgr Notes: svn path=/head/; revision=329291
* - Add more helpers: ALL_TARGET, INSTALL_TARGET and CATEGORIESSunpoet Po-Chuan Hsieh2013-10-041-10/+7
| | | | | | | | | | | | | - Remove duplicate EXTRA_PATCHES comment - Minor comment rewording: change "add it to" to "add its content to" just like how we describe ${opt}_CMAKE_* PR: ports/182626 Submitted by: sunpoet (myself) Approved by: bapt (portmgr) Notes: svn path=/head/; revision=329280
* - Add support for PATCHFILES and PATCH_SITESBryan Drewery2013-10-041-5/+4
| | | | | | | | | | - While here, cleanup r329186 and move EXTRA_PATCHES to common section With hat: portmgr Notes: svn path=/head/; revision=329257
* - Support {opt}_EXTRA_PATCHESBryan Drewery2013-10-031-0/+6
| | | | | | | | Reviewed by: bapt With hat: portmgr Notes: svn path=/head/; revision=329186
* - Add more OPTIONS helpers: MAKE_ARGS, PLIST_FILES, PLIST_DIRS and PLIST_DIRSTRYSunpoet Po-Chuan Hsieh2013-10-011-5/+6
| | | | | | | | | | | - Fix typo PR: ports/182514 Submitted by: sunpoet (myself) Approved by: bdrewery (portmgr) Notes: svn path=/head/; revision=328963
* If ${opt}_CPPFLAGS is defined, its value will be appended to CPPFLAGSChristian Weisgerber2013-09-241-4/+4
| | | | | | | | | depending on the status of option ${opt}. Approved by: bapt Notes: svn path=/head/; revision=328193
* Document the new bsd.options.mk knobs.Mathieu Arnold2013-08-011-0/+32
| | | | | | | | | PR: ports/180949 Submitted by: mat Approved by: bapt Notes: svn path=/head/; revision=324101
* Add new ${OPT}_CONFIGURE_WITH option helpBaptiste Daroussin2013-07-291-0/+6
| | | | | | | | | it will handle the --with/--without configure argument dancing based on the value of the OPTION ${OPT} Requested by: mandree Notes: svn path=/head/; revision=323867
* - Document the use of ${OPTIONS_NAME}_(UN)SET(_FORCE).Tijl Coosemans2013-07-251-5/+23
| | | | | | | | | | | - Remove options in ${OPTIONS_NAME}_(UN)SET from NEW_OPTIONS list. - Remove an intermediate sort. - Add support for ${OPTIONS_NAME}_(UN)SET_FORCE. Approved by: bapt Notes: svn path=/head/; revision=323637
* Replace OPTIONSFILE by OPTIONS_FILE which is a more robust variable with unicityBaptiste Daroussin2013-06-261-0/+27
| | | | | | | | | | | | | | | | | | | | | | insurance in its path to avoid collision. A compatibility layer is available to automatically load and migration from OPTIONSFILE to OPTIONS_FILE (this is all transparent for users.) It is recommanded that ports that used to overwrite OPTIONSFILE to prevent the known bugs should keep the OPTIONSFILE overwrite for a while (6 month) to allow the migration to happen automatically and users to not lose their old save options. New options file is now based on the PKGORIGIN therefor the definition of the PKGORIGIN has been moved ealier in bsd.port.mk to allow it's usage from withing bsd.options.mk PR: ports/148637 Reviewed by: bdrewery Notes: svn path=/head/; revision=321785
* Add a forgotten helper:Baptiste Daroussin2013-06-141-0/+6
| | | | | | | ${OPT}_CMAKE_ON and ${OPT}_CMAKE_OFF Notes: svn path=/head/; revision=320926
* New macros to help dealing with ports that have options:Baptiste Daroussin2013-06-141-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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=<aname> will automatically add: CONFIGURE_ARGS+=--enable-<aname> in case OPT is activated CONFIGURE_ARGS+=--disable-<aname> in case OPT is deactivated ${OPT}_CONFIGURE_ON=<something> will automatically add: CONFIGURE_ARGS+=<something> in case OPT is activated ${OPT_CONFIGURE_OFF=<something> will automatically add: CONFIGURE_ARGS+=<something> 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' Reviewed and tested by: bdrewery Notes: svn path=/head/; revision=320916
* - Reallign documentation for a tab width of 4.Tijl Coosemans2013-06-141-29/+55
| | | | | | | | | - Document variables that can be used in make.conf. Approved by: bapt Notes: svn path=/head/; revision=320911
* Sort PORT_OPTIONS only once and remove some undefines.Tijl Coosemans2013-06-141-17/+6
| | | | | | | Approved by: bapt Notes: svn path=/head/; revision=320909
* Let config-conditional take options configured in make.conf into account.Tijl Coosemans2013-06-141-8/+15
| | | | | | | | | | | | | | | | The option dialog will not appear if all options have been configured before, either using the dialog or in make.conf. This means you can set options once for all ports in make.conf and not have dialogs pop up if those are the only options. Also let config-conditional run make config instead of do-config. Make config handles NO_DIALOG and pre-config. Discussed with: danfe Approved by: portmgr (bapt) Notes: svn path=/head/; revision=320908
* Yet more factorisationBaptiste Daroussin2013-06-101-11/+4
| | | | Notes: svn path=/head/; revision=320450
* Factorise codeBaptiste Daroussin2013-06-101-30/+10
| | | | Notes: svn path=/head/; revision=320449
* Append per arch defaults directly to OPTIONS_DEFAULT. DuplicatesTijl Coosemans2013-06-101-5/+1
| | | | | | | are eliminated later. Notes: svn path=/head/; revision=320446
* Exclude options directly from OPTIONS_DEFINE and set ALL_OPTIONSTijl Coosemans2013-06-101-21/+6
| | | | | | | | | later. This simplifies the NO_OPTIONS_SORT case. Approved by: bapt Notes: svn path=/head/; revision=320445
* This should not have been in eitherBaptiste Daroussin2013-06-101-27/+0
| | | | Notes: svn path=/head/; revision=320444
* Partial revert of r320440 some things has been committed that shouldn't have yetBaptiste Daroussin2013-06-101-42/+28
| | | | Notes: svn path=/head/; revision=320443
* Removed useless quotesBaptiste Daroussin2013-06-101-1/+42
| | | | Notes: svn path=/head/; revision=320440
* Remove some redundant comments.Tijl Coosemans2013-06-091-2/+0
| | | | | | | Approved by: bapt Notes: svn path=/head/; revision=320344
* Eliminate _ALL_EXCLUDE temporary variable and fuse two .for loops.Tijl Coosemans2013-06-091-9/+2
| | | | | | | Approved by: bapt Notes: svn path=/head/; revision=320343