# Description: eXtensible ARchiver # URL: https://github.com/apple-oss-distributions/xar/ # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: libxml2 name=xar version=498 release=1 source=(https://github.com/apple-oss-distributions/xar/archive/$name-$version/$name-$name-$version.tar.gz xar-1.6.1-ext2.patch xar-1.8.0.0.452-linux.patch xar-1.8.0.0.487-non-darwin.patch xar-1.8.0.0.487-variable-sized-object.patch xar-1.8-arm-ppc.patch xar-1.8-openssl-1.1.patch xar-1.8-safe_dirname.patch) build() { cd $name-$name-$version/$name # adapted from xar.SlackBuild find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # https://slackbuilds.org/repository/15.0/system/xar/ patch -p1 < $SRC/xar-1.6.1-ext2.patch patch -p1 < $SRC/xar-1.8-safe_dirname.patch patch -p1 < $SRC/xar-1.8-arm-ppc.patch patch -p1 < $SRC/xar-1.8-openssl-1.1.patch patch -p1 < $SRC/xar-1.8.0.0.452-linux.patch patch -p1 < $SRC/xar-1.8.0.0.487-non-darwin.patch patch -p1 < $SRC/xar-1.8.0.0.487-variable-sized-object.patch sed -i 's/__APPLE__/__NO_APPLE__/' lib/hash.c lib/archive.h cp lib/*.h include mkdir include/xar ln -sf ../xar.h include/xar/xar.h sed -i 's,"\(\(util\|filetree\)\.h\)",<\1>,' src/xar.c bash autogen.sh --noconfigure LIBS="$( pkg-config --libs openssl )" \ CFLAGS="$CFLAGS -Wl,-s -I$(pwd)/lib" \ ./configure --prefix=/usr make make install DESTDIR=$PKG rm -f $PKG/usr/lib/*.la }