1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

devel/aegis: fix build with clang

PR:		234881
Submitted by:	aryeh.friedman@gmail.com (maintainer)
This commit is contained in:
Steve Wills 2019-01-13 15:25:51 +00:00
parent fd7f74c64f
commit ace0c3b7d1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=490145
6 changed files with 99 additions and 2 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= aegis PORTNAME= aegis
PORTVERSION= 4.25 PORTVERSION= 4.25
DISTVERSIONSUFFIX= .D510 DISTVERSIONSUFFIX= .D510
PORTREVISION= 10 PORTREVISION= 11
CATEGORIES= devel CATEGORIES= devel
MASTER_SITES= SF MASTER_SITES= SF
@ -18,7 +18,6 @@ RUN_DEPENDS= tkdiff:textproc/tkdiff
USES= gettext ghostscript groff perl5 tk USES= gettext ghostscript groff perl5 tk
USE_GNOME= libxml2 USE_GNOME= libxml2
USE_GCC= any
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
CPPFLAGS+= "-I${LOCALBASE}/include" CPPFLAGS+= "-I${LOCALBASE}/include"
CONFIGURE_ARGS= --with-nlsdir="${PREFIX}/share/locale" CONFIGURE_ARGS= --with-nlsdir="${PREFIX}/share/locale"

View File

@ -0,0 +1,26 @@
--- common/ac/shared_ptr.h.orig 2012-12-04 02:03:33 UTC
+++ common/ac/shared_ptr.h
@@ -21,23 +21,6 @@
#define COMMON_AC_SHARED_PTR_H
#include <common/config.h>
-
-#ifdef HAVE_TR1_MEMORY
-
-#include <tr1/memory>
-
-#define aegis_shared_ptr std::tr1::shared_ptr
-
-#elif HAVE_BOOST_SHARED_PTR_HPP
-
-#include <boost/shared_ptr.hpp>
-
-#define aegis_shared_ptr boost::shared_ptr
-
-#else
-
#include <common/ac/shared_ptr/aegis.h>
-#endif
-
#endif // COMMON_AC_SHARED_PTR_H

View File

@ -0,0 +1,15 @@
--- common/ac/string.h.orig 2012-12-04 02:03:33 UTC
+++ common/ac/string.h
@@ -128,10 +128,12 @@ size_t strlcat(char *dst, const char *sr
char *strendcpy(char *dst, const char *src, const char *end);
#endif
+/*
#undef strcat
#define strcat strcat_is_unsafe__use_strendcat_instead@
#undef strcpy
#define strcpy strcpy_is_unsafe__use_strendcpy_instead@
+*/
#ifndef HAVE_MEMMEM
void *memmem(const void *, size_t, const void *, size_t);

View File

@ -0,0 +1,37 @@
--- etc/configure.ac.orig 2012-12-04 02:03:33 UTC
+++ etc/configure.ac
@@ -649,8 +649,8 @@ AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
-AC_COMPUTE_INT(ac_cv_long_bit, [sizeof(long) * CHAR_BIT], [#include <limits.h>],
- [ac_cv_long_bit="sizeof(long) * CHAR_BIT"])
+AC_COMPUTE_INT(ac_cv_long_bit, [LONG_BIT], [#include <limits.h>],
+ [ac_cv_long_bit="LONG_BIT"])
AC_DEFINE_UNQUOTED(LONG_BIT, [$ac_cv_long_bit],
[Define this symbol to be the number of bits in a long.
This is analogous to the standard CHAR_BIT define.])
@@ -849,15 +849,15 @@ dnl!
AC_MSG_CHECKING([for tm_zone in struct tm])
AC_TRY_COMPILE([
#include <stdio.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
+dnl! #ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
-#else
-#include <time.h>
-#endif
+dnl! #include <time.h>
+dnl! #else
+dnl! #ifdef HAVE_SYS_TIME_H
+dnl! #include <sys/time.h>
+dnl! #else
+dnl! #include <time.h>
+dnl! #endif
#endif], [struct tm *tm;
printf("%s\n", tm->tm_zone);],
AC_DEFINE(HAVE_tm_zone,1,

View File

@ -0,0 +1,10 @@
--- libaegis/introspector/time.h.orig 2012-12-04 02:03:33 UTC
+++ libaegis/introspector/time.h
@@ -19,6 +19,7 @@
#ifndef LIBAEGIS_INTROSPECTOR_TIME_H
#define LIBAEGIS_INTROSPECTOR_TIME_H
+#include <time.h>
#include <libaegis/introspector.h>
#include <libaegis/output.h>

View File

@ -0,0 +1,10 @@
--- libaegis/introspector/vector.h.orig 2012-12-04 02:03:33 UTC
+++ libaegis/introspector/vector.h
@@ -19,6 +19,7 @@
#ifndef LIBAEGIS_INTROSPECTOR_VECTOR_H
#define LIBAEGIS_INTROSPECTOR_VECTOR_H
+#include <sys/types.h>
#include <libaegis/introspector.h>
/**