Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/opamPublic

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

License

NotificationsYou must be signed in to change notification settings

ocaml/opam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

master2.02.1
GH actions2.0 GH actions2.1 GH actions

Opam is a source-based package manager for OCaml. It supports multiple simultaneouscompiler installations, flexible package constraints, and a Git-friendly developmentworkflow.

Opam was created and is maintained byOCamlPro.

To get started, checkout theInstallandUsage guides.

Compiling This Repo

Either from an existing opam installation, useopam pin add . if you cloned locally the repository,opam pin add git+https://github.com/ocaml/opam otherwise, or:

  • Make sure you have the required dependencies installed:
    • GNU make
    • OCaml >= 4.08 (or seebelow)
    • A C++ compiler (unless building without a solver, see./configure --without-mccs)
  • Run./configure. If you don't have the dependencies installed, this willlocally take care of all OCaml dependencies for you (downloading them, unlessyou used the inclusive archive we provide for each release).
  • Runmake
  • Runmake install

This is all you need for installing and using opam, but if you want to use theopam-lib (to work on opam-related tools), you need to link it to installedlibraries. It's easier to already have a working opam installation in this case,so you can do it as a second step.

  • Make sure to haveocamlfind,ocamlgraph,cmdliner >= 1.0.0,cudf >= 0.7,dose3 >= 6.1,re >= 1.9.0,opam-file-format installed. Or runopam install . --deps-only if you already have a working instance. Re-run./configure once done
  • Runmake libinstall at the end

Note: If you install on your system (without changing the prefix), you willneed to install as root (sudo). Assudo does not propagate environmentvariables, there will be some errors. You can usesudo -E "PATH=$PATH" in orderto ensure you have a good environment for install.

Developer Mode

If you are developing opam, you may enable developer features by including the--enable-developer-mode parameter with./configure.

Compiling on Native Windows

Cygwin (https://www.cygwin.com/setup-x86_64.exe) is always required to build opam onWindows.

The following Cygwin packages are required:

  • From Devel -make
  • From Devel -patch (not required if OCaml and all required packages arepre-installed)
  • From Devel -autoconf
  • From Devel -curl
  • From Devel -mingw64-i686-gcc-g++ &mingw64-x86_64-gcc-g++ (not required ifbuilding with MSVC)

Alternatively, having downloaded Cygwin's setup program, Cygwin can be installedusing the following command line:

setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-g++,mingw64-x86_64-gcc-g++,patch,autoconf,curl

The--no-desktop and--no-startmenu switches may be omitted in order to createshortcuts on the Desktop and Start Menu, respectively. Executed this way, setup willstill be interactive, but the packages will have been preselected. To make setupfully unattended, choose a mirror URL fromhttps://cygwin.com/mirrors.lst and addthe--site switch to the command line(e.g.,--site=https://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/).

It is recommended that you set theCYGWIN environment variable tonodosfilewarning winsymlinks:native.

Cygwin is started either from a shortcut or by running:

C:\cygwin64\bin\mintty -

We recommended you build opam outside Cygwin's root(so in/cygdrive/c/...). From an elevated Cygwin shell, edit/etc/fstab andensure that the file's content is exactly:

none /cygdrive cygdrive noacl,binary,posix=0,user 0 0

The change is the addition of thenoacl option to the mount instructions for/cygdrive and this stops from Cygwin from attempting to emulate POSIX permissionsover NTFS (which can result in strange and unnecessary permissions showing up inWindows Explorer). It is necessary to close and restart all Cygwin terminal windowsafter changing/etc/fstab.

Opam is able to be builtwithout a preinstalled OCaml compiler. For the MSVCports of OCaml, the Microsoft Windows SDK 7 or later or Microsoft Visual Studio isrequired (https://www.microsoft.com/en-gb/download/details.aspx?id=8442 - either x86or x64 may be installed, as appropriate to your system). It is not necessary tomodify PATH, INCLUDE, or LIB. Opam's build system will automatically detect therequired changes.

If OCaml is not preinstalled, run:

make compiler [OCAML_PORT=mingw64|mingw|msvc64|msvc|auto]

TheOCAML_PORT variable determines which flavour of Windows OCaml is compiled;auto will attempt to guess. As long as GCC isnot installed in Cygwin(i.e., the native C compilerfor Cygwin),OCAML_PORT does not need to bespecified andauto will be assumed. Once the compiler is built, you may run:

./configure --with-vendored-deps

and build opam as above.

Compiling Without OCaml

make cold is provided as a facility to compile OCaml, then bootstrap opam.You don't need to run./configure in that case, butyou may specifyCONFIGURE_ARGS if needed. E.g.,:

make cold CONFIGURE_ARGS="--prefix ~/local"make cold-install

NOTE: You'll still need GNU make.

Bug Tracker

Have a bug or a feature request? Please open an issue onourbug-tracker. Please search for existingissues before posting and include the output ofopam config report and anydetails that may help track down the issue.

Documentation

User Manual

The main documentation entry point to opam is the user manual,available usingopam --help. To get help for a specific command, useopam <command> --help.

Guides and Tutorials

A collection of guides and tutorials is availableonline. They are generated from thefiles indoc/pages.

API, Code Documentation, and Developer Manual

A more thorough technical document describing opam and specifying the packagedescription format is available in thedeveloper manual.make doc will otherwise make the API documentation available underdoc/.

Community

Keep track of development and community news.

  • Have a question that's not a feature request or bug report?Ask on the mailing list.

  • Chat with fellow opamers on IRC. On theirc.libera.chat server,in the#ocaml or the#opam channel.

Contributing

We welcome contributions! Please use GitHub's pull-request mechanism againstthe master branch of theopam repository. Ifthat's not an option for you, you can usegit format-patch and email us.

Versioning

The release cycle of the opam binary respectsSemantic Versioning.Note however that the version ordering used for user packages managed by opamfollows the Debian definition (more details inthissection of the user manual).

Related Repositories

  • ocaml/opam-repository is theofficial repository for opam packages and compilers. A number of unofficialrepositories are also available on the interwebs, for instance onGithub.
  • opam2web generates a collection ofbrowsable HTML files for a given repository. It is used to generatehttp://opam.ocaml.org.
  • opam-rt is the regression framework for opam.
  • opam-publish is a tool to facilitatethe creation, update, and publication of opam packages.

Copyright and license

The version comparison function insrc/core/opamVersionCompare.ml is part ofthe Dose library and Copyright 2011 Ralf Treinen.

All other code is:

Copyright 2012-2020 OCamlProCopyright 2012 INRIA

All rights reserved. Opam is distributed under the terms of the GNU LesserGeneral Public License version 2.1, with the special exception on linkingdescribed in the file LICENSE.

Opam is distributed in the hope that it will be useful, but WITHOUT ANYWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

About

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp