Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
e898ee31 by Steve Lhomme at 2022-09-28T09:25:33+02:00
contrib: tiff: fix touch call

bug from f0ae72304fef882cf0898d17386311f360ff515a

- - - - -
639277d5 by Steve Lhomme at 2022-09-28T09:25:33+02:00
contrib: zlib: use tarball from GitHub

The hash is the same.

- - - - -
ed2c9771 by Steve Lhomme at 2022-09-28T09:25:34+02:00
contrib: zlib: fix building examples on emscripten

- - - - -
4d6cba6e by Steve Lhomme at 2022-09-28T09:25:46+02:00
contrib: patch the pkg-config file during extraction

So we don't patch it at every run.

- - - - -
66fdd2d8 by Steve Lhomme at 2022-09-28T09:25:46+02:00
contrib: use a variable for the build dir and source dir from there

- - - - -
8d0461dd by Steve Lhomme at 2022-09-28T11:08:57+02:00
contrib: use the specific build directory variables

- - - - -
78bab2fc by Steve Lhomme at 2022-09-28T11:08:58+02:00
contrib: use a more specific name for the build folder

It should be safe to delete build folders in one call:
find . -mindepth 3 -maxdepth 4 -type d -name vlc_build -exec rm -rf {} \;

- - - - -
637d0042 by Steve Lhomme at 2022-09-28T11:08:58+02:00
contrib: call sed directly on the files to change

- - - - -


23 changed files:

- contrib/src/aom/rules.mak
- contrib/src/ass/rules.mak
- contrib/src/faad2/rules.mak
- contrib/src/flac/rules.mak
- contrib/src/gmp/rules.mak
- contrib/src/gnutls/rules.mak
- contrib/src/lame/rules.mak
- contrib/src/libtasn1/rules.mak
- contrib/src/mad/rules.mak
- contrib/src/main.mak
- contrib/src/ncurses/rules.mak
- contrib/src/protobuf/rules.mak
- contrib/src/qt/rules.mak
- contrib/src/regex/rules.mak
- contrib/src/rnnoise/rules.mak
- contrib/src/speex/rules.mak
- contrib/src/speexdsp/rules.mak
- contrib/src/tiff/rules.mak
- contrib/src/vpx/rules.mak
- contrib/src/vulkan-loader/rules.mak
- contrib/src/x262/rules.mak
- contrib/src/zlib/0001-Fix-mingw-static-library-name-on-mingw.patch
- contrib/src/zlib/rules.mak


Changes:

=====================================
contrib/src/aom/rules.mak
=====================================
@@ -80,6 +80,6 @@ endif
        $(CMAKECLEAN)
        $(HOSTVARS) $(CMAKE) $(AOM_CONF)
        +$(CMAKEBUILD)
-       $(call pkg_static,"build/aom.pc")
+       $(call pkg_static,"$(BUILD_DIRUNPACK)/aom.pc")
        +$(CMAKEBUILD) --target install
        touch $@


=====================================
contrib/src/ass/rules.mak
=====================================
@@ -36,6 +36,7 @@ $(TARBALLS)/libass-$(ASS_VERSION).tar.gz:
 
 libass: libass-$(ASS_VERSION).tar.gz .sum-ass
        $(UNPACK)
+       $(call pkg_static,"libass.pc.in")
        $(MOVE)
 
 DEPS_ass = freetype2 $(DEPS_freetype2) fribidi $(DEPS_fribidi) iconv 
$(DEPS_iconv)
@@ -65,6 +66,5 @@ endif
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(ASS_CONF)
        +$(MAKEBUILD)
-       $(call pkg_static,"_build/libass.pc")
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/faad2/rules.mak
=====================================
@@ -34,7 +34,7 @@ FAAD2_CONF := --without-drm
        $(RECONF)
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(FAAD2_CONF)
-       cd $</_build && sed -i.orig "s/shrext_cmds/shrext/g" libtool
+       sed -i.orig "s/shrext_cmds/shrext/g" $(BUILD_DIR)/libtool
        +$(MAKEBUILD) -C libfaad
        +$(MAKEBUILD) -C libfaad install
        touch $@


=====================================
contrib/src/flac/rules.mak
=====================================
@@ -21,7 +21,7 @@ ifdef HAVE_WINSTORE
        $(APPLY) $(SRC)/flac/no-createfilew.patch
 endif
        # disable building a tool we don't use
