pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/51626: devel/libuv needs PLIST_VAR for include/pthread-barrier.h
>Number: 51626
>Category: pkg
>Synopsis: devel/libuv needs PLIST_VAR for include/pthread-barrier.h
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Nov 13 14:55:00 +0000 2016
>Originator: David Shao
>Release: current pkgsrc
>Organization:
>Environment:
DragonFly 4.7-DEVELOPMENT DragonFly v4.7.0.831.g04fd1-DEVELOPMENT #1: Sat Nov 12 20:51:47 PST 2016 xxxxxx@:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
>Description:
For current pkgsrc DragonFly 4.7-DEVELOPMENT, installation of devel/libuv fails after
bmake install package
due to its PLIST unconditionally having
include/pthread-barrier.h
If one examines devel/libuv's Makefile.am, one finds lines such as:
if DARWIN
include_HEADERS += include/uv-darwin.h \
include/pthread-barrier.h
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
libuv_la_SOURCES += src/unix/darwin.c \
src/unix/darwin-proctitle.c \
src/unix/fsevents.c \
src/unix/kqueue.c \
src/unix/proctitle.c \
src/unix/pthread-barrier.c
test_run_tests_LDFLAGS += -lutil
endif
if DRAGONFLY
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/freebsd.c src/unix/kqueue.c
test_run_tests_LDFLAGS += -lutil
endif
if FREEBSD
include_HEADERS += include/uv-bsd.h
libuv_la_SOURCES += src/unix/freebsd.c src/unix/kqueue.c
test_run_tests_LDFLAGS += -lutil
endif
if LINUX
include_HEADERS += include/uv-linux.h
libuv_la_CFLAGS += -D_GNU_SOURCE
libuv_la_SOURCES += src/unix/linux-core.c \
src/unix/linux-inotify.c \
src/unix/linux-syscalls.c \
src/unix/linux-syscalls.h \
src/unix/proctitle.c
test_run_tests_LDFLAGS += -lutil
endif
>How-To-Repeat:
>Fix:
If include/pthread-barrier.h is to be packaged at all, there has to at least be an option to not do so. It is upstream itself that is distinguishing headers that are included depending on specific operating systems. I doubt the following is accepted as a fix, but perhaps pkgsrc lead maintainership can specify a policy for how exactly similar situations are to be handled.
diff -Nur devel/libuv/Makefile devel/libuv.new/Makefile
--- devel/libuv/Makefile 2016-11-11 23:47:34.000000000 -0800
+++ devel/libuv.new/Makefile 2016-11-12 21:41:51.538996000 -0800
@@ -26,4 +26,18 @@
${INSTALL_DATA} ${WRKSRC}/include/${file} ${DESTDIR}${PREFIX}/include
.endfor
+.include "../../mk/bsd.prefs.mk"
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.libuv
+PKG_SUPPORTED_OPTIONS+= pthread_barrier
+PKG_SUGGESTED_OPTIONS= pthread_barrier
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= pthread_barrier
+
+.if !empty(PKG_OPTIONS:Mpthread_barrier)
+PLIST.pthread_barrier= yes
+.endif
+
.include "../../mk/bsd.pkg.mk"
diff -Nur devel/libuv/PLIST devel/libuv.new/PLIST
--- devel/libuv/PLIST 2016-11-11 23:47:34.000000000 -0800
+++ devel/libuv.new/PLIST 2016-11-12 21:43:49.491563000 -0800
@@ -1,5 +1,5 @@
@comment $NetBSD: PLIST,v 1.4 2016/11/12 07:47:34 adam Exp $
-include/pthread-barrier.h
+${PLIST.pthread_barrier}include/pthread-barrier.h
include/uv-aix.h
include/uv-bsd.h
include/uv-darwin.h
Home |
Main Index |
Thread Index |
Old Index