ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/devel/subversion/Makefile
Revision: 22891
Committed: Wed Oct 4 15:48:22 2017 UTC (6 years, 6 months ago) by laffer1
File size: 7257 byte(s)
Log Message:
fix some build issues.

File Contents

# Content
1 # $MidnightBSD$
2 # $FreeBSD: head/devel/subversion/Makefile 445440 2017-07-10 15:59:30Z lev $
3
4 #PORTREVISION= 0
5
6 MAINTAINER= ports@MidnightBSD.org
7 COMMENT= Version control system
8
9 CONFLICTS_INSTALL= subversion-1.[^9].[0-9]* \
10 subversion1[^9]-1.[^9].[0-9]*
11
12 USE_RC_SUBR= svnserve
13
14 PORTDOCS= BUGS CHANGES COMMITTERS INSTALL README
15
16 OPTIONS_DEFINE= \
17 BDB \
18 DOCS \
19 MAINTAINER_DEBUG\
20 NLS \
21 SASL \
22 SERF \
23 STATIC \
24 SVNSERVE_WRAPPER\
25 TEST \
26 TOOLS
27
28 OPTIONS_DEFAULT= SERF TOOLS
29
30 MAINTAINER_DEBUG_DESC= Build debug version
31 SERF_DESC= WebDAV/Delta-V (HTTP/HTTPS) repo access module
32 STATIC_DESC= Build static version (no shared libs)
33 SVNSERVE_WRAPPER_DESC= Enable svnserve wrapper (umask setter)
34 TEST_DESC= Run subversion test suite
35 TOOLS_DESC= Install several tools
36
37 # Patches required for use with the FreeBSD Project repository only
38 SVNSERVE_WRAPPER_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-svnserve-wrapper
39
40 USES+= shebangfix
41 python_CMD= ${LOCALBASE}/bin/python2
42 python_OLD_CMD+= "/bin/env python"
43 SHEBANG_REGEX= ./tools/.*
44
45 .include "Makefile.common"
46
47 SVNREPOS?= /home/svn/repos
48 SVNFSTYPE?= fsfs
49 SVNGROUP?= svn
50 SVNUSER?= svn
51
52 CONFIGURE_ARGS+= --without-gnome-keyring \
53 --without-kwallet \
54 --with-apxs=no
55
56 .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER}
57 SUB_LIST+= SVNSERVE_BIN_EXT=".bin"
58 PLIST_SUB+= NO_SVNSERVE_WRAPPER="@comment "
59 .else
60 SUB_LIST+= SVNSERVE_BIN_EXT=""
61 PLIST_SUB+= NO_SVNSERVE_WRAPPER=""
62 .endif
63
64 .if ${PORT_OPTIONS:MTEST}
65 TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3
66 .endif
67
68 .if ${PORT_OPTIONS:MSTATIC}
69 . if ${PORT_OPTIONS:MNLS}
70 USES+= gettext-tools
71 . endif
72 . if ${PORT_OPTIONS:MBDB}
73 BDB_BUILD_DEPENDS= yes
74 . endif
75 OLD_LIB_DEPENDS:= ${LIB_DEPENDS:S!^!${LOCALBASE}/lib/!:C!(\.so|\.[0-9]+)?:!.a:!}
76 BUILD_DEPENDS+= ${OLD_LIB_DEPENDS}
77 LIB_DEPENDS=
78 .endif
79
80 .if ${PORT_OPTIONS:MBDB}
81 CONFIGURE_ARGS+= --enable-bdb6
82 .else
83 CONFIGURE_ARGS+= --without-berkeley-db
84 .endif
85
86 .if make(repository)
87 WITH_REPOSITORY_CREATION= yes
88 .endif
89
90 .if defined(WITH_REPOSITORY_CREATION)
91 MKREPOS_TARGET= _mkrepos
92 .endif
93
94 pre-everything::
95 @${ECHO_MSG} ""
96 .if defined(WITH_REPOSITORY_CREATION)
97 @${ECHO_MSG} "I will create (or use, if it exists) '${SVNUSER}' user and '${SVNGROUP}' group."
98 @${ECHO_MSG} "Make sure that all committers are its members."
99 @${ECHO_MSG} ""
100 @${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with user '${SVNUSER}' and group '${SVNGROUP}'."
101 @${ECHO_MSG} "Type of repository will be '${SVNFSTYPE}'."
102 @${ECHO_MSG} "You could change these settings by defining SVNREPOS, SVNGROUP and SVNFSTYPE."
103 .else
104 @${ECHO_MSG} "You can have the repository created for you by defining"
105 @${ECHO_MSG} "WITH_REPOSITORY_CREATION."
106 @${ECHO_MSG} ""
107 @${ECHO_MSG} "Make sure that:"
108 @${ECHO_MSG} "* all your svn users are members of a common group"
109 @${ECHO_MSG} "* this group is the group id of the db/ and locks/"
110 @${ECHO_MSG} " subdirectories of your repository"
111 @${ECHO_MSG} "* the above subdirectories are writable by this group"
112 .endif
113
114 @${ECHO_MSG} ""
115 .if ${PORT_OPTIONS:MSTATIC}
116 @${ECHO_MSG} "Static binaries will be built."
117 .endif # STATIC
118 @${ECHO_MSG} "Many useful scripts will be installed into ${DATADIR}"
119
120 pre-configure:
121 .if ${PORT_OPTIONS:MBDB}
122 @BDB_VERSION=`${APR_APU_DIR}/${APU_CONFIG} --db-version`; \
123 if [ "$${BDB_VERSION}" != "4" -a "$${BDB_VERSION}" != "5" -a "$${BDB_VERSION}" != "6" ] ; then \
124 ${ECHO_MSG} "" ; \
125 ${ECHO_MSG} 'You should build `'"devel/apr1' with Berkeley DB (4, 5 or 6) support to use subversion with it." ; \
126 ${ECHO_MSG} 'Please rebuild `'"devel/apr1' with option "'`'"BDB' and try again." ; \
127 ${ECHO_MSG} "" ; \
128 ${ECHO_MSG} "Or you can disable Berkeley DB support. Only 'fs' repository backend will be available." ; \
129 ${ECHO_MSG} "" ; \
130 ${FALSE} ; \
131 fi
132 .endif
133 .if ${PORT_OPTIONS:MSTATIC}
134 @if ${GREP} -q ucol_close /usr/lib/libsqlite3.a ; then \
135 ${ECHO_MSG} "" ; \
136 ${ECHO_MSG} "You can not build static subversion if your SQLite3 is built with ICU enabled."; \
137 ${ECHO_MSG} "Please, reinstall 'devel/sqlite3' port with disabled ICU support."; \
138 ${ECHO_MSG} "" ; \
139 ${FALSE} ; \
140 fi
141 .endif
142
143 post-configure:
144 # Enable GNOME Keyring / KWallet support in main code, as it is harmless
145 @${REINPLACE_CMD} -E 's%.*#undef SVN_HAVE_(GNOME_KEYRING|KWALLET).*%#define SVN_HAVE_\1 1%' ${WRKSRC}/subversion/svn_private_config.h
146 # ugly hack: save tools directory so we don't have to cleanup before installing
147 @${CP} -R ${WRKSRC}/tools ${WRKSRC}/tools.examples
148 @${CHMOD} -R a-st,o+rX ${WRKSRC}/tools.examples
149
150 # takes a long time, and will fail but gives maintainer a good oversight
151 .if ${PORT_OPTIONS:MTEST}
152 test: build
153 -@make check -C ${WRKSRC}
154 .endif
155
156 post-build:
157 ${MAKE} -C ${WRKSRC} tools ${MAKE_ARGS}
158
159 post-install: ${MKREPOS_TARGET}
160 -@${STRIP_CMD} ${PREFIX}/bin/*
161 @${MKDIR} ${DATADIR}
162 (cd ${WRKSRC}/tools.examples && ${TAR} --exclude '*.in' -cf - * | ${TAR} -C ${DATADIR} -xof - )
163 @${MKDIR} ${DOCSDIR}
164 ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
165
166 .if ${PORT_OPTIONS:MSTATIC}
167
168 .else
169 -@${STRIP_CMD} ${PREFIX}/lib/*.so
170 .endif
171 @${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve.sample
172 @${MAKE} -C ${WRKSRC} install-tools ${FAKE_MAKEARGS}
173 -@${STRIP_CMD} ${PREFIX}/bin/*
174
175 # ===============================================================================
176 repository: _mkrepos
177
178 _SVNGRPFILES= db locks locks/db.lock locks/db-logs.lock
179 SVNGRPFILES= ${_SVNGRPFILES:S,^,${SVNREPOS}/,}
180
181 _mkrepos: .USE
182 .if !exists(${SVNREPOS})
183 .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER}
184 @if /usr/sbin/pw groupshow "${SVNGROUP}" >/dev/null 2>&1; then \
185 ${ECHO_MSG} "You already have a group \"${SVNGROUP}\", so I will use it."; \
186 else \
187 if /usr/sbin/pw groupadd ${SVNGROUP} -h -; \
188 then \
189 ${ECHO_MSG} "Added group \"${SVNGROUP}\"."; \
190 else \
191 ${ECHO_MSG} "Adding group \"${SVNGROUP}\" failed..."; \
192 ${ECHO_MSG} "Please create it, and try again."; \
193 ${FALSE}; \
194 fi; \
195 fi
196 @if /usr/sbin/pw usershow "${SVNUSER}" >/dev/null 2>&1; then \
197 ${ECHO_MSG} "You already have a user \"${SVNUSER}\", so I will use it."; \
198 else \
199 if /usr/sbin/pw useradd ${SVNUSER} -h -; \
200 then \
201 ${ECHO_MSG} "Added user \"${SVNUSER}\"."; \
202 else \
203 ${ECHO_MSG} "Adding user \"${SVNUSER}\" failed..."; \
204 ${ECHO_MSG} "Please create it, and try again."; \
205 ${FALSE}; \
206 fi; \
207 fi
208 .endif
209 @${MKDIR} ${SVNREPOS}
210 @${PREFIX}/bin/svnadmin create --fs-type ${SVNFSTYPE} ${SVNREPOS}
211 .if ${PORT_OPTIONS:MSVNSERVE_WRAPPER}
212 @${CHOWN} ${SVNUSER}:${SVNGROUP} ${SVNGRPFILES}
213 @${CHMOD} g+w ${SVNGRPFILES}
214 @for i in ${SVNREPOS}/db/* ; do \
215 i=$${i##*/}; \
216 case $$i in \
217 DB_CONFIG|fs-type|uuid) ;; \
218 *) ${CHOWN} -R ${SVNUSER}:${SVNGROUP} ${SVNREPOS}/db/$$i; \
219 ${CHMOD} -R g+w ${SVNREPOS}/db/$$i; \
220 ;; \
221 esac; \
222 done
223 .endif
224 .endif
225
226 svn-build-outputs-hack:
227 (cd ${WRKSRC} && ${PATCH} ${PATCH_DIST_ARGS} -p0 < ${PATCHDIR}/extra-patch-build.conf)
228 (cd ${WRKSRC} && python2 gen-make.py --release --installed-libs libsvn_client,libsvn_delta,libsvn_diff,libsvn_fs,libsvn_fs_x,libsvn_ra,libsvn_repos,libsvn_subr,libsvn_wc)
229 ${MV} ${WRKSRC}/build-outputs.mk ${FILESDIR}/build-outputs.mk.addons
230
231 .include <bsd.port.post.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H