rpms/lib3ds/F-8 lib3ds-1.2.0-pkgconfig.diff, NONE, 1.1 lib3ds-1.3.0-3ds2m.diff, NONE, 1.1 .cvsignore, 1.3, 1.4 lib3ds.spec, 1.14, 1.15 sources, 1.3, 1.4
Ralf Corsépius (corsepiu)
fedora-extras-commits at redhat.com
Sat Nov 3 07:28:14 UTC 2007
- Previous message (by thread): rpms/lib3ds/devel lib3ds-1.3.0-3ds2m.diff, NONE, 1.1 .cvsignore, 1.3, 1.4 lib3ds.spec, 1.16, 1.17 sources, 1.3, 1.4
- Next message (by thread): rpms/lib3ds/F-8 lib3ds-1.2.0.diff,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: corsepiu
Update of /cvs/pkgs/rpms/lib3ds/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11372
Modified Files:
.cvsignore lib3ds.spec sources
Added Files:
lib3ds-1.2.0-pkgconfig.diff lib3ds-1.3.0-3ds2m.diff
Log Message:
* Sat Nov 03 2007 Ralf Corsépius <rc040203 at freenet.de> - 1.3.0-1
- Cleanup spec.
- Add post/postun.
- Re-add 3ds2m for fedora < 9.
- Abandon *-static for fedora >= 9.
lib3ds-1.2.0-pkgconfig.diff:
--- NEW FILE lib3ds-1.2.0-pkgconfig.diff ---
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 <<EOF
@@ -22,6 +18,8 @@
usage 1 1>&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 at 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 at 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}
lib3ds-1.3.0-3ds2m.diff:
--- NEW FILE lib3ds-1.3.0-3ds2m.diff ---
diff -uNr lib3ds-1.3.0.orig/tools/3ds2m.1 lib3ds-1.3.0/tools/3ds2m.1
--- lib3ds-1.3.0.orig/tools/3ds2m.1 1970-01-01 01:00:00.000000000 +0100
+++ lib3ds-1.3.0/tools/3ds2m.1 2007-11-03 07:23:44.000000000 +0100
@@ -0,0 +1,38 @@
+.TH 3ds2m 1 "12 Jan 2001" Version 1.0
+.SH NAME
+3ds2m - Converts meshes of a 3DS file into a m-file.
+.SH SYNOPSIS
+.B 3ds2m
+[options] filename [options]
+.SH DESCRIPTION
+.PP
+\fI3ds2m\fP is a tool to convert meshes of a 3DS file into a m-file.
+.SH OPTIONS
+.l
+\fI3ds2m\fP accepts the following options:
+.TP 8
+.B -h/--help
+This help
+.TP 8
+.B -o/--output <filename>
+Write output to <filename> instead of stdout
+.TP 8
+.B -m/--mesh name
+Write only specific mesh.B -c/--camera <name>
+.SH COPYRIGHT
+3ds2m Copyright \(co 1996-2001 by J.E. Hoffmann <je-h at gmx.net>
+.PP
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+.PP
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+.PP
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
diff -uNr lib3ds-1.3.0.orig/tools/3ds2m.c lib3ds-1.3.0/tools/3ds2m.c
--- lib3ds-1.3.0.orig/tools/3ds2m.c 1970-01-01 01:00:00.000000000 +0100
+++ lib3ds-1.3.0/tools/3ds2m.c 2007-11-03 07:23:44.000000000 +0100
@@ -0,0 +1,211 @@
+/*
+ * The 3D Studio File Format Library
+ * Copyright (C) 1996-2001 by J.E. Hoffmann <je-h at gmx.net>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: 3ds2m.c,v 1.1 2001/07/18 12:17:49 jeh Exp $
+ */
+#include <lib3ds/file.h>
+#include <lib3ds/mesh.h>
+#include <lib3ds/vector.h>
+#include <stdlib.h>
+#include <string.h>
+#include <config.h>
+#ifdef WITH_DMALLOC
+#include <dmalloc.h>
+#endif
+
+
+/*!
+\example 3ds2m.c
+
+Converts meshes of a <i>3DS</i> file into a m-file.
+
+\code
+Syntax: 3ds2m [options] filename [options]
+
+Options:
+ -h/--help This help
+ -o/--output filename Write output to file instead of stdout
+ -m/--mesh name Write only specific mesh
+\endcode
+
+A m-file is a simple data format storing vertex and face information of a polygonal mesh.
+It has the following structure.
+
+\code
+#
+# <comment>
+#
+Vertex <vertex-id> <x> <y> <z>
+...
+Face <face-id> <vertex-1> <vertex-2> ... <vertex-n>
+\endcode
+
+\author J.E. Hoffmann <je-h at gmx.net>
+*/
+
+
+static void
+help()
+{
+ fprintf(stderr,
+"The 3D Studio File Format Library - 3ds2m Version " VERSION "\n"
+"Copyright (C) 1996-2001 by J.E. Hoffmann <je-h at gmx.net>\n"
+"All rights reserved.\n"
+""
+"Syntax: 3ds2m [options] filename [options]\n"
+"\n"
+"Options:\n"
+" -h/--help This help\n"
+" -o/--output filename Write output to file instead of stdout\n"
+" -m/--mesh name Write only specific mesh\n"
+"\n"
+);
+ exit(1);
+}
+
+
+static const char* filename=0;
+static const char* output=0;
+static const char* mesh=0;
+
+
+static void
+parse_args(int argc, char **argv)
+{
+ int i;
+
+ for (i=1; i<argc; ++i) {
+ if (argv[i][0]=='-') {
+ if ((strcmp(argv[i],"-h")==0) || (strcmp(argv[i],"--help")==0)) {
+ help();
+ }
+ else
+ if ((strcmp(argv[i],"-o")==0) || (strcmp(argv[i],"--output")==0)) {
+ ++i;
+ if (output || (i>=argc)) {
+ help();
+ }
+ output=argv[i];
+ }
+ else
+ if ((strcmp(argv[i],"-m")==0) || (strcmp(argv[i],"--mesh")==0)) {
+ ++i;
+ if (mesh || (i>=argc)) {
+ help();
+ }
+ mesh=argv[i];
+ }
+ else {
+ help();
+ }
+ }
+ else {
+ if (filename) {
+ help();
+ }
+ filename=argv[i];
+ }
+ }
+ if (!filename) {
+ help();
+ }
+}
+
+
+static void
+dump_m_file(Lib3dsFile *f, FILE *o)
+{
+ Lib3dsMesh *m;
+ int points=0;
+ int faces=0;
+ unsigned i;
+ Lib3dsVector pos;
+
+ fprintf(o, "#\n");
+ fprintf(o, "# Created by lib3ds2m (http://lib3ds.sourceforge.net)\n");
+ fprintf(o, "#\n");
+ for (m=f->meshes; m; m=m->next) {
+ if (mesh) {
+ if (strcmp(mesh, m->name)!=0) {
+ continue;
+ }
+ }
+
+ fprintf(o, "#\n");
+ fprintf(o, "# %s vertices=%ld faces=%ld\n",
+ m->name,
+ m->points,
+ m->faces
+ );
+ fprintf(o, "#\n");
+
+ for (i=0; i<m->points; ++i) {
+ lib3ds_vector_copy(pos, m->pointL[i].pos);
+ fprintf(o, "Vertex %d %f %f %f\n", points+i, pos[0], pos[1],pos[2]);
+ }
+
+ for (i=0; i<m->faces; ++i) {
+ fprintf(o, "Face %d %d %d %d\n",
+ faces+i,
+ points+m->faceL[i].points[0],
+ points+m->faceL[i].points[1],
+ points+m->faceL[i].points[2]
+ );
+ }
+
+ points+=m->points;
+ faces+=m->faces;
+ }
+}
+
+
+int
+main(int argc, char **argv)
+{
+ Lib3dsFile *f=0;
+
+ parse_args(argc, argv);
+ f=lib3ds_file_load(filename);
+ if (!f) {
+ fprintf(stderr, "***ERROR***\nLoading file %s failed\n", filename);
+ exit(1);
+ }
+ if (output) {
+ FILE *o=fopen(output, "w+");
+ if (!o) {
+ fprintf(stderr, "***ERROR***\nCan't open %s for writing\n", output);
+ exit(1);
+ }
+ dump_m_file(f,o);
+ fclose(o);
+ }
+ else {
+ dump_m_file(f,stdout);
+ }
+
+ lib3ds_file_free(f);
+ return(0);
+}
+
+
+
+
+
+
+
diff -uNr lib3ds-1.3.0.orig/tools/Makefile.am lib3ds-1.3.0/tools/Makefile.am
--- lib3ds-1.3.0.orig/tools/Makefile.am 2007-06-14 11:59:10.000000000 +0200
+++ lib3ds-1.3.0/tools/Makefile.am 2007-11-03 07:25:10.000000000 +0100
@@ -24,13 +24,13 @@
-I$(top_srcdir)
bin_PROGRAMS = \
- 3dsdump
+ 3dsdump 3ds2m
LDADD = \
$(top_builddir)/lib3ds/lib3ds.la
MANPAGES = \
- 3dsdump.1
+ 3dsdump.1 3ds2m.1
man_MANS = $(MANPAGES)
EXTRA_DIST = $(MANPAGES)
diff -uNr lib3ds-1.3.0.orig/tools/Makefile.in lib3ds-1.3.0/tools/Makefile.in
--- lib3ds-1.3.0.orig/tools/Makefile.in 2007-06-27 08:37:20.000000000 +0200
+++ lib3ds-1.3.0/tools/Makefile.in 2007-11-03 07:25:30.000000000 +0100
@@ -32,7 +32,7 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-bin_PROGRAMS = 3dsdump$(EXEEXT)
+bin_PROGRAMS = 3dsdump$(EXEEXT) 3ds2m$(EXEEXT)
subdir = tools
DIST_COMMON = $(srcdir)/3dsdump.1.in $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
@@ -50,6 +50,10 @@
3dsdump_OBJECTS = 3dsdump.$(OBJEXT)
3dsdump_LDADD = $(LDADD)
3dsdump_DEPENDENCIES = $(top_builddir)/lib3ds/lib3ds.la
+3ds2m_SOURCES = 3ds2m.c
+3ds2m_OBJECTS = 3ds2m.$(OBJEXT)
+3ds2m_LDADD = $(LDADD)
+3ds2m_DEPENDENCIES = $(top_builddir)/lib3ds/lib3ds.la
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -62,8 +66,8 @@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = 3dsdump.c
-DIST_SOURCES = 3dsdump.c
+SOURCES = 3dsdump.c 3ds2m.c
+DIST_SOURCES = 3dsdump.c 3ds2m.c
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
@@ -187,7 +191,7 @@
$(top_builddir)/lib3ds/lib3ds.la
MANPAGES = \
- 3dsdump.1
+ 3dsdump.1 3ds2m.1
man_MANS = $(MANPAGES)
EXTRA_DIST = $(MANPAGES)
@@ -257,6 +261,9 @@
3dsdump$(EXEEXT): $(3dsdump_OBJECTS) $(3dsdump_DEPENDENCIES)
@rm -f 3dsdump$(EXEEXT)
$(LINK) $(3dsdump_OBJECTS) $(3dsdump_LDADD) $(LIBS)
+3ds2m$(EXEEXT): $(3ds2m_OBJECTS) $(3ds2m_DEPENDENCIES)
+ @rm -f 3ds2m$(EXEEXT)
+ $(LINK) $(3ds2m_OBJECTS) $(3ds2m_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -265,6 +272,7 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/3dsdump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/3ds2m.Po at am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/lib3ds/F-8/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 5 Jan 2006 14:07:47 -0000 1.3
+++ .cvsignore 3 Nov 2007 07:27:39 -0000 1.4
@@ -1,2 +1 @@
-lib3ds-1.2.0.tar.gz
-lib3ds-cvs-20060105.diff
+lib3ds-1.3.0.zip
Index: lib3ds.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lib3ds/F-8/lib3ds.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- lib3ds.spec 20 Oct 2007 02:54:53 -0000 1.14
+++ lib3ds.spec 3 Nov 2007 07:27:39 -0000 1.15
@@ -1,15 +1,16 @@
Name: lib3ds
-Version: 1.2.0
-Release: 12%{?dist}
+Version: 1.3.0
+Release: 1%{?dist}
Summary: 3D Studio file format library
Group: System Environment/Libraries
License: LGPLv2+
URL: http://lib3ds.sourceforge.net
-Source: http://downloads.sourceforge.net/lib3ds/lib3ds-%{version}.tar.gz
-Patch0: lib3ds-1.2.0.diff
-Patch1: lib3ds-cvs-20060105.diff
+Source: http://downloads.sourceforge.net/lib3ds/lib3ds-%{version}.zip
+Patch2: lib3ds-1.2.0-pkgconfig.diff
+Patch3: lib3ds-1.3.0-3ds2m.diff
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@@ -35,44 +36,108 @@
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README
%{_bindir}/3dsdump
-%{_bindir}/3ds2m
%{_mandir}/man1/3dsdump.1*
+%if "%{?fedora}" < "9"
+%{_bindir}/3ds2m
%{_mandir}/man1/3ds2m.1*
+%endif
%package devel
Summary: %summary
Group: Development/Libraries
-Provides: lib3ds-static = %{version}-%{release}
+Requires: pkgconfig
+Requires: lib3ds = %{version}-%{release}
%description devel
Development files for lib3ds
+%if "%{?fedora}" < "9"
+%package static
+Summary: %summary
+Group: Development/Libraries
+Requires: lib3ds-devel = %{version}-%{release}
+
+%description static
+Static development files for lib3ds
+%endif
+
%prep
%setup -q
-%patch -p1 -P 0
-%patch -p2 -P 1
+%patch -p1 -P 2
+
+%if "%{?fedora}" < "9"
+%patch -p1 -P 3
+%endif
%build
-%configure
+%configure \
+%if "%{?fedora}" >= "9"
+ --disable-static
+%endif
+
make %{?_smp_mflags}
+sed -e 's, at prefix@,%{_prefix},' \
+ -e 's, at exec_prefix@,%{_exec_prefix},' \
+ -e 's, at libdir@,%{_libdir},' \
+ -e 's, at includedir@,%{_includedir},' \
+ -e 's, at VERSION@,%{version},' \
+ lib3ds.pc.in > lib3ds.pc
+
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
+install -d ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig
+install lib3ds.pc -m 0644 ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig
+
+## Remove libtool archive
+rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
+
+
%clean
rm -rf $RPM_BUILD_ROOT
-%files devel
+%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README
-%{_bindir}/lib3ds-config
+%{_libdir}/*.so.*
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%if "%{?fedora}" < "9"
+%files static
%{_libdir}/*.a
+%endif
+
+
+%files devel
+%defattr(-,root,root,-)
+%{_bindir}/lib3ds-config
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/lib3ds.pc
%{_mandir}/man1/lib3ds-config.1*
%{_includedir}/lib3ds
%{_datadir}/aclocal/*
%changelog
+* Sat Nov 03 2007 Ralf Corsépius <rc040203 at freenet.de> - 1.3.0-1
+- Cleanup spec.
+- Add post/postun.
+- Re-add 3ds2m for fedora < 9.
+- Abandon *-static for fedora >= 9.
+
+* Fri Nov 02 2007 Xavier Lamien <lxtnow[at]gmail.com> - 1.3.0
+- Updated Release.
+
+* Sun Oct 21 2007 Ralf Corsépius <rc040203 at freenet.de> - 1.2.0-13
+- Address BZ 341851:
+ - Add lib3ds.pc.
+ - Rework lib3ds-config to using lib3ds.pc.
+ - Add lib3ds-1.2.0-pkgconfig.diff
+
* Sat Oct 20 2007 Ralf Corsépius <rc040203 at freenet.de> - 1.2.0-12
- Change Source: to using downloads.sourceforge.net.
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/lib3ds/F-8/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 5 Jan 2006 14:07:47 -0000 1.3
+++ sources 3 Nov 2007 07:27:39 -0000 1.4
@@ -1,2 +1 @@
-3a7f891d18af0151876b98bc05d3b373 lib3ds-1.2.0.tar.gz
-f337a875d264c2e938d762ca82491451 lib3ds-cvs-20060105.diff
+2572f7b0f29b591d494c1a0658b35c86 lib3ds-1.3.0.zip
- Previous message (by thread): rpms/lib3ds/devel lib3ds-1.3.0-3ds2m.diff, NONE, 1.1 .cvsignore, 1.3, 1.4 lib3ds.spec, 1.16, 1.17 sources, 1.3, 1.4
- Next message (by thread): rpms/lib3ds/F-8 lib3ds-1.2.0.diff,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list