Diff firebird-3.0.4.33054.0-r2 with a firebird-3.0.10.33601.0-r1

/usr/portage/dev-db/firebird/firebird-3.0.10.33601.0-r1.ebuild 2023-10-09 14:52:29.316368346 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
MY_P=${PN/f/F}-$(ver_rs 4 '-')
7 7
inherit autotools flag-o-matic
8 8

  
9 9
DESCRIPTION="Relational database offering many ANSI SQL:2003 and some SQL:2008 features"
10 10
HOMEPAGE="https://www.firebirdsql.org/"
11

  
11 12
SRC_URI="
12
	https://github.com/FirebirdSQL/firebird/releases/download/R$(ver_rs 1-3 '_' $(ver_cut 1-3))/${MY_P}.tar.bz2
13
	doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )
13
	https://github.com/FirebirdSQL/firebird/releases/download/v$(ver_cut 1-3)/${MY_P}.tar.bz2
14
	doc? (
15
		https://firebirdsql.org/file/documentation/pdf/en/refdocs/fblangref30/firebird-30-language-reference.pdf
16
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/qsg3/firebird-3-quickstartguide.pdf
17
		https://firebirdsql.org/file/documentation/pdf/en/refdocs/fbdevgd30/firebird-30-developers-guide.pdf
18
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/isql/firebird-isql.pdf
19
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gsec/firebird-gsec.pdf
20
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gbak/firebird-gbak.pdf
21
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/nbackup/firebird-nbackup.pdf
22
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gstat/firebird-gstat.pdf
23
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gfix/firebird-gfix.pdf
24
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/fbmgr/firebird-fbmgr.pdf
25
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/gsplit/firebird-gsplit.pdf
26
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/generatorguide/firebird-generator-guide.pdf
27
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/nullguide/firebird-null-guide.pdf
28
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/fbmetasecur/firebird-metadata-security.pdf
29
		https://firebirdsql.org/file/documentation/pdf/en/firebirddocs/ufb/using-firebird.pdf
30
	)
14 31
"
15 32
S="${WORKDIR}/${MY_P}"
16 33

  
17 34
LICENSE="IDPL Interbase-1.0"
18 35
SLOT="0"
19
KEYWORDS="~amd64 ~x86"
36
KEYWORDS="~amd64 ~arm64 ~x86"
20 37
IUSE="doc examples +server xinetd"
21 38

  
22 39
BDEPEND="
23
	>=dev-util/btyacc-3.0-r2
24 40
	doc? ( app-arch/unzip )
