1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00
Commit Graph

75 Commits

Author SHA1 Message Date
Baptiste Daroussin
b7dc121707 Add INFO macro to the helpers 2014-07-21 22:28:06 +00:00
Olli Hauer
ad199a9229 - strip optional WITH parameter from argument if OPTION is set to off
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)
2014-06-21 13:29:30 +00:00
Baptiste Daroussin
7c484e741d Switch back to default tabspace: 8 2014-06-18 07:13:26 +00:00
Tijl Coosemans
9f8b4bcde3 Support LIBS like LDFLAGS.
- 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)
2014-06-11 14:49:59 +00:00
Baptiste Daroussin
4a4ec28d37 Convert all :U to :tu and :L to :tl
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
2014-05-05 09:45:36 +00:00
Bryan Drewery
e15449a9ef - Rename check-orphans to check-plist. Keep the old for backwards-compat.
- 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.
2014-04-19 06:44:56 +00:00
Baptiste Daroussin
db0990d2f9 Make option DEBUG work like WITH_DEBUG 2014-03-28 11:04:54 +00:00
Mathieu Arnold
0cfd925acd Have OPTIONS_SUB also fill in SUB_LIST.
Fix two ports that would have been broken with this change.

With hat:	portmgr
2014-03-25 18:19:44 +00:00
Mathieu Arnold
653890f812 Correctly sort the DEPENDS targets.
Sponsored by:	Absolight
2014-03-03 18:56:44 +00:00
Mathieu Arnold
583e2da11b Add CONFLICT{,_BUILD,_INSTALL} to the options helpers.
PR:		187226 (based on)
Submitted by:	adamw
Sponsored by:	Absolight
2014-03-03 18:47:37 +00:00
Mathieu Arnold
b4c82af55d Don't output warnings about WITH_DEBUG being on.
Requested by:	eadler
Sponsored by:	Absolight
2014-03-03 15:12:56 +00:00
Mathieu Arnold
0f58d15935 Add %%NO_OPT1%% to PLIST_SUB that is enabled when %%OPT1%% is not.
Sponsored by:	Absolight
2014-02-27 16:39:25 +00:00
Mathieu Arnold
68eae3c164 Really tell our users that using WITH_/WITHOUT_ to set/unset options is
deprecated.

Sponsored by:	Absolight
2014-02-24 15:40:30 +00:00
Antoine Brodin
06b10d88b6 Use OPTIONS helpers from excluded options too
Reviewed by:	bapt
With hat:	portmgr
2014-02-15 14:33:39 +00:00
Mathieu Arnold
b765405ad0 Add two new options helpers:
${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
2014-01-27 22:53:24 +00:00
Baptiste Daroussin
31e3c5129c fmake doesn't like previous commit (which breaks index) [1]
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]
2013-12-15 23:44:13 +00:00
Baptiste Daroussin
990ef2dec3 Do not set again WITHOUT_NLS in old backward compatibility if NLS is in OPTIONS_UNSET
Reported by:	eadler
2013-12-15 23:31:36 +00:00
Baptiste Daroussin
827dbfd2d3 Stop defining WITHOUT_NLS it not used anymore in the ports tree 2013-12-13 11:28:52 +00:00
Max Brazhnikov
b23b23a180 Add support for ${opt}_QMAKE_ON/${opt}_QMAKE_OFF
Approved by:	portmgr (bapt)
2013-11-22 10:59:03 +00:00
Mathieu Arnold
2cc3335d59 Allow multiple value in ${opt}_USE= FOO=bar,baz.
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
2013-11-12 13:23:14 +00:00
Alex Kozlov
bcaa596bf8 - Remove gratuitous whitespaces
- Use sinclude when possible
- Rewrap overly long list

Approved by:	portmgr (bapt)
2013-10-30 16:54:09 +00:00
William Grzybowski
c7db7eafb3 Allow multiple values for configure ENABLE and WITH options helpers
${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)
2013-10-27 11:58:20 +00:00
Bryan Drewery
324a8df42a - Fix OPTIONS_SUB not including OPTIONS_SLAVE options in PLIST_SUB
With hat:	portmgr
2013-10-04 11:42:38 +00:00
Bryan Drewery
ff427f8d85 - Add option helper opt_USE= FOO=bar -> USE_FOO=bar
Discussed with:	bapt
With hat:	portmgr
2013-10-04 11:38:13 +00:00
Sunpoet Po-Chuan Hsieh
5349651bad - Add more helpers: ALL_TARGET, INSTALL_TARGET and CATEGORIES
- 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)
2013-10-04 10:03:23 +00:00
Bryan Drewery
8d4817e69d - Add support for PATCHFILES and PATCH_SITES
- While here, cleanup r329186 and move EXTRA_PATCHES to common
  section

