patch-libxmlsec_openbsd_patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. $OpenBSD: patch-libxmlsec_openbsd_patch,v 1.2 2014/10/10 17:13:10 robert Exp $
  2. --- libxmlsec/openbsd.patch.orig.port Sat Sep 13 15:03:00 2014
  3. +++ libxmlsec/openbsd.patch Sat Sep 13 15:03:00 2014
  4. @@ -0,0 +1,158 @@
  5. +--- misc/xmlsec1-1.2.14/configure.in 2009-09-29 15:55:33.282288142 +0200
  6. ++++ misc/build/xmlsec1-1.2.14/configure.in 2009-09-29 15:49:39.614223428 +0200
  7. +@@ -33,6 +33,8 @@
  8. + AC_HEADER_STDC
  9. +
  10. + LT_INIT
  11. ++dnl force the right implib extension for mingw
  12. ++libext=dll.a
  13. +
  14. + dnl
  15. + dnl Find programs
  16. +@@ -671,7 +671,9 @@
  17. + done
  18. +
  19. + for dir in $ac_nss_lib_dir ; do
  20. +- if test -f $dir/libnspr4.so -o -f $dir/libnspr4.dylib ; then
  21. ++ case $host_os in
  22. ++ cygwin* | mingw* | pw32*)
  23. ++ if test -f $dir/libnspr4.$libext ; then
  24. + dnl do not add -L/usr/lib because compiler does it anyway
  25. + if test "z$dir" = "z/usr/lib" ; then
  26. + NSPR_LIBS="$NSPR_LIBS_LIST"
  27. +@@ -685,6 +687,26 @@
  28. + NSPR_LIBS_FOUND="yes"
  29. + break
  30. + fi
  31. ++ ;;
  32. ++
  33. ++ *)
  34. ++
  35. ++ if test -f $dir/libnspr4.so -o -f $dir/libnspr4.dylib ; then
  36. ++ dnl do not add -L/usr/lib because compiler does it anyway
  37. ++ if test "z$dir" = "z/usr/lib" ; then
  38. ++ NSPR_LIBS="$NSPR_LIBS_LIST"
  39. ++ else
  40. ++ if test "z$with_gnu_ld" = "zyes" ; then
  41. ++ NSPR_LIBS="-Wl,-rpath-link -Wl,$dir -L$dir $NSPR_LIBS_LIST"
  42. ++ else
  43. ++ NSPR_LIBS="-L$dir $NSPR_LIBS_LIST"
  44. ++ fi
  45. ++ fi
  46. ++ NSPR_LIBS_FOUND="yes"
  47. ++ break
  48. ++ fi
  49. ++ ;;
  50. ++ esac
  51. + done
  52. + fi
  53. +
  54. +@@ -742,6 +764,25 @@
  55. + done
  56. +
  57. + for dir in $ac_nss_lib_dir ; do
  58. ++ case $host_os in
  59. ++ cygwin* | mingw* | pw32*)
  60. ++ if test -f $dir/libnss3.$libext ; then
  61. ++ dnl do not add -L/usr/lib because compiler does it anyway
  62. ++ if test "z$dir" = "z/usr/lib" ; then
  63. ++ NSS_LIBS="$NSS_LIBS_LIST"
  64. ++ else
  65. ++ if test "z$with_gnu_ld" = "zyes" ; then
  66. ++ NSS_LIBS="-Wl,-rpath-link -Wl,$dir -L$dir $NSS_LIBS_LIST"
  67. ++ else
  68. ++ NSS_LIBS="-L$dir $NSS_LIBS_LIST"
  69. ++ fi
  70. ++ fi
  71. ++ NSS_LIBS_FOUND="yes"
  72. ++ break
  73. ++ fi
  74. ++ ;;
  75. ++
  76. ++ *)
  77. + if test -f $dir/libnss3.so -o -f $dir/libnss3.dylib ; then
  78. + dnl do not add -L/usr/lib because compiler does it anyway
  79. + if test "z$dir" = "z/usr/lib" ; then
  80. +@@ -756,6 +797,8 @@
  81. + NSS_LIBS_FOUND="yes"
  82. + break
  83. + fi
  84. ++ ;;
  85. ++ esac
  86. + done
  87. + fi
  88. +
  89. +@@ -926,7 +969,7 @@
  90. + dnl cannot detect __stdcall functions
  91. + dnl AC_CHECK_LIB(crypt32, CertOpenStore, ....
  92. + LIBS_SAVE="$LIBS"
  93. +- LIBS="$LIBS -lcrypt32"
  94. ++ LIBS="$LIBS ${PSDK_HOME}/lib/crypt32.lib"
  95. + AC_MSG_CHECKING(for mscrypto libraries)
  96. + AC_LINK_IFELSE([
  97. + #include <windows.h>
  98. +@@ -943,15 +986,7 @@
  99. + XMLSEC_NO_MSCRYPTO="0"
  100. +
  101. + MSCRYPTO_CFLAGS="$MSCRYPTO_CFLAGS -DXMLSEC_CRYPTO_MSCRYPTO=1"
  102. +- case $host in
  103. +- *-*-mingw*)
  104. +- dnl since mingw crypt32 library is limited
  105. +- dnl we use own def-file
  106. +- MSCRYPTO_LIBS='-Wl,$(srcdir)/mingw-crypt32.def';;
  107. +- *)
  108. +- MSCRYPTO_LIBS="-lcrypt32";;
  109. +- esac
  110. +-
  111. ++ MSCRYPTO_LIBS="${PSDK_HOME}/lib/crypt32.lib"
  112. + dnl first crypto library is default one
  113. + if test "z$XMLSEC_CRYPTO" = "z" ; then
  114. + XMLSEC_CRYPTO="mscrypto"
  115. +--- misc/xmlsec1-1.2.14/ltmain.sh 2009-06-25 22:53:19.000000000 +0200
  116. ++++ misc/build/xmlsec1-1.2.14/ltmain.sh 2009-09-29 15:49:39.628349554 +0200
  117. +@@ -4868,6 +4868,11 @@
  118. + fi
  119. + ;;
  120. +
  121. ++ *.lib)
  122. ++ deplibs="$deplibs $arg"
  123. ++ continue
  124. ++ ;;
  125. ++
  126. + *.$libext)
  127. + # An archive.
  128. + deplibs="$deplibs $arg"
  129. +--- misc/xmlsec1-1.2.14/src/nss/keywrapers.c 2009-09-29 15:55:33.430875248 +0200
  130. ++++ misc/build/xmlsec1-1.2.14/src/nss/keywrapers.c 2009-09-29 15:49:39.749963247 +0200
  131. +@@ -1126,6 +1126,7 @@
  132. + NULL, /* void* reserved1; */
  133. + };
  134. +
  135. ++#ifndef __OpenBSD__
  136. + /**
  137. + * xmlSecNssTransformKWAes128GetKlass:
  138. + *
  139. +@@ -1160,6 +1161,7 @@
  140. + xmlSecNssTransformKWAes256GetKlass(void) {
  141. + return(&xmlSecNssKWAes256Klass);
  142. + }
  143. ++#endif /* __OpenBSD__ */
  144. +
  145. + #endif /* XMLSEC_NO_AES */
  146. +
  147. +@@ -1197,6 +1199,7 @@
  148. + NULL, /* void* reserved1; */
  149. + };
  150. +
  151. ++#ifndef __OpenBSD__
  152. + /**
  153. + * xmlSecNssTransformKWDes3GetKlass:
  154. + *
  155. +@@ -1208,6 +1211,7 @@
  156. + xmlSecNssTransformKWDes3GetKlass(void) {
  157. + return(&xmlSecNssKWDes3Klass);
  158. + }
  159. ++#endif /* __OpenBSD__ */
  160. +
  161. + #endif /* XMLSEC_NO_DES */
  162. +