components/zsh/Makefile
branchs11-update
changeset 3021 b9308977c65b
parent 2434 6c9bb5cf5610
child 2131 0d756bc55cfb
equal deleted inserted replaced
3020:a14aae53a1c7 3021:b9308977c65b
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 
    26 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    27 include ../../make-rules/shared-targets.mk
    27 include ../../make-rules/shared-targets.mk
    28 
    28 
    29 COMPONENT_NAME=		zsh
    29 COMPONENT_NAME=		zsh
    30 COMPONENT_VERSION=	4.3.17
    30 COMPONENT_VERSION=	5.0.5
    31 COMPONENT_PROJECT_URL=	http://www.zsh.org/
    31 COMPONENT_PROJECT_URL=	http://www.zsh.org/
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    32 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
    33 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
    34 COMPONENT_ARCHIVE_HASH=	\
    34 COMPONENT_ARCHIVE_HASH=	\
    35     sha256:054e0452afd9c742c9f1489465175e1d4d7db50d88b602d132551d850cf7a704
    35     sha256:6624d2fb6c8fa4e044d2b009f86ed1617fe8583c83acfceba7ec82826cfa8eaf
    36 COMPONENT_ARCHIVE_URL=	http://downloads.sourceforge.net/project/zsh/zsh-dev/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
    36 COMPONENT_ARCHIVE_URL=	http://downloads.sourceforge.net/project/zsh/zsh/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
    37 COMPONENT_BUGDB=	utility/zsh
    37 COMPONENT_BUGDB=	utility/zsh
    38 
    38 
    39 include ../../make-rules/prep.mk
    39 include ../../make-rules/prep.mk
    40 include ../../make-rules/configure.mk
    40 include ../../make-rules/configure.mk
    41 include ../../make-rules/ips.mk
    41 include ../../make-rules/ips.mk
    42 
    42 
    43 CONFIGURE_OPTIONS += -n
    43 CONFIGURE_OPTIONS += -n
       
    44 CONFIGURE_OPTIONS += --bindir=/usr/bin
       
    45 CONFIGURE_OPTIONS += --libdir=/usr/lib
    44 CONFIGURE_OPTIONS += --enable-cppflags="$(CPP_LARGEFILES)"
    46 CONFIGURE_OPTIONS += --enable-cppflags="$(CPP_LARGEFILES)"
    45 CONFIGURE_OPTIONS += --enable-dynamic
    47 CONFIGURE_OPTIONS += --enable-dynamic
    46 CONFIGURE_OPTIONS += --enable-etcdir=/etc
    48 CONFIGURE_OPTIONS += --enable-etcdir=/etc
    47 CONFIGURE_OPTIONS += --enable-function-subdirs
    49 CONFIGURE_OPTIONS += --enable-function-subdirs
    48 CONFIGURE_OPTIONS += --enable-ldflags="-zignore"
    50 # Zsh uses the compiler to link, so we need to pass CC_BITS, not LD_BITS.
       
    51 CONFIGURE_OPTIONS += --enable-ldflags="$(CC_BITS) -zignore"
    49 CONFIGURE_OPTIONS += --enable-libs="-lnsl"
    52 CONFIGURE_OPTIONS += --enable-libs="-lnsl"
    50 CONFIGURE_OPTIONS += --enable-maildir-support
    53 CONFIGURE_OPTIONS += --enable-maildir-support
    51 CONFIGURE_OPTIONS += --enable-multibyte
    54 CONFIGURE_OPTIONS += --enable-multibyte
    52 CONFIGURE_OPTIONS += --enable-pcre
    55 CONFIGURE_OPTIONS += --enable-pcre
    53 CONFIGURE_OPTIONS += --with-tcsetpgrp
    56 CONFIGURE_OPTIONS += --with-tcsetpgrp
    54 CONFIGURE_OPTIONS += --disable-gdbm
    57 CONFIGURE_OPTIONS += --disable-gdbm
       
    58 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
    55 
    59 
    56 # pcre-config --libs unnecessarily emits "-L/usr/lib -R/usr/lib"; we remove it
    60 # pcre-config --libs unnecessarily emits "-R/usr/lib"; we remove it so that it
    57 # so that it doesn't end up in the binaries.
    61 # doesn't end up in the binaries.
    58 COMPONENT_POST_CONFIGURE_ACTION = \
    62 COMPONENT_POST_CONFIGURE_ACTION = \
    59 	(cd $(@D); \
    63 	(cd $(@D); \
    60 	sed -e 's,-L/usr/lib -R/usr/lib,,' \
    64 	sed -e 's,-R/usr/lib,,' \
    61 		config.status > config.status.new; \
    65 		config.status > config.status.new; \
    62 	mv config.status.new config.status; \
    66 	mv config.status.new config.status; \
    63 	chmod 755 config.status; \
    67 	chmod 755 config.status; \
    64 	./config.status)
    68 	./config.status)
    65 
    69 
    66 COMPOVERRIDES = $(shell find Completion -type f -print)
    70 COMPOVERRIDES = $(shell test -d find && find Completion -type f -print)
    67 
    71 
    68 $(PROTOETCDIR)/%: % $(PROTOETCDIR)
    72 $(PROTOETCDIR)/%: % $(PROTOETCDIR)
    69 	$(INS.file)
    73 	$(INS.file)
    70 
    74 
    71 $(PROTOETCDIR)/zprofile: $(PROTOETCDIR)
    75 $(PROTOETCDIR)/zprofile: $(PROTOETCDIR)
    74 # makepro.awk leaves turds behind when using gawk 3.1.5 and a UTF-8 locale.
    78 # makepro.awk leaves turds behind when using gawk 3.1.5 and a UTF-8 locale.
    75 # Upgrading gawk would fix the problem, but for now, all we can do is change
    79 # Upgrading gawk would fix the problem, but for now, all we can do is change
    76 # the language.
    80 # the language.
    77 COMPONENT_BUILD_ENV += LC_ALL=C
    81 COMPONENT_BUILD_ENV += LC_ALL=C
    78 
    82 
       
    83 # The configure test for NIS tests to make sure that NIS is working, not whether
       
    84 # it's available to compile against.  We actually want to go through the switch
       
    85 # in all cases, so we force it off, regardless of whether the build environment
       
    86 # has it enabled.
       
    87 CONFIGURE_ENV += zsh_cv_sys_nis=no
       
    88 
    79 $(COMPONENT_SRC)/Completion/%: Completion/%
    89 $(COMPONENT_SRC)/Completion/%: Completion/%
    80 	$(CP) $< $@
    90 	$(CP) $< $@
    81 
    91 
    82 $(COMPONENT_SRC)/LICENCE: prep
    92 $(COMPONENT_SRC)/LICENCE: prep
    83 
    93 
    84 license: $(COMPONENT_SRC)/LICENCE
    94 license: $(COMPONENT_SRC)/LICENCE
    85 	iconv -f 8859-1 -t utf-8 $< > $@
    95 	tail +13 $< > $@
    86 
    96 
    87 CLEAN_PATHS += license
    97 CLEAN_PATHS += license
    88 
    98 
       
    99 ASLR_MODE = $(ASLR_ENABLE)
       
   100 
    89 # common targets
   101 # common targets
    90 build:		$(BUILD_32) $(COMPOVERRIDES:%=$(COMPONENT_SRC)/%)
   102 build:		$(BUILD_64) $(COMPOVERRIDES:%=$(COMPONENT_SRC)/%)
    91 
   103 
    92 install:	build $(INSTALL_32) $(PROTOETCDIR)/zprofile $(PROTOETCDIR)/zshrc license
   104 install:	build $(INSTALL_64) $(PROTOETCDIR)/zprofile $(PROTOETCDIR)/zshrc license
    93 
   105 
    94 # build does this always
   106 # build does this always
    95 test:		$(TEST_32)
   107 test:		$(TEST_64)
    96 
   108 
    97 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
   109 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
    98 
   110 
    99 include ../../make-rules/depend.mk
   111 include ../../make-rules/depend.mk