diff options
Diffstat (limited to 'media-libs/openctm')
-rw-r--r-- | media-libs/openctm/Manifest | 7 | ||||
-rw-r--r-- | media-libs/openctm/files/openctm-fix-makefiles.patch | 191 | ||||
-rw-r--r-- | media-libs/openctm/files/openctm-no-strip.patch | 34 | ||||
-rw-r--r-- | media-libs/openctm/metadata.xml | 17 | ||||
-rw-r--r-- | media-libs/openctm/openctm-1.0.3.ebuild | 45 |
5 files changed, 294 insertions, 0 deletions
diff --git a/media-libs/openctm/Manifest b/media-libs/openctm/Manifest new file mode 100644 index 000000000000..9c66f9d5038d --- /dev/null +++ b/media-libs/openctm/Manifest @@ -0,0 +1,7 @@ +AUX openctm-fix-makefiles.patch 6672 SHA256 a3b320c7c984b7cb6b10a99d105c1d7c5e68f243e78417c125b343fee3ae9e48 SHA512 96cbe3775632d5b86ba5bb08b283707b5e89ffb0b837b2366f88955eb35341e02ea33de1b2562f87692b359d1b28a96833a163ec1d29f6f266cd641de972a527 WHIRLPOOL 29640999b88f401aee48ac85090b42c0313ea25bacf92a5c6a0f810d591adb8ea6778cea4d1ba3bfdccdb3fc301bc1226fa919c7e411a906ee0147b6aca8a7b5 +AUX openctm-no-strip.patch 1654 SHA256 1ed768f41c41a75e807cad1005b6e9debfdd167c2af6644fcaf12616dd60db10 SHA512 a38c4647a0113892d2294efec96efb073cec4d5771c383cd7454422195f230b0326610905534e758fb1f1bf36a6dca1810005f603f70d73584093b8895a99ec0 WHIRLPOOL eacc3d2bfb3e7e935201d0c93ea22229f98a2120fae9f679aefced3f9070f8c56c38676c23b4054245c9487f5da2df76d6103160b993ecd4a8eb6764e2f17217 +DIST openctm_1.0.3+dfsg1.orig.tar.bz2 179792 SHA256 b72bae806d65dcb4d55b88f17bb636c9908717871cbebff6c32024399f50a074 SHA512 4ea8c9230e01b57fce4d741df77713df8fb0493fbb20c8d4b183e3e8cec16f97e8003d2569b1c7cac07a17d334711673c0fed0c6c050bbdb901028ee9f6c32f6 WHIRLPOOL 954ce30a418fba80649cd2f0eae604391c42a64e627a9d66171097da6fee55fba94229054350dc18cd311cc7d7fb0e1b5a6f9d7db0dce5d91451821df33da5f7 +EBUILD openctm-1.0.3.ebuild 911 SHA256 3d864e057524e2c098524217d7f86602dd69b5ceaea52c8165b31d76aaa99681 SHA512 b8f66ebfa20633d197665ce44469e218121872694702f47ae7f6a1ca01b7dddda7b3f1efd79ba3b02cd2153069e0c5e1f75cd6dea9a0f23646cd2de0a21cd68a WHIRLPOOL 4bb4ac0c004859c6f66c90f4723e62a6182bfa8c879a56b34512d49dd878d4d767311209ee27c3cb9a91a9554acd473208324068f49adcde33b73c172bd33745 +MISC ChangeLog 3044 SHA256 cae8d836dde4c89902947ac94caa7f9e73f205e817cb300bc0fa9949e6851cee SHA512 0a32fbfca6b6a9135af15ced62846f849ffceef4de3e57f36c94319df45f738238ea35158f1a7363e56f2e33d9aead15d1c11ad8f6854482a6559bae1f592621 WHIRLPOOL 16d17a2899ae9cbc96dedd5601ecbf4e2ad4560837a9bcb561746722fe7f2882227140e4e14b751fff8949d046bef789a1e507e8c5cff6d1e5a06cfe5560e165 +MISC ChangeLog-2015 1407 SHA256 62fe17e16a613f7dd7a3d2cce7dc1d75f4d27cb4f17ce57236017a02771d44a8 SHA512 b88ecad99211f6c801261ad08d67f6d3c0f708ef053d282c3967f57857d281770dc9123405205fec0d61ed5e8dcd0f1733976d926c793d7075e49497df47f371 WHIRLPOOL 1f8b05788294ddc61b6e80e8765de647cc4b531f632f0ce2da8d428cf1c10a4d48eb1bbf1c40eb747e87bca0dce7d582c5bba76f52e9b9a87356d01e702a5362 +MISC metadata.xml 610 SHA256 df8993c80d8ff30ec550e2c6b394e9892e5f252f42cd74302164fbb5eeff19a5 SHA512 bcc0db1bb45aa6377efa3bdedfe517782c9bb366c8ea107a1ef54bb1a436d5d299ff79dfcb3d659f1e380bdc35eeb798900927198086f52d9b6f20b28860a32c WHIRLPOOL ff01f9a20e9303c2d09a15d8ed72b32110e5ec8a012c7e9a5828d359be67a3fe39f936ff1faf24f1159e26549c498bcd304c40270be82d5fc7f00cdd1c0f0dfc diff --git a/media-libs/openctm/files/openctm-fix-makefiles.patch b/media-libs/openctm/files/openctm-fix-makefiles.patch new file mode 100644 index 000000000000..540b3cfa84fc --- /dev/null +++ b/media-libs/openctm/files/openctm-fix-makefiles.patch @@ -0,0 +1,191 @@ + Makefile.linux | 18 ++++++++------- + lib/Makefile.linux | 23 ++++++++++++------- + tools/Makefile.linux | 64 ++++++++++++++++++++-------------------------------- + 3 files changed, 50 insertions(+), 55 deletions(-) + +diff --git a/Makefile.linux b/Makefile.linux +index 24ca137..51fc88c 100644 +--- a/Makefile.linux ++++ b/Makefile.linux +@@ -47,19 +47,21 @@ documentation: + + + # Installation settings +-LIBDIR = /usr/lib/ +-INCDIR = /usr/local/include/ +-BINDIR = /usr/local/bin/ +-MAN1DIR = /usr/local/share/man/man1/ +-CP = cp ++LIBDIR = $(DESTDIR)/usr/@GENTOO_LIBDIR@/$(DEB_HOST_MULTIARCH) ++INCDIR = $(DESTDIR)/usr/include/ ++BINDIR = $(DESTDIR)/usr/bin/ ++MAN1DIR = $(DESTDIR)/usr/share/man/man1/ ++CP = cp -P + MKDIR = mkdir -p + +-install: +- $(CP) lib/libopenctm.so $(LIBDIR) ++$(LIBDIR) $(INCDIR) $(BINDIR) $(MAN1DIR): ++ mkdir -p "$@" ++ ++install: $(LIBDIR) $(INCDIR) $(BINDIR) $(MAN1DIR) ++ $(CP) lib/libopenctm.so* $(LIBDIR) + $(CP) lib/openctm.h $(INCDIR) + $(CP) lib/openctmpp.h $(INCDIR) + $(CP) tools/ctmconv $(BINDIR) + $(CP) tools/ctmviewer $(BINDIR) +- $(MKDIR) $(MAN1DIR) + $(CP) doc/ctmconv.1 $(MAN1DIR) + $(CP) doc/ctmviewer.1 $(MAN1DIR) +diff --git a/lib/Makefile.linux b/lib/Makefile.linux +index 7643127..1e622ec 100644 +--- a/lib/Makefile.linux ++++ b/lib/Makefile.linux +@@ -27,13 +27,18 @@ + ###############################################################################
+
+ LZMADIR = liblzma
+-CC = gcc
+-CFLAGS = -O3 -W -Wall -c -fPIC -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM -std=c99 -pedantic
+-CFLAGS_LZMA = -O3 -W -Wall -c -fPIC -DLZMA_PREFIX_CTM -std=c99 -pedantic
++CC ?= gcc
++CFLAGS += -W -Wall -c -fPIC -std=c99 -pedantic
++INCDEF = -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM
++INCDEF_LZMA = -DLZMA_PREFIX_CTM
+ RM = rm -f
+ DEPEND = $(CPP) -MM
+
+-DYNAMICLIB = libopenctm.so
++VERSION = 1.0.3
++SOVERSION = 1
++LIBNAME = libopenctm.so
++SONAME = $(LIBNAME).$(SOVERSION)
++DYNAMICLIB = $(LIBNAME).$(VERSION)
+
+ OBJS = openctm.o \
+ stream.o \
+@@ -64,16 +69,18 @@ LZMA_SRCS = $(LZMADIR)/Alloc.c \ + all: $(DYNAMICLIB)
+
+ clean:
+- $(RM) $(DYNAMICLIB) $(OBJS) $(LZMA_OBJS)
++ $(RM) $(DYNAMICLIB) $(SONAME) $(LIBNAME) $(OBJS) $(LZMA_OBJS)
+
+ $(DYNAMICLIB): $(OBJS) $(LZMA_OBJS)
+- gcc -shared -s -Wl,-soname,$@ -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ $(CC) $(LDFLAGS) -shared -s -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ ln -s $(DYNAMICLIB) $(SONAME)
++ ln -s $(DYNAMICLIB) $(LIBNAME)
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCDEF) $<
+
+ %.o: $(LZMADIR)/%.c
+- $(CC) $(CFLAGS_LZMA) $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCDEF_LZMA) $<
+
+ depend:
+ $(DEPEND) $(SRCS) $(LZMA_SRCS) > make.depend
+diff --git a/tools/Makefile.linux b/tools/Makefile.linux +index fa3e6e5..46276d1 100644 +--- a/tools/Makefile.linux ++++ b/tools/Makefile.linux +@@ -26,49 +26,50 @@ + ############################################################################### + + OPENCTMDIR = ../lib +-GLEWDIR = glew +-JPEGDIR = jpeg ++# Use system libs if possible ++#GLEWDIR = glew ++GLEWDIR = /usr/include/GL ++#JPEGDIR = jpeg + RPLYDIR = rply +-TINYXMLDIR = tinyxml +-ZLIBDIR = zlib +-PNGLITEDIR = pnglite ++# rply in libvxl1-dev is version 1.1, we need v. 1.01 ++#RPLYDIR = /usr/include/vxl/rply ++#TINYXMLDIR = tinyxml ++#ZLIBDIR = zlib ++#PNGLITEDIR = pnglite + +-CPP = g++ +-CPPFLAGS = -c -O3 -W -Wall `pkg-config --cflags gtk+-2.0` -I$(OPENCTMDIR) -I$(RPLYDIR) -I$(JPEGDIR) -I$(TINYXMLDIR) -I$(GLEWDIR) -I$(ZLIBDIR) -I$(PNGLITEDIR) ++CXX ?= g++ ++CC ?= gcc ++CXXFLAGS += -W -Wall `pkg-config --cflags gtk+-2.0` -I$(OPENCTMDIR) -I$(RPLYDIR) -I$(GLEWDIR) + + MESHOBJS = mesh.o meshio.o ctm.o ply.o rply.o stl.o 3ds.o dae.o obj.o lwo.o off.o wrl.o + CTMCONVOBJS = ctmconv.o common.o systimer.o convoptions.o $(MESHOBJS) +-CTMVIEWEROBJS = ctmviewer.o common.o image.o systimer.o sysdialog_gtk.o convoptions.o glew.o pnglite.o $(MESHOBJS) ++CTMVIEWEROBJS = ctmviewer.o common.o image.o systimer.o sysdialog_gtk.o convoptions.o $(MESHOBJS) + CTMBENCHOBJS = ctmbench.o systimer.o + + all: ctmconv ctmviewer ctmbench + + clean: + rm -f ctmconv ctmviewer ctmbench $(CTMCONVOBJS) $(CTMVIEWEROBJS) $(CTMBENCHOBJS) bin2c phong_frag.h phong_vert.h +- cd $(JPEGDIR) && $(MAKE) -f makefile.linux clean +- cd $(TINYXMLDIR) && $(MAKE) -f Makefile.linux clean +- cd $(ZLIBDIR) && $(MAKE) -f Makefile.linux clean + +-libopenctm.so: $(OPENCTMDIR)/libopenctm.so +- cp $< $@ ++ctmconv: $(CTMCONVOBJS) ++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml + +-ctmconv: $(CTMCONVOBJS) $(TINYXMLDIR)/libtinyxml.a libopenctm.so +- $(CPP) -s -o $@ -L$(OPENCTMDIR) -L$(TINYXMLDIR) $(CTMCONVOBJS) -Wl,-rpath,. -lopenctm -ltinyxml ++ctmviewer: $(CTMVIEWEROBJS) ++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \ ++ -ltinyxml -ljpeg -lpnglite -lz -lGL -lglut -lGLU -lGLEW \ ++ -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 + +-ctmviewer: $(CTMVIEWEROBJS) $(JPEGDIR)/libjpeg.a $(TINYXMLDIR)/libtinyxml.a $(ZLIBDIR)/libz.a libopenctm.so +- $(CPP) -s -o $@ -L$(OPENCTMDIR) -L$(TINYXMLDIR) -L$(JPEGDIR) -L$(ZLIBDIR) $(CTMVIEWEROBJS) -Wl,-rpath,. -lopenctm -ltinyxml -ljpeg -lz -lglut `pkg-config --libs gtk+-2.0` +- +-ctmbench: $(CTMBENCHOBJS) libopenctm.so +- $(CPP) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -Wl,-rpath,. -lopenctm ++ctmbench: $(CTMBENCHOBJS) ++ $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm + + %.o: %.cpp +- $(CPP) $(CPPFLAGS) -o $@ $< ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< + + ctmconv.o: ctmconv.cpp systimer.h convoptions.h mesh.h meshio.h + ctmviewer.o: ctmviewer.cpp common.h image.h systimer.h sysdialog.h mesh.h meshio.h phong_vert.h phong_frag.h icons/icon_open.h icons/icon_save.h icons/icon_help.h + ctmbench.o: ctmbench.cpp systimer.h + common.o: common.cpp common.h +-image.o: image.cpp image.h common.h $(JPEGDIR)/libjpeg.a ++image.o: image.cpp image.h common.h + systimer.o: systimer.cpp systimer.h + sysdialog_gtk.o: sysdialog_gtk.cpp sysdialog.h + convoptions.o: convoptions.cpp convoptions.h +@@ -91,22 +92,7 @@ phong_frag.h: phong.frag bin2c + ./bin2c phong.frag phongFragSrc > $@ + + bin2c: bin2c.cpp +- $(CPP) -Os -W -Wall -o $@ $< +- +-$(JPEGDIR)/libjpeg.a: +- cd $(JPEGDIR) && $(MAKE) -f makefile.linux libjpeg.a +- +-$(ZLIBDIR)/libz.a: +- cd $(ZLIBDIR) && $(MAKE) -f Makefile.linux +- +-glew.o: $(GLEWDIR)/glew.c +- gcc -c -Os -W -I$(GLEWDIR) -o $@ $< ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -Os -W -Wall -o $@ $< + + rply.o: $(RPLYDIR)/rply.c +- gcc -c -O2 -W -I$(RPLYDIR) -o $@ $< +- +-pnglite.o: $(PNGLITEDIR)/pnglite.c +- gcc -c -O2 -W -I$(PNGLITEDIR) -o $@ $< +- +-$(TINYXMLDIR)/libtinyxml.a: +- cd $(TINYXMLDIR) && $(MAKE) -f Makefile.linux ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c -O2 -W -I$(RPLYDIR) -o $@ $< diff --git a/media-libs/openctm/files/openctm-no-strip.patch b/media-libs/openctm/files/openctm-no-strip.patch new file mode 100644 index 000000000000..5e31d4017b68 --- /dev/null +++ b/media-libs/openctm/files/openctm-no-strip.patch @@ -0,0 +1,34 @@ +diff -urN OpenCTM-1.0.3.old/lib/Makefile.linux OpenCTM-1.0.3/lib/Makefile.linux +--- OpenCTM-1.0.3.old/lib/Makefile.linux 2014-08-20 09:39:00.614744990 +0200 ++++ OpenCTM-1.0.3/lib/Makefile.linux 2014-08-20 09:40:09.782667989 +0200 +@@ -72,7 +72,7 @@ + $(RM) $(DYNAMICLIB) $(SONAME) $(LIBNAME) $(OBJS) $(LZMA_OBJS)
+
+ $(DYNAMICLIB): $(OBJS) $(LZMA_OBJS)
+- $(CC) $(LDFLAGS) -shared -s -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) $(LZMA_OBJS) -lm
+ ln -s $(DYNAMICLIB) $(SONAME)
+ ln -s $(DYNAMICLIB) $(LIBNAME)
+
+diff -urN OpenCTM-1.0.3.old/tools/Makefile.linux OpenCTM-1.0.3/tools/Makefile.linux +--- OpenCTM-1.0.3.old/tools/Makefile.linux 2014-08-20 09:39:00.583745025 +0200 ++++ OpenCTM-1.0.3/tools/Makefile.linux 2014-08-20 09:40:09.751668023 +0200 +@@ -52,15 +52,15 @@ + rm -f ctmconv ctmviewer ctmbench $(CTMCONVOBJS) $(CTMVIEWEROBJS) $(CTMBENCHOBJS) bin2c phong_frag.h phong_vert.h + + ctmconv: $(CTMCONVOBJS) +- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml ++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMCONVOBJS) -lopenctm -ltinyxml + + ctmviewer: $(CTMVIEWEROBJS) +- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \ ++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMVIEWEROBJS) -lopenctm \ + -ltinyxml -ljpeg -lpnglite -lz -lGL -lglut -lGLU -lGLEW \ + -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 + + ctmbench: $(CTMBENCHOBJS) +- $(CXX) $(LDFLAGS) -s -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm ++ $(CXX) $(LDFLAGS) -o $@ -L$(OPENCTMDIR) $(CTMBENCHOBJS) -lopenctm + + %.o: %.cpp + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< diff --git a/media-libs/openctm/metadata.xml b/media-libs/openctm/metadata.xml new file mode 100644 index 000000000000..42ee0dd6eb0e --- /dev/null +++ b/media-libs/openctm/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>amynka@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>3dprint@gentoo.org</email> + <name>Gentoo 3D print</name> + </maintainer> + <longdescription> + OpenCTM - the Open Compressed Triangle Mesh file format - is a file format, a software library and a tool set for compression of 3D triangle meshes. + </longdescription> + <upstream> + <remote-id type="sourceforge">openctm</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-libs/openctm/openctm-1.0.3.ebuild b/media-libs/openctm/openctm-1.0.3.ebuild new file mode 100644 index 000000000000..ca73f7094d6c --- /dev/null +++ b/media-libs/openctm/openctm-1.0.3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib versionator flag-o-matic + +MY_PV=OpenCTM-${PV} + +DESCRIPTION="OpenCTM - the Open Compressed Triangle Mesh." +HOMEPAGE="http://openctm.sourceforge.net" +SRC_URI="mirror://debian/pool/main/o/${PN}/${PN}_${PV}+dfsg1.orig.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-libs/tinyxml + media-libs/freeglut + media-libs/glew + media-libs/pnglite + virtual/opengl + x11-libs/gtk+:2" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_PV}" + +src_prepare() { + epatch \ + "${FILESDIR}"/openctm-fix-makefiles.patch \ + "${FILESDIR}"/openctm-no-strip.patch + mv Makefile.linux Makefile || die + sed \ + -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" \ + -i Makefile || die +} + +src_compile() { + emake CC=$(tc-getCC) CXX=$(tc-getCXX) +} + +src_install() { + emake DESTDIR="${ED}" install +} |