pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Patched for pthread_condattr_setpshared, pthread_mutexattr_setpshared
Module Name: pkgsrc-wip
Committed By: mayuresh <mayuresh%acm.org@localhost>
Pushed By: mayuresh
Date: Mon Jul 4 12:21:24 2022 +0530
Changeset: eb4a5b58fdabd0e4450f6ffff60c682e0d403796
Modified Files:
ltsmin/Makefile
ltsmin/TODO
ltsmin/distinfo
ltsmin/patches/patch-configure
Added Files:
ltsmin/patches/patch-src_hre_hre__pthread.c
Log Message:
Patched for pthread_condattr_setpshared, pthread_mutexattr_setpshared
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=eb4a5b58fdabd0e4450f6ffff60c682e0d403796
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
ltsmin/Makefile | 11 ++-
ltsmin/TODO | 82 ++--------------------
ltsmin/distinfo | 3 +-
ltsmin/patches/patch-configure | 105 ++++++++++++++++++++++++++++
ltsmin/patches/patch-src_hre_hre__pthread.c | 37 ++++++++++
5 files changed, 161 insertions(+), 77 deletions(-)
diffs:
diff --git a/ltsmin/Makefile b/ltsmin/Makefile
index a3e67d5915..77d2eece26 100644
--- a/ltsmin/Makefile
+++ b/ltsmin/Makefile
@@ -11,9 +11,18 @@ HOMEPAGE= https://ltsmin.utwente.nl/
COMMENT= The LTSmin model checking toolset
LICENSE= modified-bsd
-WRKSRC= ${WRKDIR}/ltsmin-3.0.2
+WRKSRC= ${WRKDIR}/ltsmin-3.0.2
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
DEPENDS+= flex>=2.6.4:../../devel/flex
+CONFIG_SHELL= bash
+BUILDLINK_TRANSFORM.NetBSD+= rm:-ldl
+CONFIGURE_ARGS+= PKG_CONFIG=${PREFIX}/bin/pkg-config
+CONFIGURE_ARGS+= CFLAGS=-D__NetBSD__
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/popt/buildlink3.mk"
+.include "../../devel/buddy/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/ltsmin/TODO b/ltsmin/TODO
index 0500d21260..0846512f33 100644
--- a/ltsmin/TODO
+++ b/ltsmin/TODO
@@ -1,77 +1,9 @@
-Still at configure state
+undefined ref to WIFEXITED, WEXITSTATUS
-configure:17400: gcc -o conftest -O2 -fPIC -D_FORTIFY_SOURCE=2 -pthread -I/usr/pkg/include -L/usr/pkg/lib
--Wl,-zrelro -Wl,-R/usr/pkg/lib conftest.c -lpthread >&5
-conftest.c: In function 'main':
-conftest.c:51:9: warning: implicit declaration of function 'pthread_mutexattr_setpshared'; did you mean 'pt
-hread_mutexattr_settype'? [-Wimplicit-function-declaration]
- if (pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED))
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
- pthread_mutexattr_settype
-ld: /tmp//ccnFnR6G.o: in function `main':
-conftest.c:(.text.startup+0x3b): undefined reference to `pthread_mutexattr_setpshared'
-configure:17400: $? = 1
-configure: program exited with status 1
-configure: failed program was:
-| /* confdefs.h */
-| #define PACKAGE_NAME "ltsmin"
-| #define PACKAGE_TARNAME "ltsmin"
-| #define PACKAGE_VERSION "3.0.2"
-| #define PACKAGE_STRING "ltsmin 3.0.2"
-| #define PACKAGE_BUGREPORT "ltsmin-support%lists.utwente.nl@localhost"
-| #define PACKAGE_URL ""
-| #define PACKAGE "ltsmin"
-| #define VERSION "3.0.2"
-| #define STDC_HEADERS 1
-| #define HAVE_SYS_TYPES_H 1
-| #define HAVE_SYS_STAT_H 1
-| #define HAVE_STDLIB_H 1
-| #define HAVE_STRING_H 1
-| #define HAVE_MEMORY_H 1
-| #define HAVE_STRINGS_H 1
-| #define HAVE_INTTYPES_H 1
-| #define HAVE_STDINT_H 1
-| #define HAVE_UNISTD_H 1
-| #define __EXTENSIONS__ 1
-| #define _ALL_SOURCE 1
-| #define _DARWIN_C_SOURCE 1
-| #define _GNU_SOURCE 1
-| #define _POSIX_PTHREAD_SEMANTICS 1
-| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
-| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
-| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
-| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
-| #define __STDC_WANT_LIB_EXT2__ 1
-| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
-| #define _TANDEM_SOURCE 1
-| #define LTSMIN_PATHNAME_MAX 1024
-| #define LTSMIN_CONFIG_INCLUDED 1
-| #define DEFFILEMODE 0666
-| #define HAVE_DLFCN_H 1
-| #define LT_OBJDIR ".libs/"
-| #define YYTEXT_POINTER 1
-| /* 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);
-| }
-|
+Despite buildlink to buddy, config gives error for libbdd
+Try to meet deps:
+
+ libczmq
+ libspot
+ sylvan
diff --git a/ltsmin/distinfo b/ltsmin/distinfo
index 086320b644..fd8380db7e 100644
--- a/ltsmin/distinfo
+++ b/ltsmin/distinfo
@@ -5,4 +5,5 @@ 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-Makefile.in) = a20bc2c99a8baa2d5c3580990d20b41944454520
-SHA1 (patch-configure) = 96303b6fa0fee54b696c78150e0cb5904542a756
+SHA1 (patch-configure) = 8e15569fd3d58708b8b489e63df33d0b4878a41a
+SHA1 (patch-src_hre_hre__pthread.c) = db0b7a74f43dcd01ca3ac6bbaefca4a2b96e0053
diff --git a/ltsmin/patches/patch-configure b/ltsmin/patches/patch-configure
index d9d6efda29..3f981a62f2 100644
--- a/ltsmin/patches/patch-configure
+++ b/ltsmin/patches/patch-configure
@@ -53,6 +53,111 @@ $NetBSD$
ax_cv_check_flex_compat=yes
else
ax_cv_check_flex_compat=no
+@@ -17360,55 +17360,55 @@ 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
+
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
@@ -28956,7 +28956,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
new file mode 100644
index 0000000000..69b2bc8b88
--- /dev/null
+++ b/ltsmin/patches/patch-src_hre_hre__pthread.c
@@ -0,0 +1,37 @@
+$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) {
++#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");
Home |
Main Index |
Thread Index |
Old Index