Skip to content

Commit

Permalink
Patch APR to remove crypt dependency
Browse files Browse the repository at this point in the history
Motivation:

We dont use any APR features that uses libcrypt so we can safely not link against it. This resolves various issues as some distributions otherwise need the extra installation of libxcrypt-compat etc.

Modifications:

- Add patchfile for APR configure.in to remove linking against libcrypt
- Patch APR during build

Result:

Fixes #703
  • Loading branch information
normanmaurer committed Jan 9, 2023
1 parent a37760f commit 6040147
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions patches/apr_crypt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- configure.in.old 2023-01-09 14:22:19
+++ configure.in 2023-01-09 14:22:43
@@ -729,7 +729,6 @@
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(gethostname, nsl)
AC_SEARCH_LIBS(socket, socket)
- AC_SEARCH_LIBS(crypt, crypt ufc)
AC_CHECK_LIB(truerand, main)
AC_SEARCH_LIBS(modf, m)
;;
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@
</then>
</if>

<echo message="Patching APR to not link against libcrypt" />
<patch patchfile="${project.basedir}/../patches/apr_crypt.patch" strip="0" dir="${aprSourceDir}" />
<exec executable="buildconf" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true" />

<if>
<equals arg1="${osxCrossCompile}" arg2="true" />
<then>
Expand Down

0 comments on commit 6040147

Please sign in to comment.