recipes: Replace 'outdir' with package hash tags
[dragora.git] / recipes / x-libs / imlib2 / recipe
blob831ed04eaad0627dcbd0854c623f068562e3c0bc
1 # Build recipe for imlib2.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2020 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 program=imlib2
19 version=1.5.1
20 release=4
22 # Define hash tag to categorize the package name output
23 pkghashtag=x-libs
25 tarname=${program}-${version}.tar.bz2
27 # Remote source(s)
28 fetch=http://downloads.sourceforge.net/project/enlightenment/imlib2-src/${version}/$tarname
30 description="
31 Imlib2 is the (intended) successor to Imlib.
33 Imlib2 can load image files from disk in one of many formats, save
34 images to disk in one of many formats, render image data onto other
35 images, render images to an X-Windows drawable, produce pixmaps and
36 pixmap masks of images, apply filters to images, rotate images,
37 accept RGBA data for images, scale images, and more.
40 homepage=http://www.enlightenment.org/
41 license=BSD
43 # Source documentation
44 docs="AUTHORS COPYING COPYING-PLAIN ChangeLog README TODO"
45 docsdir="${docdir}/${program}-${version}"
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     case $arch in
56     i?86)
57         assembly_opts=--enable-mmx
58         ;;
59     x86_64)
60         assembly_opts=--enable-amd64
61         ;;
62     esac
64     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
65      $configure_args \
66      --libdir=/usr/lib${libSuffix} \
67      --with-id3 \
68      --with-x \
69      --build="$(cc -dumpmachine)" \
70      $assembly_opts
72     unset assembly_opts
73     make -j${jobs} V=1
74     make -j${jobs} DESTDIR="$destdir" install-strip
76     # Copy documentation
77     mkdir -p "${destdir}${docsdir}"
78     cp -p $docs "${destdir}${docsdir}/"