diff --git a/README.md b/README.md index 0b94f2fb2..587c42fb5 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,26 @@ ProxSpace is a collection of tools that are required to compile the firmware and client of the Proxmark III. At its core ProxSpace uses msys2. MSYS2 is a software distro and building platform for Windows, it provides a bash shell, Autotools, revision control systems and the like for building native Windows applications using MinGW-w64 toolchains. ProxSpace uses the GNU Arm Embedded Toolchain for compiling the Proxmark III firmware. ## Files -ProxSpace comes with 3 different executables .bat files. +ProxSpace comes with 2 different executables .bat files. - - `runme.bat` will start ProxSpace in x86 mode. - `runme64.bat` will start ProxSpace in x64 mode. - - `autobuild.bat` runs a script (msys2/autobuild.sh) in x86 mode as well as in x64 mode at startup. The script will update all git repositories in the pm3 folder and then compile them and move a zip file with the just compiled firmware and client into the build folder. It is not designed for development, just for compiling. + - `autobuild.bat` runs a script (setup/autobuild.sh) in x64 mode at startup. The script will update all git repositories in the pm3 folder and then compile them and move a zip file with the just compiled firmware and client into the build folder. It is not designed for development, just for compiling. ## What's installed -ProxSpace will automatically download and update to the latest required packages. All tools will be contained within the ProxSpace folder, however **once ProxSpace is setup the ProxSpace folder must not be moved**. If you wish to have ProxSpace in a different directory, you need to reinstall it. +ProxSpace will automatically download and update to the latest required packages. All tools will be contained within the ProxSpace folder. -Following tools are already installed with the current ProxSpace version: - - msys2-x86_64-20200903 +ProxSpace is based on: + - msys2-x86_64-20210725 Following packages will be automatically download or updated: - arm-none-eabi-gcc + - arm-none-eabi-gdb + - openocd - git - make - cmake - gcc + - gdb - Qt5 - readline - pkg-config @@ -30,24 +32,28 @@ Following tools are already installed with the current ProxSpace version: - jansson ## Package management system -MSYS2 features a package management system to provide easy installation of packages, Pacman. It brings many powerful features such as dependency resolution and simple complete system upgrades (excluding the GNU Arm Embedded Toolchain), as well as straight-forward package building. All installed packages can be updated with `pacman -Syuu` For more details visit [the MSYS2 wiki](https://github.com/msys2/msys2/wiki) +MSYS2 features a package management system to provide easy installation of packages, Pacman. It brings many powerful features such as dependency resolution and simple complete system upgrades, as well as straight-forward package building. All installed packages can be updated with `pacman -Syuu` For more details visit [the MSYS2 wiki](https://github.com/msys2/msys2/wiki) ## Installation 1. There are two methods of installing the ProxSpace environment. - * Downloading [the latest master](https://github.com/Gator96100/ProxSpace/archive/master.zip). This will upgrade the msys2 core packages and then will download and install every package required for compiling the Proxmark client and firmware. - * Downloading [the latest release](https://github.com/Gator96100/ProxSpace/releases). This ProxSpace environment has the required packages cached and will only install and update outdated packages. + * Downloading [the latest master](https://github.com/Gator96100/ProxSpace/archive/master.zip). This will upgrade the msys2 core packages and then will download and install every package required for compiling the Proxmark client and firmware. This can take some time. + * Downloading [the latest release](https://github.com/Gator96100/ProxSpace/releases). This ProxSpace environment is prepared for a fast installation, all packages are already cached. 2. Extract 'ProxSpace' to a location on drive without spaces. For example `C:\Proxspace` or `D:\projects\public\proxmark\proxspace` are ok, whereas `C:\My Documents\My Projects\proxspace` is not. - 3. Run `runme.bat` or `runme64.bat` depending on your Windows architecture. - 4. Get the Proxmark III repository you wish to compile. This can be done with git. For example `git clone https://github.com/Proxmark/proxmark3.git`. + 3. Run `runme64.bat` depending on your Windows architecture. + 4. Get the Proxmark III repository you wish to compile. This can be done with git. For example `git clone https://github.com/RfidResearchGroup/proxmark3.git`. 5. Go into the root directory of the repository you wish to compile. For example `cd proxmark3`. 6. To build the project type `make clean && make all`. 7. In most cases the Proxmark III needs to be flashed with the just compiled firmware for details see **Firmware upgrading the Proxmark III**. - 8. To run the Proxmark III client type `./client/proxmark3.exe COM1` where COM1 is the USB port of the Proxmark III. + 8. To run the Proxmark III client type `./pm3`. 9. Check your firmware revision on the Proxmark III with `hw ver` 10. For basic help type `help`. Or for help on a set of sub commands type the command followed by help. For example `hf mf help`. ## Firmware upgrading the Proxmark III -Please note that more detail is available on the wiki: https://github.com/Proxmark/proxmark3/wiki +Please note that more detail is available on the wiki: https://github.com/RfidResearchGroup/proxmark3/blob/master/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md#flash-the-bootrom--fullimage 1. Attach the Proxmark III to a USB port on your computer. - 2. Flash the bootrom and fullimage with `./client/flasher COM1 -b ./bootrom/obj/bootrom.elf ./armsrc/obj/fullimage.elf`where COM1 is the USB port of the Proxmark III. - 3. Wait for the process to complete. + 2. Flash the bootrom with `./pm3-flash-bootrom`. + 3. Flash the fullimage with `./pm3-flash-fullimage`. + 4. Wait for the process to complete. + + ## Setup video + [![ProxSpace Windows 10 setup](http://img.youtube.com/vi/-DLYp-yWmtQ/0.jpg)](http://www.youtube.com/watch?v=-DLYp-yWmtQ "ProxSpace Windows 10 setup") diff --git a/autobuild.bat b/autobuild.bat index 0efa61e5b..99b574d4d 100644 --- a/autobuild.bat +++ b/autobuild.bat @@ -1,4 +1,5 @@ @echo off -call msys2\ps\setup.cmd -echo %cd%\builds /builds ntfs noacl 0 0 >>msys2/etc/fstab -call msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c /ps/autobuild.sh \ No newline at end of file +call setup\setup.cmd +taskkill /IM "gpg-agent.exe" /F 2>NUL +echo %~dp0builds /builds ntfs noacl 0 0 >>msys2/etc/fstab +call msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c /setup/autobuild.sh diff --git a/msys2/autorebasebase1st.bat b/msys2/autorebasebase1st.bat deleted file mode 100644 index 8a89debe8..000000000 --- a/msys2/autorebasebase1st.bat +++ /dev/null @@ -1,15 +0,0 @@ -@echo off -REM Copyright (c) 2014, Ray Donnelly - -set PATH=%~dp0\usr\bin;%PATH% - -echo Querying 'base' packages for DLLs .. -%~dp0\usr\bin\bash /usr/bin/pacman-rec-filename-grep base base-dlls-unix.txt ".*\.(dll|so|oct)$" -%~dp0\usr\bin\bash /usr/bin/paths-from-unix-to-windows base-dlls-unix.txt base-dlls.txt %CD:\=/% - -echo Rebasing all DLLs, 'base' ones first .. -REM -i is new; it means ignore database and -REM rebase from end of {cygwin1,msys-2.0}.dll -REM it work by avoiding passing -s to rebase.exe -REM which has modifications to support this mode. -%~dp0\usr\bin\dash /usr/bin/rebaseall -T base-dlls.txt -i -p diff --git a/msys2/clang32.exe b/msys2/clang32.exe new file mode 100644 index 000000000..b026c08e6 Binary files /dev/null and b/msys2/clang32.exe differ diff --git a/msys2/clang32.ico b/msys2/clang32.ico new file mode 100644 index 000000000..39039bab1 Binary files /dev/null and b/msys2/clang32.ico differ diff --git a/msys2/clang32.ini b/msys2/clang32.ini new file mode 100644 index 000000000..45e964685 --- /dev/null +++ b/msys2/clang32.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=CLANG32 diff --git a/msys2/clang32/etc/config.site b/msys2/clang32/etc/config.site deleted file mode 100644 index bb39cb81f..000000000 --- a/msys2/clang32/etc/config.site +++ /dev/null @@ -1,21 +0,0 @@ -# This file is in public domain. -# Original author: Karlson2k (Evgeny Grin) -# Written for MSys2/MinGW64 to help running 'configure' scripts - -# Defaults for MinGW64-targeted programs - -# Set proper selfname on bash and fallback to default name on other shells -test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site - -# Set default 'host' to speedup configure -if test -z "$build_alias"; then - build_alias="${MSYSTEM_CHOST-i686-w64-mingw32}" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 -fi - -# Set default 'prefix' to "/clang32" -if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ - ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then - prefix="${MSYSTEM_PREFIX-/clang32}" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 -fi diff --git a/msys2/clang64.exe b/msys2/clang64.exe new file mode 100644 index 000000000..ade89fe9f Binary files /dev/null and b/msys2/clang64.exe differ diff --git a/msys2/clang64.ico b/msys2/clang64.ico new file mode 100644 index 000000000..f051668c8 Binary files /dev/null and b/msys2/clang64.ico differ diff --git a/msys2/clang64.ini b/msys2/clang64.ini new file mode 100644 index 000000000..b9c0804cd --- /dev/null +++ b/msys2/clang64.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=CLANG64 diff --git a/msys2/clang64/etc/config.site b/msys2/clang64/etc/config.site deleted file mode 100644 index 8aa08088c..000000000 --- a/msys2/clang64/etc/config.site +++ /dev/null @@ -1,21 +0,0 @@ -# This file is in public domain. -# Original author: Karlson2k (Evgeny Grin) -# Written for MSys2/MinGW64 to help running 'configure' scripts - -# Defaults for MinGW64-targeted programs - -# Set proper selfname on bash and fallback to default name on other shells -test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site - -# Set default 'host' to speedup configure -if test -z "$build_alias"; then - build_alias="${MSYSTEM_CHOST-x86_64-w64-mingw32}" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 -fi - -# Set default 'prefix' to "/clang64" -if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ - ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then - prefix="${MSYSTEM_PREFIX-/clang64}" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 -fi diff --git a/msys2/clangarm64.exe b/msys2/clangarm64.exe new file mode 100644 index 000000000..5f81fdd4a Binary files /dev/null and b/msys2/clangarm64.exe differ diff --git a/msys2/clangarm64.ico b/msys2/clangarm64.ico new file mode 100644 index 000000000..088a279db Binary files /dev/null and b/msys2/clangarm64.ico differ diff --git a/msys2/clangarm64.ini b/msys2/clangarm64.ini new file mode 100644 index 000000000..45c98c6b1 --- /dev/null +++ b/msys2/clangarm64.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=CLANGARM64 diff --git a/msys2/dev/.dummy b/msys2/dev/.dummy deleted file mode 100644 index e69de29bb..000000000 diff --git a/msys2/dir b/msys2/dir deleted file mode 100644 index e640bffd0..000000000 --- a/msys2/dir +++ /dev/null @@ -1,15 +0,0 @@ -This is the file .../info/dir, which contains the -topmost node of the Info hierarchy, called (dir)Top. -The first time you invoke Info you start off looking at this node. - -File: dir, Node: Top This is the top of the INFO tree - - This (the Directory node) gives a menu of major topics. - Typing "q" exits, "H" lists all Info commands, "d" returns here, - "h" gives a primer for first-timers, - "mEmacs" visits the Emacs manual, etc. - - In Emacs, you can click mouse button 2 on a menu item or cross reference - to select it. - -* Menu: diff --git a/msys2/etc/bash.bashrc b/msys2/etc/bash.bashrc index 4d825de9d..5eaa3334c 100644 --- a/msys2/etc/bash.bashrc +++ b/msys2/etc/bash.bashrc @@ -54,8 +54,12 @@ if [[ -n "$(command -v getent)" ]] && id -G | grep -q "$(getent -w group 'S-1-16 then _ps1_symbol='\[\e[1m\]#\[\e[0m\]' else _ps1_symbol='\$' fi -[[ $(declare -p PS1 2>/dev/null | cut -c 1-11) = 'declare -x ' ]] || \ +case "$(declare -p PS1 2>/dev/null)" in +'declare -x '*) ;; # okay +*) export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n'"${_ps1_symbol}"' ' + ;; +esac unset _ps1_symbol # Uncomment to use the terminal colours set in DIR_COLORS diff --git a/msys2/etc/config.site b/msys2/etc/config.site index fcc3b4f72..d02bf2bde 100644 --- a/msys2/etc/config.site +++ b/msys2/etc/config.site @@ -2,40 +2,20 @@ # Original author: Karlson2k (Evgeny Grin) # Written for MSys2 to help running 'configure' scripts -# Use correct config.site even if CONFIG_SITE is not set -if test "x$MSYSTEM" = "xMINGW64"; then - if test -r "${MINGW_PREFIX-/mingw64}/etc/config.site"; then - . "${MINGW_PREFIX-/mingw64}/etc/config.site" - fi -elif test "x$MSYSTEM" = "xMINGW32"; then - if test -r "${MINGW_PREFIX-/mingw32}/etc/config.site"; then - . "${MINGW_PREFIX-/mingw32}/etc/config.site" - fi -elif test "x$MSYSTEM" = "xCLANG64"; then - if test -r "${MINGW_PREFIX-/clang64}/etc/config.site"; then - . "${MINGW_PREFIX-/clang64}/etc/config.site" - fi -elif test "x$MSYSTEM" = "xCLANG32"; then - if test -r "${MINGW_PREFIX-/clang32}/etc/config.site"; then - . "${MINGW_PREFIX-/clang32}/etc/config.site" - fi -else - # Defaults for MSys2-targeted programs +# Defaults for MSys2/MinGW64-targeted programs - # Set proper selfname on bash and fallback to default name on other shells - test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site - - # Set default 'host' to speedup configure - if test -z "$build_alias"; then - build_alias="${MSYSTEM_CARCH-x86_64}-pc-msys" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 - fi - - # Set default 'prefix' to "/usr" - if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ - ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then - prefix="${MSYSTEM_PREFIX-/usr}" && \ - ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 - fi +# Set proper selfname on bash and fallback to default name on other shells +test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site +# Set default 'host' to speedup configure +if test -z "$build_alias"; then + build_alias="${MSYSTEM_CHOST}" && \ + ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 +fi + +# Set default 'prefix' +if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ + ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then + prefix="${MSYSTEM_PREFIX}" && \ + ${as_echo-echo} "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 fi diff --git a/msys2/etc/inputrc b/msys2/etc/inputrc new file mode 100644 index 000000000..e09ca5b2a --- /dev/null +++ b/msys2/etc/inputrc @@ -0,0 +1,103 @@ +# To the extent possible under law, the author(s) have dedicated all +# copyright and related and neighboring rights to this software to the +# public domain worldwide. This software is distributed without any warranty. +# You should have received a copy of the CC0 Public Domain Dedication along +# with this software. +# If not, see . + +# "\e[3~": delete-char + +# VT +# "\e[1~": beginning-of-line +# "\e[4~": end-of-line + +# kvt +# "\e[H": beginning-of-line +# "\e[F": end-of-line + +# rxvt and konsole (i.e. the KDE-app...) +# "\e[7~": beginning-of-line +# "\e[8~": end-of-line + +# VT220 +# "\eOH": beginning-of-line +# "\eOF": end-of-line + +# Allow 8-bit input/output +# set meta-flag on +# set convert-meta off +# set input-meta on +# set output-meta on +#$if Bash + # Don't ring bell on completion + set bell-style none + + # or, don't beep at me - show me + #set bell-style visible + + # Show all instead of beeping first + set show-all-if-ambiguous off + + # Filename completion/expansion + set completion-ignore-case on + #set show-all-if-ambiguous on + + # Expand homedir name + #set expand-tilde on + + # Append "/" to all dirnames + #set mark-directories on + #set mark-symlinked-directories on + + # visible-stats + # Append a mark according to the file type in a listing + set visible-stats off + set mark-directories on + + # Match all files + #set match-hidden-files on + + # 'Magic Space' + # Insert a space character then performs + # a history expansion in the line + #Space: magic-space +#$endif + +# MSYSTEM is emacs based +$if mode=emacs + # Common to Console & RXVT + "\e[2~": paste-from-clipboard # "Ins. Key" + "\e[5~": beginning-of-history # Page up + "\e[6~": end-of-history # Page down + + $if term=msys # RXVT + "\e[7~": beginning-of-line # Home Key + "\e[8~": end-of-line # End Key + "\e[11~": display-shell-version # F1 + "\e[15~": re-read-init-file # F5 + "\e[12~": "Function Key 2" + "\e[13~": "Function Key 3" + "\e[14~": "Function Key 4" + "\e[17~": "Function Key 6" + "\e[18~": "Function Key 7" + "\e[19~": "Function Key 8" + "\e[20~": "Function Key 9" + "\e[21~": "Function Key 10" + $else + # Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo + # $if term=cygwin # Console + "\e[1~": beginning-of-line # Home Key + "\e[4~": end-of-line # End Key + "\e[3~": delete-char # Delete Key + "\e\e[C": forward-word # Alt-Right + "\e\e[D": backward-word # Alt-Left + "\e[1;5C": forward-word # ctrl + right + "\e[1;5D": backward-word # ctrl + left + "\e[17~": "Function Key 6" + "\e[18~": "Function Key 7" + "\e[19~": "Function Key 8" + "\e[20~": "Function Key 9" + "\e[21~": "Function Key 10" + "\e[23~": "Function Key 11" + $endif +$endif \ No newline at end of file diff --git a/msys2/etc/localtime b/msys2/etc/localtime index 7f6d958f8..465546bd3 100644 Binary files a/msys2/etc/localtime and b/msys2/etc/localtime differ diff --git a/msys2/etc/makepkg.conf b/msys2/etc/makepkg.conf index bca7d8bb0..1068f1898 100644 --- a/msys2/etc/makepkg.conf +++ b/msys2/etc/makepkg.conf @@ -8,9 +8,10 @@ # #-- The download utilities that makepkg should use to acquire sources # Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' +DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u' + 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' + 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' 'rsync::/usr/bin/rsync --no-motd -z %u %o' 'scp::/usr/bin/scp -C %u %o') @@ -22,19 +23,11 @@ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o % #-- The package required by makepkg to download VCS sources # Format: 'protocol::package' VCSCLIENTS=('bzr::bzr' + 'fossil::fossil' 'git::git' 'hg::mercurial' 'svn::subversion') -#-- Using git am to apply patches has benefits, but also downsides -# one being that people without their .gitconfig set get prompts -# and the other being that the sha1s vary each time, so fix them -GIT_COMMITTER_NAME="makepkg" -GIT_COMMITTER_EMAIL="makepkg@msys2.org" -function gitam_mkpkg() { - git am --committer-date-is-author-date "$@" -} - ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### @@ -45,9 +38,11 @@ CHOST="x86_64-pc-msys" #-- Compiler and Linker Flags # -march (or -mcpu) builds exclusively for an architecture # -mtune optimizes for an architecture, but builds for whole processor family +CC=gcc +CXX=g++ CPPFLAGS= -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" +CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe" +CXXFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe" LDFLAGS="-pipe" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j$(($(nproc)+1))" @@ -59,7 +54,7 @@ DEBUG_CXXFLAGS="-ggdb -Og" # BUILD ENVIRONMENT ######################################################################### # -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) +# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign) # A negated environment option will do the opposite of the comments below. # #-- distcc: Use the Distributed C/C++/ObjC compiler @@ -82,7 +77,7 @@ BUILDENV=(!distcc color !ccache check !sign) # These are default values for the options=() settings ######################################################################### # -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto) # A negated option will do the opposite of the comments below. # #-- strip: Strip symbols from binaries/libraries @@ -93,11 +88,12 @@ BUILDENV=(!distcc color !ccache check !sign) #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip #-- purge: Remove files specified by PURGE_TARGETS #-- debug: Add debugging flags as specified in DEBUG_* variables +#-- lto: Add compile flags for building with link time optimization # -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) +OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug !lto) #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) +INTEGRITY_CHECK=(sha256) #-- Options to be used when stripping binaries. See `man strip' for details. STRIP_BINARIES="--strip-all" #-- Options to be used when stripping shared libraries. See `man strip' for details. @@ -148,10 +144,12 @@ COMPRESSLZ=(lzip -c -f) # EXTENSION DEFAULTS ######################################################################### # -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# PKGEXT='.pkg.tar.zst' -SRCEXT='.src.tar.gz' +SRCEXT='.src.tar.zst' -# vim: set ft=sh ts=2 sw=2 et: +######################################################################### +# OTHER +######################################################################### +# +#-- Command used to run pacman as root, instead of trying sudo and su +PACMAN_AUTH=() diff --git a/msys2/etc/makepkg_clang32.conf b/msys2/etc/makepkg_clang32.conf deleted file mode 100644 index a34885582..000000000 --- a/msys2/etc/makepkg_clang32.conf +++ /dev/null @@ -1,173 +0,0 @@ -# -# /etc/makepkg.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync --no-motd -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -#-- The package required by makepkg to download VCS sources -# Format: 'protocol::package' -VCSCLIENTS=('bzr::bzr' - 'git::git' - 'hg::mercurial' - 'svn::subversion') - -#-- Using git am to apply patches has benefits, but also downsides -# one being that people without their .gitconfig set get prompts -# and the other being that the sha1s vary each time, so fix them -GIT_COMMITTER_NAME="makepkg" -GIT_COMMITTER_EMAIL="makepkg@msys2.org" -function gitam_mkpkg() { - git am --committer-date-is-author-date "$@" -} - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="i686" -CHOST="i686-w64-mingw32" - -######################################################################### -# Mingw toolchains stuff -######################################################################### -# -MINGW_CHOST="i686-w64-mingw32" -MINGW_PREFIX="/clang32" -MINGW_PACKAGE_PREFIX="clang-mingw-w64-i686" - -# DirectX compatibility environment variable -DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" -CFLAGS="-march=i686 -mtune=generic -O2 -pipe" -CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe" -LDFLAGS="-pipe" -# Uncomment to enable hardening (ASLR, DEP) -#LDFLAGS="-pipe -Wl,--dynamicbase,--nxcompat" -#-- Make Flags: change this for DistCC/SMP systems -MAKEFLAGS="-j$(($(nproc)+1))" -#-- Debugging flags -DEBUG_CFLAGS="-ggdb -Og" -DEBUG_CXXFLAGS="-ggdb -Og" - -ACLOCAL_PATH="${MINGW_PREFIX}/share/aclocal:/usr/share/aclocal" -PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(!distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- staticlibs: Leave static library (.a) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- debug: Add debugging flags as specified in DEBUG_* variables -# -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=(clang32{{,/local}{,/share},/opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(clang32/{,local/}{,share/}{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(clang32/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/var/packages-clang32 -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/var/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/var/srcpackages-clang32 -#-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/var/makepkglogs -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe " -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# COMPRESSION DEFAULTS -######################################################################### -# -COMPRESSGZ=(gzip -c -f -n) -COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -T0 -) -COMPRESSZST=(zstd -c -T0 --ultra -20 -) -COMPRESSLRZ=(lrzip -q) -COMPRESSLZO=(lzop -q) -COMPRESSZ=(compress -c -f) -COMPRESSLZ4=(lz4 -q) -COMPRESSLZ=(lzip -c -f) - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.zst' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/msys2/etc/makepkg_clang64.conf b/msys2/etc/makepkg_clang64.conf deleted file mode 100644 index e5d259130..000000000 --- a/msys2/etc/makepkg_clang64.conf +++ /dev/null @@ -1,173 +0,0 @@ -# -# /etc/makepkg_mingw64.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync --no-motd -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -#-- The package required by makepkg to download VCS sources -# Format: 'protocol::package' -VCSCLIENTS=('bzr::bzr' - 'git::git' - 'hg::mercurial' - 'svn::subversion') - -#-- Using git am to apply patches has benefits, but also downsides -# one being that people without their .gitconfig set get prompts -# and the other being that the sha1s vary each time, so fix them -GIT_COMMITTER_NAME="makepkg" -GIT_COMMITTER_EMAIL="makepkg@msys2.org" -function gitam_mkpkg() { - git am --committer-date-is-author-date "$@" -} - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="x86_64" -CHOST="x86_64-w64-mingw32" - -######################################################################### -# Mingw toolchains stuff -######################################################################### -# -MINGW_CHOST="x86_64-w64-mingw32" -MINGW_PREFIX="/clang64" -MINGW_PACKAGE_PREFIX="clang-mingw-w64-x86_64" - -# DirectX compatibility environment variable -DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" -LDFLAGS="-pipe" -# Uncomment to enable hardening (ASLR, High entropy ASLR, DEP) -#LDFLAGS="-pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat" -#-- Make Flags: change this for DistCC/SMP systems -MAKEFLAGS="-j$(($(nproc)+1))" -#-- Debugging flags -DEBUG_CFLAGS="-ggdb -Og" -DEBUG_CXXFLAGS="-ggdb -Og" - -ACLOCAL_PATH="${MINGW_PREFIX}/share/aclocal:/usr/share/aclocal" -PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(!distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- staticlibs: Leave static library (.a) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- debug: Add debugging flags as specified in DEBUG_* variables -# -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=(clang64{{,/local}{,/share},/opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(clang64/{,local/}{,share/}{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(clang64/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/var/packages-clang64 -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/var/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/var/srcpackages-clang64 -#-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/var/makepkglogs -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe " -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# COMPRESSION DEFAULTS -######################################################################### -# -COMPRESSGZ=(gzip -c -f -n) -COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -T0 -) -COMPRESSZST=(zstd -c -T0 --ultra -20 -) -COMPRESSLRZ=(lrzip -q) -COMPRESSLZO=(lzop -q) -COMPRESSZ=(compress -c -f) -COMPRESSLZ4=(lz4 -q) -COMPRESSLZ=(lzip -c -f) - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.zst' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/msys2/etc/makepkg_mingw.conf b/msys2/etc/makepkg_mingw.conf new file mode 100644 index 000000000..795e6603c --- /dev/null +++ b/msys2/etc/makepkg_mingw.conf @@ -0,0 +1,227 @@ +# +# /etc/makepkg_mingw.conf +# + +######################################################################### +# SOURCE ACQUISITION +######################################################################### +# +#-- The download utilities that makepkg should use to acquire sources +# Format: 'protocol::agent' +DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u' + 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' + 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' + 'rsync::/usr/bin/rsync --no-motd -z %u %o' + 'scp::/usr/bin/scp -C %u %o') + +# Other common tools: +# /usr/bin/snarf +# /usr/bin/lftpget -c +# /usr/bin/wget + +#-- The package required by makepkg to download VCS sources +# Format: 'protocol::package' +VCSCLIENTS=('bzr::bzr' + 'fossil::fossil' + 'git::git' + 'hg::mercurial' + 'svn::subversion') + +######################################################################### +# ARCHITECTURE, COMPILE FLAGS +######################################################################### +# + +if [[ "$MSYSTEM" == "MINGW64" ]]; then + CARCH="x86_64" + CHOST="x86_64-w64-mingw32" + MINGW_CHOST="x86_64-w64-mingw32" + MINGW_PREFIX="/mingw64" + MINGW_PACKAGE_PREFIX="mingw-w64-x86_64" + CC="gcc" + CXX="g++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe" + LDFLAGS="-pipe" +elif [[ "$MSYSTEM" == "MINGW32" ]]; then + CARCH="i686" + CHOST="i686-w64-mingw32" + MINGW_CHOST="i686-w64-mingw32" + MINGW_PREFIX="/mingw32" + MINGW_PACKAGE_PREFIX="mingw-w64-i686" + CC="gcc" + CXX="g++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-march=pentium4 -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-march=pentium4 -mtune=generic -O2 -pipe" + LDFLAGS="-pipe -Wl,--no-seh -Wl,--large-address-aware" +elif [[ "$MSYSTEM" == "CLANG64" ]]; then + CARCH="x86_64" + CHOST="x86_64-w64-mingw32" + MINGW_CHOST="x86_64-w64-mingw32" + MINGW_PREFIX="/clang64" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-x86_64" + CC="clang" + CXX="clang++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe" + LDFLAGS="-pipe" +elif [[ "$MSYSTEM" == "CLANG32" ]]; then + CARCH="i686" + CHOST="i686-w64-mingw32" + MINGW_CHOST="i686-w64-mingw32" + MINGW_PREFIX="/clang32" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-i686" + CC="clang" + CXX="clang++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-march=pentium4 -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-march=pentium4 -mtune=generic -O2 -pipe" + LDFLAGS="-pipe -Wl,--no-seh -Wl,--large-address-aware" +elif [[ "$MSYSTEM" == "CLANGARM64" ]]; then + CARCH="aarch64" + CHOST="aarch64-w64-mingw32" + MINGW_CHOST="aarch64-w64-mingw32" + MINGW_PREFIX="/clangarm64" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-aarch64" + CC="clang" + CXX="clang++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-O2 -pipe" + LDFLAGS="-pipe" +elif [[ "$MSYSTEM" == "UCRT64" ]]; then + CARCH="x86_64" + CHOST="x86_64-w64-mingw32" + MINGW_CHOST="x86_64-w64-mingw32" + MINGW_PREFIX="/ucrt64" + MINGW_PACKAGE_PREFIX="mingw-w64-ucrt-x86_64" + CC="gcc" + CXX="g++" + CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" + CFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong" + CXXFLAGS="-march=nocona -msahf -mtune=generic -O2 -pipe" + LDFLAGS="-pipe" +else + echo "Unsupported MSYSTEM: $MSYSTEM" + exit 1 +fi + +# DirectX compatibility environment variable +DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} + +#-- Make Flags: change this for DistCC/SMP systems +MAKEFLAGS="-j$(($(nproc)+1))" +#-- Debugging flags +DEBUG_CFLAGS="-ggdb -Og" +DEBUG_CXXFLAGS="-ggdb -Og" + +ACLOCAL_PATH="${MINGW_PREFIX}/share/aclocal:/usr/share/aclocal" +PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" + +######################################################################### +# BUILD ENVIRONMENT +######################################################################### +# +# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign) +# A negated environment option will do the opposite of the comments below. +# +#-- distcc: Use the Distributed C/C++/ObjC compiler +#-- color: Colorize output messages +#-- ccache: Use ccache to cache compilation +#-- check: Run the check() function if present in the PKGBUILD +#-- sign: Generate PGP signature file +# +BUILDENV=(!distcc color !ccache check !sign) +# +#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, +#-- specify a space-delimited list of hosts running in the DistCC cluster. +#DISTCC_HOSTS="" +# +#-- Specify a directory for package building. +#BUILDDIR=/tmp/makepkg + +######################################################################### +# GLOBAL PACKAGE OPTIONS +# These are default values for the options=() settings +######################################################################### +# +# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto) +# A negated option will do the opposite of the comments below. +# +#-- strip: Strip symbols from binaries/libraries +#-- docs: Save doc directories specified by DOC_DIRS +#-- libtool: Leave libtool (.la) files in packages +#-- staticlibs: Leave static library (.a) files in packages +#-- emptydirs: Leave empty directories in packages +#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip +#-- purge: Remove files specified by PURGE_TARGETS +#-- debug: Add debugging flags as specified in DEBUG_* variables +#-- lto: Add compile flags for building with link time optimization +# +OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug !lto) + +#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 +INTEGRITY_CHECK=(sha256) +#-- Options to be used when stripping binaries. See `man strip' for details. +STRIP_BINARIES="--strip-all" +#-- Options to be used when stripping shared libraries. See `man strip' for details. +STRIP_SHARED="--strip-unneeded" +#-- Options to be used when stripping static libraries. See `man strip' for details. +STRIP_STATIC="--strip-debug" +#-- Manual (man and info) directories to compress (if zipman is specified) +MAN_DIRS=("${MINGW_PREFIX#/}"{{,/local}{,/share},/opt/*}/{man,info}) +#-- Doc directories to remove (if !docs is specified) +DOC_DIRS=("${MINGW_PREFIX#/}"/{,local/}{,share/}{doc,gtk-doc}) +#-- Files to be removed from all packages (if purge is specified) +PURGE_TARGETS=("${MINGW_PREFIX#/}"/{,share}/info/dir .packlist *.pod) + +######################################################################### +# PACKAGE OUTPUT +######################################################################### +# +# Default: put built package and cached source in build directory +# +#-- Destination: specify a fixed directory where all packages will be placed +#PKGDEST=/var/packages-mingw64 +#-- Source cache: specify a fixed directory where source files will be cached +#SRCDEST=/var/sources +#-- Source packages: specify a fixed directory where all src packages will be placed +#SRCPKGDEST=/var/srcpackages-mingw64 +#-- Log files: specify a fixed directory where all log files will be placed +#LOGDEST=/var/makepkglogs +#-- Packager: name/email of the person or organization building packages +#PACKAGER="John Doe " +#-- Specify a key to use for package signing +#GPGKEY="" + +######################################################################### +# COMPRESSION DEFAULTS +######################################################################### +# +COMPRESSGZ=(gzip -c -f -n) +COMPRESSBZ2=(bzip2 -c -f) +COMPRESSXZ=(xz -c -z -T0 -) +COMPRESSZST=(zstd -c -T0 --ultra -20 -) +COMPRESSLRZ=(lrzip -q) +COMPRESSLZO=(lzop -q) +COMPRESSZ=(compress -c -f) +COMPRESSLZ4=(lz4 -q) +COMPRESSLZ=(lzip -c -f) + +######################################################################### +# EXTENSION DEFAULTS +######################################################################### +# +PKGEXT='.pkg.tar.zst' +SRCEXT='.src.tar.zst' + +######################################################################### +# OTHER +######################################################################### +# +#-- Command used to run pacman as root, instead of trying sudo and su +PACMAN_AUTH=() diff --git a/msys2/etc/makepkg_mingw32.conf b/msys2/etc/makepkg_mingw32.conf deleted file mode 100644 index 494eca065..000000000 --- a/msys2/etc/makepkg_mingw32.conf +++ /dev/null @@ -1,173 +0,0 @@ -# -# /etc/makepkg.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync --no-motd -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -#-- The package required by makepkg to download VCS sources -# Format: 'protocol::package' -VCSCLIENTS=('bzr::bzr' - 'git::git' - 'hg::mercurial' - 'svn::subversion') - -#-- Using git am to apply patches has benefits, but also downsides -# one being that people without their .gitconfig set get prompts -# and the other being that the sha1s vary each time, so fix them -GIT_COMMITTER_NAME="makepkg" -GIT_COMMITTER_EMAIL="makepkg@msys2.org" -function gitam_mkpkg() { - git am --committer-date-is-author-date "$@" -} - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="i686" -CHOST="i686-w64-mingw32" - -######################################################################### -# Mingw toolchains stuff -######################################################################### -# -MINGW_CHOST="i686-w64-mingw32" -MINGW_PREFIX="/mingw32" -MINGW_PACKAGE_PREFIX="mingw-w64-i686" - -# DirectX compatibility environment variable -DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" -CFLAGS="-march=i686 -mtune=generic -O2 -pipe" -CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe" -LDFLAGS="-pipe -Wl,--dynamicbase,--nxcompat,--no-seh" -# Uncomment to disable hardening (ASLR, DEP) -#LDFLAGS="-pipe" -#-- Make Flags: change this for DistCC/SMP systems -MAKEFLAGS="-j$(($(nproc)+1))" -#-- Debugging flags -DEBUG_CFLAGS="-ggdb -Og" -DEBUG_CXXFLAGS="-ggdb -Og" - -ACLOCAL_PATH="${MINGW_PREFIX}/share/aclocal:/usr/share/aclocal" -PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(!distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- staticlibs: Leave static library (.a) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- debug: Add debugging flags as specified in DEBUG_* variables -# -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=(mingw32{{,/local}{,/share},/opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(mingw32/{,local/}{,share/}{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(mingw32/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/var/packages-mingw32 -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/var/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/var/srcpackages-mingw32 -#-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/var/makepkglogs -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe " -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# COMPRESSION DEFAULTS -######################################################################### -# -COMPRESSGZ=(gzip -c -f -n) -COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -T0 -) -COMPRESSZST=(zstd -c -T0 --ultra -20 -) -COMPRESSLRZ=(lrzip -q) -COMPRESSLZO=(lzop -q) -COMPRESSZ=(compress -c -f) -COMPRESSLZ4=(lz4 -q) -COMPRESSLZ=(lzip -c -f) - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.zst' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/msys2/etc/makepkg_mingw64.conf b/msys2/etc/makepkg_mingw64.conf deleted file mode 100644 index f210f1eb0..000000000 --- a/msys2/etc/makepkg_mingw64.conf +++ /dev/null @@ -1,173 +0,0 @@ -# -# /etc/makepkg_mingw64.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -qb "" -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync --no-motd -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -#-- The package required by makepkg to download VCS sources -# Format: 'protocol::package' -VCSCLIENTS=('bzr::bzr' - 'git::git' - 'hg::mercurial' - 'svn::subversion') - -#-- Using git am to apply patches has benefits, but also downsides -# one being that people without their .gitconfig set get prompts -# and the other being that the sha1s vary each time, so fix them -GIT_COMMITTER_NAME="makepkg" -GIT_COMMITTER_EMAIL="makepkg@msys2.org" -function gitam_mkpkg() { - git am --committer-date-is-author-date "$@" -} - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="x86_64" -CHOST="x86_64-w64-mingw32" - -######################################################################### -# Mingw toolchains stuff -######################################################################### -# -MINGW_CHOST="x86_64-w64-mingw32" -MINGW_PREFIX="/mingw64" -MINGW_PACKAGE_PREFIX="mingw-w64-x86_64" - -# DirectX compatibility environment variable -DXSDK_DIR=${MINGW_PREFIX}/${MINGW_CHOST} - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CPPFLAGS="-D__USE_MINGW_ANSI_STDIO=1" -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe" -LDFLAGS="-pipe -Wl,--dynamicbase,--high-entropy-va,--nxcompat" -# Uncomment to disable hardening (ASLR, High entropy ASLR, DEP) -#LDFLAGS="-pipe" -#-- Make Flags: change this for DistCC/SMP systems -MAKEFLAGS="-j$(($(nproc)+1))" -#-- Debugging flags -DEBUG_CFLAGS="-ggdb -Og" -DEBUG_CXXFLAGS="-ggdb -Og" - -ACLOCAL_PATH="${MINGW_PREFIX}/share/aclocal:/usr/share/aclocal" -PKG_CONFIG_PATH="${MINGW_PREFIX}/lib/pkgconfig:${MINGW_PREFIX}/share/pkgconfig" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(!distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- staticlibs: Leave static library (.a) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- debug: Add debugging flags as specified in DEBUG_* variables -# -OPTIONS=(strip docs !libtool staticlibs emptydirs zipman purge !debug) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=(mingw64{{,/local}{,/share},/opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(mingw64/{,local/}{,share/}{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(mingw64/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/var/packages-mingw64 -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/var/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/var/srcpackages-mingw64 -#-- Log files: specify a fixed directory where all log files will be placed -#LOGDEST=/var/makepkglogs -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe " -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# COMPRESSION DEFAULTS -######################################################################### -# -COMPRESSGZ=(gzip -c -f -n) -COMPRESSBZ2=(bzip2 -c -f) -COMPRESSXZ=(xz -c -z -T0 -) -COMPRESSZST=(zstd -c -T0 --ultra -20 -) -COMPRESSLRZ=(lrzip -q) -COMPRESSLZO=(lzop -q) -COMPRESSZ=(compress -c -f) -COMPRESSLZ4=(lz4 -q) -COMPRESSLZ=(lzip -c -f) - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.zst' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/msys2/etc/msystem b/msys2/etc/msystem index a151ec8e9..cc09f7fd5 100644 --- a/msys2/etc/msystem +++ b/msys2/etc/msystem @@ -20,8 +20,6 @@ unset MINGW_CHOST unset MINGW_PREFIX unset MINGW_PACKAGE_PREFIX -unset CONFIG_SITE - case "${MSYSTEM}" in MINGW32) MSYSTEM_PREFIX='/mingw32' @@ -30,8 +28,7 @@ case "${MSYSTEM}" in MINGW_CHOST="${MSYSTEM_CHOST}" MINGW_PREFIX="${MSYSTEM_PREFIX}" MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" - CONFIG_SITE="${MSYSTEM_PREFIX}/etc/config.site" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX ;; MINGW64) MSYSTEM_PREFIX='/mingw64' @@ -40,14 +37,48 @@ case "${MSYSTEM}" in MINGW_CHOST="${MSYSTEM_CHOST}" MINGW_PREFIX="${MSYSTEM_PREFIX}" MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" - CONFIG_SITE="${MSYSTEM_PREFIX}/etc/config.site" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + CLANG32) + MSYSTEM_PREFIX='/clang32' + MSYSTEM_CARCH='i686' + MSYSTEM_CHOST='i686-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + CLANG64) + MSYSTEM_PREFIX='/clang64' + MSYSTEM_CARCH='x86_64' + MSYSTEM_CHOST='x86_64-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + CLANGARM64) + MSYSTEM_PREFIX='/clangarm64' + MSYSTEM_CARCH='aarch64' + MSYSTEM_CHOST='aarch64-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-clang-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + UCRT64) + MSYSTEM_PREFIX='/ucrt64' + MSYSTEM_CARCH='x86_64' + MSYSTEM_CHOST='x86_64-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-ucrt-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX ;; *) MSYSTEM_PREFIX='/usr' MSYSTEM_CARCH="$(/usr/bin/uname -m)" - MSYSTEM_CHOST="$(/usr/bin/uname -m)-pc-msys" - CONFIG_SITE="/etc/config.site" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST CONFIG_SITE + MSYSTEM_CHOST="${MSYSTEM_CARCH}-pc-msys" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST ;; esac diff --git a/msys2/etc/nanorc b/msys2/etc/nanorc new file mode 100644 index 000000000..92c1e8c3f --- /dev/null +++ b/msys2/etc/nanorc @@ -0,0 +1,331 @@ +## Sample initialization file for GNU nano. +## +## For the options that take parameters, the default value is shown. +## Other options are unset by default. To make sure that an option +## is disabled, you can use "unset