diff options
author | joerg <joerg@pkgsrc.org> | 2013-05-17 13:17:40 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-05-17 13:17:40 +0000 |
commit | 7f05ae9399885498f5fdbef6e23dc9ddd22f8c0b (patch) | |
tree | 74949aa442fd8da6c3393765d249c0b2ea20ba8a /x11/xproto | |
parent | 1ade5effd0a2f92043f7ab87c7012e5bded9100e (diff) | |
download | pkgsrc-7f05ae9399885498f5fdbef6e23dc9ddd22f8c0b.tar.gz |
Restore patches for correct Xos_r.h behavior and using the protected
names in Xfuncproto.h. Bump revision.
Diffstat (limited to 'x11/xproto')
-rw-r--r-- | x11/xproto/Makefile | 7 | ||||
-rw-r--r-- | x11/xproto/distinfo | 6 | ||||
-rw-r--r-- | x11/xproto/patches/patch-Xfuncproto.h.in | 35 | ||||
-rw-r--r-- | x11/xproto/patches/patch-Xos_r.h.in | 134 | ||||
-rw-r--r-- | x11/xproto/patches/patch-configure | 152 | ||||
-rw-r--r-- | x11/xproto/patches/patch-configure.ac | 28 |
6 files changed, 358 insertions, 4 deletions
diff --git a/x11/xproto/Makefile b/x11/xproto/Makefile index 3f481e974e5..f30810db8ec 100644 --- a/x11/xproto/Makefile +++ b/x11/xproto/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.23 2013/05/16 05:49:54 richard Exp $ +# $NetBSD: Makefile,v 1.24 2013/05/17 13:17:40 joerg Exp $ # DISTNAME= xproto-7.0.24 +PKGREVISION= 1 CATEGORIES= x11 devel MASTER_SITES= ${MASTER_SITE_XORG:=proto/} EXTRACT_SUFX= .tar.bz2 @@ -17,7 +18,7 @@ GNU_CONFIGURE= yes PKGCONFIG_OVERRIDE+= xproto.pc.in USE_LANGUAGES= c -#post-extract: -# ${MV} ${WRKSRC}/Xos_r.h ${WRKSRC}/Xos_r.h.in +post-extract: + ${MV} ${WRKSRC}/Xos_r.h ${WRKSRC}/Xos_r.h.in .include "../../mk/bsd.pkg.mk" diff --git a/x11/xproto/distinfo b/x11/xproto/distinfo index 2783b903a80..fb7096856be 100644 --- a/x11/xproto/distinfo +++ b/x11/xproto/distinfo @@ -1,5 +1,9 @@ -$NetBSD: distinfo,v 1.21 2013/05/16 05:49:54 richard Exp $ +$NetBSD: distinfo,v 1.22 2013/05/17 13:17:40 joerg Exp $ SHA1 (xproto-7.0.24.tar.bz2) = c05b5757174839644f2fd98c1b062150494b6b15 RMD160 (xproto-7.0.24.tar.bz2) = 9a4d909e2b434bb0f2b7664ed8f3331c94c98580 Size (xproto-7.0.24.tar.bz2) = 292795 bytes +SHA1 (patch-Xfuncproto.h.in) = be2f94377fb61af159b704d3028fc82f93959557 +SHA1 (patch-Xos_r.h.in) = 6de176ec5bef08d67286a14eca651b1968d0b4bb +SHA1 (patch-configure) = a589cc4b75bbaa4c93789d4ffc85a05fcaf0e25c +SHA1 (patch-configure.ac) = 446b38c6043d90fb0f80df5f5d70d0b57e572310 diff --git a/x11/xproto/patches/patch-Xfuncproto.h.in b/x11/xproto/patches/patch-Xfuncproto.h.in new file mode 100644 index 00000000000..6e72daa2ce1 --- /dev/null +++ b/x11/xproto/patches/patch-Xfuncproto.h.in @@ -0,0 +1,35 @@ +$NetBSD: patch-Xfuncproto.h.in,v 1.1 2013/05/17 13:17:40 joerg Exp $ + +--- Xfuncproto.h.in.orig 2013-03-29 23:26:53.000000000 +0000 ++++ Xfuncproto.h.in +@@ -84,9 +84,9 @@ in this Software without prior written a + + /* Added in X11R6.9, so available in any version of modular xproto */ + #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) && !defined(__MINGW32__) +-# define _X_EXPORT __attribute__((visibility("default"))) +-# define _X_HIDDEN __attribute__((visibility("hidden"))) +-# define _X_INTERNAL __attribute__((visibility("internal"))) ++# define _X_EXPORT __attribute__((__visibility__("default"))) ++# define _X_HIDDEN __attribute__((__visibility__("hidden"))) ++# define _X_INTERNAL __attribute__((__visibility__("internal"))) + #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) + # define _X_EXPORT __global + # define _X_HIDDEN __hidden +@@ -108,7 +108,7 @@ in this Software without prior written a + + /* Added in X11R6.9, so available in any version of modular xproto */ + #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) +-# define _X_DEPRECATED __attribute__((deprecated)) ++# define _X_DEPRECATED __attribute__((__deprecated__)) + #else /* not gcc >= 3.1 */ + # define _X_DEPRECATED + #endif +@@ -132,7 +132,7 @@ in this Software without prior written a + argument macros, must be only used inside #ifdef _X_NONNULL guards, as + many legacy X clients are compiled in C89 mode still. */ + #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) +-#define _X_NONNULL(args...) __attribute__((nonnull(args))) ++#define _X_NONNULL(args...) __attribute__((__nonnull__(args))) + #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ + #define _X_NONNULL(...) /* */ + #endif diff --git a/x11/xproto/patches/patch-Xos_r.h.in b/x11/xproto/patches/patch-Xos_r.h.in new file mode 100644 index 00000000000..83b3c8d7e3a --- /dev/null +++ b/x11/xproto/patches/patch-Xos_r.h.in @@ -0,0 +1,134 @@ +$NetBSD: patch-Xos_r.h.in,v 1.1 2013/05/17 13:17:40 joerg Exp $ + +--- Xos_r.h.in.orig 2013-03-29 23:26:53.000000000 +0000 ++++ Xos_r.h.in +@@ -73,13 +73,7 @@ in this Software without prior written a + # include <X11/Xfuncs.h> + + # ifndef X_NOT_POSIX +-# ifdef _POSIX_SOURCE +-# include <limits.h> +-# else +-# define _POSIX_SOURCE +-# include <limits.h> +-# undef _POSIX_SOURCE +-# endif ++# include <limits.h> + # ifndef LINE_MAX + # define X_LINE_MAX 2048 + # else +@@ -88,6 +82,10 @@ in this Software without prior written a + # endif + #endif /* _XOS_R_H */ + ++# ifdef __APPLE__ ++# include <sys/param.h> ++# endif ++ + #ifndef WIN32 + + #ifdef __cplusplus +@@ -185,6 +183,13 @@ extern void XtProcessUnlock( + # endif + # endif + ++#undef _XOS_R_H_MTSAFE_DIRENTAPI ++#undef _XOS_R_H_MTSAFE_NETDBAPI ++#undef _XOS_R_H_MTSAFE_PWDAPI ++#undef _XOS_R_H_MTSAFE_UNISTDAPI ++#undef _XOS_R_H_MTSAFE_STRINGAPI ++#undef _XOS_R_H_MTSAFE_TIMEAPI ++#undef _XOS_R_H_MTSAFE_GRPAPI + #endif /* !defined WIN32 */ + + /* +@@ -214,7 +219,7 @@ extern void XtProcessUnlock( + + #if defined(X_INCLUDE_PWD_H) && !defined(_XOS_INCLUDED_PWD_H) + # include <pwd.h> +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_PWDAPI) ++# if defined(_XOS_R_H_MTSAFE_PWDAPI) + # define XOS_USE_MTSAFE_PWDAPI 1 + # endif + #endif +@@ -318,7 +323,7 @@ static __inline__ void _Xpw_copyPasswd(_ + (_Xos_processUnlock), \ + (p).pwp ) + +-#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) ++#elif !defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(__APPLE__) && !defined(__NetBSD__) && !defined(__DragonFly__) + # define X_NEEDS_PWPARAMS + typedef struct { + struct passwd pws; +@@ -384,7 +389,7 @@ typedef int _Xgetpwret; + #if defined(X_INCLUDE_NETDB_H) && !defined(_XOS_INCLUDED_NETDB_H) \ + && !defined(WIN32) + # include <netdb.h> +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_NETDBAPI) ++# if defined(_XOS_R_H_MTSAFE_NETDBAPI) + # define XOS_USE_MTSAFE_NETDBAPI 1 + # endif + #endif +@@ -543,7 +548,7 @@ typedef int _Xgetservbynameparams; /* du + # define dirent direct + # endif + # endif +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_DIRENTAPI) ++# if defined(_XOS_R_H_MTSAFE_DIRENTAPI) + # define XOS_USE_MTSAFE_DIRENTAPI 1 + # endif + #endif +@@ -604,15 +609,8 @@ typedef struct { + /* Pre-POSIX API, returns non-NULL on success. */ + # define _XReaddir(d,p) (readdir_r((d), &(p).dir_entry)) + # else +-/* We have no idea what is going on. Fake it all using process locks. */ +-# define _XReaddir(d,p) \ +- ( (_Xos_processLock), \ +- (((p).result = readdir((d))) ? \ +- (memcpy(&((p).dir_entry), (p).result, (p).result->d_reclen), \ +- ((p).result = &(p).dir_entry), 0) : \ +- 0), \ +- (_Xos_processUnlock), \ +- (p).result ) ++# define _XReaddir(d,p) \ ++ (readdir_r((d), &((p).dir_entry), &((p).result)) ? NULL : (p).result) + # endif + #endif /* X_INCLUDE_DIRENT_H */ + +@@ -639,7 +637,7 @@ typedef struct { + + #if defined(X_INCLUDE_UNISTD_H) && !defined(_XOS_INCLUDED_UNISTD_H) + /* <unistd.h> already included by <X11/Xos.h> */ +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_UNISTDAPI) ++# if defined(_XOS_R_H__MTSAFE_UNISTDAPI) + # define XOS_USE_MTSAFE_UNISTDAPI 1 + # endif + #endif +@@ -779,7 +777,7 @@ typedef struct { + + #if defined(X_INCLUDE_STRING_H) && !defined(_XOS_INCLUDED_STRING_H) + /* <string.h> has already been included by <X11/Xos.h> */ +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_STRINGAPI) ++# if defined(_XOS_R_H_MTSAFE_STRINGAPI) + # define XOS_USE_MTSAFE_STRINGAPI 1 + # endif + #endif +@@ -831,7 +829,7 @@ typedef char * _Xstrtokparams; + + #if defined(X_INCLUDE_TIME_H) && !defined(_XOS_INCLUDED_TIME_H) + # include <time.h> +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_TIMEAPI) ++# if defined(_XOS_R_H_MTSAFE_TIMEAPI) + # define XOS_USE_MTSAFE_TIMEAPI 1 + # endif + #endif +@@ -987,7 +985,7 @@ typedef struct tm _Xltimeparams; + + #if defined(X_INCLUDE_GRP_H) && !defined(_XOS_INCLUDED_GRP_H) + # include <grp.h> +-# if defined(XUSE_MTSAFE_API) || defined(XUSE_MTSAFE_GRPAPI) ++# if defined(_XOS_R_H_MTSAFE_GRPAPI) + # define XOS_USE_MTSAFE_GRPAPI 1 + # endif + #endif diff --git a/x11/xproto/patches/patch-configure b/x11/xproto/patches/patch-configure new file mode 100644 index 00000000000..89ff411fd61 --- /dev/null +++ b/x11/xproto/patches/patch-configure @@ -0,0 +1,152 @@ +$NetBSD: patch-configure,v 1.3 2013/05/17 13:17:40 joerg Exp $ + +--- configure.orig 2013-03-29 23:27:02.000000000 +0000 ++++ configure +@@ -1959,6 +1971,73 @@ $as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_member ++ ++# ac_fn_c_check_func LINENO FUNC VAR ++# ---------------------------------- ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_c_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case <limits.h> declares $2. ++ For example, HP-UX 11i <limits.h> declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ++ <limits.h> exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include <limits.h> ++#else ++# include <assert.h> ++#endif ++ ++#undef $2 ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_func + cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. +@@ -11073,6 +11237,8 @@ ac_config_headers="$ac_config_headers do + + ac_config_headers="$ac_config_headers Xfuncproto.h" + ++ac_config_headers="$ac_config_headers Xos_r.h" ++ + + + +@@ -11324,6 +11490,56 @@ $as_echo "#define NARROWPROTO /**/" >>co + + fi + ++# Handle Xos_r.h ++ac_fn_c_check_func "$LINENO" "readdir_r" "ac_cv_func_readdir_r" ++if test "x$ac_cv_func_readdir_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_DIRENTAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r" ++if test "x$ac_cv_func_getgrgid_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_GRPAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" ++if test "x$ac_cv_func_getpwuid_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_PWDAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" ++if test "x$ac_cv_func_gethostbyname_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_NETDBAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" ++if test "x$ac_cv_func_strtok_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_STRINGAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" ++if test "x$ac_cv_func_gmtime_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_TIMEAPI /**/" >>confdefs.h ++ ++fi ++ ++ac_fn_c_check_func "$LINENO" "ttyname_r" "ac_cv_func_ttyname_r" ++if test "x$ac_cv_func_ttyname_r" = xyes; then : ++ ++$as_echo "#define _XOS_R_H_MTSAFE_UNISTDAPI /**/" >>confdefs.h ++ ++fi ++ + + ac_config_files="$ac_config_files Makefile specs/Makefile specs/SIAddresses/Makefile Xpoll.h xproto.pc" + +@@ -12083,6 +12307,7 @@ do + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS do-not-use-config.h" ;; + "Xfuncproto.h") CONFIG_HEADERS="$CONFIG_HEADERS Xfuncproto.h" ;; ++ "Xos_r.h") CONFIG_HEADERS="$CONFIG_HEADERS Xos_r.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "specs/Makefile") CONFIG_FILES="$CONFIG_FILES specs/Makefile" ;; + "specs/SIAddresses/Makefile") CONFIG_FILES="$CONFIG_FILES specs/SIAddresses/Makefile" ;; diff --git a/x11/xproto/patches/patch-configure.ac b/x11/xproto/patches/patch-configure.ac new file mode 100644 index 00000000000..956fefcb821 --- /dev/null +++ b/x11/xproto/patches/patch-configure.ac @@ -0,0 +1,28 @@ +$NetBSD: patch-configure.ac,v 1.1 2013/05/17 13:17:40 joerg Exp $ + + +--- configure.ac.orig 2013-03-29 23:26:53.000000000 +0000 ++++ configure.ac +@@ -16,6 +16,7 @@ XORG_CHECK_SGML_DOCTOOLS(1.8) + + AC_CONFIG_HEADERS([do-not-use-config.h]) + AC_CONFIG_HEADERS([Xfuncproto.h]) ++AC_CONFIG_HEADER([Xos_r.h]) + + AC_CANONICAL_HOST + +@@ -208,6 +209,14 @@ if test "x$WIDEPROTO" = xno; then + AC_DEFINE(NARROWPROTO, [], [Narrow prototypes]) + fi + ++# Handle Xos_r.h ++AC_CHECK_FUNC(readdir_r, [AC_DEFINE(_XOS_R_H_MTSAFE_DIRENTAPI,[],[Assume has readdir_r and friends from dirent.h])],) ++AC_CHECK_FUNC(getgrgid_r, [AC_DEFINE(_XOS_R_H_MTSAFE_GRPAPI,[],[Assume has getgrgid_r and friends from grp.h])],) ++AC_CHECK_FUNC(getpwuid_r, [AC_DEFINE(_XOS_R_H_MTSAFE_PWDAPI,[],[Assume has getpwuid_r and friends from pwd.h])],) ++AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(_XOS_R_H_MTSAFE_NETDBAPI,[],[Assume has gethostbyname_r and friends from netdb.h])],) ++AC_CHECK_FUNC(strtok_r, [AC_DEFINE(_XOS_R_H_MTSAFE_STRINGAPI,[],[Assume has strtok_r from string.h])],) ++AC_CHECK_FUNC(gmtime_r, [AC_DEFINE(_XOS_R_H_MTSAFE_TIMEAPI,[],[Assume has gmtime_r and friends from time.h])],) ++AC_CHECK_FUNC(ttyname_r, [AC_DEFINE(_XOS_R_H_MTSAFE_UNISTDAPI,[],[Assume has ttyname_r and friends from unistd.h])],) + + AC_OUTPUT([Makefile + specs/Makefile |