2015-09-07 14:02:05 +02:00
|
|
|
# $NetBSD: Makefile.common,v 1.45 2015/09/07 12:02:05 jperkin Exp $
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2009-09-08 20:35:46 +02:00
|
|
|
# used by x11/labltk/Makefile
|
|
|
|
# used by x11/ocaml-graphics/Makefile
|
2015-08-07 13:16:30 +02:00
|
|
|
DISTNAME= ocaml-4.02.3
|
2004-12-24 18:16:04 +01:00
|
|
|
CATEGORIES= lang
|
Update to ocaml 4.02.0. Main changes (apart from ocamldoc and bugfixes, see
also upstream changelog):
Language features:
- Attributes and extension nodes
- Generative functors
- Module aliases
* Alternative syntax for string literals {id|...|id} (can break comments)
- Separation between read-only strings (type string) and read-write byte
sequences (type bytes). Activated by command-line option -safe-string.
Build system for the OCaml distribution:
- Use -bin-annot when building.
- Use GNU make instead of portable makefiles.
- Updated build instructions for 32-bit Mac OS X on Intel hardware.
Shedding weight:
* Removed Camlp4 from the distribution, now available as third-party software.
* Removed Labltk from the distribution, now available as a third-party library.
Type system:
* Keep typing of pattern cases independent in principal mode
- Allow opening a first-class module or applying a generative functor
in the body of a generative functor. Allow it also in the body of
an applicative functor if no types are created
* Module aliases are now typed in a specific way, which remembers their
identity. In particular this changes the signature inferred by
"module type of"
- Slight change in the criterion to distinguish private
abbreviations and private row types: create a private abbreviation for
closed objects and fixed polymorphic variants.
* Compare first class module types structurally rather than
nominally. Value subtyping allows module subtyping as long as the internal
representation is unchanged.
Compilers:
- More aggressive constant propagation, including float and
int32/int64/nativeint arithmetic. Constant propagation for floats
can be turned off with option -no-float-const-prop, for codes that
change FP rounding modes at run-time.
- New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
- New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
- Optimization of sequences of string patterns
- Experimental native code generator for AArch64 (ARM 64 bits)
- Optimization of integer division and modulus by constant divisors
- Add "-open" command line flag for opening a single module before typing
* "-o" now sets module name to the output file name up to the first "."
(it also applies when "-o" is not given, i.e. the module name is then
the input file name up to the first ".")
* better sharing of structured constants
- new flag to keep locations in cmi files
- issue warning 3 when referring to a value marked with
the [@@ocaml.deprecated] attribute
- a new format implementation based on GADTs
* Constant exception constructors no longer allocate
- avoid unnecessary boxing in let
- Better compilation of optional arguments with default values
- ocamlopt -opaque option for incremental native compilation
Toplevel interactive system:
- New "#show_*" directives
Runtime system:
- New configure option "-no-naked-pointers" to improve performance by
avoiding page table tests during block darkening and the marking phase
of the major GC. In this mode, all out-of-heap pointers must point at
things that look like OCaml values: in particular they must have a valid
header. The colour of said headers should be black.
- Fixed bug in native code version of [caml_raise_with_string] that could
potentially lead to heap corruption.
- Blocks initialized by [CAMLlocal*] and [caml_alloc] are now filled with
[Val_unit] rather than zero.
- Fixed a major performance problem on large heaps (~1GB) by making heap
increments proportional to heap size by default
- Structural equality treats exception specifically
- efficient comparison/indexing of exceptions
- avoid using unsafe C library functions (strcpy, strcat, sprintf)
- An ISO C99-compliant C compiler and standard library is now assumed.
(Plus special exceptions for MSVC.) In particular, emulation code for
64-bit integer arithmetic was removed, the C compiler must support a
64-bit integer type.
Standard library:
* Add new modules Bytes and BytesLabels for mutable byte sequences.
- add List.sort_uniq and Set.of_list
- a faster version of "raise" which does not maintain the backtrace
- support "Unix.kill pid Sys.sigkill" under Windows
- speed improvement for Buffer
- efficient creation of uninitialized float arrays
- Improve documentation regarding finalisers and multithreading
- Trigger warning 3 for all values marked as deprecated in the documentation.
2014-10-09 21:08:28 +02:00
|
|
|
MASTER_SITES= http://caml.inria.fr/pub/distrib/ocaml-4.02/
|
|
|
|
#EXTRACT_SUFX= .tar.bz2
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2013-02-18 17:29:28 +01:00
|
|
|
MAINTAINER= jaapb@NetBSD.org
|
2004-12-24 18:16:04 +01:00
|
|
|
HOMEPAGE= http://caml.inria.fr/ocaml/
|
|
|
|
COMMENT= The latest implementation of the Caml dialect of ML
|
2011-03-29 15:45:01 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2005-05-22 22:07:36 +02:00
|
|
|
USE_TOOLS+= gmake
|
2004-12-24 18:16:04 +01:00
|
|
|
HAS_CONFIGURE= yes
|
2012-06-22 13:36:10 +02:00
|
|
|
CONFIGURE_ENV+= BDB_LIBS=${BDB_LINK:Q}
|
2006-02-02 21:47:26 +01:00
|
|
|
CONFIGURE_ENV+= BDB_BUILTIN=${USE_BUILTIN.${BDB_TYPE}:Q}
|
2008-01-23 21:42:25 +01:00
|
|
|
CONFIGURE_ARGS+= -prefix ${PREFIX}
|
2006-02-02 21:47:26 +01:00
|
|
|
CONFIGURE_ARGS+= -libs ${LDFLAGS:Q}
|
2004-12-24 18:16:04 +01:00
|
|
|
CONFIGURE_ARGS+= -with-pthread
|
2006-10-03 23:06:25 +02:00
|
|
|
CONFIGURE_ARGS+= -host ${MACHINE_GNU_PLATFORM:Q}
|
2015-04-03 00:40:09 +02:00
|
|
|
CONFIGURE_ARGS+= -mandir ${PREFIX}/lib/ocaml/${PKGMANDIR}
|
2005-06-14 23:00:41 +02:00
|
|
|
CPPFLAGS+= -DDB_DBM_HSEARCH
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2009-09-08 20:35:46 +02:00
|
|
|
DISTINFO_FILE= ${.CURDIR}/../../lang/ocaml/distinfo
|
|
|
|
PATCHDIR= ${.CURDIR}/../../lang/ocaml/patches
|
2008-12-22 21:04:07 +01:00
|
|
|
|
2004-12-24 18:16:04 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2015-09-07 14:02:05 +02:00
|
|
|
.if ${OPSYS} == "Linux"
|
2004-12-24 18:16:04 +01:00
|
|
|
INSTALL_UNSTRIPPED= yes
|
|
|
|
.endif
|
|
|
|
|
2015-08-22 12:45:13 +02:00
|
|
|
.if ${OPSYS} == "Darwin"
|
|
|
|
CONFIGURE_ARGS+= -cc "${CC} -arch ${MACHINE_ARCH}"
|
|
|
|
CONFIGURE_ARGS+= -aspp "${CC} -arch ${MACHINE_ARCH} -c"
|
|
|
|
CONFIGURE_ARGS+= -as "as -arch ${MACHINE_ARCH}"
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= -cc ${CC}
|
|
|
|
.endif
|
|
|
|
|
2005-06-14 23:00:41 +02:00
|
|
|
.include "../../mk/bdb.buildlink3.mk"
|
|
|
|
|
2012-06-22 13:36:10 +02:00
|
|
|
BDB_LINK= ${BDB_LIBS}
|
|
|
|
.if empty(BDBBASE:M/usr)
|
|
|
|
BDB_LINK+= -L${BDBBASE}/lib ${COMPILER_RPATH_FLAG}${BDBBASE}/lib
|
|
|
|
.endif
|
|
|
|
|
2005-01-19 18:43:59 +01:00
|
|
|
post-extract: cp-power-bsd cp-gnu-config
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2006-02-02 21:47:26 +01:00
|
|
|
.PHONY: cp-power-bsd
|
2004-12-24 18:16:04 +01:00
|
|
|
cp-power-bsd:
|
2008-01-23 21:42:25 +01:00
|
|
|
${CP} ${WRKSRC}/asmrun/power-elf.S ${WRKSRC}/asmrun/power-bsd.S
|
2004-12-24 18:16:04 +01:00
|
|
|
|
2006-02-02 21:47:26 +01:00
|
|
|
.PHONY: cp-gnu-config
|
2005-01-19 18:43:59 +01:00
|
|
|
cp-gnu-config:
|
2008-01-23 21:42:25 +01:00
|
|
|
${CP} ${PKGSRCDIR}/mk/gnu-config/config.guess ${WRKSRC}/config/gnu/
|
|
|
|
${CP} ${PKGSRCDIR}/mk/gnu-config/config.sub ${WRKSRC}/config/gnu/
|
2005-01-19 18:43:59 +01:00
|
|
|
|
2004-12-24 18:16:04 +01:00
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|