Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 23:54:46 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460064 - in head/graphics: . instant-meshes instant-meshes/files
Message-ID:  <201801262354.w0QNskds086988@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Fri Jan 26 23:54:45 2018
New Revision: 460064
URL: https://svnweb.freebsd.org/changeset/ports/460064

Log:
  New port: graphics/instant-meshes: Interactive field-aligned mesh generator
  
  This application is developed by Wenzel Jakob and implements a novel
  approach in managing and display of 3D meshes.
  
  See the screenshot here:
  https://github.com/wjakob/instant-meshes/raw/master/resources/screenshot.jpg
  
  PR:		222711
  Submitted by:	Greg V <greg@unrelenting.technology>
  Approved by:	tcberner (mentor)
  Differential Revision:	D13661

Added:
  head/graphics/instant-meshes/
  head/graphics/instant-meshes/Makefile   (contents, props changed)
  head/graphics/instant-meshes/distinfo   (contents, props changed)
  head/graphics/instant-meshes/files/
  head/graphics/instant-meshes/files/instant-meshes.desktop   (contents, props changed)
  head/graphics/instant-meshes/files/patch-CMakeLists.txt   (contents, props changed)
  head/graphics/instant-meshes/files/patch-ext_nanogui_CMakeLists.txt   (contents, props changed)
  head/graphics/instant-meshes/files/patch-ext_nanogui_src_common.cpp   (contents, props changed)
  head/graphics/instant-meshes/pkg-descr   (contents, props changed)
  head/graphics/instant-meshes/pkg-message   (contents, props changed)
  head/graphics/instant-meshes/pkg-plist   (contents, props changed)
Modified:
  head/graphics/Makefile

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Fri Jan 26 23:47:28 2018	(r460063)
+++ head/graphics/Makefile	Fri Jan 26 23:54:45 2018	(r460064)
@@ -379,6 +379,7 @@
     SUBDIR += impressive
     SUBDIR += imv
     SUBDIR += inkscape
+    SUBDIR += instant-meshes
     SUBDIR += intel-backlight
     SUBDIR += intergif
     SUBDIR += inventor

Added: head/graphics/instant-meshes/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/Makefile	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,51 @@
+# $FreeBSD$
+
+PORTNAME=	instant-meshes
+DISTVERSION=	0.0-42
+DISTVERSIONSUFFIX=	-g4a083f4
+CATEGORIES=	graphics
+
+MAINTAINER=	greg@unrelenting.technology
+COMMENT=	Interactive field-aligned mesh generator
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS=	convert:graphics/ImageMagick
+LIB_DEPENDS=	libglfw.so:graphics/glfw \
+		libtbb.so:devel/tbb
+RUN_DEPENDS=	zenity:x11/zenity
+
+USES=		cmake:outsource compiler:c++14-lang eigen:3 localbase:ldflags pkgconfig
+USE_GITHUB=	yes
+GH_ACCOUNT=	wjakob
+GH_TUPLE=	wjakob:nanogui:2a61f03:nanogui/ext/nanogui \
+		wjakob:nanovg:ac15b84:nanovg/ext/nanogui/ext/nanovg \
+		wjakob:dset:7967ef0:dset/ext/dset \
+		wjakob:pcg32:0ef13e6:pcg32/ext/pcg32 \
+		wjakob:pss:a91da33:pss/ext/pss  # x11-toolkits/nanogui should be a port dependency, but current versions aren't compatible
+USE_GL=		gl
+USE_XORG=	x11 xcursor xi xinerama xrandr xxf86vm
+CMAKE_ON=	NANOGUI_BUILD_PYTHON
+
+post-build:
+	@convert -verbose -resize 500x500 -gravity center -background none -extent 512x512 \
+		${WRKSRC}/resources/icon.png ${WRKDIR}/icon_512x512.png
+.for size in 128x128 192x192 256x256
+	@convert -verbose -resize ${size} ${WRKDIR}/icon_512x512.png ${WRKDIR}/icon_${size}.png
+.endfor
+.for size in 16x16 24x24 32x32 48x48 64x64 96x96
+	@convert -verbose -resize ${size} ${WRKDIR}/icon_512x512.png -unsharp 0x6 ${WRKDIR}/icon_${size}.png
+.endfor
+
+post-install:
+	@${RM} -r ${STAGEDIR}${PREFIX}/include ${STAGEDIR}${PREFIX}/lib
+.for size in 16x16 24x24 32x32 48x48 64x64 96x96 128x128 192x192 256x256 512x512
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}/apps
+	${INSTALL_DATA} ${WRKDIR}/icon_${size}.png \
+		${STAGEDIR}${PREFIX}/share/icons/hicolor/${size}/apps/${PORTNAME}.png
+.endfor
+	${INSTALL_PROGRAM} ${CONFIGURE_WRKSRC}/"Instant Meshes" ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/
+
+.include <bsd.port.mk>

