[vlc-devel] [PATCH 3/3] contrib: qt: build less things

Steve Lhomme robux4 at ycbcr.xyz
Mon Mar 9 15:35:17 CET 2020


For now it was just a quick edit of the options. I suppose we could 
tweak Qt to compile just what we want to use. With Qml being dynamic it 
will be harder to spot what we really need or not. We might add code 
later that works on Linux but we disabled the feature in the past.

So I think it's probably not worth spending too much time trying to 
remove every tiny bit of Qt and in particular the additional modules.

Also I did the move to 5.12.7 for 3.0. I suppose we'll bump the 4.0 
version soon and things might be different again.

On 2020-03-09 15:19, Pierre Lamot wrote:
> Hi,
> 
> If you wish to disable unused stuff, there are other features you can 
> disable in qtdeclarative/qtquickcontrols2.
> Some feature might be disabled in qt as well but it should be done with 
> care as there are many inner dependencies.
> 
> I have this in a local patch
> 
> (though -no-feature-qml-debug, may be kept for non-release builds)
> 
> --- a/contrib/src/qtdeclarative/rules.mak
> +++ b/contrib/src/qtdeclarative/rules.mak
> @@ -23,9 +23,13 @@ qtdeclarative: 
> qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum
>          $(UNPACK)
>          $(MOVE)
> 
> +QT_DECLARATIVE_CONFIG := \
> +     -no-feature-qml-debug \
> +     -no-feature-quick-designer
> +
>   .qtdeclarative: qtdeclarative
>          # Generate Makefile & src/Makefile
> -       cd $< && $(PREFIX)/bin/qmake
> +       cd $< && $(PREFIX)/bin/qmake -- ${QT_DECLARATIVE_CONFIG}
>          cd $</src && $(PREFIX)/bin/qmake -o Makefile src.pro
>          # Build & install only what we require
>          # Invoke the build rules one at a time as some rule 
> dependencies seem to be broken
> diff --git a/contrib/src/qtquickcontrols2/rules.mak 
> b/contrib/src/qtquickcontrols2/rules.mak
> index e2c024f648..3e23cd353e 100644
> --- a/contrib/src/qtquickcontrols2/rules.mak
> +++ b/contrib/src/qtquickcontrols2/rules.mak
> @@ -24,8 +24,14 @@ qtquickcontrols2: 
> qtquickcontrols2-everywhere-src-$(QTQC2_VERSION).tar.xz .sum-q
>          $(UNPACK)
>          $(MOVE)
> 
> +QUICK_CONTROL_CONFIG := \
> +    -no-feature-quicktemplates2-multitouch \
> +    -no-feature-quickcontrols2-universal \
> +    -no-feature-quickcontrols2-material \
> +    -no-feature-quickcontrols2-imagine
> +
>   .qtquickcontrols2: qtquickcontrols2
> -       cd $< && $(PREFIX)/bin/qmake
> +       cd $< && $(PREFIX)/bin/qmake -- ${QUICK_CONTROL_CONFIG}
>          # Make && Install libraries
>          cd $< && $(MAKE)
>          cd $< && $(MAKE) -C src sub-quickcontrols2-install_subtargets 
> sub-imports-install_subtargets
> 
> 
> 
> 
> 
> 
> 
> On 2020-03-09 14:10, Steve Lhomme wrote:
>> - we can use whatever zlib is available
>> - we don't need to build the test framework
>> - make sure we don't build the shared version
>> - attempt to disabke SQL support
>> ---
>>  contrib/src/qt/rules.mak | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
>> index 11fefca26b5..65937d7bc16 100644
>> --- a/contrib/src/qt/rules.mak
>> +++ b/contrib/src/qt/rules.mak
>> @@ -79,11 +79,13 @@ endif
>>
>>  endif
>>
>> -QT_CONFIG := -static -opensource -confirm-license -no-pkg-config \
>> +QT_CONFIG := -static -no-shared -opensource -confirm-license 
>> -no-pkg-config \
>>      -no-sql-sqlite -no-gif -qt-libjpeg -no-openssl $(QT_OPENGL) 
>> -no-dbus \
>>      -no-vulkan -no-sql-odbc -no-pch \
>> -    -no-compile-examples -nomake examples -nomake tests -qt-zlib
>> +    -no-compile-examples -nomake examples -nomake tests
>>
>> +QT_CONFIG += -skip qtsql
>> +QT_CONFIG += -skip qttest
>>  QT_CONFIG += -release
>>
>>  ifeq ($(V),1)
>> @@ -102,7 +104,7 @@ ENV_VARS := $(HOSTVARS) DXSDK_DIR=$(PREFIX)/bin
>>      +cd $< && $(ENV_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG)
>> -prefix $(PREFIX) -I $(PREFIX)/include
>>      # Make && Install libraries
>>      cd $< && $(ENV_VARS) $(MAKE)
>> -    cd $< && $(MAKE) -C src sub-corelib-install_subtargets
>> sub-gui-install_subtargets sub-widgets-install_subtargets
>> sub-platformsupport-install_subtargets sub-zlib-install_subtargets
>> sub-bootstrap-install_subtargets sub-network-install_subtargets
>> sub-testlib-install_subtargets
>> +    cd $< && $(MAKE) -C src sub-corelib-install_subtargets
>> sub-gui-install_subtargets sub-widgets-install_subtargets
>> sub-platformsupport-install_subtargets
>> sub-bootstrap-install_subtargets sub-network-install_subtargets
>>      # Install tools
>>      cd $< && $(MAKE) -C src sub-moc-install_subtargets
>> sub-rcc-install_subtargets sub-uic-install_subtargets
>> sub-qlalr-install_subtargets
>>      # Install plugins


More information about the vlc-devel mailing list