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