25 41
"
26 42
# FIXME: cloop?
......
38 54
"
39 55

  
40 56
PATCHES=(
41
	"${FILESDIR}"/${PN}-3.0.2.32703.0-unbundle.patch
42
	"${FILESDIR}"/${PN}-3.0.2.32703.0-cloop-compiler.patch
57
	"${FILESDIR}"/${PN}-3.0.10.33601.0-unbundle.patch
58
	"${FILESDIR}"/${PN}-3.0.10.33601.0-flags.patch
59
	"${FILESDIR}"/${P}-configure-autoconf2.72.patch
60
	"${FILESDIR}"/${P}-configure-clang16.patch
43 61
)
44 62

  
45 63
pkg_pretend() {
......
59 77
	[[ $1 -ge $2 ]] || die "${MSG}"
60 78
}
61 79

  
62
src_unpack() {
63
	unpack "${MY_P}.tar.bz2"
64
	if use doc; then
65
		# Unpack docs
66
		mkdir "manuals" || die
67
		cd "manuals" || die
68
		unpack ib_b60_doc.zip
69
	fi
70
}
71

  
72 80
src_prepare() {
73 81
	default
74 82

  
......
83 91
		-e 's:ISQL :FBSQL :w /dev/stdout' \
84 92
		src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines
85 93

  
94
	# use gentoo's CXXFLAGS instead of whatever firebird decided on
95
	# doesn't replace all firebird's CXXFLAGS, but at least this is last,
96
	# so it can do some overrides
97
	sed -i -e "/OPTIMIZE_FLAGS=/s/=.*/=${CXXFLAGS}/" builds/posix/prefix.*
98

  
86 99
	find . -name \*.sh -exec chmod +x {} + || die
87
	rm -r extern/{btyacc,editline,icu} || die
100
	# firebird's patched btyacc is needed now as of
101
	# https://github.com/FirebirdSQL/firebird/commit/9aab6ed8cc6872e2ebc6bfa2531e089cb96e8305#diff-a01303d63fcb967bea34359c3c7f79e4356d6549ab22a1a9190e8020c0b33a3d
102
	rm -r extern/{editline,icu} || die
88 103

  
89 104
	eautoreconf
90 105
}
91 106

  
92 107
src_configure() {
93
	filter-flags -fprefetch-loop-arrays
94
	filter-mfpmath sse
95

  
96
	# otherwise this doesnt build with gcc-6
97
	# http://tracker.firebirdsql.org/browse/CORE-5099
98
	append-cflags -fno-sized-deallocation -fno-delete-null-pointer-checks
99
	append-cxxflags -fno-sized-deallocation -fno-delete-null-pointer-checks -std=c++11
108
	tc-export PKG_CONFIG
100 109

  
101 110
	local myeconfargs=(
102 111
		--prefix=/usr/$(get_libdir)/firebird
......
109 118
		--with-fbinclude=/usr/include
110 119
		--with-fbdoc=/usr/share/doc/${PF}
111 120
		--with-fbudf=/usr/$(get_libdir)/${PN}/UDF
112
		--with-fbsample=/usr/share/doc/${PF}/examples
113
		--with-fbsample-db=/usr/share/doc/${PF}/examples/db
114
		--with-fbhelp=/usr/$(get_libdir)/${PN}/help
121
		--with-fbsample=/usr/share/${PN}/examples
122
		--with-fbsample-db=/usr/share/${PN}/examples/empbuild
123
		--with-fbhelp=/usr/share/${PN}/help
115 124
		--with-fbintl=/usr/$(get_libdir)/${PN}/intl
116 125
		--with-fbmisc=/usr/share/${PN}
117 126
		--with-fbsecure-db=/etc/${PN}
118
		--with-fbmsg=/usr/$(get_libdir)/${PN}
127
		--with-fbmsg=/usr/share/${PN}/msg
119 128
		--with-fblog=/var/log/${PN}/
120 129
		--with-fbglock=/var/run/${PN}
121 130
		--with-fbplugins=/usr/$(get_libdir)/${PN}/plugins
122 131
		--with-gnu-ld
123 132
	)
133

  
124 134
	econf "${myeconfargs[@]}"
125 135
}
126 136

  
......
128 138
src_install() {
129 139
	if use doc; then
130 140
		dodoc -r doc
131
		find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die
141

  
142
		local x
143
		for x in ${A}; do
144
			if [[ ${x} == *.pdf ]] ; then
145
				dodoc "${DISTDIR}"/${x}
146
			fi
147
		done
132 148
	fi
133 149

  
134 150
	cd "${S}/gen/Release/${PN}" || die
......
198 214
		insinto /etc/xinetd.d
199 215
		newins "${FILESDIR}/${PN}.xinetd.3.0" ${PN}
200 216
	else
201
		newinitd "${FILESDIR}/${PN}.init.d.3.0" ${PN}
217
		newinitd "${FILESDIR}/${PN}.init.d.3.0-r1" ${PN}
202 218
	fi
203 219

  
204 220
	if use examples; then
......
224 240
	elog "Starting with version 3, server mode is set in firebird.conf"
225 241
	elog "The default setting is superserver."
226 242
	elog
227
	elog "If you're using UDFs, please remember to move them to /usr/$(get_libdir)/firebird/UDF"
243
	elog "If you're using UDFs, please remember to move them to ${EPREFIX}/usr/$(get_libdir)/firebird/UDF"
228 244
}
Thank you!