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