Commit Graph

848 Commits

Author SHA1 Message Date
Bryan Drewery
954b650462 - Add USE_PACKAGE_DEPENDS_ONLY which will try installing dependencies
from existing packages and not fallback on building from source.

  This is useful for package building tools such as poudriere and tinderbox
  to avoid building from source and confusing the build log, if a dependency
  failed to build for some reason.

  NOTE: USE_PACKAGE_DEPENDS has not changed here. It has always
        reverted to source if the package was not present.

PR:		ports/180725
Submitted by:	crees
With hat:	portmgr
2013-08-31 13:56:08 +00:00
Bryan Drewery
1045299f41 - make fetch/checksum: If a fetched file does not match the expected size,
delete it and try the next site, if there is one to try.

  Normally fetch(1) will detect that the size is wrong, fail, and the 'fetch'
  target will move on to the next site:

  => Attempting to fetch http://www.chiark.greenend.org.uk/~sgtatham/agedu/agedu-r9723.tar.gz
  fetch: http://www.chiark.greenend.org.uk/~sgtatham/agedu/agedu-r9723.tar.gz: size mismatch: expected 155321, actual 163319
  => Attempting to fetch http://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sunpoet/agedu-r9723.tar.gz
  agedu-r9723.tar.gz                            100% of  151 kB  259 kBps

  However, if the remote server does not properly advertise the size of the file,
  fetch(1) will still download the file, and succeed. The 'fetch' target then
  stops, assuming it has a proper file. This is returned to 'checksum', which fails,
  and then tries a refetch, but on the same broken site. In this example, the size
  is expected to be 214984, but a 4830 size is fetched and checksummed.

  => Attempting to fetch http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz
  fetch: http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz: size unknown
  fetch: http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz: size of remote file is not known
  picpuz-2.1.1.tar.gz                                   4830  B   48 kBps
  ===> Fetching all distfiles required by picpuz-2.1.1_5 for building
  => SHA256 Checksum mismatch for picpuz-2.1.1.tar.gz.

  Now the 'fetch' target will verify the size is proper before returning to
  'checksum':

  => Attempting to fetch http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz
  fetch: http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz: size unknown
  fetch: http://kornelix.squarespace.com/storage/downloads/picpuz-2.1.1.tar.gz: size of remote file is not known
  picpuz-2.1.1.tar.gz                                   4830  B  130 kBps
  => Fetched file size mismatch (expected 214984 actual 4830)
  => Trying next site
  => Attempting to fetch http://www.stasyan.com/devel/distfiles/picpuz-2.1.1.tar.gz
  picpuz-2.1.1.tar.gz                           100% of  209 kB   20 kBps 00m00s
  ===> Fetching all distfiles required by picpuz-2.1.1_5 for building
  => SHA256 Checksum OK for picpuz-2.1.1.tar.gz.

Reviewed by:	bapt
With hat:	portmgr
2013-08-31 13:22:01 +00:00
Bryan Drewery
f3a777ce3c - make checksum: When encountering a checksum mismatch, delete the file
before retrying.

  The previous behavior would try to download a range of the new bytes and
  then hit the 'Requested Range Not Satisfiable' error and never actually
  redownload the file.

  This fixes cases where a port is rerolled and distinfo updated, but
  users have a bad distfile sitting there that they would manually need
  to remove.

Reviewed by:	bapt
Reported by:	danfe
With hat:	portmgr
2013-08-31 01:16:24 +00:00
Bryan Drewery
1fffe1142c - Fix WITH_CCACHE_BUILD support on ports that have a *PATH var in their
MAKE_ENV. This only intended to ignore PATH.

  All of these were not supporting WITH_CCACHE_BUILD and a partial exp-run
  was done on:

  audio/fdmf biology/biojava devel/ace games/hex graphics/cimg
  graphics/inventor graphics/peps graphics/wings graphics/wings-devel
  lang/python26 lang/python27 lang/python31 lang/python32 lang/python33
  lang/siod math/py-basemap math/py-basemap-data multimedia/gpodder
  multimedia/gstreamer-ffmpeg multimedia/gstreamer1-libav
  multimedia/handbrake print/py-reportlab print/py-reportlab2 science/ncs
  science/netcdf4 security/nss textproc/adabrowse x11-toolkits/py-kivy

With hat:	portmgr
2013-08-30 11:41:31 +00:00
Bryan Drewery
ecf1a462d7 - Support overriding CONFIG_SITE 2013-08-29 16:46:54 +00:00
Baptiste Daroussin
b19d5a14b5 On HEAD fetch is now checking for https, which lead to lots of fetch failures
on invalid websites, given the ports tree already checks the distfiles against
a hash, it is safe to skip the certificate validation.

