Dr. Werner Fink 2012-02-08 14:26:23 +00:00 committed by Git OBS Bridge
parent 06499e0fcc
commit 2105f4c6d7
2 changed files with 132 additions and 79 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Feb 8 13:32:59 UTC 2012 - werner@suse.de
- Make it build again
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 8 13:31:28 UTC 2012 - coolo@suse.com Wed Feb 8 13:31:28 UTC 2012 - coolo@suse.com

View File

@ -215,19 +215,46 @@ exit 1
%endif %endif
%build %build
#libtoolize --force cflags ()
#autoreconf --force --install --verbose {
#rm configure local flag=$1; shift
local var=$1; shift
test -n "${flag}" -a -n "${var}" || return
case "${!var}" in
*${flag}*) return
esac
set -o noclobber
case "$flag" in
-Wl,*)
if echo 'int main () { return 0; }' | \
${CC:-gcc} -Werror $flag -o /dev/null -xc ldtest.c > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
;;
*)
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
esac
set +o noclobber
}
# libtoolize --force
# autoreconf --force --install --verbose
# rm configure
autoconf --force autoconf --force
## needed for detection of XFree86[tm]
#touch /etc/XF86Config
VERSION=%{version} VERSION=%{version}
SHARE=/usr/share SHARE=/usr/share
LIB=/usr/lib LIB=/usr/lib
SYS=${RPM_ARCH}-suse-linux SYS=${RPM_ARCH}-suse-linux
%ifarch %ix86 %ifarch %ix86
# LOOP="-fprefetch-loop-arrays -funroll-loops" cflags -fprefetch-loop-arrays LOOP
cflags -funroll-loops LOOP
%endif %endif
cflags -Wno-unused-but-set-variable RPM_OPT_FLAGS
cflags -Wno-unused-value RPM_OPT_FLAGS
cflags -Wno-switch RPM_OPT_FLAGS
cflags -fno-strict-aliasing RPM_OPT_FLAGS
INFO=${SHARE}/xemacs/info INFO=${SHARE}/xemacs/info
LIBEXEC=${LIB}/xemacs/${VERSION} LIBEXEC=${LIB}/xemacs/${VERSION}
ARCH=${LIBEXEC}/${SYS} ARCH=${LIBEXEC}/${SYS}
@ -237,9 +264,9 @@ LIBEXEC=${LIB}/xemacs/${VERSION}
MOD=${ARCH}/modules MOD=${ARCH}/modules
STATE=/var/lib/xemacs STATE=/var/lib/xemacs
MAN=/usr/share/man/man1 MAN=/usr/share/man/man1
CFLAGS="${RPM_OPT_FLAGS} -Wall -Wno-switch -pipe ${LOOP} -fno-strict-aliasing -DLDAP_DEPRECATED " CFLAGS="-Wall ${RPM_OPT_FLAGS} -pipe ${LOOP} -DLDAP_DEPRECATED "
%ifarch s390x %ifarch s390x
CFLAGS="$CFLAGS -O0" CFLAGS="$CFLAGS -O1"
%endif %endif
# To to the menu translations, add: # To to the menu translations, add:
# $CFLAGS="$CFLAGS -DPRINT_XLWMENU_RESOURCE_CONVERSIONS " # $CFLAGS="$CFLAGS -DPRINT_XLWMENU_RESOURCE_CONVERSIONS "
@ -375,12 +402,12 @@ make %{?jobs:-j %jobs}
%install %install
set +o posix set +o posix
# #
mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-lisp/lisp mkdir -p %{buildroot}/usr/share/xemacs/site-lisp/lisp
mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term mkdir -p %{buildroot}/usr/share/xemacs/site-packages/lisp/term
mkdir -p $RPM_BUILD_ROOT/var/lib/xemacs/lock mkdir -p %{buildroot}/var/lib/xemacs/lock
chmod 1777 $RPM_BUILD_ROOT/var/lib/xemacs/lock chmod 1777 %{buildroot}/var/lib/xemacs/lock
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=%{buildroot} install
mv $RPM_BUILD_ROOT%{xbindir}/xemacs-21.?-??? $RPM_BUILD_ROOT%{xbindir}/xemacs mv %{buildroot}%{xbindir}/xemacs-21.?-??? %{buildroot}%{xbindir}/xemacs
# fix up the load-history to make it possible to use find-function # fix up the load-history to make it possible to use find-function
# on functions which are in dumped lisp files, even if XEmacs was not # on functions which are in dumped lisp files, even if XEmacs was not
# dumped at the place where it is finally running. # dumped at the place where it is finally running.
@ -391,53 +418,53 @@ mv $RPM_BUILD_ROOT%{xbindir}/xemacs-21.?-??? $RPM_BUILD_ROOT%{xbindir}/xemacs
# #
# Test whether this works by evaluating (find-function 'next-line) # Test whether this works by evaluating (find-function 'next-line)
# #
install -m 644 $RPM_SOURCE_DIR/fix-load-history.el \ install -m 644 %{_sourcedir}/fix-load-history.el \
$RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/ %{buildroot}/usr/share/xemacs/site-packages/lisp/
rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/src/ rm -rf %{buildroot}/usr/share/xemacs/%{version}/src/
rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lib-src/ rm -rf %{buildroot}/usr/share/xemacs/%{version}/lib-src/
rm -f $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/Installation rm -f %{buildroot}/usr/share/xemacs/%{version}/Installation
###################################################################### ######################################################################
test -L $RPM_BUILD_ROOT%{xbindir}/xemacs && \ test -L %{buildroot}%{xbindir}/xemacs && \
rm $RPM_BUILD_ROOT%{xbindir}/xemacs rm %{buildroot}%{xbindir}/xemacs
ver=%{version} ver=%{version}
test -x $RPM_BUILD_ROOT%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} && \ test -x %{buildroot}%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} && \
mv $RPM_BUILD_ROOT%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} $RPM_BUILD_ROOT%{xbindir}/xemacs mv %{buildroot}%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} %{buildroot}%{xbindir}/xemacs
chmod 755 $RPM_BUILD_ROOT%{xbindir}/xemacs chmod 755 %{buildroot}%{xbindir}/xemacs
rm -f $RPM_BUILD_ROOT%{xbindir}/xemacs-script rm -f %{buildroot}%{xbindir}/xemacs-script
rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/tests rm -rf %{buildroot}/usr/share/xemacs/%{version}/etc/tests
for f in $RPM_BUILD_ROOT/usr/man/man1/*.1 \ for f in %{buildroot}/usr/man/man1/*.1 \
$RPM_BUILD_ROOT/usr/share/man/man1/*.1 \ %{buildroot}/usr/share/man/man1/*.1 \
$RPM_BUILD_ROOT/usr/share/xemacs/info/*info* \ %{buildroot}/usr/share/xemacs/info/*info* \
$RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/*.1 \ %{buildroot}/usr/share/xemacs/%{version}/etc/*.1 \
$RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/mule/*.1 %{buildroot}/usr/share/xemacs/%{version}/etc/mule/*.1
do do
test "${f##*.}" = "gz" && continue test "${f##*.}" = "gz" && continue
test -e $f || continue test -e $f || continue
gzip -9f $f gzip -9f $f
done done
find $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/ -name '*.orig' | xargs -r rm -f find %{buildroot}/usr/share/xemacs/%{version}/ -name '*.orig' | xargs -r rm -f
find $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/ -name '*.el.ediff' | xargs -r rm -f find %{buildroot}/usr/share/xemacs/%{version}/ -name '*.el.ediff' | xargs -r rm -f
find $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/ -name '*.el.vm' | xargs -r rm -f find %{buildroot}/usr/share/xemacs/%{version}/ -name '*.el.vm' | xargs -r rm -f
# ctags and etags are part of the ctags package # ctags and etags are part of the ctags package
# b2m and rcs-checkin are in the emacs package. # b2m and rcs-checkin are in the emacs package.
# As all binaries are in /usr/bin/ with X11R7, xemacs would conflict # As all binaries are in /usr/bin/ with X11R7, xemacs would conflict
# with emacs if xemacs packaged b2m and rcs-checkin as well. # with emacs if xemacs packaged b2m and rcs-checkin as well.
# Therefore we remove them from the xemacs package here. # Therefore we remove them from the xemacs package here.
# They are rarely needed anyway. # They are rarely needed anyway.
rm -f $RPM_BUILD_ROOT%{xbindir}/ctags \ rm -f %{buildroot}%{xbindir}/ctags \
$RPM_BUILD_ROOT%{xbindir}/etags \ %{buildroot}%{xbindir}/etags \
$RPM_BUILD_ROOT%{xbindir}/b2m \ %{buildroot}%{xbindir}/b2m \
$RPM_BUILD_ROOT%{xbindir}/rcs-checkin \ %{buildroot}%{xbindir}/rcs-checkin \
$RPM_BUILD_ROOT/usr/share/man/man1/ctags.1.gz \ %{buildroot}/usr/share/man/man1/ctags.1.gz \
$RPM_BUILD_ROOT/usr/share/man/man1/etags.1.gz \ %{buildroot}/usr/share/man/man1/etags.1.gz \
$RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/ctags.1.gz \ %{buildroot}/usr/share/xemacs/%{version}/etc/ctags.1.gz \
$RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/etags.1.gz %{buildroot}/usr/share/xemacs/%{version}/etc/etags.1.gz
# Some .elc's are not needed: # Some .elc's are not needed:
find $RPM_BUILD_ROOT/usr/share/xemacs/ -name '_pkg.elc' | xargs -r rm -f find %{buildroot}/usr/share/xemacs/ -name '_pkg.elc' | xargs -r rm -f
find $RPM_BUILD_ROOT/usr/share/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f find %{buildroot}/usr/share/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f
find $RPM_BUILD_ROOT/usr/lib/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f find %{buildroot}/usr/lib/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f
rm -f $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lisp/default.elc rm -f %{buildroot}/usr/share/xemacs/%{version}/lisp/default.elc
rm -f $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lisp/vm/vm.elc rm -f %{buildroot}/usr/share/xemacs/%{version}/lisp/vm/vm.elc
#if test -e /usr/share/xemacs/%{version}/lisp/xpm-button.el -a \ #if test -e /usr/share/xemacs/%{version}/lisp/xpm-button.el -a \
# -e /usr/share/xemacs/%{version}/lisp/xemacs-base/xpm-button.el # -e /usr/share/xemacs/%{version}/lisp/xemacs-base/xpm-button.el
#then #then
@ -445,56 +472,77 @@ rm -f $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lisp/vm/vm.elc
# rm -f /usr/share/xemacs/%{version}/lisp/xpm-button.elc # rm -f /usr/share/xemacs/%{version}/lisp/xpm-button.elc
#fi #fi
# no .origs # no .origs
rm -f $RPM_BUILD_ROOT/usr/share/xemacs/info/xemacs-faq.info.orig* rm -f %{buildroot}/usr/share/xemacs/info/xemacs-faq.info.orig*
# #
# Make TUTORIAL's visible # Make TUTORIAL's visible
for t in $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/mule/TUTORIAL.* ; do for t in %{buildroot}/usr/share/xemacs/%{version}/etc/mule/TUTORIAL.* ; do
test -e $t || break test -e $t || break
test -e $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/${t##*/} && rm -f $t test -e %{buildroot}/usr/share/xemacs/%{version}/etc/${t##*/} && rm -f $t
test -e $t && mv $t $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/${t##*/} test -e $t && mv $t %{buildroot}/usr/share/xemacs/%{version}/etc/${t##*/}
done done
# install the standard app-defaults file used for all languages # install the standard app-defaults file used for all languages
# which don't have their own app-defaults file above: # which don't have their own app-defaults file above:
mkdir -p $RPM_BUILD_ROOT%{appdefdir}/app-defaults/ mkdir -p %{buildroot}%{appdefdir}/app-defaults/
install -m 644 etc/Emacs.ad $RPM_BUILD_ROOT%{appdefdir}/app-defaults/XEmacs install -m 644 etc/Emacs.ad %{buildroot}%{appdefdir}/app-defaults/XEmacs
# SuSE extension # SuSE extension
install -m 0644 $RPM_SOURCE_DIR/site-start.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/ install -m 0644 %{_sourcedir}/site-start.el %{buildroot}/usr/share/xemacs/site-packages/lisp/
install -m 0644 $RPM_SOURCE_DIR/suse-xft-init.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/ install -m 0644 %{_sourcedir}/suse-xft-init.el %{buildroot}/usr/share/xemacs/site-packages/lisp/
install -m 0644 site-packages/lisp/term/func-keys.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/ install -m 0644 site-packages/lisp/term/func-keys.el %{buildroot}/usr/share/xemacs/site-packages/lisp/term/
install -m 0644 site-packages/lisp/term/linux.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/ install -m 0644 site-packages/lisp/term/linux.el %{buildroot}/usr/share/xemacs/site-packages/lisp/term/
install -m 0644 site-packages/lisp/term/xterm.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/ install -m 0644 site-packages/lisp/term/xterm.el %{buildroot}/usr/share/xemacs/site-packages/lisp/term/
install -m 0644 site-packages/lisp/term/gnome.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/ install -m 0644 site-packages/lisp/term/gnome.el %{buildroot}/usr/share/xemacs/site-packages/lisp/term/
install -m 0644 site-packages/lisp/term/kvt.el $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/ install -m 0644 site-packages/lisp/term/kvt.el %{buildroot}/usr/share/xemacs/site-packages/lisp/term/
./src/xemacs -batch -no-site-file -vanilla -f batch-byte-compile $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term/*.el ./src/xemacs -batch -no-site-file -vanilla -f batch-byte-compile %{buildroot}/usr/share/xemacs/site-packages/lisp/term/*.el
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/xemacs mkdir -p %{buildroot}/%{_docdir}/xemacs
install -m 0644 suse/README.SuSE $RPM_BUILD_ROOT/%{_docdir}/xemacs/README.SuSE install -m 0644 suse/README.SuSE %{buildroot}/%{_docdir}/xemacs/README.SuSE
ln -sf /usr/share/xemacs/%{version}/etc $RPM_BUILD_ROOT/%{_docdir}/xemacs/etc ln -sf /usr/share/xemacs/%{version}/etc %{buildroot}/%{_docdir}/xemacs/etc
mkdir -p $RPM_BUILD_ROOT/etc/skel/.xemacs mkdir -p %{buildroot}/etc/skel/.xemacs
install -m 0644 $RPM_SOURCE_DIR/skel.init.el $RPM_BUILD_ROOT/etc/skel/.xemacs/init.el install -m 0644 %{_sourcedir}/skel.init.el %{buildroot}/etc/skel/.xemacs/init.el
%if %suse_version > 1020 fdupes -q -r -1 %{buildroot}%{_datadir}/xemacs/%{version}/etc/ %{buildroot}%{_mandir}/man1/ |\
%fdupes $RPM_SOURCE_DIR/usr/share/xemacs xargs -n 2 | while read first second; do
%endif case "${first}" in
*xemacs/%{version}/etc/*)
target=$second
file=$first
;;
*) target=$first
file=$second
esac
ln -sf ${file#%{buildroot}} ${target}
done
fdupes -q -r -1 %{buildroot}%{_datadir}/xemacs/%{version}/etc/toolbar/ |\
xargs -n 2 | while read first second; do
case "${first}" in
*xemacs/%{version}/etc/*)
target=$second
file=$first
;;
*) target=$first
file=$second
esac
ln -sf ${file#%{buildroot}} ${target}
done
# #
# replace buildroot in comments in .elc files by spaces with the same total length: # replace buildroot in comments in .elc files by spaces with the same total length:
RPM_BUILD_ROOT_REPLACEMENT=$(echo "$RPM_BUILD_ROOT" | tr '[:print:]' ' ') REPLACEMENT=$(echo "%{buildroot}" | tr '[:print:]' ' ')
for i in $(find $RPM_BUILD_ROOT -name "*.elc") for i in $(find %{buildroot} -name "*.elc")
do do
perl -pi -e "s|(;;; from file )$RPM_BUILD_ROOT(/usr/share/xemacs/.*)|\1$RPM_BUILD_ROOT_REPLACEMENT\2|" $i perl -pi -e "s|(;;; from file )%{buildroot}(/usr/share/xemacs/.*)|\1$REPLACEMENT\2|" $i
done done
# #
# gzip .el files: (doesn't completely work for me yet -> later) # gzip .el files: (doesn't completely work for me yet -> later)
#for i in $(find $RPM_BUILD_ROOT -name "*.el") #for i in $(find %{buildroot} -name "*.el")
#do #do
# gzip --best $i # gzip --best $i
#done #done
# #
( find $RPM_BUILD_ROOT \ ( find %{buildroot} \
\( \( \( -not -type d \) -a \( -not -type l \) \) -printf '%%p\n' \) -o \ \( \( \( -not -type d \) -a \( -not -type l \) \) -printf '%%p\n' \) -o \
\( -type d -printf '%%p/\n' \) -o \( -type l -printf '%%p\n' \) ; \ \( -type d -printf '%%p/\n' \) -o \( -type l -printf '%%p\n' \) ; \
find $RPM_BUILD_ROOT/usr/share/xemacs/ $RPM_BUILD_ROOT/usr/lib/xemacs/ -type f -o -type l ) | \ find %{buildroot}/usr/share/xemacs/ %{buildroot}/usr/lib/xemacs/ -type f -o -type l ) | \
grep -v "/usr/share/xemacs/%{version}/etc" | \ grep -v "/usr/share/xemacs/%{version}/etc" | \
sort -t /| uniq | perl -p -e "s|$RPM_BUILD_ROOT||" > xe-list sort -t /| uniq | perl -p -e "s|%{buildroot}||" > xe-list
./src/xemacs -batch -no-site-file -l $RPM_SOURCE_DIR/xe-list.el -f xe-list-generate-list-files ./src/xemacs -batch -no-site-file -l %{_sourcedir}/xe-list.el -f xe-list-generate-list-files
cat xe-list-el-without-elc xe-list-elc-without-el xe-list-elc-with-el \ cat xe-list-el-without-elc xe-list-elc-without-el xe-list-elc-with-el \
>> xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el >> xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el
## ##
@ -503,7 +551,7 @@ cat xe-list-el-without-elc xe-list-elc-without-el xe-list-elc-with-el \
## ##
# do no include header files because RPMLINT complains about header files in non-devel # do no include header files because RPMLINT complains about header files in non-devel
# packages: # packages:
rm -rf $RPM_BUILD_ROOT/usr/lib/xemacs/%{version}/*-suse-linux/include/ rm -rf %{buildroot}/usr/lib/xemacs/%{version}/*-suse-linux/include/
%post %post
%run_permissions %run_permissions
@ -511,7 +559,7 @@ rm -rf $RPM_BUILD_ROOT/usr/lib/xemacs/%{version}/*-suse-linux/include/
%verify_permissions -e /var/lib/xemacs/lock %verify_permissions -e /var/lib/xemacs/lock
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%files -f xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el %files -f xe-list-el-without-elc_xe-list-elc-without-el_xe-list-elc-with-el
%defattr(-,root,root) %defattr(-,root,root)