Added: head/graphics/instant-meshes/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/distinfo	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,17 @@
+TIMESTAMP = 1514447413
+SHA256 (wjakob-instant-meshes-0.0-42-g4a083f4_GH0.tar.gz) = 8fbde93e36a8f8007463b6a34c15b755e3bb9856944f63a61773708021396e10
+SIZE (wjakob-instant-meshes-0.0-42-g4a083f4_GH0.tar.gz) = 3001873
+SHA256 (wjakob-nanogui-2a61f03_GH0.tar.gz) = 449ec1c4510377a651de5357b18b7540f9cc4bbf2cac6b1b36d28ceff045a6b3
+SIZE (wjakob-nanogui-2a61f03_GH0.tar.gz) = 2420569
+SHA256 (wjakob-glfw-0ff30d6_GH0.tar.gz) = 31bd08bd1d8061a3f62ff970561994b6c90d2db7ab955134cef71ee0eda5d165
+SIZE (wjakob-glfw-0ff30d6_GH0.tar.gz) = 471108
+SHA256 (wjakob-nanovg-ac15b84_GH0.tar.gz) = b7971a9c4ae472c39190ed6b24d98622fec3ace0e744362fa8b540dba212a4ff
+SIZE (wjakob-nanovg-ac15b84_GH0.tar.gz) = 2014793
+SHA256 (pybind-pybind11-c01a1c1_GH0.tar.gz) = 84cd4dc4c0b703a43d8d547c8ddadcf30d3c26e45e3a1565bd9d5ef5040fcf7d
+SIZE (pybind-pybind11-c01a1c1_GH0.tar.gz) = 360503
+SHA256 (wjakob-pcg32-0ef13e6_GH0.tar.gz) = 4043b476e24158b5fc157428f2c09eea342a8f03e77fa9d57609e220e8605b9e
+SIZE (wjakob-pcg32-0ef13e6_GH0.tar.gz) = 5320
+SHA256 (wjakob-dset-7967ef0_GH0.tar.gz) = 5f9361a6760b327cacbe77e9260bc3b121c35ff740c61d235aff7079efaa4423
+SIZE (wjakob-dset-7967ef0_GH0.tar.gz) = 2492
+SHA256 (wjakob-pss-a91da33_GH0.tar.gz) = e2dc7fd87c44971ea53d0c7436daa70ae3caba77facff7b5554fdb5a3d67c1b5
+SIZE (wjakob-pss-a91da33_GH0.tar.gz) = 3476

Added: head/graphics/instant-meshes/files/instant-meshes.desktop
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/files/instant-meshes.desktop	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Instant Meshes
+GenericName=An interactive field-aligned mesh generator
+Comment=An interactive field-aligned mesh generator
+Icon=instant-meshes
+# radeonsi_dri crash with DRI3
+#Exec=env LIBGL_DRI3_DISABLE=1 "Instant Meshes"
+Exec=sh -c "LIBGL_DRI3_DISABLE=1 instant-meshes"
+Categories=Graphics;3DGraphics;
+StartupNotify=true

