On 2022/07/12 12:13, Rafael Sadowski wrote: > On Sun Jul 10, 2022 at 09:54:00PM +0200, Omar Polo wrote: > > I was taking a look at deadbeef for curiosity and it seems that newer > > versions needs this Grand Central Dispatch thingy. Fortunately, an > > impavid user has already done the though work to get this working on > > OpenBSD [0], so this took just minutes to port. (thanks!) > > > > [0]: https://github.com/apple/swift-corelibs-libdispatch/pull/559 > > > > (I've just added two small patches on top to drop a -O3 and -Werror) > > > > All but one test are passing! > > > > As-is this conflicts with devel/blocksruntime due to > > /usr/local/include/Block.h. FWIW the two headers are practically > > identical. Maybe this libdispatch will deprecate blocksruntime? Never > > used blocks before so I don't know. > > > > With this installed i manage to start compiling deadbeef and get until > > the linking of the deadbeef executable (which fails for other reasons > > than libdispatch.)
As long as the telegram-related ports are checked and handled if needed I'm ok with importing libdispatch and removing BlocksRuntime (I doubt anyone will have installed it, but just in case, please add @pkgpath) > This may help us with asterisk? Of course this requires run-time tests. I > have no chance to test this. Don't shoot the messenger! I have a different diff for Asterisk that's less likely to break gcc archs. It does seem to work in initial testing with 19. (I'll do more tests before committing it). Index: Makefile.inc =================================================================== RCS file: /cvs/ports/telephony/asterisk/Makefile.inc,v retrieving revision 1.13 diff -u -p -r1.13 Makefile.inc --- Makefile.inc 12 May 2022 20:51:20 -0000 1.13 +++ Makefile.inc 30 Jul 2022 21:24:19 -0000 @@ -31,28 +31,12 @@ DEBUG_PACKAGES= ${BUILD_PACKAGES} DPB_PROPERTIES= parallel # Asterisk requires either nested functions (gcc extension), or -fblocks (clang). -# However -fblocks fails: -# -# - configure test fails on ld.bfd arches: -# -# echo 'int main(){return ^{return 42;}();}' | \ -# clang -o /tmp/blockstest -fblocks -x c -L/usr/local/lib -lBlocksRuntime - -# -# -> undefined reference to `_NSConcreteGlobalBlock' (also can be tested -# on ld.lld arches by adding "-fuse-ld=bfd") -# -# - runtime fails on ld.lld arches: dlopen()ing the .so modules results in -# undefined symbols from the BlocksRuntime lib (_NSConcreteStackBlock, -# _Block_object_dispose, _Block_object_assign, etc); Asterisk appears to -# start up but without modules loaded it is useless. -# -# So, as things stand, this requires building with gcc. -# -# If this is fixed and moved to clang, update telephony/asterisk-g729 in sync. -COMPILER= ports-gcc + +# Keep telephony/asterisk-g729 in sync. +COMPILER= base-clang ports-gcc # XXX bsd.port.arch.mk is included below, before compiler.port.mk can set # ONLY_FOR_ARCHS -ONLY_FOR_ARCHS= ${GCC49_ARCHS} +ONLY_FOR_ARCHS= ${CLANG_ARCHS} ${GCC49_ARCHS} SHARED_LIBS+= asteriskssl ${SHLIB_V} SHARED_LIBS+= asteriskpj ${SHLIB_V} @@ -179,14 +163,14 @@ CFLAGS += -DHAVE_OPENSSL_BIO_METHOD .include <bsd.port.arch.mk> -#.if ${PROPERTIES:Mclang} -#BUILD_DEPENDS += devel/blocksruntime -#LDFLAGS += -lBlocksRuntime -#WANTLIB-main += ${COMPILER_LIBCXX} -#.else +.if ${PROPERTIES:Mclang} +LDFLAGS += -lBlocksRuntime +BLOCKSLIBDEP = devel/libdispatch +BLOCKSWANTLIB = BlocksRuntime +.else CFLAGS += -ftrampolines WANTLIB-main += ${MODGCC4_CPPWANTLIB} -#.endif +.endif # calendar COMMENT-calendar= calendar support for Asterisk @@ -312,9 +296,13 @@ EXAMPLEFILES= cdr.conf extensions.ael e PKGSPEC-main= asterisk-${VERSION_SPEC} -.for i in ${MULTI_PACKAGES:N-main} +.for i in ${MULTI_PACKAGES} +. if "$i" != "-main" PKGNAME$i ?= asterisk$i-${VER} RUN_DEPENDS$i += telephony/asterisk/${SHORTVER}=${VER} +. endif +LIB_DEPENDS$i += ${BLOCKSLIBDEP} +WANTLIB$i += ${BLOCKSWANTLIB} .endfor # some of the patches have MS-DOS line endings which patch doesn't like. Index: 16/Makefile =================================================================== RCS file: /cvs/ports/telephony/asterisk/16/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- 16/Makefile 27 Jun 2022 08:23:06 -0000 1.17 +++ 16/Makefile 30 Jul 2022 21:24:19 -0000 @@ -3,6 +3,6 @@ PJ_V= 2.12 SHLIB_V= 0.0 VERSION_SPEC= >=16.0,<17.0 PORTROACH= limit:^16\. -REVISION-main= 0 +REVISION= 1 .include <bsd.port.mk> Index: 18/Makefile =================================================================== RCS file: /cvs/ports/telephony/asterisk/18/Makefile,v retrieving revision 1.19 diff -u -p -r1.19 Makefile --- 18/Makefile 27 Jun 2022 08:23:07 -0000 1.19 +++ 18/Makefile 30 Jul 2022 21:24:19 -0000 @@ -3,6 +3,6 @@ PJ_V= 2.12 SHLIB_V= 0.0 VERSION_SPEC= >=18.0,<19.0 PORTROACH= limit:^18\. -REVISION-main= 0 +REVISION= 1 .include <bsd.port.mk> Index: 19/Makefile =================================================================== RCS file: /cvs/ports/telephony/asterisk/19/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- 19/Makefile 27 Jun 2022 08:23:07 -0000 1.17 +++ 19/Makefile 30 Jul 2022 21:24:19 -0000 @@ -3,6 +3,6 @@ PJ_V= 2.12 SHLIB_V= 0.0 VERSION_SPEC= >=19.0,<20.0 # no PORTROACH marker for the highest branch, to allow finding new branches -REVISION-main= 0 +REVISION= 1 .include <bsd.port.mk>