svn commit: r365341 - in head/www/chromium: . files
Rene Ladan
rene at FreeBSD.org
Mon Aug 18 19:07:13 UTC 2014
Author: rene
Date: Mon Aug 18 19:07:11 2014
New Revision: 365341
URL: http://svnweb.freebsd.org/changeset/ports/365341
QAT: https://qat.redports.org/buildarchive/r365341/
Log:
www/chromium: Enable build on FreeBSD < 10 and enable file chooser dialog [1].
- Spell out full path to /sbin/sysctl [2]
- Build with OpenSSL from base to avoid a link conflict on FreeBSD < 10
- Fix build with libusb on FreeBSD < 10 [3]
- Fix build with GCC 4.7 (for 8.4 / 9.1)
- Bump PORTREVISION
PR: 192742 [1]
Submitted by: cmt at burggraben.net [1]
Submitted by: J. R. Oldroyd [2]
Submitted by: db@ [3]
MFH: 2014Q3
Added:
head/www/chromium/files/extra-patch-libusb-pc (contents, props changed)
head/www/chromium/files/patch-build__linux__unbundle__openssl.gyp (contents, props changed)
head/www/chromium/files/patch-ui__shell_dialogs__select_file_dialog.cc (contents, props changed)
Modified:
head/www/chromium/Makefile
head/www/chromium/files/chrome.in
head/www/chromium/files/extra-patch-gcc
head/www/chromium/files/patch-components__usb_service__usb_device_handle.cc
Modified: head/www/chromium/Makefile
==============================================================================
--- head/www/chromium/Makefile Mon Aug 18 18:53:16 2014 (r365340)
+++ head/www/chromium/Makefile Mon Aug 18 19:07:11 2014 (r365341)
@@ -3,6 +3,7 @@
PORTNAME= chromium
PORTVERSION= 36.0.1985.143
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@@ -20,7 +21,6 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/gperf:${
yasm:${PORTSDIR}/devel/yasm \
flock:${PORTSDIR}/sysutils/flock \
${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat \
- protoc:${PORTSDIR}/devel/protobuf \
${LOCALBASE}/share/usbids/usb.ids:${PORTSDIR}/misc/usbids
LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo \
@@ -43,6 +43,7 @@ LIB_DEPENDS= libcairo.so:${PORTSDIR}/gra
libjsoncpp.so:${PORTSDIR}/devel/jsoncpp \
libminizip.so:${PORTSDIR}/archivers/minizip \
libnspr4.so:${PORTSDIR}/devel/nspr \
+ libprotobuf.so:${PORTSDIR}/devel/protobuf \
libpng.so:${PORTSDIR}/graphics/png \
libre2.so:${PORTSDIR}/devel/re2 \
libsnappy.so:${PORTSDIR}/archivers/snappy \
@@ -63,8 +64,7 @@ CPE_PRODUCT= chrome
USE_PERL5= build
USE_XORG= scrnsaverproto x11 xproto xscrnsaver xtst
USE_GNOME= glib20 gtk20 dconf libxslt
-USE_OPENSSL= yes
-WITH_OPENSSL_PORT= yes # simplify for pkg-config in configure phase
+USE_OPENSSL= yes # must be from base to prevent a link failure against cups
SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper
ALL_TARGET= chrome
INSTALLS_ICONS= yes
@@ -166,6 +166,9 @@ GYP_DEFINES+= use_pulseaudio=0
GYP_DEFINES+= disable_sse2=1
.endif
+.if !exists(/usr/libdata/pkgconfig/libusb-1.0.pc)
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libusb-pc
+.endif
.if ${OSVERSION} >= 1000052 && !exists(${LOCALBASE}/include/execinfo.h)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-fixup-execinfo
.endif
@@ -188,13 +191,15 @@ CONFIGURE_ENV+= CC="${CC}" \
GYP_DEFINES="${GYP_DEFINES}"
MAKE_ENV+= BUILDTYPE=${BUILDTYPE} \
GPERF="${LOCALBASE}/bin/gperf"
-MAKE_ARGS+= -C out/${BUILDTYPE}
.include <bsd.port.pre.mk>
+#XXX redefine MAKE_ARGS after bsd.port.pre.mk to avoid OPENSSL flags
+# leaking in which confuses ninja
+MAKE_ARGS= -C out/${BUILDTYPE}
+
.if ${CHOSEN_COMPILER_TYPE} == gcc
GYP_DEFINES+= gcc_version=${CXX:S/g++//}
-CFLAGS+= -Wno-unknown-warning
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-gcc
.else
GYP_DEFINES+= clang=1
Modified: head/www/chromium/files/chrome.in
==============================================================================
--- head/www/chromium/files/chrome.in Mon Aug 18 18:53:16 2014 (r365340)
+++ head/www/chromium/files/chrome.in Mon Aug 18 19:07:11 2014 (r365341)
@@ -1,7 +1,7 @@
#!/bin/sh
SYSCTL=kern.ipc.shm_allow_removed
-if [ `sysctl -n $SYSCTL` = 0 ] ; then
+if [ "`/sbin/sysctl -n $SYSCTL`" = 0 ] ; then
cat << EOMSG
For correct operation, shared memory support has to be enabled
in Chromium by performing the following command as root :
Modified: head/www/chromium/files/extra-patch-gcc
==============================================================================
--- head/www/chromium/files/extra-patch-gcc Mon Aug 18 18:53:16 2014 (r365340)
+++ head/www/chromium/files/extra-patch-gcc Mon Aug 18 19:07:11 2014 (r365341)
@@ -86,3 +86,13 @@
#include "third_party/libjpeg_turbo/jpeglib.h"
#else
#include "third_party/libjpeg/jpeglib.h"
+--- ui/gfx/codec/jpeg_codec.cc.orig 2014-08-12 21:02:29.000000000 +0200
++++ ui/gfx/codec/jpeg_codec.cc 2014-08-17 19:32:18.000000000 +0200
+@@ -13,6 +13,7 @@
+
+ extern "C" {
+ #if defined(USE_SYSTEM_LIBJPEG)
++#include <stdio.h>
+ #include <jpeglib.h>
+ #elif defined(USE_LIBJPEG_TURBO)
+ #include "third_party/libjpeg_turbo/jpeglib.h"
Added: head/www/chromium/files/extra-patch-libusb-pc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/extra-patch-libusb-pc Mon Aug 18 19:07:11 2014 (r365341)
@@ -0,0 +1,20 @@
+--- build/linux/unbundle/libusb.gyp.orig 2014-08-12 21:02:52.000000000 +0200
++++ build/linux/unbundle/libusb.gyp 2014-08-17 16:21:03.000000000 +0200
+@@ -18,14 +18,14 @@
+ ],
+ 'direct_dependent_settings': {
+ 'cflags': [
+- '<!@(pkg-config --cflags libusb-1.0)',
++ '',
+ ],
+ 'link_settings': {
+ 'ldflags': [
+- '<!@(pkg-config --libs-only-L --libs-only-other libusb-1.0)',
++ '',
+ ],
+ 'libraries': [
+- '<!@(pkg-config --libs-only-l libusb-1.0)',
++ '-lusb',
+ ],
+ },
+ },
Added: head/www/chromium/files/patch-build__linux__unbundle__openssl.gyp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/patch-build__linux__unbundle__openssl.gyp Mon Aug 18 19:07:11 2014 (r365341)
@@ -0,0 +1,21 @@
+--- build/linux/unbundle/openssl.gyp.orig 2014-08-12 21:02:52.000000000 +0200
++++ build/linux/unbundle/openssl.gyp 2014-08-18 17:16:23.000000000 +0200
+@@ -9,15 +9,15 @@
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+- '<!@(pkg-config --cflags openssl)',
++ '',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+- '<!@(pkg-config --libs-only-L --libs-only-other openssl)',
++ '',
+ ],
+ 'libraries': [
+- '<!@(pkg-config --libs-only-l openssl)',
++ '-lssl',
+ ],
+ },
+ }
Modified: head/www/chromium/files/patch-components__usb_service__usb_device_handle.cc
==============================================================================
--- head/www/chromium/files/patch-components__usb_service__usb_device_handle.cc Mon Aug 18 18:53:16 2014 (r365340)
+++ head/www/chromium/files/patch-components__usb_service__usb_device_handle.cc Mon Aug 18 19:07:11 2014 (r365341)
@@ -1,6 +1,6 @@
--- ./components/usb_service/usb_device_handle.cc.orig 2014-08-12 21:02:37.000000000 +0200
-+++ ./components/usb_service/usb_device_handle.cc 2014-08-13 09:56:57.000000000 +0200
-@@ -16,7 +16,12 @@
++++ ./components/usb_service/usb_device_handle.cc 2014-08-17 16:54:01.000000000 +0200
+@@ -16,7 +16,24 @@
#include "components/usb_service/usb_interface.h"
#include "components/usb_service/usb_service.h"
#include "content/public/browser/browser_thread.h"
@@ -10,6 +10,18 @@
+#else
#include "third_party/libusb/src/libusb/libusb.h"
+#endif
++
++/* Define for FreeBSD < 9.3, thanks to db at freebsd.org */
++#if defined(OS_FREEBSD) && __FreeBSD_version < 903000
++int libusb_get_string_descriptor(libusb_device_handle *dev,
++ uint8_t descriptor_index, uint16_t lang_id, unsigned char* data, int length) {
++ return libusb_control_transfer(dev,
++ LIBUSB_ENDPOINT_IN | 0x0, /* Endpoint 0 IN */
++ LIBUSB_REQUEST_GET_DESCRIPTOR,
++ (LIBUSB_DT_STRING << 8) | descriptor_index,
++ lang_id, data, (uint16_t)length, 1000);
++}
++#endif
using content::BrowserThread;
Added: head/www/chromium/files/patch-ui__shell_dialogs__select_file_dialog.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/chromium/files/patch-ui__shell_dialogs__select_file_dialog.cc Mon Aug 18 19:07:11 2014 (r365341)
@@ -0,0 +1,20 @@
+--- ui/shell_dialogs/select_file_dialog.cc.orig 2014-08-12 21:02:27.000000000 +0200
++++ ui/shell_dialogs/select_file_dialog.cc 2014-08-17 19:43:29.000000000 +0200
+@@ -20,7 +20,7 @@
+ #include "ui/shell_dialogs/select_file_dialog_mac.h"
+ #elif defined(OS_ANDROID)
+ #include "ui/shell_dialogs/select_file_dialog_android.h"
+-#elif defined(USE_AURA) && !defined(USE_ASH) && defined(OS_LINUX)
++#elif defined(USE_AURA) && !defined(USE_ASH) && (defined(OS_LINUX) || defined(OS_FREEBSD))
+ #include "ui/shell_dialogs/linux_shell_dialog.h"
+ #endif
+
+@@ -76,7 +76,7 @@
+ return dialog;
+ }
+
+-#if defined(USE_AURA) && !defined(USE_ASH) && defined(OS_LINUX)
++#if defined(USE_AURA) && !defined(USE_ASH) && (defined(OS_LINUX) || defined(OS_FREEBSD))
+ const ui::LinuxShellDialog* shell_dialogs = ui::LinuxShellDialog::instance();
+ if (shell_dialogs)
+ return shell_dialogs->CreateSelectFileDialog(listener, policy);
More information about the svn-ports-head
mailing list