Sat, 24 Mar 2012 21:40:49 +0100
Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.
1 ##
2 ## perl.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # package information
25 Name: perl
26 Summary: Practical Extraction and Reporting Language
27 URL: http://www.perl.com/
28 Vendor: The Perl Project
29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community
31 Class: CORE
32 Group: Perl
33 License: GPL/Artistic
34 Version: 5.14.1
35 Release: 20110914
37 # list of sources
38 Source0: http://www.cpan.org/src/perl-%{version}.tar.gz
39 Patch0: perl.patch
41 # build information
42 Prefix: %{l_prefix}
43 BuildRoot: %{l_buildroot}
44 BuildPreReq: OpenPKG, openpkg >= 20060823, gcc
45 PreReq: OpenPKG, openpkg >= 20060823
46 AutoReq: no
47 AutoReqProv: no
49 %description
50 Perl ("Practical Reporting and Extraction Language") is a very
51 sophisticated and flexible (but this way also complex) programming
52 language. This is the original implementation of the Perl 5
53 interpreter from Larry Wall and his community.
55 %track
56 prog perl = {
57 version = %{version}
58 url = http://www.cpan.org/src/
59 regex = perl-(5\.(?:[02468]|1[02468])\.\d+)\.tar\.gz
60 }
62 %prep
63 %setup -q
64 %patch -p0
65 chmod -R u+w .
67 %build
68 # configure the Perl package
69 %{l_shtool} subst \
70 -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \
71 -e 's;package=perl5;package=perl;' \
72 Configure
73 %{l_shtool} subst \
74 -e 's; */usr/local/lib;;' \
75 hints/freebsd.sh hints/netbsd.sh
76 optimize=""
77 case "%{l_platform -t}" in
78 amd64-* ) optimize="%{l_cflags}" ;;
79 *-aix* ) optimize="%{l_cflags}" ;;
80 *-* ) optimize="%{l_cflags -O}" ;;
81 esac
82 if [ ".$optimize" = . ]; then
83 optimize="-Uoptimize"
84 else
85 optimize="-Doptimize=$optimize"
86 fi
87 libdirs=""
88 for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do
89 if [ -d $dir ]; then
90 if [ ".$libdirs" = . ]; then
91 libdirs="$dir"
92 else
93 libdirs="$libdirs $dir"
94 fi
95 fi
96 done
97 ./Configure \
98 -d -e -s \
99 -Dcf_by="%{l_openpkg_release}" \
100 -Dcf_email="http://www.openpkg.org/" \
101 -Dprefix=%{l_prefix} \
102 -Dvendorprefix=%{l_prefix} \
103 -Dinstallprefix=%{l_prefix} \
104 -Dinstallstyle="lib/perl5" \
105 -Dman1dir=%{l_prefix}/man/man1 \
106 -Dman3dir=%{l_prefix}/man/man3 \
107 -Dcc="%{l_prefix}/bin/gcc" "$optimize" \
108 -Dlocincpth="%{l_prefix}/include" \
109 -Dloclibpth="%{l_prefix}/lib" \
110 -Dldflags="%{l_ldflags}" \
111 -Dlibpth="$libdirs" \
112 -Dglibpth="$libdirs" \
113 -Dscriptdir="%{l_prefix}/bin" \
114 -Uinstallusrbinperl \
115 -Ui_malloc -Ui_iconv -Ui_db \
116 -Uusedevel
118 # build the Perl package
119 %{l_make} %{l_mflags} -f Makefile
121 %install
122 # remove build cruft
123 rm -rf $RPM_BUILD_ROOT
125 # install the Perl package via standard procedure
126 %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT
128 # allow us to already use the temporary install perl(1)
129 PERL5LIB=$RPM_BUILD_ROOT%{l_prefix}/lib/perl
130 export PERL5LIB
132 # install Perl versions of system header files
133 ( case "%{l_platform -t}" in
134 *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;;
135 esac
136 cd /usr/include
137 eval `$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib`
138 echo *.h sys/*.h |\
139 xargs $RPM_BUILD_ROOT%{l_prefix}/bin/perl \
140 $RPM_BUILD_ROOT%{l_prefix}/bin/h2ph -h -d $RPM_BUILD_ROOT$installarchlib
141 ) || exit $?
143 # post-adjustments to installation tree
144 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version}
145 rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
146 for name in \
147 libnetcfg perlaix perlamiga perlapollo \
148 perlbeos perlbs2000 perlcygwin perldgux perlepoc perlfreebsd perlhpux \
149 perlhurd perlirix perlmachten perlmacos perlmacosx perlmint perlmpeix \
150 perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris \
151 perlvmesa perlvms perlvos perlwin32; do
152 rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$name.1
153 done
155 # re-adjust configuration as mentioned in Perl's INSTALL document
156 ( case "%{l_platform -t}" in
157 *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;;
158 esac
159 $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \
160 -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \
161 $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \
162 `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \
163 -type f -name ".packlist" -print`
164 find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \
165 -name "*.orig" -print | xargs rm -f
166 ) || exit $?
168 # assume ownership for various arch/site/vendor install dirs
169 ( eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib`"
170 eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installprivlib`"
171 eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitearch`"
172 eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitelib`"
173 eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorarch`"
174 eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorlib`"
175 %{l_shtool} mkdir -f -p -m 755 \
176 $RPM_BUILD_ROOT$installarchlib/auto \
177 $RPM_BUILD_ROOT$installprivlib/auto \
178 $RPM_BUILD_ROOT$installsitearch/auto \
179 $RPM_BUILD_ROOT$installsitelib/auto \
180 $RPM_BUILD_ROOT$installvendorarch/auto \
181 $RPM_BUILD_ROOT$installvendorlib/auto
182 ) || exit $?
184 # strip binary files
185 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
187 # resolve file conflicts (with perl-locale)
188 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \
189 $RPM_BUILD_ROOT%{l_prefix}/bin/piconv \
190 $RPM_BUILD_ROOT%{l_prefix}/man/man1/enc2xs.1 \
191 $RPM_BUILD_ROOT%{l_prefix}/man/man1/piconv.1
193 # resolve file conflicts (with perl-module)
194 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/corelist \
195 $RPM_BUILD_ROOT%{l_prefix}/bin/config_data \
196 $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 \
197 $RPM_BUILD_ROOT%{l_prefix}/man/man1/corelist.1 \
198 $RPM_BUILD_ROOT%{l_prefix}/man/man1/cpan.1 \
199 $RPM_BUILD_ROOT%{l_prefix}/man/man1/instmodsh.1
201 # resolve file conflicts (with perl-sys)
202 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ptar \
203 $RPM_BUILD_ROOT%{l_prefix}/bin/ptardiff \
204 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptar.1 \
205 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptardiff.1
207 # resolve file conflicts (with perl-crypto)
208 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/shasum \
209 $RPM_BUILD_ROOT%{l_prefix}/man/man1/shasum.1
211 # determine installed files
212 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
214 %files -f files
216 %clean
217 rm -rf $RPM_BUILD_ROOT