Wed May 24 15:19:12 2017 UTC ()
Fix SunOS build with GCC 7 and newer.


(jperkin)
diff -r1.26 -r1.27 pkgsrc/print/ghostscript-gpl/Makefile

cvs diff -r1.26 -r1.27 pkgsrc/print/ghostscript-gpl/Makefile (expand / switch to unified diff)

--- pkgsrc/print/ghostscript-gpl/Makefile 2017/05/19 13:29:04 1.26
+++ pkgsrc/print/ghostscript-gpl/Makefile 2017/05/24 15:19:12 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.26 2017/05/19 13:29:04 prlw1 Exp $ 1# $NetBSD: Makefile,v 1.27 2017/05/24 15:19:12 jperkin Exp $
2 2
3DISTNAME= ghostscript-${GS_VERSION} 3DISTNAME= ghostscript-${GS_VERSION}
4PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-gpl/} 4PKGNAME= ${DISTNAME:S/ghostscript/ghostscript-gpl/}
5PKGREVISION= 13 5PKGREVISION= 13
6CATEGORIES= print 6CATEGORIES= print
7MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ghostscript/} 7MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ghostscript/}
8MASTER_SITES+= http://ghostscript.com/releases/ 8MASTER_SITES+= http://ghostscript.com/releases/
9EXTRACT_SUFX= .tar.bz2 9EXTRACT_SUFX= .tar.bz2
10 10
11MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
12HOMEPAGE= http://ghostscript.sourceforge.net/ 12HOMEPAGE= http://ghostscript.sourceforge.net/
13COMMENT= Postscript interpreter 13COMMENT= Postscript interpreter
14 14
@@ -65,26 +65,30 @@ SUBST_STAGE.resdir= post-extract @@ -65,26 +65,30 @@ SUBST_STAGE.resdir= post-extract
65SUBST_MESSAGE.resdir= Fixing resource directory path 65SUBST_MESSAGE.resdir= Fixing resource directory path
66SUBST_FILES.resdir= Resource/Init/gs_res.ps 66SUBST_FILES.resdir= Resource/Init/gs_res.ps
67SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g" 67SUBST_SED.resdir= -e "s|/Resource/|${GS_RESOURCEDIR}/|g"
68 68
69CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no 69CONFIGURE_ENV.HPUX+= ac_cv_func_fopen64=no
70 70
71# On Linux-*-x86_64, there was an error message: 71# On Linux-*-x86_64, there was an error message:
72# gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be 72# gp_unix.o: relocation R_X86_64_32 against `a local symbol' can not be
73# used when making a shared object; recompile with -fPIC 73# used when making a shared object; recompile with -fPIC
74.if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang) 74.if !empty(PKGSRC_COMPILER:Mgcc) || !empty(PKGSRC_COMPILER:Mclang)
75CFLAGS+= -fPIC 75CFLAGS+= -fPIC
76.endif 76.endif
77 77
 78.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc-[7-9]*)
 79CPPFLAGS+= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
 80.endif
 81
78# Interim IRIX build fix, the real problem is that fontconfig.pc doesn't 82# Interim IRIX build fix, the real problem is that fontconfig.pc doesn't
79# require linking against libiconv when it should do so. 83# require linking against libiconv when it should do so.
80BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv 84BUILDLINK_TRANSFORM.IRIX+= l:fontconfig:fontconfig:iconv
81 85
82CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib 86CONFIGURE_ENV+= LPLIBDIR=${PREFIX}/lib
83 87
84# On OpenBSD 5.3, libxcb is required libXt. 88# On OpenBSD 5.3, libxcb is required libXt.
85LDFLAGS.OpenBSD+= -lxcb 89LDFLAGS.OpenBSD+= -lxcb
86 90
87.if ${OS_VARIANT} == "SCOOSR5" 91.if ${OS_VARIANT} == "SCOOSR5"
88# SCO OpenServer 5.0.7/3.2 has windows.h, and configure expacts it for MS Windows. 92# SCO OpenServer 5.0.7/3.2 has windows.h, and configure expacts it for MS Windows.
89CONFIGURE_ENV+= ac_cv_header_windows_h=no 93CONFIGURE_ENV+= ac_cv_header_windows_h=no
90.endif 94.endif