Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2017 11:38:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 222175] New ports: graphics/vulkan-sdk and dependencies
Message-ID:  <bug-222175-13-inv0MXeXf8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-222175-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-222175-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222175

Jan Beich <jbeich@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jbeich@FreeBSD.org

--- Comment #1 from Jan Beich <jbeich@FreeBSD.org> ---
Comment on attachment 186206
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D186206
The patch

=3D=3D=3D devel/glslang-devel =3D=3D=3D

> +PORTNAME=3D	glslang-devel

Use PKGNAMESUFFIX=3D-devel or just drop it due to lack of stable port. As
maintainer you can switch to track releases once upstream starts doing those
more often.

Ditto for devel/spirv-tools-devel.

> +DISTVERSION=3D	Overload400-PrecQual.2000-12-Apr-2017
[...]
> +GH_TAGNAME=3D	d5aedc199

Maybe convert to a tag offset:

  $ git describe --tags --match 3.0 d5aedc199
  3.0-1516-gd5aedc19

would be

  DISTVERSION=3D  3.0-1516
  DISTVERSIONSUFFIX=3D    -gd5aedc19

represented as

  $ make -V PKGNAME
  glslang-devel-3.0.1516

Maybe ditto for devel/spirv-tools-devel:

  DISTVERSIONPREFIX=3D    v
  DISTVERSION=3D  2016.6-155
  DISTVERSIONSUFFIX=3D    -gf0fe601
  [...]
  GH_ACCOUNT=3D   KhronosGroup
  GH_PROJECT=3D   SPIRV-Tools
  GH_TUPLE=3D=20=20=20=20
KhronosGroup:SPIRV-Headers:2bb92e6:headers/external/spirv-headers

  $ make -V PKGNAME
  spirv-tools-2016.6.155

In both cases you'd have a monotonically increasing version for each upstre=
am
commit, sparing inventing arbitrary suffixes.

> +LICENSE=3D	BSD3DLABS
> +LICENSE_NAME=3D	Modified BSD License (3Dlabs/LunarG)
> +LICENSE_FILE=3D	${FILESDIR}/LICENSE
> +LICENSE_PERMS=3D	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

Doesn't look modified compared to regular variants[1]. Google copyrights are
also missing. Maybe generate license text on-the-fly:

  LICENSE=3D      BSD3CLAUSE
  LICENSE_FILE=3D ${WRKDIR}/LICENSE

  post-extract:
        ${SED} '/^$$/,$$d' ${WRKSRC}/${PORTNAME}/Include/Types.h \
                >${WRKDIR}/LICENSE

[1] https://fedoraproject.org/wiki/Licensing:BSD

> +USES=3D	cmake:outsource compiler:c++11-lang

Can you reindent with 8 column tabs to achieve consistent whitespace alignm=
ent?

Ditto for devel/spirv-tools-devel.

> +Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generat=
or.

A bit terse for pkg-descr. Maybe use the first paragraph from khronos.org l=
ink.

> +WWW: https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
> +WWW: https://github.com/KhronosGroup/glslang

One of those can probably be dropped given both cross-reference each other.

=3D=3D=3D devel/spirv-tools-devel =3D=3D=3D

Fails to build with DEVELOPER=3D1 set in make.conf:

=3D=3D=3D=3D> Running Q/A tests (stage-qa)
Error: '/bin/bash' is an invalid shebang you need USES=3Dshebangfix for
'bin/spirv-lesspipe.sh'
*** Error code 1

> +USES=3D	cmake:outsource compiler:c++11-lang python:2

- USES=3Dcompiler:c++11-lib instead as std::unique_ptr isn't available in
libstdc++ 4.2.
- USES=3Dpython:build instead given it builds fine with "python3.6" and run=
time
doesn't call "python2".

Ditto for graphics/vulkan-sdk.

> +LICENSE=3D	APACHE20
> +LICENSE_FILE=3D	${WRKSRC}/LICENSE

In this case, defining LICENSE_FILE isn't necessary. Apache 2.0 is a
standardized license for which there's a copy under Templates/Licenses/.

Ditto for graphics/vulkan-sdk.

=3D=3D=3D graphics/vulkan-sdk =3D=3D=3D

Fails to build in poudriere:

In file included from
/wrkdirs/usr/ports/graphics/vulkan-sdk/work/Vulkan-LoaderAndValidationLayer=
s-sd
k-1.0.57.0/layers/vk_layer_extension_utils.cpp:22:
In file included from
/wrkdirs/usr/ports/graphics/vulkan-sdk/work/Vulkan-LoaderAndValidationLayer=
s-sd
k-1.0.57.0/layers/vk_layer_extension_utils.h:21:
In file included from
/wrkdirs/usr/ports/graphics/vulkan-sdk/work/Vulkan-LoaderAndValidationLayer=
s-sd
k-1.0.57.0/include/vulkan/vk_layer.h:29:
/wrkdirs/usr/ports/graphics/vulkan-sdk/work/Vulkan-LoaderAndValidationLayer=
s-sdk-1.0.57.0/layers/../include/vulkan/vulkan.h:5916:10:
fatal error: 'X11/extensions/Xrandr.h' file not found
#include <X11/extensions/Xrandr.h>
         ^

http://sprunge.us/OaAM

> +XLIB_CMAKE_ON=3D	-DBUILD_WSI_XLIB_SUPPORT:BOOL=3DON
> +XLIB_CMAKE_OFF=3D	-DBUILD_WSI_XLIB_SUPPORT:BOOL=3DOFF

Switch to _CMAKE_BOOL to improve readability.

> +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
> ++if((CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (CMAKE_SYSTEM_NAME STREQUAL =
"FreeBSD"))

What about other BSDs? DragonFly is a downstream of FreeBSD Ports. Maybe sw=
itch
to if(UNIX AND NOT APPLE)

Ditto in other places.

> +-    set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING
> ++    set(FALLBACK_CONFIG_DIRS "/usr/local/etc/xdg:/etc/xdg" CACHE STRING

Would it respect LOCALBASE? Maybe replace /usr/local with
${CMAKE_INSTALL_PREFIX}.

> ++if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
> ++    include_directories("/usr/local/include")
> + endif()

Better add include_directories(SYSTEM ${XCB_INCLUDE_DIR}) just after
find_package(XCB) and include_directories(SYSTEM ${X11_Xlib_INCLUDE_PATH}) =
just
after find_package(X11).

> ++++ demos/cube.cpp
[...]
> +-#elif __linux__
> ++#elif defined(__linux__) || defined(__FreeBSD__)

Maybe use #elif !defined(__APPLE__)

> ++    list(APPEND libraries PRIVATE -lrt)

On BSDs clock_gettime() is in libc. Maybe limit to if(CMAKE_SYSTEM_NAME MAT=
CHES
"^(Linux|kFreeBSD|GNU|SunOS)$")

> ++    if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
> ++        list(APPEND libraries PRIVATE -ldl)
> ++    endif()

Switch to ${CMAKE_DL_LIBS}.

> ++++ loader/loader.c
[...]
> +-#if defined(__linux__)
> ++#if defined(__linux__) || defined(__FreeBSD__)

getenv() is part of POSIX. Maybe use #ifndef _WIN32 or #if !defined(_WIN32)=
 &&
!defined(__APPLE__) depending on how weird OS X is. ;)

> ++++ loader/vk_loader_platform.h
[...]
> +-#if defined(__linux__)
> ++#if defined(__linux__) || defined(__FreeBSD__)

Ditto.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222175-13-inv0MXeXf8>