]> git.pld-linux.org Git - packages/chromium-browser.git/commitdiff
add system libXNVCtrl support
authorElan Ruusamäe <glen@delfi.ee>
Fri, 4 Jan 2013 13:52:12 +0000 (15:52 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 4 Jan 2013 13:52:12 +0000 (15:52 +0200)
somewhy binary size grows when linking with static libXNVCtrl.a:
-rwxr-xr-x    1 root    root         66006324 jaan   4 02:28 /usr/lib/chromium-browser/chromium-browser
-rwxr-xr-x    1 root    root         66018684 jaan   4 01:12 /usr/lib/chromium-browser/chromium-browser

chromium-browser.spec
system-libxnvctrl.patch [new file with mode: 0644]

index 8439ff28c3c444e33437e9dd45e40aaf49a32707..d12d8f0b78fcd8092596b2df182164131049bc69 100644 (file)
@@ -19,6 +19,7 @@
 %bcond_without system_libmtp   # system libmtp
 %bcond_without system_libusb   # system libusb-1
 %bcond_without system_libwebp  # system libwebp
+%bcond_without system_libxnvctrl       # system libxnvctrl
 %bcond_without system_minizip  # system minizip
 %bcond_without system_opus             # system opus codec support, http://www.opus-codec.org/examples/
 %bcond_without system_speex    # system speex
@@ -90,6 +91,7 @@ Patch6:               get-webkit_revision.patch
 Patch7:                dlopen_sonamed_gl.patch
 Patch8:                chromium_useragent.patch.in
 Patch9:                chromium-ppapi.patch
+Patch10:               system-libxnvctrl.patch
 # https://bugs.gentoo.org/show_bug.cgi?id=393471
 # libjpeg-turbo >= 1.1.90 supports that feature
 Patch11:       chromium-revert-jpeg-swizzle-r2.patch
@@ -137,6 +139,7 @@ BuildRequires:      libstdc++-devel
 %{?with_system_libusb:BuildRequires:   libusb-devel >= 1.0}
 %{?with_system_libvpx:BuildRequires:   libvpx-devel >= 0.9.5-2}
 %{?with_system_libwebp:BuildRequires:  libwebp-devel >= 0.1.99}
+%{?with_system_libxvnctrl:BuildRequires:       libXNVCtrl-devel >= 310.19}
 BuildRequires: libxml2-devel
 BuildRequires: libxslt-devel
 BuildRequires: lzma
@@ -369,6 +372,7 @@ test -e Makefile || %{__python} build/gyp_chromium \
        %{gyp_with system_libusb} \
        %{gyp_with system_libvpx} \
        %{gyp_with system_libwebp} \
+       %{gyp_with system_libxnvctrl} \
        %{gyp_with system_minizip} \
        %{gyp_with system_opus} \
        %{gyp_with system_speex} \
diff --git a/system-libxnvctrl.patch b/system-libxnvctrl.patch
new file mode 100644 (file)
index 0000000..5d161a6
--- /dev/null
@@ -0,0 +1,68 @@
+--- chromium-browser-24.0.1312.45/src/third_party/libXNVCtrl/libXNVCtrl.gyp~   2013-01-04 00:45:32.000000000 +0200
++++ chromium-browser-24.0.1312.45/src/third_party/libXNVCtrl/libXNVCtrl.gyp    2013-01-04 00:45:35.620067292 +0200
+@@ -3,16 +3,54 @@
+ # found in the LICENSE file.
+ {
+-  'targets': [
+-    {
+-      'target_name': 'libXNVCtrl',
+-      'type': 'static_library',
+-      'sources': [
+-        'NVCtrl.c',
+-        'NVCtrl.h',
+-        'NVCtrlLib.h',
+-        'nv_control.h',
++  'variables': {
++    'use_system_libxnvctrl%': 0,
++  },
++  'conditions': [
++    ['use_system_libxnvctrl==0', {
++      'targets': [
++        {
++          'target_name': 'libXNVCtrl',
++          'type': 'static_library',
++          'sources': [
++            'NVCtrl.c',
++            'NVCtrl.h',
++            'NVCtrlLib.h',
++            'nv_control.h',
++          ],
++        },
+       ],
+-    },
+-  ],
++    }, { # use_system_libxnvctrl==1
++      'conditions': [
++        ['sysroot!=""', {
++          'variables': {
++            'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
++          },
++        }, {
++          'variables': {
++            'pkg-config': 'pkg-config'
++          },
++        }],
++      ],
++      'targets': [
++        {
++          'target_name': 'libXNVCtrl',
++          'type': 'none',
++          'direct_dependent_settings': {
++            'cflags': [
++                '<!@(<(pkg-config) --cflags libXNVCtrl)',
++            ],
++          },
++          'link_settings': {
++            'ldflags': [
++              '<!@(<(pkg-config) --libs-only-L --libs-only-other libXNVCtrl)',
++            ],
++            'libraries': [
++              '<!@(<(pkg-config) --libs-only-l libXNVCtrl)',
++            ],
++          },
++        }
++      ],
++    }],
++  ]
+ }
This page took 0.031937 seconds and 4 git commands to generate.