pkgsrc-WIP-changes archive

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

patches trimmed thanks to comments by Roland



Module Name:	pkgsrc-wip
Committed By:	mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Tue Jul 5 14:43:30 2022 +0530
Changeset:	4595700130d6b1122e02fe00a3d23f8a653dfe59

Modified Files:
	ltsmin/Makefile
	ltsmin/distinfo
	ltsmin/patches/patch-configure
	ltsmin/patches/patch-src_hre_hre__pthread.c

Log Message:
patches trimmed thanks to comments by Roland

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4595700130d6b1122e02fe00a3d23f8a653dfe59

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ltsmin/Makefile                             |   3 +-
 ltsmin/distinfo                             |   4 +-
 ltsmin/patches/patch-configure              | 156 +++-------------------------
 ltsmin/patches/patch-src_hre_hre__pthread.c |  46 +++-----
 4 files changed, 32 insertions(+), 177 deletions(-)

diffs:
diff --git a/ltsmin/Makefile b/ltsmin/Makefile
index 8fc071ed2c..2be6fcf687 100644
--- a/ltsmin/Makefile
+++ b/ltsmin/Makefile
@@ -20,7 +20,8 @@ CONFIG_SHELL=	bash
 BUILDLINK_TRANSFORM.NetBSD+=	rm:-ldl
 CONFIGURE_ARGS+=	PKG_CONFIG=${PREFIX}/bin/pkg-config
 CONFIGURE_ARGS+=	--docdir=${PREFIX}/share/doc/${PKGBASE}
-CFLAGS+=	-D__NetBSD__
+
+CFLAGS.NetBSD+=	-D__NetBSD__
 
 post-install:
 	DESTDIR=${DESTDIR} gmake -C ${WRKSRC}/doc install-man
diff --git a/ltsmin/distinfo b/ltsmin/distinfo
index 75a4da9cd3..638a8d11ed 100644
--- a/ltsmin/distinfo
+++ b/ltsmin/distinfo
@@ -4,8 +4,8 @@ SHA1 (ltsmin-v3.0.2-source.tgz) = a658aaa6efa4a2c7fd0d48c4e8c406ebb4916c27
 RMD160 (ltsmin-v3.0.2-source.tgz) = 2e36b9cf08dd51ae6554cd8e7d5301726fb7202e
 SHA512 (ltsmin-v3.0.2-source.tgz) = f05f45384e2d12b82f9f59819c5701ad097819b77394296b3927d39183680fa86d7c94b2d2e8d497444887ed1a29b030e09f1808cb5c714ed8c939f9a6e7944a
 Size (ltsmin-v3.0.2-source.tgz) = 3273078 bytes
-SHA1 (patch-configure) = 8e15569fd3d58708b8b489e63df33d0b4878a41a
-SHA1 (patch-src_hre_hre__pthread.c) = db0b7a74f43dcd01ca3ac6bbaefca4a2b96e0053
+SHA1 (patch-configure) = 23a28a5fd4e8c657d4262d1d4df3f7525248604b
+SHA1 (patch-src_hre_hre__pthread.c) = ad644122ae133850f6b8729f2c4c753465806223
 SHA1 (patch-src_pins-lib_modules_dve-pins.c) = 2ed2fa4485cef28505c8d941a70d920c9a85f1ab
 SHA1 (patch-src_pins-lib_modules_opaal-pins.c) = a6de6ae4170796398bbd775e5af2a16a439e3224
 SHA1 (patch-src_pins2lts-sym_pins2lts-sym.c) = 15024896eaa379f2ecacbe2c0caaa76252165033
diff --git a/ltsmin/patches/patch-configure b/ltsmin/patches/patch-configure
index 3f981a62f2..4a05daf688 100644
--- a/ltsmin/patches/patch-configure
+++ b/ltsmin/patches/patch-configure
@@ -2,48 +2,6 @@ $NetBSD$
 
 --- configure.orig	2018-07-03 19:29:06.000000000 +0000
 +++ configure