-       cd $(UNPACK_DIR) && sed -e 
's,add_subdirectory("microbench"),#add_subdirectory("microbench"),' -i.orig 
CMakeLists.txt
+       sed -e 
's,add_subdirectory("microbench"),#add_subdirectory("microbench"),' -i.orig 
$(UNPACK_DIR)/CMakeLists.txt
        $(call pkg_static,"src/libFLAC/flac.pc.in")
        $(MOVE)
 


=====================================
contrib/src/gmp/rules.mak
=====================================
@@ -29,7 +29,7 @@ gmp: gmp-$(GMP_VERSION).tar.xz .sum-gmp
        $(UNPACK)
        $(APPLY) $(SRC)/gmp/gmp-fix-asm-detection.patch
        # do not try the cross compiler to detect the build compiler
-       cd $(UNPACK_DIR) && sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc 
gcc c89 c99/cc gcc c89 c99/' acinclude.m4
+       sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc 
c89 c99/' $(UNPACK_DIR)/acinclude.m4
        $(MOVE)
 
 # GMP requires either GPLv2 or LGPLv3


=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -32,7 +32,7 @@ gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
        $(APPLY) 
$(SRC)/gnutls/0001-explicit_bzero-Do-not-call-SecureZeroMemory-on-UWP-b.patch
 
        # disable the dllimport in static linking (pkg-config --static doesn't 
handle Cflags.private)
-       cd $(UNPACK_DIR) && sed -i.orig -e s/"_SYM_EXPORT 
__declspec(dllimport)"/"_SYM_EXPORT"/g lib/includes/gnutls/gnutls.h.in
+       sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g 
$(UNPACK_DIR)/lib/includes/gnutls/gnutls.h.in
 
        # fix i686 UWP builds as they were using CertEnumCRLsInStore via 
invalid LoadLibrary
        $(APPLY) $(SRC)/gnutls/0001-fix-mingw64-detection.patch
@@ -87,7 +87,7 @@ endif
 .gnutls: gnutls
        $(MAKEBUILDDIR)
        $(GNUTLS_ENV) $(MAKECONFIGURE) $(GNUTLS_CONF)
-       $(call pkg_static,"_build/lib/gnutls.pc")
+       $(call pkg_static,"$(BUILD_DIRUNPACK)/lib/gnutls.pc")
        +$(MAKEBUILD) -C gl
        +$(MAKEBUILD) -C lib
        +$(MAKEBUILD) -C gl install


=====================================
contrib/src/lame/rules.mak
=====================================
@@ -18,7 +18,7 @@ endif
        $(APPLY) $(SRC)/lame/lame-fix-i386-on-aarch64.patch
        # Avoid relying on iconv.m4 from gettext, when reconfiguring.
        # This is only used by the frontend which we disable.
-       cd $(UNPACK_DIR) && sed -i.orig 's/^AM_ICONV/#&/' configure.in
+       sed -i.orig 's/^AM_ICONV/#&/' $(UNPACK_DIR)/configure.in
        $(UPDATE_AUTOCONFIG)
        $(MOVE)
 


=====================================
contrib/src/libtasn1/rules.mak
=====================================
@@ -17,7 +17,7 @@ libtasn1: libtasn1-$(LIBTASN1_VERSION).tar.gz .sum-libtasn1
        $(APPLY) $(SRC)/libtasn1/no-executables.patch
        $(APPLY) 
$(SRC)/libtasn1/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
        # on iOS for some reason _GNU_SOURCE is found in config.h but 
strverscmp() is not found
-       cd $(UNPACK_DIR) && sed -i.orig -e 's, -DASN1_BUILDING, -DASN1_BUILDING 
-D_GNU_SOURCE,' lib/Makefile.am
+       sed -i.orig -e 's, -DASN1_BUILDING, -DASN1_BUILDING -D_GNU_SOURCE,' 
$(UNPACK_DIR)/lib/Makefile.am
        $(MOVE)
 
 LIBTASN1_CONF := --disable-doc


=====================================
contrib/src/mad/rules.mak
=====================================
@@ -29,10 +29,9 @@ endif
 libmad: libmad-$(MAD_VERSION).tar.gz .sum-mad
        $(UNPACK)
 ifdef HAVE_DARWIN_OS
-       cd $@-$(MAD_VERSION) && sed \
-               -e 's%-march=i486%$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
+       sed -e 's%-march=i486%$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
                -e 's%-dynamiclib%-dynamiclib -arch $(ARCH)%' \
-               -i.orig configure
+               -i.orig $(UNPACK_DIR)/configure
 endif
 ifdef HAVE_IOS
        $(APPLY) $(SRC)/mad/mad-ios-asm.patch


