pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/36769: shells/zsh: malformed conditional in Makefile



>Number:         36769
>Category:       pkg
>Synopsis:       Subject: shells/zsh: malformed conditional in Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 10 18:30:00 +0000 2007
>Originator:     Yakovetsky Vladimir
>Release:        
>Environment:
System: Linux bres 2.6.21.5 #1 SMP Fri Jul 6 09:48:19 GMT 2007 i686 GNU/Linux
Architecture: i686

>Description:
if ZSH_STATIC=yes, and not defined MKDYNAMICROOT (default on non-netbsd system),
then shells/zsh fails to build.
(reason: malformed conditional in shells/zsh/Makefile.common:43)

>How-To-Repeat:
% uname -s
Linux
% cd /usr/pkgsrc/shells/zsh
% bmake ZSH_STATIC=yes
...
bmake: "../../shells/zsh/../../shells/zsh/Makefile.common" line 43: Malformed 
conditional (${OPSYS} == "NetBSD" && ${OBJECT_FMT} == "ELF" &&  
defined(MKDYNAMICROOT) && !empty(MKDYNAMICROOT:M[Yy][Ee][Ss]) &&  
exists(${NETBSD_SHLINKER}) && exists(${NETBSD_SHLIBDIR}))
bmake: "../../shells/zsh/../../shells/zsh/Makefile.common" line 57: if-less else
bmake: "../../shells/zsh/../../shells/zsh/Makefile.common" line 57: Need an 
operator
bmake: "../../shells/zsh/../../shells/zsh/Makefile.common" line 74: if-less 
endif
bmake: "../../shells/zsh/../../shells/zsh/Makefile.common" line 74: Need an 
operator
bmake: Fatal errors encountered -- cannot continue

bmake: stopped in /usr/pkgsrc/shells/zsh

>Fix:
--- shells/zsh/Makefile.common.orig
+++ shells/zsh/Makefile.common
@@ -39,8 +39,9 @@
 NETBSD_SHLIBDIR=       /lib
 
 .  if ${OPSYS} == "NetBSD" && ${OBJECT_FMT} == "ELF" && \
-      defined(MKDYNAMICROOT) && !empty(MKDYNAMICROOT:M[Yy][Ee][Ss]) && \
+      defined(MKDYNAMICROOT) && \
       exists(${NETBSD_SHLINKER}) && exists(${NETBSD_SHLIBDIR})
+.      if !empty(MKDYNAMICROOT:M[Yy][Ee][Ss])
 #
 # Built a dynamically linked "zsh" binary on NetBSD systems which use
 # dynamically linked binaries on the root filesystem. The binary will
@@ -51,6 +52,9 @@
 BUILDLINK_PASSTHRU_RPATHDIRS+= ${NETBSD_SHLIBDIR}
 
 LDFLAGS+=      -Wl,-dynamic-linker=${NETBSD_SHLINKER} -Wl,-R${NETBSD_SHLIBDIR}
+.      else
+LDFLAGS+=      -static
+.      endif
 .  else
 LDFLAGS+=      -static
 .  endif




Home | Main Index | Thread Index | Old Index