Patch blindly based on the last 2013q1 netbsd-6 build report:
add <cstdlib> and fix signature of main().

(this package is i386-only)
Add patches required for SunOS support.
Update to 0.8.5

Changelog:
unknown.
Updated devel/acr to 0.8.6
Update to 5.6.2

* Update buildlink3.mk.

Changelog:
5.6.0 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
      - added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
      - added support for variable length IVs
      - added OIDs for Brainpool elliptic curve parameters
      - improved AES and SHA-256 speed on x86 and x64
      - changed BlockTransformation interface to no longer assume data alignment
      - fixed incorrect VMAC computation on message lengths
        that are >64 mod 128 (x86 assembly version is not affected)
      - fixed compiler error in vmac.cpp on x86 with GCC -fPIC
      - fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
      - fixed HashFilter bug when putMessage=true
      - fixed AES-CTR data alignment bug that causes incorrect encryption on ARM
      - removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
      - ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11

5.6.1 - added support for AES-NI and CLMUL instruction sets in AES and GMAC/GCM
      - removed WAKE-CFB
      - fixed several bugs in the SHA-256 x86/x64 assembly code:
          * incorrect hash on non-SSE2 x86 machines on non-aligned input
          * incorrect hash on x86 machines when input crosses 0x80000000
          * incorrect hash on x64 when compiled with GCC with optimizations enabled
      - fixed bugs in AES x86 and x64 assembly causing crashes in some MSVC build configurations
      - switched to a public domain implementation of MARS
      - ported to MSVC 2010, GCC 4.5.1, Sun Studio 12u1, C++Builder 2010, Intel C++ Compiler 11.1
      - renamed the MSVC DLL project to "cryptopp" for compatibility with MSVC 2010

5.6.2 - changed license to Boost Software License 1.0
      - added SHA-3 (Keccak)
      - updated DSA to FIPS 186-3 (see DSA2 class)
      - fixed Blowfish minimum keylength to be 4 bytes (32 bits)
      - fixed Salsa validation failure when compiling with GCC 4.6
      - fixed infinite recursion when on x64, assembly disabled, and no AESNI
      - ported to MSVC 2012, GCC 4.7, Clang 3.2, Solaris Studio 12.3, Intel C++ Compiler 13.0
Updated security/crypto++ to 5.6.2
Revbump from security/crypto++ 5.6.2.
Bump 0.12 to 0.12.1
patches/patch-main.c is deleted, upstream took fix.
---------
posh (0.12.1) unstable; urgency=low
  * Add missing compat header include, thanks to Makoto Fujiwara.
    closes: #712009.
Updated shells/posh to 0.12.1
Correction to login name.
Correction to login name, sorry again.
Fix build with perl-5.18.

While here, improve WRKSRC to avoid ".." in patches and paths,
build man page during build and not during install step,
and set LICENSE.
Remove GNU_CONFIGURE_LIBDIR.

Rationale: undocumented, easily replaced with "CONFIGURE_ARGS+=--libdir="
and only used by 10 packages.
Fix bug in man page noted by perl-5.18's pod2man.
Remove RTx-Shredder.

Marked BROKEN for ages due to PLIST conflicts with a dependency.
Update to 0.05:

0.05 Wednesday 16th January, 2013
        Apply fix for DEBUGGING perls from Reini Urban RT#74862
        Apply rewrite for 5.17 pad reorganiztion from ? RT#79267
Updated devel/p5-Devel-LexAlias to 0.05
Set PERL5_MODULE_TYPE to Module::Install so the pkgsrc version is used
instead of the outdated one distributed with the module.

Makes this package build with perl-5.18.

While here, set LICENSE and HOMEPAGE.
Update to 0.22:

0.22    2013-01-30 23:35 UTC
        + Chg : perl 5.6.1 is required.
        + Fix : context_info() now ignores %warnings::Bits for perl 5.8.6 and
                below, just like caller().
        + Fix : [RT #82220] : Scope-Upper-0.21 test stuck on Windows perl 5.12.3
                t/93-pod-spelling.t will not crash anymore on perl 5.12 and
                below.
                Thanks Gabor Szabo for reporting and Slaven Rezic for debugging
                this issue.
        + Tst : Rare test failures of t/07-context_info.t on perl 5.6,
                t/55-yield-target.t on perl 5.[68], and t/63-uplevel-ctl.t on
                perl 5.8.[345] have been addressed.

0.21    2012-09-21 15:10 UTC
        + Fix : context_info() has been taught about perl 5.17.4.
        + Fix : t/07-context_info.t will no longer fail with perls that have
                sitecustomize enabled (like many perl builds for Windows).
                Thanks Steve Hay and Nicholas Clark for debugging help.
        + Fix : Broken linkage on Windows with gcc 3.4, which appears in
                particular when using ActivePerl's default compiler suite.
                For those setups, the Scope::Upper shared library will now be
                linked against the perl dll directly (instead of the import
                library).

0.20    2012-09-17 11:00 UTC
        + Add : The new yield(@values, $context) function can be used to return
                values to any upper scope, including do or map blocks.
                The new leave(@values) function is an alias for
                yield(@values, HERE).
        + Add : The new context_info($context) function return information
                about context $context, similarly to what caller() provides
                but for any upper scope.
        + Chg : Contexts are now normalized. In previous versions, it was
                possible for different contexts to refer to the same scope :
                for example, "for (my $i = 0; $i < 10; ++$i) { ... }" was
                reachable through two contexts, while "for (@array) { ... }"
                only by one. Starting from this version, contexts are
                normalized so that they always represent an actual scope.
        + Doc : C++ compilers are officially NOT supported.
        + Fix : Building with a more recent version of perl 5.17.4.
        + Fix : Debugger compatibility with perl 5.17.1 and above.

0.19    2012-09-01 13:25 UTC
        + Doc : POD headings have been made linkable.
        + Fix : Building with perl 5.17.4.
        + Fix : BUILD_PREREQS are now set for ExtUtils::MakeMaker.
        + Opt : uplevel() private data structure is 7% smaller on 64 bits
                architectures.
        + Tst : Author tests overhaul.
Updated devel/p5-Scope-Upper to 0.22