Diff geneweb-7.0.0-r2 with a geneweb-7.0.0_p1

/usr/portage/app-misc/geneweb/geneweb-7.0.0_p1.ebuild 2023-10-09 14:52:28.800368333 +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
inherit dune
7

  
8
TagId=Geneweb-1eaac340
6 9
DESCRIPTION="Genealogy software program with a Web interface"
7 10
HOMEPAGE="https://github.com/geneweb/geneweb"
8
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/${TagId}.tar.gz"
9 12

  
10 13
LICENSE="GPL-2"
11 14
SLOT="0"
12
KEYWORDS="amd64 x86"
15
KEYWORDS="~amd64 ~x86"
13 16
IUSE="+ocamlopt test"
14
RESTRICT="strip !test? ( test )"
17
RESTRICT="strip
18
	!test? ( test )"
15 19

  
16
RDEPEND="dev-lang/ocaml[ocamlopt?]
17
	<dev-ml/camlp5-8:=[ocamlopt?]
18
	acct-user/geneweb
19
	acct-group/geneweb
20
	dev-ml/jingoo:=
20
DEPEND="
21
	dev-ml/re:=
22
	dev-ml/uutf:=
21 23
	dev-ml/uunf:=
22
	>=dev-ml/markup-1.0.0:=
24
	dev-ml/uucp:=
23 25
	dev-ml/unidecode:=
24 26
	dev-ml/calendars:=
25
	dev-ml/zarith:="
26
DEPEND="${RDEPEND}
27
	dev-ml/zarith:=
28
	dev-ml/markup:=
29
	dev-ml/jingoo:=
30
	>=dev-ml/camlp5-8:=[ocamlopt?]
31
	dev-ml/ppx_import:=
32
	dev-ml/ppx_blob:=
33
	acct-user/geneweb
34
	acct-group/geneweb
35
"
36
RDEPEND="${DEPEND}"
37
BDEPEND="
27 38
	dev-ml/cppo
28 39
	test? ( dev-ml/ounit2 )"
29 40

  
30 41
QA_FLAGS_IGNORED='.*'
31 42

  
43
S="${WORKDIR}"/${PN}-${TagId}
44

  
45
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
46

  
32 47
src_prepare() {
33 48
	default
34

  
35
	sed -i -e "s/oUnit/ounit2/" test/dune.in || die
36
	sed -i -e "500,$ s| compare | Stdlib.compare |" lib/util/mutil.ml || die
49
	sed -i \
50
		-e "/opam_swich_prefix_lib/s|\"lib|\"$(get_libdir)|" \
51
		bin/gwrepl/mk_data.ml \
52
		|| die
37 53
}
38 54

  
39 55
src_configure() {
40
	ocaml ./configure.ml
56
	ocaml ./configure.ml --sosa-zarith || die
41 57
}
42 58

  
43 59
src_compile() {
44
	if use ocamlopt; then
45
		emake
46
	else
47
		emake OCAMLC=ocamlc OCAMLOPT=ocamlopt out
48
		# If using bytecode we dont want to strip the binary as it would remove
49
		# the bytecode and only leave ocamlrun...
50
	fi
60
	emake distrib
51 61
}
52 62

  
53 63
src_install() {
54
	default
55
	mv "${D}"/usr/bin/{,gw}setup || die
56
	rm -r "${D}"/usr/doc || die
64
	dune_src_install
65
	rm "${D}"/usr/share/doc/${PF}/geneweb/LICENSE || die
66
	mv "${D}"/usr/share/doc/${PF}/geneweb/* "${D}"/usr/share/doc/${PF}/ || die
67

  
57 68
	dodoc ICHANGES etc/README.txt etc/a.gwf
58 69

  
59 70
	# Install manpages
60 71
	doman man/*
61 72

  
62
	emake distrib
63 73
	cd distribution/gw
64 74
	insinto /usr/share/${PN}
65
	doins -r etc images lang setup gwd.arg only.txt
75
	doins -r etc images lang setup gwd.arg
66 76

  
67
	newinitd "${FILESDIR}/geneweb.initd" geneweb
77
	newinitd "${FILESDIR}/geneweb.initd-r1" geneweb
68 78
	newconfd "${FILESDIR}/geneweb.confd" geneweb
69 79
}
70 80

  
71 81
pkg_postinst() {
72
	einfo "A CGI program has been installed in /usr/lib/${PN}. Follow the"
73
	einfo "instructions on the README in that directory to use it"
74 82
	einfo "If you come from an old version you need to rebuild the database"
75
	einfo "\"gwu foo > foo.gw \" will save the database (use the previous"
76
	einfo "version to do that). \"gwc2 foo.gw -o bar \" will restore it "
83
	einfo "\"geneweb.gwu foo -o foo.gw \" will save the database (use the previous"
84
	einfo "version to do that). \"geneweb.gwc foo.gw -o bar \" will restore it "
77 85
	einfo "(using the current package)"
78 86
}
Thank you!