123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- # Build recipe for gperf.
- #
- # Copyright (c) 2016-2017 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- program=gperf
- version=3.1
- release=1
- tarname=${program}-${version}.tar.gz
- # Remote source(s)
- fetch=http://ftp.gnu.org/pub/gnu/gperf/$tarname
- description="
- Perfect hash function generator.
- GNU gperf is a perfect hash function generator. For a given list of
- strings, it produces a hash function and hash table, in form of C or
- C++ code, for looking up a value depending on the input string.
- The hash function is perfect, which means that the hash table has no
- collisions, and the hash table lookup needs a single string comparison
- only.
- GNU gperf is highly customizable. There are options for generating C
- or C++ code, for emitting switch statements or nested ifs instead of a
- hash table, and for tuning the algorithm employed by gperf.
- "
- homepage=http://www.gnu.org/software/gperf
- license=GPLv3+
- # Source documentation
- docs="AUTHORS COPYING ChangeLog NEWS README"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- set -e
- unpack "${tardir}/$tarname"
- cd "$srcdir"
- ./configure CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
- LDFLAGS="$QILDFLAGS -static" \
- $configure_args \
- --infodir=$infodir \
- --mandir=$mandir \
- --docdir=$docsdir \
- --build="$(cc -dumpmachine)"
- make -j${jobs} V=1
- make check
- make -j${jobs} DESTDIR="$destdir" install
- # Compress info documents deleting index file for the package
- if test -d "${destdir}/$infodir"
- then
- rm -f "${destdir}/${infodir}/dir"
- lzip -9 "${destdir}/${infodir}"/*
- fi
- # Compress manual page
- lzip -9 "${destdir}/${mandir}/man1/gperf.1"
- # Copy documentation
- mkdir -p "${destdir}${docsdir}"
- for file in $docs
- do
- cp -p $file "${destdir}${docsdir}"
- done
- }
|