diff --git a/xemacs.changes b/xemacs.changes index 4aac628..533719a 100644 --- a/xemacs.changes +++ b/xemacs.changes @@ -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 diff --git a/xemacs.spec b/xemacs.spec index fef9d1e..25c7872 100644 --- a/xemacs.spec +++ b/xemacs.spec @@ -215,19 +215,46 @@ exit 1 %endif %build -#libtoolize --force -#autoreconf --force --install --verbose -#rm configure + cflags () + { + 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 -## needed for detection of XFree86[tm] -#touch /etc/XF86Config VERSION=%{version} SHARE=/usr/share LIB=/usr/lib SYS=${RPM_ARCH}-suse-linux %ifarch %ix86 -# LOOP="-fprefetch-loop-arrays -funroll-loops" + cflags -fprefetch-loop-arrays LOOP + cflags -funroll-loops LOOP %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 LIBEXEC=${LIB}/xemacs/${VERSION} ARCH=${LIBEXEC}/${SYS} @@ -237,9 +264,9 @@ LIBEXEC=${LIB}/xemacs/${VERSION} MOD=${ARCH}/modules STATE=/var/lib/xemacs 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 - CFLAGS="$CFLAGS -O0" + CFLAGS="$CFLAGS -O1" %endif # To to the menu translations, add: # $CFLAGS="$CFLAGS -DPRINT_XLWMENU_RESOURCE_CONVERSIONS " @@ -375,12 +402,12 @@ make %{?jobs:-j %jobs} %install set +o posix # -mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-lisp/lisp -mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/term -mkdir -p $RPM_BUILD_ROOT/var/lib/xemacs/lock -chmod 1777 $RPM_BUILD_ROOT/var/lib/xemacs/lock -make DESTDIR=$RPM_BUILD_ROOT install -mv $RPM_BUILD_ROOT%{xbindir}/xemacs-21.?-??? $RPM_BUILD_ROOT%{xbindir}/xemacs +mkdir -p %{buildroot}/usr/share/xemacs/site-lisp/lisp +mkdir -p %{buildroot}/usr/share/xemacs/site-packages/lisp/term +mkdir -p %{buildroot}/var/lib/xemacs/lock +chmod 1777 %{buildroot}/var/lib/xemacs/lock +make DESTDIR=%{buildroot} install +mv %{buildroot}%{xbindir}/xemacs-21.?-??? %{buildroot}%{xbindir}/xemacs # 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 # 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) # -install -m 644 $RPM_SOURCE_DIR/fix-load-history.el \ - $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/ -rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/src/ -rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lib-src/ -rm -f $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/Installation +install -m 644 %{_sourcedir}/fix-load-history.el \ + %{buildroot}/usr/share/xemacs/site-packages/lisp/ +rm -rf %{buildroot}/usr/share/xemacs/%{version}/src/ +rm -rf %{buildroot}/usr/share/xemacs/%{version}/lib-src/ +rm -f %{buildroot}/usr/share/xemacs/%{version}/Installation ###################################################################### -test -L $RPM_BUILD_ROOT%{xbindir}/xemacs && \ - rm $RPM_BUILD_ROOT%{xbindir}/xemacs +test -L %{buildroot}%{xbindir}/xemacs && \ + rm %{buildroot}%{xbindir}/xemacs ver=%{version} -test -x $RPM_BUILD_ROOT%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} && \ - mv $RPM_BUILD_ROOT%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} $RPM_BUILD_ROOT%{xbindir}/xemacs -chmod 755 $RPM_BUILD_ROOT%{xbindir}/xemacs -rm -f $RPM_BUILD_ROOT%{xbindir}/xemacs-script -rm -rf $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/tests -for f in $RPM_BUILD_ROOT/usr/man/man1/*.1 \ - $RPM_BUILD_ROOT/usr/share/man/man1/*.1 \ - $RPM_BUILD_ROOT/usr/share/xemacs/info/*info* \ - $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/*.1 \ - $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/mule/*.1 +test -x %{buildroot}%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} && \ + mv %{buildroot}%{xbindir}/xemacs-${ver%%.*}-b${ver##*.} %{buildroot}%{xbindir}/xemacs +chmod 755 %{buildroot}%{xbindir}/xemacs +rm -f %{buildroot}%{xbindir}/xemacs-script +rm -rf %{buildroot}/usr/share/xemacs/%{version}/etc/tests +for f in %{buildroot}/usr/man/man1/*.1 \ + %{buildroot}/usr/share/man/man1/*.1 \ + %{buildroot}/usr/share/xemacs/info/*info* \ + %{buildroot}/usr/share/xemacs/%{version}/etc/*.1 \ + %{buildroot}/usr/share/xemacs/%{version}/etc/mule/*.1 do test "${f##*.}" = "gz" && continue test -e $f || continue gzip -9f $f done -find $RPM_BUILD_ROOT/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 $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/ -name '*.el.vm' | xargs -r rm -f +find %{buildroot}/usr/share/xemacs/%{version}/ -name '*.orig' | xargs -r rm -f +find %{buildroot}/usr/share/xemacs/%{version}/ -name '*.el.ediff' | 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 # b2m and rcs-checkin are in the emacs package. # As all binaries are in /usr/bin/ with X11R7, xemacs would conflict # with emacs if xemacs packaged b2m and rcs-checkin as well. # Therefore we remove them from the xemacs package here. # They are rarely needed anyway. -rm -f $RPM_BUILD_ROOT%{xbindir}/ctags \ - $RPM_BUILD_ROOT%{xbindir}/etags \ - $RPM_BUILD_ROOT%{xbindir}/b2m \ - $RPM_BUILD_ROOT%{xbindir}/rcs-checkin \ - $RPM_BUILD_ROOT/usr/share/man/man1/ctags.1.gz \ - $RPM_BUILD_ROOT/usr/share/man/man1/etags.1.gz \ - $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/ctags.1.gz \ - $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/etc/etags.1.gz +rm -f %{buildroot}%{xbindir}/ctags \ + %{buildroot}%{xbindir}/etags \ + %{buildroot}%{xbindir}/b2m \ + %{buildroot}%{xbindir}/rcs-checkin \ + %{buildroot}/usr/share/man/man1/ctags.1.gz \ + %{buildroot}/usr/share/man/man1/etags.1.gz \ + %{buildroot}/usr/share/xemacs/%{version}/etc/ctags.1.gz \ + %{buildroot}/usr/share/xemacs/%{version}/etc/etags.1.gz # Some .elc's are not needed: -find $RPM_BUILD_ROOT/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 $RPM_BUILD_ROOT/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 $RPM_BUILD_ROOT/usr/share/xemacs/%{version}/lisp/vm/vm.elc +find %{buildroot}/usr/share/xemacs/ -name '_pkg.elc' | xargs -r rm -f +find %{buildroot}/usr/share/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f +find %{buildroot}/usr/lib/xemacs/ -name 'auto-autoloads.el?' | xargs -r rm -f +rm -f %{buildroot}/usr/share/xemacs/%{version}/lisp/default.elc +rm -f %{buildroot}/usr/share/xemacs/%{version}/lisp/vm/vm.elc #if test -e /usr/share/xemacs/%{version}/lisp/xpm-button.el -a \ # -e /usr/share/xemacs/%{version}/lisp/xemacs-base/xpm-button.el #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 #fi # 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 -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 $RPM_BUILD_ROOT/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 %{buildroot}/usr/share/xemacs/%{version}/etc/${t##*/} && rm -f $t + test -e $t && mv $t %{buildroot}/usr/share/xemacs/%{version}/etc/${t##*/} done # install the standard app-defaults file used for all languages # which don't have their own app-defaults file above: -mkdir -p $RPM_BUILD_ROOT%{appdefdir}/app-defaults/ -install -m 644 etc/Emacs.ad $RPM_BUILD_ROOT%{appdefdir}/app-defaults/XEmacs +mkdir -p %{buildroot}%{appdefdir}/app-defaults/ +install -m 644 etc/Emacs.ad %{buildroot}%{appdefdir}/app-defaults/XEmacs # SuSE extension -install -m 0644 $RPM_SOURCE_DIR/site-start.el $RPM_BUILD_ROOT/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 site-packages/lisp/term/func-keys.el $RPM_BUILD_ROOT/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/xterm.el $RPM_BUILD_ROOT/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/kvt.el $RPM_BUILD_ROOT/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 -mkdir -p $RPM_BUILD_ROOT/%{_docdir}/xemacs -install -m 0644 suse/README.SuSE $RPM_BUILD_ROOT/%{_docdir}/xemacs/README.SuSE -ln -sf /usr/share/xemacs/%{version}/etc $RPM_BUILD_ROOT/%{_docdir}/xemacs/etc -mkdir -p $RPM_BUILD_ROOT/etc/skel/.xemacs -install -m 0644 $RPM_SOURCE_DIR/skel.init.el $RPM_BUILD_ROOT/etc/skel/.xemacs/init.el -%if %suse_version > 1020 -%fdupes $RPM_SOURCE_DIR/usr/share/xemacs -%endif +install -m 0644 %{_sourcedir}/site-start.el %{buildroot}/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 %{buildroot}/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 %{buildroot}/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 %{buildroot}/usr/share/xemacs/site-packages/lisp/term/ +./src/xemacs -batch -no-site-file -vanilla -f batch-byte-compile %{buildroot}/usr/share/xemacs/site-packages/lisp/term/*.el +mkdir -p %{buildroot}/%{_docdir}/xemacs +install -m 0644 suse/README.SuSE %{buildroot}/%{_docdir}/xemacs/README.SuSE +ln -sf /usr/share/xemacs/%{version}/etc %{buildroot}/%{_docdir}/xemacs/etc +mkdir -p %{buildroot}/etc/skel/.xemacs +install -m 0644 %{_sourcedir}/skel.init.el %{buildroot}/etc/skel/.xemacs/init.el +fdupes -q -r -1 %{buildroot}%{_datadir}/xemacs/%{version}/etc/ %{buildroot}%{_mandir}/man1/ |\ +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 +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: -RPM_BUILD_ROOT_REPLACEMENT=$(echo "$RPM_BUILD_ROOT" | tr '[:print:]' ' ') -for i in $(find $RPM_BUILD_ROOT -name "*.elc") +REPLACEMENT=$(echo "%{buildroot}" | tr '[:print:]' ' ') +for i in $(find %{buildroot} -name "*.elc") 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 # # 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 # gzip --best $i #done # -( find $RPM_BUILD_ROOT \ +( find %{buildroot} \ \( \( \( -not -type d \) -a \( -not -type l \) \) -printf '%%p\n' \) -o \ \( -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" | \ - sort -t /| uniq | perl -p -e "s|$RPM_BUILD_ROOT||" > xe-list -./src/xemacs -batch -no-site-file -l $RPM_SOURCE_DIR/xe-list.el -f xe-list-generate-list-files + sort -t /| uniq | perl -p -e "s|%{buildroot}||" > xe-list +./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 \ >> 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 # packages: -rm -rf $RPM_BUILD_ROOT/usr/lib/xemacs/%{version}/*-suse-linux/include/ +rm -rf %{buildroot}/usr/lib/xemacs/%{version}/*-suse-linux/include/ %post %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 %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 %defattr(-,root,root)