libvpx-win-configure.patch 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. diff -ruN libvpx/build/make/configure.sh patched/build/make/configure.sh
  2. --- libvpx/build/make/configure.sh 2019-02-13 16:56:48.972857636 +0100
  3. +++ patched/build/make/configure.sh 2019-02-13 16:50:37.995967583 +0100
  4. @@ -1426,11 +1426,13 @@
  5. win32)
  6. add_asflags -f win32
  7. enabled debug && add_asflags -g cv8
  8. + add_ldflags "-Wl,-no-undefined"
  9. EXE_SFX=.exe
  10. ;;
  11. win64)
  12. add_asflags -f win64
  13. enabled debug && add_asflags -g cv8
  14. + add_ldflags "-Wl,-no-undefined"
  15. EXE_SFX=.exe
  16. ;;
  17. linux*|solaris*|android*)
  18. diff -ruN libvpx/build/make/Makefile patched/build/make/Makefile
  19. --- libvpx/build/make/Makefile 2019-02-13 16:56:48.972857636 +0100
  20. +++ patched/build/make/Makefile 2019-02-13 16:50:37.995967583 +0100
  21. @@ -304,6 +304,7 @@
  22. $(if $(quiet),@echo " [LD] $$@")
  23. $(qexec)$$(LD) -shared $$(LDFLAGS) \
  24. -Wl,--no-undefined -Wl,-soname,$$(SONAME) \
  25. + -Wl,-out-implib,libvpx.dll.a \
  26. -Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
  27. $$(filter %.o,$$^) $$(extralibs)
  28. endef
  29. @@ -388,7 +389,7 @@
  30. .libs: $(LIBS)
  31. @touch $@
  32. $(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
  33. -$(foreach lib,$(filter %so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
  34. +$(foreach lib,$(filter %dll.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
  35. $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dylib,$(LIBS)),$(eval $(call dl_template,$(lib))))
  36. $(foreach lib,$(filter %$(SO_VERSION_MAJOR).dll,$(LIBS)),$(eval $(call dll_template,$(lib))))
  37. diff -ruN libvpx/configure patched/configure
  38. --- libvpx/configure 2019-02-13 16:56:49.162860897 +0100
  39. +++ patched/configure 2019-02-13 16:53:03.328719607 +0100
  40. @@ -513,23 +513,23 @@
  41. }
  42. process_detect() {
  43. - if enabled shared; then
  44. + #if enabled shared; then
  45. # Can only build shared libs on a subset of platforms. Doing this check
  46. # here rather than at option parse time because the target auto-detect
  47. # magic happens after the command line has been parsed.
  48. - case "${tgt_os}" in
  49. - linux|os2|solaris|darwin*|iphonesimulator*)
  50. + # case "${tgt_os}" in
  51. + # linux|os2|solaris|darwin*|iphonesimulator*)
  52. # Supported platforms
  53. - ;;
  54. - *)
  55. - if enabled gnu; then
  56. - echo "--enable-shared is only supported on ELF; assuming this is OK"
  57. - else
  58. - die "--enable-shared only supported on ELF, OS/2, and Darwin for now"
  59. - fi
  60. - ;;
  61. - esac
  62. - fi
  63. + # ;;
  64. + # *)
  65. + # if enabled gnu; then
  66. + # echo "--enable-shared is only supported on ELF; assuming this is OK"
  67. + # else
  68. + # die "--enable-shared only supported on ELF, OS/2, and Darwin for now"
  69. + # fi
  70. + # ;;
  71. + # esac
  72. + #fi
  73. if [ -z "$CC" ] || enabled external_build; then
  74. echo "Bypassing toolchain for environment detection."
  75. enable_feature external_build
  76. diff -ruN libvpx/examples.mk patched/examples.mk
  77. --- libvpx/examples.mk 2019-02-13 16:56:49.162860897 +0100
  78. +++ patched/examples.mk 2019-02-13 16:50:37.995967583 +0100
  79. @@ -315,7 +315,7 @@
  80. ifneq ($(filter os2%,$(TGT_OS)),)
  81. SHARED_LIB_SUF=_dll.a
  82. else
  83. -SHARED_LIB_SUF=.so
  84. +SHARED_LIB_SUF=.dll.a
  85. endif
  86. endif
  87. CODEC_LIB_SUF=$(if $(CONFIG_SHARED),$(SHARED_LIB_SUF),.a)
  88. diff -ruN libvpx/libs.mk patched/libs.mk
  89. --- libvpx/libs.mk 2019-02-13 16:56:48.972857636 +0100
  90. +++ patched/libs.mk 2019-02-13 16:50:37.995967583 +0100
  91. @@ -256,12 +256,12 @@
  92. LIBVPX_SO_SYMLINKS :=
  93. LIBVPX_SO_IMPLIB := libvpx_dll.a
  94. else
  95. -LIBVPX_SO := libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
  96. -SHARED_LIB_SUF := .so
  97. +LIBVPX_SO := libvpx.dll.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR).$(SO_VERSION_PATCH)
  98. +SHARED_LIB_SUF := .dll
  99. EXPORT_FILE := libvpx.ver
  100. LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
  101. - libvpx.so libvpx.so.$(SO_VERSION_MAJOR) \
  102. - libvpx.so.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
  103. + libvpx.dll libvpx.dll.$(SO_VERSION_MAJOR) \
  104. + libvpx.dll.$(SO_VERSION_MAJOR).$(SO_VERSION_MINOR))
  105. endif
  106. endif
  107. endif
  108. @@ -271,7 +271,7 @@
  109. $(if $(LIBVPX_SO_IMPLIB), $(BUILD_PFX)$(LIBVPX_SO_IMPLIB))
  110. $(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) $(EXPORT_FILE)
  111. $(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
  112. -$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(SO_VERSION_MAJOR)
  113. +$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.dll.$(SO_VERSION_MAJOR)
  114. $(BUILD_PFX)$(LIBVPX_SO): EXPORTS_FILE = $(EXPORT_FILE)
  115. libvpx.def: $(call enabled,CODEC_EXPORTS)