Skip to content

Commit

Permalink
advancecomp: Build on UCRT64 and CLANG64
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Oct 3, 2022
1 parent d04de0a commit 7c2d7ea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
22 changes: 22 additions & 0 deletions mingw-w64-advancecomp/001-fix-building-on-ucrt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/portable.h
+++ b/portable.h
@@ -146,7 +146,7 @@
#endif

/* 64 bit IO */
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(_UCRT)
#define off_t off64_t /* This must be after including stdio.h */
off64_t rpl_ftello(FILE* f);
int rpl_fseeko(FILE* f, off64_t offset, int origin);
--- a/portable.c
+++ b/portable.c
@@ -30,7 +30,7 @@

#include "portable.h"

-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(_UCRT)
off64_t rpl_ftello(FILE* f)
{
fpos_t fpos;
13 changes: 8 additions & 5 deletions mingw-w64-advancecomp/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ _realname=advancecomp
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.3
pkgrel=1
pkgrel=2
pkgdesc='Recompression utilities for .zip .png .mng and .gz files using the 7-zip algorithm (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
url='http://www.advancemame.it/comp-readme'
license=('spdx:GPL-3.0-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-zlib")
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-cc")
source=("https://github.com/amadvance/advancecomp/releases/download/v${pkgver}/advancecomp-${pkgver}.tar.gz")
sha256sums=('811f661dfbbdddefdcb5eaf133e403ca2af99328b850b22c1249f7bebe657578')
source=("https://github.com/amadvance/advancecomp/releases/download/v${pkgver}/advancecomp-${pkgver}.tar.gz"
001-fix-building-on-ucrt.patch)
sha256sums=('811f661dfbbdddefdcb5eaf133e403ca2af99328b850b22c1249f7bebe657578'
'60603d0efedfa8e8433137ed6392b7fcb6d99f23d6c9890d571009614a5d0a04')

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"

patch -p1 -i ${srcdir}/001-fix-building-on-ucrt.patch
autoreconf -fiv
}

build() {
Expand Down

0 comments on commit 7c2d7ea

Please sign in to comment.