pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/simgear Check for thread library with pthread_cr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d6c576b23c3f
branches:  trunk
changeset: 533882:d6c576b23c3f
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Oct 05 21:06:00 2007 +0000

description:
Check for thread library with pthread_create, at least on DragonFly
that is not in the subset implemented by libc.

Always assume dlerror() returns const.

diffstat:

 games/simgear/distinfo         |    6 +-
 games/simgear/patches/patch-aa |  101 ++++++++++++++++++++++++++++++++++++++++-
 games/simgear/patches/patch-ae |   19 +++++++
 games/simgear/patches/patch-af |   16 ++++++
 4 files changed, 138 insertions(+), 4 deletions(-)

diffs (170 lines):

diff -r 859360b16fb4 -r d6c576b23c3f games/simgear/distinfo
--- a/games/simgear/distinfo    Fri Oct 05 21:03:39 2007 +0000
+++ b/games/simgear/distinfo    Fri Oct 05 21:06:00 2007 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.1.1.1 2007/07/12 19:56:14 drochner Exp $
+$NetBSD: distinfo,v 1.2 2007/10/05 21:06:00 joerg Exp $
 
 SHA1 (SimGear-0.3.10.tar.gz) = 83e8435b52463fdb2736ccb2f0e42b572528131f
 RMD160 (SimGear-0.3.10.tar.gz) = 11bfb77efab7562f14c9bc0688f99af9a45f4c81
 Size (SimGear-0.3.10.tar.gz) = 752225 bytes
-SHA1 (patch-aa) = 7bfffa44809919a9e8fc8239e8501c5a3d62dd0a
+SHA1 (patch-aa) = a071fdd6efcb1167f1ee9fff440bca5ef97b4640
 SHA1 (patch-ab) = 9df1dbe00731e95e561d9d2e5a3eaaada79693ef
 SHA1 (patch-ac) = 0c3b22ab6cd2e3093e66f2fafd1b2bfcb57fe425
 SHA1 (patch-ad) = ebe7a273a53a527299c44774ee989d99b780c6b0
+SHA1 (patch-ae) = 466b9ec8f8e7e41d389795b6d9f365cf4313ec5f
+SHA1 (patch-af) = 47decffedf577d5b50166eec658c868d38f0c830
diff -r 859360b16fb4 -r d6c576b23c3f games/simgear/patches/patch-aa
--- a/games/simgear/patches/patch-aa    Fri Oct 05 21:03:39 2007 +0000
+++ b/games/simgear/patches/patch-aa    Fri Oct 05 21:06:00 2007 +0000
@@ -1,7 +1,104 @@
-$NetBSD: patch-aa,v 1.1.1.1 2007/07/12 19:56:14 drochner Exp $
+$NetBSD: patch-aa,v 1.2 2007/10/05 21:06:00 joerg Exp $
 
---- configure.orig     2007-03-22 21:36:06.000000000 +0100
+--- configure.orig     2006-04-05 18:25:04.000000000 +0000
 +++ configure
