packages: squish/squish-gcc4.patch (NEW), squish/squish-shared.patch (NEW), ...

qboosh qboosh at pld-linux.org
Sat Oct 16 08:54:52 CEST 2010


Author: qboosh                       Date: Sat Oct 16 06:54:52 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/squish:
   squish-gcc4.patch (NONE -> 1.1)  (NEW), squish-shared.patch (NONE -> 1.1)  (NEW), squish.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/squish/squish-gcc4.patch
diff -u /dev/null packages/squish/squish-gcc4.patch:1.1
--- /dev/null	Sat Oct 16 08:54:52 2010
+++ packages/squish/squish-gcc4.patch	Sat Oct 16 08:54:47 2010
@@ -0,0 +1,21 @@
+--- squish-1.10/alpha.cpp.orig	2006-06-29 14:43:24.000000000 +0200
++++ squish-1.10/alpha.cpp	2010-10-16 08:31:13.411734339 +0200
+@@ -25,6 +25,7 @@
+    
+ #include "alpha.h"
+ #include <algorithm>
++#include <climits>
+ 
+ namespace squish {
+ 
+--- squish-1.10/singlecolourfit.cpp.orig	2007-03-21 20:43:59.000000000 +0100
++++ squish-1.10/singlecolourfit.cpp	2010-10-16 08:39:11.391740205 +0200
+@@ -27,6 +27,8 @@
+ #include "colourset.h"
+ #include "colourblock.h"
+ 
++#include <climits>
++
+ namespace squish {
+ 
+ struct SourceBlock

================================================================
Index: packages/squish/squish-shared.patch
diff -u /dev/null packages/squish/squish-shared.patch:1.1
--- /dev/null	Sat Oct 16 08:54:52 2010
+++ packages/squish/squish-shared.patch	Sat Oct 16 08:54:47 2010
@@ -0,0 +1,36 @@
+--- squish-1.10/Makefile.orig	2006-04-07 19:30:11.000000000 +0200
++++ squish-1.10/Makefile	2010-10-16 07:53:52.799740205 +0200
+@@ -3,26 +3,25 @@
+ 
+ SRC = alpha.cpp clusterfit.cpp colourblock.cpp colourfit.cpp colourset.cpp maths.cpp rangefit.cpp singlecolourfit.cpp squish.cpp
+ 
+-OBJ = $(SRC:%.cpp=%.o)
++OBJ = $(SRC:%.cpp=%.lo)
+ 
+-LIB = libsquish.a
++LIB = libsquish.la
+ 
+ all : $(LIB)
+ 
+ install : $(LIB)
+-	install squish.h $(INSTALL_DIR)/include 
+-	install libsquish.a $(INSTALL_DIR)/lib
++	install squish.h $(DESTDIR)$(includedir)
++	libtool --mode=install install libsquish.la $(DESTDIR)$(libdir)
+ 
+ uninstall:
+ 	$(RM) $(INSTALL_DIR)/include/squish.h
+ 	$(RM) $(INSTALL_DIR)/lib/libsquish.a
+ 
+ $(LIB) : $(OBJ)
+-	$(AR) cr $@ $?
+-	ranlib $@
++	libtool --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir) $<
+ 
+-%.o : %.cpp
+-	$(CXX) $(CPPFLAGS) -I. $(CXXFLAGS) -o$@ -c $<
++%.lo : %.cpp
++	libtool --mode=compile --tag=CXX $(CXX) $(CPPFLAGS) -I. $(CXXFLAGS) -o$@ -c $<
+ 
+ clean :
+ 	$(RM) $(OBJ) $(LIB)

================================================================
Index: packages/squish/squish.spec
diff -u /dev/null packages/squish/squish.spec:1.1
--- /dev/null	Sat Oct 16 08:54:53 2010
+++ packages/squish/squish.spec	Sat Oct 16 08:54:47 2010
@@ -0,0 +1,123 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_with	altivec		# use Altivec (PPC only)
+%bcond_with	sse		# use SSE (x86 only)
+%bcond_with	sse2		# use SSE2 (x86 only)
+#
+%ifarch pentium3 pentium4 %{x8664}
+%define	with_sse	1
+%endif
+%ifarch pentium4 %{x8664}
+%define	with_sse2	1
+%endif
+%{?with_sse:%define use_sse 1}
+%{?with_sse2:%define use_sse 2}
+Summary:	libsquish - DXT compression library
+Summary(pl.UTF-8):	libsquish - biblioteka kompresji DXT
+Name:		squish
+Version:	1.10
+Release:	1
+License:	MIT
+Group:		Libraries
+#Source0Download: http://code.google.com/p/libsquish/downloads/list
+Source0:	http://libsquish.googlecode.com/files/%{name}-%{version}.tar.gz
+# Source0-md5:	53b171007aaaaf96ee277e833bb756eb
+Patch0:		%{name}-shared.patch
+Patch1:		%{name}-gcc4.patch
+URL:		http://code.google.com/p/libsquish/
+BuildRequires:	libstdc++-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The squish library (libsquish) is an open source DXT compression
+library written in C++ with the following features:
+ - supports the DXT1, DXT3 and DXT5 formats,
+ - optimised for both SSE and Altivec SIMD instruction sets,
+ - builds on multiple platforms (x86 and PPC tested),
+ - very simple interface.
+
+%description -l pl.UTF-8
+Biblioteka squish (libsquish) to mająca otwarte źródła biblioteka
+kompresji DXT napisana w C++ o następujących cechach:
+ - obsługuje formaty DXT1, DXT3 i DXT5,
+ - jest zoptymalizowana dla instrukcji SIMD: SSE i Altivec,
+ - buduje się na wielu platformach (testowane x86 i PPC),
+ - ma bardzo prosty interfejs.
+
+%package devel
+Summary:	Header files for squish library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki squish
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description devel
+Header files for squish library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki squish.
+
+%package static
+Summary:	Static squish library
+Summary(pl.UTF-8):	Statyczna biblioteka squish
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static squish library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka squish.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__make} \
+	CXX="%{__cxx}" \
+	CXXFLAGS="%{rpmcxxflags} %{?with_altivec:-maltivec} %{?use_sse:-msse}" \
+	CPPFLAGS="%{rpmcppflags} %{?with_altivec:-DSQUISH_USE_ALTIVEC=1} %{?use_sse:-DSQUISH_USE_SSE=%{use_sse}}" \
+	libdir=%{_libdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}}
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	includedir=%{_includedir} \
+	libdir=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog README texture_compression_s3tc.txt
+%attr(755,root,root) %{_libdir}/libsquish.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsquish.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libsquish.so
+%{_libdir}/libsquish.la
+%{_includedir}/squish.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libsquish.a
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/10/16 06:54:47  qboosh
+- new
================================================================


More information about the pld-cvs-commit mailing list