Mercurial > vanilla
comparison graphics/exiv2/exiv2.sh @ 925:995cdea813e9
graphics/exiv2: initial import, closes #1252
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Aug 2019 20:10:00 +0200 |
parents | |
children | ddab65a5b3f5 |
comparison
equal
deleted
inserted
replaced
924:9c2079a14085 | 925:995cdea813e9 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 PKGNAME=exiv2 | |
19 PKGVERSION=0.27.2 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="one of README.licenses.md or CUSTOM" | |
22 PKGSUMMARY="C++ library for reading and modifying image metadata" | |
23 PKGDOWNLOAD="https://www.exiv2.org/builds/$PKGNAME-$PKGVERSION-Source.tar.gz" | |
24 PKGDEPENDS="cmake:build" | |
25 PKGOPTIONS="NLS PNG XMP" | |
26 | |
27 : ${CC:=clang} | |
28 : ${CFLAGS:=-O2} | |
29 : ${CXX:=clang++} | |
30 : ${CXXFLAGS:=-O2} | |
31 : ${NLS:=yes} | |
32 : ${PNG:=yes} | |
33 : ${XMP:=yes} | |
34 | |
35 if [ "$NLS" = "yes" ]; then | |
36 PKGDEPENDS="gettext $PKGDEPENDS" | |
37 with_nls="-DEXIV2_ENABLE_NLS=On" | |
38 else | |
39 with_nls="-DEXIV2_ENABLE_NLS=Off" | |
40 fi | |
41 | |
42 if [ "$PNG" = "yes" ]; then | |
43 PKGDEPENDS="zlib $PKGDEPENDS" | |
44 with_png="-DEXIV2_ENABLE_PNG=On" | |
45 else | |
46 with_png="-DEXIV2_ENABLE_PNG=Off" | |
47 fi | |
48 | |
49 if [ "$XMP" = "yes" ]; then | |
50 PKGDEPENDS="expat $PKGDEPENDS" | |
51 with_xmp="-DEXIV2_ENABLE_XMP=On" | |
52 else | |
53 with_xmp="-DEXIV2_ENABLE_XMP=Off" | |
54 fi | |
55 | |
56 build() | |
57 { | |
58 rm -rf $PKGNAME-$PKGVERSION-Source | |
59 tar xvf $PKGNAME-$PKGVERSION-Source.tar.gz | |
60 cd $PKGNAME-$PKGVERSION-Source | |
61 | |
62 mkdir build && cd build | |
63 cmake .. \ | |
64 -DBUILD_SHARED_LIBS=On \ | |
65 -DCMAKE_BUILD_TYPE=Release \ | |
66 -DCMAKE_CXX_COMPILER="$CXX" \ | |
67 -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ | |
68 -DCMAKE_C_COMPILER="$CC" \ | |
69 -DCMAKE_C_FLAGS="$CFLAGS" \ | |
70 -DCMAKE_INSTALL_PREFIX= \ | |
71 $with_nls \ | |
72 $with_png \ | |
73 $with_xmp | |
74 make | |
75 make install DESTDIR=$DESTDIR | |
76 cd .. | |
77 | |
78 cd .. | |
79 rm -rf $PKGNAME-$PKGVERSION-Source | |
80 } |