Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/classified-ads/files/, net-p2p/classified-ads/
Date: Mon, 22 Nov 2021 14:03:51
Message-Id: 1637589817.4671498eed17568162abd06a521a6da9793ff2e9.juippis@gentoo
1 commit: 4671498eed17568162abd06a521a6da9793ff2e9
2 Author: Antti Järvinen <antti.jarvinen <AT> katiska <DOT> org>
3 AuthorDate: Mon Nov 22 13:57:00 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 22 14:03:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4671498e
7
8 net-p2p/classified-ads: install example files into correct path
9
10 Closes: https://bugs.gentoo.org/809464
11 Package-Manager: Portage-3.0.22, Repoman-3.0.3
12 Signed-off-by: Antti Järvinen <antti.jarvinen <AT> katiska.org>
13 Closes: https://github.com/gentoo/gentoo/pull/22629
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 .../classified-ads/classified-ads-0.13-r2.ebuild | 87 ++++++++++++++++++++++
17 .../classified-ads-0.13-examples-install-dir.patch | 52 +++++++++++++
18 2 files changed, 139 insertions(+)
19
20 diff --git a/net-p2p/classified-ads/classified-ads-0.13-r2.ebuild b/net-p2p/classified-ads/classified-ads-0.13-r2.ebuild
21 new file mode 100644
22 index 000000000000..2034c6a3dac5
23 --- /dev/null
24 +++ b/net-p2p/classified-ads/classified-ads-0.13-r2.ebuild
25 @@ -0,0 +1,87 @@
26 +# Copyright 1999-2021 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=8
30 +inherit qmake-utils virtualx xdg
31 +
32 +DESCRIPTION="Program for displaying classified advertisement items"
33 +HOMEPAGE="http://katiska.org/classified-ads/"
34 +SRC_URI="https://github.com/operatornormal/classified-ads/archive/${PV}.tar.gz
35 + -> classified-ads-${PV}.tar.gz
36 + https://github.com/operatornormal/classified-ads/blob/graphics/preprocessed.tar.gz?raw=true
37 + -> classified-ads-graphics-${PV}.tar.gz"
38 +
39 +LICENSE="LGPL-2.1+"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~x86"
42 +
43 +IUSE="doc test"
44 +RESTRICT="!test? ( test )"
45 +
46 +RDEPEND="app-arch/bzip2
47 + dev-lang/tcl:=
48 + dev-lang/tk:=
49 + dev-libs/openssl:0=
50 + dev-qt/qtcore:5
51 + dev-qt/qtgui:5
52 + dev-qt/qtmultimedia:5[widgets]
53 + dev-qt/qtnetwork:5[ssl]
54 + dev-qt/qtprintsupport:5
55 + dev-qt/qtsql:5[sqlite]
56 + dev-qt/qtwidgets:5
57 + media-libs/opus
58 + net-libs/libnatpmp
59 + net-libs/miniupnpc
60 + sys-apps/file
61 + sys-libs/zlib
62 + virtual/libintl"
63 +
64 +DEPEND="${RDEPEND}
65 + doc? ( app-doc/doxygen[dot] )
66 + test? ( dev-libs/libgcrypt:0
67 + dev-qt/qttest:5
68 + sys-devel/gdb:0 )"
69 +
70 +BDEPEND="sys-devel/gettext"
71 +
72 +PATCHES=(
73 + "${FILESDIR}/${P}-examples-install-dir.patch"
74 +)
75 +
76 +src_prepare() {
77 + # preprocessed graphics are unpacked into wrong directory
78 + # so lets move them into correct location:
79 + mv ../ui/* ui/ || die
80 + default
81 +}
82 +
83 +src_configure() {
84 + eqmake5 examplefiles.path=/usr/share/doc/${PF}/examples
85 + if use test; then
86 + cd testca || die
87 + eqmake5
88 + fi
89 +}
90 +
91 +src_compile() {
92 + emake
93 + if use doc; then
94 + pushd doc > /dev/null || die
95 + doxygen || die
96 + popd > /dev/null || die
97 + fi
98 + if use test; then
99 + emake -C testca
100 + fi
101 +}
102 +
103 +src_test() {
104 + # testca will return 0 if all unit tests pass
105 + virtx ./testca/testca
106 +}
107 +
108 +src_install() {
109 + docompress -x /usr/share/doc/
110 + emake install INSTALL_ROOT="${D}" DESTDIR="${D}"
111 + use doc && dodoc -r doc/doxygen.generated/html/.
112 +}
113
114 diff --git a/net-p2p/classified-ads/files/classified-ads-0.13-examples-install-dir.patch b/net-p2p/classified-ads/files/classified-ads-0.13-examples-install-dir.patch
115 new file mode 100644
116 index 000000000000..e6b0b4bab362
117 --- /dev/null
118 +++ b/net-p2p/classified-ads/files/classified-ads-0.13-examples-install-dir.patch
119 @@ -0,0 +1,52 @@
120 +From: Antti Järvinen <antti.jarvinen@×××××××.org>
121 +Bug: https://bugs.gentoo.org/809464
122 +
123 +Installs example TCL programs into correct path. Upon startup binary
124 +will check example files from path, this why this touches not only
125 +makefile but also the c++ code. Changes are possible to incorporate
126 +into next upstream release so this patch will become obsolete.
127 +
128 +diff -u -r classified-ads-0.13.orig/classified-ads.pro classified-ads-0.13/classified-ads.pro
129 +--- classified-ads-0.13.orig/classified-ads.pro 2018-07-03 17:16:11.000000000 +0300
130 ++++ classified-ads-0.13/classified-ads.pro 2021-10-17 19:13:22.049743665 +0300
131 +@@ -186,7 +186,9 @@
132 + manpages.path = /usr/share/man/man1
133 + manpages.files = classified-ads.1
134 + # note this example file path appears also in file tclmodel.cpp
135 +-examplefiles.path = /usr/share/doc/classified-ads/examples
136 ++isEmpty(examplefiles.path){
137 ++ examplefiles.path = /usr/share/doc/classified-ads/examples
138 ++}
139 + examplefiles.files = doc/sysinfo.tcl doc/luikero.tcl doc/calendar.tcl
140 + INSTALLS += target \
141 + desktopfiles \
142 +diff -u -r classified-ads-0.13.orig/datamodel/tclmodel.cpp classified-ads-0.13/datamodel/tclmodel.cpp
143 +--- classified-ads-0.13.orig/datamodel/tclmodel.cpp 2018-07-03 17:16:11.000000000 +0300
144 ++++ classified-ads-0.13/datamodel/tclmodel.cpp 2021-10-17 19:28:39.084875578 +0300
145 +@@ -292,7 +292,13 @@
146 + #else
147 + // in unix this path appears in classified-ads.pro and
148 + // is used by "make install" phase.
149 +- QDir examplesDir ("/usr/share/doc/classified-ads/examples") ;
150 ++ QDir examplesDir ("/usr/share/doc/classified-ads/examples") ;
151 ++ if ( !examplesDir.exists() ) {
152 ++ // some linux distributions want version number inside path:
153 ++ examplesDir.setPath("/usr/share/doc/classified-ads-"+
154 ++ QString(CLASSIFIED_ADS_VERSION)+
155 ++ "/examples") ;
156 ++ }
157 + #endif
158 + if ( !examplesDir.exists() ) {
159 + return ; // no examples, obviously
160 +diff -u -r classified-ads-0.13.orig/mcontroller.h classified-ads-0.13/mcontroller.h
161 +--- classified-ads-0.13.orig/mcontroller.h 2018-07-03 17:16:11.000000000 +0300
162 ++++ classified-ads-0.13/mcontroller.h 2021-10-18 20:38:39.495032595 +0300
163 +@@ -25,7 +25,7 @@
164 + #include "datamodel/netrequestexecutor.h"
165 + #include "datamodel/cadbrecord.h" // for CaDbRecord::SearchTerms
166 +
167 +-#define CLASSIFIED_ADS_VERSION "0.13"
168 ++#define CLASSIFIED_ADS_VERSION "0.13-r2"
169 +
170 + class Node ;
171 + class Model ;