initial commit

This commit is contained in:
BigfootACA 2024-09-20 22:10:26 +08:00
commit da81070ea2
3 changed files with 121 additions and 0 deletions

16
.SRCINFO Normal file
View File

@ -0,0 +1,16 @@
pkgbase = mingw-w64-headers
pkgdesc = MinGW-w64 headers for Windows
pkgver = 12.0.0
pkgrel = 1
url = http://mingw-w64.sourceforge.net
arch = any
groups = mingw-w64-toolchain
groups = mingw-w64
license = custom
options = !strip
options = !libtool
options = !emptydirs
source = git+https://gitea.classfun.cn:4443/mirrors/mingw-w64.git
sha512sums = SKIP
pkgname = mingw-w64-headers

53
.gitignore vendored Normal file
View File

@ -0,0 +1,53 @@
*.rej
*.orig
*.swp
*.save*
*.o
*.a
*.out
*.lib
*.obj
*.dll
*.so
*.exe
*.gch
*.plist
*.mo
*.gmo
*.fd
*.iso
*.img
*.img.*
*.qcow2
*.vhd
*.vdi
*.vmdk
*.cpio
*.cpio.*
*.ttf
*.ttc
*.pcf
*.pcf.*
*.efi
*.pkg.tar.*
vgcore.*
/build*
initramfs*.*
initrd*.*
System.map*
/cmake-build-*
/.idea
/.vscode
/.cache
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
node_modules
package.json
package-lock.json
fonts.scale
fonts.dir
/src
/pkg
/mingw-w64

52
PKGBUILD Normal file
View File

@ -0,0 +1,52 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=mingw-w64-headers
pkgver=12.0.0
pkgrel=1
pkgdesc="MinGW-w64 headers for Windows"
arch=('any')
url="http://mingw-w64.sourceforge.net"
license=('custom')
groups=('mingw-w64-toolchain' 'mingw-w64')
options=('!strip' '!libtool' '!emptydirs')
source=(git+https://gitea.classfun.cn:4443/mirrors/mingw-w64.git)
sha512sums=('SKIP')
_targets="i686-w64-mingw32 x86_64-w64-mingw32 aarch64-w64-mingw32"
get_latest() {
cd "$srcdir/mingw-w64"
git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort --version-sort | tail -n1
}
pkgver() {
get_latest | sed 's,^v,,'
}
prepare() {
cd "$srcdir/mingw-w64"
git checkout "$(get_latest)"
}
build() {
for _target in ${_targets}; do
echo "Configuring ${_target} headers"
mkdir -p "$srcdir"/headers-${_target} && cd "$srcdir"/headers-${_target}
"$srcdir"/mingw-w64/mingw-w64-headers/configure --prefix=/usr/${_target} --enable-sdk=all --host=${_target}
done
}
package() {
for _target in ${_targets}; do
echo "Installing ${_target} headers"
cd "$srcdir"/headers-${_target}
make DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/${_target}/include/pthread_signal.h
rm "$pkgdir"/usr/${_target}/include/pthread_time.h
rm "$pkgdir"/usr/${_target}/include/pthread_unistd.h
done
echo "Installing MinGW-w64 licenses"
install -Dm644 "$srcdir"/mingw-w64/COPYING.MinGW-w64/COPYING.MinGW-w64.txt "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.MinGW-w64.txt
install -Dm644 "$srcdir"/mingw-w64/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.MinGW-w64-runtime.txt
install -Dm644 "$srcdir"/mingw-w64/mingw-w64-headers/ddk/readme.txt "$pkgdir"/usr/share/licenses/${pkgname}/ddk-readme.txt
}