Permalink
| @@ -0,0 +1,107 @@ | ||
| 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" | ||
| LICENSE="GNU LGPL v2.1" | ||
| REVISION="1" | ||
| SOURCE_URI="https://download.gnome.org/sources/gcab/$portVersion/gcab-$portVersion.tar.xz" | ||
| CHECKSUM_SHA256="5a2d96fe7e69e42d363c31cf2370d7afa3bb69cec984d4128322ea40e62c100d" | ||
| #PATCHES="gcab-$portVersion.patchset" | ||
|
|
||
| ARCHITECTURES="!x86_gcc2 x86 x86_64" | ||
| SECONDARY_ARCHITECTURES="x86" | ||
|
|
||
| # On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/. | ||
| commandSuffix=$secondaryArchSuffix | ||
| commandBinDir=$binDir | ||
| if [ "$targetArchitecture" = x86_gcc2 ]; then | ||
| commandSuffix= | ||
| commandBinDir=$prefix/bin | ||
| fi | ||
|
|
||
| libVersion="0.0.0" | ||
| libVersionCompat="$libVersion compat >= ${libVersion%%.*}" | ||
|
|
||
| PROVIDES=" | ||
| gcab$secondaryArchSuffix = $portVersion | ||
| cmd:gcab$commandSuffix = $portVersion | ||
| lib:libgcab_1.0$secondaryArchSuffix = $libVersionCompat | ||
| " | ||
| REQUIRES=" | ||
| haiku$secondaryArchSuffix | ||
| lib:libglib_2.0$secondaryArchSuffix >= 0.4600.2 | ||
| lib:libgirepository_1.0$secondaryArchSuffix | ||
| lib:libintl$secondaryArchSuffix | ||
| lib:libpython3.6m$secondaryArchSuffix | ||
| lib:libz$secondaryArchSuffix | ||
| " | ||
|
|
||
| PROVIDES_devel=" | ||
| gcab${secondaryArchSuffix}_devel = $portVersion | ||
| devel:libgcab_1.0$secondaryArchSuffix = $libVersionCompat | ||
| " | ||
| 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 | ||
| devel:libgirepository_1.0$secondaryArchSuffix | ||
| devel:libintl$secondaryArchSuffix | ||
| devel:libpython3.6m$secondaryArchSuffix | ||
| devel:libz$secondaryArchSuffix | ||
| " | ||
| BUILD_PREREQUIRES=" | ||
| cmd:gcc$secondaryArchSuffix | ||
| cmd:make | ||
| cmd:meson | ||
| cmd:ninja | ||
| cmd:pkg_config$secondaryArchSuffix | ||
| cmd:python3.6 | ||
| cmd:vapigen | ||
| " | ||
|
|
||
| defineDebugInfoPackage gcab$secondaryArchSuffix \ | ||
| "$libDir"/libgcab-1.0.so.$libVersion | ||
|
|
||
| BUILD() | ||
| { | ||
| mkdir -p build && cd build | ||
| meson --prefix=$prefix \ | ||
| --bindir=$commandBinDir \ | ||
| --libdir=$libDir \ | ||
| --includedir=$includeDir .. | ||
| ninja $jobArgs | ||
| } | ||
|
|
||
| INSTALL() | ||
| { | ||
| ninja install | ||
|
|
||
| prepareInstalledDevelLibs \ | ||
| libgcab-1.0 | ||
|
|
||
| packageEntries devel \ | ||
| $developDir \ | ||
| $dataDir/gtk-doc | ||
| } | ||
|
|
||
| TEST() | ||
| { | ||
| make check | ||
| } |