12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- set -e
- program=gperf
- version=3.1
- release=2
- pkgcategory=devel
- tarname=${program}-${version}.tar.gz
- fetch=https://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=https://www.gnu.org/software/gperf
- license=GPLv3+
- docs="AUTHORS COPYING ChangeLog NEWS README"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
-
- chmod -R u+w,go-w,a+rX-s .
- ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" \
- LDFLAGS="$QILDFLAGS -static" \
- $configure_args \
- --infodir=$infodir \
- --mandir=$mandir \
- --docdir=$docsdir \
- --build="$(gcc -dumpmachine)"
- make -j${jobs} V=1
- make check
- make -j${jobs} DESTDIR="$destdir" install
-
- if test -d "${destdir}/$infodir"
- then
- rm -f "${destdir}/${infodir}/dir"
- lzip -9 "${destdir}/${infodir}"/*
- fi
-
- lzip -9 "${destdir}/${mandir}/man1/gperf.1"
-
- mkdir -p "${destdir}/$docsdir"
- for file in $docs
- do
- cp -p $file "${destdir}/$docsdir"
- done
- }
|