diff --git a/.github/scripts/main/hygiene.sh b/.github/scripts/main/hygiene.sh index 343bed632f1..36aa187adc2 100644 --- a/.github/scripts/main/hygiene.sh +++ b/.github/scripts/main/hygiene.sh @@ -77,10 +77,9 @@ esac ### (set +x ; echo -en "::group::check src_ext patches\r") 2>/dev/null -# Check that the lib-ext/lib-pkg patches are "simple" +# Check that the lib-ext patches are "simple" make -C src_ext PATCH="busybox patch" clone -make -C src_ext PATCH="busybox patch" clone-pkg -# Check that the lib-ext/lib-pkg patches have been re-packaged +# Check that the lib-ext patches have been re-packaged cd src_ext ../shell/re-patch.sh if [[ $(find patches -name \*.old | wc -l) -ne 0 ]] ; then diff --git a/.github/workflows/ci.ml b/.github/workflows/ci.ml index 8bf9b0673ad..a7e14541c02 100644 --- a/.github/workflows/ci.ml +++ b/.github/workflows/ci.ml @@ -385,7 +385,6 @@ let cold_job ~analyse_job ~build_linux_job ~build_windows_job ~build_macOS_job ? ++ cache Archives ++ run "Cold" [ "make compiler"; - "make lib-pkg"; "bash -exu .github/scripts/main/main.sh " ^ host] ++ run "Test (basic)" ["bash -exu .github/scripts/main/test.sh"] ++ end_job f diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c996928f85a..215c1fd1173 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -390,7 +390,6 @@ jobs: - name: Cold run: | make compiler - make lib-pkg bash -exu .github/scripts/main/main.sh x86_64-pc-linux-gnu - name: Test (basic) run: bash -exu .github/scripts/main/test.sh diff --git a/.gitignore b/.gitignore index a7572e3fe90..e572afb4dd9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,13 +11,11 @@ tests/reftests/.merlin .envrc src_ext/*.*download src_ext/*.*stamp -src_ext/*.pkgbuild src_ext/*.tar.gz src_ext/*.tbz src_ext/0install-solver/ src_ext/archives/* src_ext/base64/ -src_ext/camlp4 src_ext/cmdliner/ src_ext/cppo/ src_ext/cudf/ @@ -28,7 +26,6 @@ src_ext/extlib/ src_ext/findlib src_ext/lib src_ext/mccs/ -src_ext/ocamlbuild src_ext/ocamlgraph/ src_ext/opam-0install-cudf/ src_ext/jsonm/ @@ -42,7 +39,6 @@ src_ext/sha/ src_ext/spdx_licenses/ src_ext/stdlib-shims/ src_ext/swhid_core/ -src_ext/topkg/ Opam.Runtime.*/ *.tar.bz2 *.annot diff --git a/Makefile b/Makefile index 76fd1e18723..9ba7c088aa3 100644 --- a/Makefile +++ b/Makefile @@ -81,15 +81,9 @@ opam-admin.top: $(DUNE_DEP) lib-ext: $(MAKE) -j -C src_ext lib-ext -lib-pkg: - $(MAKE) -j -C src_ext lib-pkg - download-ext: $(MAKE) -C src_ext cache-archives -download-pkg: - $(MAKE) -C src_ext archives-pkg - clean-ext: $(MAKE) -C src_ext distclean diff --git a/Makefile.config.in b/Makefile.config.in index 044c6a01d3b..2933541c81d 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -4,8 +4,6 @@ mandir = @mandir@ version = @PACKAGE_VERSION@ FETCH = @fetch@ -PACKS = $(filter-out no,@OCAML_PKG_unix@ @OCAML_PKG_extlib@ @OCAML_PKG_re@ @OCAML_PKG_re_glob@ @OCAML_PKG_cmdliner@ @OCAML_PKG_ocamlgraph@ @OCAML_PKG_cudf@ @OCAML_PKG_dose3_common@ @OCAML_PKG_dose3_algo@ @OCAML_PKG_opam_file_format@ @OCAML_PKG_mccs@) - CONF_OCAMLFLAGS = @CONF_OCAMLFLAGS@ MCCS_ENABLED = @MCCS_ENABLED@ diff --git a/README.md b/README.md index 6ff8056a07d..dec6249a99e 100644 --- a/README.md +++ b/README.md @@ -116,17 +116,9 @@ The `OCAML_PORT` variable determines which flavour of Windows OCaml is compiled; (i.e., the native C compiler *for Cygwin*), `OCAML_PORT` does not need to be specified and `auto` will be assumed. Once the compiler is built, you may run: ``` -make lib-pkg +./configure --with-vendored-deps ``` -to install the dependencies as `findlib` packages to the compiler. Building `lib-pkg` -requires the ability to create native symbolic links (and the `CYGWIN` variable -*must* include `winsymlinks:native`). This means that either Cygwin must be run -elevated from an account with administrative privileges, or your user account must be -granted the _SeCreateSymbolicLinkPrivilege_ either by enabling Developer mode on -Windows 10 or using Local Security Policy on earlier versions of Windows. -Alternatively, you may run `configure` and use vendored deps, as advised. - -You can then `configure` and build opam as above. +and build opam as above. ## Compiling Without OCaml diff --git a/master_changes.md b/master_changes.md index 2684640ed0e..ffa89282898 100644 --- a/master_changes.md +++ b/master_changes.md @@ -93,6 +93,7 @@ users) ## Build * Upgrade vendored cmdliner to 1.3.0 [#5970 @kit-ty-kate] + * Remove unused/untested Makefile targets lib-pkg [#5494 @kit-ty-kate] ## Infrastructure * Ensure GNU coreutils available on the macOS 14 CI runners [#5938 @dra27] diff --git a/shell/re-patch.sh b/shell/re-patch.sh index c1e8a53ab32..d4d0a19aa7e 100755 --- a/shell/re-patch.sh +++ b/shell/re-patch.sh @@ -18,10 +18,6 @@ for package in $(cd patches ; find . -maxdepth 1 -mindepth 1 -type d | sed -e 's # Determine which directories contain patches and which modes to test (lib-pkg/lib-ext) locs='' - if [[ -d patches/$package.common ]] ; then - locs="../patches/$package.common/*.patch" - modes="stamp pkgstamp" - fi if [[ -d patches/$package ]] ; then modes=${modes:-stamp} libext_locs="../patches/$package/*.patch" diff --git a/src_ext/HACKING.md b/src_ext/HACKING.md index d6ed7d47397..b175a5e0776 100644 --- a/src_ext/HACKING.md +++ b/src_ext/HACKING.md @@ -6,36 +6,33 @@ Files related to the dependency vendoring are kept in the `src_ext` directory. T - `shell/bootstrap-ocaml.sh` - assembles an OCaml compiler in `bootstrap/` - `shell/re-patch.sh` - when run from the `src_ext/` directory, normalises all the patch files (eliminating git-specific features, etc.) -## lib-ext and lib-pkg +## Mode of operation -There are two modes of operation. `lib-ext` uses Dune vendoring and assembles the dependencies of opam in subdirectories of `src_ext/`, allowing Dune to build them with opam. In this mode, only the `opam` binary can then be installed: the libraries are not installable (as with all Dune vendoring with libraries). `lib-pkg` installs the libraries to a given compiler using either `dune install` (for dependencies which use Dune) or `ocamlfind install` for any others. This mode is typically used to install dependencies to the compiler built in `bootstrap/` by `shell/bootstrap-ocaml.sh`. In `lib-pkg`, the dependency's preferred build system is used, in `lib-ext`, the package must use Dune. +We use Dune vendoring and assembles the dependencies of opam in subdirectories of `src_ext/`, allowing Dune to build them with opam. Only the `opam` binary can then be installed: the libraries are not installable (as with all Dune vendoring with libraries). ## Patching -Package sources have patches applied from two places. For package `foo`, the patches in `src_ext/foo.common` and then patches in `src_ext/foo` (for `lib-ext` mode) or `src_ext/foo.pkg` (for `lib-pkg` mode) are applied (within those directories, patches apply in the order returned by shell globbing). Patches placed here are either to back-port the package to an older version of OCaml than upstream supports, or to back-port a fix from an unreleased version of package. +Package sources have patches applied from two places. For package `foo`, the patches in `src_ext/foo` are applied (within those directories, patches apply in the order returned by shell globbing). Patches placed here are either to back-port the package to an older version of OCaml than upstream supports, or to back-port a fix from an unreleased version of package. -In `lib-ext` mode, `dune` files can be dropped into the extracted package sources, after patching, by creating a file named `src_ext/dune-foo`. If the package needs dropping in a subdirectory, then these can be appended to the filename, using `-` instead of `/`. For example, `src_ext/dune-foo-src-lib` will be copied to `src/lib/dune` when package `foo` is extracted. +`dune` files can be dropped into the extracted package sources, after patching, by creating a file named `src_ext/dune-foo`. If the package needs dropping in a subdirectory, then these can be appended to the filename, using `-` instead of `/`. For example, `src_ext/dune-foo-src-lib` will be copied to `src/lib/dune` when package `foo` is extracted. Finally, `src_ext/Makefile` provides an opportunity for package-specific commands to be run by adding specific commands to the `.stamp` targets. See, for example, the horrors in [f721385](https://github.com/ocaml/opam/commit/f721385). ## Updating the dependencies -`src_ext/update-sources.sh` will attempt to use repository data from your current opam switch to automatically update `src_ext/Makefile.sources`. For some packages, the script may make the wrong determination (e.g. cudf 0.9, where opam's sources stick with the original gforge source archive), so the changes suggested should be reviewed carefully! After updating the dependencies, it's important to check that the patches still work. These can be triggered manually with `make clone` (for `lib-ext`) or `make clone-pkg` (for `lib-pkg`). If a patch no longer applies, it needs to be updated or replaced (e.g. by rebasing a git commit and using `git format-patch` or by manually applying the changes to a clean worktree and using `diff -Naur`, etc.). Once the patches are correct and `make clone` is working, run `../shell/re-patch.sh` to normalise the patches. This script will apply the patches as given and then regenerate them using `diff`. +`src_ext/update-sources.sh` will attempt to use repository data from your current opam switch to automatically update `src_ext/Makefile.sources`. For some packages, the script may make the wrong determination (e.g. cudf 0.9, where opam's sources stick with the original gforge source archive), so the changes suggested should be reviewed carefully! After updating the dependencies, it's important to check that the patches still work. These can be triggered manually with `make clone`. If a patch no longer applies, it needs to be updated or replaced (e.g. by rebasing a git commit and using `git format-patch` or by manually applying the changes to a clean worktree and using `diff -Naur`, etc.). Once the patches are correct and `make clone` is working, run `../shell/re-patch.sh` to normalise the patches. This script will apply the patches as given and then regenerate them using `diff`. ## Dune and mccs -The Dune vendored dependency is a special case: firstly, in lib-ext mode it's optional and secondly the package is called `dune-local`. The name avoids conflict with a directory called `dune` (which Dune itself can't cope with). mccs is also a special case, because it's optional in lib-ext mode. +The Dune vendored dependency is a special case: firstly, it's optional and secondly the package is called `dune-local`. The name avoids conflict with a directory called `dune` (which Dune itself can't cope with). mccs is also a special case, because it's optional. ## Adding a new dependency -1. Add the tarball information to `src_ext/Makefile.sources`. If the package is used in `lib-ext` mode, define `URL_package` and `MD5_package`. If the same package is used in `lib-pkg` mode, add `$(call PKG_SAME,package)`, otherwise define `URL_PKG_package` and `MD5_PKG_package`. If a package is only used in `lib-pkg` mode, don't define `URL_package` and `MD5_package`. -2. Add `package` to `SRC_EXTS` or `PKG_EXTS in `src_ext/Makefile`. -3. Put any requires patches in `src_ext/patches/` (in `package.common/` for both modes, `package/` for `lib-ext` mode and `package.pkg/` for `lib-pkg` mode). +1. Add the tarball information to `src_ext/Makefile.sources`. Define `URL_package` and `MD5_package`. +2. Add `package` to `SRC_EXTS` in `src_ext/Makefile`. +3. Put any requires patches in `src_ext/patches/` (in `package/`). 4. If the package's build system is not Dune, create `src_ext/dune-package`. The build system `touch`es `package.opam` when assembling the sources. -5. Add a `package.pkgbuild:` entry to `src_ext/Makefile.packages` containing the dependencies of `package`. -6. Add a `package-pkg-build:` target with the build steps for building and installing `package`. Various utility variables are available in `src_ext/Makefile.packages`, in particular `$(OCAMLBIN)` is the compiler's `bin` directory and `$(SITELIB)` is the ocamlfind library root (effectively `%{lib}%` in opam) and `$(OCAMLROOT)` is the actual prefix of the compiler's installation. ## Testing -* For `lib-pkg` mode: run `make compiler`, backup `bootstrap` directory, and run `make lib-pkg` -* For `lib-ext` mode: run `./configure --with-vendored-deps`, then `make` +run `./configure --with-vendored-deps`, then `make` diff --git a/src_ext/Makefile b/src_ext/Makefile index 9149517c4a7..3136bc64365 100644 --- a/src_ext/Makefile +++ b/src_ext/Makefile @@ -1,12 +1,9 @@ -ifneq ($(wildcard ../Makefile.config)$(filter-out archives cache-archives lib-pkg,$(MAKECMDGOALS)),) +ifneq ($(wildcard ../Makefile.config)$(filter-out archives cache-archives,$(MAKECMDGOALS)),) -include ../Makefile.config endif ifneq ($(wildcard Makefile.config),) include Makefile.config -CAN_PKG=1 -else -CAN_PKG=0 endif PATCH ?= patch @@ -25,32 +22,18 @@ ifndef FETCH endif endif -# Shorthand for designating that lib-ext and lib-pkg use the same version of a library -PKG_SAME = $(eval $(call PKG_SAME_DEFS,$(1))) -define PKG_SAME_DEFS -URL_PKG_$(1) = $(URL_$(1)) -MD5_PKG_$(1) = $(MD5_$(1)) -endef - SRC_EXTS = cppo base64 extlib re cmdliner ocamlgraph cudf dose3 opam-file-format seq stdlib-shims spdx_licenses opam-0install-cudf 0install-solver uutf jsonm sha swhid_core -PKG_EXTS = $(SRC_EXTS) dune-local findlib ocamlbuild topkg mccs ifeq ($(MCCS_ENABLED),true) SRC_EXTS := $(SRC_EXTS) mccs endif include Makefile.sources -ifneq ($(shell PATH="$(PATH)" command -v ocamlc 2>/dev/null),) -include Makefile.packages -endif ARCHIVES = $(foreach lib,$(SRC_EXTS),$(notdir $(URL_$(lib)))) lib_of = $(foreach lib,$(SRC_EXTS),$(if $(findstring $(1),$(URL_$(lib))),$(lib),,)) ARCHIVE_FILE = $(1)$(patsubst %.tbz,.tbz,$(patsubst %.tar.gz,.tar.gz,$(URL_$(2)$(1)))) -DOWNLOAD_COOKIE = touch $(1).$(4)download && \ - $(if $(filter $(MD5_$(2)$(1)),$(MD5_$(3)$(1))),touch,rm -f) $(1).$(5)download && \ - rm -f $(call ARCHIVE_FILE,$(1),$(2)) $(1).stamp $(1).pkgbuild SILENT ?= @@ -82,25 +65,6 @@ else $(error Re-run configure --with-vendored-deps) endif -ifeq ($(CAN_PKG),1) -lib-pkg: clone-pkg build-pkg - @ -else -lib-pkg: - @echo "Installation of packages is only permitted for the bootstrap compiler" - @echo "Run $(MAKE) [OCAML_PORT=auto|msvc|msvc64|mingw|mingw64] compiler first" - @false -endif - -.PHONY: lib-pkg-urls -lib-pkg-urls: - @$(foreach i,$(PKG_EXTS),$(info $i $(URL_PKG_$i))) - @find patches -type f | grep '\.\(pkg\|common\)/' | xargs sha1sum - -reset-lib-pkg: - @rm -f ../bootstrap/ocaml/bin/ocamlbuild* ../bootstrap/ocaml/bin/ocamlfind* `ls ../bootstrap/ocaml/bin/* | grep -v "flexlink\|\/ocaml[^\/]*$$"` ../bootstrap/ocaml/lib/topfind - @rm -rf ../bootstrap/ocaml/lib/ocaml/site-lib ../bootstrap/ocaml/etc *.pkgbuild - ifeq ($(DUNE),) DUNE_DEP=dune-local/_boot/dune$(EXE) DUNE_CLONE=dune-local.stamp @@ -117,47 +81,24 @@ endif dune-local/_boot/dune$(EXE): $(DUNE_CLONE) cd dune-local && ocaml boot/bootstrap.ml -build-pkg: clone-pkg $(PKG_EXTS:=.pkgbuild) - @ - -%.pkgbuild: | %.pkgstamp - @rm -f $*.pkgstamp - $(MAKE) MAKEFLAGS= -f ../Makefile.packages -C $* $*-pkg-build && touch $@ - -.PHONY: def-ignore -def-ignore: - @echo "; This file is automatically generated" > dune - @echo "(dirs :standard \ $(SRC_EXTS),$(PKG_EXTS))" >> dune - .PHONY: ext-ignore ext-ignore: @echo "; This file is automatically generated" > dune - @echo "(dirs :standard \ dune-local $(filter-out dune-local $(SRC_EXTS),$(PKG_EXTS)))" >> dune + @echo "(dirs :standard \ dune-local)" >> dune @echo "(vendored_dirs $(SRC_EXTS))" >> dune .PHONY: clone clone: $(DUNE_CLONE) $(SRC_EXTS:=.stamp) | ext-ignore @true -.PHONY: pkg-ignore -pkg-ignore: - @echo "; This file is automatically generated" > dune - @echo "(dirs :standard \ $(PKG_EXTS))" >> dune - -clone-pkg: $(PKG_EXTS:=.pkgstamp) | pkg-ignore - @ - .PHONY: archives archives: $(DUNE_CLONE:.stamp=.download) $(SRC_EXTS:=.download) @true -archives-pkg: $(PKG_EXTS:=.pkgdownload) +cache-archives: $(SRC_EXTS:=.cache) ocaml.cache flexdll.cache @ -cache-archives: $(SRC_EXTS:=.cache) $(PKG_EXTS:=.pkgcache) ocaml.cache flexdll.cache - @ - -has-archives: $(addprefix archives/, $(notdir $(URL_ocaml)) $(notdir $(URL_flexdll)) $(ARCHIVES) $(filter-out $(ARCHIVES), $(foreach pkg,$(PKG_EXTS), $(notdir $(URL_PKG_$(pkg)))))) +has-archives: $(addprefix archives/, $(notdir $(URL_ocaml)) $(notdir $(URL_flexdll)) $(ARCHIVES)) @ define cache_url @@ -176,34 +117,17 @@ GET_ARCHIVE=\ @test -e archives/$(notdir $(URL_$*)) || \ { $(call GET_ARCHIVE,$*) && mv $(call ARCHIVE_FILE,$*) archives/$(notdir $(URL_$*)); } -%.pkgcache: - @mkdir -p archives - @test -e archives/$(notdir $(URL_PKG_$*)) || \ - { $(call GET_ARCHIVE,$*,PKG_) && mv $(call ARCHIVE_FILE,$*,PKG_) archives/$(notdir $(URL_PKG_$*)); } - .PRECIOUS: %.download %.download: Makefile.sources - @$(call DOWNLOAD_COOKIE,$*,,PKG_,,pkg) $(SILENT)[ -e $(call ARCHIVE_FILE,$*) ] || \ cp archives/$(notdir $(URL_$*)) $(call ARCHIVE_FILE,$*) 2>/dev/null || $(call GET_ARCHIVE,$*) -%.pkgdownload: Makefile.sources - @$(call DOWNLOAD_COOKIE,$*,PKG_,,pkg) - [ -e $(call ARCHIVE_FILE,$*,PKG_) ] || \ - cp archives/$(notdir $(URL_PKG_$*)) $(call ARCHIVE_FILE,$*,PKG_) 2>/dev/null || $(call GET_ARCHIVE,$*,PKG_) - %.stamp: %.download $(SILENT)mkdir -p tmp-$* $(SILENT)cd tmp-$* && $(if $(patsubst %.tar.gz,,$(URL_$*)),bunzip2,gunzip) -c ../$(call ARCHIVE_FILE,$*) | tar xf - $(SILENT)rm -rf $* @for ii in tmp-$*/*; do if [ -d $${ii} ]; then mv $${ii} $*; fi; done; \ rm -rf tmp-$* - @if [ -d patches/$*.common ]; then \ - cd $* && \ - for p in ../patches/$*.common/*.patch; do \ - $(PATCH) -p1 < $$p $(if $(SILENT),> /dev/null); \ - done; \ - fi @if [ -d patches/$* ]; then \ cd $* && \ for p in ../patches/$*/*.patch; do \ @@ -218,34 +142,13 @@ GET_ARCHIVE=\ touch $*/$*.opam; \ done; \ fi - @touch $@ && rm -f $*.pkgstamp $*.pkgbuild - -%.pkgstamp: %.pkgdownload - mkdir -p tmp-$* - cd tmp-$* && tar xf$(if $(patsubst %.tar.gz,,$(call ARCHIVE_FILE,$*,PKG_)),j,z) ../$(call ARCHIVE_FILE,$*,PKG_) - rm -rf $* -# On Cygwin, the mv has a tedious habit of sometimes failing, hence the slightly odd repetition - @for ii in tmp-$*/*; do if [ -d $${ii} ]; then mv $${ii} $* || mv $${ii} $*; fi; done; \ - rm -rf tmp-$* - @if [ -d patches/$*.common ]; then \ - cd $* && \ - for p in ../patches/$*.common/*.patch; do \ - $(PATCH) -p1 < $$p; \ - done; \ - fi - @if [ -d patches/$*.pkg ]; then \ - cd $* && \ - for p in ../patches/$*.pkg/*.patch; do \ - $(PATCH) -p1 < $$p; \ - done; \ - fi - @touch $@ && rm -f $*.stamp + @touch $@ clean: @ distclean: clean - rm -rf dune-local secondary $(SRC_EXTS) $(PKG_EXTS) - rm -f *.tar.gz *.tbz *.*stamp *.*download *.pkgbuild dune \ + rm -rf dune-local secondary $(SRC_EXTS) + rm -f *.tar.gz *.tbz *.*stamp *.*download dune \ Makefile.config [ -d archives ] && ([ "$$(find archives -maxdepth 0 -type d -empty)" != "" ] && rmdir archives || echo "WARNING! $$(pwd)/archives/ not empty so left") || true diff --git a/src_ext/Makefile.packages b/src_ext/Makefile.packages deleted file mode 100644 index dac517e5c5f..00000000000 --- a/src_ext/Makefile.packages +++ /dev/null @@ -1,163 +0,0 @@ -EXT_LIB:=$(shell PATH="$(PATH)" ocamlc -config | tr -d '\r' | sed -ne "s/ext_lib: \.//p") -EXT_DLL:=$(shell PATH="$(PATH)" ocamlc -config | tr -d '\r' | sed -ne "s/ext_dll: \.//p") -EXT_EXE:=$(if $(filter Win32,$(shell PATH="$(PATH)" ocamlc -config | grep -F os_type)),.exe) -OCAMLBIN:=$(dir $(shell PATH="$(PATH)" command -v ocamlc)) -# SITELIB must *not* be evaluated with := (because it must be evaluated *after* -# ocamlfind has been compiled) -ifeq ($(shell command -v cygpath 2>/dev/null),) -OCAMLROOT:=$(dir $(abspath $(OCAMLBIN))) -SITELIB=$(shell PATH="$(PATH)" ocamlfind printconf path) -LDCONF=$(shell PATH="$(PATH)" ocamlfind printconf ldconf) -else -OCAMLROOT:=$(shell PATH="$(PATH)" echo $(dir $(abspath $(OCAMLBIN))) | cygpath -f - -m) -SITELIB=$(shell PATH="$(PATH)" ocamlfind printconf path | cygpath -f - -m) -LDCONF=$(shell PATH="$(PATH)" ocamlfind printconf ldconf | cygpath -f - -m) -endif - -# Package dependencies -opam-file-format.pkgbuild: findlib.pkgbuild dune-local.pkgbuild - -cppo.pkgbuild: dune-local.pkgbuild - -extlib.pkgbuild: dune-local.pkgbuild cppo.pkgbuild - -ocamlbuild.pkgbuild: findlib.pkgbuild - -re.pkgbuild: dune-local.pkgbuild seq.pkgbuild findlib.pkgbuild - -seq.pkgbuild: dune-local.pkgbuild - -ocamlgraph.pkgbuild: dune-local.pkgbuild stdlib-shims.pkgbuild - -topkg.pkgbuild: findlib.pkgbuild ocamlbuild.pkgbuild - -cmdliner.pkgbuild: dune-local.pkgbuild - -cudf.pkgbuild: dune-local.pkgbuild extlib.pkgbuild - -dose3.pkgbuild: dune-local.pkgbuild extlib.pkgbuild base64.pkgbuild re.pkgbuild ocamlgraph.pkgbuild cudf.pkgbuild stdlib-shims.pkgbuild - -# mccs.pkgbuild depends on findlib because the files are explicitly installed using it -mccs.pkgbuild: dune-local.pkgbuild cudf.pkgbuild findlib.pkgbuild - -opam-0install-cudf.pkgbuild: dune-local.pkgbuild cudf.pkgbuild 0install-solver.pkgbuild - -0install-solver.pkgbuild: dune-local.pkgbuild - -stdlib-shims.pkgbuild: dune-local.pkgbuild - -base64.pkgbuild: dune-local.pkgbuild - -dune-local.pkgbuild: findlib.pkgbuild - -spdx_licenses.pkgbuild: dune-local.pkgbuild - -uutf.pkgbuild: findlib.pkgbuild ocamlbuild.pkgbuild topkg.pkgbuild cmdliner.pkgbuild - -jsonm.pkgbuild: findlib.pkgbuild ocamlbuild.pkgbuild topkg.pkgbuild uutf.pkgbuild - -sha.pkgbuild: dune-local.pkgbuild stdlib-shims.pkgbuild - -swhid_core.pkgbuild: dune-local.pkgbuild - -stublibs: - grep -q "$(SITELIB)/stublibs" $(LDCONF) || echo $(SITELIB)/stublibs >> $(LDCONF) - -opam-file-format-pkg-build: - dune build @install -p opam-file-format - dune install "--prefix=$(OCAMLROOT)" -p opam-file-format opam-file-format - -findlib-pkg-build: - ./configure -sitelib "$(OCAMLROOT)lib" - echo "$(OCAMLROOT)lib/stublibs" >> "$(OCAMLROOT)lib/ocaml/ld.conf" - make all opt install - -cppo-pkg-build: - dune build @install -p cppo - cp _build/install/default/bin/cppo$(EXT_EXE) $(OCAMLBIN)/ - mkdir -p $(SITELIB)/cppo - cp _build/install/default/lib/cppo/META $(SITELIB)/cppo/ - -extlib-pkg-build: - dune build @install -p extlib - dune install "--prefix=$(OCAMLROOT)" -p extlib extlib - -ocamlbuild-pkg-build: - make -f configure.make all OCAMLBUILD_PREFIX=$(OCAMLROOT) OCAMLBUILD_BINDIR=$(OCAMLBIN) OCAMLBUILD_LIBDIR=$(SITELIB) OCAML_NATIVE=true OCAML_NATIVE_TOOLS=true - make all findlib-install - -re-pkg-build: - dune build @install -p re - dune install "--prefix=$(OCAMLROOT)" -p re re - -ocamlgraph-pkg-build: - dune installed-libraries - dune build @install -p ocamlgraph - dune install "--prefix=$(OCAMLROOT)" -p ocamlgraph ocamlgraph - -EXTS1=$(EXT_LIB) mli -EXTS2=a i ti xa xs - -topkg-pkg-build: - ocaml pkg/pkg.ml build --pkg-name topkg --dev-pkg false - ocamlfind install topkg _build/pkg/META $(addprefix _build/src/topkg.,$(EXTS1)) $(addprefix _build/src/topkg.cm,$(EXTS2)) _build/src/topkg*.cmx - -cmdliner-pkg-build: - dune build @install -p cmdliner - dune install "--prefix=$(OCAMLROOT)" -p cmdliner cmdliner - -cudf-pkg-build: - dune build @install -p cudf - dune install "--prefix=$(OCAMLROOT)" -p cudf cudf - -dose3-pkg-build: - dune build @install -p dose3 - dune install "--prefix=$(OCAMLROOT)" -p dose3 dose3 - -dune-local-pkg-build: - ocaml boot/bootstrap.ml - cp _boot/dune.exe $(OCAMLBIN)/dune$(EXT_EXE) - -mccs-pkg-build: stublibs - dune build @install -p mccs - dune install "--prefix=$(OCAMLROOT)" -p mccs mccs - -opam-0install-cudf-pkg-build: - dune build @install -p opam-0install-cudf - dune install "--prefix=$(OCAMLROOT)" -p opam-0install-cudf opam-0install-cudf - -0install-solver-pkg-build: - dune build @install -p 0install-solver - dune install "--prefix=$(OCAMLROOT)" -p 0install-solver 0install-solver - -seq-pkg-build: - dune build @install -p seq - dune install "--prefix=$(OCAMLROOT)" -p seq seq - -stdlib-shims-pkg-build: - dune build @install -p stdlib-shims - dune install "--prefix=$(OCAMLROOT)" -p stdlib-shims stdlib-shims - -base64-pkg-build: - dune build @install -p base64 - dune install "--prefix=$(OCAMLROOT)" -p base64 base64 - -spdx_licenses-pkg-build: - dune build @install -p spdx_licenses - dune install "--prefix=$(OCAMLROOT)" -p spdx_licenses spdx_licenses - -uutf-pkg-build: - ocaml pkg/pkg.ml build --pkg-name uutf --dev-pkg false --with-cmdliner true - ocamlfind install uutf _build/pkg/META $(addprefix _build/src/uutf.,$(EXTS1)) $(addprefix _build/src/uutf.cm,$(EXTS2)) _build/src/uutf*.cmx - -jsonm-pkg-build: - ocaml pkg/pkg.ml build --pkg-name jsonm --pinned false - ocamlfind install jsonm _build/pkg/META $(addprefix _build/src/jsonm.,$(EXTS1)) $(addprefix _build/src/jsonm.cm,$(EXTS2)) _build/src/jsonm*.cmx - -sha-pkg-build: stublibs - dune build @install -p sha - dune install "--prefix=$(OCAMLROOT)" -p sha sha - -swhid_core-pkg-build: - dune build @install -p swhid_core - dune install "--prefix=$(OCAMLROOT)" -p swhid_core swhid_core diff --git a/src_ext/Makefile.sources b/src_ext/Makefile.sources index 62857412561..b8079bbedb3 100644 --- a/src_ext/Makefile.sources +++ b/src_ext/Makefile.sources @@ -1,107 +1,58 @@ URL_cppo = https://github.com/ocaml-community/cppo/archive/v1.6.9.tar.gz MD5_cppo = d23ffe85ac7dc8f0afd1ddf622770d09 -$(call PKG_SAME,cppo) - URL_extlib = https://github.com/ygrek/ocaml-extlib/releases/download/1.7.9/extlib-1.7.9.tar.gz MD5_extlib = f7ca7f1c82e15a99603b88f730fd7b8a -$(call PKG_SAME,extlib) - URL_base64 = https://github.com/mirage/ocaml-base64/releases/download/v3.5.1/base64-3.5.1.tbz MD5_base64 = bfdd16aa8c136412878109df8791fc01 -$(call PKG_SAME,base64) - URL_re = https://github.com/ocaml/ocaml-re/releases/download/1.11.0/re-1.11.0.tbz MD5_re = e0199e32947fd33fcc1b8e69de2308a1 -$(call PKG_SAME,re) - URL_cmdliner = https://erratique.ch/software/cmdliner/releases/cmdliner-1.3.0.tbz MD5_cmdliner = 662936095a1613d7254815238e11793f -$(call PKG_SAME,cmdliner) - URL_ocamlgraph = https://github.com/backtracking/ocamlgraph/releases/download/2.1.0/ocamlgraph-2.1.0.tbz MD5_ocamlgraph = 4200d8f223aa7a32b4024e4553821c7c -$(call PKG_SAME,ocamlgraph) - URL_cudf = https://gitlab.com/irill/cudf/-/archive/v0.10/cudf-v0.10.tar.gz MD5_cudf = ed8fea314d0c6dc0d8811ccf860c53dd -$(call PKG_SAME,cudf) - URL_dose3 = https://gitlab.com/irill/dose3/-/archive/7.0.0/dose3-7.0.0.tar.gz MD5_dose3 = bc99cbcea8fca29dca3ebbee54be45e1 -$(call PKG_SAME,dose3) - URL_mccs = https://github.com/ocaml-opam/ocaml-mccs/archive/refs/tags/1.1+17.tar.gz MD5_mccs = 844d99bc531e0713238fe4b6b8511ed1 -$(call PKG_SAME,mccs) - URL_opam-0install-cudf = https://github.com/ocaml-opam/opam-0install-solver/releases/download/v0.4.3/opam-0install-cudf-0.4.3.tbz MD5_opam-0install-cudf = ae0c197deace373ad87737468a04f76b -$(call PKG_SAME,opam-0install-cudf) - URL_0install-solver = https://github.com/0install/0install/releases/download/v2.18/0install-2.18.tbz MD5_0install-solver = 030edc9b1d3676c06d51397ffb5a737d -$(call PKG_SAME,0install-solver) - URL_opam-file-format = https://github.com/ocaml/opam-file-format/archive/refs/tags/2.1.6.tar.gz MD5_opam-file-format = 706ce5fc3e77db746a4c8b11d79cefef -$(call PKG_SAME,opam-file-format) - include Makefile.dune -$(call PKG_SAME,dune-local) - -URL_PKG_findlib = http://download.camlcity.org/download/findlib-1.9.5.tar.gz -MD5_PKG_findlib = 8b893525ce36cb3d4d4952483bcc7cf4 - -URL_PKG_ocamlbuild = https://github.com/ocaml/ocamlbuild/archive/refs/tags/0.14.2.tar.gz -MD5_PKG_ocamlbuild = 2f407fadd57b073155a6aead887d9676 - -URL_PKG_topkg = https://erratique.ch/software/topkg/releases/topkg-1.0.6.tbz -MD5_PKG_topkg = 12f6f0a0220da2e4f685a94cb5248157 - URL_seq = https://github.com/c-cube/seq/archive/v0.3.1.tar.gz MD5_seq = de05d9dedd492fa4e3c0c87bc2792475 -$(call PKG_SAME,seq) - URL_stdlib-shims = https://github.com/ocaml/stdlib-shims/releases/download/0.3.0/stdlib-shims-0.3.0.tbz MD5_stdlib-shims = 09db7af8b4a3a96048a61cb6ae2496ef -$(call PKG_SAME,stdlib-shims) - URL_spdx_licenses = https://github.com/kit-ty-kate/spdx_licenses/releases/download/v1.2.0/spdx_licenses-1.2.0.tar.gz MD5_spdx_licenses = b581124aeebd7facb856d8b942cb58a5 -$(call PKG_SAME,spdx_licenses) - URL_uutf = https://erratique.ch/software/uutf/releases/uutf-1.0.3.tbz MD5_uutf = a308285514259d20b48abc92f00a3708 -$(call PKG_SAME,uutf) - URL_jsonm = https://erratique.ch/software/jsonm/releases/jsonm-1.0.2.tbz MD5_jsonm = bb21574ddd58543120430ff306b462e6 -$(call PKG_SAME,jsonm) - URL_sha = https://github.com/djs55/ocaml-sha/releases/download/v1.15.4/sha-1.15.4.tbz MD5_sha = 08bc953d9a26380bc220b05d680791fb -$(call PKG_SAME,sha) - URL_swhid_core = https://github.com/OCamlPro/swhid_core/archive/refs/tags/0.1.tar.gz MD5_swhid_core = 77d88d4b1d96261c866f140c64d89af8 - -$(call PKG_SAME,swhid_core) diff --git a/src_ext/Windows.md b/src_ext/Windows.md deleted file mode 100644 index 40c247cd8bd..00000000000 --- a/src_ext/Windows.md +++ /dev/null @@ -1,11 +0,0 @@ -# Installing packages - -[This information is expected to be primarily of use when compiling on Windows] - -`make lib-pkg` is supposed to be used only when a bootstrap compiler has been built using `make compiler` and will display an error if it run when no bootstrap directory exists. However it is possible to install missing packages in a system compiler (assuming appropriate privileges, etc.) by running: - -`make [-j] clone-pkg` - -to download and assemble the build directories. You may then touch any `.pkgbuild` to indicate which packages are *not* required (e.g. touch findlib.pkgbuild, if the system compiler already has ocamlfind) and then run: - -`make [-j] build-pkg` \ No newline at end of file