=====================================
contrib/src/main.mak
=====================================
@@ -443,19 +443,24 @@ endif
 RECONF = mkdir -p -- $(PREFIX)/share/aclocal && \
        cd $< && $(AUTORECONF) -fiv $(ACLOCAL_AMFLAGS)
 
-MAKEBUILDDIR = mkdir -p $</_build && rm -f $</_build/config.status
-MAKEBUILD = $(MAKE) -C $</_build
-MAKECONFDIR = cd $</_build && $(HOSTVARS) ..
+BUILD_DIR = $</vlc_build
+BUILD_SRC := ..
+# build directory relative to UNPACK_DIR
+BUILD_DIRUNPACK = vlc_build
+
+MAKEBUILDDIR = mkdir -p $(BUILD_DIR) && rm -f $(BUILD_DIR)/config.status
+MAKEBUILD = $(MAKE) -C $(BUILD_DIR)
+MAKECONFDIR = cd $(BUILD_DIR) && $(HOSTVARS) $(BUILD_SRC)
 MAKECONFIGURE = $(MAKECONFDIR)/configure $(HOSTCONF)
 
 # Work around for 
https://lists.nongnu.org/archive/html/bug-gnulib/2020-05/msg00237.html
 # When using a single command, make might take a shortcut and fork/exec
 # itself instead of relying on a shell, but a bug in gnulib ends up
 # trying to execute a cmake folder when one is found in the PATH
-CMAKEBUILD = env cmake --build $</build
-CMAKECLEAN = rm -f $</build/CMakeCache.txt
+CMAKEBUILD = env cmake --build $(BUILD_DIR)
+CMAKECLEAN = rm -f $(BUILD_DIR)/CMakeCache.txt
 CMAKE = cmake -S $< -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
-               -B $</build \
+               -B $(BUILD_DIR) \
                -DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX) \
                -DBUILD_SHARED_LIBS:BOOL=OFF \
                -DCMAKE_INSTALL_LIBDIR:STRING=lib
@@ -471,7 +476,7 @@ ifeq ($(V),1)
 CMAKE += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
 endif
 
-MESONFLAGS = $</build $< --default-library static --prefix "$(PREFIX)" \
+MESONFLAGS = $(BUILD_DIR) $< --default-library static --prefix "$(PREFIX)" \
        --backend ninja -Dlibdir=lib
 ifndef WITH_OPTIMIZATION
 MESONFLAGS += --buildtype debug
@@ -504,8 +509,8 @@ MESON = env -i PATH="$(PREFIX)/bin:$(PATH)" \
 else
 MESON = meson $(MESONFLAGS)
 endif
-MESONCLEAN = rm -rf $</build/meson-private
-MESONBUILD = meson compile -C $</build $(MESON_BUILD) && meson install -C 
$</build
+MESONCLEAN = rm -rf $(BUILD_DIR)/meson-private
+MESONBUILD = meson compile -C $(BUILD_DIR) $(MESON_BUILD) && meson install -C 
$(BUILD_DIR)
 
 ifdef GPL
 REQUIRE_GPL =


=====================================
contrib/src/ncurses/rules.mak
=====================================
@@ -39,5 +39,5 @@ endif
        +$(MAKEBUILD) -C include -j1
        +$(MAKEBUILD) -C include install
        +$(MAKEBUILD) -C misc pc-files
-       install $</_build/misc/ncursesw.pc "$(PREFIX)/lib/pkgconfig"
+       install $(BUILD_DIR)/misc/ncursesw.pc "$(PREFIX)/lib/pkgconfig"
        touch $@


=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -52,7 +52,7 @@ protoc: protoc-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protoc
 .protoc: protoc
        $(RECONF)
        $(MAKEBUILDDIR)
-       cd $</_build && $(BUILDVARS) ../configure $(BUILDTOOLCONF) 
$(PROTOCVARS) $(PROTOCCONF)
+       cd $(BUILD_DIR) && $(BUILDVARS) $(BUILD_SRC)/configure $(BUILDTOOLCONF) 
$(PROTOCVARS) $(PROTOCCONF)
        +$(MAKEBUILD)
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/qt/rules.mak
=====================================
@@ -112,7 +112,7 @@ QT_QINSTALL="$(shell cd $(SRC)/qt/; pwd 
-P)/install_wrapper.sh"
 
 .qt: qt
        # Prevent all Qt contribs from generating and installing libtool .la 
files
-       cd $< && sed -i.orig "/CONFIG/ s/ create_libtool/ -create_libtool/g" 
mkspecs/features/qt_module.prf
+       sed -i.orig "/CONFIG/ s/ create_libtool/ -create_libtool/g" 
$(UNPACK_DIR)/mkspecs/features/qt_module.prf
        +cd $< && $(QT_ENV_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG) 
