xulrunner192: fix build on netbsd-current

This package uses a cdefs.h that originated out of BSD so redefines a lot
of macros normally in BSD's cdefs.h. avoid redefining if those macros
already exist.

Adjust GCC version check to match intention, it was GCC < 2.5 without
__attribute__, not every GCC with a minor below 5!

Patch from Chavdar Ivanov on pkgsrc-users, adjusted to be more conservative
by myself (it's likely some operating systems do need __BEGIN_DECLS!)

PKGREVISION->38 out of paranoia
This commit is contained in:
maya 2017-08-05 09:39:01 +00:00
parent d61ad15928
commit 07b0779508
3 changed files with 37 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.53 2017/04/22 21:03:34 adam Exp $
# $NetBSD: Makefile,v 1.54 2017/08/05 09:39:01 maya Exp $
.include "dist.mk"
PKGNAME= xulrunner192-${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
PKGREVISION= 37
PKGREVISION= 38
CATEGORIES= devel www
MAINTAINER= pkgsrc-users@NetBSD.org

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.23 2016/09/16 11:42:24 jperkin Exp $
$NetBSD: distinfo,v 1.24 2017/08/05 09:39:01 maya Exp $
SHA1 (firefox-3.6.28.source.tar.bz2) = adeaa9bdd367878c5b522766e681798178e31577
RMD160 (firefox-3.6.28.source.tar.bz2) = 87cfca8e3f1df30e06eccffbf994825904eeedbc
@ -40,6 +40,7 @@ SHA1 (patch-config_milestone.pl) = 11252595ce322f6f3307ec6597ac4b9eb71bbf75
SHA1 (patch-config_system-headers) = f0e83260d7fff51973ba1df7fd1eac2ad5edb294
SHA1 (patch-content_svg_content_src_nsSVGFilters.cpp) = ab83b19616148054046f5b2befdd1c447e27d485
SHA1 (patch-content_svg_content_src_nsSVGFilters.h) = d6a7b2616a450a182e227d917203b7369dbf184e
SHA1 (patch-dbm_include_cdefs.h) = ee6ab75552ccd97e6ea901ff3e3081f9b7fa235a
SHA1 (patch-dom_src_threads_nsDOMWorkerEvents.cpp) = 2e29c52ddefa76a7ce28307d6dc8c0a87d8cecc2
SHA1 (patch-dom_src_threads_nsDOMWorkerEvents.h) = ab131c359b0a354615381ba4991b7f2d9d4cb723
SHA1 (patch-embedding_browser_gtk_src_EmbedPrivate.cpp) = a0ec26c6ca751e51586498e33b4f51b63799e3d2

View file

@ -0,0 +1,33 @@
$NetBSD: patch-dbm_include_cdefs.h,v 1.1 2017/08/05 09:39:01 maya Exp $
Don't redefine __BEGIN_DECLS
Match GCC minimum version check to comment (don't spuriously apply to modern
compilers)
--- dbm/include/cdefs.h.orig 2012-03-06 14:45:25.000000000 +0000
+++ dbm/include/cdefs.h
@@ -38,6 +38,7 @@
#ifndef _CDEFS_H_
#define _CDEFS_H_
+#ifndef __BEGIN_DECLS
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
@@ -45,6 +46,7 @@
#define __BEGIN_DECLS
#define __END_DECLS
#endif
+#endif
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
@@ -109,7 +111,7 @@
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
* in the distribution version of 2.5.5).
*/
-#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
+#if !defined(__GNUC__) || (__GNUC__ < 2 && __GNUC_MINOR__ < 5)
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __dead __volatile