diff --git a/.travis.yml b/.travis.yml index cd2e995..d908448 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/LICENSE b/LICENSE index 04ad21b..7f5c363 100644 --- a/LICENSE +++ b/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: diff --git a/recipe/bld.bat b/recipe/bld.bat index eb62a03..6bbe58e 100644 --- a/recipe/bld.bat +++ b/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 diff --git a/recipe/build.sh b/recipe/build.sh index e9516b5..1576a0c 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -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 @@ -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-} diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2751565..00ddc58 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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 }} @@ -17,12 +18,16 @@ 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 @@ -30,15 +35,15 @@ requirements: 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: diff --git a/recipe/windows-fd_bits.patch b/recipe/windows-fd_bits.patch index ef92b9d..80101ec 100644 --- a/recipe/windows-fd_bits.patch +++ b/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