-prefix $(PREFIX) -hostprefix $(PREFIX)/lib/qt5
        # Make && Install libraries
        cd $< && $(QT_ENV_VARS) $(MAKE)


=====================================
contrib/src/regex/rules.mak
=====================================
@@ -22,7 +22,7 @@ regex: regex-$(REGEX_VERSION).tar.gz .sum-regex
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE)
        +$(MAKEBUILD) subirs=
-       cd $</_build && $(AR) rcvu libregex.a regex.o && $(RANLIB) libregex.a
+       cd $(BUILD_DIR) && $(AR) rcvu libregex.a regex.o && $(RANLIB) libregex.a
        mkdir -p $(PREFIX)/include/ && cp $</regex.h $(PREFIX)/include
-       mkdir -p $(PREFIX)/lib/ && cp $</_build/libregex.a $(PREFIX)/lib
+       mkdir -p $(PREFIX)/lib/ && cp $(BUILD_DIR)/libregex.a $(PREFIX)/lib
        touch $@


=====================================
contrib/src/rnnoise/rules.mak
=====================================
@@ -29,6 +29,6 @@ RNNOISE_CONF := --disable-examples --disable-doc
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(RNNOISE_CONF)
        +$(MAKEBUILD)
-       $(call pkg_static,"_build/rnnoise.pc")
+       $(call pkg_static,"$(BUILD_DIRUNPACK)/rnnoise.pc")
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/speex/rules.mak
=====================================
@@ -15,6 +15,7 @@ $(TARBALLS)/speex-$(SPEEX_VERSION).tar.gz:
 
 speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
        $(UNPACK)
+       $(call pkg_static,"speex.pc.in")
        $(MOVE)
 
 SPEEX_CONF := --disable-binaries
@@ -32,6 +33,5 @@ endif
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(SPEEX_CONF)
        +$(MAKEBUILD)
-       $(call pkg_static,"_build/speex.pc")
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/speexdsp/rules.mak
=====================================
@@ -15,6 +15,7 @@ $(TARBALLS)/speexdsp-$(SPEEXDSP_VERSION).tar.gz:
 
 speexdsp: speexdsp-$(SPEEXDSP_VERSION).tar.gz .sum-speexdsp
        $(UNPACK)
+       $(call pkg_static,"speexdsp.pc.in")
        $(MOVE)
 
 SPEEXDSP_CONF := --enable-resample-full-sinc-table --disable-examples
@@ -37,6 +38,5 @@ endif
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(SPEEXDSP_CONF)
        +$(MAKEBUILD)
-       $(call pkg_static,"_build/speexdsp.pc")
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/tiff/rules.mak
=====================================
@@ -24,4 +24,5 @@ tiff: tiff-$(TIFF_VERSION).tar.gz .sum-tiff
                --without-x
        +$(MAKEBUILD) -C port
        +$(MAKEBUILD) -C libtiff
-       +$(MAKEBUILD) -C libtiff install        touch $@
+       +$(MAKEBUILD) -C libtiff install
+       touch $@


=====================================
contrib/src/vpx/rules.mak
=====================================
@@ -165,9 +165,9 @@ endif
 .vpx: libvpx
        rm -rf $(PREFIX)/include/vpx
        $(MAKEBUILDDIR)
-       cd $</_build && LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS) 
$(VPX_HOSTVARS) ../configure --target=$(VPX_TARGET) \
+       cd $(BUILD_DIR) && LDFLAGS="$(VPX_LDFLAGS)" CROSS=$(VPX_CROSS) 
$(VPX_HOSTVARS) $(BUILD_SRC)/configure --target=$(VPX_TARGET) \
                $(VPX_CONF) --prefix=$(PREFIX)
        +CONFIG_DEBUG=1 $(MAKEBUILD)
-       $(call pkg_static,"_build/vpx.pc")
+       $(call pkg_static,"$(BUILD_DIRUNPACK)/vpx.pc")
        +CONFIG_DEBUG=1 $(MAKEBUILD) install
        touch $@


=====================================
contrib/src/vulkan-loader/rules.mak
=====================================
@@ -46,6 +46,7 @@ vulkan-loader: Vulkan-Loader-$(VULKAN_LOADER_VERSION).tar.gz 
.sum-vulkan-loader
 ifeq ($(HOST),i686-w64-mingw32)
        cp -v $(SRC)/vulkan-loader/libvulkan-32.def 
$(UNPACK_DIR)/loader/vulkan-1.def
 endif
