components/ocaml/Makefile
changeset 5682 94c0ca64c022
parent 4339 6501cf9c29f9
child 7170 019e1326fbcf
equal deleted inserted replaced
5681:b8fe51f35344 5682:94c0ca64c022
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 BUILD_BITS= 32
    26 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    27 
    27 
    28 PATH=/usr/bin:/usr/gnu/bin:/usr/sbin:$(SPRO_VROOT)/bin
    28 PATH=$(USRBINDIR):$(GNUBIN):$(USRSBINDIR):$(SPRO_VROOT)/bin
    29 
    29 
    30 COMPONENT_NAME=		ocaml
    30 COMPONENT_NAME=		ocaml
    31 COMPONENT_VERSION=	3.11.2
    31 COMPONENT_VERSION=	3.11.2
    32 COMPONENT_PROJECT_URL=	http://www.ocaml.org
    32 COMPONENT_PROJECT_URL=	http://www.ocaml.org
    33 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    34 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
    35 COMPONENT_ARCHIVE_HASH= \
    34 COMPONENT_ARCHIVE_HASH= \
    36     sha256:86f3387a0d7e7c8be2a3c53af083a5a726e333686208d5ea0dd6bb5ac3f58143
    35     sha256:86f3387a0d7e7c8be2a3c53af083a5a726e333686208d5ea0dd6bb5ac3f58143
    37 COMPONENT_ARCHIVE_URL=	http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE)
    36 COMPONENT_ARCHIVE_URL=	http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE)
    38 
    37 
    51 COMPONENT_ARCHIVE_3= ocaml-3.11-refman.info.tar.gz
    50 COMPONENT_ARCHIVE_3= ocaml-3.11-refman.info.tar.gz
    52 COMPONENT_ARCHIVE_HASH_3= \
    51 COMPONENT_ARCHIVE_HASH_3= \
    53     sha256:48eedc6a870bef84562b2d0ed25d9c3b15ab646f72ecfb4c6c2cbaccc6b4081d
    52     sha256:48eedc6a870bef84562b2d0ed25d9c3b15ab646f72ecfb4c6c2cbaccc6b4081d
    54 COMPONENT_ARCHIVE_URL_3= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE_3)
    53 COMPONENT_ARCHIVE_URL_3= http://caml.inria.fr/distrib/ocaml-3.11/$(COMPONENT_ARCHIVE_3)
    55 
    54 
    56 COMPONENT_BUGDB=	utility/ocaml
       
    57 
       
    58 TPNO=			9233
    55 TPNO=			9233
    59 
    56 
    60 include $(WS_MAKE_RULES)/prep.mk
    57 TEST_TARGET= $(NO_TESTS)
    61 include $(WS_MAKE_RULES)/configure.mk
    58 include $(WS_MAKE_RULES)/common.mk
    62 include $(WS_MAKE_RULES)/ips.mk
       
    63 
       
    64 CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
       
    65 
       
    66 # We don't support 64-bit yet, but this will be needed when we do.
       
    67 CONFIGURE_ENV.64 += UL_LDFLAGS="-m64"
       
    68 
    59 
    69 # Ocaml does not use a standard configure script, but has its own handwritten
    60 # Ocaml does not use a standard configure script, but has its own handwritten
    70 # one.  So we must specify the arguments it accepts by hand.
    61 # one.  So we must specify the arguments it accepts by hand.
    71 #
    62 #
    72 CONFIGURE_OPTIONS = --bindir $(CONFIGURE_BINDIR.$(BITS))
    63 CONFIGURE_OPTIONS = --bindir $(CONFIGURE_BINDIR.$(BITS))
   101 # utilities are useful additions from Debian, and also included in RHEL.
    92 # utilities are useful additions from Debian, and also included in RHEL.
   102 # http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocamlbyteinfo;hb=HEAD
    93 # http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml.git;a=tree;f=debian/ocamlbyteinfo;hb=HEAD
   103 #
    94 #
   104 
    95 
   105 COMPONENT_POST_BUILD_ACTION = (cd $(@D); \
    96 COMPONENT_POST_BUILD_ACTION = (cd $(@D); \
   106                 export LD_EXEC_OPTIONS="-z aslr=disable"; \
    97                 export LD_EXEC_OPTIONS="$(ASLR_DISABLE)"; \
   107                 $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_1); \
    98                 $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_1); \
   108                 $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_3); \
    99                 $(UNPACK) $(UNPACK_ARGS) ../../$(COMPONENT_ARCHIVE_3); \
   109                 $(CP) $(COMPONENT_DIR)/files/ocamlbyteinfo.ml $(@D); \
   100                 $(CP) $(COMPONENT_DIR)/files/ocamlbyteinfo.ml $(@D); \
   110                 $(CP) $(COMPONENT_DIR)/files/ocamlplugininfo.ml $(@D); \
   101                 $(CP) $(COMPONENT_DIR)/files/ocamlplugininfo.ml $(@D); \
   111                 $(CP) ./otherlibs/dynlink/natdynlink.ml .; \
   102                 $(CP) ./otherlibs/dynlink/natdynlink.ml .; \
   151 # Files built in the COMPONENT_POST_INSTALL_ACTION are found by setting 
   142 # Files built in the COMPONENT_POST_INSTALL_ACTION are found by setting 
   152 # PKG_PROTO_DIRS as follows:
   143 # PKG_PROTO_DIRS as follows:
   153 #
   144 #
   154 PKG_PROTO_DIRS +=       $(BUILD_DIR_$(BITS))
   145 PKG_PROTO_DIRS +=       $(BUILD_DIR_$(BITS))
   155 
   146 
   156 # common targets
       
   157 configure:	$(CONFIGURE_32)
       
   158 
       
   159 build:		$(BUILD_32)
       
   160 
       
   161 install:	$(INSTALL_32)
       
   162 
       
   163 test:		$(NO_TESTS)
       
   164 
       
   165 system-test:    $(NO_TESTS)
       
   166 
       
   167 
       
   168 REQUIRED_PACKAGES += runtime/tcl-8
   147 REQUIRED_PACKAGES += runtime/tcl-8
   169 REQUIRED_PACKAGES += runtime/tk-8
   148 REQUIRED_PACKAGES += runtime/tk-8
   170 REQUIRED_PACKAGES += shell/ksh93
   149 REQUIRED_PACKAGES += shell/ksh93
   171 REQUIRED_PACKAGES += system/library
       
   172 REQUIRED_PACKAGES += system/library/math
   150 REQUIRED_PACKAGES += system/library/math
   173 REQUIRED_PACKAGES += x11/library/libx11
   151 REQUIRED_PACKAGES += x11/library/libx11