-@@ -11416,9 +11416,9 @@ _LT_EOF
- 	# Also, AIX nm treats weak defined symbols like other global
- 	# defined symbols, whereas GNU nm marks them as "W".
- 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
--	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 = "T") || (\$ 2 = "D") || (\$ 2 = "B") || (\$ 2 = "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- 	else
--	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 = "T") || (\$ 2 = "D") || (\$ 2 = "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- 	fi
- 	aix_use_runtimelinking=no
- 
-@@ -12529,7 +12529,7 @@ aix[4-9]*)
-     # development snapshots of GCC prior to 3.0.
-     case $host_os in
-       aix4 | aix4.[01] | aix4.[01].*)
--      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-+      if { echo '#if __GNUC__ > 2 || (__GNUC__ = 2 && __GNUC_MINOR__ >= 97)'
- 	   echo ' yes '
- 	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- 	:
-@@ -16145,9 +16145,9 @@ $as_echo_n "checking whether the $compil
-     # Also, AIX nm treats weak defined symbols like other global defined
-     # symbols, whereas GNU nm marks them as "W".
-     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
--      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 = "T") || (\$ 2 = "D") || (\$ 2 = "B") || (\$ 2 = "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-     else
--      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 = "T") || (\$ 2 = "D") || (\$ 2 = "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-     fi
-     ;;
-   pw32*)
-@@ -16363,7 +16363,7 @@ aix[4-9]*)
-     # development snapshots of GCC prior to 3.0.
-     case $host_os in
-       aix4 | aix4.[01] | aix4.[01].*)
--      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-+      if { echo '#if __GNUC__ > 2 || (__GNUC__ = 2 && __GNUC_MINOR__ >= 97)'
- 	   echo ' yes '
- 	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- 	:
 @@ -17303,7 +17303,7 @@ ac_try='"$LEX" --stdout conftest.lex >/d
  eval ac_try_echo="\":$LINENO: $ac_try\""
  echo "$ac_try_echo" >&5
@@ -53,112 +11,26 @@ $NetBSD$
      ax_cv_check_flex_compat=yes
  else
      ax_cv_check_flex_compat=no
-@@ -17360,55 +17360,55 @@ fi
- 
+@@ -17358,7 +17358,8 @@ $as_echo "no" >&6; }
+ fi
  
  
--ac_ext=c
--ac_cpp='$CPP $CPPFLAGS'
--ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
--ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
--ac_compiler_gnu=$ac_cv_c_compiler_gnu
--
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdlib.h>
--#include <stdio.h>
--#include <sys/types.h>
--#include <pthread.h>
--int main()
--{
--    pthread_mutex_t mutex;
--    pthread_mutexattr_t attr;
--    if (pthread_mutexattr_init(&attr))
--        exit(1);
--    if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
--        exit(2);
--    if (pthread_mutex_init(&mutex, &attr))
--        exit(3);
--    if (pthread_mutexattr_destroy(&attr))
--        exit(4);
--    if (pthread_mutex_destroy(&mutex))
--        exit(5);
--    exit(0);
--}
 -
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  POSIX_SHARED=yes
--else
--  POSIX_SHARED=no
--    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "No POSIX support found.
--See \`config.log' for more details" "$LINENO" 5; }
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
-+#ac_ext=c
-+#ac_cpp='$CPP $CPPFLAGS'
-+#ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+#ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+#ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+#
-+#if test "$cross_compiling" = yes; then :
-+#  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+#as_fn_error $? "cannot run test program while cross compiling
-+#See \`config.log' for more details" "$LINENO" 5; }
-+#else
-+#  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+#/* end confdefs.h.  */
-+#
-+##include <stdlib.h>
-+##include <stdio.h>
-+##include <sys/types.h>
-+##include <pthread.h>
-+#int main()
-+#{
-+#    pthread_mutex_t mutex;
-+#    pthread_mutexattr_t attr;
-+#    if (pthread_mutexattr_init(&attr))
-+#        exit(1);
-+#    if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
-+#        exit(2);
-+#    if (pthread_mutex_init(&mutex, &attr))
-+#        exit(3);
-+#    if (pthread_mutexattr_destroy(&attr))
-+#        exit(4);
-+#    if (pthread_mutex_destroy(&mutex))
-+#        exit(5);
-+#    exit(0);
-+#}
-+#
-+#_ACEOF
-+#if ac_fn_c_try_run "$LINENO"; then :
-+#  POSIX_SHARED=yes
-+#else
-+#  POSIX_SHARED=no
-+#    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+#as_fn_error $? "No POSIX support found.
-+#See \`config.log' for more details" "$LINENO" 5; }
-+#fi
-+#rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+#  conftest.$ac_objext conftest.beam conftest.$ac_ext
-+#fi
++if [ `uname` != NetBSD ]
++then
+ 
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+@@ -17410,6 +17411,8 @@ rm -f core *.core core.conftest.* gmon.o
+   conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
  
++fi
++
  ac_ext=c
  ac_cpp='$CPP $CPPFLAGS'
-@@ -28956,7 +28956,7 @@ as_fn_error $? "no acceptable atomic ope
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -28956,7 +28959,7 @@ as_fn_error $? "no acceptable atomic ope
  See \`config.log' for more details" "$LINENO" 5; }
  fi
  
diff --git a/ltsmin/patches/patch-src_hre_hre__pthread.c b/ltsmin/patches/patch-src_hre_hre__pthread.c
index 69b2bc8b88..b144f39170 100644
--- a/ltsmin/patches/patch-src_hre_hre__pthread.c
+++ b/ltsmin/patches/patch-src_hre_hre__pthread.c
@@ -2,36 +2,18 @@ $NetBSD$
 
 --- src/hre/hre_pthread.c.orig	2018-07-03 19:28:10.000000000 +0000
 +++ src/hre/hre_pthread.c
-@@ -255,12 +255,20 @@ create_shared_region(size_t size, bool p
-     }
-     int flag = public ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE;
-     pthread_mutexattr_init(&shared->mutexattr);
-+#ifndef __NetBSD__
-     if (pthread_mutexattr_setpshared(&shared->mutexattr, flag)){
-+#else
-+    if (1) {
+@@ -17,6 +17,14 @@
+ 
+ #include <hre/provider.h>
+ 
++#if defined(__NetBSD__)
++#  include <sys/param.h>
++#  if !__NetBSD_Prereq__(11, 0, 0)
++#    define pthread_mutexattr_setpshared(attr, flag) 1
++#    define pthread_condattr_setpshared(attr, flag) 1
++#  endif
 +#endif
-         AbortCall("pthread_mutexattr_setpshared");
-     }
-     pthread_mutex_init(&shared->mutex,&shared->mutexattr);
-     pthread_condattr_init(&shared->condattr);
-+#ifndef __NetBSD__
-     if (pthread_condattr_setpshared(&shared->condattr, flag)){
-+#else
-+    if (1) {
-+#endif
-         AbortCall("pthread_condattr_setpshared");
-     }
-     return shared;
-@@ -583,7 +591,11 @@ void HREenableFork(int procs, bool selec
-     Debug("Enabling process runtime environment.");
-     pthread_condattr_t attr;
-     pthread_condattr_init(&attr);
-+#ifndef __NetBSD__
-     int res=pthread_condattr_setpshared(&attr,PTHREAD_PROCESS_SHARED);
-+#else
-+    int res = 1;
-+#endif
-     pthread_condattr_destroy(&attr);
-     if (res){
-         Warning(infoLong,"multi-process disabled: inter process locks are not supported");
++
+ /**
+  * For pthreads we only use a small shared region for the queues.
+  * For forks all shared objects are allocated on the region, so we try to claim


Home | Main Index | Thread Index | Old Index