From 13da267baf0300fbfdc4199ea4c3378f6bf35ed2 Mon Sep 17 00:00:00 2001 From: Amy Liffey Date: Thu, 14 Aug 2014 18:25:13 +0000 Subject: adding as a dependency for new package meshlab, lib3ds should be slotted in future per upstream/redhat discussion https://bugzilla.redhat.com/show_bug.cgi?id=633475#c3 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 34E69781) --- media-libs/lib3ds/ChangeLog | 11 ++- .../lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch | 17 ++++ .../lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch | 94 ++++++++++++++++++++++ media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild | 25 ++++++ media-libs/lib3ds/metadata.xml | 7 ++ 5 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch create mode 100644 media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch create mode 100644 media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild diff --git a/media-libs/lib3ds/ChangeLog b/media-libs/lib3ds/ChangeLog index 13a1c216d72d..4d9aaffb7185 100644 --- a/media-libs/lib3ds/ChangeLog +++ b/media-libs/lib3ds/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for media-libs/lib3ds # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/lib3ds/ChangeLog,v 1.27 2014/03/07 15:31:25 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/lib3ds/ChangeLog,v 1.28 2014/08/14 18:25:13 amynka Exp $ + +*lib3ds-1.3.0-r1 (14 Aug 2014) + + 14 Aug 2014; Amy Winston + +files/lib3ds-1.3.0-r1-mesh.c.patch, +files/lib3ds-1.3.0-r1-pkgconfig.patch, + +lib3ds-1.3.0-r1.ebuild, metadata.xml: + adding as a dependency for new package meshlab, lib3ds should be slotted in + future per upstream/redhat discussion + https://bugzilla.redhat.com/show_bug.cgi?id=633475#c3 07 Mar 2014; Michael Sterrett -lib3ds-1.3.0.ebuild: old diff --git a/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch new file mode 100644 index 000000000000..1455660596bf --- /dev/null +++ b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-mesh.c.patch @@ -0,0 +1,17 @@ +diff -Naur lib3ds-1.3.0.orig/lib3ds/mesh.c lib3ds-1.3.0/lib3ds/mesh.c +--- lib3ds-1.3.0.orig/lib3ds/mesh.c 2007-06-20 19:04:08.000000000 +0200 ++++ lib3ds-1.3.0/lib3ds/mesh.c 2010-09-14 06:34:39.987807911 +0200 +@@ -87,8 +87,11 @@ + faces=lib3ds_io_read_word(io); + for (i=0; ifaces); +- strcpy(mesh->faceL[index].material, name); ++ if (indexfaces) { ++ strncpy(mesh->faceL[index].material, name, 64); ++ } else { ++ // TODO warning ++ } + } + } + break; diff --git a/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch new file mode 100644 index 000000000000..41f658e5311b --- /dev/null +++ b/media-libs/lib3ds/files/lib3ds-1.3.0-r1-pkgconfig.patch @@ -0,0 +1,94 @@ +diff -uNr lib3ds-1.2.0.orig/lib3ds-config.in lib3ds-1.2.0/lib3ds-config.in +--- lib3ds-1.2.0.orig/lib3ds-config.in 2000-05-23 14:13:08.000000000 +0200 ++++ lib3ds-1.2.0/lib3ds-config.in 2007-10-21 06:37:48.000000000 +0200 +@@ -1,9 +1,5 @@ + #!/bin/sh + +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ +-exec_prefix_set=no +- + usage() + { + cat <&2 + fi + ++PKG_CONFIG_ARGS= ++ + while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; +@@ -30,23 +28,23 @@ + + case $1 in + --prefix=*) +- prefix=$optarg ++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=prefix=$optarg" + if test $exec_prefix_set = no ; then +- exec_prefix=$optarg ++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=exec_prefix=$optarg" + fi + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) +- exec_prefix=$optarg ++ PKG_CONFIG_ARGS="$PKG_CONFIG_ARGS --define-variable=exec_prefix=$optarg" + exec_prefix_set=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) +- echo @LIB3DS_VERSION@ ++ pkg-config --modversion lib3ds + ;; + --cflags) + echo_cflags=yes +@@ -62,23 +60,18 @@ + done + + if test "$echo_prefix" = "yes"; then +- echo $prefix ++ pkg-config $PKG_CONFIG_ARGS --variable=prefix lib3ds + fi + + if test "$echo_exec_prefix" = "yes"; then +- echo $exec_prefix ++ pkg-config $PKG_CONFIG_ARGS --variable=exec_prefix lib3ds + fi + + if test "$echo_cflags" = "yes"; then +- if test @includedir@ != /usr/include ; then +- echo -I@includedir@ +- fi ++ pkg-config $PKG_CONFIG_ARGS --cflags lib3ds + fi + + if test "$echo_libs" = "yes"; then +- if test @libdir@ != /usr/lib ; then +- my_linker_flags="-L@libdir@" +- fi +- echo ${my_linker_flags} -l3ds +-fi ++ pkg-config $PKG_CONFIG_ARGS --libs lib3ds ++fi + +diff -uNr lib3ds-1.2.0.orig/lib3ds.pc.in lib3ds-1.2.0/lib3ds.pc.in +--- lib3ds-1.2.0.orig/lib3ds.pc.in 1970-01-01 01:00:00.000000000 +0100 ++++ lib3ds-1.2.0/lib3ds.pc.in 2007-10-21 06:23:53.000000000 +0200 +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: lib3ds ++Description: lib3ds ++Version: @VERSION@ ++Requires: ++Libs: -L${libdir} -l3ds -lm ++Cflags: -I${includedir} diff --git a/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild b/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild new file mode 100644 index 000000000000..35bd995f4e1d --- /dev/null +++ b/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/lib3ds/lib3ds-1.3.0-r1.ebuild,v 1.1 2014/08/14 18:25:13 amynka Exp $ + +EAPI="5" + +inherit autotools-utils + +DESCRIPTION="library for managing 3D-Studio Release 3 and 4 .3DS files" +HOMEPAGE="https://code.google.com/p/lib3ds/" +SRC_URI="https://${PN}.googlecode.com/files/${P}.zip" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND="media-libs/freeglut + virtual/opengl" +DEPEND="${RDEPEND} + app-arch/unzip" +PATCHES=( + "${FILESDIR}/lib3ds-1.3.0-r1-pkgconfig.patch" + "${FILESDIR}/lib3ds-1.3.0-r1-mesh.c.patch" +) diff --git a/media-libs/lib3ds/metadata.xml b/media-libs/lib3ds/metadata.xml index d3c2cc926f0b..6dd50faab98c 100644 --- a/media-libs/lib3ds/metadata.xml +++ b/media-libs/lib3ds/metadata.xml @@ -2,4 +2,11 @@ games +3dprint + + amynka@gentoo.org + + +lib3ds is an overall software library for managing 3D-Studio Release 3 and 4 ".3DS" files. + -- cgit v1.2.3-65-gdbad