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]
23 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2020, Michal Nowak
25 # Copyright (c) 2021, Nona Hansel
28 USE_PARALLEL_BUILD
= yes
29 include ..
/..
/..
/make-rules
/shared-macros.mk
32 COMPONENT_VERSION
= 2.47.1
33 COMPONENT_SUMMARY
= git
- Fast Version Control System
34 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.
35 COMPONENT_PROJECT_URL
= https
://git-scm.com
/
36 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
37 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
38 COMPONENT_ARCHIVE_HASH
= sha256
:f3d8f9bb23ae392374e91cd9d395970dabc5b9c5ee72f39884613cd84a6ed310
39 COMPONENT_ARCHIVE_URL
= https
://www.kernel.org
/pub
/software
/scm
/git
/$(COMPONENT_ARCHIVE
)
40 COMPONENT_FMRI
= developer
/versioning
/git
41 COMPONENT_CLASSIFICATION
= Development
/Source Code Management
42 COMPONENT_LICENSE
= GPL-2.0
-only
43 COMPONENT_LICENSE_FILE
= COPYING
46 # man pages are a separate archive
48 COMPONENT_ARCHIVE_1
= $(COMPONENT_NAME
)-manpages-
$(COMPONENT_VERSION
).
tar.xz
49 COMPONENT_ARCHIVE_HASH_1
= sha256
:ffc2005a89b056c0727b667f6beda0068371619762ea4844ad0229091befee13
50 COMPONENT_ARCHIVE_URL_1
= https
://www.kernel.org
/pub
/software
/scm
/git
/$(COMPONENT_ARCHIVE_1
)
52 include $(WS_MAKE_RULES
)/common.mk
54 # https://www.illumos.org/issues/16566
59 CONFIGURE_OPTIONS
+= --with-libpcre2
60 CONFIGURE_OPTIONS
+= --with-perl
=$(PERL
)
61 CONFIGURE_OPTIONS
+= --with-python
=$(PYTHON
)
62 CONFIGURE_OPTIONS
+= LDFLAGS
=-L
$(OPENSSL_LIBDIR
)
63 CONFIGURE_OPTIONS
+= CPPFLAGS
="-I/usr/include/pcre -I$(OPENSSL_INCDIR)"
65 COMPONENT_BUILD_ENV
+= NO_PERL_MAKEMAKER
=1
66 COMPONENT_BUILD_ENV
+= V
=1
67 COMPONENT_INSTALL_ENV
+= NO_PERL_MAKEMAKER
=1
69 PKG_MACROS
+= PERLVER
=$(PERL_VERSION
)
71 # This runs configure but configure doesn't generate a Makefile.
72 # Instead a Makefile comes with git.
73 # Anyways viewpathing doesn't work.
74 # Therefore we need cloney to copy a set of files to build.
75 # Overwrite symlinked tests, because they are 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
/libexec
/git-core
/git
81 PKG_HARDLINKS
+= usr
/libexec
/git-core
/git-cvsserver
82 PKG_HARDLINKS
+= usr
/libexec
/git-core
/git-gui
83 PKG_HARDLINKS
+= usr
/libexec
/git-core
/git-remote-ftps
84 PKG_HARDLINKS
+= usr
/libexec
/git-core
/git-shell
85 PKG_HARDLINKS
+= usr
/libexec
/git-core
/scalar
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
+= perllibdir
=$(shell $(PERL
) -MConfig
-e
'print "$$Config{installvendorarch}"')
93 COMPONENT_INSTALL_ARGS
+= VENDORPREFIX
=$(shell $(PERL
) -MConfig
-e
'print "$$Config{installvendorlib}"')
94 COMPONENT_INSTALL_ARGS
+= PERLPREFIX
=$(shell $(PERL
) -MConfig
-e
'print "$$Config{installvendorarch}"')
95 COMPONENT_INSTALL_ARGS
+= INSTALLVENDORLIB
=$(shell $(PERL
) -MConfig
-e
'print "$$Config{installvendorlib}"')
97 COMPONENT_TEST_ENV
+= LC_ALL
=C.UTF-8
98 # Create predictable test environment - see git(1)
99 COMPONENT_TEST_ENV
+= GIT_CONFIG_GLOBAL
=/dev
/null
100 COMPONENT_TEST_ENV
+= GIT_CONFIG_NOSYSTEM
=true
102 # many failures; keep going; later versions of git are much cleaner
103 COMPONENT_TEST_ARGS
+= -k
-i
104 # Run tests in parallel by default
105 GITTEST_JOBS ?
= $(PARALLEL_JOBS
)
106 COMPONENT_TEST_ARGS
+= $(if
$(GITTEST_JOBS
),-j
$(GITTEST_JOBS
),)
107 COMPONENT_TEST_TARGETS
= test
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 PATH
="$(PATH)" $(GMAKE
) -s aggregate-results
) &> $(COMPONENT_TEST_OUTPUT
) ;
120 # These man pages come in a separate archive with no Makefile
121 # and Solaris likes some of them moved around hence we'll just
122 # do it manually here.
123 $(BUILD_DIR
)/.manpages
:
124 cd
$(BUILD_DIR
) ; $(UNPACK
) $(UNPACK_ARGS
) $(USERLAND_ARCHIVES
)$(COMPONENT_ARCHIVE_1
)
125 $(MKDIR
) $(PROTOUSRSHAREMAN1DIR
)
126 $(MKDIR
) $(PROTOUSRSHAREMAN4DIR
)
127 $(MKDIR
) $(PROTOUSRSHAREMAN5DIR
)
128 cd
$(BUILD_DIR
) ; for manfile in man
*/* ; \
130 filename
=`basename $$manfile`; \
131 fname
=$${filename
%.
*}; \
132 ext
=$${filename
##*.}; \
134 if
[ $$ext = 5 ]; then newext
=4; fi
; \
135 if
[ $$ext = 7 ]; then newext
=5; fi
; \
136 $(GSED
) -e
's/\\m\[blue\]//g' -e
's/\\m\[\]//g' \
137 -e
's/"5"/"4"/' -e
's/(5)/(4)/g' \
138 -e
's/"7"/"5"/' -e
's/(7)/(5)/g' $$manfile > \
139 $(PROTOUSRSHAREMANDIR
)/man
$$newext/$$fname.
$$newext; \
143 $(BUILD_DIR_64
)/.contrib
: $(BUILD_DIR_64
)/.contrib-subtree
144 $(MKDIR
) $(PROTOUSRSHAREDIR
)/bash-completion
/completions
145 PATH
="$(PATH)" $(GMAKE
) -C
$(BUILD_DIR_64
)/contrib
/diff-highlight
146 $(CP
) -RLp
$(BUILD_DIR_64
)/contrib
/diff-highlight
/diff-highlight
$(PROTOUSRBINDIR
)/diff-highlight
147 $(CP
) -RLp
$(BUILD_DIR_64
)/contrib
/completion
/git-completion.bash
$(PROTOUSRSHAREDIR
)/bash-completion
/completions
/git
148 (cd
$(PROTOUSRSHAREDIR
)/bash-completion
/completions
; $(LN
) -sf git gitk
)
151 # Install steps taken from contrib/subtree/INSTALL
152 $(BUILD_DIR_64
)/.contrib-subtree
:
153 PATH
="$(PATH)" $(GMAKE
) -C
$(BUILD_DIR_64
)/contrib
/subtree DESTDIR
=$(PROTO_DIR
)
154 PATH
="$(PATH)" $(GMAKE
) -C
$(BUILD_DIR_64
)/contrib
/subtree DESTDIR
=$(PROTO_DIR
) install
155 PATH
="$(PATH)" $(GMAKE
) -C
$(BUILD_DIR_64
)/contrib
/subtree DESTDIR
=$(PROTO_DIR
) install-doc
158 install: $(INSTALL_64
) $(BUILD_DIR
)/.manpages
$(BUILD_DIR_64
)/.contrib
161 TEST_REQUIRED_PACKAGES
+= developer
/fakeroot
162 TEST_REQUIRED_PACKAGES
+= developer
/versioning
/cvs
163 TEST_REQUIRED_PACKAGES
+= system
/library
/iconv
/extra
164 TEST_REQUIRED_PACKAGES
+= system
/library
/iconv
/unicode
165 TEST_REQUIRED_PACKAGES
+= system
/library
/iconv
/utf-8
166 TEST_REQUIRED_PACKAGES
+= library
/perl-5
/subversion
167 TEST_REQUIRED_PACKAGES
+= locale
/is
168 TEST_REQUIRED_PACKAGES
+= locale
/is-extra
169 TEST_REQUIRED_PACKAGES.perl
+= library
/perl-5
/cgi
170 TEST_REQUIRED_PACKAGES.perl
+= library
/perl-5
/dbi
171 TEST_REQUIRED_PACKAGES.perl
+= library
/perl-5
/dbd-sqlite
172 TEST_REQUIRED_PACKAGES.perl
+= library
/perl-5
/html-parser
173 # The check for the TTY prereq needs IO::Pty.
174 # See t/lib-terminal.sh and t/test-terminal.perl.
175 # The IO::Pty module is in the io-tty package.
176 TEST_REQUIRED_PACKAGES.perl
+= library
/perl-5
/io-tty
178 # Needed to generate git-subtree documentation
179 REQUIRED_PACKAGES
+= text
/asciidoc
180 REQUIRED_PACKAGES
+= text
/xmlto
182 # As long as we disabled pkgdepend on git-p4 we need to add this manually:
183 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
185 # Auto-generated dependencies
186 PERL_REQUIRED_PACKAGES
+= runtime
/perl
187 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
188 REQUIRED_PACKAGES
+= library
/expat
189 REQUIRED_PACKAGES
+= library
/pcre2
190 REQUIRED_PACKAGES
+= library
/zlib
191 REQUIRED_PACKAGES
+= runtime
/perl
192 REQUIRED_PACKAGES
+= shell/bash
193 REQUIRED_PACKAGES
+= shell/ksh93
194 REQUIRED_PACKAGES
+= system
/library
195 REQUIRED_PACKAGES
+= web
/curl