pkgsrc-Bugs archive

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

Re: pkg/51626: devel/libuv needs PLIST_VAR for include/pthread-barrier.h



Hello David,

davshao%gmail.com@localhost writes:
> >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:
> [...] 
> >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 i
> s 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
> 
IMHO it's better to treat it like other header files that are installed
unconditionally and so just add `pthread-barrier.h' to HEADERS in
`pkgsrc/devel/libuv/Makefile'. This should work both on platforms
where it is automatically installed (e.g. probably Darwin) and
others where it isn't automatically installed (e.g. DragonFly,
NetBSD, etc.).


Home | Main Index | Thread Index | Old Index