]> git.pld-linux.org Git - packages/crossdjgpp-gcc.git/blob - crossdjgpp-gcc.spec
7f19882f9f47210415f05bdde99a239bf631ea76
[packages/crossdjgpp-gcc.git] / crossdjgpp-gcc.spec
1 Summary:        DJGPP GNU Binary Utility Development Utilities - gcc
2 Summary(pl):    Narzêdzia programistyczne GNU DJGPP - gcc
3 Name:           crossdjgpp-gcc
4 Version:        3.0.3
5 Release:        1
6 Epoch:          1
7 License:        GPL
8 Group:          Development/Languages
9 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
10 # Source0-md5:  d94d66619d69d9fd27717409c8a67740
11 BuildRequires:  crossdjgpp-platform
12 BuildRequires:  crossdjgpp-binutils
13 BuildRequires:  flex
14 BuildRequires:  bison
15 BuildRequires:  autoconf
16 BuildRequires:  /bin/bash
17 Requires:       crossdjgpp-binutils
18 Requires:       crossdjgpp-platform
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         cxx             0
22 %define         target          i386-pc-msdosdjgpp
23 %define         _prefix         /usr
24 %define         arch            %{_prefix}/%{target}
25 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
26 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
27
28 %description
29 DJGPP is a port of GNU GCC to the DOS environment. (It stands for DJ's
30 Gnu Programming Platform, if it has to stand for something, but it's
31 best left ambiguous.)
32
33 This package contains cross targeted gcc.
34
35 %description -l pl
36 DJGPP to port GNU GCC dla ¶rodowiska DOS (skrót oznacza DJ's Gnu
37 Programming Platform, je¶li ju¿ koniecznie ma co¶ oznaczaæ).
38
39 Ten pakiet zawiera gcc skompilowane jako kroskompilator.
40
41 %package c++
42 Summary:        DJGPP GNU Binary Utility Development Utilities - g++
43 Summary(pl):    Narzêdzia programistyczne GNU DJGPP - g++
44 Group:          Development/Languages
45 Requires:       %{name} = %{epoch}:%{version}
46
47 %description c++
48 DJGPP is a port of GNU GCC to the DOS environment. (It stands for DJ's
49 Gnu Programming Platform, if it has to stand for something, but it's
50 best left ambiguous.)
51
52 This package contains cross targeted g++ and (static) libstdc++.
53
54 %description c++ -l pl
55 DJGPP to port GNU GCC dla ¶rodowiska DOS (skrót oznacza DJ's Gnu
56 Programming Platform, je¶li ju¿ koniecznie ma co¶ oznaczaæ).
57
58 Ten pakiet zawiera g++ skompilowane jako kroskompilator oraz
59 (statyczne) libstdc++.
60
61 # does this even work?
62 %package g77
63 Summary:        DJGPP GNU Binary Utility Development Utilities - g77
64 Summary(pl):    Narzêdzia programistyczne GNU DJGPP - g77
65 Group:          Development/Languages
66 Requires:       %{name} = %{epoch}:%{version}
67
68 %description g77
69 DJGPP is a port of GNU GCC to the DOS environment. (It stands for DJ's
70 Gnu Programming Platform, if it has to stand for something, but it's
71 best left ambiguous.)
72
73 This package contains cross targeted g77.
74
75 %description g77 -l pl
76 DJGPP to port GNU GCC dla ¶rodowiska DOS (skrót oznacza DJ's Gnu
77 Programming Platform, je¶li ju¿ koniecznie ma co¶ oznaczaæ).
78
79 Ten pakiet zawiera g77 skompilowane jako kroskompilator.
80
81 %prep
82 %setup -q -n gcc-%{version}
83
84 %build
85 rm -rf obj-%{target}
86 install -d obj-%{target}
87 cd obj-%{target}
88
89 CFLAGS="%{rpmcflags}" \
90 CXXFLAGS="%{rpmcflags}" \
91 TEXCONFIG=false ../configure \
92         --prefix=%{_prefix} \
93         --infodir=%{_infodir} \
94         --mandir=%{_mandir} \
95         --disable-shared \
96         --enable-haifa \
97         --enable-languages="c,f77,gcov" \
98         --enable-long-long \
99         --enable-namespaces \
100         --with-gnu-as \
101         --with-gnu-ld \
102         --with-system-zlib \
103         --with-multilib \
104         --without-x \
105         --target=%{target}
106
107 # kluge, we already have full system headers and libraries ready,
108 # needed to get right limits.h
109 cd gcc
110 cp -f Makefile Makefile.new
111 sed -e "s|^SYSTEM_HEADER_DIR.*|SYSTEM_HEADER_DIR := %{_prefix}/%{target}/include|" \
112         Makefile.new > Makefile
113 rm -f Makefile.new
114 cd ..
115
116 # YAK (Yet Another Kluge) :<
117 cd ../libstdc++-v3
118 cp -f configure configure.tmp
119 # don't use newlib, we want djgpp
120 sed -e 's|os_include_dir="config/os/newlib"|#&|' configure.tmp > configure
121 cd ../obj-%{target}
122 # sigh... it still doesn't work, produces sth<char> in assembly
123
124 PATH=$PATH:/sbin:%{_sbindir}
125
126 cd ..
127 #LDFLAGS_FOR_TARGET="%{rpmldflags}"
128
129 %{__make} -C obj-%{target}
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{/lib,%{_datadir},%{_bindir}}
134
135 cd obj-%{target}
136 PATH=$PATH:/sbin:%{_sbindir}
137
138 %{__make} -C gcc install \
139         prefix=$RPM_BUILD_ROOT%{_prefix} \
140         mandir=$RPM_BUILD_ROOT%{_mandir} \
141         infodir=$RPM_BUILD_ROOT%{_infodir} \
142         gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++ \
143         DESTDIR=$RPM_BUILD_ROOT
144
145 # c++filt is provided by binutils
146 #rm -f $RPM_BUILD_ROOT%{_bindir}/i386-djgpp-c++filt
147
148 # what is this there for???
149 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
150
151 # the same... make hardlink
152 #ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
153
154 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %files
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_bindir}/%{target}-gcc
162 %attr(755,root,root) %{_bindir}/%{target}-cpp
163 #%dir %{arch}/bin
164 #%attr(755,root,root) %{arch}/bin/cpp
165 #%attr(755,root,root) %{arch}/bin/gcc
166 #%attr(755,root,root) %{arch}/bin/gcov
167 #%%{arch}/include/_G_config.h
168 %dir %{gccarch}
169 %dir %{gcclib}
170 %attr(755,root,root) %{gcclib}/cc1
171 %attr(755,root,root) %{gcclib}/tradcpp0
172 %attr(755,root,root) %{gcclib}/cpp0
173 %attr(755,root,root) %{gcclib}/collect2
174 #%%{gcclib}/SYSCALLS.c.X
175 %{gcclib}/libgcc.a
176 %{gcclib}/specs*
177 %dir %{gcclib}/include
178 %{gcclib}/include/*.h
179 #%%{gcclib}/include/iso646.h
180 #%%{gcclib}/include/limits.h
181 #%%{gcclib}/include/proto.h
182 #%%{gcclib}/include/stdarg.h
183 #%%{gcclib}/include/stdbool.h
184 #%%{gcclib}/include/stddef.h
185 #%%{gcclib}/include/syslimits.h
186 #%%{gcclib}/include/varargs.h
187 #%%{gcclib}/include/va-*.h
188 %{_mandir}/man1/%{target}-gcc.1*
189
190 %if %{cxx}
191 %files c++
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
194 %{arch}/include/g++
195 %{arch}/lib/libstdc++.a
196 %attr(755,root,root) %{gcclib}/cc1plus
197 %{gcclib}/libstdc++*
198 %{gcclib}/include/new.h
199 %{gcclib}/include/exception
200 %{gcclib}/include/new
201 %{gcclib}/include/typeinfo
202 %{_mandir}/man1/%{target}-g++.1*
203 %endif
204
205 %files g77
206 %defattr(644,root,root,755)
207 %attr(755,root,root) %{_bindir}/%{target}-g77
208 %attr(755,root,root) %{gcclib}/f771
209 %{_mandir}/man1/%{target}-g77.1*
This page took 0.063182 seconds and 3 git commands to generate.