Merge: Update basic requirements and document them
authorJean Privat <jean@pryen.org>
Mon, 15 Jul 2019 15:07:57 +0000 (11:07 -0400)
committerJean Privat <jean@pryen.org>
Mon, 15 Jul 2019 15:07:57 +0000 (11:07 -0400)
Since #2615 we broke the initial build according to the documentation since nitpm (picnit) requires libcurl.

To minimize the number of doc to update I just moved `nitpm` to the "more" set of tools and documented their requirements.
I also added a CI job to avoid future failures (note: I'm not sure how to adapt it on other docker-less platforms).

Pull-Request: #2766
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

.gitlab-ci.yml
README.md
src/Makefile

index 8ff53ad..2f6955f 100644 (file)
@@ -38,7 +38,7 @@ after_script:
   - export CCACHE_DIR=$PWD/.ccache
   - ccache -s
   - du -sh .gradle || true
-  - git status --ignored
+  - git status --ignored || true
   - date
   - tail status.txt
 
@@ -290,6 +290,22 @@ build_oot:
 
 # MISC ##############################################################
 
+check_requirments:
+  stage: more_test
+  image: debian:buster
+  before_script:
+    - date # cancel the default `before_script`, an empty list does nothing
+  script: # from the README
+    - apt-get update && apt-get install --yes --no-install-recommends build-essential ccache libgc-dev libunwind-dev pkg-config
+    - make
+    - bin/nitc examples/hello_world.nit
+    - ./hello_world
+    - . misc/nit_env.sh install
+    - nitc examples/hello_world.nit
+    - ./hello_world
+    - apt-get update && apt-get install --yes --no-install-recommends graphviz libcurl4-openssl-dev libevent-dev libmongoc-dev
+    - make more
+
 bootstrap_full:
   stage: more_test
   dependencies:
index 2679f4d..e499bbb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -19,20 +19,19 @@ Requirements:
  * pkg-config  http://www.freedesktop.org/wiki/Software/pkg-config/
  * ccache      http://ccache.samba.org/        to improve recompilation
  * libgc-dev   http://hboehm.info/gc/
- * graphviz    http://www.graphviz.org/        to enable graphs with the nitdoc tool
  * libunwind   http://nongnu.org/libunwind
 
 Those are available in most Linux distributions
 
-    $ sudo apt-get install build-essential ccache libgc-dev graphviz libunwind-dev pkg-config
+    $ sudo apt-get install build-essential ccache libgc-dev libunwind-dev pkg-config
 
 and on OS X using brew
 
-    $ brew install ccache bdw-gc graphviz libunwind-headers pkgconfig
+    $ brew install ccache bdw-gc libunwind-headers pkgconfig
 
 or with MacPorts
 
-    $ sudo port install ccache boehmgc graphviz libunwind-headers pkgconfig
+    $ sudo port install ccache boehmgc libunwind-headers pkgconfig
 
 Important files and directories:
 
@@ -65,6 +64,20 @@ To have your environment automatically configured at login, just source it with
 
     $ . misc/nit_env.sh install
 
+
+More tools:
+
+Additional tools can also be compiled but require more dependencies.
+
+ * graphviz    http://www.graphviz.org/        to enable graphs with the nitdoc tool
+ * libcurl      https://curl.haxx.se/libcurl/   for the nit package manager nitpm
+ * libevent    https://libevent.org/           for the nit documentation server nitweb
+ * libmongoc    http://mongoc.org/              also for nitweb
+
+    $ sudo apt-get install graphviz libcurl4-openssl-dev libevent-dev libmongoc-dev
+    $ make more
+
+
 Contributing:
 
 To contribute to Nit, please see [CONTRIBUTING](CONTRIBUTING.md).
index 8086bfd..dcf9b82 100644 (file)
 
 NITCOPT=--semi-global
 OLDNITCOPT=--semi-global
-OBJS=nitc nitpick nit nitls nitunit nitpm nitx nitlight nitserial nitrestful nitpackage
+OBJS=nitc nitpick nit nitls nitunit nitx nitlight nitserial nitrestful nitpackage
 SRCS=$(patsubst %,%.nit,$(OBJS))
 BINS=$(patsubst %,../bin/%,$(OBJS))
-MOREOBJS=nitdoc nitweb nitcatalog nitmetrics nitpretty nitweb
+MOREOBJS=nitdoc nitweb nitcatalog nitmetrics nitpretty nitweb nitpm
 MORESRCS=$(patsubst %,%.nit,$(MOREOBJS))
 MOREBINS=$(patsubst %,../bin/%,$(MOREOBJS))
 DEPS=$(wildcard *.nit */*.nit) parser/parser.nit