Index: head/Mk/bsd.gecko.mk =================================================================== --- head/Mk/bsd.gecko.mk (revision 303830) +++ head/Mk/bsd.gecko.mk (revision 303831) @@ -1,997 +1,997 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # $FreeBSD$ # # 4 column tabs prevent hair loss and tooth decay! # ======================= USERS ================================= # To specify which gecko-based backend you prefer, use something like: # # WITH_GECKO= libxul # # The valid backends are: # libxul libxul19 # # See below for more details. # ======================= /USERS ================================ # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users # and porters to support any available gecko backend without needing to build # many conditional tests. ${USE_GECKO} is the list of backends that your port # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. # Users set ${WITH_GECKO} to the list of gecko backends they want on their # system. .if defined(USE_GECKO) && ${USE_GECKO}!="gecko" .if !defined(Gecko_Pre_Include) # Please make sure all changes to this file are passed through the maintainer. # Do not commit them yourself (unless of course you're the Port's Wraith ;). Gecko_Include_MAINTAINER= gecko@FreeBSD.org Gecko_Pre_Include= bsd.gecko.mk # Users should use the following syntax: # # WITH_GECKO= libxul libxul-devel # Use libxul whenever a port supports it, falling back on libxul-devel. # Note: libxul-devel does not exist at the moment! # WITH_GECKO= libxul # Sets your preferred backend. With this example, libxul will always # be chosen, unless the port doesn't support a libxul backend. In that # case, you get whatever the porter chose as the default. Better to use # the first example. # # # Ports should use the following: # # USE_GECKO= libxul libxul-devel # The list of gecko backends that the port supports. Unless the user # overrides it with WITH_GECKO, the first gecko listed in USE_GECKO # will be the default. In the above example, www/libxul will be used # as a gecko backend unless WITH_GECKO=libxul-devel is defined by the # user. Note: libxul-devel does not exist at the moment! # # USE_GECKO= libxul-devel<->libxul # This will sed -e 's/libxul/libxul-devel/' on Makefile.in's and configure # if ${GECKO}=="libxul-devel" # # Example: # USE_GECKO= libxul libxul-devel # Note: libxul-devel does not exist at the moment! # # post-patch: # @${REINPALCE_CMD} -e 's|mozilla-|${GECKO}-|' \ # ${MOZSRC}/configure # # If you want your port to check the ${GECKO} variable to see which backend # has been chosen. # # Example: # USE_GECKO= libxul libxul-devel # Note: libxul-devel does not exist at the moment! # # post-patch: # .if ${GECKO}=="libxul-devel" # @${REINPLACE_CMD} -e 's|mozilla-|libxul-|' \ # ${MOZSRC}/configure # .endif _GECKO_ALL= libxul libxul19 libxul_PLIST= ${LOCALBASE}/lib/libxul/libxul.so libxul19_PLIST= ${LOCALBASE}/lib/libxul/libxul.so .for gecko in ${_GECKO_ALL} ${gecko}_PORTSDIR?= www ${gecko}_DEPENDS?= ${PORTSDIR}/${${gecko}_PORTSDIR}/${gecko} ${gecko}_PLIST?= ${LOCALBASE}/lib/${gecko}/libgtkembedmoz.so .endfor # Figure out which mozilla to use # Weed out bad options in USE_GECKO .for badgecko in ${USE_GECKO} . if ${_GECKO_ALL:M${badgecko:C/^([^<->]+).*/\1/}}!="" GOOD_USE_GECKO+= ${badgecko:C/^([^<->]+).*/\1/} . endif . if ${_GECKO_ALL:M${badgecko:C/^[^<->]+<->([^<->]+).*/\1/}}!="${badgecko:C/^([^<->]+).*/\1/}" ${badgecko:C/^([^<->]+).*/\1/}_HACK= s:${badgecko:C/^[^<->]+<->([^<->]+).*/\1/}:${badgecko:C/^([^<->]+).*/\1/}:g . endif .endfor .undef GECKO_FALLTHROUGH .undef _FOUND_WITH_GECKO # Figure out which gecko to use and weed out the bad ones .if defined(WITH_GECKO) && defined(GOOD_USE_GECKO) . for badgecko in ${WITH_GECKO} . if ${GOOD_USE_GECKO:M${badgecko}}!="" GOOD_WITH_GECKO+= ${badgecko} . endif . endfor . if defined(GOOD_WITH_GECKO) . for gecko in ${GOOD_WITH_GECKO} . if !defined(GECKO_FALLTHROUGH) GECKO= ${gecko} GECKO_FALLTHROUGH= ${TRUE} _FOUND_WITH_GECKO= ${TRUE} . endif . endfor . endif .endif .if !defined(GECKO) && defined(GOOD_USE_GECKO) . for gecko in ${GOOD_USE_GECKO} . if !defined(GECKO_FALLTRHOUGH) GECKO= ${gecko} GECKO_FALLTRHOUGH= ${TRUE} . endif . endfor .endif # Generic defines GECKO_CONFIG?= ${LOCALBASE}/bin/${GECKO}-config XPIDL?= ${LOCALBASE}/lib/${GECKO}/xpidl XPIDL_INCL?= `${GECKO_CONFIG} --idlflags` .if defined(GECKO) && ${_GECKO_ALL:M${GECKO}}!="" BUILD_DEPENDS+= ${${GECKO}_PLIST}:${${GECKO}_DEPENDS} RUN_DEPENDS+= ${${GECKO}_PLIST}:${${GECKO}_DEPENDS} .else IGNORE= Unable to find a supported gecko, please check USE_GECKO .endif pre-everything:: _gecko-pre-everything _gecko-pre-everything:: @${ECHO_CMD} "" .if !defined(_FOUND_WITH_GECKO) && defined(WITH_GECKO) @${ECHO_CMD} " Warning: ${PORTNAME} does not support any gecko you" @${ECHO_CMD} " listed in WITH_GECKO=${WITH_GECKO}." @${ECHO_CMD} " \"${GECKO}\" will be used" @${ECHO_CMD} "" @${ECHO_CMD} " for gecko support, but you can change that by using one of" @${ECHO_CMD} " the following values:" .else @${ECHO_CMD} " ${PORTNAME} is using ${GECKO} for gecko support, but you can" @${ECHO_CMD} " change that by defining WITH_GECKO to the following values:" .endif @${ECHO_CMD} "" .for gecko in ${GOOD_USE_GECKO} @${ECHO_CMD} " ${gecko} " .endfor @${ECHO_CMD} "" post-patch: gecko-post-patch gecko-post-patch: .if defined(${GECKO}_HACK) ${FIND} ${WRKSRC} -name "Makefile.in" -type f -o -name "configure" -type f | \ ${XARGS} ${REINPLACE_CMD} -e ${${GECKO}_HACK} .endif .endif .elif !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) && (defined(USE_FIREFOX) || defined(USE_FIREFOX_BUILD) || defined(USE_SEAMONKEY) || defined(USE_SEAMONKEY_BUILD) || defined(USE_THUNDERBIRD) || defined(USE_THUNDERBIRD_BUILD)) Gecko_Pre_Include= bsd.gecko.mk # Ports can use the following: # # USE_FIREFOX Add runtime dependency on Firefox. If no version # is given by the maintainer via the port or by the # user via defined variable try to find the highest # stable installed version. # Available values: yes 10+ 15+ 10 15+ # NOTE: # default value 10 is used in case of USE_FIREFOX=yes # # USE_FIREFOX_BUILD Add buildtime dependency on Firefox. # Available values: see USE_FIREFOX # # USE_SEAMONKEY Add runtime dependency on SeaMonkey. If no # version is given by the maintainer via the port # or by the user via defined variable try to find # the highest stable installed version. # Available values: yes 12+ 12 # NOTE: # default value 12 is used in case of USE_SEAMONKEY=yes # # USE_SEAMONKEY_BUILD Add buildtime dependency on SeaMonkey. # Available values: see USE_SEAMONKEY # # USE_THUNDERBIRD Add runtime dependency on Thunderbird. If no # version is given by the maintainer via the port # or by the user via defined variable try to find # the highest stable installed version. # Available values: yes 10+ 15+ 10 15 # NOTE: # default value 10 is used in case of USE_THUNDERBIRD=yes # # USE_THUNDERBIRD_BUILD Add buildtime dependency on Thunderbird. # Available values: see USE_THUNDERBIRD # # # Firefox part # .if defined(USE_FIREFOX) || defined(USE_FIREFOX_BUILD) # Process USE_FIREFOX_BUILD .if defined(USE_FIREFOX_BUILD) USE_FIREFOX:= ${USE_FIREFOX_BUILD} _FIREFOX_BUILD_DEPENDS= yes .endif _FIREFOX_DEFAULT_VERSION= 10 _FIREFOX_VERSIONS= 10 15 _FIREFOX_RANGE_VERSIONS= 10+ 15+ # For specifying [10, ..]+ _FIREFOX_15P= 15 ${_FIREFOX_10P} _FIREFOX_10P= 10 # Set the default Firefox version and check if USE_FIREFOX=yes was given .if ${USE_FIREFOX} == "yes" USE_FIREFOX= ${_FIREFOX_DEFAULT_VERSION} .endif # Setting/finding Firefox version we want. .if exists(${LOCALBASE}/bin/firefox) _FIREFOX_VER!= ${LOCALBASE}/bin/firefox --version 2>/dev/null | ${HEAD} -1 | ${SED} -e 's/Mozilla Firefox \([0-9]\{1,2\}\)\.\([0-9]*\).*/\1/' .endif # Check if installed Firefox version matches the wanted one .if defined(_FIREFOX_VER) _SUPFIREFOX= no .if ${USE_FIREFOX:C/[0-9][0-9]//} == "+" .for ver in ${_FIREFOX_RANGE_VERSIONS} .if ${USE_FIREFOX} == "${ver}" _MATCHED_FIREFOX_VER:= ${ver:S/+//} .for firefox in ${_FIREFOX_${_MATCHED_FIREFOX_VER}P} .if ${_FIREFOX_VER} == ${firefox} _SUPFIREFOX= yes USE_FIREFOX= ${_FIREFOX_VER} .endif .endfor .endif .endfor .else .if ${_FIREFOX_VER} == ${USE_FIREFOX} _SUPFIREFOX= yes .endif .endif .if ${_SUPFIREFOX} == no _DISPLAY_VERSION_HAVE= ${_FIREFOX_VER} _DISPLAY_VERSION_WANT= ${USE_FIREFOX} IGNORE= cannot install: Firefox versions mismatch: firefox-${_DISPLAY_VERSION_HAVE} is installed and wanted version is firefox-${_DISPLAY_VERSION_WANT} .endif .endif .if !defined(_FIREFOX_${USE_FIREFOX:S/+//}P) IGNORE= cannot install: unknown Firefox version: firefox-${USE_FIREFOX:C/([0-9])([0-9])/\1.\2/} .endif # Dependence lines for different Firefox versions 10_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/firefox-esr 15_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/firefox # Add dependencies .if defined(USE_FIREFOX) .if defined(_FIREFOX_BUILD_DEPENDS) BUILD_DEPENDS+= ${${USE_FIREFOX}_DEPENDS} .endif RUN_DEPENDS+= ${${USE_FIREFOX}_DEPENDS} .endif .endif # defined(USE_FIREFOX) # # SeaMonkey part # .if defined(USE_SEAMONKEY) || defined(USE_SEAMONKEY_BUILD) # Process USE_SEAMONKEY_BUILD .if defined(USE_SEAMONKEY_BUILD) USE_SEAMONKEY:= ${USE_SEAMONKEY_BUILD} _SEAMONKEY_BUILD_DEPENDS= yes .endif _SEAMONKEY_DEFAULT_VERSION= 12 _SEAMONKEY_VERSIONS= 12 _SEAMONKEY_RANGE_VERSIONS= 12+ # For specifying [12, ..]+ _SEAMONKEY_12P= 12 # Set the default SeaMonkey version and check if USE_SEAMONKEY=yes was given .if ${USE_SEAMONKEY} == "yes" USE_SEAMONKEY= ${_SEAMONKEY_DEFAULT_VERSION} .endif # Setting/finding SeaMonkey version we want. .if exists(${LOCALBASE}/bin/seamonkey) _SEAMONKEY_VER!= ${LOCALBASE}/bin/seamonkey --version 2>/dev/null | ${HEAD} -1 | ${SED} -e 's/Mozilla SeaMonkey \([0-9]\{1,2\}\)\.\([0-9]*\).*/\2/' .endif # Check if installed SeaMonkey version matches the wanted one .if defined(_SEAMONKEY_VER) _SUPSEAMONKEY= no .if ${USE_SEAMONKEY:C/[0-9][0-9]//} == "+" .for ver in ${_SEAMONKEY_RANGE_VERSIONS} .if ${USE_SEAMONKEY} == "${ver}" _MATCHED_SEAMONKEY_VER:= ${ver:S/+//} .for seamonkey in ${_SEAMONKEY_${_MATCHED_SEAMONKEY_VER}P} .if ${_SEAMONKEY_VER} == ${seamonkey} _SUPSEAMONKEY= yes USE_SEAMONKEY= ${_SEAMONKEY_VER} .endif .endfor .endif .endfor .else .if ${_SEAMONKEY_VER} == ${USE_SEAMONKEY} _SUPSEAMONKEY= yes .endif .endif .if ${_SUPSEAMONKEY} == no IGNORE= cannot install: SeaMonkey versions mismatch: seamonkey-2.${_SEAMONKEY_VER} is installed and wanted version is seamonkey-2.${USE_SEAMONKEY} .endif .endif .if !defined(_SEAMONKEY_${USE_SEAMONKEY:S/+//}P) IGNORE= cannot install: unknown SeaMonkey version: seamonkey-2.${USE_SEAMONKEY} .endif # Dependence lines for different SeaMonkey versions 12_DEPENDS= ${LOCALBASE}/lib/seamonkey/seamonkey:${PORTSDIR}/www/seamonkey # Add dependencies .if defined(USE_SEAMONKEY) .if defined(_SEAMONKEY_BUILD_DEPENDS) BUILD_DEPENDS+= ${${USE_SEAMONKEY}_DEPENDS} .endif RUN_DEPENDS+= ${${USE_SEAMONKEY}_DEPENDS} .endif .endif # defined(USE_SEAMONKEY) # # Thunderbird part # .if defined(USE_THUNDERBIRD) || defined(USE_THUNDERBIRD_BUILD) # Process USE_THUNDERBIRD_BUILD .if defined(USE_THUNDERBIRD_BUILD) USE_THUNDERBIRD:= ${USE_THUNDERBIRD_BUILD} _THUNDERBIRD_BUILD_DEPENDS= yes .endif _THUNDERBIRD_DEFAULT_VERSION= 10 _THUNDERBIRD_VERSIONS= 10 15 _THUNDERBIRD_RANGE_VERSIONS= 10+ 15+ # For specifying [10, ..]+ _THUNDERBIRD_15P= 15 ${_THUNDERBIRD_10P} _THUNDERBIRD_10P= 10 # Set the default Thunderbird version and check if USE_THUNDERBIRD=yes was given .if ${USE_THUNDERBIRD} == "yes" USE_THUNDERBIRD= ${_THUNDERBIRD_DEFAULT_VERSION} .endif # Setting/finding Thunderbird version we want. .if exists(${LOCALBASE}/bin/thunderbird) _THUNDERBIRD_VER!= ${LOCALBASE}/bin/thunderbird --version 2>/dev/null | ${HEAD} -1 | ${SED} -e 's/ Thunderbird \([0-9]\{1,2\}\)\.\([0-9]*\).*/\1/' .endif # Check if installed Thunderbird version matches the wanted one .if defined(_THUNDERBIRD_VER) _SUPTHUNDERBIRD= no .if ${USE_THUNDERBIRD:C/[0-9][0-9]//} == "+" .for ver in ${_THUNDERBIRD_RANGE_VERSIONS} .if ${USE_THUNDERBIRD} == "${ver}" _MATCHED_THUNDERBIRD_VER:= ${ver:S/+//} .for thunderbird in ${_THUNDERBIRD_${_MATCHED_THUNDERBIRD_VER}P} .if ${_THUNDERBIRD_VER} == ${thunderbird} _SUPTHUNDERBIRD= yes USE_THUNDERBIRD= ${_THUNDERBIRD_VER} .endif .endfor .endif .endfor .else .if ${_THUNDERBIRD_VER} == ${USE_THUNDERBIRD} _SUPTHUNDERBIRD= yes .endif .endif .if ${_SUPTHUNDERBIRD} != yes _DISPLAY_VERSION_HAVE= ${_THUNDERBIRD_VER} _DISPLAY_VERSION_WANT= ${USE_THUNDERBIRD} IGNORE= cannot install: Thunderbird versions mismatch: thunderbird-${_DISPLAY_VERSION_HAVE} is installed and wanted version is thunderbird-${_DISPLAY_VERSION_WANT} .endif .endif .if !defined(_THUNDERBIRD_${USE_THUNDERBIRD:S/+//}P) IGNORE= cannot install: unknown Thunderbird version: thunderbird-${USE_THUNDERBIRD:C/([0-9])([0-9])/\1.\2/} .endif # Dependence lines for different Thunderbird versions 10_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird-esr 15_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird # Add dependencies .if defined(USE_THUNDERBIRD) .if defined(_THUNDERBIRD_BUILD_DEPENDS) BUILD_DEPENDS+= ${${USE_THUNDERBIRD}_DEPENDS} .endif RUN_DEPENDS+= ${${USE_THUNDERBIRD}_DEPENDS} .endif .endif # defined(USE_THUNDERBIRD) .else # split .if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of # use primarily to apps from the mozilla project itself (such as Firefox, # Thunderbird, etc.), and probably won't be of use for gecko-based ports # like epiphany, galeon, etc. # # You need to make sure to add USE_GECKO=gecko to for your port can uses # one of these options below. # # Ports can use the following: # # USE_MOZILLA By default, it enables the denendencies: cairo, dbm, # event, ffi, hunspell, jpeg, nspr, nss, png, sqlite, # vpx and zip. Search for '_ALL_DEPENDS' below to see # the list. If your port doesn't need one of list then # you can use '-' like 'USE_MOZILLA= -png -zip' to # subtract the dependencies. # # GECKO_PLIST_PRE_FILES Manual add files in the plist if it needs. # # GECKO_PLIST_PRE_DIRS Manual directories in the plist if it needs. # # MOZILLA_PLIST_DIRS List of directories to descend into when installing # and creating the plist # # MOZ_PIS_SCRIPTS List of scripts residing in ${FILESDIR} to be # filtered through MOZCONFIG_SED and installed along # with our Pluggable Init Scripts (PIS) # # MOZ_SED_ARGS sed(1) commands through which MOZ_PIS_SCRIPTS are # filtered. There is a default set defined here, so # you probably want to add to MOZ_SED_ARGS rather # than clobber it # # MOZ_OPTIONS configure arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # CONFIGURE_ARGS+=${MOZ_OPTIONS} # # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # MAKE_ARGS+=${MOZ_MK_OPTIONS} # # MOZ_EXPORT Environment variables for the build process (added # to .mozconfig). If NOMOZCONFIG is defined, you # probably want to set MAKE_ENV+=${MOZ_EXPORT} # # MOZ_CHROME A variable for the --enable-chrome-format= in # CONFIGURE_ARGS. The default is omni. # # MOZ_TOOLKIT A variable for the --enable-default-toolkit= in # CONFIGURE_ARGS. The default is cairo-gtk2. # # MOZ_EXTENSIONS A list of extensions to build # # MOZ_PROTOCOLS A list of protocols to build (http, ftp, etc.) # # PORT_MOZCONFIG Defaults to ${FILESDIR}/mozconfig.in, but can be # set to a generic mozconfig included with the port # # NOGECKO_INSTALL Don't install the built gecko (most likely for # testing) # # NOGECKO_PLIST Don't create a dynamically-generated playlist # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} MOZ_RPATH?= ${MOZILLA} USE_GNOME+= libidl desktopfileutils USE_ICONV= yes USE_PERL5_BUILD=yes USE_XORG= printproto sm xt xi xext x11 xinerama \ ice xproto MOZILLA_SUFX?= none MOZSRC?= ${WRKSRC} WRKSRC?= ${WRKDIR}/mozilla FAKEDIR?= ${WRKDIR}/fake PLIST?= ${WRKDIR}/plist PLISTD?= ${WRKDIR}/plist_dirs PLISTF?= ${WRKDIR}/plist_files MASTER_DIR?= ${.CURDIR}/../../www/seamonkey MOZ_PIS_DIR?= lib/${MOZILLA}/init.d PORT_MOZCONFIG?= ${FILESDIR}/mozconfig.in MOZCONFIG?= ${WRKSRC}/.mozconfig MOZILLA_PLIST_DIRS?= bin lib PKGINSTALL?= ${WRKDIR}/pkg-install PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall MASTER_MOZDIR?= ${PORTSDIR}/www/seamonkey PKGINSTALL_INC?= ${MASTER_MOZDIR}/pkg-install.in PKGDEINSTALL_INC?= ${MASTER_MOZDIR}/pkg-deinstall.in EXTRACT_AFTER_ARGS?= | ${TAR} -xf - --exclude */CVS/* \ --exclude */macbuild/* \ --exclude */package/* \ --exclude mozilla*/gc/boehm MOZ_PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \ ${MOZILLA}-xpcom ${MOZILLA}-plugin MOZ_EXPORT+= ${CONFIGURE_ENV} \ LIBS="${LIBS}" PERL="${PERL}" MOZ_OPTIONS+= --prefix="${FAKEDIR}" CPPFLAGS+= -isystem${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib # Standard depends _ALL_DEPENDS= cairo dbm event ffi hunspell jpeg nspr nss png sqlite vpx zip cairo_LIB_DEPENDS= cairo:${PORTSDIR}/graphics/cairo cairo_MOZ_OPTIONS= --enable-system-cairo --enable-system-pixman cairo_EXTRACT_AFTER_ARGS= --exclude mozilla*/gfx/cairo dbm_EXTRACT_AFTER_ARGS= --exclude mozilla*/dbm event_LIB_DEPENDS= event-2.0:${PORTSDIR}/devel/libevent2 -event_MOZ_OPTIONS= --with-system-libevent=${LOCALBASE} +event_MOZ_OPTIONS= --with-system-libevent event_EXTRACT_AFTER_ARGS= --exclude mozilla*/ipc/chromium/src/third_party/libevent ffi_LIB_DEPENDS= ffi:${PORTSDIR}/devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi ffi_EXTRACT_AFTER_ARGS= --exclude mozilla*/js/src/ctypes/libffi hunspell_LIB_DEPENDS= hunspell-1.3:${PORTSDIR}/textproc/hunspell hunspell_MOZ_OPTIONS= --enable-system-hunspell jpeg_LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} jpeg_EXTRACT_AFTER_ARGS= --exclude mozilla*/media/libjpeg nspr_LIB_DEPENDS= nspr4:${PORTSDIR}/devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= nss3:${PORTSDIR}/security/nss nss_MOZ_OPTIONS= --with-system-nss nss_EXTRACT_AFTER_ARGS= --exclude mozilla*/security/coreconf \ --exclude mozilla*/security/nss nss_CPPFLAGS+= -I${LOCALBASE}/include/nss -I${LOCALBASE}/include/nss/nss nss_LDFLAGS+= -L${LOCALBASE}/lib/nss -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH} png_LIB_DEPENDS= png15:${PORTSDIR}/graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} png_EXTRACT_AFTER_ARGS= --exclude mozilla*/media/libpng sqlite_LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite vpx_LIB_DEPENDS= vpx:${PORTSDIR}/multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx #vpx_EXTRACT_AFTER_ARGS= --exclude mozilla*/media/libvpx zip_BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip zip_RUN_DEPENDS= ${zip_BUILD_DEPENDS} .for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} .endfor .for dep in ${_ALL_DEPENDS} .if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} EXTRACT_AFTER_ARGS+= ${${dep}_EXTRACT_AFTER_ARGS} CPPFLAGS+= ${${dep}_CPPFLAGS} LDFLAGS+= ${${dep}_LDFLAGS} .endif .endfor # Standard options MOZ_CHROME?= omni MOZ_TOOLKIT?= cairo-gtk2 MOZ_OPTIONS+= --disable-tests \ --enable-chrome-format=${MOZ_CHROME} \ --enable-default-toolkit=${MOZ_TOOLKIT} \ --with-default-mozilla-five-home=${PREFIX}/lib/${MOZILLA} \ --with-pthreads # Configure options for install .if !defined(MOZ_EXTENSIONS) MOZ_OPTIONS+= --enable-extensions=default .else MOZ_OPTIONS+= --enable-extensions=${MOZ_EXTENSIONS} .endif .if !defined(MOZ_PROTOCOLS) MOZ_OPTIONS+= --enable-necko-protocols=default .else MOZ_OPTIONS+= --enable-necko-protocols=${MOZ_PROTOCOLS} .endif # others MOZ_OPTIONS+= --with-system-zlib \ --with-system-bz2 \ --disable-debug-symbols \ --disable-glibtest \ --disable-gtktest \ --disable-freetypetest \ --disable-installer \ --disable-necko-wifi \ --disable-updater \ --disable-pedantic .if ${CXXFLAGS:M-stdlib=libc++} LIBS+= -lcxxrt .endif .if ${PORT_OPTIONS:MQT4} MOZ_TOOLKIT= cairo-qt USE_MOZILLA+= -cairo # ports/169343 .endif .if ${MOZ_TOOLKIT:Mcairo-qt} USE_GNOME+= pango USE_QT4+= moc_build gui network opengl MOZ_OPTIONS+= --with-qtdir= # pkg-config MOZ_EXPORT+= HOST_MOC="${MOC}" HOST_RCC="${FALSE}" .else # gtk2, cairo-gtk2 USE_GNOME+= gtk20 .endif .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize .else MOZ_OPTIONS+= --disable-optimize .endif .if ${PORT_OPTIONS:MDBUS} LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ notify.4:${PORTSDIR}/devel/libnotify \ startup-notification-1.0:${PORTSDIR}/x11/startup-notification MOZ_OPTIONS+= --enable-startup-notification .else MOZ_OPTIONS+= --disable-dbus --disable-libnotify .endif .if ${PORT_OPTIONS:MGSTREAMER} USE_GSTREAMER= yes MOZ_OPTIONS+= --enable-gstreamer .else MOZ_OPTIONS+= --disable-gstreamer .endif .if ${PORT_OPTIONS:MGCONF} USE_GNOME+= gconf2 MOZ_OPTIONS+= --enable-gconf .else MOZ_OPTIONS+= --disable-gconf .endif .if ${PORT_OPTIONS:MGIO} MOZ_OPTIONS+= --enable-gio .else MOZ_OPTIONS+= --disable-gio .endif .if ${PORT_OPTIONS:MGNOMEUI} USE_GNOME+= libgnomeui MOZ_OPTIONS+= --enable-gnomeui .else MOZ_OPTIONS+= --disable-gnomeui .endif .if ${PORT_OPTIONS:MGNOMEVFS2} USE_GNOME+= gnomevfs2 MOZ_OPTIONS+= --enable-gnomevfs .else MOZ_OPTIONS+= --disable-gnomevfs .endif .if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= proxy:${PORTSDIR}/net/libproxy MOZ_OPTIONS+= --enable-libproxy .else MOZ_OPTIONS+= --disable-libproxy .endif .if ${PORT_OPTIONS:MALSA} LIB_DEPENDS+= asound.2:${PORTSDIR}/audio/alsa-lib RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins MOZ_OPTIONS+= --enable-alsa . if exists(${FILESDIR}/extra-bug780531) EXTRA_PATCHES+= ${FILESDIR}/extra-bug780531 . endif .endif .if ${PORT_OPTIONS:MPULSEAUDIO} LIB_DEPENDS+= pulse.0:${PORTSDIR}/audio/pulseaudio MOZ_OPTIONS+= --enable-pulseaudio .endif .if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip .else MOZ_OPTIONS+= --enable-strip --enable-install-strip .endif .if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug WITH_LOGGING= yes .else MOZ_OPTIONS+= --disable-debug .endif .if ${PORT_OPTIONS:MLOGGING} MOZ_OPTIONS+= --enable-logging .else MOZ_OPTIONS+= --disable-logging .endif MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \ -e 's|@CFLAGS@|${CFLAGS}|g' \ -e 's|@LDFLAGS@|${LDFLAGS}|g' \ -e 's|@LIBS@|${LIBS}|g' \ -e 's|@LOCALBASE@|${LOCALBASE}|g' \ -e 's|@FAKEDIR@|${FAKEDIR}|g' \ -e 's|@PERL@|${PERL5}|g' \ -e 's|@MOZDIR@|${PREFIX}/lib/${MOZILLA}|g' \ -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%CFLAGS%%|${CFLAGS}|g' \ -e 's|%%LDFLAGS%%|${LDFLAGS}|g' \ -e 's|%%LIBS%%|${LIBS}|g' \ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ -e 's|%%FAKEDIR%%|${FAKEDIR}|g' \ -e 's|%%PERL%%|${PERL5}|g' \ -e 's|%%MOZILLA%%|${MOZILLA}|g' \ -e 's|%%MOZILLA_BIN%%|${MOZILLA_BIN}|g' \ -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS} .if ${ARCH}=="sparc64" # Work around miscompilation/mislinkage of the sCanonicalVTable hacks. MOZ_OPTIONS+= --disable-v1-string-abi .endif .if defined(OBJDIR_BUILD) CONFIGURE_SCRIPT=../configure MOZ_OBJDIR= ${WRKSRC}/obj-${CONFIGURE_TARGET} CONFIGURE_WRKSRC=${MOZ_OBJDIR} BUILD_WRKSRC= ${MOZ_OBJDIR} INSTALL_WRKSRC= ${MOZ_OBJDIR} .else MOZ_OBJDIR= ${WRKSRC} .endif .else # bsd.port.post.mk post-patch: gecko-post-patch gecko-moz-pis-patch gecko-post-patch: .if exists(${PKGINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGINSTALL_INC} > ${PKGINSTALL} .endif .if exists(${PKGDEINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGDEINSTALL_INC} > ${PKGDEINSTALL} .endif @${RM} -f ${MOZCONFIG} .if !defined(NOMOZCONFIG) @if [ -e ${PORT_MOZCONFIG} ] ; then \ ${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG} ; \ fi .for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} .endfor .endif # .if !defined(NOMOZCONFIG) .if exists(${MOZSRC}/build/unix/mozilla-config.in) @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \ s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \ s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \ ${MOZSRC}/build/unix/mozilla-config.in .endif .for subdir in "" nsprpub js/src @if [ -f ${MOZSRC}/${subdir}/config/system-headers ] ; then \ for f in \ cairo-qt.h \ fenv.h \ kvm.h \ malloc_np.h \ pthread_np.h \ pulse/pulseaudio.h \ spawn.h \ sys/thr.h \ sys/user.h \ unwind.h; do \ ${ECHO_CMD} "$$f" >> ${MOZSRC}/${subdir}/config/system-headers ; \ done; \ fi .endfor @for f in \ ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \ ${WRKSRC}/directory/c-sdk/configure \ ${MOZSRC}/security/coreconf/FreeBSD.mk \ ${MOZSRC}/js/src/Makefile.in \ ${MOZSRC}/js/src/configure \ ${MOZSRC}/configure \ ${WRKSRC}/configure; do \ if [ -f $$f ] ; then \ ${REINPLACE_CMD} -Ee 's|-lc_r|${PTHREAD_LIBS}|g ; \ s|-l?pthread|${PTHREAD_LIBS}|g ; \ s|echo aout|echo elf|g ; \ s|/usr/X11R6|${LOCALBASE}|g' \ $$f; \ fi; \ done @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/baseconfig.mk; \ else \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/autoconf.mk.in; \ fi @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \ s|%%LOCALBASE%%|${LOCALBASE}|g' \ ${MOZSRC}/build/unix/run-mozilla.sh @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${MOZSRC}/xpcom/*/SpecialSystemDirectory.cpp @${GREP} -lr 'PR_LoadLibrary.*\.so\.[0-9]' ${WRKSRC} | ${XARGS} \ ${REINPLACE_CMD} -Ee '/PR_LoadLibrary/s/(\.so)\.[0-9]+/\1/' # handles mozilla pis scripts. gecko-moz-pis-patch: .for moz in ${MOZ_PIS_SCRIPTS} @${MOZCONFIG_SED} < ${FILESDIR}/${moz} > ${WRKDIR}/${moz} .endfor pre-configure: gecko-pre-configure gecko-pre-configure: .if defined(OBJDIR_BUILD) ${MKDIR} ${MOZ_OBJDIR} .endif post-configure: gecko-post-configure gecko-post-configure: @${ECHO_CMD} "#define JNIIMPORT" >> ${MOZSRC}/mozilla-config.h pre-install: gecko-moz-pis-pre-install gecko-pre-install port-pre-install gecko-create-plist .if !target(port-pre-install) port-pre-install: @${DO_NADA} .endif gecko-pre-install: .if !defined(NOGECKO_PLIST) @${RM} -rf ${FAKEDIR} ${PLIST} ${PLISTD} ${PLISTF} @${TOUCH} -f ${PLIST} ${PLISTD} ${PLISTF} @cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ ${MAKEFILE} ${MAKE_ARGS} prefix=${FAKEDIR} ${INSTALL_TARGET} .if defined(MOZILLA_SUFX) && ${MOZILLA_SUFX}!="none" ${MV} ${FAKEDIR}/bin/${MOZILLA_EXEC_NAME:S/${MOZILLA_SUFX}//} ${FAKEDIR}/bin/${MOZILLA} .if exists(${FAKEDIR}/bin/${MOZILLA_EXEC_NAME:S/${MOZILLA_SUFX}//}-config) ${MV} ${FAKEDIR}/bin/${MOZILLA_EXEC_NAME:S/${MOZILLA_SUFX}//}-config ${FAKEDIR}/bin/${MOZILLA}-config .endif .for pc in ${MOZ_PKGCONFIG_FILES:S|${MOZILLA_SUFX}||} ${SED} -e 's|Requires: ${MOZILLA:S/${MOZILLA_SUFX}//}|Requires: ${MOZILLA}|' \ ${FAKEDIR}/lib/pkgconfig/${pc}.pc > ${FAKEDIR}/lib/pkgconfig/${pc:S/${MOZILLA:S,${MOZILLA_SUFX},,}/${MOZILLA}/}.pc .endfor @${REINPLACE_CMD} -e 's|${MOZILLA_BIN}|${MOZILLA:S/${MOZILLA_SUFX}//}|; \ s|$${progbase}-bin|${MOZILLA:S/${MOZILLA_SUFX}//}-bin|' \ -e 's|${FAKEDIR}|${PREFIX}|g' \ -i '' $$(${REALPATH} ${FAKEDIR}/bin/${MOZILLA}*) .else @${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ -i '' $$(${REALPATH} ${FAKEDIR}/bin/${MOZILLA_EXEC_NAME}*) .endif .endif gecko-create-plist: .if !defined(NOGECKO_PLIST) # Create the plist .for f in ${GECKO_PLIST_PRE_FILES} ${ECHO_CMD} ${f} >> ${PLISTF} .endfor .for f in ${GECKO_PLIST_PRE_DIRS} ${ECHO_CMD} "@dirrm ${f}" >> ${PLISTD} .endfor ${MKDIR} ${FAKEDIR}/libdata ${MV} -f ${FAKEDIR}/lib/pkgconfig ${FAKEDIR}/libdata/ || ${TRUE} ${RM} -f ${FAKEDIR}/lib/pkgconfig .for dir in ${MOZILLA_PLIST_DIRS} @cd ${FAKEDIR}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} && \ ${FIND} -d * -type d | \ ${SED} -e 's|^|@dirrm ${dir}/|' >> ${PLISTD} .endfor .for pcfile in ${MOZ_PKGCONFIG_FILES} ${ECHO_CMD} "libdata/pkgconfig/${pcfile}.pc" >> ${PLISTF} @${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ -e 's|${MOZILLA}-nspr = ${PORTVERSION}|nspr|' \ ${FAKEDIR}/libdata/pkgconfig/${pcfile}.pc .endfor ${CAT} ${PLISTF} | ${SORT} >> ${PLIST} ${CAT} ${PLISTD} | ${SORT} -r >> ${PLIST} ${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST} ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST} .endif # !defined(NOGECKO_PLIST) do-install: gecko-do-install gecko-do-install: .if !defined(NOGECKO_INSTALL) .for dir in ${MOZILLA_PLIST_DIRS} .if !exists(${PREFIX}/${dir}) ${MKDIR} ${PREFIX}/${dir} .endif ${TAR} cf - -C${FAKEDIR}/${dir} -s'|${FAKEDIR}|${PREFIX}|s' . | \ ${TAR} xof - -C${PREFIX}/${dir} .endfor .if (${OSVERSION} < 800081 ) # XXX: make sure bsdtar(1) corrected symlinks ${FIND} ${FAKEDIR} -type l -exec \ ${ECHO_CMD} stat -f \'${LN} -hfs \"%Y\" \"%N\"\' {} + | \ ${SED} s'|${FAKEDIR}|${PREFIX}|g' | ${SH} | \ ${SED} -n s'|${FAKEDIR}|${PREFIX}|p' | ${SH} -x .endif .for pcfile in ${MOZ_PKGCONFIG_FILES} ${INSTALL_DATA} ${FAKEDIR}/libdata/pkgconfig/${pcfile}.pc \ ${PREFIX}/libdata/pkgconfig/${pcfile}.pc .endfor .endif # !defined(NOGECKO_INSTALL) gecko-moz-pis-pre-install: .if defined(MOZ_PIS_SCRIPTS) ${MKDIR} ${FAKEDIR}/${MOZ_PIS_DIR} .for moz in ${MOZ_PIS_SCRIPTS} ${INSTALL_SCRIPT} ${WRKDIR}/${moz} ${FAKEDIR}/${MOZ_PIS_DIR} .endfor .endif post-install: gecko-post-install gecko-post-install: .if !defined(PACKAGE_BUILDING) && !defined(NO_MOZPKGINSTALL) @if [ -e ${PKGINSTALL} ] ; then \ ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; \ fi .endif @-update-desktop-database .endif .endif # HERE THERE BE TACOS -- adamw Index: head/devel/nspr/Makefile =================================================================== --- head/devel/nspr/Makefile (revision 303830) +++ head/devel/nspr/Makefile (revision 303831) @@ -1,91 +1,91 @@ # Ports collection Makefile for: nspr # Date created: 18 December 2001 # Whom: Maxim Sobolev # # $FreeBSD$ # $MCom: ports-experimental/devel/nspr/Makefile,v 1.6 2008/03/12 13:06:56 ahze Exp $ PORTNAME= nspr DISTVERSION= 4.9.2 CATEGORIES= devel MASTER_SITES= MOZILLA MASTER_SITE_SUBDIR= nspr/releases/v${PORTVERSION}/src MAINTAINER= gecko@FreeBSD.org COMMENT= A platform-neutral API for system level and libc like functions WRKSRC= ${WRKDIR}/${DISTNAME}/mozilla/nsprpub/build USE_LDCONFIG= yes USE_GMAKE= yes MAKE_JOBS_SAFE= yes GNU_CONFIGURE= yes CONFIGURE_SCRIPT=../configure -CONFIGURE_ARGS= --disable-debug \ +CONFIGURE_ARGS= --srcdir=${WRKSRC:H} \ --with-pthreads CONFIGURE_ENV= BSD_PTHREAD_LIBS=${PTHREAD_LIBS} MAKE_ENV= DIST=${WRKSRC}/dist LIBS= libnspr4.so.1 libplc4.so.1 libplds4.so.1 .include -.if ${ARCH} == "arm" -BROKEN= Does not compile on arm +.if !defined(WITH_DEBUG) +CONFIGURE_ARGS+=--disable-debug .endif post-patch: @${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g ; s,echo aout,echo elf,g' ${WRKSRC}/${CONFIGURE_SCRIPT} do-install: ${MKDIR} ${PREFIX}/include/nspr ${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \ ${TAR} -C ${PREFIX}/include -xof - ${FIND} ${PREFIX}/include/nspr -type d | \ ${XARGS} ${CHMOD} 0755 ${FIND} ${PREFIX}/include/nspr -type f | \ ${XARGS} ${CHMOD} ${SHAREMODE} ${TAR} -C ${WRKSRC}/dist/lib --dereference -cf - . | \ ${TAR} -C ${PREFIX}/lib -xof - ${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${PREFIX}/bin ${MKDIR} ${PREFIX}/libdata/pkgconfig ${INSTALL_DATA} ${WRKSRC}/config/nspr.pc ${PREFIX}/libdata/pkgconfig .for lib in ${LIBS} .if defined(STRIP) && ${STRIP} != "" ${STRIP_CMD} ${PREFIX}/lib/${lib} .endif ${CHMOD} ${BINMODE} ${PREFIX}/lib/${lib} ${LN} -sf ${lib} ${PREFIX}/lib/${lib:R} .endfor prtests: ${SETENV} PTHREAD_LIBS="${PTHREAD_LIBS}" ${GMAKE} -C ${WRKSRC}/pr/tests ${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh libtests: ${GMAKE} -C ${WRKSRC}/lib/tests ${WRKSRC}/lib/tests/string ${WRKSRC}/lib/tests/base64t # The test below is commented out, because arena requires # command-line arguments. If you can provide reasonable values # for it, please contact ${MAINTAINER}. Thank you. # ${WRKSRC}/lib/tests/arena # test: libtests prtests #regression-test: test #.if defined(PACKAGE_BUILDING) #post-build: test #.else post-build: # # Please, consider running ``make test'' to find any # possible build problems. # #.endif .include Index: head/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp =================================================================== --- head/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp (revision 303830) +++ head/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp (nonexistent) @@ -1,31 +0,0 @@ ---- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 -+++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 -@@ -49,6 +49,9 @@ - // Avoid warnings about ASSERT being defined by the assembler as well. - #undef ASSERT - -+#if defined(__FreeBSD__) -+#include -+#endif - #ifdef XP_OS2 - #define _PC_53 PC_53 - #define _MCW_EM MCW_EM -@@ -691,8 +694,18 @@ - - #else - -+#if defined(__FreeBSD__) -+#if __BSD_VISIBLE == 0 -+#error __BSD_VISIBLE is zero, so fedisableexcept is not defined -+#endif -+#include -+#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) -+#else -+ - #define FIX_FPU() ((void)0) - -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ -+ - #endif - - JSBool Property changes on: head/mail/thunderbird/files/patch-mozilla-js-src-jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-mozilla-configure.in =================================================================== --- head/mail/thunderbird/files/patch-mozilla-configure.in (revision 303830) +++ head/mail/thunderbird/files/patch-mozilla-configure.in (nonexistent) @@ -1,25 +0,0 @@ ---- mozilla/configure.in.orig 2012-05-23 20:56:34.000000000 +0200 -+++ mozilla/configure.in 2012-05-27 18:18:25.000000000 +0200 -@@ -4230,6 +4233,9 @@ - if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then - MOZ_NATIVE_LIBEVENT= - else -+PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, -+ [MOZ_NATIVE_LIBEVENT=1 -+ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ - if test "${LIBEVENT_DIR}" = "yes"; then - LIBEVENT_DIR=/usr - fi -@@ -4242,10 +4248,11 @@ else - AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) - AC_CHECK_LIB(event, event_init, - [MOZ_NATIVE_LIBEVENT=1 -- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" -+ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" - MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], - [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) - fi -+]) - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS Property changes on: head/mail/thunderbird/files/patch-mozilla-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp =================================================================== --- head/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (revision 303830) +++ head/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 -+++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 -@@ -57,6 +57,11 @@ - nsresult - nsThreadManager::Init() - { -+#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ -+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) -+ if (!gTLSThreadID) -+ gTLSThreadID = mozilla::threads::Generic; -+#endif - mThreadsByPRThread.Init(); - - if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc =================================================================== --- head/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc (revision 303830) +++ head/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc (nonexistent) @@ -1,11 +0,0 @@ ---- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 -+++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 -@@ -540,4 +540,8 @@ - GPOS::position_finish (buffer); - } - -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf::search(unsigned int const &) const; - Property changes on: head/mail/thunderbird/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug351181 =================================================================== --- head/mail/thunderbird/files/patch-bug351181 (nonexistent) +++ head/mail/thunderbird/files/patch-bug351181 (revision 303831) @@ -0,0 +1,31 @@ +--- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -49,6 +49,9 @@ + // Avoid warnings about ASSERT being defined by the assembler as well. + #undef ASSERT + ++#if defined(__FreeBSD__) ++#include ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool Property changes on: head/mail/thunderbird/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug543241 =================================================================== --- head/mail/thunderbird/files/patch-bug543241 (nonexistent) +++ head/mail/thunderbird/files/patch-bug543241 (revision 303831) @@ -0,0 +1,14 @@ +--- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 ++++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 +@@ -57,6 +57,11 @@ + nsresult + nsThreadManager::Init() + { ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ ++ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) ++ if (!gTLSThreadID) ++ gTLSThreadID = mozilla::threads::Generic; ++#endif + mThreadsByPRThread.Init(); + + if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/mail/thunderbird/files/patch-bug543241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug732340 =================================================================== --- head/mail/thunderbird/files/patch-bug732340 (nonexistent) +++ head/mail/thunderbird/files/patch-bug732340 (revision 303831) @@ -0,0 +1,14 @@ +--- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 ++++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 +@@ -537,4 +537,10 @@ hb_ot_layout_position_finish (hb_face_t + GPOS::position_finish (buffer); + } + ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3 ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf::search(unsigned int const &) const; ++#endif + + Property changes on: head/mail/thunderbird/files/patch-bug732340 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug753046 =================================================================== --- head/mail/thunderbird/files/patch-bug753046 (revision 303830) +++ head/mail/thunderbird/files/patch-bug753046 (revision 303831) @@ -1,1225 +1,1229 @@ # Bug 753046 - Add support for DragonFly/NetBSD $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_WIDGET_QT +#include // for _exit() #include #include "nsQAppInstance.h" #include "NestedLoopTimer.h" @@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin // TODO: use PluginPRLibrary here -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) mShutdownFunc = (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); @@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_MACOSX) *_retval = mGetEntryPointsFunc(&mFunctions); @@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); return true; #elif defined(OS_WIN) || defined(OS_MACOSX) $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.h @@ -340,7 +340,7 @@ private: // we get this from the plugin NP_PLUGINSHUTDOWN mShutdownFunc; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_BSD) NP_PLUGINUNIXINIT mInitializeFunc; #elif defined(OS_WIN) || defined(OS_MACOSX) NP_PLUGININIT mInitializeFunc; $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ mozilla/ipc/chromium/Makefile.in @@ -278,6 +278,34 @@ endif endif # } OS_LINUX +ifdef OS_BSD # { + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ + file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) + +ifdef MOZ_ENABLE_GTK2 +CPPSRCS += \ + message_pump_glib.cc \ + $(NULL) +endif + +ifdef MOZ_ENABLE_QT +MOCSRCS = \ + moc_message_pump_qt.cc \ + $(NULL) + +CPPSRCS += \ + $(MOCSRCS) \ + message_pump_qt.cc \ + $(NULL) +endif + +endif # } OS_BSD + # libevent ifndef MOZ_NATIVE_LIBEVENT # { $NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 @@ -56,17 +56,6 @@ -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ $(NULL) -ifeq ($(OS_ARCH),Darwin) # { - -OS_MACOSX = 1 -OS_POSIX = 1 - -DEFINES += \ - -DOS_MACOSX=1 \ - -DOS_POSIX=1 \ - $(NULL) - -else # } { ifeq ($(OS_ARCH),WINNT) # { OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) @@ -93,13 +82,65 @@ endif else # } { - -OS_LINUX = 1 OS_POSIX = 1 +DEFINES += -DOS_POSIX=1 + +ifeq ($(OS_ARCH),Darwin) # { + +OS_MACOSX = 1 +DEFINES += \ + -DOS_MACOSX=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),DragonFly) # { + +OS_DRAGONFLY = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_DRAGONFLY=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),FreeBSD) # { + +OS_FREEBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_FREEBSD=1 \ + -DOS_BSD=1 \ + $(NULL) +else # } { +ifeq ($(OS_ARCH),NetBSD) # { + +OS_NETBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_NETBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),OpenBSD) # { + +OS_OPENBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_OPENBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { + +OS_LINUX = 1 DEFINES += \ -DOS_LINUX=1 \ - -DOS_POSIX=1 \ $(NULL) # NB: to stop gcc warnings about exporting template instantiation @@ -107,4 +147,8 @@ endif # } endif # } +endif # } +endif # } +endif # } +endif # } $NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/base_paths.h @@ -13,7 +13,7 @@ #include "base/base_paths_win.h" #elif defined(OS_MACOSX) #include "base/base_paths_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "base/base_paths_linux.h" #endif #include "base/path_service.h" $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/debug_util_posix.cc @@ -5,7 +5,7 @@ #include "build/build_config.h" #include "base/debug_util.h" -#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) +#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) #include #include @@ -17,9 +17,16 @@ #include #if MOZ_HAVE_EXECINFO_H #include +#endif + +#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + #include "base/basictypes.h" #include "base/eintr_wrapper.h" #include "base/logging.h" @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u return false; } -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Based on Apple's recommended method as described in // http://developer.apple.com/qa/qa2004/qa1361.html @@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() { // This process is being debugged if the P_TRACED flag is set. is_set = true; +#if defined(OS_DRAGONFLY) + being_debugged = (info.kp_flags & P_TRACED) != 0; +#elif defined(OS_FREEBSD) + being_debugged = (info.ki_flag & P_TRACED) != 0; +#elif defined(OS_OPENBSD) + being_debugged = (info.p_flag & P_TRACED) != 0; +#else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif return being_debugged; } diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h new file mode 100644 index 0000000..3fc1a87 --- /dev/null +++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,112 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from dir_reader_linux.h + +#ifndef BASE_DIR_READER_BSD_H_ +#define BASE_DIR_READER_BSD_H_ +#pragma once + +#include +#include +#include +#include +#include + +#include "base/logging.h" +#include "base/eintr_wrapper.h" + +// See the comments in dir_reader_posix.h about this. + +namespace base { + +class DirReaderBSD { + public: + explicit DirReaderBSD(const char* directory_path) +#ifdef O_DIRECTORY + : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), +#else + : fd_(open(directory_path, O_RDONLY)), +#endif + offset_(0), + size_(0) { + memset(buf_, 0, sizeof(buf_)); + } + + ~DirReaderBSD() { + if (fd_ >= 0) { + if (HANDLE_EINTR(close(fd_))) + DLOG(ERROR) << "Failed to close directory handle"; + } + } + + bool IsValid() const { + return fd_ >= 0; + } + + // Move to the next entry returning false if the iteration is complete. + bool Next() { + if (size_) { + struct dirent* dirent = reinterpret_cast(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else + offset_ += dirent->d_reclen; ++#endif + } + + if (offset_ != size_) + return true; + +#ifdef OS_OPENBSD + const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); +#else + const int r = getdents(fd_, buf_, sizeof(buf_)); +#endif + if (r == 0) + return false; + if (r == -1) { +#ifdef OS_OPENBSD + DLOG(ERROR) << "getdirentries returned an error: " << errno; +#else + DLOG(ERROR) << "getdents returned an error: " << errno; +#endif + return false; + } + size_ = r; + offset_ = 0; + return true; + } + + const char* name() const { + if (!size_) + return NULL; + + const struct dirent* dirent = + reinterpret_cast(&buf_[offset_]); + return dirent->d_name; + } + + int fd() const { + return fd_; + } + + static bool IsFallback() { + return false; + } + + private: + const int fd_; + char buf_[512]; +#ifdef OS_OPENBSD + off_t *basep_; +#endif + size_t offset_, size_; + + DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); +}; + +} // namespace base + +#endif // BASE_DIR_READER_BSD_H_ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h index 9a34492..62b280c 100644 --- mozilla/ipc/chromium/src/base/dir_reader_posix.h +++ mozilla/ipc/chromium/src/base/dir_reader_posix.h @@ -18,16 +18,20 @@ // seems worse than falling back to enumerating all file descriptors so we will // probably never implement this on the Mac. -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) #include "base/dir_reader_linux.h" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #endif namespace base { -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) typedef DirReaderLinux DirReaderPosix; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #endif diff --git mozilla/ipc/chromium/src/base/file_util_linux.cc mozilla/ipc/chromium/src/base/file_util_linux.cc index 171e44f..0c6dfcc 100644 --- mozilla/ipc/chromium/src/base/file_util_linux.cc +++ mozilla/ipc/chromium/src/base/file_util_linux.cc @@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { -#ifdef ANDROID +#if defined(ANDROID) || defined(OS_BSD) return GetTempDir(path); #else *path = FilePath("/dev/shm"); $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/file_util_posix.cc @@ -31,7 +31,7 @@ #include "base/time.h" // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#ifndef HAVE_STAT64 #define stat64 stat #endif $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #ifdef MOZ_WIDGET_GTK2 #include "base/message_pump_glib.h" #endif @@ -119,7 +119,7 @@ if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread.h @@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE #elif defined(OS_POSIX) #include typedef pthread_t PlatformThreadHandle; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_OPENBSD) #include typedef pid_t PlatformThreadId; +#elif defined(OS_BSD) +typedef lwpid_t PlatformThreadId; #elif defined(OS_MACOSX) #include typedef mach_port_t PlatformThreadId; $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc @@ -9,16 +9,30 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_NETBSD) +#include #elif defined(OS_LINUX) #include -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include -#elif !defined(__NetBSD__) -#include +#elif defined(OS_FREEBSD) +#include +#if __FreeBSD_version > 802500 +#include +#else +_Pragma("GCC visibility push(default)") +extern "C" int thr_self(long *); +_Pragma("GCC visibility pop") +#endif #endif + +#if !defined(OS_MACOSX) #include #endif +#if defined(OS_BSD) && !defined(OS_NETBSD) +#include +#endif + #if defined(OS_MACOSX) namespace base { void InitThreading(); @@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() { // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) + return lwp_gettid(); +#elif defined(OS_FREEBSD) +# if __FreeBSD_version > 900030 + return pthread_getthreadid_np(); +# else + long lwpid; + thr_self(&lwpid); + return lwpid; +# endif +#elif defined(OS_OPENBSD) - // TODO(BSD): find a better thread ID - return (intptr_t)(pthread_self()); + return (intptr_t) (pthread_self()); #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif @@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) { // Note that glibc also has a 'pthread_setname_np' api, but it may not be // available everywhere and it's only benefit over using prctl directly is // that it can set the name of threads other than the current thread. -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(OS_BSD) && !defined(OS_NETBSD) pthread_set_name_np(pthread_self(), name); -#elif defined(__NetBSD__) +#elif defined(OS_NETBSD) - pthread_setname_np(pthread_self(), "%s", name); + pthread_setname_np(pthread_self(), "%s", (void *)name); #else prctl(PR_SET_NAME, reinterpret_cast(name), 0, 0, 0); $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 +++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 @@ -280,6 +280,7 @@ class NamedProcessIterator { const ProcessEntry* NextProcessEntry(); private: +#if !defined(OS_BSD) // Determines whether there's another process (regardless of executable) // left in the list of all processes. Returns true and sets entry_ to // that process's info if there is one, false otherwise. @@ -292,18 +292,24 @@ void InitProcessEntry(ProcessEntry* entry); std::wstring executable_name_; +#endif #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; #elif defined(OS_LINUX) DIR *procfs_dir_; +#elif defined(OS_BSD) + std::vector content; + size_t nextEntry; #elif defined(OS_MACOSX) std::vector kinfo_procs_; size_t index_of_kinfo_proc_; #endif +#if !defined(OS_BSD) ProcessEntry entry_; const ProcessFilter* filter_; +#endif DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); }; $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_bsd.cc @@ -0,0 +1,318 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from process_util_linux.cc and process_util_mac.cc + +#include "base/process_util.h" + +#include +#include +#include +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + +#include +#include +#include +#include + +#include + +#include "base/debug_util.h" +#include "base/eintr_wrapper.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/string_tokenizer.h" +#include "base/string_util.h" + +#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ + || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) +#define HAVE_POSIX_SPAWN 1 +#endif + +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported +# else +# define __dso_public __attribute__((__visibility__("default"))) +# endif +#endif + +#ifdef HAVE_POSIX_SPAWN +#include +extern "C" char **environ __dso_public; +#endif + +namespace { + +enum ParsingState { + KEY_NAME, + KEY_VALUE +}; + +static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); + +} // namespace + +namespace base { + +#ifdef HAVE_POSIX_SPAWN + +void FreeEnvVarsArray(char* array[], int length) +{ + for (int i = 0; i < length; i++) { + free(array[i]); + } + delete[] array; +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; + for (size_t i = 0; i < argv.size(); i++) { + argv_copy[i] = const_cast(argv[i].c_str()); + } + argv_copy[argv.size()] = NULL; + + // Make sure we don't leak any FDs to the child process by marking all FDs + // as close-on-exec. + SetAllFDsToCloseOnExec(); + + // Copy environment to a new char array and add the variables + // in env_vars_to_set. + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); + std::string varValue = varString.substr(varString.find_first_of('=') + 1); + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } + pos++; + } + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; + int i = 0; + for (environment_map::const_iterator it = combined_env_vars.begin(); + it != combined_env_vars.end(); ++it) { + std::string entry(it->first); + entry += "="; + entry += it->second; + vars[i] = strdup(entry.c_str()); + i++; + } + vars[i] = NULL; + + posix_spawn_file_actions_t file_actions; + if (posix_spawn_file_actions_init(&file_actions) != 0) { + FreeEnvVarsArray(vars, varsLen); + return false; + } + + // Turn fds_to_remap array into a set of dup2 calls. + for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); + it != fds_to_remap.end(); + ++it) { + int src_fd = it->first; + int dest_fd = it->second; + + if (src_fd == dest_fd) { + int flags = fcntl(src_fd, F_GETFD); + if (flags != -1) { + fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); + } + } else { + if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { + posix_spawn_file_actions_destroy(&file_actions); + FreeEnvVarsArray(vars, varsLen); + return false; + } + } + } + + pid_t pid = 0; + int spawn_succeeded = (posix_spawnp(&pid, + argv_copy[0], + &file_actions, + NULL, + argv_copy, + vars) == 0); + + FreeEnvVarsArray(vars, varsLen); + + posix_spawn_file_actions_destroy(&file_actions); + + bool process_handle_valid = pid > 0; + if (!spawn_succeeded || !process_handle_valid) { + retval = false; + } else { + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return retval; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, ProcessHandle* process_handle) { + // TODO(playmobil): Do we need to respect the start_hidden flag? + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#else // no posix_spawn, use fork/exec + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + scoped_array argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; + fd_shuffle1.reserve(fds_to_remap.size()); + fd_shuffle2.reserve(fds_to_remap.size()); + + pid_t pid = fork(); + if (pid < 0) + return false; + + if (pid == 0) { + for (file_handle_mapping_vector::const_iterator + it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { + fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); + fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); + } + + if (!ShuffleFileDescriptors(&fd_shuffle1)) + _exit(127); + + CloseSuperfluousFds(fd_shuffle2); + + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } + + for (size_t i = 0; i < argv.size(); i++) + argv_cstr[i] = const_cast(argv[i].c_str()); + argv_cstr[argv.size()] = NULL; + execvp(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; + exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return true; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, + ProcessHandle* process_handle) { + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#endif + +NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, + const ProcessFilter* filter) +{ + int numEntries; + kvm_t *kvm; + std::string exe(WideToASCII(executable_name)); + +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) + kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { +# if defined(OS_DRAGONFLY) + if (exe != procs[i].kp_comm) continue; + if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].kp_pid; + e.ppid = procs[i].kp_ppid; + strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); + content.push_back(e); +# elif defined(OS_FREEBSD) + if (exe != procs[i].ki_comm) continue; + if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].ki_pid; + e.ppid = procs[i].ki_ppid; + strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); + content.push_back(e); +# endif +#else + kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); +#if defined(OS_OPENBSD) + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries); +#else + struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); +#endif + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { + if (exe != procs[i].p_comm) continue; + if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].p_pid; + e.ppid = procs[i].p_ppid; + strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); + content.push_back(e); +#endif + } + } + nextEntry = 0; + kvm_close(kvm); +} + +NamedProcessIterator::~NamedProcessIterator() { +} + +const ProcessEntry* NamedProcessIterator::NextProcessEntry() { + if (nextEntry >= content.size()) return NULL; + return &content[nextEntry++]; +} + +bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; +} + +} // namespace base $NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_posix.cc @@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj #elif defined(OS_MACOSX) static const rlim_t kSystemDefaultMaxFds = 256; static const char kFDDir[] = "/dev/fd"; +#elif defined(OS_BSD) + // the getrlimit below should never fail, so whatever .. + static const rlim_t kSystemDefaultMaxFds = 1024; + // at least /dev/fd will exist + static const char kFDDir[] = "/dev/fd"; #endif // Get the maximum number of FDs possible. @@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj void SetAllFDsToCloseOnExec() { #if defined(OS_LINUX) const char fd_dir[] = "/proc/self/fd"; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) const char fd_dir[] = "/dev/fd"; #endif ScopedDIR dir_closer(opendir(fd_dir)); $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ --- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ mozilla/ipc/chromium/src/base/sys_info_posix.cc @@ -18,6 +18,11 @@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@ -26,7 +31,11 @@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h @@ -34,7 +34,7 @@ #include "base/third_party/nspr/prcpucfg_win.h" #elif defined(__APPLE__) #include "base/third_party/nspr/prcpucfg_mac.h" -#elif defined(__linux__) || defined(ANDROID) +#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include "base/third_party/nspr/prcpucfg_linux.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc @@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp LL_ADD(retVal, retVal, temp); return retVal; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) struct tm exp_tm = {0}; exp_tm.tm_sec = exploded->tm_sec; exp_tm.tm_min = exploded->tm_min; @@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp result *= kSecondsToMicroseconds; result += exploded->tm_usec; return result; +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; + exp_tm.tm_hour = exploded->tm_hour; + exp_tm.tm_mday = exploded->tm_mday; + exp_tm.tm_mon = exploded->tm_month; + exp_tm.tm_year = exploded->tm_year - 1900; + + // time_t is 64bit + time_t absolute_time = timegm(&exp_tm); + + PRTime result = static_cast(absolute_time); + result -= exploded->tm_params.tp_gmt_offset + + exploded->tm_params.tp_dst_offset; + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; #else #error No PR_ImplodeTime implemented on your platform. #endif diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc index abf2a56..48791f6 100644 --- mozilla/ipc/chromium/src/base/time_posix.cc +++ mozilla/ipc/chromium/src/base/time_posix.cc @@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { // With numer and denom = 1 (the expected case), the 64-bit absolute time // reported in nanoseconds is enough to last nearly 585 years. -#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ +#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 struct timespec ts; $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/build/build_config.h @@ -19,6 +19,12 @@ #define OS_MACOSX 1 #elif defined(__linux__) || defined(ANDROID) #define OS_LINUX 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#elif defined(__NetBSD__) +#define OS_NETBSD 1 #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #elif defined(_WIN32) @@ -27,9 +33,16 @@ #error Please add support for your platform in build/build_config.h #endif +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ + || defined(OS_NETBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + // For access to standard POSIX features, use OS_POSIX instead of a more // specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #define OS_POSIX 1 #endif diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc index bd866ee..2ea5b19 100644 --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess }; // This is a control message buffer large enough to hold kMaxReadFDs -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_NETBSD) // TODO(agl): OSX appears to have non-constant CMSG macros! char input_cmsg_buf_[1024]; #else $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h @@ -195,7 +195,7 @@ }; #endif -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) +#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { @@ -248,7 +248,7 @@ }; #endif // defined(OS_MACOSX) -#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) +#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| template <> struct ParamTraits { $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) #include "base/shared_memory.h" #endif @@ -66,7 +66,7 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; @@ -108,7 +108,7 @@ class TransportDIB { private: TransportDIB(); -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) explicit TransportDIB(base::SharedMemoryHandle dib); base::SharedMemory shared_memory_; uint32 sequence_num_; $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/glue/GeckoChildProcessHost.cpp @@ -430,7 +430,7 @@ // and passing wstrings from one config to the other is unsafe. So // we split the logic here. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) base::environment_map newEnvVars; // XPCOM may not be initialized in some subprocesses. We don't want // to initialize XPCOM just for the directory service, especially @@ -445,8 +445,8 @@ if (NS_SUCCEEDED(rv)) { nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX -# ifdef MOZ_WIDGET_ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) +# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) path += "/lib"; # endif // MOZ_WIDGET_ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); #if defined(MOZ_CRASHREPORTER) -# if defined(OS_LINUX) +# if defined(OS_LINUX) || defined(OS_BSD) int childCrashFd, childCrashRemapFd; if (!CrashReporter::CreateNotificationPipeForChild( &childCrashFd, &childCrashRemapFd)) @@ -594,7 +594,7 @@ #endif base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) newEnvVars, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h index f37998d..b05dc7b 100644 --- mozilla/ipc/glue/SharedMemorySysV.h +++ mozilla/ipc/glue/SharedMemorySysV.h @@ -8,7 +8,7 @@ #ifndef mozilla_ipc_SharedMemorySysV_h #define mozilla_ipc_SharedMemorySysV_h -#if defined(OS_LINUX) && !defined(ANDROID) +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) // SysV shared memory isn't available on Windows, but we define the // following macro so that #ifdefs are clearer (compared to #ifdef $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ --- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 +++ mozilla/toolkit/library/Makefile.in @@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle endif endif +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +# keep `environ' unresolved, see bug 14426 for binutils +EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) ifdef ACCESSIBILITY Index: head/mail/thunderbird/files/patch-bug774671 =================================================================== --- head/mail/thunderbird/files/patch-bug774671 (nonexistent) +++ head/mail/thunderbird/files/patch-bug774671 (revision 303831) @@ -0,0 +1,15 @@ +--- mozilla/js/src/jsprvtd.h.orig 2012-08-25 02:31:13.000000000 +0200 ++++ mozilla/js/src/jsprvtd.h 2012-09-06 17:14:09.000000000 +0200 +@@ -149,9 +149,9 @@ + class UpvarCookie; + + class Proxy; +-class BaseProxyHandler; +-class DirectWrapper; +-class CrossCompartmentWrapper; ++class JS_FRIEND_API(BaseProxyHandler); ++class JS_FRIEND_API(DirectWrapper); ++class JS_FRIEND_API(CrossCompartmentWrapper); + + class TempAllocPolicy; + class RuntimeAllocPolicy; Property changes on: head/mail/thunderbird/files/patch-bug774671 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug787904 =================================================================== --- head/mail/thunderbird/files/patch-bug787904 (nonexistent) +++ head/mail/thunderbird/files/patch-bug787904 (revision 303831) @@ -0,0 +1,12 @@ +--- mozilla/js/src/gc/Heap.h ++++ mozilla/js/src/gc/Heap.h +@@ -108,7 +108,8 @@ struct Cell + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ +-#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) ++#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ ++ (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) + const size_t PageShift = 13; + #else + const size_t PageShift = 12; Property changes on: head/mail/thunderbird/files/patch-bug787904 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-bug788039 =================================================================== --- head/mail/thunderbird/files/patch-bug788039 (nonexistent) +++ head/mail/thunderbird/files/patch-bug788039 (revision 303831) @@ -0,0 +1,59 @@ +# Bug 788039 - With no prefix search libevent via pkg-config. + +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA + + MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@ + MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@ +-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@ ++MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@ + + MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ + MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -3854,7 +3854,7 @@ fi + dnl system libevent Support + dnl ======================================================== + MOZ_ARG_WITH_STRING(system-libevent, +-[ --with-system-libevent=[PFX] ++[ --with-system-libevent[=PFX] + Use system libevent [installed at prefix PFX]], + LIBEVENT_DIR=$withval) + +@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= ++elif test "$LIBEVENT_DIR" = yes; then ++ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ MOZ_NATIVE_LIBEVENT=1, ++ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found])) + else +- if test "${LIBEVENT_DIR}" = "yes"; then +- LIBEVENT_DIR=/usr +- fi + CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + MOZ_CHECK_HEADER(event.h, +@@ -3876,16 +3877,16 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], +- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) ++ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + + AC_SUBST(MOZ_NATIVE_LIBEVENT) +-AC_SUBST(MOZ_LIBEVENT_INCLUDES) ++AC_SUBST(MOZ_LIBEVENT_CFLAGS) + AC_SUBST(MOZ_LIBEVENT_LIBS) + + dnl ======================================================== Property changes on: head/mail/thunderbird/files/patch-bug788039 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-clang32-libc++-visibility-hack =================================================================== --- head/mail/thunderbird/files/patch-clang32-libc++-visibility-hack (nonexistent) +++ head/mail/thunderbird/files/patch-clang32-libc++-visibility-hack (revision 303831) @@ -0,0 +1,57 @@ +--- configure.in~ ++++ configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/js/src/configure.in~ ++++ mozilla/js/src/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then Property changes on: head/mail/thunderbird/files/patch-clang32-libc++-visibility-hack ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in =================================================================== --- head/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303830) +++ head/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303831) @@ -1,28 +1,28 @@ --- mozilla/ipc/chromium/Makefile.in~ +++ mozilla/ipc/chromium/Makefile.in @@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) +# workaround IPC hang with libevent2 +ifndef MOZ_DEBUG +ifneq (,$(filter 4.2.%, $(CXX_VERSION))) +MOZ_OPTIMIZE_FLAGS = -O1 +OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) +endif +endif + LIBRARY_NAME = chromium_s FORCE_STATIC_LIB = 1 LIBXUL_LIBRARY = 1 @@ -55,9 +60,7 @@ vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) -+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS)) endif # } vpath %.cc \ Index: head/mail/thunderbird-esr/files/patch-mozilla-js-src-jsnum.cpp =================================================================== --- head/mail/thunderbird-esr/files/patch-mozilla-js-src-jsnum.cpp (revision 303830) +++ head/mail/thunderbird-esr/files/patch-mozilla-js-src-jsnum.cpp (nonexistent) @@ -1,28 +0,0 @@ ---- mozilla/js/src/jsnum.cpp.orig Sun Nov 5 18:37:07 2006 -+++ mozilla/js/src/jsnum.cpp Sun Nov 5 18:42:31 2006 -@@ -45,6 +45,9 @@ - #if defined(XP_WIN) || defined(XP_OS2) - #include - #endif -+#if defined(__FreeBSD__) -+#include -+#endif - #include - #include - #include -@@ -532,7 +535,15 @@ static jsdouble NaN; - - #else - -+#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 -+#include -+#define FIX_FPU() (fedisableexcept(FE_ALL_EXCEPT)) -+ -+#else -+ - #define FIX_FPU() ((void)0) -+ -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ - - #endif - Property changes on: head/mail/thunderbird-esr/files/patch-mozilla-js-src-jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-mozilla-configure.in =================================================================== --- head/mail/thunderbird-esr/files/patch-mozilla-configure.in (revision 303830) +++ head/mail/thunderbird-esr/files/patch-mozilla-configure.in (nonexistent) @@ -1,52 +0,0 @@ ---- mozilla/configure.in.orig 2010-11-04 21:05:18.000000000 +0100 -+++ mozilla/configure.in 2010-11-09 12:59:28.000000000 +0100 -@@ -3803,19 +3803,21 @@ - AC_CHECK_FUNCS(localtime_r strtok_r) - - dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt --_SAVE_LDFLAGS=$LDFLAGS --LDFLAGS="$LDFLAGS -lrt" --AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, -+_SAVE_LIBS=$LIBS -+AC_SEARCH_LIBS(clock_gettime, rt) -+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), - ac_cv_have_clock_monotonic, - [AC_TRY_LINK([#include ], - [ struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); ], - ac_cv_have_clock_monotonic=yes, - ac_cv_have_clock_monotonic=no)]) --LDFLAGS=$_SAVE_LDFLAGS -+LIBS=$_SAVE_LIBS - if test "$ac_cv_have_clock_monotonic" = "yes"; then - HAVE_CLOCK_MONOTONIC=1 -- REALTIME_LIBS=-lrt -+ if test "$ac_cv_search_clock_gettime" != "none required"; then -+ REALTIME_LIBS=$ac_cv_search_clock_gettime -+ fi - AC_DEFINE(HAVE_CLOCK_MONOTONIC) - AC_SUBST(HAVE_CLOCK_MONOTONIC) - AC_SUBST(REALTIME_LIBS) -@@ -4230,6 +4233,9 @@ - if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then - MOZ_NATIVE_LIBEVENT= - else -+PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, -+ [MOZ_NATIVE_LIBEVENT=1 -+ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ - if test "${LIBEVENT_DIR}" = "yes"; then - LIBEVENT_DIR=/usr - fi -@@ -4242,10 +4248,11 @@ else - AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) - AC_CHECK_LIB(event, event_init, - [MOZ_NATIVE_LIBEVENT=1 -- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" -+ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" - MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], - [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) - fi -+]) - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS Property changes on: head/mail/thunderbird-esr/files/patch-mozilla-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp =================================================================== --- head/mail/thunderbird-esr/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (revision 303830) +++ head/mail/thunderbird-esr/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 -+++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 -@@ -89,6 +89,11 @@ - nsresult - nsThreadManager::Init() - { -+#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ -+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) -+ if (!gTLSThreadID) -+ gTLSThreadID = mozilla::threads::Generic; -+#endif - if (!mThreadsByPRThread.Init()) - return NS_ERROR_OUT_OF_MEMORY; - Property changes on: head/mail/thunderbird-esr/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-bug351181 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug351181 (nonexistent) +++ head/mail/thunderbird-esr/files/patch-bug351181 (revision 303831) @@ -0,0 +1,28 @@ +--- mozilla/js/src/jsnum.cpp.orig Sun Nov 5 18:37:07 2006 ++++ mozilla/js/src/jsnum.cpp Sun Nov 5 18:42:31 2006 +@@ -45,6 +45,9 @@ + #if defined(XP_WIN) || defined(XP_OS2) + #include + #endif ++#if defined(__FreeBSD__) ++#include ++#endif + #include + #include + #include +@@ -532,7 +535,15 @@ static jsdouble NaN; + + #else + ++#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 ++#include ++#define FIX_FPU() (fedisableexcept(FE_ALL_EXCEPT)) ++ ++#else ++ + #define FIX_FPU() ((void)0) ++ ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ + + #endif + Property changes on: head/mail/thunderbird-esr/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-bug543241 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug543241 (nonexistent) +++ head/mail/thunderbird-esr/files/patch-bug543241 (revision 303831) @@ -0,0 +1,14 @@ +--- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 ++++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 +@@ -89,6 +89,11 @@ + nsresult + nsThreadManager::Init() + { ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ ++ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) ++ if (!gTLSThreadID) ++ gTLSThreadID = mozilla::threads::Generic; ++#endif + if (!mThreadsByPRThread.Init()) + return NS_ERROR_OUT_OF_MEMORY; + Property changes on: head/mail/thunderbird-esr/files/patch-bug543241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-bug653551 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug653551 (nonexistent) +++ head/mail/thunderbird-esr/files/patch-bug653551 (revision 303831) @@ -0,0 +1,29 @@ +commit 47ea30f +Author: Landry Breuil +Date: Thu Feb 2 15:31:56 2012 +0900 + + Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha +--- + js/src/configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git mozilla/js/src/configure.in mozilla/js/src/configure.in +index 84390cf..d663c46 100644 +--- mozilla/js/src/configure.in ++++ mozilla/js/src/configure.in +@@ -2806,13 +2806,15 @@ arm*-*) + AC_DEFINE(JS_NUNBOX32) + ;; + sparc*-*) ++ if test ! "$HAVE_64BIT_OS" ; then + NANOJIT_ARCH=Sparc + ENABLE_METHODJIT=1 + ENABLE_MONOIC=1 + ENABLE_POLYIC=1 + ENABLE_METHODJIT_TYPED_ARRAY=1 + AC_DEFINE(JS_CPU_SPARC) + AC_DEFINE(JS_NUNBOX32) ++ fi + ;; + mips*-*) + ENABLE_METHODJIT=1 Property changes on: head/mail/thunderbird-esr/files/patch-bug653551 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-bug728968 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug728968 (nonexistent) +++ head/mail/thunderbird-esr/files/patch-bug728968 (revision 303831) @@ -0,0 +1,50 @@ +commit 4075972 +Author: Mike Hommey +Date: Thu Feb 23 11:00:46 2012 +0100 + + Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey +--- + configure.in | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git mozilla/configure.in mozilla/configure.in +index 3ba7e2f..3d0614c 100644 +--- mozilla/configure.in ++++ mozilla/configure.in +@@ -3728,20 +3728,23 @@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6 + AC_CHECK_FUNCS(flockfile getpagesize) + AC_CHECK_FUNCS(localtime_r strtok_r) + +-dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt +-_SAVE_LDFLAGS=$LDFLAGS +-LDFLAGS="$LDFLAGS -lrt" +-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, +- ac_cv_have_clock_monotonic, +- [AC_TRY_LINK([#include ], +- [ struct timespec ts; +- clock_gettime(CLOCK_MONOTONIC, &ts); ], +- ac_cv_have_clock_monotonic=yes, +- ac_cv_have_clock_monotonic=no)]) +-LDFLAGS=$_SAVE_LDFLAGS +-if test "$ac_cv_have_clock_monotonic" = "yes"; then ++dnl check for clock_gettime(), the CLOCK_MONOTONIC clock ++AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), ++ ac_cv_clock_monotonic, ++ [for libs in "" -lrt; do ++ _SAVE_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $libs" ++ AC_TRY_LINK([#include ], ++ [ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ], ++ ac_cv_clock_monotonic=$libs ++ break, ++ ac_cv_clock_monotonic=no) ++ LDFLAGS="$_SAVE_LDFLAGS" ++ done]) ++if test "$ac_cv_clock_monotonic" != "no"; then + HAVE_CLOCK_MONOTONIC=1 +- REALTIME_LIBS=-lrt ++ REALTIME_LIBS=$ac_cv_clock_monotonic + AC_DEFINE(HAVE_CLOCK_MONOTONIC) + AC_SUBST(HAVE_CLOCK_MONOTONIC) + AC_SUBST(REALTIME_LIBS) Property changes on: head/mail/thunderbird-esr/files/patch-bug728968 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-bug753046 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug753046 (revision 303830) +++ head/mail/thunderbird-esr/files/patch-bug753046 (revision 303831) @@ -1,1197 +1,1201 @@ # Bug 753046 - Add support for DragonFly/NetBSD $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_WIDGET_QT +#include // for _exit() #include #include "nsQAppInstance.h" #include "NestedLoopTimer.h" @@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin // TODO: use PluginPRLibrary here -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) mShutdownFunc = (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); @@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_MACOSX) *_retval = mGetEntryPointsFunc(&mFunctions); @@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); return true; #elif defined(OS_WIN) || defined(OS_MACOSX) $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.h @@ -340,7 +340,7 @@ private: // we get this from the plugin NP_PLUGINSHUTDOWN mShutdownFunc; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_BSD) NP_PLUGINUNIXINIT mInitializeFunc; #elif defined(OS_WIN) || defined(OS_MACOSX) NP_PLUGININIT mInitializeFunc; $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ mozilla/ipc/chromium/Makefile.in @@ -278,6 +278,34 @@ endif endif # } OS_LINUX +ifdef OS_BSD # { + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ + file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) + +ifdef MOZ_ENABLE_GTK2 +CPPSRCS += \ + message_pump_glib.cc \ + $(NULL) +endif + +ifdef MOZ_ENABLE_QT +MOCSRCS = \ + moc_message_pump_qt.cc \ + $(NULL) + +CPPSRCS += \ + $(MOCSRCS) \ + message_pump_qt.cc \ + $(NULL) +endif + +endif # } OS_BSD + # libevent ifndef MOZ_NATIVE_LIBEVENT # { $NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 @@ -56,17 +56,6 @@ -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ $(NULL) -ifeq ($(OS_ARCH),Darwin) # { - -OS_MACOSX = 1 -OS_POSIX = 1 - -DEFINES += \ - -DOS_MACOSX=1 \ - -DOS_POSIX=1 \ - $(NULL) - -else # } { ifeq ($(OS_ARCH),WINNT) # { OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) @@ -93,13 +82,65 @@ endif else # } { - -OS_LINUX = 1 OS_POSIX = 1 +DEFINES += -DOS_POSIX=1 + +ifeq ($(OS_ARCH),Darwin) # { + +OS_MACOSX = 1 +DEFINES += \ + -DOS_MACOSX=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),DragonFly) # { + +OS_DRAGONFLY = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_DRAGONFLY=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),FreeBSD) # { + +OS_FREEBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_FREEBSD=1 \ + -DOS_BSD=1 \ + $(NULL) +else # } { +ifeq ($(OS_ARCH),NetBSD) # { + +OS_NETBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_NETBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),OpenBSD) # { + +OS_OPENBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_OPENBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { + +OS_LINUX = 1 DEFINES += \ -DOS_LINUX=1 \ - -DOS_POSIX=1 \ $(NULL) # NB: to stop gcc warnings about exporting template instantiation @@ -107,4 +147,8 @@ endif # } endif # } +endif # } +endif # } +endif # } +endif # } $NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/base_paths.h @@ -13,7 +13,7 @@ #include "base/base_paths_win.h" #elif defined(OS_MACOSX) #include "base/base_paths_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "base/base_paths_linux.h" #endif #include "base/path_service.h" $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/debug_util_posix.cc @@ -5,7 +5,7 @@ #include "build/build_config.h" #include "base/debug_util.h" -#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) +#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) #include #include @@ -17,9 +17,16 @@ #include #if MOZ_HAVE_EXECINFO_H #include +#endif + +#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + #include "base/basictypes.h" #include "base/eintr_wrapper.h" #include "base/logging.h" @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u return false; } -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Based on Apple's recommended method as described in // http://developer.apple.com/qa/qa2004/qa1361.html @@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() { // This process is being debugged if the P_TRACED flag is set. is_set = true; +#if defined(OS_DRAGONFLY) + being_debugged = (info.kp_flags & P_TRACED) != 0; +#elif defined(OS_FREEBSD) + being_debugged = (info.ki_flag & P_TRACED) != 0; +#elif defined(OS_OPENBSD) + being_debugged = (info.p_flag & P_TRACED) != 0; +#else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif return being_debugged; } diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h new file mode 100644 index 0000000..3fc1a87 --- /dev/null +++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,112 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from dir_reader_linux.h + +#ifndef BASE_DIR_READER_BSD_H_ +#define BASE_DIR_READER_BSD_H_ +#pragma once + +#include +#include +#include +#include +#include + +#include "base/logging.h" +#include "base/eintr_wrapper.h" + +// See the comments in dir_reader_posix.h about this. + +namespace base { + +class DirReaderBSD { + public: + explicit DirReaderBSD(const char* directory_path) +#ifdef O_DIRECTORY + : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), +#else + : fd_(open(directory_path, O_RDONLY)), +#endif + offset_(0), + size_(0) { + memset(buf_, 0, sizeof(buf_)); + } + + ~DirReaderBSD() { + if (fd_ >= 0) { + if (HANDLE_EINTR(close(fd_))) + DLOG(ERROR) << "Failed to close directory handle"; + } + } + + bool IsValid() const { + return fd_ >= 0; + } + + // Move to the next entry returning false if the iteration is complete. + bool Next() { + if (size_) { + struct dirent* dirent = reinterpret_cast(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else + offset_ += dirent->d_reclen; ++#endif + } + + if (offset_ != size_) + return true; + +#ifdef OS_OPENBSD + const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); +#else + const int r = getdents(fd_, buf_, sizeof(buf_)); +#endif + if (r == 0) + return false; + if (r == -1) { +#ifdef OS_OPENBSD + DLOG(ERROR) << "getdirentries returned an error: " << errno; +#else + DLOG(ERROR) << "getdents returned an error: " << errno; +#endif + return false; + } + size_ = r; + offset_ = 0; + return true; + } + + const char* name() const { + if (!size_) + return NULL; + + const struct dirent* dirent = + reinterpret_cast(&buf_[offset_]); + return dirent->d_name; + } + + int fd() const { + return fd_; + } + + static bool IsFallback() { + return false; + } + + private: + const int fd_; + char buf_[512]; +#ifdef OS_OPENBSD + off_t *basep_; +#endif + size_t offset_, size_; + + DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); +}; + +} // namespace base + +#endif // BASE_DIR_READER_BSD_H_ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h index 9a34492..62b280c 100644 --- mozilla/ipc/chromium/src/base/dir_reader_posix.h +++ mozilla/ipc/chromium/src/base/dir_reader_posix.h @@ -18,6 +18,8 @@ #if defined(OS_LINUX) #include "base/dir_reader_linux.h" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #endif @@ -26,6 +28,8 @@ #if defined(OS_LINUX) typedef DirReaderLinux DirReaderPosix; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #endif diff --git mozilla/ipc/chromium/src/base/file_util_linux.cc mozilla/ipc/chromium/src/base/file_util_linux.cc index 171e44f..0c6dfcc 100644 --- mozilla/ipc/chromium/src/base/file_util_linux.cc +++ mozilla/ipc/chromium/src/base/file_util_linux.cc @@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { -#ifdef ANDROID +#if defined(ANDROID) || defined(OS_BSD) return GetTempDir(path); #else *path = FilePath("/dev/shm"); $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/file_util_posix.cc @@ -31,7 +31,7 @@ #include "base/time.h" // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#ifndef HAVE_STAT64 #define stat64 stat #endif $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #ifdef MOZ_WIDGET_GTK2 #include "base/message_pump_glib.h" #endif @@ -119,7 +119,7 @@ if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread.h @@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE #elif defined(OS_POSIX) #include typedef pthread_t PlatformThreadHandle; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_OPENBSD) #include typedef pid_t PlatformThreadId; +#elif defined(OS_BSD) +typedef lwpid_t PlatformThreadId; #elif defined(OS_MACOSX) #include typedef mach_port_t PlatformThreadId; $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc @@ -9,9 +9,23 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_NETBSD) +#include #elif defined(OS_LINUX) #include #include +#elif defined(OS_DRAGONFLY) +#include +#elif defined(OS_FREEBSD) +#include +#if __FreeBSD_version > 802500 +#include +#else +_Pragma("GCC visibility push(default)") +extern "C" int thr_self(long *); +_Pragma("GCC visibility pop") +#endif +#include #endif #if defined(OS_MACOSX) @@ -38,9 +45,20 @@ // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); -#elif defined (__OpenBSD__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) + return lwp_gettid(); +#elif defined(OS_FREEBSD) +# if __FreeBSD_version > 900030 + return pthread_getthreadid_np(); +# else + long lwpid; + thr_self(&lwpid); + return lwpid; +# endif +#elif defined(OS_OPENBSD) - // TODO(BSD): find a better thread ID - return (intptr_t)(pthread_self()); + return (intptr_t) (pthread_self()); #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 +++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 @@ -280,6 +280,7 @@ class NamedProcessIterator { const ProcessEntry* NextProcessEntry(); private: +#if !defined(OS_BSD) // Determines whether there's another process (regardless of executable) // left in the list of all processes. Returns true and sets entry_ to // that process's info if there is one, false otherwise. @@ -292,18 +292,24 @@ void InitProcessEntry(ProcessEntry* entry); std::wstring executable_name_; +#endif #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; #elif defined(OS_LINUX) DIR *procfs_dir_; +#elif defined(OS_BSD) + std::vector content; + size_t nextEntry; #elif defined(OS_MACOSX) std::vector kinfo_procs_; size_t index_of_kinfo_proc_; #endif +#if !defined(OS_BSD) ProcessEntry entry_; const ProcessFilter* filter_; +#endif DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); }; $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_bsd.cc @@ -0,0 +1,318 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from process_util_linux.cc and process_util_mac.cc + +#include "base/process_util.h" + +#include +#include +#include +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + +#include +#include +#include +#include + +#include + +#include "base/debug_util.h" +#include "base/eintr_wrapper.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/string_tokenizer.h" +#include "base/string_util.h" + +#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ + || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) +#define HAVE_POSIX_SPAWN 1 +#endif + +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported +# else +# define __dso_public __attribute__((__visibility__("default"))) +# endif +#endif + +#ifdef HAVE_POSIX_SPAWN +#include +extern "C" char **environ __dso_public; +#endif + +namespace { + +enum ParsingState { + KEY_NAME, + KEY_VALUE +}; + +static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); + +} // namespace + +namespace base { + +#ifdef HAVE_POSIX_SPAWN + +void FreeEnvVarsArray(char* array[], int length) +{ + for (int i = 0; i < length; i++) { + free(array[i]); + } + delete[] array; +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; + for (size_t i = 0; i < argv.size(); i++) { + argv_copy[i] = const_cast(argv[i].c_str()); + } + argv_copy[argv.size()] = NULL; + + // Make sure we don't leak any FDs to the child process by marking all FDs + // as close-on-exec. + SetAllFDsToCloseOnExec(); + + // Copy environment to a new char array and add the variables + // in env_vars_to_set. + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); + std::string varValue = varString.substr(varString.find_first_of('=') + 1); + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } + pos++; + } + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; + int i = 0; + for (environment_map::const_iterator it = combined_env_vars.begin(); + it != combined_env_vars.end(); ++it) { + std::string entry(it->first); + entry += "="; + entry += it->second; + vars[i] = strdup(entry.c_str()); + i++; + } + vars[i] = NULL; + + posix_spawn_file_actions_t file_actions; + if (posix_spawn_file_actions_init(&file_actions) != 0) { + FreeEnvVarsArray(vars, varsLen); + return false; + } + + // Turn fds_to_remap array into a set of dup2 calls. + for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); + it != fds_to_remap.end(); + ++it) { + int src_fd = it->first; + int dest_fd = it->second; + + if (src_fd == dest_fd) { + int flags = fcntl(src_fd, F_GETFD); + if (flags != -1) { + fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); + } + } else { + if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { + posix_spawn_file_actions_destroy(&file_actions); + FreeEnvVarsArray(vars, varsLen); + return false; + } + } + } + + pid_t pid = 0; + int spawn_succeeded = (posix_spawnp(&pid, + argv_copy[0], + &file_actions, + NULL, + argv_copy, + vars) == 0); + + FreeEnvVarsArray(vars, varsLen); + + posix_spawn_file_actions_destroy(&file_actions); + + bool process_handle_valid = pid > 0; + if (!spawn_succeeded || !process_handle_valid) { + retval = false; + } else { + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return retval; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, ProcessHandle* process_handle) { + // TODO(playmobil): Do we need to respect the start_hidden flag? + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#else // no posix_spawn, use fork/exec + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + scoped_array argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; + fd_shuffle1.reserve(fds_to_remap.size()); + fd_shuffle2.reserve(fds_to_remap.size()); + + pid_t pid = fork(); + if (pid < 0) + return false; + + if (pid == 0) { + for (file_handle_mapping_vector::const_iterator + it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { + fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); + fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); + } + + if (!ShuffleFileDescriptors(&fd_shuffle1)) + _exit(127); + + CloseSuperfluousFds(fd_shuffle2); + + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } + + for (size_t i = 0; i < argv.size(); i++) + argv_cstr[i] = const_cast(argv[i].c_str()); + argv_cstr[argv.size()] = NULL; + execvp(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; + exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return true; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, + ProcessHandle* process_handle) { + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#endif + +NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, + const ProcessFilter* filter) +{ + int numEntries; + kvm_t *kvm; + std::string exe(WideToASCII(executable_name)); + +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) + kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { +# if defined(OS_DRAGONFLY) + if (exe != procs[i].kp_comm) continue; + if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].kp_pid; + e.ppid = procs[i].kp_ppid; + strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); + content.push_back(e); +# elif defined(OS_FREEBSD) + if (exe != procs[i].ki_comm) continue; + if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].ki_pid; + e.ppid = procs[i].ki_ppid; + strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); + content.push_back(e); +# endif +#else + kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); +#if defined(OS_OPENBSD) + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries); +#else + struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); +#endif + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { + if (exe != procs[i].p_comm) continue; + if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].p_pid; + e.ppid = procs[i].p_ppid; + strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); + content.push_back(e); +#endif + } + } + nextEntry = 0; + kvm_close(kvm); +} + +NamedProcessIterator::~NamedProcessIterator() { +} + +const ProcessEntry* NamedProcessIterator::NextProcessEntry() { + if (nextEntry >= content.size()) return NULL; + return &content[nextEntry++]; +} + +bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; +} + +} // namespace base $NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_posix.cc @@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj #elif defined(OS_MACOSX) static const rlim_t kSystemDefaultMaxFds = 256; static const char kFDDir[] = "/dev/fd"; +#elif defined(OS_BSD) + // the getrlimit below should never fail, so whatever .. + static const rlim_t kSystemDefaultMaxFds = 1024; + // at least /dev/fd will exist + static const char kFDDir[] = "/dev/fd"; #endif // Get the maximum number of FDs possible. @@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj void SetAllFDsToCloseOnExec() { #if defined(OS_LINUX) const char fd_dir[] = "/proc/self/fd"; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) const char fd_dir[] = "/dev/fd"; #endif ScopedDIR dir_closer(opendir(fd_dir)); $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ --- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ mozilla/ipc/chromium/src/base/sys_info_posix.cc @@ -18,6 +18,11 @@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@ -26,7 +31,11 @@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h @@ -34,7 +34,7 @@ #include "base/third_party/nspr/prcpucfg_win.h" #elif defined(__APPLE__) #include "base/third_party/nspr/prcpucfg_mac.h" -#elif defined(__linux__) || defined(ANDROID) +#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include "base/third_party/nspr/prcpucfg_linux.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc @@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp LL_ADD(retVal, retVal, temp); return retVal; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) struct tm exp_tm = {0}; exp_tm.tm_sec = exploded->tm_sec; exp_tm.tm_min = exploded->tm_min; @@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp result *= kSecondsToMicroseconds; result += exploded->tm_usec; return result; +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; + exp_tm.tm_hour = exploded->tm_hour; + exp_tm.tm_mday = exploded->tm_mday; + exp_tm.tm_mon = exploded->tm_month; + exp_tm.tm_year = exploded->tm_year - 1900; + + // time_t is 64bit + time_t absolute_time = timegm(&exp_tm); + + PRTime result = static_cast(absolute_time); + result -= exploded->tm_params.tp_gmt_offset + + exploded->tm_params.tp_dst_offset; + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; #else #error No PR_ImplodeTime implemented on your platform. #endif diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc index abf2a56..48791f6 100644 --- mozilla/ipc/chromium/src/base/time_posix.cc +++ mozilla/ipc/chromium/src/base/time_posix.cc @@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { // With numer and denom = 1 (the expected case), the 64-bit absolute time // reported in nanoseconds is enough to last nearly 585 years. -#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ +#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 struct timespec ts; $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/build/build_config.h @@ -19,6 +19,12 @@ #define OS_MACOSX 1 #elif defined(__linux__) || defined(ANDROID) #define OS_LINUX 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#elif defined(__NetBSD__) +#define OS_NETBSD 1 #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #elif defined(_WIN32) @@ -27,9 +33,16 @@ #error Please add support for your platform in build/build_config.h #endif +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ + || defined(OS_NETBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + // For access to standard POSIX features, use OS_POSIX instead of a more // specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #define OS_POSIX 1 #endif diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc index bd866ee..2ea5b19 100644 --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess }; // This is a control message buffer large enough to hold kMaxReadFDs -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_NETBSD) // TODO(agl): OSX appears to have non-constant CMSG macros! char input_cmsg_buf_[1024]; #else $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h @@ -195,7 +195,7 @@ }; #endif -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) +#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { @@ -248,7 +248,7 @@ }; #endif // defined(OS_MACOSX) -#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) +#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| template <> struct ParamTraits { $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) #include "base/shared_memory.h" #endif @@ -66,7 +66,7 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; @@ -108,7 +108,7 @@ class TransportDIB { private: TransportDIB(); -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) explicit TransportDIB(base::SharedMemoryHandle dib); base::SharedMemory shared_memory_; uint32 sequence_num_; $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/glue/GeckoChildProcessHost.cpp @@ -430,7 +430,7 @@ // and passing wstrings from one config to the other is unsafe. So // we split the logic here. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) base::environment_map newEnvVars; // XPCOM may not be initialized in some subprocesses. We don't want // to initialize XPCOM just for the directory service, especially @@ -445,8 +445,8 @@ if (NS_SUCCEEDED(rv)) { nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX -# ifdef ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) +# if defined(ANDROID) || defined(OS_BSD) path += "/lib"; # endif // ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); #if defined(MOZ_CRASHREPORTER) -# if defined(OS_LINUX) +# if defined(OS_LINUX) || defined(OS_BSD) int childCrashFd, childCrashRemapFd; if (!CrashReporter::CreateNotificationPipeForChild( &childCrashFd, &childCrashRemapFd)) @@ -594,7 +594,7 @@ #endif base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) newEnvVars, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h index f37998d..b05dc7b 100644 --- mozilla/ipc/glue/SharedMemorySysV.h +++ mozilla/ipc/glue/SharedMemorySysV.h @@ -8,7 +8,7 @@ #ifndef mozilla_ipc_SharedMemorySysV_h #define mozilla_ipc_SharedMemorySysV_h -#if defined(OS_LINUX) && !defined(ANDROID) +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) // SysV shared memory isn't available on Windows, but we define the // following macro so that #ifdefs are clearer (compared to #ifdef $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ --- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 +++ mozilla/toolkit/library/Makefile.in @@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle endif endif +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +# keep `environ' unresolved, see bug 14426 for binutils +EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) ifdef ACCESSIBILITY Index: head/mail/thunderbird-esr/files/patch-bug788039 =================================================================== --- head/mail/thunderbird-esr/files/patch-bug788039 (nonexistent) +++ head/mail/thunderbird-esr/files/patch-bug788039 (revision 303831) @@ -0,0 +1,59 @@ +# Bug 788039 - With no prefix search libevent via pkg-config. + +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA + + MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@ + MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@ +-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@ ++MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@ + + MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ + MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -3854,7 +3854,7 @@ fi + dnl system libevent Support + dnl ======================================================== + MOZ_ARG_WITH_STRING(system-libevent, +-[ --with-system-libevent=[PFX] ++[ --with-system-libevent[=PFX] + Use system libevent [installed at prefix PFX]], + LIBEVENT_DIR=$withval) + +@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= ++elif test "$LIBEVENT_DIR" = yes; then ++ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ MOZ_NATIVE_LIBEVENT=1, ++ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found])) + else +- if test "${LIBEVENT_DIR}" = "yes"; then +- LIBEVENT_DIR=/usr +- fi + CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + MOZ_CHECK_HEADER(event.h, +@@ -3876,16 +3877,16 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], +- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) ++ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + + AC_SUBST(MOZ_NATIVE_LIBEVENT) +-AC_SUBST(MOZ_LIBEVENT_INCLUDES) ++AC_SUBST(MOZ_LIBEVENT_CFLAGS) + AC_SUBST(MOZ_LIBEVENT_LIBS) + + dnl ======================================================== Property changes on: head/mail/thunderbird-esr/files/patch-bug788039 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-clang32-libc++-visibility-hack =================================================================== --- head/mail/thunderbird-esr/files/patch-clang32-libc++-visibility-hack (nonexistent) +++ head/mail/thunderbird-esr/files/patch-clang32-libc++-visibility-hack (revision 303831) @@ -0,0 +1,57 @@ +--- configure.in~ ++++ configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/js/src/configure.in~ ++++ mozilla/js/src/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then Property changes on: head/mail/thunderbird-esr/files/patch-clang32-libc++-visibility-hack ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in =================================================================== --- head/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303830) +++ head/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303831) @@ -1,28 +1,28 @@ --- mozilla/ipc/chromium/Makefile.in~ +++ mozilla/ipc/chromium/Makefile.in @@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) +# workaround IPC hang with libevent2 +ifndef MOZ_DEBUG +ifneq (,$(filter 4.2.%, $(CXX_VERSION))) +MOZ_OPTIMIZE_FLAGS = -O1 +OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) +endif +endif + LIBRARY_NAME = chromium_s FORCE_STATIC_LIB = 1 LIBXUL_LIBRARY = 1 @@ -55,9 +60,7 @@ vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) -+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS)) endif # } vpath %.cc \ Index: head/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in =================================================================== --- head/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in (revision 303830) +++ head/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in (revision 303831) @@ -1,26 +1,10 @@ --- mozilla/js/src/configure.in.orig 2012-01-29 15:44:24.000000000 +0100 +++ mozilla/js/src/configure.in 2012-01-30 23:37:46.541060008 +0100 -@@ -2732,6 +2742,7 @@ - AC_DEFINE(JS_NUNBOX32) - ;; - sparc*-*) -+ if test ! "$HAVE_64BIT_OS" ; then - NANOJIT_ARCH=Sparc - ENABLE_METHODJIT=1 - ENABLE_MONOIC=1 -@@ -2739,6 +2750,7 @@ - ENABLE_METHODJIT_TYPED_ARRAY=1 - AC_DEFINE(JS_CPU_SPARC) - AC_DEFINE(JS_NUNBOX32) -+ fi - ;; - esac - @@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n * C++ implementations should define these macros only when __STDC_LIMIT_MACROS * is defined before is included. */ #define __STDC_LIMIT_MACROS +#define __STDC_CONSTANT_MACROS #endif /* _JS_CONFDEFS_H_ */ Index: head/security/nss/Makefile =================================================================== --- head/security/nss/Makefile (revision 303830) +++ head/security/nss/Makefile (revision 303831) @@ -1,103 +1,108 @@ # Ports collection Makefile for: nss # Date created: 18 December 2001 # Whom: Maxim Sobolev # # $FreeBSD$ # $MCom ports-experimental/security/nss/Makefile,v 1.4 2008/02/23 15:47:28 ahze Exp $ PORTNAME= nss PORTVERSION= ${_MAJOR}.${_MINOR}.${_PATCH} CATEGORIES= security MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= security/nss/releases/NSS_${PORTVERSION:S/./_/g}_RTM/src DISTNAME= nss-${PORTVERSION} MAINTAINER= gecko@FreeBSD.org COMMENT= Libraries to support development of security-enabled applications BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \ nspr>=4.8.8:${PORTSDIR}/devel/nspr LIB_DEPENDS= nspr4.1:${PORTSDIR}/devel/nspr \ sqlite3.8:${PORTSDIR}/databases/sqlite3 _MAJOR= 3 _MINOR= 13 _PATCH= 6 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/mozilla/security/nss MAKE_JOBS_UNSAFE= yes USE_LDCONFIG= ${PREFIX}/lib/nss USE_GMAKE= yes USE_PERL5_BUILD=yes MAKE_ENV= BSD_LDOPTS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" \ - BUILD_OPT=1 NSS_ENABLE_ECC=1 NSS_USE_SYSTEM_SQLITE=1 + NSS_ENABLE_ECC=1 NSS_USE_SYSTEM_SQLITE=1 ALL_TARGET= nss_build_all CFLAGS+= -I${LOCALBASE}/include/nspr -L${LOCALBASE}/lib DIST= ${WRKSRC:H:H}/dist EXTERNALS= CVS dbm security/nss/lib/zlib nsprpub security/dbm EXTRACT_AFTER_ARGS=| ${TAR} -xf - \ ${EXTERNALS:C,^,--exclude ${PORTNAME}-${PORTVERSION}/mozilla/,} -BINS=${DIST}/${OPSYS}${OSREL}_OPT.OBJ - INSTALL_BINS= certcgi certutil checkcert cmsutil crlutil derdump makepqg \ mangle modutil ocspclnt oidcalc p7content p7env p7sign \ p7verify pk12util rsaperf shlibsign signtool signver \ ssltap strsclnt symkeyutil vfychain vfyserv +.if !defined(WITH_DEBUG) +MAKE_ENV+= BUILD_OPT=1 +BINS= ${DIST}/${OPSYS}${OSREL}_OPT.OBJ +.else +BINS= ${DIST}/${OPSYS}${OSREL}_DBG.OBJ +.endif + check regression-test test: cd ${WRKSRC}/tests; \ ${SETENV} PATH="${BINS}/bin:${PATH}" \ LD_LIBRARY_PATH="${BINS}/lib" \ ${MAKE_ENV} \ ./all.sh @if ${GREP} -F '>Failed<' \ ${WRKSRC:H:H}/tests_results/security/*/results.html; then \ echo "Some tests have failed. Let ${MAINTAINER} know."; \ exit 1; \ else \ echo "All tests succeeded. Good news."; \ fi post-patch: @${REINPLACE_CMD} -e "s|-pthread|${PTHREAD_LIBS}|g" \ ${WRKSRC:H:H}/security/coreconf/FreeBSD.mk @${SED} -e 's|@exec_prefix@|${PREFIX}|; \ s|@includedir@|${PREFIX}/include/nss|; \ s|@libdir@|${PREFIX}/lib/nss|; \ s|@prefix@|${PREFIX}|' \ ${FILESDIR}/nss-config.in >${WRKDIR}/nss-config @${SED} -e 's|@PREFIX@|${PREFIX}|; s|@PORTVERSION@|${PORTVERSION}|' \ ${FILESDIR}/nss.pc.in >${WRKDIR}/nss.pc .for i in MAJOR MINOR PATCH @${SED} -i.${i} -e 's|@${i}@|${_${i}}|' ${WRKDIR}/nss-config .endfor @cd ${WRKSRC} && \ ${FIND} . -name "*.c" -o -name "*.h" | \ ${XARGS} ${REINPLACE_CMD} -e 's|"nspr.h"||' @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/lib/softoken/manifest.mn ${FIND} ${WRKSRC}/tests -name '*.sh' | ${XARGS} ${GREP} -l -F '/bin/bash' | \ ${XARGS} ${REINPLACE_CMD} -e 's|#! */bin/bash|#!${SH}|' do-install: ${MKDIR} ${PREFIX}/include/nss/nss ${PREFIX}/lib/nss ${FIND} ${DIST}/public/nss -type l \ -exec ${INSTALL_DATA} {} ${PREFIX}/include/nss/nss \; - ${INSTALL_DATA} ${DIST}/FreeBSD${OSREL:C/.$/*/}_OPT.OBJ/lib/*.so.1 \ + ${INSTALL_DATA} ${BINS}/lib/*.so.1 \ ${PREFIX}/lib/nss - ${INSTALL_DATA} ${DIST}/FreeBSD${OSREL:C/.$/*/}_OPT.OBJ/lib/libcrmf.a \ + ${INSTALL_DATA} ${BINS}/lib/libcrmf.a \ ${PREFIX}/lib/nss .for bin in ${INSTALL_BINS} - ${INSTALL_PROGRAM} ${DIST}/FreeBSD${OSREL:C/.$/*/}_OPT.OBJ/bin/${bin} \ + ${INSTALL_PROGRAM} ${BINS}/bin/${bin} \ ${PREFIX}/bin .endfor - cd ${DIST}/FreeBSD${OSREL:C/.$/*/}_OPT.OBJ/lib && \ + cd ${BINS}/lib && \ ${TAR} -cf - *.so | ${TAR} --unlink -C ${PREFIX}/lib/nss -xf - ${INSTALL_SCRIPT} ${WRKDIR}/nss-config ${PREFIX}/bin ${INSTALL_DATA} ${WRKDIR}/nss.pc ${PREFIX}/libdata/pkgconfig .include Index: head/security/nss/files/patch-..::coreconf::FreeBSD.mk =================================================================== --- head/security/nss/files/patch-..::coreconf::FreeBSD.mk (revision 303830) +++ head/security/nss/files/patch-..::coreconf::FreeBSD.mk (revision 303831) @@ -1,61 +1,62 @@ --- ../../security/coreconf/FreeBSD.mk.orig 2009-08-22 07:33:09.000000000 +0200 +++ ../../security/coreconf/FreeBSD.mk 2010-03-28 23:01:33.000000000 +0200 @@ -37,9 +37,9 @@ include $(CORE_DEPTH)/coreconf/UNIX.mk -DEFAULT_COMPILER = gcc -CC = gcc -CCC = g++ +DEFAULT_COMPILER = $(CC) +CC ?= gcc +CCC = $(CXX) RANLIB = ranlib CPU_ARCH = $(OS_TEST) -@@ -52,6 +52,12 @@ endif +@@ -52,6 +52,13 @@ endif ifeq ($(CPU_ARCH),amd64) CPU_ARCH = x86_64 endif +ifneq (,$(filter powerpc%, $(CPU_ARCH))) +CPU_ARCH = ppc +endif -+ifneq (,$(filter %64, $(CPU_ARCH))) ++ ++ifneq (,$(filter %64, $(OS_TEST))) +USE_64 = 1 +endif OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK @@ -65,20 +80,18 @@ USE_PTHREADS = 1 DEFINES += -D_THREAD_SAFE -D_REENTRANT OS_LIBS += -pthread -DSO_LDOPTS += -pthread +DSO_LDOPTS += $(BSD_LDOPTS) endif ARCH = freebsd -MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf) +DLL_SUFFIX = so.1 -ifeq ($(MOZ_OBJFORMAT),elf) -DLL_SUFFIX = so +ifneq (,$(filter alpha ia64,$(OS_TEST))) +MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) else -DLL_SUFFIX = so.1.0 +MKSHLIB = $(CC) -Wl,-Bsymbolic $(DSO_LDOPTS) endif - -MKSHLIB = $(CC) $(DSO_LDOPTS) ifdef MAPFILE MKSHLIB += -Wl,--version-script,$(MAPFILE) endif @@ -87,4 +100,5 @@ G++INCLUDES = -I/usr/include/g++ -INCLUDES += -I/usr/X11R6/include +USE_SYSTEM_ZLIB = 1 +ZLIB_LIBS = -lz Index: head/www/firefox/Makefile =================================================================== --- head/www/firefox/Makefile (revision 303830) +++ head/www/firefox/Makefile (revision 303831) @@ -1,126 +1,125 @@ # New ports collection makefile for: phoenix # Date created: 2002/10/21 # Whom: Alan Eldridge # # $FreeBSD$ # PORTNAME= firefox -DISTVERSION= 15.0 +DISTVERSION= 15.0.1 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source DISTNAME= ${PORTNAME}-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \ nss>=3.13.2:${PORTSDIR}/security/nss \ sqlite3>=3.7.12.1:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \ cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \ unzip:${PORTSDIR}/archivers/unzip USE_AUTOTOOLS= autoconf213:env USE_PYTHON_BUILD=yes USE_GECKO= gecko CONFLICTS= firefox-10.* MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= # empty MOZILLA_NAME= Firefox MAKE_JOBS_SAFE= yes WANT_GNOME= yes USE_QT4= # empty QT_NONSTANDARD= yes ALL_TARGET= default GNU_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes USE_GL= gl NO_MOZPKGINSTALL=yes FIREFOX_ICON= ${MOZILLA}.png FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \ --enable-application=browser \ --enable-official-branding OPTIONS_DEFINE= GSTREAMER PGO .include "${.CURDIR}/../../www/firefox/Makefile.options" .include WRKSRC:= ${WRKDIR}/mozilla-release .if ${ARCH} == amd64 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} .elif ${ARCH} == powerpc64 .if ${OSVERSION} < 900033 BROKEN= Needs binutils 2.17.50 to build .else MOZ_EXPORT+= UNAME_m="powerpc64" CFLAGS+= -mminimal-toc .endif .endif .if ${PORT_OPTIONS:MPGO} BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 -USE_PYTHON_BUILD= yes USE_DISPLAY= yes .include "${PORTSDIR}/Mk/bsd.python.mk" .undef GNU_CONFIGURE MOZ_OPTIONS+= ${CONFIGURE_TARGET} MAKEFILE= ${WRKSRC}/client.mk ALL_TARGET= profiledbuild MOZ_MK_OPTIONS+=PROFILE_GEN_SCRIPT="${PYTHON_CMD} \ @MOZ_OBJDIR@/_profile/pgo/profileserver.py" .endif .if ${ARCH} == amd64 || ${ARCH} == i386 BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif pre-extract: .if ${PORT_OPTIONS:MPGO} @${ECHO} "*****************************************************************" @${ECHO} "**************************** attention **************************" @${ECHO} "*****************************************************************" @${ECHO} "To build Firefox with PGO support you need a running X server and" @${ECHO} " build this port with an user who could access the X server! " @${ECHO} "" @${ECHO} "During the build a Firefox instance will start and run some test." @${ECHO} " Do not interrupt or close Firefox during this tests! " @${ECHO} "*****************************************************************" @sleep 10 .endif post-extract: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \ <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) (cd ${WRKSRC}/js/src/ && ${AUTOCONF}) port-pre-install: ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} ${ECHO_CMD} "@dirrmtry share/applications" >> ${PLISTD} ${ECHO_CMD} 'share/pixmaps/${FIREFOX_ICON}' >> ${PLISTF} post-install: ${MKDIR} ${PREFIX}/share/applications ${PREFIX}/share/pixmaps ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${PREFIX}/share/applications/ ${MKDIR} ${PREFIX}/lib/${MOZILLA}/chrome/icons/default ${LN} -sf ${FIREFOX_ICON_SRC} ${PREFIX}/share/pixmaps/${FIREFOX_ICON} @${CAT} ${PKGMESSAGE} .include Index: head/www/firefox/distinfo =================================================================== --- head/www/firefox/distinfo (revision 303830) +++ head/www/firefox/distinfo (revision 303831) @@ -1,2 +1,2 @@ -SHA256 (firefox-15.0.source.tar.bz2) = 5416f0d6ab139846343deb86f604352d06a487ed142920613a2d2d3dd96bc789 -SIZE (firefox-15.0.source.tar.bz2) = 83713360 +SHA256 (firefox-15.0.1.source.tar.bz2) = d5b245e3f16933edf49bc9754d38013f0f82c855f164f429b92697e14ae0c3bf +SIZE (firefox-15.0.1.source.tar.bz2) = 83710112 Index: head/www/firefox/files/patch-configure.in =================================================================== --- head/www/firefox/files/patch-configure.in (revision 303830) +++ head/www/firefox/files/patch-configure.in (nonexistent) @@ -1,25 +0,0 @@ ---- configure.in.orig 2012-05-23 20:56:34.000000000 +0200 -+++ configure.in 2012-05-27 18:18:25.000000000 +0200 -@@ -4230,6 +4233,9 @@ - if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then - MOZ_NATIVE_LIBEVENT= - else -+PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, -+ [MOZ_NATIVE_LIBEVENT=1 -+ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ - if test "${LIBEVENT_DIR}" = "yes"; then - LIBEVENT_DIR=/usr - fi -@@ -4242,10 +4248,11 @@ else - AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) - AC_CHECK_LIB(event, event_init, - [MOZ_NATIVE_LIBEVENT=1 -- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" -+ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" - MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], - [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) - fi -+]) - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS Property changes on: head/www/firefox/files/patch-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp =================================================================== --- head/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp (revision 303830) +++ head/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- ./xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 -+++ ./xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 -@@ -57,6 +57,11 @@ - nsresult - nsThreadManager::Init() - { -+#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ -+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) -+ if (!gTLSThreadID) -+ gTLSThreadID = mozilla::threads::Generic; -+#endif - mThreadsByPRThread.Init(); - - if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/www/firefox/files/patch-xpcom__threads__nsThreadManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox/files/patch-js_src_jsnum.cpp =================================================================== --- head/www/firefox/files/patch-js_src_jsnum.cpp (revision 303830) +++ head/www/firefox/files/patch-js_src_jsnum.cpp (nonexistent) @@ -1,31 +0,0 @@ ---- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 -+++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 -@@ -49,6 +49,9 @@ - // Avoid warnings about ASSERT being defined by the assembler as well. - #undef ASSERT - -+#if defined(__FreeBSD__) -+#include -+#endif - #ifdef XP_OS2 - #define _PC_53 PC_53 - #define _MCW_EM MCW_EM -@@ -691,8 +694,18 @@ - - #else - -+#if defined(__FreeBSD__) -+#if __BSD_VISIBLE == 0 -+#error __BSD_VISIBLE is zero, so fedisableexcept is not defined -+#endif -+#include -+#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) -+#else -+ - #define FIX_FPU() ((void)0) - -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ -+ - #endif - - JSBool Property changes on: head/www/firefox/files/patch-js_src_jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc =================================================================== --- head/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc (revision 303830) +++ head/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc (nonexistent) @@ -1,10 +0,0 @@ ---- gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 -+++ gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 -@@ -540,4 +540,8 @@ - GPOS::position_finish (buffer); - } - -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf::search(unsigned int const &) const; Property changes on: head/www/firefox/files/patch-gfx-harfbuzz-src-hb-ot-layout.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug351181 =================================================================== --- head/www/firefox/files/patch-bug351181 (nonexistent) +++ head/www/firefox/files/patch-bug351181 (revision 303831) @@ -0,0 +1,31 @@ +--- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -49,6 +49,9 @@ + // Avoid warnings about ASSERT being defined by the assembler as well. + #undef ASSERT + ++#if defined(__FreeBSD__) ++#include ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool Property changes on: head/www/firefox/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug543241 =================================================================== --- head/www/firefox/files/patch-bug543241 (nonexistent) +++ head/www/firefox/files/patch-bug543241 (revision 303831) @@ -0,0 +1,14 @@ +--- ./xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 ++++ ./xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 +@@ -57,6 +57,11 @@ + nsresult + nsThreadManager::Init() + { ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ ++ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) ++ if (!gTLSThreadID) ++ gTLSThreadID = mozilla::threads::Generic; ++#endif + mThreadsByPRThread.Init(); + + if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/www/firefox/files/patch-bug543241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug732340 =================================================================== --- head/www/firefox/files/patch-bug732340 (nonexistent) +++ head/www/firefox/files/patch-bug732340 (revision 303831) @@ -0,0 +1,13 @@ +--- gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 ++++ gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 +@@ -537,4 +537,10 @@ hb_ot_layout_position_finish (hb_face_t + GPOS::position_finish (buffer); + } + ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3 ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf::search(unsigned int const &) const; ++#endif + Property changes on: head/www/firefox/files/patch-bug732340 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug753046 =================================================================== --- head/www/firefox/files/patch-bug753046 (revision 303830) +++ head/www/firefox/files/patch-bug753046 (revision 303831) @@ -1,1225 +1,1229 @@ # Bug 753046 - Add support for DragonFly/NetBSD $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 +++ dom/plugins/ipc/PluginModuleChild.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_WIDGET_QT +#include // for _exit() #include #include "nsQAppInstance.h" #include "NestedLoopTimer.h" @@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin // TODO: use PluginPRLibrary here -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) mShutdownFunc = (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); @@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_MACOSX) *_retval = mGetEntryPointsFunc(&mFunctions); @@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); return true; #elif defined(OS_WIN) || defined(OS_MACOSX) $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 +++ dom/plugins/ipc/PluginModuleChild.h @@ -340,7 +340,7 @@ private: // we get this from the plugin NP_PLUGINSHUTDOWN mShutdownFunc; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_BSD) NP_PLUGINUNIXINIT mInitializeFunc; #elif defined(OS_WIN) || defined(OS_MACOSX) NP_PLUGININIT mInitializeFunc; $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ ipc/chromium/Makefile.in @@ -278,6 +278,34 @@ endif endif # } OS_LINUX +ifdef OS_BSD # { + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ + file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) + +ifdef MOZ_ENABLE_GTK2 +CPPSRCS += \ + message_pump_glib.cc \ + $(NULL) +endif + +ifdef MOZ_ENABLE_QT +MOCSRCS = \ + moc_message_pump_qt.cc \ + $(NULL) + +CPPSRCS += \ + $(MOCSRCS) \ + message_pump_qt.cc \ + $(NULL) +endif + +endif # } OS_BSD + # libevent ifndef MOZ_NATIVE_LIBEVENT # { $NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 +++ ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 @@ -56,17 +56,6 @@ -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ $(NULL) -ifeq ($(OS_ARCH),Darwin) # { - -OS_MACOSX = 1 -OS_POSIX = 1 - -DEFINES += \ - -DOS_MACOSX=1 \ - -DOS_POSIX=1 \ - $(NULL) - -else # } { ifeq ($(OS_ARCH),WINNT) # { OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) @@ -93,13 +82,65 @@ endif else # } { - -OS_LINUX = 1 OS_POSIX = 1 +DEFINES += -DOS_POSIX=1 + +ifeq ($(OS_ARCH),Darwin) # { + +OS_MACOSX = 1 +DEFINES += \ + -DOS_MACOSX=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),DragonFly) # { + +OS_DRAGONFLY = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_DRAGONFLY=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),FreeBSD) # { + +OS_FREEBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_FREEBSD=1 \ + -DOS_BSD=1 \ + $(NULL) +else # } { +ifeq ($(OS_ARCH),NetBSD) # { + +OS_NETBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_NETBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),OpenBSD) # { + +OS_OPENBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_OPENBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { + +OS_LINUX = 1 DEFINES += \ -DOS_LINUX=1 \ - -DOS_POSIX=1 \ $(NULL) # NB: to stop gcc warnings about exporting template instantiation @@ -107,4 +147,8 @@ endif # } endif # } +endif # } +endif # } +endif # } +endif # } $NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/base_paths.h @@ -13,7 +13,7 @@ #include "base/base_paths_win.h" #elif defined(OS_MACOSX) #include "base/base_paths_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "base/base_paths_linux.h" #endif #include "base/path_service.h" $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/debug_util_posix.cc @@ -5,7 +5,7 @@ #include "build/build_config.h" #include "base/debug_util.h" -#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) +#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) #include #include @@ -17,9 +17,16 @@ #include #if MOZ_HAVE_EXECINFO_H #include +#endif + +#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + #include "base/basictypes.h" #include "base/eintr_wrapper.h" #include "base/logging.h" @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u return false; } -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Based on Apple's recommended method as described in // http://developer.apple.com/qa/qa2004/qa1361.html @@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() { // This process is being debugged if the P_TRACED flag is set. is_set = true; +#if defined(OS_DRAGONFLY) + being_debugged = (info.kp_flags & P_TRACED) != 0; +#elif defined(OS_FREEBSD) + being_debugged = (info.ki_flag & P_TRACED) != 0; +#elif defined(OS_OPENBSD) + being_debugged = (info.p_flag & P_TRACED) != 0; +#else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif return being_debugged; } diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h new file mode 100644 index 0000000..3fc1a87 --- /dev/null +++ ipc/chromium/src/base/dir_reader_bsd.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,112 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from dir_reader_linux.h + +#ifndef BASE_DIR_READER_BSD_H_ +#define BASE_DIR_READER_BSD_H_ +#pragma once + +#include +#include +#include +#include +#include + +#include "base/logging.h" +#include "base/eintr_wrapper.h" + +// See the comments in dir_reader_posix.h about this. + +namespace base { + +class DirReaderBSD { + public: + explicit DirReaderBSD(const char* directory_path) +#ifdef O_DIRECTORY + : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), +#else + : fd_(open(directory_path, O_RDONLY)), +#endif + offset_(0), + size_(0) { + memset(buf_, 0, sizeof(buf_)); + } + + ~DirReaderBSD() { + if (fd_ >= 0) { + if (HANDLE_EINTR(close(fd_))) + DLOG(ERROR) << "Failed to close directory handle"; + } + } + + bool IsValid() const { + return fd_ >= 0; + } + + // Move to the next entry returning false if the iteration is complete. + bool Next() { + if (size_) { + struct dirent* dirent = reinterpret_cast(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else + offset_ += dirent->d_reclen; ++#endif + } + + if (offset_ != size_) + return true; + +#ifdef OS_OPENBSD + const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); +#else + const int r = getdents(fd_, buf_, sizeof(buf_)); +#endif + if (r == 0) + return false; + if (r == -1) { +#ifdef OS_OPENBSD + DLOG(ERROR) << "getdirentries returned an error: " << errno; +#else + DLOG(ERROR) << "getdents returned an error: " << errno; +#endif + return false; + } + size_ = r; + offset_ = 0; + return true; + } + + const char* name() const { + if (!size_) + return NULL; + + const struct dirent* dirent = + reinterpret_cast(&buf_[offset_]); + return dirent->d_name; + } + + int fd() const { + return fd_; + } + + static bool IsFallback() { + return false; + } + + private: + const int fd_; + char buf_[512]; +#ifdef OS_OPENBSD + off_t *basep_; +#endif + size_t offset_, size_; + + DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); +}; + +} // namespace base + +#endif // BASE_DIR_READER_BSD_H_ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h index 9a34492..62b280c 100644 --- ipc/chromium/src/base/dir_reader_posix.h +++ ipc/chromium/src/base/dir_reader_posix.h @@ -18,16 +18,20 @@ // seems worse than falling back to enumerating all file descriptors so we will // probably never implement this on the Mac. -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) #include "base/dir_reader_linux.h" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #endif namespace base { -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) typedef DirReaderLinux DirReaderPosix; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #endif diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc index 171e44f..0c6dfcc 100644 --- ipc/chromium/src/base/file_util_linux.cc +++ ipc/chromium/src/base/file_util_linux.cc @@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { -#ifdef ANDROID +#if defined(ANDROID) || defined(OS_BSD) return GetTempDir(path); #else *path = FilePath("/dev/shm"); $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/file_util_posix.cc @@ -31,7 +31,7 @@ #include "base/time.h" // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#ifndef HAVE_STAT64 #define stat64 stat #endif $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 +++ ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #ifdef MOZ_WIDGET_GTK2 #include "base/message_pump_glib.h" #endif @@ -119,7 +119,7 @@ if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/platform_thread.h @@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE #elif defined(OS_POSIX) #include typedef pthread_t PlatformThreadHandle; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_OPENBSD) #include typedef pid_t PlatformThreadId; +#elif defined(OS_BSD) +typedef lwpid_t PlatformThreadId; #elif defined(OS_MACOSX) #include typedef mach_port_t PlatformThreadId; $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc @@ -9,16 +9,30 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_NETBSD) +#include #elif defined(OS_LINUX) #include -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include -#elif !defined(__NetBSD__) -#include +#elif defined(OS_FREEBSD) +#include +#if __FreeBSD_version > 802500 +#include +#else +_Pragma("GCC visibility push(default)") +extern "C" int thr_self(long *); +_Pragma("GCC visibility pop") +#endif #endif + +#if !defined(OS_MACOSX) #include #endif +#if defined(OS_BSD) && !defined(OS_NETBSD) +#include +#endif + #if defined(OS_MACOSX) namespace base { void InitThreading(); @@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() { // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) + return lwp_gettid(); +#elif defined(OS_FREEBSD) +# if __FreeBSD_version > 900030 + return pthread_getthreadid_np(); +# else + long lwpid; + thr_self(&lwpid); + return lwpid; +# endif +#elif defined(OS_OPENBSD) - // TODO(BSD): find a better thread ID - return (intptr_t)(pthread_self()); + return (intptr_t) (pthread_self()); #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif @@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) { // Note that glibc also has a 'pthread_setname_np' api, but it may not be // available everywhere and it's only benefit over using prctl directly is // that it can set the name of threads other than the current thread. -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(OS_BSD) && !defined(OS_NETBSD) pthread_set_name_np(pthread_self(), name); -#elif defined(__NetBSD__) +#elif defined(OS_NETBSD) - pthread_setname_np(pthread_self(), "%s", name); + pthread_setname_np(pthread_self(), "%s", (void *)name); #else prctl(PR_SET_NAME, reinterpret_cast(name), 0, 0, 0); $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 +++ ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 @@ -280,6 +280,7 @@ class NamedProcessIterator { const ProcessEntry* NextProcessEntry(); private: +#if !defined(OS_BSD) // Determines whether there's another process (regardless of executable) // left in the list of all processes. Returns true and sets entry_ to // that process's info if there is one, false otherwise. @@ -292,18 +292,24 @@ void InitProcessEntry(ProcessEntry* entry); std::wstring executable_name_; +#endif #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; #elif defined(OS_LINUX) DIR *procfs_dir_; +#elif defined(OS_BSD) + std::vector content; + size_t nextEntry; #elif defined(OS_MACOSX) std::vector kinfo_procs_; size_t index_of_kinfo_proc_; #endif +#if !defined(OS_BSD) ProcessEntry entry_; const ProcessFilter* filter_; +#endif DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); }; $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 +++ ipc/chromium/src/base/process_util_bsd.cc @@ -0,0 +1,318 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from process_util_linux.cc and process_util_mac.cc + +#include "base/process_util.h" + +#include +#include +#include +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + +#include +#include +#include +#include + +#include + +#include "base/debug_util.h" +#include "base/eintr_wrapper.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/string_tokenizer.h" +#include "base/string_util.h" + +#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ + || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) +#define HAVE_POSIX_SPAWN 1 +#endif + +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported +# else +# define __dso_public __attribute__((__visibility__("default"))) +# endif +#endif + +#ifdef HAVE_POSIX_SPAWN +#include +extern "C" char **environ __dso_public; +#endif + +namespace { + +enum ParsingState { + KEY_NAME, + KEY_VALUE +}; + +static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); + +} // namespace + +namespace base { + +#ifdef HAVE_POSIX_SPAWN + +void FreeEnvVarsArray(char* array[], int length) +{ + for (int i = 0; i < length; i++) { + free(array[i]); + } + delete[] array; +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; + for (size_t i = 0; i < argv.size(); i++) { + argv_copy[i] = const_cast(argv[i].c_str()); + } + argv_copy[argv.size()] = NULL; + + // Make sure we don't leak any FDs to the child process by marking all FDs + // as close-on-exec. + SetAllFDsToCloseOnExec(); + + // Copy environment to a new char array and add the variables + // in env_vars_to_set. + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); + std::string varValue = varString.substr(varString.find_first_of('=') + 1); + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } + pos++; + } + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; + int i = 0; + for (environment_map::const_iterator it = combined_env_vars.begin(); + it != combined_env_vars.end(); ++it) { + std::string entry(it->first); + entry += "="; + entry += it->second; + vars[i] = strdup(entry.c_str()); + i++; + } + vars[i] = NULL; + + posix_spawn_file_actions_t file_actions; + if (posix_spawn_file_actions_init(&file_actions) != 0) { + FreeEnvVarsArray(vars, varsLen); + return false; + } + + // Turn fds_to_remap array into a set of dup2 calls. + for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); + it != fds_to_remap.end(); + ++it) { + int src_fd = it->first; + int dest_fd = it->second; + + if (src_fd == dest_fd) { + int flags = fcntl(src_fd, F_GETFD); + if (flags != -1) { + fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); + } + } else { + if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { + posix_spawn_file_actions_destroy(&file_actions); + FreeEnvVarsArray(vars, varsLen); + return false; + } + } + } + + pid_t pid = 0; + int spawn_succeeded = (posix_spawnp(&pid, + argv_copy[0], + &file_actions, + NULL, + argv_copy, + vars) == 0); + + FreeEnvVarsArray(vars, varsLen); + + posix_spawn_file_actions_destroy(&file_actions); + + bool process_handle_valid = pid > 0; + if (!spawn_succeeded || !process_handle_valid) { + retval = false; + } else { + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return retval; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, ProcessHandle* process_handle) { + // TODO(playmobil): Do we need to respect the start_hidden flag? + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#else // no posix_spawn, use fork/exec + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + scoped_array argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; + fd_shuffle1.reserve(fds_to_remap.size()); + fd_shuffle2.reserve(fds_to_remap.size()); + + pid_t pid = fork(); + if (pid < 0) + return false; + + if (pid == 0) { + for (file_handle_mapping_vector::const_iterator + it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { + fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); + fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); + } + + if (!ShuffleFileDescriptors(&fd_shuffle1)) + _exit(127); + + CloseSuperfluousFds(fd_shuffle2); + + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } + + for (size_t i = 0; i < argv.size(); i++) + argv_cstr[i] = const_cast(argv[i].c_str()); + argv_cstr[argv.size()] = NULL; + execvp(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; + exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return true; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, + ProcessHandle* process_handle) { + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#endif + +NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, + const ProcessFilter* filter) +{ + int numEntries; + kvm_t *kvm; + std::string exe(WideToASCII(executable_name)); + +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) + kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { +# if defined(OS_DRAGONFLY) + if (exe != procs[i].kp_comm) continue; + if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].kp_pid; + e.ppid = procs[i].kp_ppid; + strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); + content.push_back(e); +# elif defined(OS_FREEBSD) + if (exe != procs[i].ki_comm) continue; + if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].ki_pid; + e.ppid = procs[i].ki_ppid; + strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); + content.push_back(e); +# endif +#else + kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); +#if defined(OS_OPENBSD) + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries); +#else + struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); +#endif + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { + if (exe != procs[i].p_comm) continue; + if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].p_pid; + e.ppid = procs[i].p_ppid; + strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); + content.push_back(e); +#endif + } + } + nextEntry = 0; + kvm_close(kvm); +} + +NamedProcessIterator::~NamedProcessIterator() { +} + +const ProcessEntry* NamedProcessIterator::NextProcessEntry() { + if (nextEntry >= content.size()) return NULL; + return &content[nextEntry++]; +} + +bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; +} + +} // namespace base $NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/process_util_posix.cc @@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj #elif defined(OS_MACOSX) static const rlim_t kSystemDefaultMaxFds = 256; static const char kFDDir[] = "/dev/fd"; +#elif defined(OS_BSD) + // the getrlimit below should never fail, so whatever .. + static const rlim_t kSystemDefaultMaxFds = 1024; + // at least /dev/fd will exist + static const char kFDDir[] = "/dev/fd"; #endif // Get the maximum number of FDs possible. @@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj void SetAllFDsToCloseOnExec() { #if defined(OS_LINUX) const char fd_dir[] = "/proc/self/fd"; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) const char fd_dir[] = "/dev/fd"; #endif ScopedDIR dir_closer(opendir(fd_dir)); $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ --- ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ ipc/chromium/src/base/sys_info_posix.cc @@ -18,6 +18,11 @@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@ -26,7 +31,11 @@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h @@ -34,7 +34,7 @@ #include "base/third_party/nspr/prcpucfg_win.h" #elif defined(__APPLE__) #include "base/third_party/nspr/prcpucfg_mac.h" -#elif defined(__linux__) || defined(ANDROID) +#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include "base/third_party/nspr/prcpucfg_linux.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/third_party/nspr/prtime.cc @@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp LL_ADD(retVal, retVal, temp); return retVal; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) struct tm exp_tm = {0}; exp_tm.tm_sec = exploded->tm_sec; exp_tm.tm_min = exploded->tm_min; @@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp result *= kSecondsToMicroseconds; result += exploded->tm_usec; return result; +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; + exp_tm.tm_hour = exploded->tm_hour; + exp_tm.tm_mday = exploded->tm_mday; + exp_tm.tm_mon = exploded->tm_month; + exp_tm.tm_year = exploded->tm_year - 1900; + + // time_t is 64bit + time_t absolute_time = timegm(&exp_tm); + + PRTime result = static_cast(absolute_time); + result -= exploded->tm_params.tp_gmt_offset + + exploded->tm_params.tp_dst_offset; + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; #else #error No PR_ImplodeTime implemented on your platform. #endif diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc index abf2a56..48791f6 100644 --- ipc/chromium/src/base/time_posix.cc +++ ipc/chromium/src/base/time_posix.cc @@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { // With numer and denom = 1 (the expected case), the 64-bit absolute time // reported in nanoseconds is enough to last nearly 585 years. -#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ +#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 struct timespec ts; $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/build/build_config.h @@ -19,6 +19,12 @@ #define OS_MACOSX 1 #elif defined(__linux__) || defined(ANDROID) #define OS_LINUX 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#elif defined(__NetBSD__) +#define OS_NETBSD 1 #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #elif defined(_WIN32) @@ -27,9 +33,16 @@ #error Please add support for your platform in build/build_config.h #endif +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ + || defined(OS_NETBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + // For access to standard POSIX features, use OS_POSIX instead of a more // specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #define OS_POSIX 1 #endif diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc index bd866ee..2ea5b19 100644 --- ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ --- ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 +++ ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess }; // This is a control message buffer large enough to hold kMaxReadFDs -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_NETBSD) // TODO(agl): OSX appears to have non-constant CMSG macros! char input_cmsg_buf_[1024]; #else $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/chrome/common/ipc_message_utils.h @@ -195,7 +195,7 @@ }; #endif -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) +#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { @@ -248,7 +248,7 @@ }; #endif // defined(OS_MACOSX) -#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) +#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| template <> struct ParamTraits { $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/chrome/common/transport_dib.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) #include "base/shared_memory.h" #endif @@ -66,7 +66,7 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; @@ -108,7 +108,7 @@ class TransportDIB { private: TransportDIB(); -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) explicit TransportDIB(base::SharedMemoryHandle dib); base::SharedMemory shared_memory_; uint32 sequence_num_; $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/glue/GeckoChildProcessHost.cpp @@ -430,7 +430,7 @@ // and passing wstrings from one config to the other is unsafe. So // we split the logic here. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) base::environment_map newEnvVars; // XPCOM may not be initialized in some subprocesses. We don't want // to initialize XPCOM just for the directory service, especially @@ -445,8 +445,8 @@ if (NS_SUCCEEDED(rv)) { nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX -# ifdef MOZ_WIDGET_ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) +# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) path += "/lib"; # endif // MOZ_WIDGET_ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); #if defined(MOZ_CRASHREPORTER) -# if defined(OS_LINUX) +# if defined(OS_LINUX) || defined(OS_BSD) int childCrashFd, childCrashRemapFd; if (!CrashReporter::CreateNotificationPipeForChild( &childCrashFd, &childCrashRemapFd)) @@ -594,7 +594,7 @@ #endif base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) newEnvVars, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h index f37998d..b05dc7b 100644 --- ipc/glue/SharedMemorySysV.h +++ ipc/glue/SharedMemorySysV.h @@ -8,7 +8,7 @@ #ifndef mozilla_ipc_SharedMemorySysV_h #define mozilla_ipc_SharedMemorySysV_h -#if defined(OS_LINUX) && !defined(ANDROID) +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) // SysV shared memory isn't available on Windows, but we define the // following macro so that #ifdefs are clearer (compared to #ifdef $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ --- toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 +++ toolkit/library/Makefile.in @@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle endif endif +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +# keep `environ' unresolved, see bug 14426 for binutils +EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) ifdef ACCESSIBILITY Index: head/www/firefox/files/patch-bug774671 =================================================================== --- head/www/firefox/files/patch-bug774671 (nonexistent) +++ head/www/firefox/files/patch-bug774671 (revision 303831) @@ -0,0 +1,15 @@ +--- js/src/jsprvtd.h.orig 2012-08-25 00:55:40.000000000 +0200 ++++ js/src/jsprvtd.h 2012-09-06 15:20:48.000000000 +0200 +@@ -149,9 +149,9 @@ + class UpvarCookie; + + class Proxy; +-class BaseProxyHandler; +-class DirectWrapper; +-class CrossCompartmentWrapper; ++class JS_FRIEND_API(BaseProxyHandler); ++class JS_FRIEND_API(DirectWrapper); ++class JS_FRIEND_API(CrossCompartmentWrapper); + + class TempAllocPolicy; + class RuntimeAllocPolicy; Property changes on: head/www/firefox/files/patch-bug774671 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug787904 =================================================================== --- head/www/firefox/files/patch-bug787904 (nonexistent) +++ head/www/firefox/files/patch-bug787904 (revision 303831) @@ -0,0 +1,12 @@ +--- js/src/gc/Heap.h ++++ js/src/gc/Heap.h +@@ -108,7 +108,8 @@ struct Cell + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ +-#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) ++#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ ++ (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) + const size_t PageShift = 13; + #else + const size_t PageShift = 12; Property changes on: head/www/firefox/files/patch-bug787904 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-bug788039 =================================================================== --- head/www/firefox/files/patch-bug788039 (nonexistent) +++ head/www/firefox/files/patch-bug788039 (revision 303831) @@ -0,0 +1,59 @@ +# Bug 788039 - With no prefix search libevent via pkg-config. + +--- config/autoconf.mk.in~ ++++ config/autoconf.mk.in +@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA + + MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@ + MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@ +-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@ ++MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@ + + MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ + MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ +--- configure.in~ ++++ configure.in +@@ -3854,7 +3854,7 @@ fi + dnl system libevent Support + dnl ======================================================== + MOZ_ARG_WITH_STRING(system-libevent, +-[ --with-system-libevent=[PFX] ++[ --with-system-libevent[=PFX] + Use system libevent [installed at prefix PFX]], + LIBEVENT_DIR=$withval) + +@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= ++elif test "$LIBEVENT_DIR" = yes; then ++ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ MOZ_NATIVE_LIBEVENT=1, ++ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found])) + else +- if test "${LIBEVENT_DIR}" = "yes"; then +- LIBEVENT_DIR=/usr +- fi + CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + MOZ_CHECK_HEADER(event.h, +@@ -3876,16 +3877,16 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], +- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) ++ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + + AC_SUBST(MOZ_NATIVE_LIBEVENT) +-AC_SUBST(MOZ_LIBEVENT_INCLUDES) ++AC_SUBST(MOZ_LIBEVENT_CFLAGS) + AC_SUBST(MOZ_LIBEVENT_LIBS) + + dnl ======================================================== Property changes on: head/www/firefox/files/patch-bug788039 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-clang32-libc++-visibility-hack =================================================================== --- head/www/firefox/files/patch-clang32-libc++-visibility-hack (nonexistent) +++ head/www/firefox/files/patch-clang32-libc++-visibility-hack (revision 303831) @@ -0,0 +1,38 @@ +--- configure.in~ ++++ configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- js/src/configure.in~ ++++ js/src/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then Property changes on: head/www/firefox/files/patch-clang32-libc++-visibility-hack ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox/files/patch-ipc-chromium-Makefile.in =================================================================== --- head/www/firefox/files/patch-ipc-chromium-Makefile.in (revision 303830) +++ head/www/firefox/files/patch-ipc-chromium-Makefile.in (revision 303831) @@ -1,28 +1,28 @@ --- ipc/chromium/Makefile.in~ +++ ipc/chromium/Makefile.in @@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) +# workaround IPC hang with libevent2 +ifndef MOZ_DEBUG +ifneq (,$(filter 4.2.%, $(CXX_VERSION))) +MOZ_OPTIMIZE_FLAGS = -O1 +OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) +endif +endif + LIBRARY_NAME = chromium_s FORCE_STATIC_LIB = 1 LIBXUL_LIBRARY = 1 @@ -55,9 +60,7 @@ vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) -+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS)) endif # } vpath %.cc \ Index: head/www/firefox-esr/files/patch-configure.in =================================================================== --- head/www/firefox-esr/files/patch-configure.in (revision 303830) +++ head/www/firefox-esr/files/patch-configure.in (nonexistent) @@ -1,52 +0,0 @@ ---- configure.in.orig 2010-11-04 21:05:18.000000000 +0100 -+++ configure.in 2010-11-09 12:59:28.000000000 +0100 -@@ -3803,19 +3803,21 @@ - AC_CHECK_FUNCS(localtime_r strtok_r) - - dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt --_SAVE_LDFLAGS=$LDFLAGS --LDFLAGS="$LDFLAGS -lrt" --AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, -+_SAVE_LIBS=$LIBS -+AC_SEARCH_LIBS(clock_gettime, rt) -+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), - ac_cv_have_clock_monotonic, - [AC_TRY_LINK([#include ], - [ struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); ], - ac_cv_have_clock_monotonic=yes, - ac_cv_have_clock_monotonic=no)]) --LDFLAGS=$_SAVE_LDFLAGS -+LIBS=$_SAVE_LIBS - if test "$ac_cv_have_clock_monotonic" = "yes"; then - HAVE_CLOCK_MONOTONIC=1 -- REALTIME_LIBS=-lrt -+ if test "$ac_cv_search_clock_gettime" != "none required"; then -+ REALTIME_LIBS=$ac_cv_search_clock_gettime -+ fi - AC_DEFINE(HAVE_CLOCK_MONOTONIC) - AC_SUBST(HAVE_CLOCK_MONOTONIC) - AC_SUBST(REALTIME_LIBS) -@@ -4230,6 +4233,9 @@ - if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then - MOZ_NATIVE_LIBEVENT= - else -+PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, -+ [MOZ_NATIVE_LIBEVENT=1 -+ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ - if test "${LIBEVENT_DIR}" = "yes"; then - LIBEVENT_DIR=/usr - fi -@@ -4242,10 +4248,11 @@ else - AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) - AC_CHECK_LIB(event, event_init, - [MOZ_NATIVE_LIBEVENT=1 -- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" -+ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" - MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], - [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) - fi -+]) - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS Property changes on: head/www/firefox-esr/files/patch-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-xpcom__threads__nsThreadManager.cpp =================================================================== --- head/www/firefox-esr/files/patch-xpcom__threads__nsThreadManager.cpp (revision 303830) +++ head/www/firefox-esr/files/patch-xpcom__threads__nsThreadManager.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- ./xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 -+++ ./xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 -@@ -89,6 +89,11 @@ - nsresult - nsThreadManager::Init() - { -+#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ -+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) -+ if (!gTLSThreadID) -+ gTLSThreadID = mozilla::threads::Generic; -+#endif - if (!mThreadsByPRThread.Init()) - return NS_ERROR_OUT_OF_MEMORY; - Property changes on: head/www/firefox-esr/files/patch-xpcom__threads__nsThreadManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-js_src_jsnum.cpp =================================================================== --- head/www/firefox-esr/files/patch-js_src_jsnum.cpp (revision 303830) +++ head/www/firefox-esr/files/patch-js_src_jsnum.cpp (nonexistent) @@ -1,31 +0,0 @@ ---- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 -+++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 -@@ -43,6 +43,9 @@ - /* - * JS number type and wrapper class. - */ -+#if defined(__FreeBSD__) -+#include -+#endif - #ifdef XP_OS2 - #define _PC_53 PC_53 - #define _MCW_EM MCW_EM -@@ -691,8 +694,18 @@ - - #else - -+#if defined(__FreeBSD__) -+#if __BSD_VISIBLE == 0 -+#error __BSD_VISIBLE is zero, so fedisableexcept is not defined -+#endif -+#include -+#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) -+#else -+ - #define FIX_FPU() ((void)0) - -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ -+ - #endif - - JSBool Property changes on: head/www/firefox-esr/files/patch-js_src_jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug351181 =================================================================== --- head/www/firefox-esr/files/patch-bug351181 (nonexistent) +++ head/www/firefox-esr/files/patch-bug351181 (revision 303831) @@ -0,0 +1,31 @@ +--- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -43,6 +43,9 @@ + /* + * JS number type and wrapper class. + */ ++#if defined(__FreeBSD__) ++#include ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool Property changes on: head/www/firefox-esr/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug543241 =================================================================== --- head/www/firefox-esr/files/patch-bug543241 (nonexistent) +++ head/www/firefox-esr/files/patch-bug543241 (revision 303831) @@ -0,0 +1,14 @@ +--- ./xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 ++++ ./xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 +@@ -89,6 +89,11 @@ + nsresult + nsThreadManager::Init() + { ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ ++ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) ++ if (!gTLSThreadID) ++ gTLSThreadID = mozilla::threads::Generic; ++#endif + if (!mThreadsByPRThread.Init()) + return NS_ERROR_OUT_OF_MEMORY; + Property changes on: head/www/firefox-esr/files/patch-bug543241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug653551 =================================================================== --- head/www/firefox-esr/files/patch-bug653551 (nonexistent) +++ head/www/firefox-esr/files/patch-bug653551 (revision 303831) @@ -0,0 +1,29 @@ +commit 47ea30f +Author: Landry Breuil +Date: Thu Feb 2 15:31:56 2012 +0900 + + Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha +--- + js/src/configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git js/src/configure.in js/src/configure.in +index 84390cf..d663c46 100644 +--- js/src/configure.in ++++ js/src/configure.in +@@ -2806,13 +2806,15 @@ arm*-*) + AC_DEFINE(JS_NUNBOX32) + ;; + sparc*-*) ++ if test ! "$HAVE_64BIT_OS" ; then + NANOJIT_ARCH=Sparc + ENABLE_METHODJIT=1 + ENABLE_MONOIC=1 + ENABLE_POLYIC=1 + ENABLE_METHODJIT_TYPED_ARRAY=1 + AC_DEFINE(JS_CPU_SPARC) + AC_DEFINE(JS_NUNBOX32) ++ fi + ;; + mips*-*) + ENABLE_METHODJIT=1 Property changes on: head/www/firefox-esr/files/patch-bug653551 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug728968 =================================================================== --- head/www/firefox-esr/files/patch-bug728968 (nonexistent) +++ head/www/firefox-esr/files/patch-bug728968 (revision 303831) @@ -0,0 +1,50 @@ +commit 4075972 +Author: Mike Hommey +Date: Thu Feb 23 11:00:46 2012 +0100 + + Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey +--- + configure.in | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git configure.in configure.in +index 3ba7e2f..3d0614c 100644 +--- configure.in ++++ configure.in +@@ -3728,20 +3728,23 @@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6 + AC_CHECK_FUNCS(flockfile getpagesize) + AC_CHECK_FUNCS(localtime_r strtok_r) + +-dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt +-_SAVE_LDFLAGS=$LDFLAGS +-LDFLAGS="$LDFLAGS -lrt" +-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt, +- ac_cv_have_clock_monotonic, +- [AC_TRY_LINK([#include ], +- [ struct timespec ts; +- clock_gettime(CLOCK_MONOTONIC, &ts); ], +- ac_cv_have_clock_monotonic=yes, +- ac_cv_have_clock_monotonic=no)]) +-LDFLAGS=$_SAVE_LDFLAGS +-if test "$ac_cv_have_clock_monotonic" = "yes"; then ++dnl check for clock_gettime(), the CLOCK_MONOTONIC clock ++AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC), ++ ac_cv_clock_monotonic, ++ [for libs in "" -lrt; do ++ _SAVE_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS $libs" ++ AC_TRY_LINK([#include ], ++ [ struct timespec ts; ++ clock_gettime(CLOCK_MONOTONIC, &ts); ], ++ ac_cv_clock_monotonic=$libs ++ break, ++ ac_cv_clock_monotonic=no) ++ LDFLAGS="$_SAVE_LDFLAGS" ++ done]) ++if test "$ac_cv_clock_monotonic" != "no"; then + HAVE_CLOCK_MONOTONIC=1 +- REALTIME_LIBS=-lrt ++ REALTIME_LIBS=$ac_cv_clock_monotonic + AC_DEFINE(HAVE_CLOCK_MONOTONIC) + AC_SUBST(HAVE_CLOCK_MONOTONIC) + AC_SUBST(REALTIME_LIBS) Property changes on: head/www/firefox-esr/files/patch-bug728968 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug753046 =================================================================== --- head/www/firefox-esr/files/patch-bug753046 (revision 303830) +++ head/www/firefox-esr/files/patch-bug753046 (revision 303831) @@ -1,1197 +1,1201 @@ # Bug 753046 - Add support for DragonFly/NetBSD $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 +++ dom/plugins/ipc/PluginModuleChild.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_WIDGET_QT +#include // for _exit() #include #include "nsQAppInstance.h" #include "NestedLoopTimer.h" @@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin // TODO: use PluginPRLibrary here -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) mShutdownFunc = (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); @@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_MACOSX) *_retval = mGetEntryPointsFunc(&mFunctions); @@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); return true; #elif defined(OS_WIN) || defined(OS_MACOSX) $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 +++ dom/plugins/ipc/PluginModuleChild.h @@ -340,7 +340,7 @@ private: // we get this from the plugin NP_PLUGINSHUTDOWN mShutdownFunc; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_BSD) NP_PLUGINUNIXINIT mInitializeFunc; #elif defined(OS_WIN) || defined(OS_MACOSX) NP_PLUGININIT mInitializeFunc; $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ ipc/chromium/Makefile.in @@ -278,6 +278,34 @@ endif endif # } OS_LINUX +ifdef OS_BSD # { + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ + file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) + +ifdef MOZ_ENABLE_GTK2 +CPPSRCS += \ + message_pump_glib.cc \ + $(NULL) +endif + +ifdef MOZ_ENABLE_QT +MOCSRCS = \ + moc_message_pump_qt.cc \ + $(NULL) + +CPPSRCS += \ + $(MOCSRCS) \ + message_pump_qt.cc \ + $(NULL) +endif + +endif # } OS_BSD + # libevent ifndef MOZ_NATIVE_LIBEVENT # { $NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 +++ ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 @@ -56,17 +56,6 @@ -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ $(NULL) -ifeq ($(OS_ARCH),Darwin) # { - -OS_MACOSX = 1 -OS_POSIX = 1 - -DEFINES += \ - -DOS_MACOSX=1 \ - -DOS_POSIX=1 \ - $(NULL) - -else # } { ifeq ($(OS_ARCH),WINNT) # { OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) @@ -93,13 +82,65 @@ endif else # } { - -OS_LINUX = 1 OS_POSIX = 1 +DEFINES += -DOS_POSIX=1 + +ifeq ($(OS_ARCH),Darwin) # { + +OS_MACOSX = 1 +DEFINES += \ + -DOS_MACOSX=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),DragonFly) # { + +OS_DRAGONFLY = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_DRAGONFLY=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),FreeBSD) # { + +OS_FREEBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_FREEBSD=1 \ + -DOS_BSD=1 \ + $(NULL) +else # } { +ifeq ($(OS_ARCH),NetBSD) # { + +OS_NETBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_NETBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),OpenBSD) # { + +OS_OPENBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_OPENBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { + +OS_LINUX = 1 DEFINES += \ -DOS_LINUX=1 \ - -DOS_POSIX=1 \ $(NULL) # NB: to stop gcc warnings about exporting template instantiation @@ -107,4 +147,8 @@ endif # } endif # } +endif # } +endif # } +endif # } +endif # } $NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/base_paths.h @@ -13,7 +13,7 @@ #include "base/base_paths_win.h" #elif defined(OS_MACOSX) #include "base/base_paths_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "base/base_paths_linux.h" #endif #include "base/path_service.h" $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/debug_util_posix.cc @@ -5,7 +5,7 @@ #include "build/build_config.h" #include "base/debug_util.h" -#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) +#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) #include #include @@ -17,9 +17,16 @@ #include #if MOZ_HAVE_EXECINFO_H #include +#endif + +#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + #include "base/basictypes.h" #include "base/eintr_wrapper.h" #include "base/logging.h" @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u return false; } -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Based on Apple's recommended method as described in // http://developer.apple.com/qa/qa2004/qa1361.html @@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() { // This process is being debugged if the P_TRACED flag is set. is_set = true; +#if defined(OS_DRAGONFLY) + being_debugged = (info.kp_flags & P_TRACED) != 0; +#elif defined(OS_FREEBSD) + being_debugged = (info.ki_flag & P_TRACED) != 0; +#elif defined(OS_OPENBSD) + being_debugged = (info.p_flag & P_TRACED) != 0; +#else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif return being_debugged; } diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h new file mode 100644 index 0000000..3fc1a87 --- /dev/null +++ ipc/chromium/src/base/dir_reader_bsd.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,112 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from dir_reader_linux.h + +#ifndef BASE_DIR_READER_BSD_H_ +#define BASE_DIR_READER_BSD_H_ +#pragma once + +#include +#include +#include +#include +#include + +#include "base/logging.h" +#include "base/eintr_wrapper.h" + +// See the comments in dir_reader_posix.h about this. + +namespace base { + +class DirReaderBSD { + public: + explicit DirReaderBSD(const char* directory_path) +#ifdef O_DIRECTORY + : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), +#else + : fd_(open(directory_path, O_RDONLY)), +#endif + offset_(0), + size_(0) { + memset(buf_, 0, sizeof(buf_)); + } + + ~DirReaderBSD() { + if (fd_ >= 0) { + if (HANDLE_EINTR(close(fd_))) + DLOG(ERROR) << "Failed to close directory handle"; + } + } + + bool IsValid() const { + return fd_ >= 0; + } + + // Move to the next entry returning false if the iteration is complete. + bool Next() { + if (size_) { + struct dirent* dirent = reinterpret_cast(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else + offset_ += dirent->d_reclen; ++#endif + } + + if (offset_ != size_) + return true; + +#ifdef OS_OPENBSD + const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); +#else + const int r = getdents(fd_, buf_, sizeof(buf_)); +#endif + if (r == 0) + return false; + if (r == -1) { +#ifdef OS_OPENBSD + DLOG(ERROR) << "getdirentries returned an error: " << errno; +#else + DLOG(ERROR) << "getdents returned an error: " << errno; +#endif + return false; + } + size_ = r; + offset_ = 0; + return true; + } + + const char* name() const { + if (!size_) + return NULL; + + const struct dirent* dirent = + reinterpret_cast(&buf_[offset_]); + return dirent->d_name; + } + + int fd() const { + return fd_; + } + + static bool IsFallback() { + return false; + } + + private: + const int fd_; + char buf_[512]; +#ifdef OS_OPENBSD + off_t *basep_; +#endif + size_t offset_, size_; + + DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); +}; + +} // namespace base + +#endif // BASE_DIR_READER_BSD_H_ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h index 9a34492..62b280c 100644 --- ipc/chromium/src/base/dir_reader_posix.h +++ ipc/chromium/src/base/dir_reader_posix.h @@ -18,6 +18,8 @@ #if defined(OS_LINUX) #include "base/dir_reader_linux.h" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #endif @@ -26,6 +28,8 @@ #if defined(OS_LINUX) typedef DirReaderLinux DirReaderPosix; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #endif diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc index 171e44f..0c6dfcc 100644 --- ipc/chromium/src/base/file_util_linux.cc +++ ipc/chromium/src/base/file_util_linux.cc @@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { -#ifdef ANDROID +#if defined(ANDROID) || defined(OS_BSD) return GetTempDir(path); #else *path = FilePath("/dev/shm"); $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/file_util_posix.cc @@ -31,7 +31,7 @@ #include "base/time.h" // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#ifndef HAVE_STAT64 #define stat64 stat #endif $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 +++ ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #ifdef MOZ_WIDGET_GTK2 #include "base/message_pump_glib.h" #endif @@ -119,7 +119,7 @@ if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/platform_thread.h @@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE #elif defined(OS_POSIX) #include typedef pthread_t PlatformThreadHandle; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_OPENBSD) #include typedef pid_t PlatformThreadId; +#elif defined(OS_BSD) +typedef lwpid_t PlatformThreadId; #elif defined(OS_MACOSX) #include typedef mach_port_t PlatformThreadId; $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc @@ -9,9 +9,23 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_NETBSD) +#include #elif defined(OS_LINUX) #include #include +#elif defined(OS_DRAGONFLY) +#include +#elif defined(OS_FREEBSD) +#include +#if __FreeBSD_version > 802500 +#include +#else +_Pragma("GCC visibility push(default)") +extern "C" int thr_self(long *); +_Pragma("GCC visibility pop") +#endif +#include #endif #if defined(OS_MACOSX) @@ -38,9 +45,20 @@ // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); -#elif defined (__OpenBSD__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) + return lwp_gettid(); +#elif defined(OS_FREEBSD) +# if __FreeBSD_version > 900030 + return pthread_getthreadid_np(); +# else + long lwpid; + thr_self(&lwpid); + return lwpid; +# endif +#elif defined(OS_OPENBSD) - // TODO(BSD): find a better thread ID - return (intptr_t)(pthread_self()); + return (intptr_t) (pthread_self()); #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 +++ ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 @@ -280,6 +280,7 @@ class NamedProcessIterator { const ProcessEntry* NextProcessEntry(); private: +#if !defined(OS_BSD) // Determines whether there's another process (regardless of executable) // left in the list of all processes. Returns true and sets entry_ to // that process's info if there is one, false otherwise. @@ -292,18 +292,24 @@ void InitProcessEntry(ProcessEntry* entry); std::wstring executable_name_; +#endif #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; #elif defined(OS_LINUX) DIR *procfs_dir_; +#elif defined(OS_BSD) + std::vector content; + size_t nextEntry; #elif defined(OS_MACOSX) std::vector kinfo_procs_; size_t index_of_kinfo_proc_; #endif +#if !defined(OS_BSD) ProcessEntry entry_; const ProcessFilter* filter_; +#endif DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); }; $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 +++ ipc/chromium/src/base/process_util_bsd.cc @@ -0,0 +1,318 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from process_util_linux.cc and process_util_mac.cc + +#include "base/process_util.h" + +#include +#include +#include +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + +#include +#include +#include +#include + +#include + +#include "base/debug_util.h" +#include "base/eintr_wrapper.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/string_tokenizer.h" +#include "base/string_util.h" + +#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ + || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) +#define HAVE_POSIX_SPAWN 1 +#endif + +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported +# else +# define __dso_public __attribute__((__visibility__("default"))) +# endif +#endif + +#ifdef HAVE_POSIX_SPAWN +#include +extern "C" char **environ __dso_public; +#endif + +namespace { + +enum ParsingState { + KEY_NAME, + KEY_VALUE +}; + +static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); + +} // namespace + +namespace base { + +#ifdef HAVE_POSIX_SPAWN + +void FreeEnvVarsArray(char* array[], int length) +{ + for (int i = 0; i < length; i++) { + free(array[i]); + } + delete[] array; +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; + for (size_t i = 0; i < argv.size(); i++) { + argv_copy[i] = const_cast(argv[i].c_str()); + } + argv_copy[argv.size()] = NULL; + + // Make sure we don't leak any FDs to the child process by marking all FDs + // as close-on-exec. + SetAllFDsToCloseOnExec(); + + // Copy environment to a new char array and add the variables + // in env_vars_to_set. + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); + std::string varValue = varString.substr(varString.find_first_of('=') + 1); + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } + pos++; + } + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; + int i = 0; + for (environment_map::const_iterator it = combined_env_vars.begin(); + it != combined_env_vars.end(); ++it) { + std::string entry(it->first); + entry += "="; + entry += it->second; + vars[i] = strdup(entry.c_str()); + i++; + } + vars[i] = NULL; + + posix_spawn_file_actions_t file_actions; + if (posix_spawn_file_actions_init(&file_actions) != 0) { + FreeEnvVarsArray(vars, varsLen); + return false; + } + + // Turn fds_to_remap array into a set of dup2 calls. + for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); + it != fds_to_remap.end(); + ++it) { + int src_fd = it->first; + int dest_fd = it->second; + + if (src_fd == dest_fd) { + int flags = fcntl(src_fd, F_GETFD); + if (flags != -1) { + fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); + } + } else { + if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { + posix_spawn_file_actions_destroy(&file_actions); + FreeEnvVarsArray(vars, varsLen); + return false; + } + } + } + + pid_t pid = 0; + int spawn_succeeded = (posix_spawnp(&pid, + argv_copy[0], + &file_actions, + NULL, + argv_copy, + vars) == 0); + + FreeEnvVarsArray(vars, varsLen); + + posix_spawn_file_actions_destroy(&file_actions); + + bool process_handle_valid = pid > 0; + if (!spawn_succeeded || !process_handle_valid) { + retval = false; + } else { + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return retval; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, ProcessHandle* process_handle) { + // TODO(playmobil): Do we need to respect the start_hidden flag? + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#else // no posix_spawn, use fork/exec + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + scoped_array argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; + fd_shuffle1.reserve(fds_to_remap.size()); + fd_shuffle2.reserve(fds_to_remap.size()); + + pid_t pid = fork(); + if (pid < 0) + return false; + + if (pid == 0) { + for (file_handle_mapping_vector::const_iterator + it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { + fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); + fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); + } + + if (!ShuffleFileDescriptors(&fd_shuffle1)) + _exit(127); + + CloseSuperfluousFds(fd_shuffle2); + + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } + + for (size_t i = 0; i < argv.size(); i++) + argv_cstr[i] = const_cast(argv[i].c_str()); + argv_cstr[argv.size()] = NULL; + execvp(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; + exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return true; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, + ProcessHandle* process_handle) { + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#endif + +NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, + const ProcessFilter* filter) +{ + int numEntries; + kvm_t *kvm; + std::string exe(WideToASCII(executable_name)); + +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) + kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { +# if defined(OS_DRAGONFLY) + if (exe != procs[i].kp_comm) continue; + if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].kp_pid; + e.ppid = procs[i].kp_ppid; + strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); + content.push_back(e); +# elif defined(OS_FREEBSD) + if (exe != procs[i].ki_comm) continue; + if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].ki_pid; + e.ppid = procs[i].ki_ppid; + strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); + content.push_back(e); +# endif +#else + kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); +#if defined(OS_OPENBSD) + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries); +#else + struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); +#endif + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { + if (exe != procs[i].p_comm) continue; + if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].p_pid; + e.ppid = procs[i].p_ppid; + strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); + content.push_back(e); +#endif + } + } + nextEntry = 0; + kvm_close(kvm); +} + +NamedProcessIterator::~NamedProcessIterator() { +} + +const ProcessEntry* NamedProcessIterator::NextProcessEntry() { + if (nextEntry >= content.size()) return NULL; + return &content[nextEntry++]; +} + +bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; +} + +} // namespace base $NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/process_util_posix.cc @@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj #elif defined(OS_MACOSX) static const rlim_t kSystemDefaultMaxFds = 256; static const char kFDDir[] = "/dev/fd"; +#elif defined(OS_BSD) + // the getrlimit below should never fail, so whatever .. + static const rlim_t kSystemDefaultMaxFds = 1024; + // at least /dev/fd will exist + static const char kFDDir[] = "/dev/fd"; #endif // Get the maximum number of FDs possible. @@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj void SetAllFDsToCloseOnExec() { #if defined(OS_LINUX) const char fd_dir[] = "/proc/self/fd"; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) const char fd_dir[] = "/dev/fd"; #endif ScopedDIR dir_closer(opendir(fd_dir)); $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ --- ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ ipc/chromium/src/base/sys_info_posix.cc @@ -18,6 +18,11 @@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@ -26,7 +31,11 @@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h @@ -34,7 +34,7 @@ #include "base/third_party/nspr/prcpucfg_win.h" #elif defined(__APPLE__) #include "base/third_party/nspr/prcpucfg_mac.h" -#elif defined(__linux__) || defined(ANDROID) +#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include "base/third_party/nspr/prcpucfg_linux.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/base/third_party/nspr/prtime.cc @@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp LL_ADD(retVal, retVal, temp); return retVal; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) struct tm exp_tm = {0}; exp_tm.tm_sec = exploded->tm_sec; exp_tm.tm_min = exploded->tm_min; @@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp result *= kSecondsToMicroseconds; result += exploded->tm_usec; return result; +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; + exp_tm.tm_hour = exploded->tm_hour; + exp_tm.tm_mday = exploded->tm_mday; + exp_tm.tm_mon = exploded->tm_month; + exp_tm.tm_year = exploded->tm_year - 1900; + + // time_t is 64bit + time_t absolute_time = timegm(&exp_tm); + + PRTime result = static_cast(absolute_time); + result -= exploded->tm_params.tp_gmt_offset + + exploded->tm_params.tp_dst_offset; + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; #else #error No PR_ImplodeTime implemented on your platform. #endif diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc index abf2a56..48791f6 100644 --- ipc/chromium/src/base/time_posix.cc +++ ipc/chromium/src/base/time_posix.cc @@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { // With numer and denom = 1 (the expected case), the 64-bit absolute time // reported in nanoseconds is enough to last nearly 585 years. -#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ +#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 struct timespec ts; $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/build/build_config.h @@ -19,6 +19,12 @@ #define OS_MACOSX 1 #elif defined(__linux__) || defined(ANDROID) #define OS_LINUX 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#elif defined(__NetBSD__) +#define OS_NETBSD 1 #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #elif defined(_WIN32) @@ -27,9 +33,16 @@ #error Please add support for your platform in build/build_config.h #endif +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ + || defined(OS_NETBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + // For access to standard POSIX features, use OS_POSIX instead of a more // specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #define OS_POSIX 1 #endif diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc index bd866ee..2ea5b19 100644 --- ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ --- ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 +++ ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess }; // This is a control message buffer large enough to hold kMaxReadFDs -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_NETBSD) // TODO(agl): OSX appears to have non-constant CMSG macros! char input_cmsg_buf_[1024]; #else $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/chrome/common/ipc_message_utils.h @@ -195,7 +195,7 @@ }; #endif -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) +#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { @@ -248,7 +248,7 @@ }; #endif // defined(OS_MACOSX) -#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) +#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| template <> struct ParamTraits { $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/chromium/src/chrome/common/transport_dib.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) #include "base/shared_memory.h" #endif @@ -66,7 +66,7 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; @@ -108,7 +108,7 @@ class TransportDIB { private: TransportDIB(); -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) explicit TransportDIB(base::SharedMemoryHandle dib); base::SharedMemory shared_memory_; uint32 sequence_num_; $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 +++ ipc/glue/GeckoChildProcessHost.cpp @@ -430,7 +430,7 @@ // and passing wstrings from one config to the other is unsafe. So // we split the logic here. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) base::environment_map newEnvVars; // XPCOM may not be initialized in some subprocesses. We don't want // to initialize XPCOM just for the directory service, especially @@ -445,8 +445,8 @@ if (NS_SUCCEEDED(rv)) { nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX -# ifdef ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) +# if defined(ANDROID) || defined(OS_BSD) path += "/lib"; # endif // ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); #if defined(MOZ_CRASHREPORTER) -# if defined(OS_LINUX) +# if defined(OS_LINUX) || defined(OS_BSD) int childCrashFd, childCrashRemapFd; if (!CrashReporter::CreateNotificationPipeForChild( &childCrashFd, &childCrashRemapFd)) @@ -594,7 +594,7 @@ #endif base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) newEnvVars, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h index f37998d..b05dc7b 100644 --- ipc/glue/SharedMemorySysV.h +++ ipc/glue/SharedMemorySysV.h @@ -8,7 +8,7 @@ #ifndef mozilla_ipc_SharedMemorySysV_h #define mozilla_ipc_SharedMemorySysV_h -#if defined(OS_LINUX) && !defined(ANDROID) +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) // SysV shared memory isn't available on Windows, but we define the // following macro so that #ifdefs are clearer (compared to #ifdef $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ --- toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 +++ toolkit/library/Makefile.in @@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle endif endif +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +# keep `environ' unresolved, see bug 14426 for binutils +EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) ifdef ACCESSIBILITY Index: head/www/firefox-esr/files/patch-bug788039 =================================================================== --- head/www/firefox-esr/files/patch-bug788039 (nonexistent) +++ head/www/firefox-esr/files/patch-bug788039 (revision 303831) @@ -0,0 +1,59 @@ +# Bug 788039 - With no prefix search libevent via pkg-config. + +--- config/autoconf.mk.in~ ++++ config/autoconf.mk.in +@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA + + MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@ + MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@ +-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@ ++MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@ + + MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ + MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ +--- configure.in~ ++++ configure.in +@@ -3854,7 +3854,7 @@ fi + dnl system libevent Support + dnl ======================================================== + MOZ_ARG_WITH_STRING(system-libevent, +-[ --with-system-libevent=[PFX] ++[ --with-system-libevent[=PFX] + Use system libevent [installed at prefix PFX]], + LIBEVENT_DIR=$withval) + +@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= ++elif test "$LIBEVENT_DIR" = yes; then ++ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ MOZ_NATIVE_LIBEVENT=1, ++ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found])) + else +- if test "${LIBEVENT_DIR}" = "yes"; then +- LIBEVENT_DIR=/usr +- fi + CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + MOZ_CHECK_HEADER(event.h, +@@ -3876,16 +3877,16 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], +- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) ++ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + + AC_SUBST(MOZ_NATIVE_LIBEVENT) +-AC_SUBST(MOZ_LIBEVENT_INCLUDES) ++AC_SUBST(MOZ_LIBEVENT_CFLAGS) + AC_SUBST(MOZ_LIBEVENT_LIBS) + + dnl ======================================================== Property changes on: head/www/firefox-esr/files/patch-bug788039 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-clang32-libc++-visibility-hack =================================================================== --- head/www/firefox-esr/files/patch-clang32-libc++-visibility-hack (nonexistent) +++ head/www/firefox-esr/files/patch-clang32-libc++-visibility-hack (revision 303831) @@ -0,0 +1,38 @@ +--- configure.in~ ++++ configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- js/src/configure.in~ ++++ js/src/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then Property changes on: head/www/firefox-esr/files/patch-clang32-libc++-visibility-hack ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-ipc-chromium-Makefile.in =================================================================== --- head/www/firefox-esr/files/patch-ipc-chromium-Makefile.in (revision 303830) +++ head/www/firefox-esr/files/patch-ipc-chromium-Makefile.in (revision 303831) @@ -1,28 +1,28 @@ --- ipc/chromium/Makefile.in~ +++ ipc/chromium/Makefile.in @@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) +# workaround IPC hang with libevent2 +ifndef MOZ_DEBUG +ifneq (,$(filter 4.2.%, $(CXX_VERSION))) +MOZ_OPTIMIZE_FLAGS = -O1 +OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) +endif +endif + LIBRARY_NAME = chromium_s FORCE_STATIC_LIB = 1 LIBXUL_LIBRARY = 1 @@ -55,9 +60,7 @@ vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) -+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS)) endif # } vpath %.cc \ Index: head/www/firefox-esr/files/patch-js-src-configure.in =================================================================== --- head/www/firefox-esr/files/patch-js-src-configure.in (revision 303830) +++ head/www/firefox-esr/files/patch-js-src-configure.in (revision 303831) @@ -1,26 +1,10 @@ --- js/src/configure.in.orig 2012-01-29 11:24:33.000000000 +0100 +++ js/src/configure.in 2012-01-30 23:30:02.051087215 +0100 -@@ -2732,6 +2742,7 @@ - AC_DEFINE(JS_NUNBOX32) - ;; - sparc*-*) -+ if test ! "$HAVE_64BIT_OS" ; then - NANOJIT_ARCH=Sparc - ENABLE_METHODJIT=1 - ENABLE_MONOIC=1 -@@ -2739,6 +2750,7 @@ - ENABLE_METHODJIT_TYPED_ARRAY=1 - AC_DEFINE(JS_CPU_SPARC) - AC_DEFINE(JS_NUNBOX32) -+ fi - ;; - esac - @@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n * C++ implementations should define these macros only when __STDC_LIMIT_MACROS * is defined before is included. */ #define __STDC_LIMIT_MACROS +#define __STDC_CONSTANT_MACROS #endif /* _JS_CONFDEFS_H_ */ Index: head/www/firefox-i18n/Makefile =================================================================== --- head/www/firefox-i18n/Makefile (revision 303830) +++ head/www/firefox-i18n/Makefile (revision 303831) @@ -1,98 +1,98 @@ # New ports collection makefile for: firefox-i18n # Date created: 28 May 2006 # Whom: Andrew Pantyukhin # # $FreeBSD$ # PORTNAME= firefox-i18n -PORTVERSION= 15.0 +PORTVERSION= 15.0.1 CATEGORIES= www MASTER_SITE_SUBDIR= firefox/releases/${PORTVERSION}/linux-i686/xpi PKGNAMEPREFIX= DISTFILES= ${FIREFOX_I18N_:S/$/.xpi/} DIST_SUBDIR= xpi/${DISTNAME} MAINTAINER= gecko@FreeBSD.org COMMENT= Localized interface for Firefox EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip USE_FIREFOX= 15 USE_XPI= firefox linux-firefox USE_SUBMAKE= yes WDIR= langpack-*@firefox.mozilla.org XPI_DISTNAMES= ${FIREFOX_I18N_} PLIST?= ${WRKDIR}/plist PLISTD?= ${WRKDIR}/plist_dirs PLISTF?= ${WRKDIR}/plist_files .include "${.CURDIR}/Makefile.option" .include .ifndef WITHOUT_SWITCHER RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-switcher .endif .include "${.CURDIR}/Makefile.lang" FIREFOX_I18N_?= ${FIREFOX_I18N} .for dist in ${XPI_DISTNAMES} XPI_ID_${dist}= langpack-${dist}@firefox.mozilla.org .endfor pre-everything:: @${ECHO_CMD} @${ECHO_CMD} "Please define FIREFOX_I18N_ALL to install all languages." @${ECHO_CMD} do-extract: @${MKDIR} ${WRKSRC} @for lang in ${FIREFOX_I18N_}; do \ if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\ then \ exit 1; \ fi; \ cd ${WRKSRC}/langpack-$$lang@firefox.mozilla.org/; \ ${FIND} -H -s * ! -type d | \ ${SED} -e "s|^|lib/xpi/langpack-$$lang@firefox.mozilla.org/|" >> ${PLISTF} && \ ${FIND} -d * -type d | \ ${SED} -e "s|^|@dirrm lib/xpi/langpack-$$lang@firefox.mozilla.org/|" >> ${PLISTD}; \ done ${CAT} ${PLISTF} | ${SORT} >> ${PLIST} ${CAT} ${PLISTD} | ${SORT} -r >> ${PLIST} .if !exists(${OPTIONSFILE}) && !defined(PACKAGE_BUILDING) pre-configure: config .endif do-install: @${INSTALL} -d ${XPI_LIBDIR} ${XPI_SLDIRS_ALL} @${CP} -R ${WRKSRC}/ ${XPI_LIBDIR}/ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${WDIR}/ @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${WDIR}/ @for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q} ; } @${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A} @${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { \ ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q}; }' ${_A} @${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ${XPI_LIBDIR}; { ${RM} -fR $$_dir/${WDIR} ; }' ${_A} @${ECHO_CMD} '@unexec ${RMDIR} ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A} post-patch: ${FIND} ${WRKSRC} -name install.rdf -print0 | \ ${XARGS} -0L1 ${REINPLACE_CMD} -i '' -e '/ Index: head/www/firefox-i18n/distinfo =================================================================== --- head/www/firefox-i18n/distinfo (revision 303830) +++ head/www/firefox-i18n/distinfo (revision 303831) @@ -1,164 +1,164 @@ -SHA256 (xpi/firefox-i18n-15.0/af.xpi) = f652460b46fff68cd30838f0cb74238ed8f5030c800cad9583b679300baceaff -SIZE (xpi/firefox-i18n-15.0/af.xpi) = 268863 -SHA256 (xpi/firefox-i18n-15.0/ak.xpi) = 9ce143f0898729fdc59e93a48933c5214b07c757260c7d5aa59203220cbacb77 -SIZE (xpi/firefox-i18n-15.0/ak.xpi) = 271019 -SHA256 (xpi/firefox-i18n-15.0/ar.xpi) = 12bd8823d685addefd89717b27c8c764755f90b63e9a349aa603874fd047aa2e -SIZE (xpi/firefox-i18n-15.0/ar.xpi) = 298350 -SHA256 (xpi/firefox-i18n-15.0/ast.xpi) = 3ad8dc0d1759ba552a21a558b2aeab1dc5cd0a36a1fe5eb92a0903ccf1c74895 -SIZE (xpi/firefox-i18n-15.0/ast.xpi) = 248048 -SHA256 (xpi/firefox-i18n-15.0/be.xpi) = 847b04a2dd75175a973a8652073825a11a15cef99800bb6f61d1607eaedec0ff -SIZE (xpi/firefox-i18n-15.0/be.xpi) = 271387 -SHA256 (xpi/firefox-i18n-15.0/bg.xpi) = 76ce8f9da1900639e6dff04657e303051ba62471a23b47ee7cd171ae5e95ee14 -SIZE (xpi/firefox-i18n-15.0/bg.xpi) = 312374 -SHA256 (xpi/firefox-i18n-15.0/bn-BD.xpi) = 2ad67707b0c9142e24af31ec0acc499dd20dabd04be785254f07e0f4d71458ec -SIZE (xpi/firefox-i18n-15.0/bn-BD.xpi) = 320571 -SHA256 (xpi/firefox-i18n-15.0/bn-IN.xpi) = fac3ee43a5bc5626a6e007145ebf297bdb8f6145d0a3dc52789c31f9772cbb51 -SIZE (xpi/firefox-i18n-15.0/bn-IN.xpi) = 350006 -SHA256 (xpi/firefox-i18n-15.0/br.xpi) = 07b9b3a48729fa17eac03be23966e926ed053ddd39448f05401f829480df37d1 -SIZE (xpi/firefox-i18n-15.0/br.xpi) = 278805 -SHA256 (xpi/firefox-i18n-15.0/bs.xpi) = eb41f19008a33691453cf7a06624939fd1b6298bbec07442bde5166b0bafec5e -SIZE (xpi/firefox-i18n-15.0/bs.xpi) = 274155 -SHA256 (xpi/firefox-i18n-15.0/ca.xpi) = 5f75ac8d4892a6ab163ac4b48ae1879ceee649f022af8e56ea7b80783402e404 -SIZE (xpi/firefox-i18n-15.0/ca.xpi) = 279475 -SHA256 (xpi/firefox-i18n-15.0/cs.xpi) = b3f286af68a015f3e7a03fff6427a343f4a180f419fcd9fb954cac0f8ac4427a -SIZE (xpi/firefox-i18n-15.0/cs.xpi) = 279346 -SHA256 (xpi/firefox-i18n-15.0/cy.xpi) = 07c232dd8e9adec929eae71b40456686d8019a3c06885e5dc34f32ebef79a3d7 -SIZE (xpi/firefox-i18n-15.0/cy.xpi) = 272154 -SHA256 (xpi/firefox-i18n-15.0/da.xpi) = 118ac7adfc78ca577ae11061b57bd9b11046a8032e0088e74452f5b18c163fd5 -SIZE (xpi/firefox-i18n-15.0/da.xpi) = 269301 -SHA256 (xpi/firefox-i18n-15.0/de.xpi) = 5b6dfaf2a7d05058b998368af9b98af31db99e4f5add674a8be178047dd11730 -SIZE (xpi/firefox-i18n-15.0/de.xpi) = 263532 -SHA256 (xpi/firefox-i18n-15.0/el.xpi) = 32adb07d6c21c5838426c387c5368df94728d574405e31c3fc9ebaf5687613d2 -SIZE (xpi/firefox-i18n-15.0/el.xpi) = 293558 -SHA256 (xpi/firefox-i18n-15.0/en-GB.xpi) = f5928a0970583c1a2275f4fa8b8ef05f8535ec758131fb65ed83bcc881c41b39 -SIZE (xpi/firefox-i18n-15.0/en-GB.xpi) = 260757 -SHA256 (xpi/firefox-i18n-15.0/en-US.xpi) = 8bbcd41e3cba30bc893f54d179aa029c1f896570428a5b0ba1327c85699d9c2a -SIZE (xpi/firefox-i18n-15.0/en-US.xpi) = 260389 -SHA256 (xpi/firefox-i18n-15.0/en-ZA.xpi) = 4977df2c679495a5790584e0f80598196c838517a1ecbd27ee5aca3373262212 -SIZE (xpi/firefox-i18n-15.0/en-ZA.xpi) = 260075 -SHA256 (xpi/firefox-i18n-15.0/eo.xpi) = d1d25cb7a5692a60c84ddaefc898478455b6f8d6002f3da3e1d3d42e4a8b616e -SIZE (xpi/firefox-i18n-15.0/eo.xpi) = 271982 -SHA256 (xpi/firefox-i18n-15.0/es-AR.xpi) = f9ebfe1beea8bd3a92dc3716d8a576ff16f6bcaca08f6e2cd8534a47766208c5 -SIZE (xpi/firefox-i18n-15.0/es-AR.xpi) = 279497 -SHA256 (xpi/firefox-i18n-15.0/es-CL.xpi) = 29d82deff1f55d022c1562205a455a6d121d03af17ece8ed4c963b077d527993 -SIZE (xpi/firefox-i18n-15.0/es-CL.xpi) = 277437 -SHA256 (xpi/firefox-i18n-15.0/es-ES.xpi) = d7a422adb57f77902cfa55e0c20950485132fa4edc81739103a16193488ce2cf -SIZE (xpi/firefox-i18n-15.0/es-ES.xpi) = 234446 -SHA256 (xpi/firefox-i18n-15.0/es-MX.xpi) = 3e05023317db994928fbc1ba7e1e480b8a97749d82e6dd7858126cef289cd55d -SIZE (xpi/firefox-i18n-15.0/es-MX.xpi) = 232425 -SHA256 (xpi/firefox-i18n-15.0/et.xpi) = 6e2c92d76d3ea2393ee3033130346680385c2a4a87a1a4bf6a8b88c356e2598e -SIZE (xpi/firefox-i18n-15.0/et.xpi) = 272453 -SHA256 (xpi/firefox-i18n-15.0/eu.xpi) = 24c14b8ce944341d05de68bfca908eb910ef11acdacb31b95173283b3d1bfc26 -SIZE (xpi/firefox-i18n-15.0/eu.xpi) = 270788 -SHA256 (xpi/firefox-i18n-15.0/fa.xpi) = 1a749c2e27d12147516db9762f90f0f4bbf047a99b57757ff2081775c2c69dbd -SIZE (xpi/firefox-i18n-15.0/fa.xpi) = 304776 -SHA256 (xpi/firefox-i18n-15.0/fi.xpi) = 14d4d2428ee176bfd3fb1a627d92b2e1d9dded64c0623fa0f88d4f6edca2c389 -SIZE (xpi/firefox-i18n-15.0/fi.xpi) = 275690 -SHA256 (xpi/firefox-i18n-15.0/fr.xpi) = d0bb872b694f997086382c6560b7544017b1ec88cfc17b82712a582a024941eb -SIZE (xpi/firefox-i18n-15.0/fr.xpi) = 273755 -SHA256 (xpi/firefox-i18n-15.0/fy-NL.xpi) = b3361d44941a2af8d8c8c2568a073a46cd68611308774b6cb0bdff25f75ce276 -SIZE (xpi/firefox-i18n-15.0/fy-NL.xpi) = 275749 -SHA256 (xpi/firefox-i18n-15.0/ga-IE.xpi) = 0071504387a1cdb674b6fcfadea242c235e7766f1ace655cf149850b49c21ef5 -SIZE (xpi/firefox-i18n-15.0/ga-IE.xpi) = 284178 -SHA256 (xpi/firefox-i18n-15.0/gl.xpi) = e705b005c254f402edf5d78cd79218a7ef50cddbcee4c19fc1cb2267bc082429 -SIZE (xpi/firefox-i18n-15.0/gl.xpi) = 272638 -SHA256 (xpi/firefox-i18n-15.0/gu-IN.xpi) = 4698cb094012203be33401882a3b0be00333d7e3a249776430d437e324e90cd6 -SIZE (xpi/firefox-i18n-15.0/gu-IN.xpi) = 302332 -SHA256 (xpi/firefox-i18n-15.0/he.xpi) = 8b2f077b75a151dfe1e4e18243e902f45f7274710f42a86635a504aea252267e -SIZE (xpi/firefox-i18n-15.0/he.xpi) = 287912 -SHA256 (xpi/firefox-i18n-15.0/hi-IN.xpi) = 9be991de32d97ccf1a1bdfe5de593a227843a45947c2327c2700593b4d955dab -SIZE (xpi/firefox-i18n-15.0/hi-IN.xpi) = 316191 -SHA256 (xpi/firefox-i18n-15.0/hr.xpi) = 731b18fab3ee56a80c67de25fcc5b1c158106fa701f1ae8557bdfc2f23e2818d -SIZE (xpi/firefox-i18n-15.0/hr.xpi) = 274796 -SHA256 (xpi/firefox-i18n-15.0/hu.xpi) = 5a07af7337e0cc39d603ff13491526e5dae703ed994cf80e894692dbe4572b16 -SIZE (xpi/firefox-i18n-15.0/hu.xpi) = 288899 -SHA256 (xpi/firefox-i18n-15.0/hy-AM.xpi) = 69444dccdddd15b4d13e8406e328b0bcd6a1f324591a21533f65d2e93edc7076 -SIZE (xpi/firefox-i18n-15.0/hy-AM.xpi) = 315709 -SHA256 (xpi/firefox-i18n-15.0/id.xpi) = f6149f31e0da844138cd0b442ac80ae2c25080280857727707633721d5a5a8c3 -SIZE (xpi/firefox-i18n-15.0/id.xpi) = 264725 -SHA256 (xpi/firefox-i18n-15.0/is.xpi) = a268e1677b805495dd17dc0f4a379a528f053899a8e1ae6752f176f4502d4fb3 -SIZE (xpi/firefox-i18n-15.0/is.xpi) = 274360 -SHA256 (xpi/firefox-i18n-15.0/it.xpi) = 423ff0e1b179fa784f5f6c021afcd288fb1967e80afb237edb46f4b83476c03d -SIZE (xpi/firefox-i18n-15.0/it.xpi) = 230878 -SHA256 (xpi/firefox-i18n-15.0/ja.xpi) = 706a9c2c0e7ad3210d5a67aca045a92b96d68a17c49a5be32fc1b78712cf16d6 -SIZE (xpi/firefox-i18n-15.0/ja.xpi) = 307017 -SHA256 (xpi/firefox-i18n-15.0/kk.xpi) = a6bfa40df8cadd1189ebed54c13513d22c3b436145f1327ab41f06c8277abb70 -SIZE (xpi/firefox-i18n-15.0/kk.xpi) = 314270 -SHA256 (xpi/firefox-i18n-15.0/kn.xpi) = 63e78103ad637ddef173d289a10866780a389f3c8bdeb4059c25998ae02acf27 -SIZE (xpi/firefox-i18n-15.0/kn.xpi) = 334104 -SHA256 (xpi/firefox-i18n-15.0/ko.xpi) = 38788f1564c82d77dc4062751da786be378cc1bca5f001b8620f93a48b274f22 -SIZE (xpi/firefox-i18n-15.0/ko.xpi) = 257655 -SHA256 (xpi/firefox-i18n-15.0/ku.xpi) = 2acc089512b9dedb8d1590eba19c41b65464b50baac65efa48ae8cb3bddf8915 -SIZE (xpi/firefox-i18n-15.0/ku.xpi) = 285701 -SHA256 (xpi/firefox-i18n-15.0/lg.xpi) = 9d215be0b7008af9648127e80ccee8cd7e26c29a688ae69b54df2d5d14275329 -SIZE (xpi/firefox-i18n-15.0/lg.xpi) = 278168 -SHA256 (xpi/firefox-i18n-15.0/lt.xpi) = d90d89925002a5a903c79d807033b915628be9cc761a85d1419c3e298559ef50 -SIZE (xpi/firefox-i18n-15.0/lt.xpi) = 337513 -SHA256 (xpi/firefox-i18n-15.0/lv.xpi) = 34c75aad84fc41fe8629857e551cce92281d9e3f54774fe89bc42e6e49f401eb -SIZE (xpi/firefox-i18n-15.0/lv.xpi) = 272061 -SHA256 (xpi/firefox-i18n-15.0/mai.xpi) = 142ed2f6fbb7be5d3e0022b7a6bfb19fa520855bb03e4dbf6efbe1666b1bfb7c -SIZE (xpi/firefox-i18n-15.0/mai.xpi) = 314156 -SHA256 (xpi/firefox-i18n-15.0/mk.xpi) = 61d78e89cc95a64e5da914d8e7135208e548551dd546fba675ffabe167099b35 -SIZE (xpi/firefox-i18n-15.0/mk.xpi) = 303390 -SHA256 (xpi/firefox-i18n-15.0/ml.xpi) = 5e5b32d5eada414dc38d063a1ef9ce4e5f03c5d5964112a8e18df06f2050141b -SIZE (xpi/firefox-i18n-15.0/ml.xpi) = 345461 -SHA256 (xpi/firefox-i18n-15.0/mr.xpi) = 1a7a0639e57a493b68705c88f4d6718acd744d0b2a6bc5e9c5c71bb8d3bb3cdf -SIZE (xpi/firefox-i18n-15.0/mr.xpi) = 313721 -SHA256 (xpi/firefox-i18n-15.0/nb-NO.xpi) = fe1ae00e0d6e26fce2100037c5c0b44f91fc5d2299cf5194544ebdc519127704 -SIZE (xpi/firefox-i18n-15.0/nb-NO.xpi) = 272400 -SHA256 (xpi/firefox-i18n-15.0/nl.xpi) = 5eb1e697ee5b4d36c897f14b11ef9610ed556cc0a2a08a201230165bc871c97c -SIZE (xpi/firefox-i18n-15.0/nl.xpi) = 275340 -SHA256 (xpi/firefox-i18n-15.0/nn-NO.xpi) = 06e2c38e37cba58a984d09a5bb8d6931dddec327cccfd40aaa7c640f372590a1 -SIZE (xpi/firefox-i18n-15.0/nn-NO.xpi) = 272502 -SHA256 (xpi/firefox-i18n-15.0/nso.xpi) = bf01a4f974806d4be469fe30e688a1f9d2808b0a6b36eded9a73cd18d56ec521 -SIZE (xpi/firefox-i18n-15.0/nso.xpi) = 275794 -SHA256 (xpi/firefox-i18n-15.0/or.xpi) = bc727af88c8733291e248ac3b0aba3758f38a3cf281dcfd86798293de582d387 -SIZE (xpi/firefox-i18n-15.0/or.xpi) = 311896 -SHA256 (xpi/firefox-i18n-15.0/pa-IN.xpi) = 720f76de172ab43617e0c454b6d793228a029a024277a0463ccff30be208fae6 -SIZE (xpi/firefox-i18n-15.0/pa-IN.xpi) = 305967 -SHA256 (xpi/firefox-i18n-15.0/pl.xpi) = 9b95af8da8c79c7c6ae334ef219643a2b572be8808b6c7e5c9ffed3e69d4d634 -SIZE (xpi/firefox-i18n-15.0/pl.xpi) = 282657 -SHA256 (xpi/firefox-i18n-15.0/pt-BR.xpi) = 6272ea3f8f23fd9a1a0a0e9439a1948bfcb98c756048558ff557f3fe67333fca -SIZE (xpi/firefox-i18n-15.0/pt-BR.xpi) = 276744 -SHA256 (xpi/firefox-i18n-15.0/pt-PT.xpi) = 462ca33db37cf77afede97afc2d0d065dbed208964ba6aeed639ccf1dd1cba12 -SIZE (xpi/firefox-i18n-15.0/pt-PT.xpi) = 276975 -SHA256 (xpi/firefox-i18n-15.0/rm.xpi) = a829e2a58f081ac947c62ea86d3f3cad3058dd2154c4b292c157c01a4239ec1b -SIZE (xpi/firefox-i18n-15.0/rm.xpi) = 274235 -SHA256 (xpi/firefox-i18n-15.0/ro.xpi) = 274202fc3350e1e40b431ba6a5ee3d8888ade5b6ab7de6fc6d6bd3bb36db93b4 -SIZE (xpi/firefox-i18n-15.0/ro.xpi) = 295295 -SHA256 (xpi/firefox-i18n-15.0/ru.xpi) = e16ab330c45f477952f9ab33098d655448441614c4c08323743d11970085f84f -SIZE (xpi/firefox-i18n-15.0/ru.xpi) = 275714 -SHA256 (xpi/firefox-i18n-15.0/si.xpi) = e6c78f69f7a8f1c9d2e22996f5de748055941dd9c76e075deac9c99bf2715d3e -SIZE (xpi/firefox-i18n-15.0/si.xpi) = 304018 -SHA256 (xpi/firefox-i18n-15.0/sk.xpi) = b5ea6a315397e6ee78f04f194600c4797321f99924667320f091f322538f1a7d -SIZE (xpi/firefox-i18n-15.0/sk.xpi) = 289319 -SHA256 (xpi/firefox-i18n-15.0/sl.xpi) = bb5a4b36e1b8dba9302576d97d46625b62ce2f6a809ddd5fcbdb7f23c97c3fd3 -SIZE (xpi/firefox-i18n-15.0/sl.xpi) = 272803 -SHA256 (xpi/firefox-i18n-15.0/son.xpi) = fc4a54f48dc0cfe3da1a2b6cb6162862a2a39cbf25538a2b00bfe9cf9dcd9294 -SIZE (xpi/firefox-i18n-15.0/son.xpi) = 270399 -SHA256 (xpi/firefox-i18n-15.0/sq.xpi) = 66b7f93c5d86a45019512d9337a4e6266a921514e4c27b41d22eaba6ab09d096 -SIZE (xpi/firefox-i18n-15.0/sq.xpi) = 257659 -SHA256 (xpi/firefox-i18n-15.0/sr.xpi) = 3ed94bd243bcb80b9bfada7c0482f24d0317b3bd5aaed78ba36abad89fe32b1c -SIZE (xpi/firefox-i18n-15.0/sr.xpi) = 314228 -SHA256 (xpi/firefox-i18n-15.0/sv-SE.xpi) = 68f04c0f72f09ee07061fc66f568cfa633dc50d226375dcc613dc94358645e39 -SIZE (xpi/firefox-i18n-15.0/sv-SE.xpi) = 276161 -SHA256 (xpi/firefox-i18n-15.0/ta-LK.xpi) = 4b2ea175c21fe803dba076dd1321d35ac4d0c9eef5f2f2bd4a28a01b03e2ddcc -SIZE (xpi/firefox-i18n-15.0/ta-LK.xpi) = 323324 -SHA256 (xpi/firefox-i18n-15.0/ta.xpi) = 2f72f4fee2f2318150d8092540ef3e0c47e7a2385522cd231006952ede5e4a41 -SIZE (xpi/firefox-i18n-15.0/ta.xpi) = 306300 -SHA256 (xpi/firefox-i18n-15.0/te.xpi) = e7b877324a23ac540e532d0cb498694c43fe2293e3f92228822c73b90650cfce -SIZE (xpi/firefox-i18n-15.0/te.xpi) = 321389 -SHA256 (xpi/firefox-i18n-15.0/th.xpi) = fc4b46304e9914089eb4a9fd1404c561c50309bbb90e21101f385070fd5583d4 -SIZE (xpi/firefox-i18n-15.0/th.xpi) = 303853 -SHA256 (xpi/firefox-i18n-15.0/tr.xpi) = d5631e2984553fe083723f4150afd717d1ac5f04d9eb0b3ffbb0ccc3a3d2c0d8 -SIZE (xpi/firefox-i18n-15.0/tr.xpi) = 281933 -SHA256 (xpi/firefox-i18n-15.0/uk.xpi) = 7307bb5d1821532162a5cb653e7a1a35f8de19743095605d055d793a98b4873a -SIZE (xpi/firefox-i18n-15.0/uk.xpi) = 311424 -SHA256 (xpi/firefox-i18n-15.0/vi.xpi) = 558176761a2875ce32ce402ebb27d334de7ed8ce6d0c574ccf9c5e19dc4193de -SIZE (xpi/firefox-i18n-15.0/vi.xpi) = 294951 -SHA256 (xpi/firefox-i18n-15.0/zh-CN.xpi) = 60e89d4f62d49e24e4657d3a9c506ee7ce47bdce2eca2cfe5e6189f826f13249 -SIZE (xpi/firefox-i18n-15.0/zh-CN.xpi) = 290961 -SHA256 (xpi/firefox-i18n-15.0/zh-TW.xpi) = a0eb597407065ffd8b9b58d2573dc8f42fa681cbb30341333ced416c49fb753e -SIZE (xpi/firefox-i18n-15.0/zh-TW.xpi) = 291946 -SHA256 (xpi/firefox-i18n-15.0/zu.xpi) = 22541e44eca9cf2c5fa258b8a76d9cbcb9c6f0c032e13414e946af3fbf7925ba -SIZE (xpi/firefox-i18n-15.0/zu.xpi) = 277289 +SHA256 (xpi/firefox-i18n-15.0.1/af.xpi) = bbd465ca09b058af6578f4e69f6f402fafc6cbffeca3715584a89d4303a5736a +SIZE (xpi/firefox-i18n-15.0.1/af.xpi) = 268864 +SHA256 (xpi/firefox-i18n-15.0.1/ak.xpi) = 5973ba7e56592a4af61efbaa1cf74a0530d15efcd8b8b42c5e6b4dd417028418 +SIZE (xpi/firefox-i18n-15.0.1/ak.xpi) = 271020 +SHA256 (xpi/firefox-i18n-15.0.1/ar.xpi) = 5ea59cc631c2953d918883a28556c558584940c4c0266d7cb16a25311aa75d58 +SIZE (xpi/firefox-i18n-15.0.1/ar.xpi) = 298351 +SHA256 (xpi/firefox-i18n-15.0.1/ast.xpi) = d34092b157bcac840afabb5e5a90ac5941be4d750ea7380a112fb42ff7d1f53e +SIZE (xpi/firefox-i18n-15.0.1/ast.xpi) = 248048 +SHA256 (xpi/firefox-i18n-15.0.1/be.xpi) = 982dd4969aaffbae8ccc4b69b4a3d3d8c475df10581f4f79d95f6a7c7f0cc41c +SIZE (xpi/firefox-i18n-15.0.1/be.xpi) = 271388 +SHA256 (xpi/firefox-i18n-15.0.1/bg.xpi) = 3e227ed4ec5f033fa5aedf801033679da7d651ce81e11d9918bf6010695b51f5 +SIZE (xpi/firefox-i18n-15.0.1/bg.xpi) = 312375 +SHA256 (xpi/firefox-i18n-15.0.1/bn-BD.xpi) = bcc11bad1193efc3e8eefe4a8159ce1198384f4b4b74711995f38c1c7d951f4a +SIZE (xpi/firefox-i18n-15.0.1/bn-BD.xpi) = 320571 +SHA256 (xpi/firefox-i18n-15.0.1/bn-IN.xpi) = 9801664c82452fcde5cd5eda172cdd41e6b41b051e9ed8a4c7b76ea615ea29f3 +SIZE (xpi/firefox-i18n-15.0.1/bn-IN.xpi) = 350007 +SHA256 (xpi/firefox-i18n-15.0.1/br.xpi) = 37a2ac25bc77ef5e78492d070a801960b9765b43812bd4786443ceb7f784eaef +SIZE (xpi/firefox-i18n-15.0.1/br.xpi) = 278805 +SHA256 (xpi/firefox-i18n-15.0.1/bs.xpi) = 2faf7bba10ed9b72af229c333f1c43ed9a22f1001f74a5bfa2c535a8c29b288d +SIZE (xpi/firefox-i18n-15.0.1/bs.xpi) = 274156 +SHA256 (xpi/firefox-i18n-15.0.1/ca.xpi) = 05c4bfbfd444c7f4a6b2dc4173481c02044ca91225e0c4849ecbda8548d8c821 +SIZE (xpi/firefox-i18n-15.0.1/ca.xpi) = 279477 +SHA256 (xpi/firefox-i18n-15.0.1/cs.xpi) = 0d81da0d8f8fd334fbef7077d324346ebd00e38fe84ae970648303a5adfefcfb +SIZE (xpi/firefox-i18n-15.0.1/cs.xpi) = 279346 +SHA256 (xpi/firefox-i18n-15.0.1/cy.xpi) = a92e9776dfc4e484799e749618a259ea4a35e4acb7a5280cd479aec567226f4e +SIZE (xpi/firefox-i18n-15.0.1/cy.xpi) = 272154 +SHA256 (xpi/firefox-i18n-15.0.1/da.xpi) = 6438e1f4ab2a7d881e22e078be114e7ee13cec10f144cb8d2f046b64ad6ffdac +SIZE (xpi/firefox-i18n-15.0.1/da.xpi) = 269302 +SHA256 (xpi/firefox-i18n-15.0.1/de.xpi) = af29cdfb59d73a59f5a4d7a0c60d185c62a116ea4977794a26614d58437fe91f +SIZE (xpi/firefox-i18n-15.0.1/de.xpi) = 263532 +SHA256 (xpi/firefox-i18n-15.0.1/el.xpi) = 60e314d42c6449b6b9515a2a10cc32f9a1901439848d3d06d51bd1024941f8f9 +SIZE (xpi/firefox-i18n-15.0.1/el.xpi) = 293559 +SHA256 (xpi/firefox-i18n-15.0.1/en-GB.xpi) = e6a487f80ec886040c69010fa6a81c34c0d03589d92bed3512c6af311de8c8dd +SIZE (xpi/firefox-i18n-15.0.1/en-GB.xpi) = 260758 +SHA256 (xpi/firefox-i18n-15.0.1/en-US.xpi) = 2d5ae5b1f0dbaee322a02ee3f1a069e19a6edc13ce5cdf72b3ae1604f17455ca +SIZE (xpi/firefox-i18n-15.0.1/en-US.xpi) = 260389 +SHA256 (xpi/firefox-i18n-15.0.1/en-ZA.xpi) = 86286a9e70bdfff9dce5e3affce95d664ec4fe81cb921df3d5456518d6583093 +SIZE (xpi/firefox-i18n-15.0.1/en-ZA.xpi) = 260075 +SHA256 (xpi/firefox-i18n-15.0.1/eo.xpi) = 75ace121f5bb559d9ac636c8dc2640a59d8484d4b254503181e3fa7c9d44720d +SIZE (xpi/firefox-i18n-15.0.1/eo.xpi) = 271983 +SHA256 (xpi/firefox-i18n-15.0.1/es-AR.xpi) = af01d5a5950e9aecdca6eff67219b08d7f78e58d521a960b346c883cd58373ab +SIZE (xpi/firefox-i18n-15.0.1/es-AR.xpi) = 279497 +SHA256 (xpi/firefox-i18n-15.0.1/es-CL.xpi) = 9fa93867c3053d0355f2b3326c86a1e472f004c2e4b02e709bad442f103154af +SIZE (xpi/firefox-i18n-15.0.1/es-CL.xpi) = 277438 +SHA256 (xpi/firefox-i18n-15.0.1/es-ES.xpi) = ff1e0ebc5df2cd4d66eb8ee548a794b03b2b448edfb0b47250a791c2dbc972f5 +SIZE (xpi/firefox-i18n-15.0.1/es-ES.xpi) = 234447 +SHA256 (xpi/firefox-i18n-15.0.1/es-MX.xpi) = 95cb41a02f456970a32296a6ee8977eaf069c996e98097d3eb1f19dd9f72f524 +SIZE (xpi/firefox-i18n-15.0.1/es-MX.xpi) = 232426 +SHA256 (xpi/firefox-i18n-15.0.1/et.xpi) = 5eafb33780f2fb469b3374a8efabaa363bdc28337daba95e1525dd40050a6d73 +SIZE (xpi/firefox-i18n-15.0.1/et.xpi) = 272454 +SHA256 (xpi/firefox-i18n-15.0.1/eu.xpi) = b6e07ba910ba15466bbe0fa99a276a8bbcdc4131670b9f6867d9a61a56259fda +SIZE (xpi/firefox-i18n-15.0.1/eu.xpi) = 270789 +SHA256 (xpi/firefox-i18n-15.0.1/fa.xpi) = 71f7833a228c14d00ab13cee1d91a09a09ec24aedb1a8acf6229b8d80348d2a1 +SIZE (xpi/firefox-i18n-15.0.1/fa.xpi) = 304777 +SHA256 (xpi/firefox-i18n-15.0.1/fi.xpi) = edc3eda8aa9b659168fb65f3e181d344b0db902cf06657d36fd899742ef9b700 +SIZE (xpi/firefox-i18n-15.0.1/fi.xpi) = 275691 +SHA256 (xpi/firefox-i18n-15.0.1/fr.xpi) = c187106ad86d8040f5c3d0c3636c301e1e9c6ad1b942b80c5cf82b9e206f97f1 +SIZE (xpi/firefox-i18n-15.0.1/fr.xpi) = 273755 +SHA256 (xpi/firefox-i18n-15.0.1/fy-NL.xpi) = 91f9d3a9b06cbcec76ffd7471cce7c919b09cfd0d1817481c36dfc709ec87a58 +SIZE (xpi/firefox-i18n-15.0.1/fy-NL.xpi) = 275753 +SHA256 (xpi/firefox-i18n-15.0.1/ga-IE.xpi) = 60377c95117cab68a6cdf53f43df43e604eb16bae5b8eab6debb5c57e1002d47 +SIZE (xpi/firefox-i18n-15.0.1/ga-IE.xpi) = 284178 +SHA256 (xpi/firefox-i18n-15.0.1/gl.xpi) = f80c6ab81095dcf2acf5751bc6029eaf9d62fddaea7d7ef300c3b76207abb5f6 +SIZE (xpi/firefox-i18n-15.0.1/gl.xpi) = 272640 +SHA256 (xpi/firefox-i18n-15.0.1/gu-IN.xpi) = 5c7c98784f00a5ffbb01ca6641435c4f725af35d9b85fe5997bb47357ebec60c +SIZE (xpi/firefox-i18n-15.0.1/gu-IN.xpi) = 302336 +SHA256 (xpi/firefox-i18n-15.0.1/he.xpi) = 9b7c53c2418de3e4470d1d14f087606dc1d5d79ddc419ed255fcc485f7be66f3 +SIZE (xpi/firefox-i18n-15.0.1/he.xpi) = 287915 +SHA256 (xpi/firefox-i18n-15.0.1/hi-IN.xpi) = 429cfdb8dc09ce6f243a5dea881d52fc7ae22c08ebe5201201429280c3a15417 +SIZE (xpi/firefox-i18n-15.0.1/hi-IN.xpi) = 316192 +SHA256 (xpi/firefox-i18n-15.0.1/hr.xpi) = 329f725ab912697a0d4182cfd0c8c0735003aea503a8d2ffacc8f33bdbc4470f +SIZE (xpi/firefox-i18n-15.0.1/hr.xpi) = 274797 +SHA256 (xpi/firefox-i18n-15.0.1/hu.xpi) = 82c7bb85bb7d0b3de004f28b1a2215517742554c0e120d0f83a944c101731385 +SIZE (xpi/firefox-i18n-15.0.1/hu.xpi) = 288899 +SHA256 (xpi/firefox-i18n-15.0.1/hy-AM.xpi) = 0e7e58afc169b7a6e9ff4c088d580e20f33c7323ea87d787c5924a2f9c0c72d0 +SIZE (xpi/firefox-i18n-15.0.1/hy-AM.xpi) = 315710 +SHA256 (xpi/firefox-i18n-15.0.1/id.xpi) = 694a39878d7e8f5d9bd4ccf134001095e4c4906a67c867dee2a586a72d72ce53 +SIZE (xpi/firefox-i18n-15.0.1/id.xpi) = 264725 +SHA256 (xpi/firefox-i18n-15.0.1/is.xpi) = 517b0ab54a54a36f16ce97fbdd47342794203d1e5df016264803a0406a8e6d50 +SIZE (xpi/firefox-i18n-15.0.1/is.xpi) = 274360 +SHA256 (xpi/firefox-i18n-15.0.1/it.xpi) = 6b6fce65b0ebcbfbb58897d27be038e3d0a6e293346222aba341dc3962a13577 +SIZE (xpi/firefox-i18n-15.0.1/it.xpi) = 230878 +SHA256 (xpi/firefox-i18n-15.0.1/ja.xpi) = 64b9097e8f606a5229f56a0abfc3093aabe2a2cb18f50dbe4863c3fada100550 +SIZE (xpi/firefox-i18n-15.0.1/ja.xpi) = 307018 +SHA256 (xpi/firefox-i18n-15.0.1/kk.xpi) = c5023af435987c995b082226d470b6cad05510eee063f0858b5fab6b8fc13ecb +SIZE (xpi/firefox-i18n-15.0.1/kk.xpi) = 314274 +SHA256 (xpi/firefox-i18n-15.0.1/kn.xpi) = 56cac3ea6676d4b42a12bc70076e822b70c65a94309ba3fc6d9939aeacffc992 +SIZE (xpi/firefox-i18n-15.0.1/kn.xpi) = 334105 +SHA256 (xpi/firefox-i18n-15.0.1/ko.xpi) = 628e1077e86cdbfca7a99405e5c6363afd546a11e162b41bf3aa2822dcd5a69a +SIZE (xpi/firefox-i18n-15.0.1/ko.xpi) = 257656 +SHA256 (xpi/firefox-i18n-15.0.1/ku.xpi) = bcfafa0400434015347fe48da27aa2a11a62ff1e6ed8600886f8a42c6e9b5db4 +SIZE (xpi/firefox-i18n-15.0.1/ku.xpi) = 285701 +SHA256 (xpi/firefox-i18n-15.0.1/lg.xpi) = 74e1d6f16e142c670c6ca028269bb6f98aad2d75e36885f9dc1f7fd4a03ba189 +SIZE (xpi/firefox-i18n-15.0.1/lg.xpi) = 278168 +SHA256 (xpi/firefox-i18n-15.0.1/lt.xpi) = 3c3fdc8191264583f164c9ba61f406bc3991d3cd968407ca2cdd3e4ba392aed0 +SIZE (xpi/firefox-i18n-15.0.1/lt.xpi) = 337513 +SHA256 (xpi/firefox-i18n-15.0.1/lv.xpi) = 07a01a95c5c40ee8bcb2804851cb9d529669e877a7d9d646af039edcbd3a55bf +SIZE (xpi/firefox-i18n-15.0.1/lv.xpi) = 272061 +SHA256 (xpi/firefox-i18n-15.0.1/mai.xpi) = 58e02afe8a9144a74606249928c840294ec3a1d04fe1e2c11e3992534359370c +SIZE (xpi/firefox-i18n-15.0.1/mai.xpi) = 314156 +SHA256 (xpi/firefox-i18n-15.0.1/mk.xpi) = d5495ebf8b5abd09dd00a740fb2af106150ff3c65cc772b03790e28c770fab1b +SIZE (xpi/firefox-i18n-15.0.1/mk.xpi) = 303390 +SHA256 (xpi/firefox-i18n-15.0.1/ml.xpi) = 725c4bac0c4afe8350ce051a6511fc606ea0de3b58f4d21adca4fcfd2fdaca2e +SIZE (xpi/firefox-i18n-15.0.1/ml.xpi) = 345460 +SHA256 (xpi/firefox-i18n-15.0.1/mr.xpi) = ebad2e9d8092562c0eef057940e63dd7b057a6d05c2455b9bfcbf9b770966957 +SIZE (xpi/firefox-i18n-15.0.1/mr.xpi) = 313722 +SHA256 (xpi/firefox-i18n-15.0.1/nb-NO.xpi) = 5897670d37659be8bec111397269a9438feea6a1d7386ca340b46e411ea53569 +SIZE (xpi/firefox-i18n-15.0.1/nb-NO.xpi) = 272400 +SHA256 (xpi/firefox-i18n-15.0.1/nl.xpi) = af592804b073bb3dd8704cf64314e9679ff003345f97138b9a6113775eaa85de +SIZE (xpi/firefox-i18n-15.0.1/nl.xpi) = 275340 +SHA256 (xpi/firefox-i18n-15.0.1/nn-NO.xpi) = 391696b232f3177619cec89ad71f3ff0442fc79558dace0f293e471e991c1416 +SIZE (xpi/firefox-i18n-15.0.1/nn-NO.xpi) = 272503 +SHA256 (xpi/firefox-i18n-15.0.1/nso.xpi) = 0605e771be2aa99dae245e4f05df079098bb25b6bd6241c7c2065daee7d79837 +SIZE (xpi/firefox-i18n-15.0.1/nso.xpi) = 275795 +SHA256 (xpi/firefox-i18n-15.0.1/or.xpi) = 128301e7fcc396e16c58df8985adaea7a2e43cbd3c66791a45252a8dfeb77f99 +SIZE (xpi/firefox-i18n-15.0.1/or.xpi) = 311896 +SHA256 (xpi/firefox-i18n-15.0.1/pa-IN.xpi) = 2da5c4b08afd2727c98edb687337bb710c2ad59dc00d029a298a37d01824db7a +SIZE (xpi/firefox-i18n-15.0.1/pa-IN.xpi) = 305968 +SHA256 (xpi/firefox-i18n-15.0.1/pl.xpi) = 29f1553538ae41103fad4d5c4dd03644e1c46adc4038aef1380ad045df270a52 +SIZE (xpi/firefox-i18n-15.0.1/pl.xpi) = 282657 +SHA256 (xpi/firefox-i18n-15.0.1/pt-BR.xpi) = 2587fd18d8032811669a0a82b0a471bd80cdf8ab40cae8a25f4d4d0a84234246 +SIZE (xpi/firefox-i18n-15.0.1/pt-BR.xpi) = 276745 +SHA256 (xpi/firefox-i18n-15.0.1/pt-PT.xpi) = e090ae93a1193b5c7d32292479b5a9ac0a59a3440c81907836c1ccd6ada6a0df +SIZE (xpi/firefox-i18n-15.0.1/pt-PT.xpi) = 276975 +SHA256 (xpi/firefox-i18n-15.0.1/rm.xpi) = d6b3007e4c27fe266b98134bcdae3e4b2fe35da98378ab9197c611a6065cdffc +SIZE (xpi/firefox-i18n-15.0.1/rm.xpi) = 274237 +SHA256 (xpi/firefox-i18n-15.0.1/ro.xpi) = e7f8c39750a235b3f9068dca36114b4097275866fc6598037f5b6e7c95808838 +SIZE (xpi/firefox-i18n-15.0.1/ro.xpi) = 295295 +SHA256 (xpi/firefox-i18n-15.0.1/ru.xpi) = ee7e1709039b4cc7baeada0b230caeb60813a11cd73c13b787876a0753425c8d +SIZE (xpi/firefox-i18n-15.0.1/ru.xpi) = 275713 +SHA256 (xpi/firefox-i18n-15.0.1/si.xpi) = 854aedfbb45ec2fcad8d6ac68ef739bb313f7e9fbd5a36bc849ad58c62058fcc +SIZE (xpi/firefox-i18n-15.0.1/si.xpi) = 304019 +SHA256 (xpi/firefox-i18n-15.0.1/sk.xpi) = 19dd573580e732b3c00aa70826954731b38501eb5185612e4feccfbe2492fffa +SIZE (xpi/firefox-i18n-15.0.1/sk.xpi) = 289319 +SHA256 (xpi/firefox-i18n-15.0.1/sl.xpi) = 53545bed270d1bd406f784ebab2d03be79d1cf389929ad8a7d2357556dfee267 +SIZE (xpi/firefox-i18n-15.0.1/sl.xpi) = 272803 +SHA256 (xpi/firefox-i18n-15.0.1/son.xpi) = 81877c6d98482d8be5cd976dbbf42795fd9478c90a8d53112d45e85463546dbd +SIZE (xpi/firefox-i18n-15.0.1/son.xpi) = 270403 +SHA256 (xpi/firefox-i18n-15.0.1/sq.xpi) = b7bd196dcb04aefd25512a2da99c78d3de631ffc8f086e7c47dd4782d8b76580 +SIZE (xpi/firefox-i18n-15.0.1/sq.xpi) = 257659 +SHA256 (xpi/firefox-i18n-15.0.1/sr.xpi) = 48a24a8e00feb371176ab73ec42f80081ba6aafa88ab297584eb9b5e27bedd14 +SIZE (xpi/firefox-i18n-15.0.1/sr.xpi) = 314229 +SHA256 (xpi/firefox-i18n-15.0.1/sv-SE.xpi) = 7e3bcad8a84777d95f2d491f0c27253eed0c4557684180b08665de5cc7d6c709 +SIZE (xpi/firefox-i18n-15.0.1/sv-SE.xpi) = 276161 +SHA256 (xpi/firefox-i18n-15.0.1/ta-LK.xpi) = 626abf707b0e8c46674e7e5c940482f22eee67aa8379068bbfa3010ab280a8cf +SIZE (xpi/firefox-i18n-15.0.1/ta-LK.xpi) = 323325 +SHA256 (xpi/firefox-i18n-15.0.1/ta.xpi) = 943bd161e4bf20b16484667f28ee799b5ec56c52d3046d783b58be2866baec04 +SIZE (xpi/firefox-i18n-15.0.1/ta.xpi) = 306301 +SHA256 (xpi/firefox-i18n-15.0.1/te.xpi) = dd626cb4d8053997e4961631ffca9371be171e15521844e918b978ca7fe9425a +SIZE (xpi/firefox-i18n-15.0.1/te.xpi) = 321390 +SHA256 (xpi/firefox-i18n-15.0.1/th.xpi) = 0293c617723099f0c8f144f5547bfccc494b0a3609cafba1c71f0e31d20023c4 +SIZE (xpi/firefox-i18n-15.0.1/th.xpi) = 303855 +SHA256 (xpi/firefox-i18n-15.0.1/tr.xpi) = 14c28c115eaf83e1832c797afe115877875affca21641373141f2ce71055f6f1 +SIZE (xpi/firefox-i18n-15.0.1/tr.xpi) = 281933 +SHA256 (xpi/firefox-i18n-15.0.1/uk.xpi) = 24ef1023fd036b203ca1624d188d84574c73602d846138e5788e726bc383861f +SIZE (xpi/firefox-i18n-15.0.1/uk.xpi) = 311425 +SHA256 (xpi/firefox-i18n-15.0.1/vi.xpi) = 219b2e5b86d0f525df77c115e018eaf3c334e5b10be00c7a4ec3e14388e4d4c8 +SIZE (xpi/firefox-i18n-15.0.1/vi.xpi) = 294952 +SHA256 (xpi/firefox-i18n-15.0.1/zh-CN.xpi) = 3f46939dfa27182f7c13944f9d4f188abae9620890b60e4171494b27c8544920 +SIZE (xpi/firefox-i18n-15.0.1/zh-CN.xpi) = 290962 +SHA256 (xpi/firefox-i18n-15.0.1/zh-TW.xpi) = bee8adb2dd6a1634eb3ad3474af56b2aab76dabaca90078b66cb7de2c80a0c5b +SIZE (xpi/firefox-i18n-15.0.1/zh-TW.xpi) = 291947 +SHA256 (xpi/firefox-i18n-15.0.1/zu.xpi) = 308ee298af63d3a8ceec734ba0d8df4098a9eec1cbaf7566adc30816d64ec170 +SIZE (xpi/firefox-i18n-15.0.1/zu.xpi) = 277290 Index: head/www/libxul/files/patch-js-src-configure.in =================================================================== --- head/www/libxul/files/patch-js-src-configure.in (revision 303830) +++ head/www/libxul/files/patch-js-src-configure.in (nonexistent) @@ -1,13 +0,0 @@ ---- js/src/configure.in.orig 2009-09-30 21:50:26.000000000 +0200 -+++ js/src/configure.in 2009-09-30 21:50:44.000000000 +0200 -@@ -2467,10 +2467,6 @@ - ENABLE_JIT=1 - NANOJIT_ARCH=ARM - ;; --sparc*-*) -- ENABLE_JIT=1 -- NANOJIT_ARCH=Sparc -- ;; - esac - - MOZ_ARG_DISABLE_BOOL(jit, Property changes on: head/www/libxul/files/patch-js-src-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/www/libxul/files/patch-js_src_jsnum.cpp =================================================================== --- head/www/libxul/files/patch-js_src_jsnum.cpp (revision 303830) +++ head/www/libxul/files/patch-js_src_jsnum.cpp (nonexistent) @@ -1,31 +0,0 @@ ---- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 -+++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 -@@ -43,6 +43,9 @@ - /* - * JS number type and wrapper class. - */ -+#if defined(__FreeBSD__) -+#include -+#endif - #ifdef XP_OS2 - #define _PC_53 PC_53 - #define _MCW_EM MCW_EM -@@ -691,8 +694,18 @@ - - #else - -+#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 -+#if __BSD_VISIBLE == 0 -+#error __BSD_VISIBLE is zero, so fedisableexcept is not defined -+#endif -+#include -+#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) -+#else -+ - #define FIX_FPU() ((void)0) - -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ -+ - #endif - - JSBool Property changes on: head/www/libxul/files/patch-js_src_jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/www/libxul/files/patch-bug351181 =================================================================== --- head/www/libxul/files/patch-bug351181 (nonexistent) +++ head/www/libxul/files/patch-bug351181 (revision 303831) @@ -0,0 +1,31 @@ +--- js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -43,6 +43,9 @@ + /* + * JS number type and wrapper class. + */ ++#if defined(__FreeBSD__) ++#include ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) && __FreeBSD_version >= 601000 ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool Property changes on: head/www/libxul/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/libxul/files/patch-bug653551 =================================================================== --- head/www/libxul/files/patch-bug653551 (nonexistent) +++ head/www/libxul/files/patch-bug653551 (revision 303831) @@ -0,0 +1,24 @@ +commit 47ea30f +Author: Landry Breuil +Date: Thu Feb 2 15:31:56 2012 +0900 + + Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha +--- + js/src/configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git js/src/configure.in js/src/configure.in +index 84390cf..d663c46 100644 +--- js/src/configure.in ++++ js/src/configure.in +@@ -2471,8 +2471,10 @@ arm*-*) + NANOJIT_ARCH=ARM + ;; + sparc*-*) ++ if test ! "$HAVE_64BIT_OS" ; then + ENABLE_JIT=1 + NANOJIT_ARCH=Sparc ++ fi + ;; + esac + Property changes on: head/www/libxul/files/patch-bug653551 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/Makefile =================================================================== --- head/www/seamonkey/Makefile (revision 303830) +++ head/www/seamonkey/Makefile (revision 303831) @@ -1,155 +1,154 @@ # New ports collection makefile for: mozilla # Date created: 31 Mar 1998 # Whom: eivind/dima/jseger # # $FreeBSD$ # PORTNAME= seamonkey DISTVERSION= 2.12 CATEGORIES?= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA_EXTENDED} MASTER_SITE_SUBDIR= seamonkey/releases/${DISTVERSION}/source DISTNAME= seamonkey-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org COMMENT= The open source, standards compliant web browser BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \ nss>=3.13.2:${PORTSDIR}/security/nss \ sqlite3>=3.7.12.1:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \ unzip:${PORTSDIR}/archivers/unzip USE_AUTOTOOLS= autoconf213:env USE_PYTHON_BUILD=yes USE_BZIP2= yes USE_GMAKE= yes USE_GECKO= gecko WANT_GNOME= yes USE_QT4= # empty QT_NONSTANDARD= yes WANT_PERL= yes GNU_CONFIGURE= yes ALL_TARGET= default USE_GL= gl MAKE_JOBS_SAFE= yes MOZ_PIS_SCRIPTS= moz_pis_S50cleanhome MOZ_EXTENSIONS= default MOZ_OPTIONS+= --program-transform-name='s/seamonkey/${MOZILLA}/' \ --enable-application=suite USE_MOZILLA= # empty MOZ_PKGCONFIG_FILES= NOT_FOR_ARCHS= ia64 OPTIONS_DEFINE= CHATZILLA COMPOSER GSTREAMER LDAP LIGHTNING MAILNEWS OPTIONS_DEFAULT=CHATZILLA COMPOSER LDAP MAILNEWS CHATZILLA_DESC?=Chatzilla IRC module COMPOSER_DESC?= HTML Composer module LDAP_DESC?= LDAP support for Mailnews MAILNEWS_DESC?= Mail and News modules .include "${.CURDIR}/../../www/firefox/Makefile.options" .include WRKSRC= ${WRKDIR}/comm-release MOZSRC:= ${WRKSRC}/mozilla .if ${ARCH} == amd64 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL} .elif ${ARCH} == powerpc64 .if ${OSVERSION} < 900033 BROKEN= Needs binutils 2.17.50 to build .else MOZ_EXPORT+= UNAME_m="powerpc64" CFLAGS+= -mminimal-toc .endif .endif .if ! ${PORT_OPTIONS:MMAILNEWS} EXTRA_PATCHES+= ${FILESDIR}/extra-mailnews-patch-bridge-bridge.mk \ ${FILESDIR}/extra-patch-configure.in MOZ_OPTIONS+= --disable-ldap --disable-mailnews .else # mail and news desired, but not LDAP .if ! ${PORT_OPTIONS:MLDAP} -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bridge-bridge.mk MOZ_OPTIONS+= --disable-ldap --enable-mailnews .else MOZ_OPTIONS+= --enable-ldap --enable-mailnews .endif .endif .if ${PORT_OPTIONS:MCHATZILLA} MOZ_EXTENSIONS:= ${MOZ_EXTENSIONS},irc .endif .if ! ${PORT_OPTIONS:MCOMPOSER} MOZ_OPTIONS+= --disable-composer .endif .if ${ARCH} == amd64 || ${ARCH} == i386 BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm .endif .if ${PORT_OPTIONS:MLIGHTNING} MOZ_OPTIONS+= --enable-calendar MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar LIGHTNING_DIR= share/lightning XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi XPI_LIBDIR= ${PREFIX}/lib/xpi XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103} XPI_ID= lightning@seamonkey.mozilla.org .else MOZ_OPTIONS+= --disable-calendar .endif post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/suite/app/nsSuiteApp.cpp @${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \ ${WRKSRC}/mozilla/modules/libpref/src/init/all.js @${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ < ${FILESDIR}/seamonkey.desktop.in > \ ${WRKDIR}/${MOZILLA}.desktop pre-configure: (cd ${WRKSRC} && ${AUTOCONF}) (cd ${MOZSRC} && ${AUTOCONF}) (cd ${MOZSRC}/js/src/ && ${AUTOCONF}) pre-install: ${ECHO_CMD} share/applications/${MOZILLA}.desktop >> ${PLIST} ${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLIST} ${ECHO_CMD} 'share/pixmaps/${MOZILLA}.png' >> ${PLIST} do-install: ${MKDIR} ${PREFIX}/share/applications ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${PREFIX}/share/applications/ ${LN} -sf ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png \ ${PREFIX}/share/pixmaps/${MOZILLA}.png post-install: .if ${PORT_OPTIONS:MLIGHTNING} @${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/seamonkey @(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE}) @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID} @${REINPLACE_CMD} -i "" "s/${XPI_ORIG_ID}/${XPI_ID}/" ${XPI_LIBDIR}/${XPI_ID}/install.rdf @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${XPI_ID} @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${LOCALBASE}/lib/seamonkey/extensions 2>/dev/null || true @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/seamonkey 2>/dev/null || true @(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -not -type d) | ${SORT} | \ ${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST} @${ECHO_CMD} 'lib/xpi/symlinks/seamonkey/${XPI_ID}' >> ${TMPPLIST} @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${XPI_ID} ${LOCALBASE}/lib/seamonkey/extensions 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/seamonkey/extensions/${XPI_ID}' >> ${TMPPLIST} @(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -type d) | ${SORT} -r | \ ${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST} @${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/seamonkey 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks 2>/dev/null || true' >> ${TMPPLIST} @${ECHO_CMD} '@unexec rmdir %D/lib/xpi 2>/dev/null || true' >> ${TMPPLIST} .endif .include Index: head/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp =================================================================== --- head/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp (revision 303830) +++ head/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp (nonexistent) @@ -1,31 +0,0 @@ ---- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 -+++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 -@@ -49,6 +49,9 @@ - // Avoid warnings about ASSERT being defined by the assembler as well. - #undef ASSERT - -+#if defined(__FreeBSD__) -+#include -+#endif - #ifdef XP_OS2 - #define _PC_53 PC_53 - #define _MCW_EM MCW_EM -@@ -691,8 +694,18 @@ - - #else - -+#if defined(__FreeBSD__) -+#if __BSD_VISIBLE == 0 -+#error __BSD_VISIBLE is zero, so fedisableexcept is not defined -+#endif -+#include -+#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) -+#else -+ - #define FIX_FPU() ((void)0) - -+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ -+ - #endif - - JSBool Property changes on: head/www/seamonkey/files/patch-mozilla-js-src-jsnum.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-mozilla-configure.in =================================================================== --- head/www/seamonkey/files/patch-mozilla-configure.in (revision 303830) +++ head/www/seamonkey/files/patch-mozilla-configure.in (nonexistent) @@ -1,25 +0,0 @@ ---- mozilla/configure.in.orig 2012-05-23 20:56:34.000000000 +0200 -+++ mozilla/configure.in 2012-05-27 18:18:25.000000000 +0200 -@@ -4230,6 +4233,9 @@ - if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then - MOZ_NATIVE_LIBEVENT= - else -+PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, -+ [MOZ_NATIVE_LIBEVENT=1 -+ MOZ_LIBEVENT_INCLUDES="$MOZ_LIBEVENT_CFLAGS"], [ - if test "${LIBEVENT_DIR}" = "yes"; then - LIBEVENT_DIR=/usr - fi -@@ -4242,10 +4248,11 @@ else - AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) - AC_CHECK_LIB(event, event_init, - [MOZ_NATIVE_LIBEVENT=1 -- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" -+ MOZ_LIBEVENT_INCLUDES="-I${LIBEVENT_DIR}/include" - MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], - [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) - fi -+]) - CFLAGS=$_SAVE_CFLAGS - LDFLAGS=$_SAVE_LDFLAGS - LIBS=$_SAVE_LIBS Property changes on: head/www/seamonkey/files/patch-mozilla-configure.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/seamonkey/files/extra-patch-bridge-bridge.mk =================================================================== --- head/www/seamonkey/files/extra-patch-bridge-bridge.mk (revision 303830) +++ head/www/seamonkey/files/extra-patch-bridge-bridge.mk (nonexistent) @@ -1,15 +0,0 @@ ---- bridge/bridge.mk.orig 2011-11-24 18:31:11.000000000 +0100 -+++ bridge/bridge.mk 2011-11-24 18:31:23.000000000 +0100 -@@ -38,10 +38,10 @@ - - APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/mozilla/xpfe/components/autocomplete - --#ifdef MOZ_LDAP_XPCOM -+ifdef MOZ_LDAP_XPCOM - APP_LIBXUL_STATICDIRS += $(DEPTH)$(SUBDIR)/ldap/sdks/c-sdk - APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/ldap/xpcom --#endif -+endif - - #ifdef MOZ_MORK - APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/db/mork Property changes on: head/www/seamonkey/files/extra-patch-bridge-bridge.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/www/seamonkey/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp =================================================================== --- head/www/seamonkey/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (revision 303830) +++ head/www/seamonkey/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp (nonexistent) @@ -1,14 +0,0 @@ ---- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 -+++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 -@@ -57,6 +57,11 @@ - nsresult - nsThreadManager::Init() - { -+#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ -+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) -+ if (!gTLSThreadID) -+ gTLSThreadID = mozilla::threads::Generic; -+#endif - mThreadsByPRThread.Init(); - - if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/www/seamonkey/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc =================================================================== --- head/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc (revision 303830) +++ head/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc (nonexistent) @@ -1,11 +0,0 @@ ---- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 -+++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 -@@ -540,4 +540,8 @@ - GPOS::position_finish (buffer); - } - -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf >::search(unsigned int const &) const; -+template int SortedArrayOf::search(unsigned int const &) const; - Property changes on: head/www/seamonkey/files/patch-mozilla-gfx-harfbuzz-src-hb-ot-layout.cc ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -1 \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/seamonkey/files/extra-mailnews-patch-bridge-bridge.mk =================================================================== --- head/www/seamonkey/files/extra-mailnews-patch-bridge-bridge.mk (revision 303830) +++ head/www/seamonkey/files/extra-mailnews-patch-bridge-bridge.mk (revision 303831) @@ -1,24 +1,13 @@ --- bridge/bridge.mk.orig 2012-03-13 06:23:10.000000000 +0100 +++ bridge/bridge.mk 2012-03-14 12:28:03.000000000 +0100 -@@ -38,17 +38,19 @@ - - APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/mozilla/xpfe/components/autocomplete - --#ifdef MOZ_LDAP_XPCOM -+ifdef MOZ_LDAP_XPCOM - APP_LIBXUL_STATICDIRS += $(DEPTH)$(SUBDIR)/ldap/sdks/c-sdk - APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/ldap/xpcom --#endif -+endif - - #ifdef MOZ_MORK +@@ -47,8 +47,10 @@ APP_LIBXUL_DIRS += $(DEPTH)$(SUBDIR)/db/mork #endif +ifdef disabled APP_LIBXUL_DIRS += \ $(DEPTH)$(SUBDIR)/mailnews/base \ $(DEPTH)$(SUBDIR)/mailnews/mime/public \ $(DEPTH)$(SUBDIR)/mailnews \ $(NULL) +endif Property changes on: head/www/seamonkey/files/extra-mailnews-patch-bridge-bridge.mk ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -yes \ No newline at end of property +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug351181 =================================================================== --- head/www/seamonkey/files/patch-bug351181 (nonexistent) +++ head/www/seamonkey/files/patch-bug351181 (revision 303831) @@ -0,0 +1,31 @@ +--- mozilla/js/src/jsnum.cpp.orig 2010-01-05 22:35:17.000000000 -0500 ++++ mozilla/js/src/jsnum.cpp 2010-01-11 05:10:19.000000000 -0500 +@@ -49,6 +49,9 @@ + // Avoid warnings about ASSERT being defined by the assembler as well. + #undef ASSERT + ++#if defined(__FreeBSD__) ++#include ++#endif + #ifdef XP_OS2 + #define _PC_53 PC_53 + #define _MCW_EM MCW_EM +@@ -691,8 +694,18 @@ + + #else + ++#if defined(__FreeBSD__) ++#if __BSD_VISIBLE == 0 ++#error __BSD_VISIBLE is zero, so fedisableexcept is not defined ++#endif ++#include ++#define FIX_FPU() ((void)fedisableexcept(FE_ALL_EXCEPT)) ++#else ++ + #define FIX_FPU() ((void)0) + ++#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */ ++ + #endif + + JSBool Property changes on: head/www/seamonkey/files/patch-bug351181 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug543241 =================================================================== --- head/www/seamonkey/files/patch-bug543241 (nonexistent) +++ head/www/seamonkey/files/patch-bug543241 (revision 303831) @@ -0,0 +1,14 @@ +--- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200 ++++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200 +@@ -57,6 +57,11 @@ + nsresult + nsThreadManager::Init() + { ++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \ ++ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045)) ++ if (!gTLSThreadID) ++ gTLSThreadID = mozilla::threads::Generic; ++#endif + mThreadsByPRThread.Init(); + + if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE) Property changes on: head/www/seamonkey/files/patch-bug543241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug732340 =================================================================== --- head/www/seamonkey/files/patch-bug732340 (nonexistent) +++ head/www/seamonkey/files/patch-bug732340 (revision 303831) @@ -0,0 +1,14 @@ +--- mozilla/gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400 ++++ mozilla/gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400 +@@ -537,4 +537,10 @@ hb_ot_layout_position_finish (hb_face_t + GPOS::position_finish (buffer); + } + ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3 ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf >::search(unsigned int const &) const; ++template int SortedArrayOf::search(unsigned int const &) const; ++#endif + + Property changes on: head/www/seamonkey/files/patch-bug732340 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug753046 =================================================================== --- head/www/seamonkey/files/patch-bug753046 (revision 303830) +++ head/www/seamonkey/files/patch-bug753046 (revision 303831) @@ -1,1225 +1,1229 @@ # Bug 753046 - Add support for DragonFly/NetBSD $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef MOZ_WIDGET_QT +#include // for _exit() #include #include "nsQAppInstance.h" #include "NestedLoopTimer.h" @@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin // TODO: use PluginPRLibrary here -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) mShutdownFunc = (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); @@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin PLUGIN_LOG_DEBUG_METHOD; AssertPluginThread(); -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) return true; #elif defined(OS_WIN) || defined(OS_MACOSX) *_retval = mGetEntryPointsFunc(&mFunctions); @@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); return true; #elif defined(OS_WIN) || defined(OS_MACOSX) $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000 +++ mozilla/dom/plugins/ipc/PluginModuleChild.h @@ -340,7 +340,7 @@ private: // we get this from the plugin NP_PLUGINSHUTDOWN mShutdownFunc; -#ifdef OS_LINUX +#if defined(OS_LINUX) || defined(OS_BSD) NP_PLUGINUNIXINIT mInitializeFunc; #elif defined(OS_WIN) || defined(OS_MACOSX) NP_PLUGININIT mInitializeFunc; $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ mozilla/ipc/chromium/Makefile.in @@ -278,6 +278,34 @@ endif endif # } OS_LINUX +ifdef OS_BSD # { + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ + file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) + +ifdef MOZ_ENABLE_GTK2 +CPPSRCS += \ + message_pump_glib.cc \ + $(NULL) +endif + +ifdef MOZ_ENABLE_QT +MOCSRCS = \ + moc_message_pump_qt.cc \ + $(NULL) + +CPPSRCS += \ + $(MOCSRCS) \ + message_pump_qt.cc \ + $(NULL) +endif + +endif # } OS_BSD + # libevent ifndef MOZ_NATIVE_LIBEVENT # { $NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 @@ -56,17 +56,6 @@ -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ $(NULL) -ifeq ($(OS_ARCH),Darwin) # { - -OS_MACOSX = 1 -OS_POSIX = 1 - -DEFINES += \ - -DOS_MACOSX=1 \ - -DOS_POSIX=1 \ - $(NULL) - -else # } { ifeq ($(OS_ARCH),WINNT) # { OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) @@ -93,13 +82,65 @@ endif else # } { - -OS_LINUX = 1 OS_POSIX = 1 +DEFINES += -DOS_POSIX=1 + +ifeq ($(OS_ARCH),Darwin) # { + +OS_MACOSX = 1 +DEFINES += \ + -DOS_MACOSX=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),DragonFly) # { + +OS_DRAGONFLY = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_DRAGONFLY=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),FreeBSD) # { + +OS_FREEBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_FREEBSD=1 \ + -DOS_BSD=1 \ + $(NULL) +else # } { +ifeq ($(OS_ARCH),NetBSD) # { + +OS_NETBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_NETBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { +ifeq ($(OS_ARCH),OpenBSD) # { + +OS_OPENBSD = 1 +OS_BSD = 1 +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +DEFINES += \ + -DOS_OPENBSD=1 \ + -DOS_BSD=1 \ + $(NULL) + +else # } { + +OS_LINUX = 1 DEFINES += \ -DOS_LINUX=1 \ - -DOS_POSIX=1 \ $(NULL) # NB: to stop gcc warnings about exporting template instantiation @@ -107,4 +147,8 @@ endif # } endif # } +endif # } +endif # } +endif # } +endif # } $NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/base_paths.h @@ -13,7 +13,7 @@ #include "base/base_paths_win.h" #elif defined(OS_MACOSX) #include "base/base_paths_mac.h" -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) #include "base/base_paths_linux.h" #endif #include "base/path_service.h" $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/debug_util_posix.cc @@ -5,7 +5,7 @@ #include "build/build_config.h" #include "base/debug_util.h" -#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) +#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) #include #include @@ -17,9 +17,16 @@ #include #if MOZ_HAVE_EXECINFO_H #include +#endif + +#if defined(OS_MACOSX) || defined(OS_BSD) #include #endif +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + #include "base/basictypes.h" #include "base/eintr_wrapper.h" #include "base/logging.h" @@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u return false; } -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_BSD) // Based on Apple's recommended method as described in // http://developer.apple.com/qa/qa2004/qa1361.html @@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() { // This process is being debugged if the P_TRACED flag is set. is_set = true; +#if defined(OS_DRAGONFLY) + being_debugged = (info.kp_flags & P_TRACED) != 0; +#elif defined(OS_FREEBSD) + being_debugged = (info.ki_flag & P_TRACED) != 0; +#elif defined(OS_OPENBSD) + being_debugged = (info.p_flag & P_TRACED) != 0; +#else being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; +#endif return being_debugged; } diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h new file mode 100644 index 0000000..3fc1a87 --- /dev/null +++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h -@@ -0,0 +1,108 @@ +@@ -0,0 +1,112 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from dir_reader_linux.h + +#ifndef BASE_DIR_READER_BSD_H_ +#define BASE_DIR_READER_BSD_H_ +#pragma once + +#include +#include +#include +#include +#include + +#include "base/logging.h" +#include "base/eintr_wrapper.h" + +// See the comments in dir_reader_posix.h about this. + +namespace base { + +class DirReaderBSD { + public: + explicit DirReaderBSD(const char* directory_path) +#ifdef O_DIRECTORY + : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), +#else + : fd_(open(directory_path, O_RDONLY)), +#endif + offset_(0), + size_(0) { + memset(buf_, 0, sizeof(buf_)); + } + + ~DirReaderBSD() { + if (fd_ >= 0) { + if (HANDLE_EINTR(close(fd_))) + DLOG(ERROR) << "Failed to close directory handle"; + } + } + + bool IsValid() const { + return fd_ >= 0; + } + + // Move to the next entry returning false if the iteration is complete. + bool Next() { + if (size_) { + struct dirent* dirent = reinterpret_cast(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else + offset_ += dirent->d_reclen; ++#endif + } + + if (offset_ != size_) + return true; + +#ifdef OS_OPENBSD + const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); +#else + const int r = getdents(fd_, buf_, sizeof(buf_)); +#endif + if (r == 0) + return false; + if (r == -1) { +#ifdef OS_OPENBSD + DLOG(ERROR) << "getdirentries returned an error: " << errno; +#else + DLOG(ERROR) << "getdents returned an error: " << errno; +#endif + return false; + } + size_ = r; + offset_ = 0; + return true; + } + + const char* name() const { + if (!size_) + return NULL; + + const struct dirent* dirent = + reinterpret_cast(&buf_[offset_]); + return dirent->d_name; + } + + int fd() const { + return fd_; + } + + static bool IsFallback() { + return false; + } + + private: + const int fd_; + char buf_[512]; +#ifdef OS_OPENBSD + off_t *basep_; +#endif + size_t offset_, size_; + + DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); +}; + +} // namespace base + +#endif // BASE_DIR_READER_BSD_H_ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h index 9a34492..62b280c 100644 --- mozilla/ipc/chromium/src/base/dir_reader_posix.h +++ mozilla/ipc/chromium/src/base/dir_reader_posix.h @@ -18,16 +18,20 @@ // seems worse than falling back to enumerating all file descriptors so we will // probably never implement this on the Mac. -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) #include "base/dir_reader_linux.h" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #endif namespace base { -#if defined(OS_LINUX) && !defined(OS_OPENBSD) +#if defined(OS_LINUX) typedef DirReaderLinux DirReaderPosix; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #endif diff --git mozilla/ipc/chromium/src/base/file_util_linux.cc mozilla/ipc/chromium/src/base/file_util_linux.cc index 171e44f..0c6dfcc 100644 --- mozilla/ipc/chromium/src/base/file_util_linux.cc +++ mozilla/ipc/chromium/src/base/file_util_linux.cc @@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) { } bool GetShmemTempDir(FilePath* path) { -#ifdef ANDROID +#if defined(ANDROID) || defined(OS_BSD) return GetTempDir(path); #else *path = FilePath("/dev/shm"); $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/file_util_posix.cc @@ -31,7 +31,7 @@ #include "base/time.h" // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine -#if defined(OS_FREEBSD) || defined(OS_OPENBSD) +#ifndef HAVE_STAT64 #define stat64 stat #endif $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100 +++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100 @@ -19,7 +19,7 @@ #if defined(OS_POSIX) #include "base/message_pump_libevent.h" #endif -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_BSD) #ifdef MOZ_WIDGET_GTK2 #include "base/message_pump_glib.h" #endif @@ -119,7 +119,7 @@ if (type_ == TYPE_UI) { #if defined(OS_MACOSX) pump_ = base::MessagePumpMac::Create(); -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_BSD) pump_ = new base::MessagePumpForUI(); #endif // OS_LINUX } else if (type_ == TYPE_IO) { $NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread.h @@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE #elif defined(OS_POSIX) #include typedef pthread_t PlatformThreadHandle; -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_OPENBSD) #include typedef pid_t PlatformThreadId; +#elif defined(OS_BSD) +typedef lwpid_t PlatformThreadId; #elif defined(OS_MACOSX) #include typedef mach_port_t PlatformThreadId; $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc @@ -9,16 +9,30 @@ #if defined(OS_MACOSX) #include +#elif defined(OS_NETBSD) +#include #elif defined(OS_LINUX) #include -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #include -#elif !defined(__NetBSD__) -#include +#elif defined(OS_FREEBSD) +#include +#if __FreeBSD_version > 802500 +#include +#else +_Pragma("GCC visibility push(default)") +extern "C" int thr_self(long *); +_Pragma("GCC visibility pop") +#endif #endif + +#if !defined(OS_MACOSX) #include #endif +#if defined(OS_BSD) && !defined(OS_NETBSD) +#include +#endif + #if defined(OS_MACOSX) namespace base { void InitThreading(); @@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() { // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) + return lwp_gettid(); +#elif defined(OS_FREEBSD) +# if __FreeBSD_version > 900030 + return pthread_getthreadid_np(); +# else + long lwpid; + thr_self(&lwpid); + return lwpid; +# endif +#elif defined(OS_OPENBSD) - // TODO(BSD): find a better thread ID - return (intptr_t)(pthread_self()); + return (intptr_t) (pthread_self()); #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif @@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) { // Note that glibc also has a 'pthread_setname_np' api, but it may not be // available everywhere and it's only benefit over using prctl directly is // that it can set the name of threads other than the current thread. -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(OS_BSD) && !defined(OS_NETBSD) pthread_set_name_np(pthread_self(), name); -#elif defined(__NetBSD__) +#elif defined(OS_NETBSD) - pthread_setname_np(pthread_self(), "%s", name); + pthread_setname_np(pthread_self(), "%s", (void *)name); #else prctl(PR_SET_NAME, reinterpret_cast(name), 0, 0, 0); $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 +++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100 @@ -280,6 +280,7 @@ class NamedProcessIterator { const ProcessEntry* NextProcessEntry(); private: +#if !defined(OS_BSD) // Determines whether there's another process (regardless of executable) // left in the list of all processes. Returns true and sets entry_ to // that process's info if there is one, false otherwise. @@ -292,18 +292,24 @@ void InitProcessEntry(ProcessEntry* entry); std::wstring executable_name_; +#endif #if defined(OS_WIN) HANDLE snapshot_; bool started_iteration_; #elif defined(OS_LINUX) DIR *procfs_dir_; +#elif defined(OS_BSD) + std::vector content; + size_t nextEntry; #elif defined(OS_MACOSX) std::vector kinfo_procs_; size_t index_of_kinfo_proc_; #endif +#if !defined(OS_BSD) ProcessEntry entry_; const ProcessFilter* filter_; +#endif DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); }; $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_bsd.cc @@ -0,0 +1,318 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// derived from process_util_linux.cc and process_util_mac.cc + +#include "base/process_util.h" + +#include +#include +#include +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) +#include +#endif + +#include +#include +#include +#include + +#include + +#include "base/debug_util.h" +#include "base/eintr_wrapper.h" +#include "base/file_util.h" +#include "base/logging.h" +#include "base/string_tokenizer.h" +#include "base/string_util.h" + +#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ + || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) +#define HAVE_POSIX_SPAWN 1 +#endif + +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported +# else +# define __dso_public __attribute__((__visibility__("default"))) +# endif +#endif + +#ifdef HAVE_POSIX_SPAWN +#include +extern "C" char **environ __dso_public; +#endif + +namespace { + +enum ParsingState { + KEY_NAME, + KEY_VALUE +}; + +static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); + +} // namespace + +namespace base { + +#ifdef HAVE_POSIX_SPAWN + +void FreeEnvVarsArray(char* array[], int length) +{ + for (int i = 0; i < length; i++) { + free(array[i]); + } + delete[] array; +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; + for (size_t i = 0; i < argv.size(); i++) { + argv_copy[i] = const_cast(argv[i].c_str()); + } + argv_copy[argv.size()] = NULL; + + // Make sure we don't leak any FDs to the child process by marking all FDs + // as close-on-exec. + SetAllFDsToCloseOnExec(); + + // Copy environment to a new char array and add the variables + // in env_vars_to_set. + // Existing variables are overwritten by env_vars_to_set. + int pos = 0; + environment_map combined_env_vars = env_vars_to_set; + while(environ[pos] != NULL) { + std::string varString = environ[pos]; + std::string varName = varString.substr(0, varString.find_first_of('=')); + std::string varValue = varString.substr(varString.find_first_of('=') + 1); + if (combined_env_vars.find(varName) == combined_env_vars.end()) { + combined_env_vars[varName] = varValue; + } + pos++; + } + int varsLen = combined_env_vars.size() + 1; + + char** vars = new char*[varsLen]; + int i = 0; + for (environment_map::const_iterator it = combined_env_vars.begin(); + it != combined_env_vars.end(); ++it) { + std::string entry(it->first); + entry += "="; + entry += it->second; + vars[i] = strdup(entry.c_str()); + i++; + } + vars[i] = NULL; + + posix_spawn_file_actions_t file_actions; + if (posix_spawn_file_actions_init(&file_actions) != 0) { + FreeEnvVarsArray(vars, varsLen); + return false; + } + + // Turn fds_to_remap array into a set of dup2 calls. + for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); + it != fds_to_remap.end(); + ++it) { + int src_fd = it->first; + int dest_fd = it->second; + + if (src_fd == dest_fd) { + int flags = fcntl(src_fd, F_GETFD); + if (flags != -1) { + fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); + } + } else { + if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { + posix_spawn_file_actions_destroy(&file_actions); + FreeEnvVarsArray(vars, varsLen); + return false; + } + } + } + + pid_t pid = 0; + int spawn_succeeded = (posix_spawnp(&pid, + argv_copy[0], + &file_actions, + NULL, + argv_copy, + vars) == 0); + + FreeEnvVarsArray(vars, varsLen); + + posix_spawn_file_actions_destroy(&file_actions); + + bool process_handle_valid = pid > 0; + if (!spawn_succeeded || !process_handle_valid) { + retval = false; + } else { + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return retval; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, ProcessHandle* process_handle) { + // TODO(playmobil): Do we need to respect the start_hidden flag? + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#else // no posix_spawn, use fork/exec + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + bool wait, ProcessHandle* process_handle) { + return LaunchApp(argv, fds_to_remap, environment_map(), + wait, process_handle); +} + +bool LaunchApp(const std::vector& argv, + const file_handle_mapping_vector& fds_to_remap, + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { + scoped_array argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; + fd_shuffle1.reserve(fds_to_remap.size()); + fd_shuffle2.reserve(fds_to_remap.size()); + + pid_t pid = fork(); + if (pid < 0) + return false; + + if (pid == 0) { + for (file_handle_mapping_vector::const_iterator + it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { + fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); + fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); + } + + if (!ShuffleFileDescriptors(&fd_shuffle1)) + _exit(127); + + CloseSuperfluousFds(fd_shuffle2); + + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } + + for (size_t i = 0; i < argv.size(); i++) + argv_cstr[i] = const_cast(argv[i].c_str()); + argv_cstr[argv.size()] = NULL; + execvp(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; + exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); + if (wait) + HANDLE_EINTR(waitpid(pid, 0, 0)); + + if (process_handle) + *process_handle = pid; + } + + return true; +} + +bool LaunchApp(const CommandLine& cl, + bool wait, bool start_hidden, + ProcessHandle* process_handle) { + file_handle_mapping_vector no_files; + return LaunchApp(cl.argv(), no_files, wait, process_handle); +} + +#endif + +NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, + const ProcessFilter* filter) +{ + int numEntries; + kvm_t *kvm; + std::string exe(WideToASCII(executable_name)); + +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) + kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { +# if defined(OS_DRAGONFLY) + if (exe != procs[i].kp_comm) continue; + if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].kp_pid; + e.ppid = procs[i].kp_ppid; + strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); + content.push_back(e); +# elif defined(OS_FREEBSD) + if (exe != procs[i].ki_comm) continue; + if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].ki_pid; + e.ppid = procs[i].ki_ppid; + strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); + content.push_back(e); +# endif +#else + kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); +#if defined(OS_OPENBSD) + struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries); +#else + struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); +#endif + if (procs != NULL && numEntries > 0) { + for (int i = 0; i < numEntries; i++) { + if (exe != procs[i].p_comm) continue; + if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; + ProcessEntry e; + e.pid = procs[i].p_pid; + e.ppid = procs[i].p_ppid; + strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); + content.push_back(e); +#endif + } + } + nextEntry = 0; + kvm_close(kvm); +} + +NamedProcessIterator::~NamedProcessIterator() { +} + +const ProcessEntry* NamedProcessIterator::NextProcessEntry() { + if (nextEntry >= content.size()) return NULL; + return &content[nextEntry++]; +} + +bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { + return false; +} + +} // namespace base $NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/process_util_posix.cc @@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj #elif defined(OS_MACOSX) static const rlim_t kSystemDefaultMaxFds = 256; static const char kFDDir[] = "/dev/fd"; +#elif defined(OS_BSD) + // the getrlimit below should never fail, so whatever .. + static const rlim_t kSystemDefaultMaxFds = 1024; + // at least /dev/fd will exist + static const char kFDDir[] = "/dev/fd"; #endif // Get the maximum number of FDs possible. @@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj void SetAllFDsToCloseOnExec() { #if defined(OS_LINUX) const char fd_dir[] = "/proc/self/fd"; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) const char fd_dir[] = "/dev/fd"; #endif ScopedDIR dir_closer(opendir(fd_dir)); $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $ --- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000 +++ mozilla/ipc/chromium/src/base/sys_info_posix.cc @@ -18,6 +18,11 @@ #include #endif +#if defined(OS_NETBSD) +#include +#include +#endif + #include "base/logging.h" #include "base/string_util.h" @@ -26,7 +31,11 @@ namespace base { int SysInfo::NumberOfProcessors() { // It seems that sysconf returns the number of "logical" processors on both // mac and linux. So we get the number of "online logical" processors. +#ifdef _SC_NPROCESSORS_ONLN static long res = sysconf(_SC_NPROCESSORS_ONLN); +#else + static long res = 1; +#endif if (res == -1) { NOTREACHED(); return 1; @@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() } return static_cast(hostinfo.max_mem); +#elif defined(OS_NETBSD) + int mib[2]; + int rc; + int64_t memSize; + size_t len = sizeof(memSize); + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM64; + rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); + if (-1 != rc) { + return memSize; + } + return 0; + #else long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h @@ -34,7 +34,7 @@ #include "base/third_party/nspr/prcpucfg_win.h" #elif defined(__APPLE__) #include "base/third_party/nspr/prcpucfg_mac.h" -#elif defined(__linux__) || defined(ANDROID) +#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) #include "base/third_party/nspr/prcpucfg_linux.h" #elif defined(__OpenBSD__) #include "base/third_party/nspr/prcpucfg_openbsd.h" $NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc @@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp LL_ADD(retVal, retVal, temp); return retVal; -#elif defined(OS_LINUX) +#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) struct tm exp_tm = {0}; exp_tm.tm_sec = exploded->tm_sec; exp_tm.tm_min = exploded->tm_min; @@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp result *= kSecondsToMicroseconds; result += exploded->tm_usec; return result; +#elif defined(OS_FREEBSD) || defined(OS_NETBSD) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; + exp_tm.tm_hour = exploded->tm_hour; + exp_tm.tm_mday = exploded->tm_mday; + exp_tm.tm_mon = exploded->tm_month; + exp_tm.tm_year = exploded->tm_year - 1900; + + // time_t is 64bit + time_t absolute_time = timegm(&exp_tm); + + PRTime result = static_cast(absolute_time); + result -= exploded->tm_params.tp_gmt_offset + + exploded->tm_params.tp_dst_offset; + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; #else #error No PR_ImplodeTime implemented on your platform. #endif diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc index abf2a56..48791f6 100644 --- mozilla/ipc/chromium/src/base/time_posix.cc +++ mozilla/ipc/chromium/src/base/time_posix.cc @@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { // With numer and denom = 1 (the expected case), the 64-bit absolute time // reported in nanoseconds is enough to last nearly 585 years. -#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ +#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 struct timespec ts; $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $ --- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/build/build_config.h @@ -19,6 +19,12 @@ #define OS_MACOSX 1 #elif defined(__linux__) || defined(ANDROID) #define OS_LINUX 1 +#elif defined(__DragonFly__) +#define OS_DRAGONFLY 1 +#elif defined(__FreeBSD__) +#define OS_FREEBSD 1 +#elif defined(__NetBSD__) +#define OS_NETBSD 1 #elif defined(__OpenBSD__) #define OS_OPENBSD 1 #elif defined(_WIN32) @@ -27,9 +33,16 @@ #error Please add support for your platform in build/build_config.h #endif +// For access to standard BSD features, use OS_BSD instead of a +// more specific macro. +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ + || defined(OS_NETBSD) || defined(OS_OPENBSD) +#define OS_BSD 1 +#endif + // For access to standard POSIX features, use OS_POSIX instead of a more // specific macro. -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD) +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) #define OS_POSIX 1 #endif diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc index bd866ee..2ea5b19 100644 --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h @@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess }; // This is a control message buffer large enough to hold kMaxReadFDs -#if defined(OS_MACOSX) +#if defined(OS_MACOSX) || defined(OS_NETBSD) // TODO(agl): OSX appears to have non-constant CMSG macros! char input_cmsg_buf_[1024]; #else $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h @@ -195,7 +195,7 @@ }; #endif -#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) +#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390)) // There size_t is a synonym for |unsigned long| ... template <> struct ParamTraits { @@ -248,7 +248,7 @@ }; #endif // defined(OS_MACOSX) -#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) +#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) // int64 is |long int| on 64-bit systems, uint64 is |unsigned long| template <> struct ParamTraits { $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) #include "base/shared_memory.h" #endif @@ -66,7 +66,7 @@ class TransportDIB { uint32 sequence_num; }; typedef HandleAndSequenceNum Id; -#elif defined(OS_MACOSX) +#elif defined(OS_MACOSX) || defined(OS_BSD) typedef base::SharedMemoryHandle Handle; // On Mac, the inode number of the backing file is used as an id. typedef base::SharedMemoryId Id; @@ -108,7 +108,7 @@ class TransportDIB { private: TransportDIB(); -#if defined(OS_WIN) || defined(OS_MACOSX) +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) explicit TransportDIB(base::SharedMemoryHandle dib); base::SharedMemory shared_memory_; uint32 sequence_num_; $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $ --- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000 +++ mozilla/ipc/glue/GeckoChildProcessHost.cpp @@ -430,7 +430,7 @@ // and passing wstrings from one config to the other is unsafe. So // we split the logic here. -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) base::environment_map newEnvVars; // XPCOM may not be initialized in some subprocesses. We don't want // to initialize XPCOM just for the directory service, especially @@ -445,8 +445,8 @@ if (NS_SUCCEEDED(rv)) { nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX -# ifdef MOZ_WIDGET_ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) +# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) path += "/lib"; # endif // MOZ_WIDGET_ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); #if defined(MOZ_CRASHREPORTER) -# if defined(OS_LINUX) +# if defined(OS_LINUX) || defined(OS_BSD) int childCrashFd, childCrashRemapFd; if (!CrashReporter::CreateNotificationPipeForChild( &childCrashFd, &childCrashRemapFd)) @@ -594,7 +594,7 @@ #endif base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) newEnvVars, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h index f37998d..b05dc7b 100644 --- mozilla/ipc/glue/SharedMemorySysV.h +++ mozilla/ipc/glue/SharedMemorySysV.h @@ -8,7 +8,7 @@ #ifndef mozilla_ipc_SharedMemorySysV_h #define mozilla_ipc_SharedMemorySysV_h -#if defined(OS_LINUX) && !defined(ANDROID) +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) // SysV shared memory isn't available on Windows, but we define the // following macro so that #ifdefs are clearer (compared to #ifdef $NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $ --- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000 +++ mozilla/toolkit/library/Makefile.in @@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle endif endif +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH))) +OS_LIBS += $(call EXPAND_LIBNAME,kvm) +# keep `environ' unresolved, see bug 14426 for binutils +EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet) ifdef ACCESSIBILITY Index: head/www/seamonkey/files/patch-bug774671 =================================================================== --- head/www/seamonkey/files/patch-bug774671 (nonexistent) +++ head/www/seamonkey/files/patch-bug774671 (revision 303831) @@ -0,0 +1,15 @@ +--- mozilla/js/src/jsprvtd.h.orig 2012-08-27 06:49:16.000000000 +0200 ++++ mozilla/js/src/jsprvtd.h 2012-09-06 22:21:52.000000000 +0200 +@@ -149,9 +149,9 @@ + class UpvarCookie; + + class Proxy; +-class BaseProxyHandler; +-class DirectWrapper; +-class CrossCompartmentWrapper; ++class JS_FRIEND_API(BaseProxyHandler); ++class JS_FRIEND_API(DirectWrapper); ++class JS_FRIEND_API(CrossCompartmentWrapper); + + class TempAllocPolicy; + class RuntimeAllocPolicy; Property changes on: head/www/seamonkey/files/patch-bug774671 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug787904 =================================================================== --- head/www/seamonkey/files/patch-bug787904 (nonexistent) +++ head/www/seamonkey/files/patch-bug787904 (revision 303831) @@ -0,0 +1,12 @@ +--- mozilla/js/src/gc/Heap.h ++++ mozilla/js/src/gc/Heap.h +@@ -108,7 +108,8 @@ struct Cell + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ +-#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) ++#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ ++ (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) + const size_t PageShift = 13; + #else + const size_t PageShift = 12; Property changes on: head/www/seamonkey/files/patch-bug787904 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-bug788039 =================================================================== --- head/www/seamonkey/files/patch-bug788039 (nonexistent) +++ head/www/seamonkey/files/patch-bug788039 (revision 303831) @@ -0,0 +1,59 @@ +# Bug 788039 - With no prefix search libevent via pkg-config. + +--- mozilla/config/autoconf.mk.in~ ++++ mozilla/config/autoconf.mk.in +@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA + + MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@ + MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@ +-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@ ++MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@ + + MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@ + MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@ +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -3854,7 +3854,7 @@ fi + dnl system libevent Support + dnl ======================================================== + MOZ_ARG_WITH_STRING(system-libevent, +-[ --with-system-libevent=[PFX] ++[ --with-system-libevent[=PFX] + Use system libevent [installed at prefix PFX]], + LIBEVENT_DIR=$withval) + +@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS + _SAVE_LIBS=$LIBS + if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then + MOZ_NATIVE_LIBEVENT= ++elif test "$LIBEVENT_DIR" = yes; then ++ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent, ++ MOZ_NATIVE_LIBEVENT=1, ++ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found])) + else +- if test "${LIBEVENT_DIR}" = "yes"; then +- LIBEVENT_DIR=/usr +- fi + CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS" + LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS" + MOZ_CHECK_HEADER(event.h, +@@ -3876,16 +3877,16 @@ else + AC_MSG_ERROR([--with-system-libevent requested but event.h not found])) + AC_CHECK_LIB(event, event_init, + [MOZ_NATIVE_LIBEVENT=1 +- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include" ++ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include" + MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"], +- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=]) ++ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS + LIBS=$_SAVE_LIBS + + AC_SUBST(MOZ_NATIVE_LIBEVENT) +-AC_SUBST(MOZ_LIBEVENT_INCLUDES) ++AC_SUBST(MOZ_LIBEVENT_CFLAGS) + AC_SUBST(MOZ_LIBEVENT_LIBS) + + dnl ======================================================== Property changes on: head/www/seamonkey/files/patch-bug788039 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-clang32-libc++-visibility-hack =================================================================== --- head/www/seamonkey/files/patch-clang32-libc++-visibility-hack (nonexistent) +++ head/www/seamonkey/files/patch-clang32-libc++-visibility-hack (revision 303831) @@ -0,0 +1,57 @@ +--- configure.in~ ++++ configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/configure.in~ ++++ mozilla/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then +--- mozilla/js/src/configure.in~ ++++ mozilla/js/src/configure.in +@@ -2855,6 +2855,7 @@ EOF + #pragma GCC visibility push(hidden) + #pragma GCC visibility push(default) + #include ++#include + #pragma GCC visibility pop + + __attribute__ ((visibility ("default"))) void Func() { +@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() { + } + EOF + ac_cv_have_visibility_builtin_bug=no +- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then ++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then + ac_cv_have_visibility_builtin_bug=yes + else + if test `grep -c "@PLT" conftest.S` = 0; then Property changes on: head/www/seamonkey/files/patch-clang32-libc++-visibility-hack ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +1 \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in =================================================================== --- head/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303830) +++ head/www/seamonkey/files/patch-mozilla-ipc-chromium-Makefile.in (revision 303831) @@ -1,28 +1,28 @@ --- mozilla/ipc/chromium/Makefile.in~ +++ mozilla/ipc/chromium/Makefile.in @@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) +# workaround IPC hang with libevent2 +ifndef MOZ_DEBUG +ifneq (,$(filter 4.2.%, $(CXX_VERSION))) +MOZ_OPTIMIZE_FLAGS = -O1 +OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS) +endif +endif + LIBRARY_NAME = chromium_s FORCE_STATIC_LIB = 1 LIBXUL_LIBRARY = 1 @@ -55,9 +60,7 @@ vpath %.c \ $(srcdir)/src/third_party/libevent \ $(NULL) else # } else { -# message_pump_libevent.cc includes third_party/libevent/event.h, -# which we put in $(DIST), see export rule below -LOCAL_INCLUDES += -I$(DIST) -+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_INCLUDES)) ++LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS)) endif # } vpath %.cc \ Index: head/www/seamonkey-i18n/Makefile =================================================================== --- head/www/seamonkey-i18n/Makefile (revision 303830) +++ head/www/seamonkey-i18n/Makefile (revision 303831) @@ -1,88 +1,93 @@ +# New ports collection makefile for: firefox3-i18n +# Date created: 28 May 2006 +# Whom: Andrew Pantyukhin +# # $FreeBSD$ +# PORTNAME= seamonkey-i18n PORTVERSION= 2.12 CATEGORIES= www MASTER_SITE_SUBDIR= seamonkey/releases/${PORTVERSION}/langpack PKGNAMEPREFIX= DISTFILES= ${SEAMONKEY_I18N_:S/$/.langpack.xpi/:S/^/seamonkey-${PORTVERSION}./} DIST_SUBDIR= xpi/${DISTNAME} MAINTAINER= gecko@FreeBSD.org COMMENT= Localized interface for SeaMonkey EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip PLIST?= ${WRKDIR}/plist PLISTD?= ${WRKDIR}/plist_dirs PLISTF?= ${WRKDIR}/plist_files USE_SEAMONKEY= 12 USE_XPI= seamonkey linux-seamonkey USE_SUBMAKE= yes WDIR= langpack-*@seamonkey.mozilla.org XPI_DISTNAMES= ${SEAMONKEY_I18N_} .ifndef WITHOUT_SWITCHER RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-switcher .endif .include "${.CURDIR}/Makefile.option" .include .include "${.CURDIR}/Makefile.lang" SEAMONKEY_I18N_?= ${SEAMONKEY_I18N} .for dist in ${XPI_DISTNAMES} XPI_ID_${dist}= langpack-${dist}@seamonkey.mozilla.org .endfor pre-everything:: @${ECHO_CMD} @${ECHO_CMD} "Please define SEAMONKEY_I18N_ALL to install all languages." @${ECHO_CMD} do-extract: @${MKDIR} ${WRKSRC} @for lang in ${SEAMONKEY_I18N_}; do \ if ! (${EXTRACT_CMD} ${_DISTDIR}/seamonkey-${PORTVERSION}.$$lang.langpack.xpi -d ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org);\ then \ exit 1; \ fi; \ cd ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org/; \ ${FIND} -H -s * ! -type d | \ ${SED} -e "s|^|lib/xpi/langpack-$$lang@seamonkey.mozilla.org/|" >> ${PLISTF} && \ ${FIND} -d * -type d | \ ${SED} -e "s|^|@dirrm lib/xpi/langpack-$$lang@seamonkey.mozilla.org/|" >> ${PLISTD}; \ done ${CAT} ${PLISTF} | ${SORT} >> ${PLIST} ${CAT} ${PLISTD} | ${SORT} -r >> ${PLIST} do-install: @${INSTALL} -d ${XPI_LIBDIR} ${XPI_SLDIRS_ALL} @${CP} -R ${WRKSRC}/ ${XPI_LIBDIR}/ @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${WDIR}/ @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${WDIR}/ @for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q} ; } @${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A} @${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { \ ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q}; }' ${_A} @${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ${XPI_LIBDIR}; { ${RM} -fR $$_dir/${WDIR} ; }' ${_A} @${ECHO_CMD} '@unexec ${RMDIR} ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A} post-patch: ${FIND} ${WRKSRC} -name install.rdf -print0 | \ ${XARGS} -0L1 ${REINPLACE_CMD} -i '' -e '/ Index: head/www/seamonkey-i18n/Makefile.lang =================================================================== --- head/www/seamonkey-i18n/Makefile.lang (revision 303830) +++ head/www/seamonkey-i18n/Makefile.lang (revision 303831) @@ -1,81 +1,85 @@ +# New ports collection makefile.lang for: firefox3-i18n +# Date created: 30 Nov 2008 +# Whom: Koji Yokota +# # $FreeBSD$ # -# Currently, the following languages are supported. +# Currently, the following 22 languages are supported. # SEAMONKEY_I18N_ALL_= ca cs de en-GB en-US es-AR es-ES \ fi fr hu it ja-JP-mac ja lt nb-NO nl pl \ pt-PT ru sk sv-SE tr uk .if defined(SEAMONKEY_I18N_ALL) || (defined(PACKAGE_BUILDING) && !exists(${OPTIONSFILE})) || make(makesum) SEAMONKEY_I18N= ${SEAMONKEY_I18N_ALL_} .else .ifndef WITHOUT_LANG_CA SEAMONKEY_I18N+= ca .endif .ifndef WITHOUT_LANG_CS SEAMONKEY_I18N+= cs .endif .ifndef WITHOUT_LANG_DE SEAMONKEY_I18N+= de .endif .ifndef WITHOUT_LANG_GB SEAMONKEY_I18N+= en-GB .endif .ifndef WITHOUT_LANG_US SEAMONKEY_I18N+= en-US .endif .ifndef WITHOUT_LANG_SA SEAMONKEY_I18N+= es-AR .endif .ifndef WITHOUT_LANG_ES SEAMONKEY_I18N+= es-ES .endif .ifndef WITHOUT_LANG_FI SEAMONKEY_I18N+= fi .endif .ifndef WITHOUT_LANG_FR SEAMONKEY_I18N+= fr .endif .ifndef WITHOUT_LANG_HU SEAMONKEY_I18N+= hu .endif .ifndef WITHOUT_LANG_IT SEAMONKEY_I18N+= it .endif .ifndef WITHOUT_LANG_JP SEAMONKEY_I18N+= ja-JP-mac .endif .ifndef WITHOUT_LANG_JA SEAMONKEY_I18N+= ja .endif .ifndef WITHOUT_LANG_LT SEAMONKEY_I18N+= lt .endif .ifndef WITHOUT_LANG_NB SEAMONKEY_I18N+= nb-NO .endif .ifndef WITHOUT_LANG_NL SEAMONKEY_I18N+= nl .endif .ifndef WITHOUT_LANG_PL SEAMONKEY_I18N+= pl .endif .ifndef WITHOUT_LANG_PT SEAMONKEY_I18N+= pt-PT .endif .ifndef WITHOUT_LANG_RU SEAMONKEY_I18N+= ru .endif .ifndef WITHOUT_LANG_SK SEAMONKEY_I18N+= sk .endif .ifndef WITHOUT_LANG_SE SEAMONKEY_I18N+= sv-SE .endif .ifndef WITHOUT_LANG_TR SEAMONKEY_I18N+= tr .endif .ifndef WITHOUT_LANG_UA SEAMONKEY_I18N+= uk .endif .endif Index: head/www/seamonkey-i18n/Makefile.option =================================================================== --- head/www/seamonkey-i18n/Makefile.option (revision 303830) +++ head/www/seamonkey-i18n/Makefile.option (revision 303831) @@ -1,25 +1,30 @@ +# New ports collection makefile.option for: firefox3-i18n +# Date created: 30 Nov 2008 +# Whom: Koji Yokota +# # $FreeBSD$ +# OPTIONS= LANG_CA "Catalan" off \ LANG_CS "Czech" off \ LANG_NL "Dutch" off \ LANG_DE "German" on \ LANG_GB "English GB" off \ LANG_US "English US" off \ LANG_FI "Finnish" off \ LANG_FR "French" on \ LANG_HU "Hungarian" on \ LANG_IT "Italian" on \ LANG_JA "Japanese" off \ LANG_JP "Japanese (ja-JP-mac)" off \ LANG_LT "Lithuanian" off \ LANG_NB "Norwegian" off \ LANG_PL "Polish" off \ LANG_PT "Portuguese" off \ LANG_RU "Russian" on \ LANG_ES "Spanish" on \ LANG_SA "Spanish (Argentina)" off \ LANG_SE "Swedish" off \ LANG_SK "Slovak" off \ LANG_TR "Turkish" off \ LANG_UA "Ukrainian" off