Skip to content

Commit 67ba67b

Browse files
committed
README.md: added an installation section
1 parent 78b5658 commit 67ba67b

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

README.md

+50-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,55 @@ This repository contains the libcairo bindings for Fortran from the [gtk-fortran
44

55
Remark: it was cloned from the now unavailable @brocolis' repository (latest 5th September 2021 version).
66

7+
## Requirements and dependencies
8+
9+
You need:
10+
11+
* a modern Fortran compiler, for example GFortran or the Intel ifort/ifx compilers. See the [Fortran-lang.org compilers page](https://fortran-lang.org/compilers/) for other compilers.
12+
* The Cairo development files (`libcairo2-dev` package in Ubuntu).
13+
* The Fortran Package Manager [fpm](https://fpm.fortran-lang.org/).
14+
15+
### Installation in Linux
16+
17+
For example, in Ubuntu:
18+
```bash
19+
$ sudo apt install gfortran libcairo2-dev
20+
```
21+
22+
Concerning fpm, see the [fpm documentation](https://fpm.fortran-lang.org/en/install/index.html).
23+
24+
If you have a GitHub account, just clone the repository:
25+
26+
```
27+
$ git clone git@github.com:vmagnin/cairo-fortran.git
28+
$ cd cairo-fortran
29+
```
30+
31+
### Installation in Windows
32+
33+
You can use for example the [MSYS2](http://www.msys2.org/) environment:
34+
* https://packages.msys2.org/base/mingw-w64-cairo
35+
* https://packages.msys2.org/base/mingw-w64-fpm
36+
37+
Install the following packages via the MSYS2-MSYS shell:
38+
* build tools:
39+
* `$ pacman -S mingw-w64-ucrt-x86_64-toolchain base-devel` (it will install gcc, gdb, gfortran, python, make, pkgconf...)
40+
* git:
41+
* `$ pacman -S git`
42+
* Cairo and its dependencies:
43+
* `$ pacman -S mingw-w64-ucrt-x86_64-cairo`
44+
* Fortran Package Manager fpm:
45+
* `$ pacman -S mingw-w64-ucrt-x86_64-fpm`
46+
47+
Then start the MSYS2-UCRT64 shell.
48+
49+
If you have a GitHub account, just clone the repository:
50+
51+
```
52+
$ git clone git@github.com:vmagnin/cairo-fortran.git
53+
$ cd cairo-fortran
54+
```
55+
756
## Testing cairo-fortran
857

958
Each test prints nothing in the terminal but is creating a PNG file. You should therefore obtain three PNG files in the main directory of the project:
@@ -49,7 +98,7 @@ GPL-3.0-or-later
4998
* API Reference Manual: https://cairographics.org/manual/
5099

51100

52-
## Original project and Authors
101+
## Original project
53102
* Origin: [gtk-fortran project](https://github.com/vmagnin/gtk-fortran/)
54103
* Authors:
55104
> Vincent MAGNIN, James TAPPIN, Jens HUNGER, Jerry DE LISLE, "gtk-fortran: a GTK+ binding to build Graphical User Interfaces in Fortran", _Journal of Open Source Software,_ 4(34), 1109, 12th January 2019, [https://doi.org/10.21105/joss.01109](https://doi.org/10.21105/joss.01109)

0 commit comments

Comments
 (0)