-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
126 lines (116 loc) · 3.18 KB
/
mix.exs
File metadata and controls
126 lines (116 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
defmodule ImageLensCorrection.MixProject do
use Mix.Project
@version "0.1.0"
@app_name :image_lens_correction
@source_url "https://github.com/elixir-image/image_lens_correction"
def project do
[
app: @app_name,
version: @version,
elixir: "~> 1.17",
description: description(),
package: package(),
deps: deps(),
docs: docs(),
source_url: @source_url,
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
ignore_warnings: ".dialyzer_ignore_warnings",
plt_add_apps: ~w(mix ex_unit)a,
plt_local_path: "priv/plts",
plt_core_path: "priv/plts"
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp description do
"""
Lens corrections (radial distortion, vignetting, lateral chromatic aberration
and geometric projection) for images created or processed with the `image`
library, driven by calibration data from the `lensfun` project.
"""
end
defp deps do
[
{:image, "~> 0.59 or ~> 1.0"},
# Used by `Image.LensFun.Importer` to read the lensfun XML
# database; pulled transitively by `:image` for XMP metadata so
# cannot be scoped to `:dev` here.
{:sweet_xml, "~> 0.7"},
{:ex_doc, "~> 0.34", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false}
] ++ maybe_json_polyfill()
end
defp maybe_json_polyfill do
if Code.ensure_loaded?(:json) do
[]
else
[{:json_polyfill, "~> 0.2 or ~> 1.0"}]
end
end
defp package do
[
maintainers: ["Kip Cole"],
licenses: ["Apache-2.0"],
links: links(),
files: [
"lib",
"priv/lensfun/lensfun.etf",
"guides",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
]
]
end
defp links do
%{
"GitHub" => @source_url,
"Readme" => "#{@source_url}/blob/v#{@version}/README.md",
"Changelog" => "#{@source_url}/blob/v#{@version}/CHANGELOG.md",
"Image" => "https://github.com/elixir-image/image",
"Lensfun" => "https://github.com/lensfun/lensfun"
}
end
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
extra_section: "Guides",
extras: [
"README.md",
"guides/lens_corrections.md",
"CHANGELOG.md",
"LICENSE.md"
],
formatters: ["html", "markdown"],
groups_for_docs: [
Distortion: &(&1[:subject] == "Distortion"),
Database: &(&1[:subject] == "Database")
],
groups_for_modules: [
"Correction primitives": [
Image.LensCorrection,
Image.LensCorrection.Tca,
Image.LensCorrection.Geometry
],
"Database lookup": [
Image.LensFun,
Image.LensFun.Correct,
Image.LensFun.Importer
]
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
defp elixirc_paths(:test), do: ["lib", "lensfun", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "lensfun"]
defp elixirc_paths(_), do: ["lib"]
end