Skip to content
Browse files

fix openssl.pc to use -lz for Libs when doing static linking

  • Loading branch information...
1 parent 48725ec commit d768e9e747115cbff7827d88e9bf8f036ed56f4b @mpapis mpapis committed Aug 2, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 openssl/shell/functions
View
21 openssl/shell/functions
@@ -13,3 +13,24 @@ openssl_preconfigure()
then __sm.package.configure.flags shared
fi
}
+
+openssl_postinstall()
+{
+ if
+ (( ${static_flag:-0} == 0 ))
+ then
+ # This looks like openssl bug - it requires -lz when linking static
+ # but it is not available in the default ... not sure what to do with it
+ typeset __pc_file="${install_path}/lib/pkgconfig/openssl.pc"
+ __sm.files.contain 'Libs:.*-lz' "${__pc_file}" ||
+ {
+ sed -e '/^Libs:/ s/Libs:/Libs: -lz/' < "${__pc_file}" > "${__pc_file}.replaced" &&
+ mv "${__pc_file}.replaced" "${__pc_file}" ||
+ {
+ typeset __result=$?
+ rm -f "${__pc_file}.replaced"
+ return ${__result}
+ }
+ }
+ fi
+}

0 comments on commit d768e9e

Please sign in to comment.
Something went wrong with that request. Please try again.