components/pinentry/Makefile
author XINGSZHA <erich.zhang@oracle.com>
Thu, 30 Jan 2014 13:34:06 -0800
changeset 1678 68d1cdc71760
parent 1058 34d7aaa03423
child 1724 c2416ec0de64
child 3661 47545fb8aed4
permissions -rw-r--r--
18141171 gnupg, libidn, nmap, openexr, pinentry and rtorrent need ASLR enabled.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    12
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    18
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    20
#
1678
68d1cdc71760 18141171 gnupg, libidn, nmap, openexr, pinentry and rtorrent need ASLR enabled.
XINGSZHA <erich.zhang@oracle.com>
parents: 1058
diff changeset
    21
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    22
#
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    24
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    25
PATH = /usr/gnu/bin:/usr/bin
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    26
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    27
COMPONENT_NAME=		pinentry
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    28
COMPONENT_VERSION=	0.7.6
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://www.gnupg.org/related_software/pinentry/
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 303
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 303
diff changeset
    33
    sha256:14670c18f4a042ffcbd7a937aa3f15de392816c56b472588383d8378f65b42ab
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	ftp://ftp.gnupg.org/gcrypt/pinentry/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 802
diff changeset
    35
COMPONENT_BUGDB=	utility/gnupg
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    36
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/prep.mk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    38
include ../../make-rules/configure.mk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    39
include ../../make-rules/ips.mk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    40
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    41
PATCH_LEVEL = 0
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    42
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    43
# Enable C99 mode + -Xc for its additional warnings.
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    44
studio_C99MODE = -Xc $(studio_C99_ENABLE)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    45
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    46
# -xinline=%auto -- we like inlining where appropriate
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    47
CFLAGS += -xinline=%auto
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    48
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    49
# -xbuiltin=%none -- builtins have been known to be buggy
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    50
CFLAGS += -xbuiltin=%none
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    51
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    52
# void function cannot return value, unless it's GNU C
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    53
CFLAGS += -features=extinl,extensions
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    54
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    55
CFLAGS += $(CPP_LARGEFILES)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    56
CFLAGS += $(XPG6MODE)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    57
CFLAGS += $(CPP_POSIX)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    58
CFLAGS += $(CPP_C99_EXTENDED_MATH)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    59
CFLAGS += $(studio_PIC)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    60
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    61
# prevent libtool from removing these
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    62
LDFLAGS += -lsocket -lnsl -lpkcs11
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    63
LIBS = -lsocket -lnsl -lpkcs11
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    64
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    65
CONFIGURE_ENV +=	CFLAGS="$(CFLAGS)"
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    66
CONFIGURE_ENV +=	LDFLAGS="$(LDFLAGS)"
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    67
CONFIGURE_ENV +=	INSTALL="$(INSTALL)"
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    68
CONFIGURE_ENV +=	LIBS="$(LIBS)"
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    69
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    70
CONFIGURE_OPTIONS  +=		--localstatedir=/var
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    71
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    72
CONFIGURE_OPTIONS  +=		--enable-pinentry-curses
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    73
CONFIGURE_OPTIONS  +=		--enable-pinentry-gtk2
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    74
CONFIGURE_OPTIONS  +=		--disable-glibtest
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    75
CONFIGURE_OPTIONS  +=		--disable-gtktest
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    76
CONFIGURE_OPTIONS  +=		--enable-threading
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    77
CONFIGURE_OPTIONS  +=		--disable-pinentry-gtk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    78
CONFIGURE_OPTIONS  +=		--disable-pinentry-qt
802
7d506270af98 7165258 curses, foiled again
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 800
diff changeset
    79
CONFIGURE_OPTIONS  +=		--disable-ncurses
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    80
1678
68d1cdc71760 18141171 gnupg, libidn, nmap, openexr, pinentry and rtorrent need ASLR enabled.
XINGSZHA <erich.zhang@oracle.com>
parents: 1058
diff changeset
    81
ASLR_MODE = $(ASLR_ENABLE)
68d1cdc71760 18141171 gnupg, libidn, nmap, openexr, pinentry and rtorrent need ASLR enabled.
XINGSZHA <erich.zhang@oracle.com>
parents: 1058
diff changeset
    82
303
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    83
build: $(BUILD_32)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    84
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    85
install: $(INSTALL_32)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    86
	$(MKDIR) $(PROTOUSRLIBDIR)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    87
	if test -f $(PROTOUSRBINDIR)/pinentry-curses ; then \
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    88
	$(MV) $(PROTOUSRBINDIR)/pinentry-curses $(PROTOUSRLIBDIR)/ ; fi
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    89
	if test -f $(PROTOUSRBINDIR)/pinentry-gtk-2 ; then \
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    90
	$(MV) $(PROTOUSRBINDIR)/pinentry-gtk-2 $(PROTOUSRLIBDIR)/ ; fi
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    91
	cd $(PROTOUSRLIBDIR) && ln -sf pinentry-gtk-2 pinentry
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    92
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    93
test: $(NO_TESTS)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    94
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    95
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    96
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    97
include ../../make-rules/depend.mk
cae844b2d132 7050043 GnuPG && friends to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    98