commit site-config for openSUSE:12.2
Hello community, here is the log from the commit of package site-config for openSUSE:12.2 checked in at 2012-07-31 14:05:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.2/site-config (Old) and /work/SRC/openSUSE:12.2/.site-config.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "site-config", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:12.2/site-config/site-config.changes 2012-06-25 15:53:11.000000000 +0200 +++ /work/SRC/openSUSE:12.2/.site-config.new/site-config.changes 2012-07-31 14:18:34.000000000 +0200 @@ -1,0 +2,12 @@ +Tue Jun 26 15:34:39 CEST 2012 - sbrabec@suse.cz + +- Added README. +- Support more products and libtool and autoconf versions. + +------------------------------------------------------------------- +Fri Jun 8 17:37:25 CEST 2012 - sbrabec@suse.cz + +- Rewrite heuristic to be cross-compilation wise (bnc#736143). +- Do not overwrite libexecdir specified by user (bnc#758947). + +------------------------------------------------------------------- Old: ---- site-config.libdir.biarch New: ---- site-config.README site-config.libdir1 site-config.libdir3.biarch site-config.libdir3.uniarch site-config.libdir4 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ site-config.spec ++++++ --- /var/tmp/diff_new_pack.SAlnSi/_old 2012-07-31 14:18:34.000000000 +0200 +++ /var/tmp/diff_new_pack.SAlnSi/_new 2012-07-31 14:18:34.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package site-config # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,22 +15,27 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: site-config +Version: 0.2 +Release: 0 +Summary: Site Paths Configuration for autoconf Based configure Scripts License: BSD-3-Clause Group: Development/Tools/Building -Version: 0.1 -Release: 1 -Summary: Site Paths Configuration for autoconf Based configure Scripts -Source: %{name}.libdir.biarch -Source1: %{name}.libexecdir -Source2: %{name}.AUTHORS -Source3: %{name}.COPYING +Source0: %{name}.libdir1 +Source1: %{name}.libdir3.biarch +Source2: %{name}.libdir3.uniarch +Source3: %{name}.libdir4 +Source4: %{name}.libexecdir +Source5: %{name}.AUTHORS +Source6: %{name}.COPYING +Source7: %{name}.README BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: autoconf libtool +BuildRequires: autoconf +BuildRequires: libtool +%if 0%{?suse_version} Supplements: make autoconf +%endif %description Site configuration for autoconf based configure scripts provides smart @@ -38,53 +43,92 @@ %prep %setup -q -T -c %{name}-%{version} -cp -a %{S:0} %{S:1} . -cp -a %{S:2} AUTHORS -cp -a %{S:3} COPYING -touch site-config.libdir.uniarch +cp -a %{S:0} %{S:1} %{S:2} %{S:3} %{S:4} . +cp -a %{S:5} AUTHORS +cp -a %{S:6} COPYING +cp -a %{S:7} README %build -SITE_PLATFORM=`%{_datadir}/libtool/config/config.guess` +# Call libtool to get name of our architecture as seen by GNU tools. +if test -f %{_datadir}/libtool/config/config.guess ; then + # new libtool + %{_datadir}/libtool/config/config.guess >site_platform +else + # old libtool + %{_datadir}/libtool/config.guess >site_platform +fi +SITE_PLATFORM=$(<site_platform) +if test -z "$SITE_PLATFORM" ; then + echo "ERROR: libtool implementation changed. Please update SITE_PLATFORM definition." + exit 1 +fi + # Extract fully expanded needed parts of the actual implementation of AC_SITE_LOAD. +# Create dummy configure.in to generate configure. cat >configure.in <<EOF dnl AC_SITE_LOAD is included as part of AC_INIT AC_INIT EOF autoconf -sed -n <configure >ac_site_load_files ' -s/ /\t/g -s:\$as_me:%{_datadir}/site/'$SITE_PLATFORM':g -/^elif test "x\$prefix" != xNONE/s/elif/if/ -/^if test "x\$prefix" != xNONE/,/^done/p -' +# Extract site script loading parts of configure and apply some rewrite rules. +if grep ac_site_file2 configure ; then + # new autoconf + sed -n <configure >ac_site_load_files ' + s/ /\t/g + s:\$as_me:%{_datadir}/site/'$SITE_PLATFORM':g + /^elif test "x\$prefix" != xNONE/s/elif/if/ + /^if test "x\$prefix" != xNONE/,/^done/p + ' +else + # old autoconf + sed -n <configure >ac_site_load_files ' + s:\$as_me:%{_datadir}/site/'$SITE_PLATFORM':g + s/ /\t/g + /^fi/d + /^\tif test "x\$prefix" != xNONE; then/,/^\tfi/s/^\t// + s/CONFIG_SITE/ac_site_files/ + /^if test "x\$prefix" != xNONE/,/^done/p + ' +fi if test -z "$(<ac_site_load_files)" ; then echo "ERROR: AC_SITE_LOAD implementation changed. Please update extraction logic." exit 1 fi -echo -e '#!/bin/sh\n# Site script for configure. It is resourced via \$CONFIG_SITE environment varaible.\n' >site-config + +# Now compile site-config script. +# Header. +echo -e '#!/bin/sh\n# Site script for configure. It is resourced via $CONFIG_SITE environment varaible.\n' >site-config +# libdir stuff. +cat site-config.libdir1 >>site-config +NATIVE_PLATFORM=`uname -i` if test "%{_libdir}" = "%{_prefix}/lib" ; then - cat site-config.libdir.uniarch >>site-config + echo -e "\t\t# The native platform $NATIVE_PLATFORM is not a bi-arch platform." >>site-config + cat site-config.libdir3.uniarch >>site-config else - cat site-config.libdir.biarch >>site-config + echo -e "\t\t# The native platform $NATIVE_PLATFORM is a bi-arch platform." >>site-config + cat site-config.libdir3.biarch >>site-config fi +cat site-config.libdir4 >>site-config +# libexec stuff. cat site-config.libexecdir >>site-config +# And stuff to load site scripts from default locations. echo '# Continue with the standard behavior of configure defined in AC_SITE_LOAD:' >>site-config cat ac_site_load_files >>site-config %install mkdir -p $RPM_BUILD_ROOT%{_datadir}/site $RPM_BUILD_ROOT%{_sysconfdir}/profile.d -SITE_PLATFORM=`%{_datadir}/libtool/config/config.guess` -if test -z "$SITE_PLATFORM" ; then - echo "ERROR: libtool implementation changed. Please update SITE_PLATFORM definition." - exit 1 -fi -cp -a site-config $RPM_BUILD_ROOT%{_datadir}/site/$SITE_PLATFORM +# Install site script. +SITE_PLATFORM=$(<site_platform) +cp site-config $RPM_BUILD_ROOT%{_datadir}/site/$SITE_PLATFORM + +# Install Bourne Shell profile. cat >$RPM_BUILD_ROOT%{_sysconfdir}/profile.d/site.sh <<EOF CONFIG_SITE="%{_datadir}/site/$SITE_PLATFORM" export CONFIG_SITE EOF +# Install C Shell profile. cat >$RPM_BUILD_ROOT%{_sysconfdir}/profile.d/site.csh <<EOF set CONFIG_SITE="%{_datadir}/site/$SITE_PLATFORM" EOF @@ -94,7 +138,7 @@ %files %defattr (-,root,root) -%doc AUTHORS COPYING +%doc AUTHORS COPYING README %{_datadir}/site %{_sysconfdir}/profile.d/*.* ++++++ site-config.README ++++++ site-config: Site Paths Configuration for autoconf Based configure Scripts ========================================================================== Site configuration for autoconf based configure scripts provides smart defaults for paths that are not specified. All autoconf based configure scripts will automatically resource site script using CONFIG_SITE environment variable. It works without any explicit user interaction. Currently implemented features: Automatic libdir setup to $exec_prefix/lib or $exec_prefix/lib64 ---------------------------------------------------------------- Depending on architecture, site script should correctly and automatically switch between lib and lib64 libdir. libexecdir setup to $exec_prefix/lib ------------------------------------ Upstream libexecdir defaults to $exec_prefix/libexec. This directory is not part of FHS 2.2, so we change it to $exec_prefix/lib (yes, it is correct to set it to $exec_prefix/lib even for bi-arch platforms). Most projects add package name to this path, so you most probably get what FHS 2.2 expects. ++++++ site-config.libdir.biarch -> site-config.libdir1 ++++++ --- /work/SRC/openSUSE:12.2/site-config/site-config.libdir.biarch 2012-06-25 15:53:11.000000000 +0200 +++ /work/SRC/openSUSE:12.2/.site-config.new/site-config.libdir1 2012-07-31 14:18:34.000000000 +0200 @@ -1,44 +1,9 @@ # If user did not specify libdir, guess the correct target: -# Use lib64 for 64 bit targets, keep the default for the rest. +# Use lib64 for 64 bit bi-arch targets, keep the default for the rest. if test "$libdir" = '${exec_prefix}/lib' ; then - # We are trying to guess 32-bit target compilation. It's not as easy as - # it sounds, as there is possible several intermediate combinations. - ac_config_site_32bit_target=NONE + ac_config_site_64bit_host=NONE - # User defined -m32 in CFLAGS or CXXFLAGS: - # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) - case "$CFLAGS" in - *-m32*) - ac_config_site_32bit_target=YES - ;; - esac - case "$CXXFLAGS" in - *-m32*) - ac_config_site_32bit_target=YES - ;; - esac - - # User explicitly specified counterpart --host: - # (If cross toolchain is installed, generates 32-bit, else generates native.) case "$host" in - *i[3456]86-* | ppc-* | s390-* ) - ac_config_site_32bit_target=YES - ;; - esac - - # Running with linux32: - # (Changes detected platform, but not the toolchain target.) - case "`/bin/uname -i`" in - x86_64 | ppc64 | s390x ) - ;; - * ) - ac_config_site_32bit_target=YES - ;; - esac - - if test "x$ac_config_site_32bit_target" = xNONE; then - libdir='${exec_prefix}/lib64' - fi -fi - + "" ) + # User did not specify host target. ++++++ site-config.libdir.biarch -> site-config.libdir3.biarch ++++++ --- /work/SRC/openSUSE:12.2/site-config/site-config.libdir.biarch 2012-06-25 15:53:11.000000000 +0200 +++ /work/SRC/openSUSE:12.2/.site-config.new/site-config.libdir3.biarch 2012-07-31 14:18:34.000000000 +0200 @@ -1,44 +1,33 @@ -# If user did not specify libdir, guess the correct target: -# Use lib64 for 64 bit targets, keep the default for the rest. -if test "$libdir" = '${exec_prefix}/lib' ; then + # Try to detect cross-compilation to inferior architecture. - # We are trying to guess 32-bit target compilation. It's not as easy as - # it sounds, as there is possible several intermediate combinations. - ac_config_site_32bit_target=NONE - - # User defined -m32 in CFLAGS or CXXFLAGS: - # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) - case "$CFLAGS" in + # We are trying to guess 32-bit target compilation. It's not as easy as + # it sounds, as there is possible several intermediate combinations. + ac_config_site_cross_to_32bit_host=NONE + + # User defined -m32 in CFLAGS or CXXFLAGS: + # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) + case "$CFLAGS" in *-m32*) - ac_config_site_32bit_target=YES + ac_config_site_cross_to_32bit_host=YES ;; - esac - case "$CXXFLAGS" in + esac + case "$CXXFLAGS" in *-m32*) - ac_config_site_32bit_target=YES - ;; - esac - - # User explicitly specified counterpart --host: - # (If cross toolchain is installed, generates 32-bit, else generates native.) - case "$host" in - *i[3456]86-* | ppc-* | s390-* ) - ac_config_site_32bit_target=YES + ac_config_site_cross_to_32bit_host=YES ;; - esac + esac - # Running with linux32: - # (Changes detected platform, but not the toolchain target.) - case "`/bin/uname -i`" in + # Running with linux32: + # (Changes detected platform, but not the toolchain target.) + case "`/bin/uname -i`" in x86_64 | ppc64 | s390x ) ;; * ) - ac_config_site_32bit_target=YES + ac_config_site_cross_to_32bit_host=YES ;; - esac + esac - if test "x$ac_config_site_32bit_target" = xNONE; then - libdir='${exec_prefix}/lib64' - fi -fi + if test "x$ac_config_site_cross_to_32bit_host" = xNONE; then + ac_config_site_64bit_host=YES + fi ++++++ site-config.libdir3.uniarch ++++++ # There is no need to check for compatible sub-architecture. ac_config_site_64bit_host=NONE ++++++ site-config.libdir.biarch -> site-config.libdir4 ++++++ --- /work/SRC/openSUSE:12.2/site-config/site-config.libdir.biarch 2012-06-25 15:53:11.000000000 +0200 +++ /work/SRC/openSUSE:12.2/.site-config.new/site-config.libdir4 2012-07-31 14:18:34.000000000 +0200 @@ -1,43 +1,10 @@ -# If user did not specify libdir, guess the correct target: -# Use lib64 for 64 bit targets, keep the default for the rest. -if test "$libdir" = '${exec_prefix}/lib' ; then - - # We are trying to guess 32-bit target compilation. It's not as easy as - # it sounds, as there is possible several intermediate combinations. - ac_config_site_32bit_target=NONE - - # User defined -m32 in CFLAGS or CXXFLAGS: - # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) - case "$CFLAGS" in - *-m32*) - ac_config_site_32bit_target=YES - ;; - esac - case "$CXXFLAGS" in - *-m32*) - ac_config_site_32bit_target=YES - ;; - esac - - # User explicitly specified counterpart --host: - # (If cross toolchain is installed, generates 32-bit, else generates native.) - case "$host" in - *i[3456]86-* | ppc-* | s390-* ) - ac_config_site_32bit_target=YES - ;; - esac - - # Running with linux32: - # (Changes detected platform, but not the toolchain target.) - case "`/bin/uname -i`" in - x86_64 | ppc64 | s390x ) - ;; - * ) - ac_config_site_32bit_target=YES - ;; + ;; + *x86_64* | *ppc64* | *s390x* ) + ac_config_site_64bit_host=YES + ;; esac - if test "x$ac_config_site_32bit_target" = xNONE; then + if test "x$ac_config_site_64bit_host" = xYES; then libdir='${exec_prefix}/lib64' fi fi ++++++ site-config.libexecdir ++++++ --- /var/tmp/diff_new_pack.SAlnSi/_old 2012-07-31 14:18:34.000000000 +0200 +++ /var/tmp/diff_new_pack.SAlnSi/_new 2012-07-31 14:18:34.000000000 +0200 @@ -1,5 +1,7 @@ -# If user did not specify libexecdir, guess the correct target: +# If user did not specify libexecdir, set the correct target: # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib. -libexecdir='${exec_prefix}/lib' +if test "$libexecdir" = '${exec_prefix}/libexec' ; then + libexecdir='${exec_prefix}/lib' +fi -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de