math/R: More docuementation changes.
The feedback has been clear. Installing the TeX-dependent documentation
files by default is bad for users, even if that means one documentation
knob does not control the installation of all documentation files.
Reported by: mat marino
Reviewed by: mat
Approved by: swills (mentor)
Differential Revision: https://reviews.freebsd.org/D8440

math/R: Revert documentation changes and bump PORTREVISION
In an attempt to simplify the handling of documentation for users, changes
were made in the last commit. When the documentation knob was off, (almost)
no HTML, PDF, etc. files or their sources were installed, and when the knob
was on, all these files were installed. Because some of these documentation
files depended on some very large TeX ports, despite the usual convention,
the knob was turned off by default. Unfortunately, this caused problems for
a few R-dependent ports, because they copy documentation files from math/R
when they are installed.
Reported by: antoine
Reviewed by: mat
Approved by: swills (mentor)
Differential Revision: https://reviews.freebsd.org/D8429

- Update devel/icu to 57.1.
- Clean up the Makefile.
- Follow some upstream recommendations (--with-data-packaging=archive,
--disable-renaming, -DICU_NO_USER_DATA_OVERRIDE).
- Patch makefiles to install static libraries with INSTALL_DATA so they
aren't stripped.
- Patch config/mh-bsd-gcc to sync with config/mh-linux-gcc.
- Fix endianness detection in ICU. The code wanted to use BYTE_ORDER
defined in machine/endian.h, but this isn't visible because ICU is
compiled with _XOPEN_SOURCE. Patch the code to use _BYTE_ORDER instead.
- Compile ICU with C++11 compiler to enable move constructors.
- Patch ICU to fix a problem with atomics in the case of a C++11 compiler
without C++11 header <atomic> (like Clang on FreeBSD 9).
- Bump all ports that depend on it due to library version change.
- Add USES=compiler:c++0x to some ports that pick up -std=c++0x from ICU
pkgconfig files.
- Add USES=compiler:c++11-lib to graphics/libcdr01 because it also needs
a C++11 runtime library now. Add this to all ports that depend on it
so their executables load the right libstdc++.so on FreeBSD 9.
PR: 205120
Exp-run by: antoine
Approved by: portmgr (antoine)

math/R: Tweak previous ${OSVERSION} without ${OPSYS} commit
I made a mistake; some of the post-patch target does apply to DragonFly
as well as the pre-configure target. Tighten up which code is designated
as FreeBSD only. (again, a No-Op for FreeBSD)
Approved by: OSVERSION/OPSYS blanket

math/R: Fix usage of ${OSVERSION} without ${OPSYS}
There are several OSVERSION checks but everything is specific to FreeBSD
so the entire block is wrapped with a single OPSYS check to minimize
changes to the makefile.
Approved by: OSVERSION/OPSYS blanket

Fix dependencies, Makefile cleanups
Detailed maintainer log:
- Explicitly rely on required perl for the build
- math/R cannot be built in poudriere when math/atlas is chosen for the
BLAS implementation. It's not the default, so handle gracefully with
an IGNORE (could also have set MANUAL_PACKAGE_BUILD with
ATLAS_VARS= MANUAL_PACKAGE_BUILD=...)
- fix a type: DOC_BUILD_DEPEND -> DOCS_BUILD_DEPEND
PR: 210983
Submitted by: jrm@ftfl.ca (maintainer)

math/R: Add optimization related options to Makefile
There are a couple of enhancements that can be made to math/R
regarding optimization: one would be to enable LTO and OpenMP
whenever the compiler supports it, another one would be to allow
linking to OpenBLAS besides ATLAS or R's internal BLAS implementation.
The patch was inspired by math/octave's handling of BLAS.
PR: 207425
Submitted by: elferdo@gmail.com
Approved by: bf (maintainer timeout)

