Add MinGW extension
parent
bb2099c56d
commit
11557ce713
|
@ -0,0 +1,275 @@
|
||||||
|
build-extension: true
|
||||||
|
id: de.marko10_000.winebarrels.Platform.ExtensionsV2.MinGW
|
||||||
|
branch: "v2.0"
|
||||||
|
|
||||||
|
sdk: de.marko10_000.winebarrels.Sdk
|
||||||
|
runtime: de.marko10_000.winebarrels.Platform
|
||||||
|
runtime-version: "v2.0"
|
||||||
|
separate-locales: false
|
||||||
|
|
||||||
|
build-options:
|
||||||
|
prefix: /usr/wine_extensions/v2/MinGW
|
||||||
|
env:
|
||||||
|
C_INCLUDE_PATH: /usr/wine_extensions/v2/MinGW/include
|
||||||
|
CPLUS_INCLUDE_PATH: /usr/wine_extensions/v2/MinGW/include
|
||||||
|
prepend-path: /usr/wine_extensions/v2/MinGW/bin
|
||||||
|
prepend-ld-library-path: /usr/wine_extensions/v2/MinGW/lib
|
||||||
|
prepend-pkg-config-path: /usr/wine_extensions/v2/MinGW/lib/pkgconfig
|
||||||
|
ldflags: -L/usr/wine_extensions/v2/MinGW/lib
|
||||||
|
ldflags-override: true
|
||||||
|
modules:
|
||||||
|
# Check arches
|
||||||
|
- name: check-arch
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- "false"
|
||||||
|
skip-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# Bintutils
|
||||||
|
- name: mingw-binutils-32bit
|
||||||
|
sources: &BINUTILS_SOURCES
|
||||||
|
- type: archive
|
||||||
|
url: https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
|
||||||
|
sha256: ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf
|
||||||
|
config-opts:
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --disable-werror
|
||||||
|
- --enable-deterministic-archives
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugins
|
||||||
|
- --enable-relro
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-binutils-64bit
|
||||||
|
sources: *BINUTILS_SOURCES
|
||||||
|
config-opts:
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --disable-werror
|
||||||
|
- --enable-deterministic-archives
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugins
|
||||||
|
- --enable-relro
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# Headers
|
||||||
|
- name: mingw-headers-32bit
|
||||||
|
sources: &MINGW_SOURCES
|
||||||
|
- type: archive
|
||||||
|
url: https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v6.0.0.tar.bz2
|
||||||
|
sha256: 805e11101e26d7897fce7d49cbb140d7bac15f3e085a91e0001e80b2adaf48f0
|
||||||
|
subdir: mingw-w64-headers
|
||||||
|
config-opts:
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --enable-sdk=all
|
||||||
|
- --enable-secure-api
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-headers-64bit
|
||||||
|
sources: *MINGW_SOURCES
|
||||||
|
subdir: mingw-w64-headers
|
||||||
|
config-opts:
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --enable-sdk=all
|
||||||
|
- --enable-secure-api
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# GCC only compiler
|
||||||
|
- name: mingw-gcc-pass1-32bit
|
||||||
|
sources: &GCC_SOURCES
|
||||||
|
- type: archive
|
||||||
|
url: https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz
|
||||||
|
sha256: ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
|
||||||
|
config-opts: &GCC_CONF_32BIT
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --disable-multilib
|
||||||
|
- --enable-cet=auto
|
||||||
|
- --enable-languages=c,c++,lto
|
||||||
|
- --enable-libstdcxx-time=yes
|
||||||
|
- --enable-libstdcxx-filesystem-ts=yes
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugin
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
no-make-install: true
|
||||||
|
build-options:
|
||||||
|
make-args:
|
||||||
|
- all-gcc
|
||||||
|
post-install:
|
||||||
|
- make install-gcc
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-gcc-pass1-64bit
|
||||||
|
sources: *GCC_SOURCES
|
||||||
|
config-opts: &GCC_CONF_64BIT
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --disable-multilib
|
||||||
|
- --enable-cet=auto
|
||||||
|
- --enable-languages=c,c++,lto
|
||||||
|
- --enable-libstdcxx-time=yes
|
||||||
|
- --enable-libstdcxx-filesystem-ts=yes
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugin
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
no-make-install: true
|
||||||
|
build-options:
|
||||||
|
make-args:
|
||||||
|
- all-gcc
|
||||||
|
post-install:
|
||||||
|
- make install-gcc
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# MinGW CRT
|
||||||
|
- name: mingw-crt-32bit
|
||||||
|
sources: *MINGW_SOURCES
|
||||||
|
subdir: mingw-w64-crt
|
||||||
|
config-opts:
|
||||||
|
- --host=i686-w64-mingw32
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --disable-lib64
|
||||||
|
- --enable-lib32
|
||||||
|
- --enable-wildcard
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
|
||||||
|
- CFLAGS=-O3
|
||||||
|
- CPPFLAGS=-O3
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-crt-64bit
|
||||||
|
sources: *MINGW_SOURCES
|
||||||
|
subdir: mingw-w64-crt
|
||||||
|
config-opts:
|
||||||
|
- --host=x86_64-w64-mingw32
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --disable-lib32
|
||||||
|
- --enable-lib64
|
||||||
|
- --enable-wildcard
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
|
||||||
|
- CFLAGS=-O3
|
||||||
|
- CPPFLAGS=-O3
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# GCC pass 2 full
|
||||||
|
- name: mingw-gcc-pass2-32bit
|
||||||
|
sources: *GCC_SOURCES
|
||||||
|
config-opts: *GCC_CONF_32BIT
|
||||||
|
builddir: true
|
||||||
|
ensure-writable:
|
||||||
|
- /lib/gcc/*/*/install-tools/*.conf
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-gcc-pass2-64bit
|
||||||
|
sources: *GCC_SOURCES
|
||||||
|
config-opts: *GCC_CONF_64BIT
|
||||||
|
builddir: true
|
||||||
|
ensure-writable:
|
||||||
|
- /lib/gcc/*/*/install-tools/*.conf
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# MinGW Winpthreads
|
||||||
|
- name: mingw-winpthreads-32bit
|
||||||
|
sources: *MINGW_SOURCES
|
||||||
|
subdir: mingw-w64-libraries/winpthreads
|
||||||
|
config-opts:
|
||||||
|
- --host=i686-w64-mingw32
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/i686-w64-mingw32
|
||||||
|
- CFLAGS=-O3
|
||||||
|
- CPPFLAGS=-O3
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-winpthreads-64bit
|
||||||
|
sources: *MINGW_SOURCES
|
||||||
|
subdir: mingw-w64-libraries/winpthreads
|
||||||
|
config-opts:
|
||||||
|
- --host=x86_64-w64-mingw32
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --prefix=/usr/wine_extensions/v2/MinGW/x86_64-w64-mingw32
|
||||||
|
- CFLAGS=-O3
|
||||||
|
- CPPFLAGS=-O3
|
||||||
|
builddir: true
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# GCC full
|
||||||
|
- name: mingw-gcc-pass-32bit
|
||||||
|
sources: *GCC_SOURCES
|
||||||
|
config-opts:
|
||||||
|
- --target=i686-w64-mingw32
|
||||||
|
- --disable-multilib
|
||||||
|
- --enable-cet=auto
|
||||||
|
- --enable-languages=c,c++,lto
|
||||||
|
- --enable-libstdcxx-time=yes
|
||||||
|
- --enable-libstdcxx-filesystem-ts=yes
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugin
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --enable-threads=posix
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
ensure-writable:
|
||||||
|
- /lib/gcc/*/*/install-tools/*.conf
|
||||||
|
only-arches:
|
||||||
|
- i386
|
||||||
|
- x86_64
|
||||||
|
- name: mingw-gcc-pass2-64bit
|
||||||
|
sources: *GCC_SOURCES
|
||||||
|
config-opts:
|
||||||
|
- --target=x86_64-w64-mingw32
|
||||||
|
- --disable-multilib
|
||||||
|
- --enable-cet=auto
|
||||||
|
- --enable-languages=c,c++,lto
|
||||||
|
- --enable-libstdcxx-time=yes
|
||||||
|
- --enable-libstdcxx-filesystem-ts=yes
|
||||||
|
- --enable-lto
|
||||||
|
- --enable-plugin
|
||||||
|
- --enable-shared
|
||||||
|
- --enable-static
|
||||||
|
- --enable-threads=posix
|
||||||
|
- --with-system-zlib
|
||||||
|
builddir: true
|
||||||
|
ensure-writable:
|
||||||
|
- /lib/gcc/*/*/install-tools/*.conf
|
||||||
|
only-arches:
|
||||||
|
- x86_64
|
||||||
|
|
||||||
|
# Finalize
|
||||||
|
- name: update-elf
|
||||||
|
sources:
|
||||||
|
- type: file
|
||||||
|
path: elf_compress.py
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- python3 elf_compress.py /usr/wine_extensions/v2/MinGW
|
|
@ -0,0 +1,5 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
# Args: <arch> <builder-args> [<repo>]
|
||||||
|
|
||||||
|
CONF_PATH="$(dirname "$0")" &&
|
||||||
|
"$CONF_PATH/build_extension.sh" "$CONF_PATH/ExtensionMinGW.yaml" "$1" "$2" "$3"
|
|
@ -0,0 +1,14 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
# Args: <file> <arch> <builder-args> [<repo>]
|
||||||
|
|
||||||
|
if [ -z "VERBOSE" ]; then
|
||||||
|
HASH_MODULE_ARGS="-v"
|
||||||
|
else
|
||||||
|
HASH_MODULE_ARGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONF_PATH="$(dirname "$0")" &&
|
||||||
|
"$CONF_PATH/../../../tools/hash_modules.py" $HASH_MODULE_ARGS --require-build "$1" "$2" &&
|
||||||
|
exec "$CONF_PATH/../../../tools/build.sh" "$1" "$2" "$3" "$4"
|
||||||
|
|
||||||
|
echo 'No build required.'
|
|
@ -0,0 +1,23 @@
|
||||||
|
#! /usr/bin/evn python3
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def parse_path(path):
|
||||||
|
if os.path.islink(path):
|
||||||
|
return
|
||||||
|
elif os.path.isfile(path):
|
||||||
|
if open(path, "rb").read(4) == b"\x7FELF":
|
||||||
|
print("Compress: " + path)
|
||||||
|
subprocess.call(["cp", "-a", path, "tmp.so"])
|
||||||
|
subprocess.call(["strip", "--strip-debug", "tmp.so"])
|
||||||
|
subprocess.call(["cp", "-a", "tmp.so", path])
|
||||||
|
subprocess.call(["eu-elfcompress", "-vt", "gnu", path])
|
||||||
|
elif os.path.isdir(path):
|
||||||
|
for i in map(lambda x: os.path.join(path, x),
|
||||||
|
sorted(os.listdir(path))):
|
||||||
|
parse_path(i)
|
||||||
|
for i in sys.argv[1:]:
|
||||||
|
parse_path(i)
|
Loading…
Reference in New Issue