Added: head/graphics/instant-meshes/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/files/patch-CMakeLists.txt	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,48 @@
+--- CMakeLists.txt.orig	2017-09-06 16:18:14 UTC
++++ CMakeLists.txt
+@@ -11,11 +11,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CO
+ endif()
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
+ 
+-if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/nanogui/ext/glfw")
+-  message(FATAL_ERROR "The Instant Meshes dependency repositories (NanoGUI, GLFW, etc.) are missing! "
+-    "You probably did not clone the project with --recursive. It is possible to recover "
+-    "by calling \"git submodule update --init --recursive\"")
+-endif()
++#if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/nanogui/ext/glfw")
++#  message(FATAL_ERROR "The Instant Meshes dependency repositories (NanoGUI, GLFW, etc.) are missing! "
++#    "You probably did not clone the project with --recursive. It is possible to recover "
++#    "by calling \"git submodule update --init --recursive\"")
++#endif()
+ 
+ # Enable folders for projects in Visual Studio
+ if (CMAKE_GENERATOR MATCHES "Visual Studio")
+@@ -66,7 +66,7 @@ set(NANOGUI_BUILD_EXAMPLE OFF CACHE BOOL
+ set(NANOGUI_BUILD_SHARED  OFF CACHE BOOL " " FORCE)
+ set(NANOGUI_BUILD_PYTHON  OFF CACHE BOOL " " FORCE)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/nanogui ext_build/nanogui)
+-set_property(TARGET nanogui glfw glfw_objects bin2c PROPERTY FOLDER "dependencies")
++set_property(TARGET nanogui bin2c PROPERTY FOLDER "dependencies")
+ 
+ # Build TBB
+ set(TBB_BUILD_STATIC ON CACHE BOOL " " FORCE)
+@@ -75,8 +75,8 @@ set(TBB_BUILD_TBBMALLOC OFF CACHE BOOL "
+ set(TBB_BUILD_TBBMALLOC_PROXY OFF CACHE BOOL " " FORCE)
+ set(TBB_BUILD_TESTS OFF CACHE BOOL " " FORCE)
+ 
+-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/tbb ext_build/tbb)
+-set_property(TARGET tbb_static tbb_def_files PROPERTY FOLDER "dependencies")
++#add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/tbb ext_build/tbb)
++#set_property(TARGET tbb_static tbb_def_files PROPERTY FOLDER "dependencies")
+ 
+ # Compile instant meshes with various compiler warnings turned on
+ if(MSVC)
+@@ -173,7 +173,7 @@ add_executable(InstantMeshes MACOSX_BUND
+   ${EXTRA_SOURCE})
+ 
+ add_definitions(${NANOGUI_EXTRA_DEFS})
+-target_link_libraries(InstantMeshes tbb_static nanogui ${NANOGUI_EXTRA_LIBS})
++target_link_libraries(InstantMeshes tbb nanogui ${NANOGUI_EXTRA_LIBS})
+ 
+ set_target_properties(InstantMeshes PROPERTIES OUTPUT_NAME "Instant Meshes")
+ 