+       $(call pkg_static,"loader/vulkan.pc.in")
        $(MOVE)
 
 # Needed for the loader's cmake script to find the registry files
@@ -60,10 +61,9 @@ VULKAN_LOADER_ENV_CONF = \
 ifdef HAVE_WIN32
 # CMake will generate a .pc file with -lvulkan even if the static library
 # generated is libvulkan.dll.a. It also forget to link with libcfgmgr32.
-       cd $< && sed -i.orig -e "s,-lvulkan,-lvulkan.dll -lcfgmgr32," 
build/loader/vulkan.pc
+       sed -i.orig -e "s,-lvulkan,-lvulkan.dll -lcfgmgr32," 
$(BUILD_DIR)/loader/vulkan.pc
 endif
 
-       $(call pkg_static,"build/loader/vulkan.pc")
        +$(CMAKEBUILD)
        +$(CMAKEBUILD) --target install
        touch $@


=====================================
contrib/src/x262/rules.mak
=====================================
@@ -27,13 +27,13 @@ x262: $(TARBALLS)/x262-git.tar.xz .sum-x262
 
 .x262: x262
        $(REQUIRE_GPL)
-       cd $< && sed -i -e 's/x264/x262/g' configure
-       cd $< && sed -i -e 's/x264_config/x262_config/g' *.h Makefile *.c
+       sed -i -e 's/x264/x262/g' $</configure
+       sed -i -e 's/x264_config/x262_config/g' *.h Makefile $(UNPACK_DIR)/*.c
        $(MAKEBUILDDIR)
        $(MAKECONFIGURE) $(X264CONF)
-       cd $</_build && sed -i -e 's/x264.pc/x262.pc/g' Makefile
-       cd $</_build && sed -i -e 's/x264.h/x262.h/g' Makefile
+       sed -i -e 's/x264.pc/x262.pc/g' $(BUILD_DIR)/Makefile
+       sed -i -e 's/x264.h/x262.h/g' $(BUILD_DIR)/Makefile
        +$(MAKEBUILD)
-       cd $</_build && cp x264.h x262.h
+       cp $(BUILD_DIR)/x264.h $(BUILD_DIR)/x262.h
        +$(MAKEBUILD) install
        touch $@


=====================================
contrib/src/zlib/0001-Fix-mingw-static-library-name-on-mingw.patch
=====================================
@@ -17,11 +17,11 @@ index e6fbb37..3fa3046 100644
  endif()
 
 -if(UNIX)
-+if(UNIX OR MINGW)
++if(UNIX OR MINGW OR EMSCRIPTEN)
      # On unix-like platforms the library is almost always called libz
     set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
 -   if(NOT APPLE)
-+   if(NOT APPLE AND NOT MINGW)
++   if(NOT APPLE AND NOT MINGW AND NOT EMSCRIPTEN)
       set_target_properties(zlib PROPERTIES LINK_FLAGS 
"-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
     endif()
  elseif(BUILD_SHARED_LIBS AND WIN32)


=====================================
contrib/src/zlib/rules.mak
=====================================
@@ -1,6 +1,6 @@
 # ZLIB
 ZLIB_VERSION := 1.2.12
-ZLIB_URL := https://www.zlib.net/zlib-$(ZLIB_VERSION).tar.gz
+ZLIB_URL := $(GITHUB)/madler/zlib/archive/refs/tags/v$(ZLIB_VERSION).tar.gz
 
 PKGS += zlib
 ifeq ($(call need_pkg,"zlib"),)
@@ -16,7 +16,7 @@ zlib: zlib-$(ZLIB_VERSION).tar.gz .sum-zlib
        $(UNPACK)
        $(APPLY) $(SRC)/zlib/0001-Fix-mingw-static-library-name-on-mingw.patch
        # disable the installation of the dynamic library since there's no 
option
-       cd $(UNPACK_DIR) && sed -e 's,install(TARGETS zlib 
zlibstatic,install(TARGETS zlibstatic,' -i.orig CMakeLists.txt
+       sed -e 's,install(TARGETS zlib zlibstatic,install(TARGETS zlibstatic,' 
-i.orig $(UNPACK_DIR)/CMakeLists.txt
        $(MOVE)
 
 ZLIB_CONF = -DINSTALL_PKGCONFIG_DIR:STRING=$(PREFIX)/lib/pkgconfig



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/fe07979f55370b6296085a25083ed319130ca980...637d00420fa1a3f4b71215ba869cb5d05bb7bead

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/compare/fe07979f55370b6296085a25083ed319130ca980...637d00420fa1a3f4b71215ba869cb5d05bb7bead
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to