Andreas Wacknitz
2024-04-04 8590298b09ebad29af56370cd23105cd0931b389
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
 
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2023 Klaus Ziegler
#
 
include ../../../make-rules/shared-macros.mk
 
PATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
 
COMPONENT_NAME=        subversion
COMPONENT_VERSION=    1.14.2
COMPONENT_REVISION =    3
COMPONENT_PROJECT_URL=    https://subversion.apache.org/
COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.bz2
COMPONENT_ARCHIVE_HASH=    sha256:c9130e8d0b75728a66f0e7038fc77052e671830d785b5616aad53b4810d3cc28
COMPONENT_ARCHIVE_URL=    https://apache.org/dist/subversion/$(COMPONENT_ARCHIVE)
COMPONENT_LICENSE=    Apache v2.0
 
include $(WS_MAKE_RULES)/common.mk
 
COMPONENT_PREP_ACTION += $(GSED) -i -e 's|@PYTHON_LIB@|'"$(PYTHON_LIB)"'|' $(@D)/Makefile.in ;
 
PYMODS = client core delta fs ra repos wc
PLMODS= Fs Core Wc Client Repos Ra Delta
 
CXXFLAGS += $(CC_PIC)
CXXFLAGS += $(CPP_LARGEFILES)
CFLAGS += -D__EXTENSIONS__
CFLAGS += `pkg-config --cflags neon`
CFLAGS += $(CPP_LARGEFILES)
 
# Let's write some post-configure hacks
COMPONENT_POST_CONFIGURE_ACTION = \
    ( $(CLONEY) $(SOURCE_DIR) $(@D) ; \
    cd $(SOURCE_DIR) ; \
    $(PYTHON) ./build/transform_sql.py ./subversion/libsvn_fs_fs/rep-cache-db.sql < ./subversion/libsvn_fs_fs/rep-cache-db.sql > $(BUILD_DIR_$(BITS))/subversion/libsvn_fs_fs/rep-cache-db.h 2>&1 )
 
COMPONENT_BUILD_TARGETS = all swig-pl swig-py javahl
COMPONENT_INSTALL_TARGETS = install install-lib \
                install-swig-pl install-swig-py \
                install-javahl install-javahl-lib \
                install-mods-shared \
                install-bin install-docs
 
CONFIGURE_ENV += PYTHON="$(PYTHON)"
CONFIGURE_ENV += PYMODS="$(PYMODS)"
CONFIGURE_ENV += PYTHONPATH="$(PYTHON_VENDOR_PACKAGES)"
CONFIGURE_ENV += JAVA_ROOT="$(JAVA_HOME)"
CONFIGURE_ENV += PERL="$(PERL)"
CONFIGURE_ENV += PLMODS="$(PLMODS)"
CONFIGURE_ENV += LD_OPTIONS="$(LD_OPTIONS)"
 
LIBSVNDIR = $(CONFIGURE_PREFIX)/lib/$(MACH64)
 
APR-CONFIG = /usr/apr/bin/apr-1-config
APU-CONFIG = /usr/apr-util/bin/apu-1-config
APXS = /usr/apache2/2.4/bin/apxs
APR-CONFIG-RPATH = /usr/apr/lib/$(MACH64)
APU-CONFIG-RPATH = /usr/apr-util/lib/$(MACH64)
APACHE_LIBEXECDIR = `$(APXS) -q libexecdir`
 
LDFLAGS += -R$(LIBSVNDIR) -R$(APR-CONFIG-RPATH) \
       -R$(APU-CONFIG-RPATH)
 
CONFIGURE_ENV += RUBY="$(RUBY.1.9)"
 
# Let's make noise just because we have to override --libdir
CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
CONFIGURE_OPTIONS += --libdir=$(LIBSVNDIR)
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --enable-shared 
CONFIGURE_OPTIONS += --disable-libtool-lock 
CONFIGURE_OPTIONS += --disable-experimental-libtool
CONFIGURE_OPTIONS += --with-zlib=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-jdk=$(JAVA_HOME)
CONFIGURE_OPTIONS += --with-apr=/usr/apr
CONFIGURE_OPTIONS += --with-apr-util=/usr/apr-util
CONFIGURE_OPTIONS += --enable-nls
CONFIGURE_OPTIONS += --disable-mod-activation
CONFIGURE_OPTIONS += --enable-javahl
CONFIGURE_OPTIONS += --with-swig
CONFIGURE_OPTIONS += --with-utf8proc=internal
CONFIGURE_OPTIONS += --with-apr=$(APR-CONFIG)
CONFIGURE_OPTIONS += --with-apr-util=$(APU-CONFIG)
CONFIGURE_OPTIONS += --with-apxs=$(APXS)
CONFIGURE_OPTIONS += --with-apache-libexecdir=$(APACHE_LIBEXECDIR)
# libgnome-keyring was obsoleted upstream, disable support for storing svn
# passwords in gnome-keyring until svn is updated to use libsecret instead
CONFIGURE_OPTIONS += --without-gnome-keyring
 
# Build and install should be able to find tools like chmod, touch, or true
COMPONENT_BUILD_ENV += PATH=$(PATH)
COMPONENT_INSTALL_ENV += PATH=$(PATH)
 
# Rename Python libraries to follow Python SOABI naming scheme
COMPONENT_POST_INSTALL_ACTION += \
    EXT_SUFFIX=$(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))") ; \
    for i in $(PROTO_DIR)$(PYTHON_LIB)/libsvn/*.so ; do \
        [[ -f $$i ]] || continue ; \
        [[ $${i%%$$EXT_SUFFIX} == $$i ]] || continue ; \
        t=$${i%%.so}$$EXT_SUFFIX ; \
        $(MV) $$i $$t ; \
    done ;
# Make sure built perl libraries are writable so we can modify them later
COMPONENT_POST_INSTALL_ACTION += \
    find $(PROTOUSRDIR)/perl5/vendor_perl/$(PERL_VERSION)/$(PERL_ARCH) \
        -name *.so -exec chmod +w {} \; -print ;
 
COMPONENT_TEST_TRANSFORMS += \
'-e "/libtool/d"' \
'-e "/-m64/d"' \
'-e "/Entering/d"' \
'-e "/Leaving/d"' \
'-e "/At least/d"' \
'-e "s^lib/$(MACH64)^lib/MACH64^g"'  \
'-e "s/^make\[[0-9]\{1,\}\]/make/g"' \
'-e "/ld: warning/d"' \
'-e "/warning/d"' \
'-e "/exists from a previous run/d"' \
'-e "s/\.//g"' \
'-e "/^Python version.*/d"' \
'-e "/^make:/d"'
 
# Master test results are different between amd64 and SPARCV9.
COMPONENT_TEST_MASTER = \
    $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH64).master
 
# SPARC needs math library
ifeq ($(strip $(MACH)),sparc)
REQUIRED_PACKAGES += system/library/math
endif
 
# Manually added build dependencies
PYTHON_REQUIRED_PACKAGES += library/python/py3c
 
# Auto-generated dependencies
PERL_REQUIRED_PACKAGES += runtime/perl
PYTHON_REQUIRED_PACKAGES += runtime/python
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
REQUIRED_PACKAGES += database/sqlite-3
REQUIRED_PACKAGES += library/apr
REQUIRED_PACKAGES += library/apr-util
REQUIRED_PACKAGES += library/expat
REQUIRED_PACKAGES += library/libserf
REQUIRED_PACKAGES += library/lz4
REQUIRED_PACKAGES += library/magic
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library