[vlc-commits] [Git][videolan/vlc][master] contrib: qtvlcdeps: build as a regular contrib
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Apr 10 07:46:06 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
d6846d45 by Steve Lhomme at 2024-04-10T04:44:05+00:00
contrib: qtvlcdeps: build as a regular contrib
- Don't write in /tmp
- Use fancy names for each main directory
- set the proper prefix
- unpack in a temporary folder
- don't edit inside the .in file
- - - - -
4 changed files:
- − contrib/src/qtvlcdeps/SHA512SUMS
- − contrib/src/qtvlcdeps/dummy
- contrib/src/qtvlcdeps/qtvlcdeps.pc.in
- contrib/src/qtvlcdeps/rules.mak
Changes:
=====================================
contrib/src/qtvlcdeps/SHA512SUMS deleted
=====================================
@@ -1 +0,0 @@
-cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e .dummy-qtvlcdeps
=====================================
contrib/src/qtvlcdeps/dummy deleted
=====================================
=====================================
contrib/src/qtvlcdeps/qtvlcdeps.pc.in
=====================================
@@ -1,6 +1,8 @@
-prefix=/
+prefix=@@CONTRIB_PREFIX@@
exec_prefix=${prefix}
-libdir=/
+libdir=${prefix}/lib
+pluginsdir=${prefix}/plugins
+qmldir=${prefix}/qml
Name: qtvlcdeps
Description: Qt dependencies for VLC media player
=====================================
contrib/src/qtvlcdeps/rules.mak
=====================================
@@ -14,18 +14,29 @@ ifeq ($(call need_pkg,"qtvlcdeps >= 0.1"),)
PKGS_FOUND += qtvlcdeps
endif
-$(TARBALLS)/.dummy-qtvlcdeps:
- rm -f $(TARBALLS)/.dummy-qtvlcdeps
- cp -f $(SRC)/qtvlcdeps/dummy $(TARBALLS)/.dummy-qtvlcdeps
-
-.sum-qtvlcdeps: .dummy-qtvlcdeps
-
-QMAKE := $(PREFIX)/bin/qmake
-
-.qtvlcdeps:
- rm -rf /tmp/vlc-qt-deps
- $(QMAKE) $(SRC)/qtvlcdeps -o /tmp/vlc-qt-deps/deps
- rm -f $(PREFIX)/lib/pkgconfig/qtvlcdeps.pc
- cp -f $(SRC)/qtvlcdeps/qtvlcdeps.pc.in $(PREFIX)/lib/pkgconfig/qtvlcdeps.pc
- QT_LIBS=$$(awk -F '=' '/LIBS/ {print $$2; exit}' /tmp/vlc-qt-deps/deps.Release); \
- sed -i "s|%1|$$QT_LIBS|g" $(PREFIX)/lib/pkgconfig/qtvlcdeps.pc
+QT_VLC_DEP_SOURCES := Imports.qml Imports.qrc qtvlcdeps.pc.in vlcdeps.pro
+
+.sum-qtvlcdeps:
+ touch $@
+
+qtvlcdeps: UNPACK_DIR=qtvlcdeps-unpack
+qtvlcdeps:
+ $(RM) -R $@ && mkdir -p $(UNPACK_DIR)
+ for f in $(QT_VLC_DEP_SOURCES) ; do \
+ cp -f $(SRC)/qtvlcdeps/$$f $(UNPACK_DIR) ; \
+ done
+ $(MOVE)
+
+.qtvlcdeps: qtvlcdeps
+ rm -rf $</Makefile.Release
+ $(BUILDPREFIX)/bin/qmake6 -qtconf $(PREFIX)/bin/target_qt.conf $(SRC)/qtvlcdeps -o $<
+ QT_LIBS=$$(awk -F '=' '/LIBS/ {print $$2; exit}' $</Makefile.Release); \
+ cat $</qtvlcdeps.pc.in | \
+ sed "s|%1|$$QT_LIBS|" | \
+ sed "s|$(PREFIX)/lib/|$$\{libdir\}/|g" | \
+ sed "s|$(PREFIX)/plugins/|$$\{pluginsdir\}/|g" | \
+ sed "s|$(PREFIX)/qml/|$$\{qmldir\}/|g" | \
+ sed "s|$(PREFIX)/|$$\{prefix\}/|g" | \
+ sed "s|@@CONTRIB_PREFIX@@|$(PREFIX)|" > $</qtvlcdeps.pc
+ install -d $(PREFIX)/lib/pkgconfig && install $</qtvlcdeps.pc $(PREFIX)/lib/pkgconfig
+ touch $@
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d6846d458b4e7505de3b3dd03dd4888b9fc7648a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d6846d458b4e7505de3b3dd03dd4888b9fc7648a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list