-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from haubi/master
another step towards 2.0.0 release
- Loading branch information
Showing
64 changed files
with
2,719 additions
and
5,585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
parity | ||
====== | ||
|
||
Parity is a utility to compile native Windows executables and shared libraries using the Visual Studio compiler, from within a POSIX build environment like Microsoft SUA or Cygwin, providing a GCC like frontend. It provides various features, not available on Windows normally (runpaths, preloading, etc). | ||
Parity is a utility to compile native Windows executables and shared libraries using the Visual Studio compiler, from within a POSIX build environment like Cygwin, providing a GCC like frontend, plus some runtime functions known from the POSIX world. Beyond that, the native Win32 programs built with parity are potentially able to deal with POSIX style path names. | ||
|
||
Older versions of this project can be found here: https://sourceforge.net/projects/parity/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
NAME="parity" | ||
VERSION="2.0.0" | ||
RELEASE="0.1" | ||
CATEGORY="Devel" | ||
|
||
MSVC_VERSIONS=( | ||
# quoted from parity-setup, ignoring the old ones not running on Windows 10 | ||
# "<vcver> '<vsname>' <alternative-chost-version>" | ||
# "7 'Visual Studio 2003' 7.1" | ||
"8 'Visual Studio 2005' 8.0" | ||
"9 'Visual Studio 2008' 9.0" | ||
"10 'Visual Studio 2010' 10.0" | ||
"11 'Visual Studio 2012' 11.0" | ||
"12 'Visual Studio 2013' 12.0" | ||
"14 'Visual Studio 2015' 14.0" | ||
"15 'Visual Studio 2017'" | ||
"16 'Visual Studio 2019'" | ||
) | ||
|
||
HOMEPAGE="https://github.com/mduft/parity" | ||
SUMMARY="GCC like commandline wrapper for Visual Studio toolchain" | ||
SRC_URI="${HOMEPAGE}/releases/download/${VERSION}/${NAME}-${VERSION}.tar.bz2" | ||
SRC_DIR="${NAME}-${VERSION}" | ||
DEPEND="autoconf-archive" | ||
core_DESCRIPTION="\ | ||
Wraps the MSVC toolchain (cl.exe, link.exe, etc.) | ||
providing a GCC like toolchain (gcc, g++, etc.)." | ||
|
||
chosts-for-ver() { | ||
local chostver=$1 | ||
local chost | ||
for chost in \ | ||
i686-msvc${chostver}-winnt \ | ||
i686-msvcd${chostver}-winnt \ | ||
i686-libcmt${chostver}-winnt \ | ||
i686-libcmtd${chostver}-winnt \ | ||
x86_64-msvc${chostver}-winnt \ | ||
x86_64-msvcd${chostver}-winnt \ | ||
x86_64-libcmt${chostver}-winnt \ | ||
x86_64-libcmtd${chostver}-winnt \ | ||
; do | ||
echo "${chost}" | ||
done | ||
} | ||
|
||
one_pkgspecs() { | ||
local vcver=$1 | ||
local vsname=$2 | ||
local chostver=$3 | ||
local pkgvarname="${NAME}_msvc${vcver}" | ||
eval "${pkgvarname}_CATEGORY='${CATEGORY}'" | ||
eval "${pkgvarname}_SUMMARY='${SUMMARY/Visual Studio/${vsname}}'" | ||
eval "${pkgvarname}_DESCRIPTION='${core_DESCRIPTION/MSVC/MSVC ${chostver}}'" | ||
eval "${pkgvarname}_CONTENTS='$( | ||
echo "etc/postinstall/parity-msvc${vcver}.sh" | ||
echo "etc/preremove/parity-msvc${vcver}.sh" | ||
for chost in $(chosts-for-ver "${chostver}") | ||
do | ||
echo "usr/${chost}/" | ||
echo "usr/bin/${chost}-*" | ||
echo "etc/parity/${chost}/" | ||
echo "var/parity/${chost}/" | ||
done | ||
)'" | ||
} | ||
|
||
all_pkgspecs() { | ||
PKG_NAMES="${NAME}-core" | ||
eval "${NAME}_core_CATEGORY='${CATEGORY}'" | ||
eval "${NAME}_core_SUMMARY='${SUMMARY}'" | ||
eval "${NAME}_core_DESCRIPTION='${core_DESCRIPTION} | ||
Install ${NAME}-msvcXX matching your MSVC versions you want to utilize.'" | ||
eval "${NAME}_core_CONTENTS=' | ||
etc/postinstall/${NAME}-core.sh | ||
etc/preremove/${NAME}-core.sh | ||
usr/bin/parity* | ||
usr/lib/parity/ | ||
usr/libexec/ | ||
'" | ||
PKG_IGNORE=' | ||
usr/share/ | ||
usr/lib/libparity_* | ||
' | ||
CYGCONF_ARGS= | ||
local msvc_version verspecs vcver vsname chostver | ||
for msvc_version in "${MSVC_VERSIONS[@]}" | ||
do | ||
# unbundle "<vcver> '<vsname>' <alternative-chost-version>" | ||
eval "verspecs=( ${msvc_version} )" | ||
vcver=${verspecs[0]} | ||
vsname=${verspecs[1]} | ||
chostver=${verspecs[2]:-${vcver}} | ||
|
||
PKG_NAMES+=" ${NAME}-msvc${vcver}" | ||
CYGCONF_ARGS+=",${chostver}" | ||
one_pkgspecs "${vcver}" "${vsname}" "${chostver}" | ||
done | ||
CYGCONF_ARGS="--enable-binpkg-per-chost --enable-msvc-versions=${CYGCONF_ARGS#,}" | ||
} | ||
|
||
all_pkgspecs | ||
|
||
src_install() { | ||
cd ${B}; | ||
cyginstall | ||
dodir /etc/postinstall | ||
dodir /etc/preremove | ||
echo "/usr/bin/${NAME}-setup --enable-all" > "${D}"/etc/postinstall/${NAME}-core.sh | ||
echo "/usr/bin/${NAME}-setup --disable-all" > "${D}"/etc/preremove/${NAME}-core.sh | ||
local msvc_version verspecs vcver vsname chostver | ||
for msvc_version in "${MSVC_VERSIONS[@]}" | ||
do | ||
# unbundle "<vcver> '<vsname>' <alternative-chost-version>" | ||
eval "verspecs=( ${msvc_version} )" | ||
vcver=${verspecs[0]} | ||
vsname=${verspecs[1]} | ||
chostver=${verspecs[2]:-${vcver}} | ||
cat > "${D}"/etc/postinstall/${NAME}-msvc${vcver}.sh <<-EOF | ||
for chost in $(echo $(chosts-for-ver "${chostver}")) | ||
do | ||
/usr/bin/${NAME}-setup --enable \${chost} & | ||
done | ||
wait | ||
EOF | ||
echo /usr/bin/${NAME}-setup --disable $(chosts-for-ver "${chostver}") > "${D}"/etc/preremove/${NAME}-msvc${vcver}.sh | ||
done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.