0
0
Fork 0
haikuports/app-arch/gcab/gcab-1.4.recipe

106 lines
2.8 KiB
Bash
Raw Permalink Normal View History

2016-03-19 15:41:35 +00:00
SUMMARY="Library and tool for working with Microsoft cabinet archives"
DESCRIPTION="gcab is command line tool that can list, extract and create \
cabinet (.cab) archives. The Cabinet format is often used on Microsoft Windows \
but it can also be used on other systems with open source software such as \
cabextract, lcab and gcab. Unlike cabextract and lcab, which can only list \
and extract cabinet archives, gcab can also create them.
gcab also includes a GObject shared library, libgcab, which provides all the \
functionality available to the command line tool."
HOMEPAGE="https://wiki.gnome.org/msitools"
COPYRIGHT="2000-2002 Stuart Caie
2002 Patrik Stridvall
2003 Greg Turner
2012 Marc-André Lureau
2017 Richard Hughes"
2016-03-19 15:41:35 +00:00
LICENSE="GNU LGPL v2.1"
2021-02-02 17:52:38 +00:00
REVISION="1"
2016-03-19 15:41:35 +00:00
SOURCE_URI="https://download.gnome.org/sources/gcab/$portVersion/gcab-$portVersion.tar.xz"
2021-02-02 17:52:38 +00:00
CHECKSUM_SHA256="67a5fa9be6c923fbc9197de6332f36f69a33dadc9016a2b207859246711c048f"
2016-03-19 15:41:35 +00:00
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
2016-03-19 15:41:35 +00:00
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
2016-03-19 15:41:35 +00:00
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
2021-02-02 17:52:38 +00:00
libVersion="0.1.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
2016-03-19 15:41:35 +00:00
PROVIDES="
gcab$secondaryArchSuffix = $portVersion
cmd:gcab$commandSuffix = $portVersion
lib:libgcab_1.0$secondaryArchSuffix = $libVersionCompat
2016-03-19 15:41:35 +00:00
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix >= 0.4600.2
lib:libintl$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
gcab${secondaryArchSuffix}_devel = $portVersion
devel:libgcab_1.0$secondaryArchSuffix = $libVersionCompat
2016-03-19 15:41:35 +00:00
"
REQUIRES_devel="
gcab$secondaryArchSuffix == $portVersion base
devel:libglib_2.0$secondaryArchSuffix >= 0.4600.2
devel:libintl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgettextlib$secondaryArchSuffix >= 0.14.1
devel:libglib_2.0$secondaryArchSuffix >= 0.4600.2
2016-03-19 15:41:35 +00:00
devel:libintl$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
2019-12-01 09:31:20 +00:00
cmd:gtkdoc_scan
2016-03-19 15:41:35 +00:00
cmd:ld$secondaryArchSuffix
2019-12-01 09:31:20 +00:00
cmd:meson
cmd:ninja
2016-03-19 15:41:35 +00:00
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage gcab$secondaryArchSuffix \
"$libDir"/libgcab-1.0.so.$libVersion
2016-03-19 15:41:35 +00:00
BUILD()
{
2019-12-01 09:31:20 +00:00
export CFLAGS=-fno-stack-protector
meson build -Dintrospection=false \
--buildtype=release --prefix=$prefix \
--libdir=$libDir --includedir=$includeDir
ninja -C build
2016-03-19 15:41:35 +00:00
}
INSTALL()
{
2019-12-01 09:31:20 +00:00
ninja -C build install
2016-03-19 15:41:35 +00:00
2019-12-01 09:31:20 +00:00
mkdir -p $dataDir
mv $prefix/share/gtk-doc $dataDir
rm -rf $prefix/share
2016-03-19 15:41:35 +00:00
prepareInstalledDevelLibs \
libgcab-1.0
2019-12-01 09:31:20 +00:00
fixPkgconfig
2016-03-19 15:41:35 +00:00
packageEntries devel \
$developDir \
$dataDir/gtk-doc
}
TEST()
{
2019-12-01 09:31:20 +00:00
meson test -C build
2016-03-19 15:41:35 +00:00
}