Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More windows polish #6

Merged
merged 6 commits into from Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 15 additions & 3 deletions .travis.yml
Expand Up @@ -14,17 +14,29 @@ env:

before_install:
# Remove homebrew.
- brew remove --force --ignore-dependencies $(brew list)
- brew cleanup -s
- rm -rf $(brew --cache)
- |
echo ""
echo "Removing homebrew from Travis CI to avoid conflicts."
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew
chmod +x ~/uninstall_homebrew
~/uninstall_homebrew -fq
rm ~/uninstall_homebrew


install:
# Install Miniconda.
- |
echo ""
echo "Installing a fresh version of Miniconda."
MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b

# Configure conda.
- |
echo ""
echo "Configuring conda."
source /Users/travis/miniconda3/bin/activate root
conda config --remove channels defaults
conda config --add channels defaults
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,5 +1,5 @@
BSD 3-clause license
Copyright (c) conda-forge
Copyright (c) 2015-2017, conda-forge
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
18 changes: 16 additions & 2 deletions recipe/bld.bat
@@ -1,3 +1,17 @@
:: Just delegate to the Unixy script.
bash %RECIPE_DIR%\build.sh
:: Trailing semicolon in this variable as set by current (2017/01)
:: conda-build breaks us. Manual fix:
set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
:: Delegate to the Unixy script. We need to translate the key path variables
:: to be Unix-y rather than Windows-y, though.
set "saved_recipe_dir=%RECIPE_DIR%"
FOR /F "delims=" %%i IN ('cygpath.exe -u -p "%PATH%"') DO set "PATH_OVERRIDE=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -m "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_M=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%LIBRARY_PREFIX%"') DO set "LIBRARY_PREFIX_U=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PREFIX%"') DO set "PREFIX=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%PYTHON%"') DO set "PYTHON=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%RECIPE_DIR%"') DO set "RECIPE_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SP_DIR%"') DO set "SP_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%SRC_DIR%"') DO set "SRC_DIR=%%i"
FOR /F "delims=" %%i IN ('cygpath.exe -u "%STDLIB_DIR%"') DO set "STDLIB_DIR=%%i"
bash -x %saved_recipe_dir%\build.sh
if errorlevel 1 exit 1
41 changes: 34 additions & 7 deletions recipe/build.sh
Expand Up @@ -3,14 +3,40 @@
set -e
IFS=$' \t\n' # workaround for conda 4.2.13+toolchain bug

# Fresh OS-guessing scripts from xorg-util-macros for win64
for f in config.guess config.sub ; do
cp -p $PREFIX/share/util-macros/$f .
done
# Adopt a Unix-friendly path if we're on Windows (see bld.bat).
[ -n "$PATH_OVERRIDE" ] && export PATH="$PATH_OVERRIDE"

export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig
# On Windows we want $LIBRARY_PREFIX in both "mixed" (C:/Conda/...) and Unix
# (/c/Conda) forms, but Unix form is often "/" which can cause problems.
if [ -n "$LIBRARY_PREFIX_M" ] ; then
mprefix="$LIBRARY_PREFIX_M"
if [ "$LIBRARY_PREFIX_U" = / ] ; then
uprefix=""
else
uprefix="$LIBRARY_PREFIX_U"
fi
else
mprefix="$PREFIX"
uprefix="$PREFIX"
fi

# On Windows we need to regenerate the configure scripts.
if [ -n "$VS_MAJOR" ] ; then
am_version=1.15 # keep sync'ed with meta.yaml
export ACLOCAL=aclocal-$am_version
export AUTOMAKE=automake-$am_version
autoreconf_args=(
--force
--install
-I "$mprefix/share/aclocal"
-I "$mprefix/mingw-w64/share/aclocal" # note: this is correct for win32 also!
)
autoreconf "${autoreconf_args[@]}"
fi

export PKG_CONFIG_LIBDIR=$uprefix/lib/pkgconfig:$uprefix/share/pkgconfig
configure_args=(
--prefix=$PREFIX
--prefix=$mprefix
--disable-dependency-tracking
--disable-selective-werror
--disable-silent-rules
Expand All @@ -19,4 +45,5 @@ configure_args=(
make -j$CPU_COUNT
make install
make check
rm -rf $PREFIX/share/doc/${PKG_NAME#xorg-}

rm -rf $uprefix/share/doc/${PKG_NAME#xorg-}
13 changes: 9 additions & 4 deletions recipe/meta.yaml
Expand Up @@ -3,6 +3,7 @@
{% set name = "xorg-" ~ xorg_name %}
{% set version = "7.0.31" %}
{% set sha256 = "c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747" %}
{% set am_version = "1.15" %} # keep synchronized with build.sh

package:
name: {{ name|lower }}
Expand All @@ -17,28 +18,32 @@ source:
- windows-Xwinsock.patch # [win]

build:
number: 4
number: 5
detect_binary_files_with_prefix: true

requirements:
build:
- m2-autoconf # [win]
- m2-automake{{ am_version }} # [win]
- m2-libtool # [win]
- m2w64-pkg-config # [win]
- m2w64-toolchain # [win]
- pkg-config # [not win]
- posix # [win]
- toolchain
- xorg-util-macros

test:
commands:
- conda inspect linkages -p $PREFIX {{ name }} # [not win]
- conda inspect objects -p $PREFIX {{ name }} # [osx]
- conda inspect linkages -p $PREFIX $PKG_NAME # [not win]
- conda inspect objects -p $PREFIX $PKG_NAME # [osx]

about:
home: https://www.x.org/
license: MIT
license_family: MIT
license_file: COPYING
summary: 'Definitions for the core X Windows protocol.'
summary: 'Core X Windows C prototypes.'

extra:
recipe-maintainers:
Expand Down
11 changes: 6 additions & 5 deletions recipe/windows-fd_bits.patch
@@ -1,10 +1,11 @@
--- configure.orig 2017-01-13 19:04:32.919054606 -0500
+++ configure 2017-01-13 19:05:19.280851728 -0500
@@ -11415,6 +11415,7 @@
--- configure.ac.orig 2017-02-03 10:04:23.243912983 -0500
+++ configure.ac 2017-02-03 10:04:32.643958586 -0500
@@ -49,7 +49,7 @@
# Handle Xpoll.h.in
# Avoid determining fds_bits on WIN32 hosts (not including cygwin)
case $host_os in
mingw*) fds_bits_found=true;;
+ *msys*) fds_bits_found=true;;
- mingw*) fds_bits_found=true;;
+ mingw*|*msys*) fds_bits_found=true;;
*) fds_bits_found=false;;
esac