Make print/ghostscript9-agpl-base the default Ghostscript port. Upstream
changed the license to the AGPL 3 in version 9.07 so print/ghostscript9-base
is stuck at 9.06 which is almost 4 years old now.
Fix the logic in Uses/ghostscript.mk so "agpl" is treated as a real version
on its own instead of as a variant of other versions.
Fix print/ghostscript9-agpl-base to install eps2write.
Update math/asymptote to 2.37 to support newer Ghostscript.
PR: 208159
Exp-run by: antoine
Approved by: portmgr (antoine)

- Split ghostscript into X11-independent and -dependent parts:
* print/ghostscript{7,8,9,9-agpl}-base
Installs Ghostscript binary, libgs, and related files.
These ports do not depend on X11 libraries (i.e. x11* devices
are not available). USES=ghostscript will set dependency on
one of them depending on GHOSTSCRIPT_DEFAULT.
The default device is set to "display" or "bbox".
* print/ghostscript{7,8,9,9-agpl}-x11
Installs a shared library which provides X11 support to
the installed Ghostscript binaries. x11* devices will be

MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.
While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.
Also, replace some EXTRACT_SUFX occurences with USES=tar:*.
Checked by: make fetch-urlall-list
With hat: portmgr
Sponsored by: Absolight

R does not create proper libraries (with SONAME) pkg 1.5.2 is know skipping this
kind of libraries to avoid messing the solver with wrong provides.
Bump the port to enforce users to rebuild the package with 1.5.2 and having not
satifisfiable problem for the solver

Change INSTALL_DATA to install with mode 644
Remove patches and hacks that were used to work around the previous
situation
This allows to stage more ports as a regular user
Differential Revision: https://reviews.freebsd.org/D703
Reviewed by and discussed with: bapt
With hat: portmgr

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

Update the default version of GCC used in the Ports Collection from
GCC 4.6.4 to GCC 4.7.3. This entails updating the lang/gcc port as
well as changing the default in Mk/bsd.default-versions.mk.
Part II, Bump PORTREVISIONs.
PR: 182136
Supported by: Christoph Moench-Tegeder <cmt@burggraben.net> (fixing many ports)
Tested by: bdrewery (two -exp runs)

Update to libmpc version 1.0.1 which brings the following fixes:
- Switched to automake 1.11.6, see CVE-2012-3386.
- #14669: Fixed extraction of CC from gmp.h.
- Fixed case of intermediate zero real or imaginary part in mpc_fma,
found by hydra with GMP_CHECK_RANDOMIZE=1346362345.
This is on top of the following changes from version 1.0
- Licence change towards LGPLv3+ for the code and GFDLv1.3+ (with no
invariant sections) for the documentation.
- 100% of all lines are covered by tests
- Renamed functions
. mpc_mul_2exp to mpc_mul_2ui
. mpc_div_2exp to mpc_div_2ui

Rectify USE_TEX to support both of teTeX and TeXLive.
TEX_DEFAULT:
A knob to choose teTeX or TeXLive. One can specify in /etc/make.conf.
USE_TEX:
A knob for port developers. Valid keywords are listed in
bsd.tex.mk.

adjust linking and comments in dependent ports after the math/atlas update;
math/atlas-devel will be updated to use the same constructs at a later date
PR: 162706
Approved by: miwi (portmgr)
Feature safe: yes

- update to 2.13.0
- switch to the bundled Rblas and Rlapack by default (this
can be changed by setting BLAS and LAPACK) which favors
correctness in some corner cases over a slight performance
penalty; this will be revisited after the blas and lapack
updates
- replace the STATIC_LIBR option with a LIBR option (on
by default): if on, libR.a and libR.so are installed,
and R is linked to libR.so. Otherwise, R is static, and
no libRs are installed.
- remove the superfluous copy of libR.so in ${LOCALBASE}/lib [1]
- enable the cairo and pango elements in the X11() graphics
device by default, controlled by new PANGOCAIRO option
- add a few small patches to dependent ports, bumping
PORTREVISION where necessary
PR: 153309 [1]
Approved by: thierry (rkward*), wen (rpy*, R-cran-*)