Submitted by:	Michael Gmelin <freebsd@grem.de>
2013-07-31 13:30:18 +00:00
Baptiste Daroussin
07b24b6cf9 Define MAKE_CMD in post.mk to allow anything to overwrite it 2013-07-30 06:32:01 +00:00
Baptiste Daroussin
527d92de23 do-install also needs MAKE_CMD 2013-07-30 05:48:55 +00:00
Baptiste Daroussin
aa6a847926 Reduce code duplication by overwriting MAKE_CMD when it is different. 2013-07-30 05:33:25 +00:00
Baptiste Daroussin
e5e2c2aaa6 Remove excessive colon
Reported by:	mandree
2013-07-29 20:12:43 +00:00
Baptiste Daroussin
95b64b8a5a Fix formatting when finding shared library with new LIB_DEPENDS format
Reported by:	mandree
2013-07-29 20:09:21 +00:00
Baptiste Daroussin
eec2cb8d74 Remove support for Qt3/kde in preparation for full Qt3/kde3 removal
PR:		ports/180745
Submitted by:	rene
2013-07-26 19:14:50 +00:00
Baptiste Daroussin
dc9339863a Prevent MAKE_JOBS_NUMBER from being recursive
Reported by:	swills
2013-07-16 14:35:57 +00:00
Baptiste Daroussin
33f4366ba1 Activate multiple jobs by default [1]
Add a new macro to allow a port to limit itself the maximum numbers of jobs allowed [2]

Submitted by:		danfe (based on) [1]
			pgj (base on) [2]
Reviewed by:		bdrewery, miwi
Multiple exp-run:	bapt
2013-07-16 12:04:09 +00:00
Baptiste Daroussin
e3b01a75e8 Remove USE_MOTIF as it is not used anymore 2013-07-10 07:41:13 +00:00
Baptiste Daroussin
8b330db9e1 Error message when not able to create the optiondir directory.
optiondir being defined in a subshell wasn't defined when the error message is printed.

PR:		ports/176849
Submitted by:	Oleg Ginzburg <olevole@olevole.ru>
2013-07-10 06:44:19 +00:00
Baptiste Daroussin
5dd54c7ca6 Move loading of USES post actions after the load of all the bsd.*.mk post actions.
This fixes bsd.php.mk complaining about do-install being already defined
2013-07-08 13:34:24 +00:00
Baptiste Daroussin
624578f4cd Remove all X_FONTS* macros, as they are not used anymore 2013-07-08 11:43:25 +00:00
Baptiste Daroussin
3fbabd14ea Remove X_FONTS_MISC_PORT and X_FONTS_ALIAS_PORT now that they are not used anymore 2013-07-07 13:00:00 +00:00
Baptiste Daroussin
edf7ecb356 Remove direct usage of X_FONTS_MISC_PORT and X_FONTS_ALIAS_PORT
While here fixed missing ${PORTSDIR} [1]

Reported by:	rm [1]
2013-07-07 12:56:07 +00:00
Baptiste Daroussin
c70b09a55f Remove X_VFBSERVER_PORT now that it is not used anymore 2013-07-07 12:24:32 +00:00
Baptiste Daroussin
13821d22f7 Remove X_FONTSERVER_PORT now that it is not used anymore 2013-07-07 12:10:29 +00:00
Baptiste Daroussin
71aec7fcbd Fix MAKE_FORCE_JOBS 2013-07-06 12:53:57 +00:00
Baptiste Daroussin
3ac6602ab1 Move PKGORIGIN definition a bit later so that PKGCATEGORY defined in Makefile.local or Makefile.inc works again
Reported by:	dinoex
Tested by:	dinoex
2013-07-05 20:15:48 +00:00
Baptiste Daroussin
e7965f1cae Add new LIB_DEPENDS syntax:
libname.so:${PORTSDIR}/devel/name
libname.so.0.1.2:${PORTSDIR}/devel/name

This syntax is support to replace the old syntax and code which has multiple weakness:
It was replying on ldconfig -r which arbritrary limited our valid library to name of the following form:
libname.so[.X] where X can be a number
foo.3 could match both libfoo.3.do and libfoo.so.3

Reviewed by:	bdrewery, danfe, miwi
2013-07-05 14:10:55 +00:00
Baptiste Daroussin
01d6c7d5de Import new gmake.mk and rip out USE_GMAKE from bsd.port.mk
A USE_GMAKE stub as be created to help migration please now use USES=gmake

Reviewed by:	bdrewery
Exp-run by:	bdrewery
2013-07-05 13:32:31 +00:00
Baptiste Daroussin
0fa3776fec Add a mechanism to allow USES to define code to be loaded after post.mk
Reviewed by:	bdrewery
Exp-run by:	bdrewery
2013-07-05 13:16:57 +00:00
Rene Ladan
f5cb941311 Switch the default Linux DRI port to linux-f10-dri and remove support
for the unused USE_GL=linux (this avoids hardcoding the Linux DRI port).

