4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
21 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
23 include ..
/..
/..
/make-rules
/shared-macros.mk
26 COMPONENT_VERSION
= 2.12.3
27 COMPONENT_PROJECT_URL
= https
://git-scm.com
/
28 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
29 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
30 COMPONENT_ARCHIVE_HASH
= sha256
:016124c54ce2db7a4c2bd26b0de21fbf8f6bcaee04842aa221c7243141df4e42
31 COMPONENT_ARCHIVE_URL
= https
://www.kernel.org
/pub
/software
/scm
/git
/$(COMPONENT_ARCHIVE
)
32 COMPONENT_BUGDB
= utility
/git
33 COMPONENT_FMRI
= developer
/versioning
/git
34 COMPONENT_LICENSE
= GPLv2
35 COMPONENT_LICENSE_FILE
= git.license
36 COMPONENT_SUMMARY
= git
- Fast Version Control System
37 COMPONENT_DESCRIPTION
= Git is a free
& open source
, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
38 COMPONENT_CLASSIFICATION
= Development
/Source Code Management
41 # man pages are a separate archive
43 COMPONENT_ARCHIVE_1
= $(COMPONENT_NAME
)-manpages-
$(COMPONENT_VERSION
).
tar.xz
44 COMPONENT_ARCHIVE_HASH_1
= sha256
:61c3052f80c27526b71b1dbc2563323b31332b64425fc47387f694538538bec2
45 COMPONENT_ARCHIVE_URL_1
= https
://www.kernel.org
/pub
/software
/scm
/git
/$(COMPONENT_ARCHIVE_1
)
47 include $(WS_MAKE_RULES
)/prep.mk
48 include $(WS_MAKE_RULES
)/configure.mk
49 include $(WS_MAKE_RULES
)/ips.mk
51 LDFLAGS
+= -lnsl
-lsocket
53 CONFIGURE_BINDIR
.64 = $(CONFIGURE_BINDIR
.32)
54 CONFIGURE_LIBDIR
.64 = $(CONFIGURE_PREFIX
)/lib
56 CONFIGURE_PREFIX
= /usr
57 CONFIGURE_OPTIONS
+= --with-libpcre
58 CONFIGURE_OPTIONS
+= --without-openssl
59 CONFIGURE_OPTIONS
+= --libexecdir
=/usr
/lib
60 CONFIGURE_OPTIONS
+= --with-perl
=$(PERL
)
61 CONFIGURE_OPTIONS
+= --with-perl
=$(PERL
)
62 CONFIGURE_OPTIONS
+= --without-tcltk
63 CONFIGURE_OPTIONS
+= CPPFLAGS
="-I/usr/include/pcre"
65 COMPONENT_BUILD_ENV
+= NO_PERL_MAKEMAKER
=1
66 COMPONENT_INSTALL_ENV
+= NO_PERL_MAKEMAKER
=1
67 COMPONENT_INSTALL_ENV
+= PERL_LIB
=$(shell $(PERL
) -MConfig
-e
'print "$$Config{installvendorarch}"')
68 COMPONENT_INSTALL_ARGS
+= INSTALL
="$(INSTALL)"
70 # This runs configure but configure doesn't generate a Makefile.
71 # Instead a Makefile comes with git.
72 # Anyways viewpathing doesn't work.
73 # Therefore we need cloney to copy a set of files to build.
74 # Overwrite symliked tests, because they relying on test assets being regular files.
76 COMPONENT_PRE_CONFIGURE_ACTION
= \
77 (chmod u
+x
$(COMPONENT_SRC
)/t
/*.sh
&& $(CLONEY
) $(SOURCE_DIR
) $(@D
) && \
78 $(RM
) -r
$(@D
)/t
&& $(CP
) -rp
$(COMPONENT_SRC
)/t
$(@D
))
80 PKG_HARDLINKS
+= usr
/lib
/git-core
/git
81 PKG_HARDLINKS
+= usr
/lib
/git-core
/git-cvsserver
82 PKG_HARDLINKS
+= usr
/lib
/git-core
/git-gui
83 PKG_HARDLINKS
+= usr
/lib
/git-core
/git-remote-ftps
84 PKG_HARDLINKS
+= usr
/lib
/git-core
/git-shell
85 PKG_HARDLINKS
+= usr
/lib
/git-core
/git-upload-pack
87 # We want the perl modules to install the vendor_perl directory, and their
88 # manpages to install in the normal perl manpage directory, but the default
89 # behavior is to put the modules in /usr/lib. Setting these four variables
90 # massages the perl to get files to go where we want.
91 COMPONENT_INSTALL_ARGS
+= INSTALL
="$(INSTALL)"
92 COMPONENT_INSTALL_ARGS
+= VENDORPREFIX
=$(call PERL_CONFIG
,installvendorlib
)
93 COMPONENT_INSTALL_ARGS
+= PERLPREFIX
=$(call PERL_CONFIG
,installprefix
)
94 COMPONENT_INSTALL_ARGS
+= INSTALLVENDORLIB
='$$(VENDORPREFIX)'
95 COMPONENT_INSTALL_ARGS
+= INSTALLVENDORMAN3DIR
='$$(INSTALLMAN3DIR)'
97 # Some tests (like t9402-git-cvsserver-refs.sh) need GNU diff.
98 COMPONENT_TEST_ENV
+= PATH
="$(GNUBIN):$(PATH)"
100 # many failures; keep going; later versions of git are much cleaner
101 COMPONENT_TEST_ARGS
+= -k
-i
102 # If GITTEST_JOBS is set, then run the jobs in parallel (to that number)
103 COMPONENT_TEST_ARGS
+= $(if
$(GITTEST_JOBS
),-j
$(GITTEST_JOBS
),)
104 COMPONENT_TEST_TARGETS
= test
105 # Enable tests requiring Apache
106 COMPONENT_TEST_TARGETS
+= LIB_HTTPD_PATH
=/usr
/apache2
/2.4/bin
/httpd
107 COMPONENT_TEST_TARGETS
+= LIB_HTTPD_MODULE_PATH
=/usr
/apache2
/2.4/libexec
108 # Put each test result in a file; necessary if jobs run in parallel
109 COMPONENT_TEST_TARGETS
+= GIT_TEST_OPTS
=--tee
110 COMPONENT_TEST_TARGETS
+= DEFAULT_TEST_TARGET
=test-noclean
111 # Compile the test results and put that into the test output file instead
112 COMPONENT_POST_TEST_ACTION
= \
113 (cd
$(COMPONENT_TEST_DIR
)/t
/test-results
; for i in
*.out
; do \
114 echo
"*** $${i%.out}.sh ***"; \
118 $(GMAKE
) -s aggregate-results
) &> $(COMPONENT_TEST_OUTPUT
)
121 # These man pages come in a separate archive with no Makefile
122 # and Solaris likes some of them moved around hence we'll just
123 # do it manually here.
125 $(BUILD_DIR
)/.manpages
:
126 cd
$(BUILD_DIR
) ; $(UNPACK
) $(UNPACK_ARGS
) $(USERLAND_ARCHIVES
)$(COMPONENT_ARCHIVE_1
)
127 $(MKDIR
) $(PROTOUSRSHAREMAN1DIR
)
128 $(MKDIR
) $(PROTOUSRSHAREMAN4DIR
)
129 $(MKDIR
) $(PROTOUSRSHAREMAN5DIR
)
130 cd
$(BUILD_DIR
) ; for manfile in man
*/* ; \
132 filename
=`basename $$manfile`; \
133 fname
=$${filename
%.
*}; \
134 ext
=$${filename
##*.}; \
136 if
[ $$ext = 5 ]; then newext
=4; fi
; \
137 if
[ $$ext = 7 ]; then newext
=5; fi
; \
138 $(GSED
) -e
's/\\m\[blue\]//g' -e
's/\\m\[\]//g' \
139 -e
's/"5"/"4"/' -e
's/(5)/(4)/g' \
140 -e
's/"7"/"5"/' -e
's/(7)/(5)/g' $$manfile > \
141 $(PROTOUSRSHAREMANDIR
)/man
$$newext/$$fname.
$$newext; \
145 $(BUILD_DIR_64
)/.contrib
:
146 $(MKDIR
) $(PROTOUSRSHAREDIR
)/bash-completion
/completions
147 $(CP
) -RLp
$(BUILD_DIR_64
)/contrib
/diff-highlight
/diff-highlight
$(PROTOUSRBINDIR
)/diff-highlight
148 $(CP
) -RLp
$(BUILD_DIR_64
)/contrib
/completion
/git-completion.bash
$(PROTOUSRSHAREDIR
)/bash-completion
/completions
/git
149 (cd
$(PROTOUSRSHAREDIR
)/bash-completion
/completions
; $(LN
) -sf git gitk
)
154 install: $(INSTALL_64
) $(BUILD_DIR
)/.manpages
$(BUILD_DIR_64
)/.contrib
158 REQUIRED_PACKAGES
+= SUNWcs
159 REQUIRED_PACKAGES
+= library
/expat
160 REQUIRED_PACKAGES
+= library
/pcre
161 REQUIRED_PACKAGES
+= library
/zlib
162 REQUIRED_PACKAGES
+= runtime
/perl-522
163 REQUIRED_PACKAGES
+= runtime
/python-27
164 REQUIRED_PACKAGES
+= shell/bash
165 REQUIRED_PACKAGES
+= system
/library
166 REQUIRED_PACKAGES
+= web
/curl