diff options
author | jschauma <jschauma@pkgsrc.org> | 2006-12-02 22:32:59 +0000 |
---|---|---|
committer | jschauma <jschauma@pkgsrc.org> | 2006-12-02 22:32:59 +0000 |
commit | 721b60b433c2f8906e5064206e90937b196829ca (patch) | |
tree | 97923b6df098fa627f577ea81af4285038c9d84a | |
parent | 114ef6550554f18c0cd488aa39d20668e70e4f54 (diff) | |
download | pkgsrc-721b60b433c2f8906e5064206e90937b196829ca.tar.gz |
Instead of setting compiler flags in each package if it uses C99,
allow USE_LANGUAGES+=c99 and let gcc and mipspro do the right thing.
May need to be reviewed/added for other compilers.
ok rillig@
-rw-r--r-- | converters/libiconv/Makefile | 9 | ||||
-rw-r--r-- | databases/shared-mime-info/Makefile | 9 | ||||
-rw-r--r-- | devel/atk/Makefile | 9 | ||||
-rw-r--r-- | devel/glib2/Makefile | 10 | ||||
-rw-r--r-- | devel/gmp/Makefile | 10 | ||||
-rw-r--r-- | graphics/ImageMagick/Makefile | 10 | ||||
-rw-r--r-- | graphics/cairo/Makefile | 9 | ||||
-rw-r--r-- | graphics/glitz/Makefile | 9 | ||||
-rw-r--r-- | graphics/jasper/Makefile | 9 | ||||
-rw-r--r-- | mk/compiler.mk | 6 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 6 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 6 | ||||
-rw-r--r-- | net/tor/Makefile | 7 | ||||
-rw-r--r-- | print/ghostscript-gnu/Makefile | 9 | ||||
-rw-r--r-- | x11/gtk/Makefile | 9 |
15 files changed, 37 insertions, 90 deletions
diff --git a/converters/libiconv/Makefile b/converters/libiconv/Makefile index 8e57f646787..5d5f0d66b9b 100644 --- a/converters/libiconv/Makefile +++ b/converters/libiconv/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.44 2006/11/14 13:55:34 joerg Exp $ +# $NetBSD: Makefile,v 1.45 2006/12/02 22:33:00 jschauma Exp $ DISTNAME= libiconv-1.10 PKGREVISION= 3 @@ -16,6 +16,7 @@ PATCH_DIST_STRIP= -p1 PKG_INSTALLATION_TYPES= overwrite pkgviews PKG_DESTDIR_SUPPORT= user-destdir +USE_LANGUAGES+= c99 USE_LIBTOOL= yes GNU_CONFIGURE= yes @@ -32,12 +33,6 @@ REQD_FILES= ${EGDIR}/charset.alias ${PREFIX}/lib/charset.alias MAKE_ENV+= PAX=${PAX:Q} -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - # remove any existing charset.alias; if it already exists, libiconv does # not overwrite it, and older versions of libiconv wrote incorrect # charset.alias files, which were not removed during deinstall since diff --git a/databases/shared-mime-info/Makefile b/databases/shared-mime-info/Makefile index 86630ef3547..5d23dfa1cb6 100644 --- a/databases/shared-mime-info/Makefile +++ b/databases/shared-mime-info/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2006/10/04 20:53:46 wiz Exp $ +# $NetBSD: Makefile,v 1.26 2006/12/02 22:33:00 jschauma Exp $ # DISTNAME= shared-mime-info-0.19 @@ -12,6 +12,7 @@ COMMENT= Core database of common types PKG_INSTALLATION_TYPES= overwrite pkgviews GNU_CONFIGURE= YES +USE_LANGUAGES+= c99 USE_LIBTOOL= YES USE_PKGLOCALEDIR= YES USE_TOOLS+= gmake intltool msgfmt pkg-config @@ -22,12 +23,6 @@ CONFIGURE_ARGS+= --disable-update-mimedb CPPFLAGS+= -DPREFIX="\"${PREFIX}\"" -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - FILES_SUBST+= MIMEDB_PATH="${PREFIX}/share/mime" FILES_SUBST+= UPDATE_MIMEDB="${PREFIX}/bin/update-mime-database" diff --git a/devel/atk/Makefile b/devel/atk/Makefile index f27c7821851..eb344aa9ae6 100644 --- a/devel/atk/Makefile +++ b/devel/atk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.57 2006/10/17 16:51:42 drochner Exp $ +# $NetBSD: Makefile,v 1.58 2006/12/02 22:32:59 jschauma Exp $ # DISTNAME= atk-1.12.3 @@ -16,6 +16,7 @@ PKG_DESTDIR_SUPPORT= user-destdir USE_TOOLS+= gmake pkg-config msgfmt GNU_CONFIGURE= yes USE_PKGLOCALEDIR= yes +USE_LANGUAGES+= c99 USE_LIBTOOL= yes PKGCONFIG_OVERRIDE= atk.pc.in @@ -27,12 +28,6 @@ UNLIMIT_RESOURCES= stacksize BUILDLINK_API_DEPENDS.glib2+= glib2>=2.6.3 -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index a85c110c68e..5f924d06ff3 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.109 2006/11/13 18:34:38 drochner Exp $ +# $NetBSD: Makefile,v 1.110 2006/12/02 22:32:59 jschauma Exp $ DISTNAME= glib-2.12.4 PKGNAME= ${DISTNAME:S/glib/glib2/} @@ -18,7 +18,7 @@ PKG_DESTDIR_SUPPORT= user-destdir USE_PKGLOCALEDIR= yes USE_TOOLS+= gmake msgfmt perl:run pkg-config -USE_LANGUAGES= c c++ +USE_LANGUAGES= c c++ c99 USE_LIBTOOL= yes TEST_TARGET= check @@ -54,12 +54,6 @@ CPPFLAGS+= -DPREFIX="\"${PREFIX}\"" CPPFLAGS+= -DPKGLOCALEDIR="\"${PKGLOCALEDIR}\"" CPPFLAGS+= -DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\"" -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - .if ${OPSYS} == "FreeBSD" SUBST_CLASSES+= thr diff --git a/devel/gmp/Makefile b/devel/gmp/Makefile index 9c3c331c086..8c0f595f1c8 100644 --- a/devel/gmp/Makefile +++ b/devel/gmp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2006/10/22 19:49:07 schwarz Exp $ +# $NetBSD: Makefile,v 1.41 2006/12/02 22:32:59 jschauma Exp $ DISTNAME= gmp-4.1.4 PKGREVISION= 1 @@ -12,7 +12,7 @@ COMMENT= Library for arbitrary precision arithmetic PKG_INSTALLATION_TYPES= overwrite pkgviews -USE_LANGUAGES= c c++ +USE_LANGUAGES= c c++ c99 USE_TOOLS+= gm4 USE_LIBTOOL= yes GNU_CONFIGURE= yes @@ -26,12 +26,6 @@ TEST_TARGET= check ABI= o32 .endif -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro) -CFLAGS+= -c99 -.endif - .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32" # The configure script thinks gcc 2.95 for ARM is too buggy to use. GCC_REQD+= 3.0 diff --git a/graphics/ImageMagick/Makefile b/graphics/ImageMagick/Makefile index 91643bbaf0d..e68dfae06e1 100644 --- a/graphics/ImageMagick/Makefile +++ b/graphics/ImageMagick/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.146 2006/11/30 22:55:31 joerg Exp $ +# $NetBSD: Makefile,v 1.147 2006/12/02 22:32:59 jschauma Exp $ .include "Makefile.common" @@ -13,7 +13,7 @@ CONFLICTS= geomview<1.8.1nb2 # used to have a program named 'animate' PKG_INSTALLATION_TYPES= overwrite pkgviews -USE_LANGUAGES= c c++ +USE_LANGUAGES= c c++ c99 USE_LIBTOOL= yes USE_TOOLS+= gmake GNU_CONFIGURE= yes @@ -44,12 +44,6 @@ CONFIGURE_ARGS+= --without-perl # WMF linkage is currently broke, since libMagick would need symbols from libWand CONFIGURE_ARGS+= --without-wmf -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - .include "../../archivers/bzip2/buildlink3.mk" .include "../../graphics/lcms/buildlink3.mk" .include "../../graphics/libexif/buildlink3.mk" diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index c57f6e2697d..d09684ae23e 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.51 2006/11/09 20:57:40 drochner Exp $ +# $NetBSD: Makefile,v 1.52 2006/12/02 22:32:59 jschauma Exp $ DISTNAME= cairo-1.2.6 CATEGORIES= graphics @@ -10,6 +10,7 @@ COMMENT= Vector graphics library with cross-device output support PKG_DESTDIR_SUPPORT= user-destdir +USE_LANGUAGES+= c99 USE_LIBTOOL= yes USE_PKGLOCALEDIR= yes USE_TOOLS+= pkg-config @@ -32,12 +33,6 @@ PLIST_SUBST+= CARBON="@comment " BUILDLINK_API_DEPENDS.glitz+= glitz>=0.5.1 -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - # For snprintf() CPPFLAGS.SunOS+= -D__EXTENSIONS__ diff --git a/graphics/glitz/Makefile b/graphics/glitz/Makefile index 658d1254603..d8516ce00e3 100644 --- a/graphics/glitz/Makefile +++ b/graphics/glitz/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2006/11/05 17:23:44 joerg Exp $ +# $NetBSD: Makefile,v 1.23 2006/12/02 22:32:59 jschauma Exp $ DISTNAME= glitz-0.5.6 PKGREVISION= 2 @@ -11,6 +11,7 @@ COMMENT= OpenGL 2D graphics library and a backend for gl output in cairo PKG_DESTDIR_SUPPORT= user-destdir +USE_LANGUAGES+= c99 USE_LIBTOOL= yes GNU_CONFIGURE= yes PKGCONFIG_OVERRIDE= src/agl/glitz-agl.pc.in src/glx/glitz-glx.pc.in \ @@ -23,12 +24,6 @@ CONFIGURE_ENV+= AGL_LIBS="-framework AGL" PLIST_SUBST+= AGL="@comment " .endif -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - .include "options.mk" .include "../../mk/pthread.buildlink3.mk" diff --git a/graphics/jasper/Makefile b/graphics/jasper/Makefile index eee771d4bef..7cfbe2436b5 100644 --- a/graphics/jasper/Makefile +++ b/graphics/jasper/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2006/02/05 23:09:34 joerg Exp $ +# $NetBSD: Makefile,v 1.21 2006/12/02 22:32:59 jschauma Exp $ # DISTNAME= jasper-1.701.0 @@ -14,15 +14,10 @@ COMMENT= Software-based reference implementation of the JPEG-2000 codec PKG_INSTALLATION_TYPES= overwrite pkgviews GNU_CONFIGURE= YES +USE_LANGUAGES+= c99 USE_LIBTOOL= YES CONFIGURE_ARGS+= --enable-shared --without-x --disable-opengl -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/jasper .for doc in jasper jpeg2000 diff --git a/mk/compiler.mk b/mk/compiler.mk index 158dc65ed13..9e08c8d6c7b 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.56 2006/11/16 02:42:13 markd Exp $ +# $NetBSD: compiler.mk,v 1.57 2006/12/02 22:32:59 jschauma Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -49,8 +49,8 @@ # USE_LANGUAGES # Lists the languages used in the source code of the package, # and is used to determine the correct compilers to install. -# Valid values are: c, c++, fortran, java, objc. The default -# is "c". +# Valid values are: c, c99, c++, fortran, java, objc. The +# default is "c". # # The following variables are defined, and available for testing in # package Makefiles: diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 1c7845163ba..465d181c455 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.85 2006/10/22 00:14:17 rillig Exp $ +# $NetBSD: gcc.mk,v 1.86 2006/12/02 22:32:59 jschauma Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -137,6 +137,10 @@ _LANGUAGES.gcc= # empty _LANGUAGES.gcc+= ${LANGUAGES.gcc:M${_lang_}} .endfor +.if !empty(USE_LANGUAGES:Mc99) +_WRAP_EXTRA_ARGS.CC+= -std=c99 +.endif + # GCC has this annoying behaviour where it advocates in a multi-line # banner the use of "#include" over "#import" when including headers. # This generates a huge number of warnings when building practically all diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index ef44bfc6ddc..be8ba1ef75f 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.35 2006/10/22 00:14:17 rillig Exp $ +# $NetBSD: mipspro.mk,v 1.36 2006/12/02 22:32:59 jschauma Exp $ # # This is the compiler definition for the MIPSpro C compiler. # @@ -71,6 +71,10 @@ _LANGUAGES.mipspro= # empty _LANGUAGES.mipspro+= ${LANGUAGES.mipspro:M${_lang_}} .endfor +.if !empty(USE_LANGUAGES:Mc99) +_WRAP_EXTRA_ARGS.CC+= -c99 +.endif + # Prepend the path to the compiler to the PATH. .if !empty(_LANGUAGES.mipspro) PREPEND_PATH+= ${_MIPSPRO_DIR}/bin diff --git a/net/tor/Makefile b/net/tor/Makefile index aed3b72ce11..bf9fedc034a 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2006/11/08 19:41:10 tv Exp $ +# $NetBSD: Makefile,v 1.37 2006/12/02 22:32:59 jschauma Exp $ # DISTNAME= tor-0.1.1.25 @@ -11,6 +11,7 @@ COMMENT= Anonymizing overlay network for TCP .include "../../mk/bsd.prefs.mk" +USE_LANGUAGES+= c99 USE_PKGLOCALEDIR= yes GNU_CONFIGURE= yes @@ -37,10 +38,6 @@ FILES_SUBST+= TOR_USER=${TOR_USER:Q} TOR_GROUP=${TOR_GROUP:Q} CHECK_PORTABILITY_SKIP+=contrib/* -.if !empty(PKGSRC_COMPILER:Mmipspro) -CFLAGS+= -c99 -.endif - post-patch: ${SED} -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g' \ -e 's|@PREFIX@|${PREFIX}|g' \ diff --git a/print/ghostscript-gnu/Makefile b/print/ghostscript-gnu/Makefile index 10b5a323e5e..7c243b5e787 100644 --- a/print/ghostscript-gnu/Makefile +++ b/print/ghostscript-gnu/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2006/11/05 17:34:44 joerg Exp $ +# $NetBSD: Makefile,v 1.16 2006/12/02 22:33:00 jschauma Exp $ DISTNAME= ghostscript-${GS_VERS} PKGNAME= ghostscript-gnu-${GS_VERS} @@ -22,6 +22,7 @@ CONFLICTS+= ghostscript-gnu{,-nox11,-x11}-[0-9]* DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts +USE_LANGUAGES+= c99 USE_TOOLS+= gmake GNU_CONFIGURE= YES CONFIGURE_ARGS+= --with-ijs @@ -76,12 +77,6 @@ LIBDIR= ${GSDATADIR}/lib PLIST_SUBST+= GS_VERS=${GS_VERS:Q} -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - post-extract: ${MKDIR} ${WRKSRC}/bin ${MKDIR} ${WRKSRC}/obj diff --git a/x11/gtk/Makefile b/x11/gtk/Makefile index dfb6aad60b6..61317183725 100644 --- a/x11/gtk/Makefile +++ b/x11/gtk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.119 2006/06/15 20:40:16 jlam Exp $ +# $NetBSD: Makefile,v 1.120 2006/12/02 22:33:00 jschauma Exp $ DISTNAME= gtk+-1.2.10 PKGREVISION= 9 @@ -20,6 +20,7 @@ USE_DIRS+= xdg-1.1 USE_X11BASE= yes USE_TOOLS+= gmake msgfmt perl USE_PKGLOCALEDIR= yes +USE_LANGUAGES+= c99 USE_LIBTOOL= yes PKGCONFIG_OVERRIDE= gdk.pc.in PKGCONFIG_OVERRIDE+= gtk+.pc.in @@ -44,12 +45,6 @@ GTK_MAJOR_VERSION= ${GTK_VERSION:C/\..*//} GTK_MINOR_VERSION= ${GTK_VERSION:C/[^.]*\.//:C/\..*//} GTK_MICRO_VERSION= ${GTK_VERSION:C/.*\.//} -.include "../../mk/compiler.mk" - -.if !empty(PKGSRC_COMPILER:Mmipspro*) -CFLAGS+= -c99 -.endif - # We patch the version info in the configure scripts for reasons related to # shared library numbering, but we don't want it to leak into the various # installed files. Explicitly replace the version number with the correct |