With hat:	portmgr
2013-10-04 01:52:30 +00:00
Bryan Drewery
ac5b4b49ea - Support {opt}_EXTRA_PATCHES
Reviewed by:	bapt
With hat:	portmgr
2013-10-03 13:32:36 +00:00
Sunpoet Po-Chuan Hsieh
cd19cf50f2 - Add more OPTIONS helpers: MAKE_ARGS, PLIST_FILES, PLIST_DIRS and PLIST_DIRSTRY
- Fix typo

PR:		ports/182514
Submitted by:	sunpoet (myself)
Approved by:	bdrewery (portmgr)
2013-10-01 16:27:52 +00:00
Christian Weisgerber
7bab335511 If ${opt}_CPPFLAGS is defined, its value will be appended to CPPFLAGS
depending on the status of option ${opt}.

Approved by:	bapt
2013-09-24 21:01:06 +00:00
Mathieu Arnold
ba2618cd9d Document the new bsd.options.mk knobs.
PR:		ports/180949
Submitted by:	mat
Approved by:	bapt
2013-08-01 12:32:52 +00:00
Baptiste Daroussin
6def68975b Add new ${OPT}_CONFIGURE_WITH option help
it will handle the --with/--without configure argument dancing based on the value of the OPTION ${OPT}

Requested by:	mandree
2013-07-29 07:01:20 +00:00
Tijl Coosemans
a0ccbe7bed - Document the use of ${OPTIONS_NAME}_(UN)SET(_FORCE).
- 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
2013-07-25 11:47:11 +00:00
Baptiste Daroussin
35982b23be Replace OPTIONSFILE by OPTIONS_FILE which is a more robust variable with unicity
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
2013-06-26 07:22:06 +00:00
Baptiste Daroussin
0e8027e93f Add a forgotten helper:
${OPT}_CMAKE_ON and ${OPT}_CMAKE_OFF
2013-06-14 14:18:45 +00:00
Baptiste Daroussin
67cfdf9034 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=<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
2013-06-14 13:41:37 +00:00
Tijl Coosemans
d9f524c45c - Reallign documentation for a tab width of 4.
- Document variables that can be used in make.conf.

Approved by:	bapt
2013-06-14 13:04:32 +00:00
Tijl Coosemans
d48e842cfa Sort PORT_OPTIONS only once and remove some undefines.
Approved by:	bapt
2013-06-14 13:00:48 +00:00
Tijl Coosemans
bdace5957e Let config-conditional take options configured in make.conf into account.
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)
2013-06-14 12:59:02 +00:00
Baptiste Daroussin
5177ada3c4 Yet more factorisation 2013-06-10 09:27:19 +00:00
Baptiste Daroussin
a67e308fb6 Factorise code 2013-06-10 09:19:38 +00:00
Tijl Coosemans
b1576256fb Append per arch defaults directly to OPTIONS_DEFAULT. Duplicates
are eliminated later.
2013-06-10 08:39:14 +00:00
Tijl Coosemans
15ef88aa2f Exclude options directly from OPTIONS_DEFINE and set ALL_OPTIONS
later. This simplifies the NO_OPTIONS_SORT case.

Approved by:	bapt
2013-06-10 08:37:14 +00:00
Baptiste Daroussin
dfcbb8d250 This should not have been in either 2013-06-10 08:22:34 +00:00
Baptiste Daroussin
4f36e07626 Partial revert of r320440 some things has been committed that shouldn't have yet 2013-06-10 08:20:25 +00:00
Baptiste Daroussin
8a0e32c0aa Removed useless quotes 2013-06-10 07:27:05 +00:00
Tijl Coosemans
861ad53cbf Remove some redundant comments.
Approved by:	bapt
2013-06-09 16:04:04 +00:00
Tijl Coosemans
a96308c51e Eliminate _ALL_EXCLUDE temporary variable and fuse two .for loops.
Approved by:	bapt
2013-06-09 16:02:03 +00:00
Baptiste Daroussin
a639e24276 Do not automatically popup dialog in case only options from global options are defined
Requested by:	many
2013-06-07 08:06:17 +00:00
Baptiste Daroussin
b5f4f56e18 Remove the OPTIONS parsing for real this time 2013-06-07 05:55:24 +00:00
Baptiste Daroussin
0ccc926cc2 Fix exclusion of global options per ports 2013-06-07 05:49:44 +00:00