Added: head/graphics/instant-meshes/files/patch-ext_nanogui_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/files/patch-ext_nanogui_CMakeLists.txt	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,76 @@
+--- ext/nanogui/CMakeLists.txt.orig	2016-10-15 20:12:12 UTC
++++ ext/nanogui/CMakeLists.txt
+@@ -6,12 +6,6 @@ if (POLICY CMP0058)
+   cmake_policy(SET CMP0058 NEW)
+ endif()
+ 
+-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw/src")
+-  message(FATAL_ERROR "The NanoGUI dependency repositories (GLFW, etc.) are missing! "
+-    "You probably did not clone the project with --recursive. It is possible to recover "
+-    "by calling \"git submodule update --init --recursive\"")
+-endif()
+-
+ if (WIN32)
+   set(NANOGUI_USE_GLAD_DEFAULT ON)
+ else()
+@@ -61,9 +55,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
+ endif()
+ 
+-# Compile GLFW
+-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw" "ext_build/glfw")
+-
+ # Python support: add NANOGUI_PYTHON flag to all targets
+ if (NANOGUI_BUILD_PYTHON)
+   list(APPEND NANOGUI_EXTRA_DEFS -DNANOGUI_PYTHON)
+@@ -174,13 +165,6 @@ if (NANOGUI_BUILD_SHARED)
+   endif()
+ endif()
+ 
+-# Always use libc++ on Clang
+-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
+-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
+-endif()
+-
+ if (NANOGUI_USE_GLAD)
+   # Build and include GLAD on Windows
+   list(APPEND LIBNANOGUI_EXTRA_SOURCE
+@@ -197,12 +181,12 @@ if (NANOGUI_USE_GLAD)
+ endif()
+ 
+ list(APPEND NANOGUI_EXTRA_INCS
+-  "${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw/include"
++  "${CMAKE_INSTALL_PREFIX}/include/GLFW"
+   "${CMAKE_CURRENT_SOURCE_DIR}/ext/nanovg/src"
+ )
+ 
+ if (NOT NANOGUI_EIGEN_INCLUDE_DIR)
+-  set(NANOGUI_EIGEN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/eigen")
++  set(NANOGUI_EIGEN_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/eigen3")
+   list(APPEND NANOGUI_EXTRA_INCS "${NANOGUI_EIGEN_INCLUDE_DIR}")
+ endif()
+ 
+@@ -226,9 +210,12 @@ elseif(CMAKE_SYSTEM MATCHES "Linux" OR C
+   if(CMAKE_SYSTEM MATCHES "Linux")
+     list(APPEND NANOGUI_EXTRA_LIBS dl)
+   endif()
++  if(CMAKE_SYSTEM MATCHES "FreeBSD")
++    list(APPEND NANOGUI_EXTRA_LIBS glfw)
++  endif()
+ endif()
+ 
+-include_directories(${NANOGUI_EIGEN_INCLUDE_DIR} ext/glfw/include ext/nanovg/src include ${CMAKE_CURRENT_BINARY_DIR})
++include_directories(${NANOGUI_EIGEN_INCLUDE_DIR} ext/nanovg/src include ${CMAKE_CURRENT_BINARY_DIR})
+ 
+ # Run simple C converter to put font files into the data segment
+ add_executable(bin2c resources/bin2c.c)
+@@ -311,7 +298,6 @@ add_library(nanogui-obj OBJECT
+ 
+ add_library(nanogui ${NANOGUI_LIBRARY_TYPE}
+   $<TARGET_OBJECTS:nanogui-obj>
+-  $<TARGET_OBJECTS:glfw_objects>
+ )
+ 
+ if (${NANOGUI_LIBRARY_TYPE} MATCHES "SHARED")

Added: head/graphics/instant-meshes/files/patch-ext_nanogui_src_common.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/files/patch-ext_nanogui_src_common.cpp	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,11 @@
+--- ext/nanogui/src/common.cpp.orig	2016-10-15 20:12:12 UTC
++++ ext/nanogui/src/common.cpp
+@@ -248,7 +248,7 @@ std::string file_dialog(const std::vecto
+     return std::string(ofn.lpstrFile);
+ #else
+     char buffer[FILE_DIALOG_MAX_BUFFER];
+-    std::string cmd = "/usr/bin/zenity --file-selection ";
++    std::string cmd = "zenity --file-selection ";
+     if (save)
+         cmd += "--save ";
+     cmd += "--file-filter=\"";

Added: head/graphics/instant-meshes/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/pkg-descr	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,11 @@
+Interactive 3D mesh retopology software developed as part of the publication
+"Instant Field-Aligned Meshes", ACM Transactions on Graphics (Proceedings of
+SIGGRAPH Asia, 2015).
+
+The application implements a novel approach to remesh a surface into an
+isotropic triangular or quad-dominant mesh using a unified local smoothing
+operator that optimizes both the edge orientations and vertex positions in
+the output mesh.  The algorithm produces meshes with high isotropy while
+naturally aligning and snapping edges to sharp features.
+
+WWW: https://igl.ethz.ch/projects/instant-meshes

Added: head/graphics/instant-meshes/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/pkg-message	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,8 @@
+======================================================================
+You installed instant-meshes: interactive field-aligned mesh generator
+
+You can also download and unzip 'Datasets' using the link on this site:
+https://github.com/wjakob/instant-meshes
+
+You can open these datasets (*.ply files) in the application.
+======================================================================

Added: head/graphics/instant-meshes/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/instant-meshes/pkg-plist	Fri Jan 26 23:54:45 2018	(r460064)
@@ -0,0 +1,12 @@
+bin/instant-meshes
+share/applications/instant-meshes.desktop
+share/icons/hicolor/128x128/apps/instant-meshes.png
+share/icons/hicolor/16x16/apps/instant-meshes.png
+share/icons/hicolor/192x192/apps/instant-meshes.png
+share/icons/hicolor/24x24/apps/instant-meshes.png
+share/icons/hicolor/256x256/apps/instant-meshes.png
+share/icons/hicolor/32x32/apps/instant-meshes.png
+share/icons/hicolor/48x48/apps/instant-meshes.png
+share/icons/hicolor/512x512/apps/instant-meshes.png
+share/icons/hicolor/64x64/apps/instant-meshes.png
+share/icons/hicolor/96x96/apps/instant-meshes.png



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801262354.w0QNskds086988>