Use a tag if available, in order to specify a commit
[git/cygwin-packages/exiv2.git] / exiv2.cygport
CommitLineData
48c4daa8
YS
1inherit cmake
2
92d84694 3NAME="exiv2"
6545c3d9
LL
4VERSION=0.27.3
5RELEASE=1
92d84694
YS
6CATEGORY="Libs"
7SUMMARY="Exiv, IPTC, and XMP image metadata library"
8DESCRIPTION="Exiv2 is a C++ library and a command line utility to access
9Exiv, IPTC, and XMP image metadata."
6545c3d9
LL
10HOMEPAGE="https://www.exiv2.org/"
11
12################################
13## Source from a git repository
14################################
15GIT_REPO="https://github.com/Exiv2/exiv2"
16declare -A GIT_DATEHASH_BY_NAME=(
17 # git log --date=iso-strict --format='%cd/%H' -1
485c14bc 18 [0.27.3]=2020-06-30T15:58:12+01:00/v0.27.3
6545c3d9 19)
6545c3d9
LL
20REV_HASH="${GIT_DATEHASH_BY_NAME[${VERSION}]#*/}"
21REV_DATE="${GIT_DATEHASH_BY_NAME[${VERSION}]%/*}"
3eb8c3aa 22REV_DATE_SHORT="${REV_DATE%%T*}"
6545c3d9 23GIT_BASENAME="${GIT_REPO##*/}"
3eb8c3aa
LL
24SRC_URI="${GIT_REPO}/archive/${REV_HASH}/${GIT_BASENAME}-${VERSION}.tar.gz"
25SRC_DIR="${GIT_BASENAME}-${REV_HASH#v}"
6545c3d9
LL
26
27################################
28## Patches
29################################
92d84694 30PATCH_URI="
92d84694
YS
31"
32
6545c3d9
LL
33################################
34## Requirements for building
35################################
36BUILD_REQUIRES="\
37 cmake\
38 pkg-config\
39 gettext\
40 libexpat-devel\
41 libiconv-devel\
42 libintl-devel\
43 zlib-devel\
44"
45
46################################
47## Requirements for testing
48################################
49BUILD_REQUIRES+="\
50 python3\
51"
52
53################################
54## ABI
55################################
56ABI=27
57
58################################
59## Packages
60################################
61PKG_NAMES="${NAME} lib${NAME}_${ABI} lib${NAME}-devel"
92d84694
YS
62exiv2_CATEGORY="Graphics"
63exiv2_SUMMARY=${SUMMARY/library/utility}
64exiv2_CONTENTS="--exclude=html usr/bin/*.exe usr/share/"
6545c3d9 65printf -v "libexiv2_${ABI}_CONTENTS" "%s" "usr/bin/cygexiv2-${ABI}.dll"
92d84694
YS
66libexiv2_devel_CONTENTS="usr/include/ usr/lib/"
67
48c4daa8 68
d437e145
YS
69# https://bugzilla.redhat.com/show_bug.cgi?id=888769
70CPPFLAGS+=" -DBanAllEntityUsage=1"
71
6545c3d9
LL
72CYGCMAKE_GENERATOR="Unix Makefiles"
73
48c4daa8 74CYGCMAKE_ARGS="
6545c3d9
LL
75 -DBUILD_SHARED_LIBS:BOOL=ON
76 -DEXIV2_ENABLE_NLS:BOOL=ON
77 -DEXIV2_BUILD_SAMPLES:BOOL=ON
48c4daa8
YS
78"
79
6545c3d9
LL
80################################
81## Tests
82################################
83src_test() {
84 cd ${B}
85 make tests
92d84694 86}
This page took 0.085415 seconds and 5 git commands to generate.