PR:		ports/180231
Submitted by:	myself
Approved by:	portmgr (bapt)
2013-07-03 15:32:01 +00:00
Baptiste Daroussin
e1d25bc997 This time USE_IMAKE is totally gone 2013-06-29 09:01:57 +00:00
Baptiste Daroussin
3ca10d451f There are still some USE_IMAKE in the ports tree, add a stub to make them continue working until USE_IMAKE is totally goone 2013-06-28 18:11:52 +00:00
Baptiste Daroussin
932db7c46c New USES imake to handle the dependency on imake.
This uses accept 'env' as an argument for ports that do use their own or a different do-configure target.

Modify xmkmf so it accept IMAKECPPFLAGS as default flags for imake and pass it to the called imake.
Modify xorg-cf-files (the FreeBSD.cf configuration file) to allow CppCmd to be overwritten.
Pass CppCmd CcCmd and CplusplusCmd via command line to each call of imake via IMAKECPPFLAGS
Pass IMAKE_DEFINE with the above arguments to MAKE_ARGS so that imake spawned from Makefile generated by a previous
imake also inherit the defined CppCmd CcCmd and CplusplusCmd.
Make imake use devel/tradcpp all the time, so that when buidling with clang we do not depend on gcc's cpp.
Make imake respect CC and CXX
Make imake respect USE_GCC (if set imake will use gcc's cpp).

While here:
- Remove a couple of indefinite articles from comments
- Trim headers
- Fix a couple of ports to build with clang or use: USE_GCC=any
- Fix a now useless redefinition of the extraction chain
- Fix a typo in japanese/Wnn7-lib bundled imake template definitions
- Fix some XMKMF execution with no env specified
- Use options helper in x11/xautolock to simplify the port
2013-06-28 11:51:05 +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
4b653b49e1 Define UID earlier so that it can be used inside bsd.pkng.mk
Allow make deinstall to prompt for su if run as a user if using pkgng

Reported by:	jhb, dim
Submitted by:	jhb
2013-06-25 12:24:10 +00:00
Baptiste Daroussin
21413d18f5 Fix warning if compat.ia32.maxvmem sysctl does not exists and the ports tree is being used via bmake
Reported by:	demon
Tested by:	demon
Reviewed by:	bdrewery
2013-06-25 12:05:14 +00:00
Baptiste Daroussin
677c6f08e0 Update dialog4ports to 0.1.5
Changes:
- Don't free memory when process is exiting [1]
- Some style fixes [1]
- Consistently use C99 bool, true and false [1]
- Generalise parsing of env var into StringList [1]
- Rename ITEM_SEPARATE to ITEM_SEPARATOR [1]
- Highlight new options (by a '+' at the beginning of the line) [1]

Submitted by:	tijl [1]
2013-06-17 11:12:22 +00:00
Baptiste Daroussin
2eb34fa38e Remove trailing @ which breaks PATCH_DEBUG_TMP
Submitted by:	bf
2013-06-16 12:23:45 +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
632f0ed926 Yes more simplification in showconfig, pretty-print-config and pkgng manifest generation 2013-06-14 06:56:16 +00:00
Baptiste Daroussin
a36753e6ab No need to globally define X_NESTSERVER_PORT 2013-06-13 22:48:26 +00:00
Baptiste Daroussin
29aea2e3ae Previous attempt to fix the make patch with bmake (make it fail if a patch fails) was too intrusive.
Turn it back into a full script with set -e expliticly added.
2013-06-13 18:56:24 +00:00
Baptiste Daroussin
bd52432030 Fix patching
Reported by:	kwm
2013-06-13 12:41:03 +00:00
Baptiste Daroussin
c353152f66 Fails is a dependency checking failed with bmake 2013-06-13 11:19:10 +00:00
Baptiste Daroussin
d7c459b38b Fail in case a checksum fails with bmake 2013-06-13 09:32:39 +00:00
Baptiste Daroussin
c86f37ff4d Fix make patch not stopping in case a patch does not apply cleanly with bmake.
bmake does not run shell with set -e causing the difference between both fmake and bmake in the area.

While here clean up a bit the syntax.

Add support for xz'ed patches for EXTRA PATCHES

Discussed with:	sjg
2013-06-13 06:43:08 +00:00
Baptiste Daroussin
8a0e32c0aa Removed useless quotes 2013-06-10 07:27:05 +00:00
Baptiste Daroussin
209e1cfffd Testing COMPLETE_OPTIONS_LIST is enought to determine if there is options to print 2013-06-10 06:42:37 +00:00
Baptiste Daroussin
741efabb33 Factorize pre-config 2013-06-10 06:40:45 +00:00
Baptiste Daroussin
27a9752a63 Factorise make pretty-print-config code 2013-06-10 06:30:30 +00:00
Baptiste Daroussin
74f5741bfc Show options group descriptions in make showconfig,
While here, factorize code
2013-06-10 06:22:49 +00:00
Bryan Drewery
3aaf281423 Fix grammar in comment 2013-06-07 13:28:30 +00:00