File build_what_we_need_only.patch of Package gstreamer-plugins-bad-codecs

diff -Nur gst-plugins-bad-1.24.0-orig/ext/meson.build gst-plugins-bad-1.24.0/ext/meson.build
--- gst-plugins-bad-1.24.0-orig/ext/meson.build	2024-03-05 00:51:42.000000000 +0100
+++ gst-plugins-bad-1.24.0/ext/meson.build	2024-06-28 08:53:47.922413595 +0200
@@ -1,79 +1,7 @@
-subdir('aes')
-subdir('analyticsoverlay')
-subdir('assrender')
-subdir('aom')
-subdir('avtp')
-subdir('bs2b')
-subdir('bz2')
-subdir('chromaprint')
-subdir('closedcaption')
-subdir('codec2json')
-subdir('colormanagement')
-subdir('curl')
-subdir('dash')
-subdir('dc1394')
-subdir('directfb')
-subdir('dtls')
-subdir('dts')
 subdir('faac')
 subdir('faad')
-subdir('fdkaac')
-subdir('flite')
-subdir('fluidsynth')
-subdir('gme')
-subdir('gs')
-subdir('gsm')
-subdir('gtk')
-subdir('hls')
-subdir('iqa')
-subdir('isac')
-subdir('ladspa')
-subdir('lc3')
-subdir('ldac')
 subdir('libde265')
-subdir('lv2')
-subdir('mdns')
-subdir('modplug')
-subdir('mpeg2enc')
-subdir('mplex')
-subdir('musepack')
-subdir('neon')
-subdir('onnx')
-subdir('openal')
 subdir('openaptx')
-subdir('opencv')
-subdir('openexr')
-subdir('openh264')
-subdir('openjpeg')
-subdir('openmpt')
-subdir('openni2')
-subdir('opus')
-subdir('qroverlay')
-subdir('qt6d3d11')
 subdir('resindvd')
-subdir('rsvg')
 subdir('rtmp')
-subdir('sbc')
-subdir('sctp')
-subdir('smoothstreaming')
-subdir('sndfile')
-subdir('soundtouch')
-subdir('spandsp')
-subdir('srt')
-subdir('srtp')
-subdir('svtav1')
-subdir('svthevcenc')
-subdir('teletextdec')
-subdir('ttml')
-subdir('voaacenc')
-subdir('voamrwbenc')
-subdir('vulkan')
-subdir('wayland')
-subdir('webrtc')
-subdir('webrtcdsp')
-subdir('webp')
-subdir('wildmidi')
-subdir('wpe')
 subdir('x265')
-subdir('zxing')
-subdir('zbar')
diff -Nur gst-plugins-bad-1.24.0-orig/gst/meson.build gst-plugins-bad-1.24.0/gst/meson.build
--- gst-plugins-bad-1.24.0-orig/gst/meson.build	2024-03-05 00:51:42.000000000 +0100
+++ gst-plugins-bad-1.24.0/gst/meson.build	2024-06-28 08:22:07.637599366 +0200
@@ -1,19 +1,4 @@
-foreach plugin : ['accurip', 'adpcmdec', 'adpcmenc', 'aiff', 'asfmux',
-                  'audiobuffersplit', 'audiofxbad', 'audiomixmatrix',
-                  'audiolatency', 'audiovisualizers', 'autoconvert', 'bayer',
-                  'camerabin2', 'codecalpha', 'codectimestamper', 'coloreffects',
-                  'debugutils', 'dvbsubenc',
-                  'dvbsuboverlay', 'dvdspu', 'faceoverlay', 'festival',
-                  'fieldanalysis', 'freeverb', 'frei0r', 'gaudieffects', 'gdp',
-                  'geometrictransform', 'id3tag', 'insertbin', 'inter', 'interlace',
-                  'ivfparse', 'ivtc', 'jp2kdecimator', 'jpegformat', 'librfb',
-                  'midi', 'mpegdemux', 'mpegpsmux', 'mpegtsdemux', 'mpegtsmux',
-                  'mse', 'mxf', 'netsim', 'onvif', 'pcapparse', 'pnm', 'proxy',
-                  'rawparse', 'removesilence', 'rist', 'rtmp2', 'rtp', 'sdp',
-                  'segmentclip', 'siren', 'smooth', 'speed', 'subenc', 'switchbin',
-                  'timecode', 'transcode', 'unixfd', 'videofilters',
-                  'videoframe_audiolevel', 'videoparsers', 'videosignal',
-                  'vmnc', 'y4m']
+foreach plugin : ['siren']
   if not get_option(plugin).disabled()
     subdir(plugin)
   endif
diff -Nur gst-plugins-bad-1.24.0-orig/meson.build gst-plugins-bad-1.24.0/meson.build
--- gst-plugins-bad-1.24.0-orig/meson.build	2024-03-05 00:51:42.000000000 +0100
+++ gst-plugins-bad-1.24.0/meson.build	2024-06-28 08:15:37.518806458 +0200
@@ -307,6 +307,8 @@
     fallback : ['gst-plugins-base', 'app_dep'])
 gstaudio_dep = dependency('gstreamer-audio-1.0', version : gst_req,
     fallback : ['gst-plugins-base', 'audio_dep'])
+gstcodecparsers_dep = dependency('gstreamer-codecparsers-1.0', version : gst_req,
+    fallback : ['gst-plugins-bad', 'codecparsers_dep'])
 gstfft_dep = dependency('gstreamer-fft-1.0', version : gst_req,
     fallback : ['gst-plugins-base', 'fft_dep'])
 gstriff_dep = dependency('gstreamer-riff-1.0', version : gst_req,
@@ -555,13 +557,8 @@
 
 gpl_allowed = get_option('gpl').allowed()
 
-subdir('gst-libs')
 subdir('gst')
-subdir('sys')
 subdir('ext')
-subdir('tests')
-subdir('data')
-subdir('tools')
 
 if have_orcc
   update_orc_dist_files = find_program('scripts/update-orc-dist-files.py')