Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/ophcrack/, app-crypt/ophcrack/files/
Date: Sat, 18 Mar 2023 21:23:13
Message-Id: 1679174565.55b721f46cd975804608700185143ba4a06c20eb.soap@gentoo
1 commit: 55b721f46cd975804608700185143ba4a06c20eb
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 18 21:22:45 2023 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 18 21:22:45 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55b721f4
7
8 app-crypt/ophcrack: fix LLD build
9
10 Closes: https://bugs.gentoo.org/828946
11 Closes: https://bugs.gentoo.org/889364
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../files/ophcrack-3.8.0-buildsystem.patch | 223 +++++++++++++++++++++
15 app-crypt/ophcrack/files/ophcrack-ar.patch | 13 --
16 ...crack-3.8.0.ebuild => ophcrack-3.8.0-r1.ebuild} | 35 ++--
17 3 files changed, 243 insertions(+), 28 deletions(-)
18
19 diff --git a/app-crypt/ophcrack/files/ophcrack-3.8.0-buildsystem.patch b/app-crypt/ophcrack/files/ophcrack-3.8.0-buildsystem.patch
20 new file mode 100644
21 index 000000000000..fc4ec60c016c
22 --- /dev/null
23 +++ b/app-crypt/ophcrack/files/ophcrack-3.8.0-buildsystem.patch
24 @@ -0,0 +1,223 @@
25 +--- a/Makefile.in
26 ++++ b/Makefile.in
27 +@@ -35,7 +35,7 @@
28 + config \
29 + config.h.in \
30 + configure \
31 +- configure.in \
32 ++ configure.ac \
33 + COPYING \
34 + INSTALL \
35 + install-sh \
36 +@@ -82,13 +82,13 @@
37 + tar cfj $(distdir).tar.bz2 $(distdir)
38 + rm -rf $(distdir)
39 +
40 +-# automatic re-running of configure if the configure.in file has changed
41 +-configure: configure.in aclocal.m4
42 ++# automatic re-running of configure if the configure.ac file has changed
43 ++configure: configure.ac aclocal.m4
44 + autoconf
45 +
46 + # autoheader might not change config.h.in, so touch a stamp file
47 + config.h.in: stamp-h.in
48 +-stamp-h.in: configure.in aclocal.m4
49 ++stamp-h.in: configure.ac aclocal.m4
50 + autoheader
51 + echo timestamp > stamp-h.in
52 +
53 +--- a/configure.in
54 ++++ b/configure.in
55 +@@ -68,7 +68,7 @@
56 + AC_PROG_INSTALL
57 + AC_PROG_LN_S
58 + AC_PROG_MAKE_SET
59 +-AC_PROG_RANLIB
60 ++AC_CHECK_TOOL([AR], [ar])
61 +
62 + if test "$GCC" = "yes"; then
63 + CFLAGS="$CFLAGS -Wall -std=gnu9x -pedantic -I.."
64 +@@ -167,55 +167,8 @@
65 + AC_CHECK_LIB([pthread], [pthread_mutex_init], [], [AC_MSG_ERROR([ophcrack requires libpthread.])])
66 + fi
67 +
68 +-
69 +-AC_MSG_CHECKING(for libssl)
70 +-with_ssl=no
71 +-AC_ARG_WITH(libssl, AC_HELP_STRING(--with-libssl=DIR,use libssl in DIR),
72 +-[ case "$withval" in
73 +- no)
74 +- AC_MSG_RESULT(no)
75 +- ;;
76 +- *)
77 +- AC_MSG_RESULT(yes)
78 +- with_ssl=$withval
79 +- CFLAGS="$CFLAGS -I$with_ssl/include"
80 +- CXXFLAGS="$CXXFLAGS -I$with_ssl/include"
81 +- LIBS="$LIBS -L$with_ssl/lib -lssl -lcrypto"
82 +- ;;
83 +- esac ]
84 +-)
85 +-
86 +-if test "x$with_ssl" = "xno"; then
87 +- CHECK_SSL
88 +-fi
89 +-
90 +-with_expat=no
91 +-AC_ARG_WITH(libexpat, AC_HELP_STRING(--with-libexpat=DIR,use libexpat in DIR),
92 +-[ AC_MSG_CHECKING(for libexpat)
93 +- case "$withval" in
94 +- no)
95 +- AC_MSG_RESULT(no)
96 +- ;;
97 +- *)
98 +- AC_MSG_RESULT(yes)
99 +- with_expat=$withval
100 +- if test "x$enable_win32" = "xyes"; then
101 +- CFLAGS="$CFLAGS -I$with_expat/lib"
102 +- CXXFLAGS="$CXXFLAGS -I$with_expat/lib"
103 +- LIBS="$LIBS -L$with_expat"
104 +- LIBS_END="$LIBS_END -lexpat"
105 +- else
106 +- CFLAGS="$CFLAGS -I$with_expat/include"
107 +- CXXFLAGS="$CXXFLAGS -I$with_expat/include"
108 +- LIBS="$LIBS -L$with_expat/lib -lexpat"
109 +- fi
110 +- ;;
111 +- esac ]
112 +-)
113 +-
114 +-if test "x$with_expat" = "xno"; then
115 +- AC_CHECK_LIB([expat], [XML_ParserCreate], [], [AC_MSG_ERROR([ophcrack requires libexpat.])])
116 +-fi
117 ++PKG_CHECK_MODULES([EXPAT], [expat])
118 ++PKG_CHECK_MODULES([CRYPTO], [libcrypto])
119 +
120 + AC_CHECK_LIB([m], [sqrt], [], [AC_MSG_ERROR([ophcrack requires libmath.])])
121 +
122 +--- a/src/Makefile.in
123 ++++ b/src/Makefile.in
124 +@@ -20,9 +20,16 @@
125 +
126 + CC = @CC@
127 +
128 +-CPPFLAGS = @CPPFLAGS@
129 +-CFLAGS = @CFLAGS@ -Icore -Intproba
130 +-LDFLAGS = @LDFLAGS@ @LIBS@
131 ++CPPFLAGS = @CPPFLAGS@ -Icore -Intproba
132 ++CFLAGS = @CFLAGS@
133 ++LIBS = @LIBS@
134 ++LDFLAGS = @LDFLAGS@
135 ++
136 ++EXPAT_CFLAGS = @EXPAT_CFLAGS@
137 ++EXPAT_LIBS = @EXPAT_LIBS@
138 ++
139 ++CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
140 ++CRYPTO_LIBS = @CRYPTO_LIBS@
141 +
142 + SUBDIRS = core ntproba samdump2 test
143 + @HAVE_GUI_TRUE@SUBDIRS += gui
144 +@@ -48,7 +55,7 @@
145 + ophcrack: gui/main.cpp core ntproba samdump2
146 + cp $< main.c
147 + $(CC) $(CPPFLAGS) $(CFLAGS) -c main.c -o main.o
148 +- $(CC) main.o $(ARCHIVES) -o $@ $(LDFLAGS)
149 ++ $(CC) $(CFLAGS) $(LDFLAGS) main.o $(ARCHIVES) -o $@ $(EXPAT_LIBS) $(CRYPTO_LIBS) $(LIBS)
150 + rm main.c main.o
151 +
152 + gui: core ntproba samdump2
153 +--- a/src/common.mk.in
154 ++++ b/src/common.mk.in
155 +@@ -23,7 +23,14 @@
156 +
157 + CFLAGS = @CFLAGS@
158 + CPPFLAGS = @CPPFLAGS@
159 +-LDFLAGS = @LDFLAGS@ @LIBS@
160 ++LDFLAGS = @LDFLAGS@
161 ++LIBS = @LIBS@
162 ++
163 ++EXPAT_CFLAGS = @EXPAT_CFLAGS@
164 ++EXPAT_LIBS = @EXPAT_LIBS@
165 ++
166 ++CRYPTO_CFLAGS = @CRYPTO_CFLAGS@
167 ++CRYPTO_LIBS = @CRYPTO_LIBS@
168 +
169 + HEADERS = $(wildcard *.h)
170 + SOURCES = $(wildcard *.c)
171 +@@ -32,11 +39,7 @@
172 + all:
173 +
174 + %.a:
175 +- ar r $@ $^
176 +- $(RANLIB) $@
177 +-
178 +-%.o: %.c
179 +- $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
180 ++ $(AR) rcs $@ $^
181 +
182 + clean_:
183 + rm -f *.o *~
184 +--- a/src/core/Makefile.in
185 ++++ b/src/core/Makefile.in
186 +@@ -17,7 +17,7 @@
187 +
188 + include ../common.mk
189 +
190 +-CFLAGS += -I../.. -I../samdump2 -I../ntproba
191 ++CPPFLAGS += -I../.. -I../samdump2 -I../ntproba $(CRYPTO_CFLAGS)
192 +
193 + all: libophcrack.a
194 +
195 +--- a/src/gui/gui.pro.in
196 ++++ b/src/gui/gui.pro.in
197 +@@ -30,7 +30,7 @@
198 + ../ntproba/libntproba.a
199 +
200 + PRE_TARGETDEPS += $$ARCHIVES
201 +-LIBS += $$ARCHIVES @LDFLAGS@ @LIBS@
202 ++LIBS += $$ARCHIVES @LDFLAGS@ @EXPAT_LIBS@ @CRYPTO_LIBS@ @LIBS@
203 +
204 + QMAKE_CC = @CC@
205 + QMAKE_CXX = @CXX@
206 +--- a/src/ntproba/Makefile.in
207 ++++ b/src/ntproba/Makefile.in
208 +@@ -17,6 +17,8 @@
209 +
210 + include ../common.mk
211 +
212 ++CPPFLAGS += $(EXPAT_CFLAGS) $(CRYPTO_CFLAGS)
213 ++
214 + all: libntproba.a
215 +
216 + libntproba.a: $(OBJECTS)
217 +--- a/src/samdump2/Makefile.in
218 ++++ b/src/samdump2/Makefile.in
219 +@@ -17,7 +17,7 @@
220 +
221 + include ../common.mk
222 +
223 +-CFLAGS += -I../core
224 ++CPPFLAGS += -I../core $(CRYPTO_CFLAGS)
225 +
226 + all: libsamdump2.a
227 +
228 +--- a/src/test/Makefile.in
229 ++++ b/src/test/Makefile.in
230 +@@ -17,7 +17,7 @@
231 +
232 + include ../common.mk
233 +
234 +-CFLAGS += -I../.. -I../core -I../ntproba
235 ++CPPFLAGS += -I../.. -I../core -I../ntproba
236 +
237 + ARCHIVES = \
238 + ../core/libophcrack.a \
239 +@@ -32,7 +32,7 @@
240 + %.a:
241 +
242 + test_%: test_%.o $(ARCHIVES)
243 +- $(CC) $^ -o $@ $(LDFLAGS)
244 ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(EXPAT_LIBS) $(CRYPTO_LIBS) $(LIBS)
245 +
246 + clean: clean_
247 + rm -f $(TARGETS)
248
249 diff --git a/app-crypt/ophcrack/files/ophcrack-ar.patch b/app-crypt/ophcrack/files/ophcrack-ar.patch
250 deleted file mode 100644
251 index 422c17398d20..000000000000
252 --- a/app-crypt/ophcrack/files/ophcrack-ar.patch
253 +++ /dev/null
254 @@ -1,13 +0,0 @@
255 -diff --git a/src/common.mk.in b/src/common.mk.in
256 -index 0f090a8..9c133e0 100644
257 ---- a/src/common.mk.in
258 -+++ b/src/common.mk.in
259 -@@ -32,7 +32,7 @@ OBJECTS = $(SOURCES:%.c=%.o)
260 - all:
261 -
262 - %.a:
263 -- ar r $@ $^
264 -+ $(AR) r $@ $^
265 - $(RANLIB) $@
266 -
267 - %.o: %.c
268
269 diff --git a/app-crypt/ophcrack/ophcrack-3.8.0.ebuild b/app-crypt/ophcrack/ophcrack-3.8.0-r1.ebuild
270 similarity index 54%
271 rename from app-crypt/ophcrack/ophcrack-3.8.0.ebuild
272 rename to app-crypt/ophcrack/ophcrack-3.8.0-r1.ebuild
273 index c74837410a94..2a8a1e16c775 100644
274 --- a/app-crypt/ophcrack/ophcrack-3.8.0.ebuild
275 +++ b/app-crypt/ophcrack/ophcrack-3.8.0-r1.ebuild
276 @@ -1,9 +1,9 @@
277 -# Copyright 1999-2022 Gentoo Authors
278 +# Copyright 1999-2023 Gentoo Authors
279 # Distributed under the terms of the GNU General Public License v2
280
281 -EAPI=7
282 +EAPI=8
283
284 -inherit desktop toolchain-funcs qmake-utils
285 +inherit autotools desktop qmake-utils xdg
286
287 DESCRIPTION="A time-memory-trade-off-cracker"
288 HOMEPAGE="https://ophcrack.sourceforge.io/"
289 @@ -12,15 +12,17 @@ SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}.tar.bz
290 LICENSE="GPL-2"
291 SLOT="0"
292 KEYWORDS="~amd64 ~x86"
293 -IUSE="debug qt5 +tables"
294 +IUSE="gui +tables"
295
296 DEPEND="
297 - dev-libs/openssl:0=
298 + dev-libs/openssl:=
299 dev-libs/expat
300 net-libs/netwib
301 - qt5? (
302 + gui? (
303 dev-qt/qtcharts:5
304 + dev-qt/qtcore:5
305 dev-qt/qtgui:5
306 + dev-qt/qtwidgets:5
307 )"
308 RDEPEND="
309 ${DEPEND}
310 @@ -29,22 +31,25 @@ BDEPEND="
311 app-arch/unzip
312 virtual/pkgconfig"
313
314 -PATCHES=( "${FILESDIR}"/ophcrack-ar.patch )
315 +PATCHES=( "${FILESDIR}"/${P}-buildsystem.patch )
316
317 -src_configure() {
318 - tc-export AR
319 +src_prepare() {
320 + default
321 + eautoreconf
322 +}
323
324 +src_configure() {
325 # bug #765229
326 - export PATH="$(qt5_get_bindir):${PATH}"
327 + use gui && export PATH="$(qt5_get_bindir):${PATH}"
328
329 - econf \
330 - $(use_enable debug) \
331 - $(use_enable qt5 gui)
332 + econf $(use_enable gui)
333 }
334
335 src_install() {
336 default
337
338 - newicon src/gui/pixmaps/os.xpm ophcrack.xpm
339 - make_desktop_entry "${PN}" OphCrack ophcrack
340 + if use gui; then
341 + newicon src/gui/pixmaps/os.xpm ophcrack.xpm
342 + make_desktop_entry "${PN}" OphCrack ophcrack
343 + fi
344 }