Add files from parent branch HEAD:
[pkgsrc.git] / shells / zsh / hacks.mk
1 .if !defined(ZSH_HACKS_MK)
2 ZSH_HACKS_MK= defined
3
4 ### [Sun Dec 21 02:00:19 JST 2008 : uebayasi]
5 ### Built a dynamically linked "zsh" binary on NetBSD systems which use
6 ### dynamically linked binaries on the root filesystem. The binary will
7 ### only depend on the run-time link-editor and shared libraries on the
8 ### root filesystem. We use "-rpath" below by purpose because the
9 ### buildlink 3 framework won't filter it out.
10 NETBSD_SHLINKER=        /libexec/ld.elf_so      # XXX move elsewhere
11 NETBSD_SHLIBDIR=        /lib                    # XXX move elsewhere
12 .if ${OPSYS} == "NetBSD" && \
13       defined(OBJECT_FMT) && ${OBJECT_FMT} == "ELF" && \
14       defined(MKDYNAMICROOT) && ${MKDYNAMICROOT} != "no" && \
15       defined(NETBSD_SHLINKER) && exists(${NETBSD_SHLINKER}) && \
16       defined(NETBSD_SHLIBDIR) && exists(${NETBSD_SHLIBDIR})
17 PKG_HACKS+=     static-dynamic
18 _ZSH_LINKAGE.static.BUILDLINK_PASSTHRU_RPATHDIRS=       ${NETBSD_SHLIBDIR}
19 _ZSH_LINKAGE.static.LDFLAGS=    -Wl,-dynamic-linker=${NETBSD_SHLINKER} -Wl,-R${NETBSD_SHLIBDIR}
20 .endif
21
22 .endif  # ZSH_HACKS_MK