From fcd1020dfe16ad24bcb6188c11db5f4e6f3454c9839989e3a1e52f755c731a79 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 24 Jan 2012 18:43:43 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=82 --- ksh.changes | 6 ++++++ ksh.spec | 10 ++++------ workaround-stupid-build-system.diff | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ksh.changes b/ksh.changes index 4fed802..10963b7 100644 --- a/ksh.changes +++ b/ksh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 24 18:42:48 UTC 2012 - werner@suse.de + +- Make ex really work that is vim is required for build otherwise + libpp API does not work correct + ------------------------------------------------------------------- Tue Jan 24 16:06:20 UTC 2012 - werner@suse.de diff --git a/ksh.spec b/ksh.spec index e98ba62..ba28c84 100644 --- a/ksh.spec +++ b/ksh.spec @@ -28,11 +28,7 @@ BuildRequires: update-alternatives %endif # /bin/ex and /bin/ed required for build BuildRequires: ed -%if %suse_version > 1020 -BuildRequires: vim-base -%else BuildRequires: vim -%endif Url: http://www.research.att.com/~gsf/download/ License: CPL-1.0 Group: System/Shells @@ -324,7 +320,6 @@ find -type f -a -name Mamfile | \ cflags -fPIC RPM_OPT_FLAGS cflags @$nobuiltin RPM_OPT_FLAGS cflags -fno-unwind-tables RPM_OPT_FLAGS - cflags -fno-reorder-blocks RPM_OPT_FLAGS cflags -fno-strict-aliasing RPM_OPT_FLAGS cflags -fno-zero-initialized-in-bss RPM_OPT_FLAGS cflags -fno-delete-null-pointer-checks RPM_OPT_FLAGS @@ -334,7 +329,10 @@ find -type f -a -name Mamfile | \ cflags -fsigned-bitfields RPM_OPT_FLAGS cflags -fsigned-chars RPM_OPT_FLAGS cflags -fsigned-zeros RPM_OPT_FLAGS - cflags -ftree-loop-linear RPM_OPT_FLAGS + case "$(gcc --version | head -n 1)" in + *4.3.*) cflags -fno-tree-sink RPM_OPT_FLAGS ;; + *4.6.*) cflags -ftree-loop-linear RPM_OPT_FLAGS ;; + esac cflags -g2 RPM_OPT_FLAGS cflags -pipe RPM_OPT_FLAGS cflags -Wl,-O2 LDFLAGS diff --git a/workaround-stupid-build-system.diff b/workaround-stupid-build-system.diff index f0fce82..014f3e0 100644 --- a/workaround-stupid-build-system.diff +++ b/workaround-stupid-build-system.diff @@ -262,3 +262,23 @@ setv SILENT setv TAR tar setv YACC yacc +--- src/lib/libpp/Mamfile ++++ src/lib/libpp/Mamfile 2012-01-24 18:31:21.979645513 +0000 +@@ -665,7 +665,7 @@ exec - . + exec - w + exec - q + exec - ! +-exec - ${CC} -o ${COTEMP}.exe 1.${COTEMP}.c ++exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -o ${COTEMP}.exe 1.${COTEMP}.c + exec - ./${COTEMP}.exe > pp.yacc + exec - rm -f 1.${COTEMP}.c ${COTEMP}.exe + done pp.yacc generated +@@ -707,7 +707,7 @@ exec - . + exec - w + exec - q + exec - ! +-exec - ${CC} -o ${COTEMP}.exe 1.${COTEMP}.c ++exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -o ${COTEMP}.exe 1.${COTEMP}.c + exec - ./${COTEMP}.exe > ppkey.yacc + exec - rm -f 1.${COTEMP}.c ${COTEMP}.exe + done ppkey.yacc generated