MFH: r513712

Make buildable on non-x86 architecture:

- CImg.h assumes signed char, make it signed explicitly.

- -mtune=generic doesn't exist on e.g. powerpc64.

- USES=compiler:c11 is necessary.

PR:		241026
Submitted by:	pkubaj

Approved by:	portmgr (tier-2 blanket)
This commit is contained in:
Mark Linimon 2019-12-07 13:00:44 +00:00
parent e2577670a7
commit a9ea421e35
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q4/; revision=519208
3 changed files with 13 additions and 10 deletions

View File

@ -19,19 +19,11 @@ LICENSE_FILE_CeCILL= ${WRKSRC}/Licence_CeCILL_V2-en.txt
LICENSE_PERMS_CeCILL_C= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_PERMS_CeCILL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
BROKEN_aarch64= invokes x86 assembler
BROKEN_armv6= invokes x86 assembler
BROKEN_armv7= invokes x86 assembler
BROKEN_mips= invokes x86 assembler
BROKEN_mips64= invokes x86 assembler
BROKEN_sparc64= invokes x86 assembler
BROKEN_powerpc64= invokes x86 assembler
USE_GITHUB= yes
GH_ACCOUNT= dtschump
GH_PROJECT= CImg
USES= xorg
USES= compiler:c11 xorg
.if !defined(WITHOUT_LAPACK)
. if defined(WITH_ATLAS)

View File

@ -0,0 +1,11 @@
--- CImg.h.orig 2019-09-24 20:44:55 UTC
+++ CImg.h
@@ -6737,7 +6737,7 @@ namespace cimg_library_suffixed {
}
//! Return \c true if input character is blank (space, tab, or non-printable character).
- inline bool is_blank(const char c) {
+ inline bool is_blank(const signed char c) {
return c>=0 && c<=' ';
}

View File

@ -26,7 +26,7 @@
+OPT_CFLAGS = # -Ofast - handled by the port CFLAGS
ifdef IS_GCC
-OPT_CFLAGS = -Ofast -mtune=generic
+OPT_CFLAGS = -mtune=generic
+OPT_CFLAGS =
endif
ifdef IS_ICPC
OPT_CFLAGS = -fast