ENH: add support files for cpack cygwin setup package stuff

This commit is contained in:
Bill Hoffman 2007-01-31 16:48:22 -05:00
parent 94550852eb
commit 22767f7e3f
5 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,25 @@
FILE(GLOB INSTALLED_CURSES /usr/bin/cygncurses*.dll)
SET(MAX 0)
FOREACH(f ${INSTALLED_CURSES})
IF(NOT "${f}" MATCHES "\\+")
STRING(REGEX REPLACE ".*([0-9]).dll" "\\1" NUMBER "${f}")
IF(NUMBER GREATER MAX)
SET(MAX ${NUMBER})
ENDIF(NUMBER GREATER MAX)
ENDIF(NOT "${f}" MATCHES "\\+")
ENDFOREACH(f)
STRING(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
SET(CMAKE_NCURSES_VERSION "libncurses${MAX}")
MESSAGE(STATUS "Using curses version: libncurses${MAX}")
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
"${CMake_BINARY_DIR}/setup.hint")
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
"${CMake_BINARY_DIR}/Docs/@CYGWIN_PACKAGE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README")
INSTALL_FILES(/share/doc/Cygwin FILES
${CMake_BINARY_DIR}/Docs/@CYGWIN_PACKAGE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.README
)
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
${CPACK_CYGWIN_BUILD_SCRIPT})
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
${CPACK_CYGWIN_PATCH_FILE})

View File

@ -0,0 +1,42 @@
cmake
--------------------------------------
Runtime requirements:
cygwin-1.5.21(0.156/4/2) or newer
Build requirements
cygwin-1.5.21(0.156/4/2) or newer
make
Canonical homepage:
http://www.cmake.org
Canonical download:
ftp://www.cmake.org/pub/cmake/
------------------------------------
Build instructions:
unpack @CYGWIN_SRC_PACKAGE_NAME@.tar.bz2
if you use setup to install this src package, it will be
unpacked under /usr/src automatically
cd /usr/src
./@CYGWIN_PACKAGE_NAME@.sh
This will create:
/usr/src/@CYGWIN_PACKAGE_NAME@.tar.bz2
/usr/src/@CYGWIN_SRC_PACKAGE_NAME@.tar.bz2
-------------------------------------------
Port Notes:
The directory /usr/share/@CPACK_CYGWIN_NAME@/include is purposely not
located at /usr/include/@CPACK_CYGWIN_NAME@ or /usr/include/cmake. The
files it contains are not meant for inclusion in any C or C++ program.
They are used for compiling dynamically loadable CMake commands inside
projects that provide them. CMake will automatically provide the
proper include path when the files are needed.
------------------
Cygwin port maintained by: CMake Developers <cmake@www.cmake.org>

View File

@ -0,0 +1,13 @@
tdir=`pwd`
tar xvfj @CYGWIN_SRC_PACKAGE_NAME@.tar.bz2 &&
cd @CYGWIN_SRC_PACKAGE_NAME@ &&
mkdir .build &&
cd .build &&
../bootstrap --parallel=2 &&
make -j2 &&
make test &&
./bin/cpack &&
./bin/cpack --config CPackSourceConfig.cmake
mv @CYGWIN_SRC_PACKAGE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$tdir"
mv @CYGWIN_PACKAGE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$tdir"

View File

@ -0,0 +1,5 @@
# CMake setup.hint file for cygwin setup.exe program
category: Devel
requires: @CMAKE_NCURSES_VERSION@ cygwin
sdesc: "A cross platform build manager"
ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files."