SUMMARY="Library for the MaxMind DB and GeoIP2 file formats" DESCRIPTION="The libmaxminddb library is a C library for reading MaxMind DB \ files, including the GeoIP2 databases from MaxMind. This is a custom binary \ format designed to facilitate fast lookups of IP addresses while allowing for \ great flexibility in the type of data associated with an address. The libmaxminddb library comes with a command line utility, mmdblookup, which \ allows to look up an IP address in a GeoIP2 or MaxMind DB file. The \ geoipupdate tool, available in a separate package, allows to download such \ files." HOMEPAGE="https://github.com/maxmind/libmaxminddb" COPYRIGHT="2013-2016 Maxmind" LICENSE="Apache v2" REVISION="3" SOURCE_URI="$HOMEPAGE/releases/download/$portVersion/libmaxminddb-$portVersion.tar.gz" CHECKSUM_SHA256="1fe859ed714f94fc902a145453f7e1b5cd928718179ba4c4fcb7f6ae0df7ad37" ARCHITECTURES="!x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="!x86_gcc2 x86" # On x86_gcc2 we don't want to install the commands in bin//, but in bin/. commandSuffix=$secondaryArchSuffix commandBinDir=$binDir if [ "$targetArchitecture" = x86_gcc2 ]; then commandSuffix= commandBinDir=$prefix/bin fi PROVIDES=" libmaxminddb$secondaryArchSuffix = $portVersion cmd:mmdblookup$commandSuffix lib:libmaxminddb$secondaryArchSuffix = 0.0.7 " REQUIRES=" haiku$secondaryArchSuffix " PROVIDES_devel=" libmaxminddb${secondaryArchSuffix}_devel = $portVersion devel:libmaxminddb$secondaryArchSuffix = 0.0.7 " REQUIRES_devel=" libmaxminddb$secondaryArchSuffix == $portVersion base " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" cmd:aclocal cmd:autoconf cmd:autoheader cmd:automake cmd:awk cmd:gcc$secondaryArchSuffix cmd:libtoolize$secondaryArchSuffix cmd:make cmd:perl cmd:sed " PATCH() { # replace "[socket]" by "[socket network]" when searching getaddrinfo sed -i -e "/^AC_SEARCH_LIBS(\[getaddrinfo\]/ \ s/\(\[socket\)\]/\1 network\]/" \ configure.ac # remove -pthread to allow "make check" to build. sed -i -e "/^threads_t_CFLAGS/ s/ -pthread//" \ t/Makefile.am } BUILD() { runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir make $jobArgs } INSTALL() { make install rm $libDir/libmaxminddb.la prepareInstalledDevelLib libmaxminddb fixPkgconfig packageEntries devel \ $developDir \ $manDir/man3 } TEST() { make check }