summaryrefslogtreecommitdiffstats
path: root/cygwin.spec
blob: 113936cfaaa5458259af9fe8102451ed78cbff6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
%define __strip %{_cygwin_strip}
%define __objdump %{_cygwin_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_cygwin_findrequires}
%define __find_provides %{_cygwin_findprovides}

Name:           cygwin
Version:        1.7.9
Release:        3
Summary:        Cygwin cross-compiler runtime

License:        GPLv2 with exceptions
Group:          Development/Libraries
URL:            http://www.cygwin.com/
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

Source0:        ftp://sourceware.org/pub/cygwin/release/cygwin/cygwin-%{version}-1-src.tar.bz2
Patch0:         cygwin-1.7.9-fenv.h.patch
Patch1:         cygwin-1.7.9-sysmacros.h.patch
Patch2:         cygwin-1.7.9-paths.h.patch
Patch3:         cygwin-1.7.9-process.h.patch
Patch4:         cygwin-1.7.9-strdupa.patch
Patch5:         cygwin-1.7.9-unistd.h.patch

BuildRequires:  cygwin-filesystem >= 2
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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# code still has some warnings with gcc4.5 (remove for 1.7.10)
sed -i -e 's| -Werror | |' winsup/cygwin/Makefile.in


%build
mkdir -p build
pushd build

../configure \
  --prefix=%{_cygwin_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 tooldir=%{_cygwin_prefix}

# remove files not needed for cross-compiling
rm -fr $RPM_BUILD_ROOT%{_cygwin_prefix}/etc
rm -fr $RPM_BUILD_ROOT%{_cygwin_bindir}/cygserver-config
rm -fr $RPM_BUILD_ROOT%{_cygwin_sbindir}
rm -fr $RPM_BUILD_ROOT%{_cygwin_docdir}
rm -fr $RPM_BUILD_ROOT%{_cygwin_infodir}
rm -fr $RPM_BUILD_ROOT%{_cygwin_mandir}

# 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
* Sun Aug 21 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.9-3
- Added _PATH_MAILDIR and _PATH_SHELLS to <paths.h>.
- Added strdupa and strndupa to <string.h>.
- Header fixes for <process.h> and <unistd.h>.

* Thu Apr 28 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.9-2
- Header fixes for <fenv.h> and <sys/sysmacros.h>.

* Tue Mar 29 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.9-1
- Version bump.
- New API: strchrnul.
- New header: <sys/xattr.h>

* Tue Mar 01 2011 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 1.7.8-1
- Version bump.
- New APIs: <fenv.h>, C99 complex math functions, POSIX-compliant strerror_r,
  madvise, pthread_yield, program_invocation_name, program_invocation_short_name.

* 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.