diff options
author | Yaakov Selkowitz <Yaakov@fedora.selkowitz> | 2011-02-17 04:06:58 -0600 |
---|---|---|
committer | Yaakov Selkowitz <Yaakov@fedora.selkowitz> | 2011-02-17 04:06:58 -0600 |
commit | 1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639 (patch) | |
tree | 914b31c479b2ea385c71795b633e734296a75fe0 | |
download | cygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.tar.gz cygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.tar.xz cygwin-1dfb4e5d756cfdd6f2d07c776fc95831b5c7d639.zip |
Initial commit
-rw-r--r-- | cygwin-1.7.7-cfgetiospeed.patch | 52 | ||||
-rw-r--r-- | cygwin-1.7.7-cross-configure.patch | 97 | ||||
-rw-r--r-- | cygwin-1.7.7-err-noreturn.patch | 21 | ||||
-rw-r--r-- | cygwin-1.7.7-path-vartmp.patch | 10 | ||||
-rw-r--r-- | cygwin-1.7.7-pthread_yield.patch | 10 | ||||
-rw-r--r-- | cygwin.spec | 119 | ||||
-rw-r--r-- | sources | 1 |
7 files changed, 310 insertions, 0 deletions
diff --git a/cygwin-1.7.7-cfgetiospeed.patch b/cygwin-1.7.7-cfgetiospeed.patch new file mode 100644 index 0000000..6c05ccf --- /dev/null +++ b/cygwin-1.7.7-cfgetiospeed.patch @@ -0,0 +1,52 @@ +--- a/winsup/cygwin/include/sys/termios.h 2009-06-08 10:30:54.000000000 -0500 ++++ b/winsup/cygwin/include/sys/termios.h 2011-02-15 09:56:03.000000000 -0600 +@@ -317,9 +317,6 @@ + + #define termio termios + +-#define cfgetospeed(tp) ((tp)->c_ospeed) +-#define cfgetispeed(tp) ((tp)->c_ispeed) +- + #ifdef __cplusplus + extern "C" { + #endif +@@ -331,6 +328,8 @@ + int tcflush (int, int); + int tcflow (int, int); + void cfmakeraw (struct termios *); ++speed_t cfgetispeed(const struct termios *); ++speed_t cfgetospeed(const struct termios *); + int cfsetispeed (struct termios *, speed_t); + int cfsetospeed (struct termios *, speed_t); + +@@ -338,6 +337,11 @@ + } + #endif + ++#ifndef __cplusplus ++#define cfgetispeed(tp) ((tp)->c_ispeed) ++#define cfgetospeed(tp) ((tp)->c_ospeed) ++#endif ++ + /* Extra stuff to make porting stuff easier. */ + struct winsize + { +--- a/winsup/cygwin/termios.cc 2009-08-10 08:57:13.000000000 -0500 ++++ b/winsup/cygwin/termios.cc 2011-02-15 09:56:02.000000000 -0600 +@@ -232,14 +233,14 @@ + + /* cfgetospeed: POSIX96 7.1.3.1 */ + extern "C" speed_t +-cfgetospeed (struct termios *tp) ++cfgetospeed (const struct termios *tp) + { + return __tonew_termios (tp)->c_ospeed; + } + + /* cfgetispeed: POSIX96 7.1.3.1 */ + extern "C" speed_t +-cfgetispeed (struct termios *tp) ++cfgetispeed (const struct termios *tp) + { + return __tonew_termios (tp)->c_ispeed; + } diff --git a/cygwin-1.7.7-cross-configure.patch b/cygwin-1.7.7-cross-configure.patch new file mode 100644 index 0000000..28fcabf --- /dev/null +++ b/cygwin-1.7.7-cross-configure.patch @@ -0,0 +1,97 @@ +--- a/winsup/configure.in 2009-01-27 09:25:00.000000000 -0600 ++++ b/winsup/configure.in 2011-02-17 01:08:15.910147700 -0600 +@@ -45,7 +45,7 @@ + if test -d $srcdir/mingw; then + AC_CONFIG_SUBDIRS(mingw) + fi +-AC_CONFIG_SUBDIRS(w32api) ++AC_CONFIG_SUBDIRS(w32api cygserver) + + case "$with_cross_host" in + ""|*cygwin*) +@@ -58,7 +58,7 @@ + if test -d $srcdir/lsaauth; then + AC_CONFIG_SUBDIRS(lsaauth) + fi +- AC_CONFIG_SUBDIRS(cygserver utils doc) ++ AC_CONFIG_SUBDIRS(utils doc) + ;; + esac + +--- a/winsup/cygwin/configure.in 2009-01-27 09:25:00.000000000 -0600 ++++ b/winsup/cygwin/configure.in 2011-02-15 09:56:00.000000000 -0600 +@@ -25,15 +25,15 @@ + ""|*cygwin*) + all_host="all_host" + install_host="install_host" +- LIBSERVER='$(bupdir)/cygserver/libcygserver.a' + ;; + *) + all_host= + install_host= +- LIBSERVER= + ;; + esac + ++LIBSERVER='$(bupdir)/cygserver/libcygserver.a' ++ + AC_SUBST(all_host) + AC_SUBST(install_host) + +@@ -48,26 +48,8 @@ + AC_CHECK_TOOL(STRIP, strip, strip) + AC_CHECK_TOOL(WINDRES, windres, windres) + +-AC_ALLOCA + AC_PROG_MAKE_SET + +-dnl check whether gcc supports __builtin_memset. +-# Test for builtin mem* functions. +-AC_LANG_SAVE +-AC_LANG_CPLUSPLUS +-AC_TRY_COMPILE([ +-#include <string.h> +-void foo(char *s, int c, size_t n) +-{ +- __builtin_memset(s, c, n); +-} +-], [ ], +-use_builtin_memset=yes, use_builtin_memset=no) +-if test $use_builtin_memset = "yes"; then +- AC_DEFINE(HAVE_BUILTIN_MEMSET) +-fi +-AC_LANG_RESTORE +- + AC_ARG_ENABLE(debugging, + [ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging], + [case "${enableval}" in +diff -urN -x 'ChangeLog*' -x CVS a/winsup/cygserver/configure.in b/winsup/cygserver/configure.in +--- a/winsup/cygserver/configure.in 2006-05-24 11:59:02.000000000 -0500 ++++ b/winsup/cygserver/configure.in 2011-02-07 10:22:02.000000000 -0600 +@@ -44,26 +44,8 @@ + AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool) + AC_CHECK_TOOL(WINDRES, windres, windres) + +-AC_ALLOCA + AC_PROG_MAKE_SET + +-dnl check whether gcc supports __builtin_memset. +-# Test for builtin mem* functions. +-AC_LANG_SAVE +-AC_LANG_CPLUSPLUS +-AC_TRY_COMPILE([ +-#include <string.h> +-void foo(char *s, int c, size_t n) +-{ +- __builtin_memset(s, c, n); +-} +-], [ ], +-use_builtin_memset=yes, use_builtin_memset=no) +-if test $use_builtin_memset = "yes"; then +- AC_DEFINE(HAVE_BUILTIN_MEMSET) +-fi +-AC_LANG_RESTORE +- + AC_ARG_ENABLE(debugging, + [ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging], + [case "${enableval}" in diff --git a/cygwin-1.7.7-err-noreturn.patch b/cygwin-1.7.7-err-noreturn.patch new file mode 100644 index 0000000..f9b5948 --- /dev/null +++ b/cygwin-1.7.7-err-noreturn.patch @@ -0,0 +1,21 @@ +--- a/winsup/cygwin/include/err.h 2003-11-06 15:31:24.000000000 -0600 ++++ b/winsup/cygwin/include/err.h 2011-02-02 09:14:46.000000000 -0600 +@@ -19,14 +19,14 @@ + extern void warn (const char *fmt, ...); + extern void warnx (const char *fmt, ...); + +-extern void err (int eval, const char *fmt, ...); +-extern void errx (int eval, const char *fmt, ...); ++extern void err (int eval, const char *fmt, ...) __attribute__ ((__noreturn__)); ++extern void errx (int eval, const char *fmt, ...) __attribute__ ((__noreturn__)); + + extern void vwarn (const char *fmt, va_list ap); + extern void vwarnx (const char *fmt, va_list ap); + +-extern void verr (int eval, const char *fmt, va_list ap); +-extern void verrx (int eval, const char *fmt, va_list ap); ++extern void verr (int eval, const char *fmt, va_list ap) __attribute__ ((__noreturn__)); ++extern void verrx (int eval, const char *fmt, va_list ap) __attribute__ ((__noreturn__)); + + __END_DECLS + diff --git a/cygwin-1.7.7-path-vartmp.patch b/cygwin-1.7.7-path-vartmp.patch new file mode 100644 index 0000000..e626d6b --- /dev/null +++ b/cygwin-1.7.7-path-vartmp.patch @@ -0,0 +1,10 @@ +--- a/winsup/cygwin/include/paths.h 2010-03-18 09:57:10.000000000 -0500 ++++ b/winsup/cygwin/include/paths.h 2010-11-02 12:38:36.000000000 -0500 +@@ -26,6 +26,7 @@ + #define _PATH_TTY "/dev/tty" + #define _PATH_UTMP "/var/run/utmp" + #define _PATH_VARRUN "/var/run/" ++#define _PATH_VARTMP "/var/tmp/" + #define _PATH_VI "/bin/vi" + #define _PATH_WTMP "/var/log/wtmp" + diff --git a/cygwin-1.7.7-pthread_yield.patch b/cygwin-1.7.7-pthread_yield.patch new file mode 100644 index 0000000..d1ae022 --- /dev/null +++ b/cygwin-1.7.7-pthread_yield.patch @@ -0,0 +1,10 @@ +--- a/winsup/cygwin/include/pthread.h 2007-02-07 11:22:40.000000000 -0600 ++++ b/winsup/cygwin/include/pthread.h 2011-02-15 09:56:02.000000000 -0600 +@@ -194,6 +194,7 @@ + + int pthread_suspend (pthread_t); + int pthread_continue (pthread_t); ++#define pthread_yield sched_yield + + #ifdef __cplusplus + } diff --git a/cygwin.spec b/cygwin.spec new file mode 100644 index 0000000..4f16d9c --- /dev/null +++ b/cygwin.spec @@ -0,0 +1,119 @@ +%define __strip %{_cygwin_strip} +%define __objdump %{_cygwin_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_cygwin_findrequires} +%define __find_provides %{_cygwin_findprovides} +%define __os_install_post %{_cygwin_os_install_post} + +Name: cygwin +Version: 1.7.7 +Release: 1%{?dist} +Summary: Cygwin cross-compiler runtime + +License: GPLv2 with exceptions +Group: Development/Libraries +URL: http://www.cygwin.com/ +Source0: ftp:/sourceware.org/pub/cygwin/release/cygwin/cygwin-%{version}-1-src.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +# Remove all of these for 1.7.8 +Patch0: cygwin-1.7.7-cross-configure.patch +Patch1: cygwin-1.7.7-cfgetiospeed.patch +Patch2: cygwin-1.7.7-err-noreturn.patch +Patch3: cygwin-1.7.7-path-vartmp.patch +Patch4: cygwin-1.7.7-pthread_yield.patch + + +BuildRequires: cygwin-filesystem +BuildRequires: cygwin-binutils +BuildRequires: cygwin-gcc +BuildRequires: cygwin-gcc-c++ +BuildRequires: cygwin-w32api +BuildRequires: mingw32-runtime +BuildRequires: mingw32-w32api + +Requires: cygwin-w32api + +%description +Cygwin cross-compiler runtime, base libraries. + + +%prep +%setup -q -n cygwin-%{version}-1 +%patch0 -p1 -b .crossconfig~ +%patch1 -p1 -b .termios~ +%patch2 -p1 -b .err~ +%patch3 -p1 -b .paths~ +%patch4 -p1 -b .pthread~ + +pushd winsup +autoconf -f +popd +pushd winsup/cygwin +autoconf -f +popd +pushd winsup/cygserver +autoconf -f +popd + +# code still has some warnings with gcc4.5 +sed -i -e 's| -Werror | |' winsup/cygwin/Makefile.in + + +%build +mkdir -p build +pushd build + +../configure \ + --prefix=%{_prefix} \ + --build=%_build --host=%_host \ + --target=%{_cygwin_target} + +make %{?_smp_mflags} all + +popd + + +%install +rm -rf $RPM_BUILD_ROOT + +pushd build +make DESTDIR=$RPM_BUILD_ROOT install + +# +rm -fr $RPM_BUILD_ROOT%{_prefix}/etc +rm -fr $RPM_BUILD_ROOT%{_bindir}/cygserver-config +rm -fr $RPM_BUILD_ROOT%{_sbindir} +rm -fr $RPM_BUILD_ROOT%{_infodir} +rm -fr $RPM_BUILD_ROOT%{_mandir} +rm -fr $RPM_BUILD_ROOT%{_datadir}/doc/ +rm -fr $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/share/doc/ +# make install places these in nonstandard locations, so move them. +mkdir -p $RPM_BUILD_ROOT%{_cygwin_bindir} +mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_cygwin_bindir} +mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/include $RPM_BUILD_ROOT%{_cygwin_prefix}/ +mv $RPM_BUILD_ROOT%{_prefix}/%{_cygwin_target}/lib $RPM_BUILD_ROOT%{_cygwin_prefix}/ + +# these are provided by other packages +rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/iconv.h +rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/mingw +rm -fr $RPM_BUILD_ROOT%{_cygwin_includedir}/w32api +rm -fr $RPM_BUILD_ROOT%{_cygwin_libdir}/mingw +rm -fr $RPM_BUILD_ROOT%{_cygwin_libdir}/w32api + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%doc winsup/COPYING winsup/CYGWIN_LICENSE +%{_cygwin_bindir}/cygwin1.dll +%{_cygwin_includedir}/* +%{_cygwin_libdir}/* + + +%changelog +* Wed Feb 16 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.7-1 +- Initial RPM release, largely based on earlier work from several sources. @@ -0,0 +1 @@ +e1dda281298690be9ab2ba43642a557b cygwin-1.7.7-1-src.tar.bz2 |