+@@ -5968,13 +5968,13 @@ echo "${ECHO_T}$ac_cv_header_pthread_h" 
+ fi
+ 
+ 
+-echo "$as_me:$LINENO: checking for library containing pthread_exit" >&5
+-echo $ECHO_N "checking for library containing pthread_exit... $ECHO_C" >&6
+-if test "${ac_cv_search_pthread_exit+set}" = set; then
++echo "$as_me:$LINENO: checking for library containing pthread_create" >&5
++echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6
++if test "${ac_cv_search_pthread_create+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_pthread_exit=no
++ac_cv_search_pthread_create=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -5988,11 +5988,11 @@ extern "C"
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+-char pthread_exit ();
++char pthread_create ();
+ int
+ main ()
+ {
+-pthread_exit ();
++pthread_create ();
+   ;
+   return 0;
+ }
+@@ -6019,7 +6019,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_search_pthread_exit="none required"
++  ac_cv_search_pthread_create="none required"
+ else
+   echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+@@ -6027,7 +6027,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ fi
+ rm -f conftest.err conftest.$ac_objext \
+       conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_pthread_exit" = no; then
++if test "$ac_cv_search_pthread_create" = no; then
+   for ac_lib in pthread c_r; do
+     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+     cat >conftest.$ac_ext <<_ACEOF
+@@ -6043,11 +6043,11 @@ extern "C"
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+-char pthread_exit ();
++char pthread_create ();
+ int
+ main ()
+ {
+-pthread_exit ();
++pthread_create ();
+   ;
+   return 0;
+ }
+@@ -6074,7 +6074,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+-  ac_cv_search_pthread_exit="-l$ac_lib"
++  ac_cv_search_pthread_create="-l$ac_lib"
+ break
+ else
+   echo "$as_me: failed program was:" >&5
+@@ -6087,10 +6087,10 @@ rm -f conftest.err conftest.$ac_objext \
+ fi
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_pthread_exit" >&5
+-echo "${ECHO_T}$ac_cv_search_pthread_exit" >&6
+-if test "$ac_cv_search_pthread_exit" != no; then
+-  test "$ac_cv_search_pthread_exit" = "none required" || LIBS="$ac_cv_search_pthread_exit $LIBS"
++echo "$as_me:$LINENO: result: $ac_cv_search_pthread_create" >&5
++echo "${ECHO_T}$ac_cv_search_pthread_create" >&6
++if test "$ac_cv_search_pthread_create" != no; then
++  test "$ac_cv_search_pthread_create" = "none required" || LIBS="$ac_cv_search_pthread_create $LIBS"
+ 
+ fi
+ 
+@@ -6098,7 +6098,7 @@ if test "x$ac_cv_header_pthread_h" = "xy
+     CXXFLAGS="$CXXFLAGS -D_REENTRANT"
+     CFLAGS="$CFLAGS -D_REENTRANT"
+ 
+-  if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
++  if test "x$ac_cv_search_pthread_create" = "x-lc_r"; then
+     CXXFLAGS="-pthread $CXXFLAGS"
+     CFLAGS="-pthread $CFLAGS"
+   fi
 @@ -8634,7 +8634,7 @@ fi
  
  esac
diff -r 859360b16fb4 -r d6c576b23c3f games/simgear/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/simgear/patches/patch-ae    Fri Oct 05 21:06:00 2007 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ae,v 1.1 2007/10/05 21:06:00 joerg Exp $
+
+--- configure.ac.orig  2007-10-05 20:03:36.000000000 +0000
++++ configure.ac
+@@ -163,12 +163,12 @@ dnl Checks for libraries.
+ 
+ dnl Thread related checks
+ AC_CHECK_HEADER(pthread.h)
+-AC_SEARCH_LIBS(pthread_exit, [pthread c_r])
++AC_SEARCH_LIBS(pthread_create, [pthread c_r])
+ if test "x$ac_cv_header_pthread_h" = "xyes"; then
+     CXXFLAGS="$CXXFLAGS -D_REENTRANT"
+     CFLAGS="$CFLAGS -D_REENTRANT"
+ 
+-  if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
++  if test "x$ac_cv_search_pthread_create" = "x-lc_r"; then
+     CXXFLAGS="-pthread $CXXFLAGS"
+     CFLAGS="-pthread $CFLAGS"
+   fi
diff -r 859360b16fb4 -r d6c576b23c3f games/simgear/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/simgear/patches/patch-af    Fri Oct 05 21:06:00 2007 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-af,v 1.1 2007/10/05 21:06:01 joerg Exp $
+
+--- simgear/screen/extensions.cxx.orig 2007-10-05 20:08:51.000000000 +0000
++++ simgear/screen/extensions.cxx
+@@ -119,11 +119,7 @@ void *SGGetGLProcAddress(const char *fun
+     if (libHandle != NULL) {
+         fptr = dlsym(libHandle, func);
+ 
+-#if defined (__FreeBSD__)
+         const char *error = dlerror();
+-#else
+-        char *error = dlerror();
+-#endif
+         if (error)
+             SG_LOG(SG_GENERAL, SG_INFO, error);
+     }



Home | Main Index | Thread Index | Old Index