From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7393C1396D0 for ; Sat, 23 Sep 2017 08:38:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 885DFE0BCF; Sat, 23 Sep 2017 08:38:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A337E0BCF for ; Sat, 23 Sep 2017 08:38:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4AA25341130 for ; Sat, 23 Sep 2017 08:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 20ED5908E for ; Sat, 23 Sep 2017 08:38:27 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1506155838.952cb1555b5ec3b133b5f0deb4fdd26810d5ae47.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/ptex/, media-libs/ptex/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/ptex/files/ptex-2.1.28-20170213.patch media-libs/ptex/files/ptex-2.1.28-allow-custom-build-type.patch media-libs/ptex/ptex-2.1.28-r1.ebuild X-VCS-Directories: media-libs/ptex/files/ media-libs/ptex/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: 952cb1555b5ec3b133b5f0deb4fdd26810d5ae47 X-VCS-Branch: master Date: Sat, 23 Sep 2017 08:38:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3cc29e94-09d8-4feb-ace2-c7c906f4ca8e X-Archives-Hash: dbd21c0b5524d5fdcb326b1989e32127 commit: 952cb1555b5ec3b133b5f0deb4fdd26810d5ae47 Author: Jonathan Scruggs gmail com> AuthorDate: Thu Sep 21 09:26:32 2017 +0000 Commit: David Seifert gentoo org> CommitDate: Sat Sep 23 08:37:18 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=952cb155 media-libs/ptex: revision bump to 2.1.28-r1 * Add latest upstream fixes * Add patch to allow custom build types Closes: https://github.com/gentoo/gentoo/pull/5753 media-libs/ptex/files/ptex-2.1.28-20170213.patch | 72 ++++++++++++++++++++++ .../ptex-2.1.28-allow-custom-build-type.patch | 39 ++++++++++++ media-libs/ptex/ptex-2.1.28-r1.ebuild | 25 ++++++++ 3 files changed, 136 insertions(+) diff --git a/media-libs/ptex/files/ptex-2.1.28-20170213.patch b/media-libs/ptex/files/ptex-2.1.28-20170213.patch new file mode 100644 index 00000000000..335d0778863 --- /dev/null +++ b/media-libs/ptex/files/ptex-2.1.28-20170213.patch @@ -0,0 +1,72 @@ +diff -purN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2016-04-04 18:14:05.000000000 +0100 ++++ b/CMakeLists.txt 2017-02-13 22:59:10.000000000 +0000 +@@ -16,7 +16,7 @@ else () + endif () + + if (NOT WIN32) +- set(CMAKE_CXX_FLAGS "-std=c++98 -Wall -Wextra -pedantic") ++ set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -pedantic ${CMAKE_CXX_FLAGS}") + endif () + + if(MSVC) +diff -purN a/Makefile b/Makefile +--- a/Makefile 2016-04-04 18:14:05.000000000 +0100 ++++ b/Makefile 2017-02-13 22:59:10.000000000 +0000 +@@ -17,6 +17,10 @@ ifdef PRMAN_15_COMPATIBLE_PTEX + CMAKE_FLAGS += -DPRMAN_15_COMPATIBLE_PTEX:BOOL=TRUE + endif + ++ifdef TOOLCHAIN ++ CMAKE_FLAGS += -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN) ++endif ++ + # make V=1 shortcut for VERBOSE=1 + ifdef V + VERBOSE=1 +diff -purN a/src/ptex/PtexHashMap.h b/src/ptex/PtexHashMap.h +--- a/src/ptex/PtexHashMap.h 2016-04-04 18:14:05.000000000 +0100 ++++ b/src/ptex/PtexHashMap.h 2017-02-13 22:59:10.000000000 +0000 +@@ -284,14 +284,11 @@ private: + + Entry* lockEntriesAndGrowIfNeeded(size_t& newMemUsed) + { +- while (_size*2 >= _numEntries) { +- Entry* entries = lockEntries(); +- if (_size*2 >= _numEntries) { +- entries = grow(entries, newMemUsed); +- } +- return entries; ++ Entry* entries = lockEntries(); ++ if (_size*2 >= _numEntries) { ++ entries = grow(entries, newMemUsed); + } +- return lockEntries(); ++ return entries; + } + + Entry* grow(Entry* oldEntries, size_t& newMemUsed) +diff -purN a/src/ptex/PtexIO.h b/src/ptex/PtexIO.h +--- a/src/ptex/PtexIO.h 2016-04-04 18:14:05.000000000 +0100 ++++ b/src/ptex/PtexIO.h 2017-02-13 22:59:10.000000000 +0000 +@@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + + PTEX_NAMESPACE_BEGIN + ++#pragma pack(push, 1) + struct Header { + uint32_t magic; + uint32_t version; +@@ -98,6 +99,7 @@ struct EditMetaDataHeader { + uint32_t metadatazipsize; + uint32_t metadatamemsize; + }; ++#pragma pack(pop) + + const uint32_t Magic = 'P' | ('t'<<8) | ('e'<<16) | ('x'<<24); + const int HeaderSize = sizeof(Header); +diff -purN a/.workonrc.products b/.workonrc.products +--- a/.workonrc.products 1970-01-01 01:00:00.000000000 +0100 ++++ b/.workonrc.products 2017-02-13 22:59:10.000000000 +0000 +@@ -0,0 +1 @@ ++Ptex diff --git a/media-libs/ptex/files/ptex-2.1.28-allow-custom-build-type.patch b/media-libs/ptex/files/ptex-2.1.28-allow-custom-build-type.patch new file mode 100644 index 00000000000..fd79759f7ed --- /dev/null +++ b/media-libs/ptex/files/ptex-2.1.28-allow-custom-build-type.patch @@ -0,0 +1,39 @@ +diff -purN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2017-02-13 22:59:10.000000000 +0000 ++++ b/CMakeLists.txt 2017-08-08 14:19:10.325817085 +0100 +@@ -8,11 +8,16 @@ include(FindThreads) + + enable_testing() + +-# Detect the build type from the $FLAVOR environment variable +-if ("$ENV{FLAVOR}" MATCHES "debug") +- set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE) +-else () +- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) ++if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) ++ # Detect the build type from the $FLAVOR environment variable ++ # Default to optimized Release builds when unspecified. ++ if ("$ENV{FLAVOR}" MATCHES "debug") ++ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "type of build" FORCE) ++ elseif ("$ENV{FLAVOR}" MATCHES "profile") ++ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "type of build" FORCE) ++ else () ++ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) ++ endif () + endif () + + if (NOT WIN32) +diff -purN a/Makefile b/Makefile +--- a/Makefile 2017-02-13 22:59:10.000000000 +0000 ++++ b/Makefile 2017-08-08 14:19:16.939829578 +0100 +@@ -21,6 +21,10 @@ ifdef TOOLCHAIN + CMAKE_FLAGS += -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN) + endif + ++ifdef BUILD_TYPE ++ CMAKE_FLAGS += -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ++endif ++ + # make V=1 shortcut for VERBOSE=1 + ifdef V + VERBOSE=1 diff --git a/media-libs/ptex/ptex-2.1.28-r1.ebuild b/media-libs/ptex/ptex-2.1.28-r1.ebuild new file mode 100644 index 00000000000..494ddef43b0 --- /dev/null +++ b/media-libs/ptex/ptex-2.1.28-r1.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils + +DESCRIPTION="Per-Face Texture Mapping for Production Rendering" +HOMEPAGE="http://ptex.us/" +SRC_URI="https://github.com/wdas/ptex/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="sys-libs/zlib:=" +DEPEND="${RDEPEND} + app-doc/doxygen" + +PATCHES=( + "${FILESDIR}/${P}-20170213.patch" + "${FILESDIR}/${P}-allow-custom-build-type.patch" +) + +mycmakeargs=( -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}/html" )