-
Notifications
You must be signed in to change notification settings - Fork 524
WIP: Port libarchive to CMake #2602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,15 +2,15 @@ | |
|
|
||
| pkgname=('libarchive' 'libarchive-devel' 'bsdcpio' 'bsdtar') | ||
| pkgver=3.5.1 | ||
| pkgrel=1 | ||
| pkgrel=2 | ||
| pkgdesc="library that can create and read several streaming archive formats" | ||
| arch=('i686' 'x86_64') | ||
| url="https://libarchive.org/" | ||
| license=('BSD') | ||
| groups=('libraries') | ||
| depends=('gcc-libs' 'libbz2' 'libiconv' 'libexpat' 'liblzma' 'liblz4' 'libnettle' 'libxml2' 'libzstd' 'zlib') | ||
| makedepends=('libbz2-devel' 'libiconv-devel' 'libexpat-devel' 'liblzma-devel' 'liblz4-devel' 'libnettle-devel' 'libxml2-devel' 'libzstd-devel' 'zlib-devel') | ||
| options=('!strip' 'debug' 'libtool') | ||
| makedepends=('libbz2-devel' 'libiconv-devel' 'libexpat-devel' 'liblzma-devel' 'liblz4-devel' 'libnettle-devel' \ | ||
| 'libxml2-devel' 'libzstd-devel' 'zlib-devel' 'cmake') | ||
| source=("https://github.com/libarchive/libarchive/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz" | ||
| 'libarchive-3.3.2-bcrypt-fix.patch' | ||
| 'libarchive-3.3.1-msys2.patch') | ||
|
|
@@ -24,46 +24,34 @@ prepare() { | |
| # msysize patch | ||
| #patch -Np1 -i "${srcdir}/libarchive-3.3.1-msys2.patch" | ||
| patch -Np1 -i "${srcdir}/libarchive-3.3.2-bcrypt-fix.patch" | ||
| autoreconf -ivf | ||
| } | ||
|
|
||
| build() { | ||
| export lt_cv_deplibs_check_method='pass_all' | ||
| cd "${pkgname}-${pkgver}" | ||
| local build_type=Release | ||
|
Biswa96 marked this conversation as resolved.
|
||
| if check_option "debug" "y"; then | ||
| build_type=Debug | ||
| fi | ||
|
|
||
| #export lt_cv_deplibs_check_method='pass_all' | ||
|
|
||
| ./configure \ | ||
| --prefix=/usr \ | ||
| --enable-shared \ | ||
| --enable-static \ | ||
| --without-libiconv-prefix \ | ||
| --without-xml2 \ | ||
| --without-cng \ | ||
| --without-lzo2 | ||
| mkdir -p "${pkgname}-${pkgver}/build-${CHOST}" | ||
| cd "${pkgname}-${pkgver}/build-${CHOST}" | ||
|
|
||
| # CNG breaks pacman on Vista due to BCryptDeriveKeyPBKDF2 | ||
| cmake \ | ||
| -G"Unix Makefiles" \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tried using Ninja?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't since I wasn't sure
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it is.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I should amend the commit with that. Thanks for the info @jeremyd2019 |
||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DCMAKE_BUILD_TYPE=$build_type \ | ||
| -DENABLE_TAR_SHARED=ON \ | ||
| -DENABLE_CPIO_SHARED=ON \ | ||
| -DENABLE_CAT_SHARED=ON \ | ||
| .. | ||
|
|
||
| make | ||
| make DESTDIR="${srcdir}/dest" install | ||
| } | ||
|
|
||
| check() { | ||
| cd "${pkgname}-${pkgver}" | ||
|
|
||
| make check || true | ||
| } | ||
|
|
||
| package_bsdcpio() { | ||
| mkdir -p ${pkgdir}/usr/bin | ||
| mkdir -p ${pkgdir}/usr/share/man/man1/ | ||
| cp -f ${srcdir}/dest/usr/bin/bsdcpio.exe ${pkgdir}/usr/bin/ | ||
| cp -f ${srcdir}/dest/usr/share/man/man1/bsdcpio.* ${pkgdir}/usr/share/man/man1/ | ||
| } | ||
|
|
||
| package_bsdtar() { | ||
| mkdir -p ${pkgdir}/usr/bin | ||
| mkdir -p ${pkgdir}/usr/share/man/man1/ | ||
| cp -f ${srcdir}/dest/usr/bin/bsdtar.exe ${pkgdir}/usr/bin/ | ||
| cp -f ${srcdir}/dest/usr/share/man/man1/bsdtar.* ${pkgdir}/usr/share/man/man1/ | ||
| cd "${pkgname}-${pkgver}/build-${CHOST}" | ||
| } | ||
|
|
||
| package_libarchive() { | ||
|
|
@@ -82,3 +70,19 @@ package_libarchive-devel() { | |
| cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/ | ||
| cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/ | ||
| } | ||
|
|
||
| package_bsdcpio() { | ||
| depends=("libarchive=${pkgver}") | ||
| mkdir -p ${pkgdir}/usr/bin | ||
| mkdir -p ${pkgdir}/usr/share/man/man1/ | ||
| cp -f ${srcdir}/dest/usr/bin/bsdcpio.exe ${pkgdir}/usr/bin/ | ||
| cp -f ${srcdir}/dest/usr/share/man/man1/bsdcpio.* ${pkgdir}/usr/share/man/man1/ | ||
| } | ||
|
|
||
| package_bsdtar() { | ||
| depends=("libarchive=${pkgver}") | ||
| mkdir -p ${pkgdir}/usr/bin | ||
| mkdir -p ${pkgdir}/usr/share/man/man1/ | ||
| cp -f ${srcdir}/dest/usr/bin/bsdtar.exe ${pkgdir}/usr/bin/ | ||
| cp -f ${srcdir}/dest/usr/share/man/man1/bsdtar.* ${pkgdir}/usr/share/man/man1/ | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.