pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

s2tc: import s2tc-1.0 as wip/s2tc



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Fri Apr 5 23:06:18 2019 +0200
Changeset:	60aa1a7364353b8d3b7094054009ef8615082263

Modified Files:
	Makefile
Added Files:
	s2tc/DESCR
	s2tc/Makefile
	s2tc/PLIST
	s2tc/distinfo
	s2tc/files/DEINSTALL
	s2tc/files/INSTALL
	s2tc/patches/patch-Makefile.am

Log Message:
s2tc: import s2tc-1.0 as wip/s2tc

This package may be used as an unrestricted substitute for wip/libtxc_dxtn.

S2TC provides a subset of a wellknown texture compression scheme.
This package provides the library libtxc_dxtn which can be used by
grahics/MesaLib.

S2TC's format specification is very easy to implement, so it is
not hard to make a working compressor or decompressor for it. It
is based on Color Cell Compression[1] from 1986, and decoding is
done entirely using the methods from there. Encoding is done using
a search and refinement method that is derived from the methods
described in that paper.

The compressor and decompressor here are licensed under a license
that gives you all freedoms you will ever need (namely, the MIT
license). In particular, the MIT license allows you to use, copy,
modify, merge, publish, distribute, sublicense or sell the software,
provided you keep copyright notices intact.

[1]: Graham Campbell, Thomas A. DeFanti, Jeff Frederiksen, Stephen
A. Joyce, and Lawrence A. Leske. 1986. Two bit/pixel full color
encoding. SIGGRAPH Comput. Graph. 20, 4 (August 1986), 215-223.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=60aa1a7364353b8d3b7094054009ef8615082263

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                       |  1 +
 s2tc/DESCR                     | 22 ++++++++++++++++++++++
 s2tc/Makefile                  | 33 +++++++++++++++++++++++++++++++++
 s2tc/PLIST                     |  7 +++++++
 s2tc/distinfo                  |  7 +++++++
 s2tc/files/DEINSTALL           |  3 +++
 s2tc/files/INSTALL             |  3 +++
 s2tc/patches/patch-Makefile.am | 17 +++++++++++++++++
 8 files changed, 93 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 6bfca6d8b6..6034ceb83d 100644
--- a/Makefile
+++ b/Makefile
@@ -4308,6 +4308,7 @@ SUBDIR+=	ruby-yaml_waml
 SUBDIR+=	runit
 SUBDIR+=	rust-bin
 SUBDIR+=	rygel
+SUBDIR+=	s2tc
 SUBDIR+=	s3cmd
 SUBDIR+=	s3funnel
 SUBDIR+=	s6
diff --git a/s2tc/DESCR b/s2tc/DESCR
new file mode 100644
index 0000000000..b00b0df5e8
--- /dev/null
+++ b/s2tc/DESCR
@@ -0,0 +1,22 @@
+This package may be used as an unrestricted substitute for wip/libtxc_dxtn.
+
+S2TC provides a subset of a wellknown texture compression scheme.
+This package provides the library libtxc_dxtn which can be used by
+grahics/MesaLib.
+
+S2TC's format specification is very easy to implement, so it is
+not hard to make a working compressor or decompressor for it. It
+is based on Color Cell Compression[1] from 1986, and decoding is
+done entirely using the methods from there. Encoding is done using
+a search and refinement method that is derived from the methods
+described in that paper.
+
+The compressor and decompressor here are licensed under a license
+that gives you all freedoms you will ever need (namely, the MIT
+license). In particular, the MIT license allows you to use, copy,
+modify, merge, publish, distribute, sublicense or sell the software,
+provided you keep copyright notices intact.
+
+[1]: Graham Campbell, Thomas A. DeFanti, Jeff Frederiksen, Stephen
+A. Joyce, and Lawrence A. Leske. 1986. Two bit/pixel full color
+encoding. SIGGRAPH Comput. Graph. 20, 4 (August 1986), 215-223.
diff --git a/s2tc/Makefile b/s2tc/Makefile
new file mode 100644
index 0000000000..46d56d66c3
--- /dev/null
+++ b/s2tc/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD$
+
+GITHUB_PROJECT=	s2tc
+DISTNAME=	v1.0
+PKGNAME=	${GITHUB_PROJECT}-${DISTNAME:S/v//}
+CATEGORIES=	graphics
+MASTER_SITES=	${MASTER_SITE_GITHUB:=divVerent/}
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/divVerent/s2tc/
+COMMENT=	S2TC - a subset of a well known texture compression scheme
+LICENSE=	mit
+
+GNU_CONFIGURE=	yes
+WRKSRC=		${WRKDIR}/s2tc-1.0
+USE_TOOLS+=	autoconf automake pkg-config
+USE_LANGUAGES=	c c++
+USE_LIBTOOL=	yes
+
+DL_AUTO_VARS=	yes
+
+PKGCONFIG_OVERRIDE+=	txc_dxtn.pc.in
+
+INSTALL_TEMPLATES=	${FILESDIR}/INSTALL
+DEINSTALL_TEMPLATES=	${FILESDIR}/DEINSTALL
+
+pre-configure:
+	cd ${WRKSRC} && ${SH} ./autogen.sh
+
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/s2tc/PLIST b/s2tc/PLIST
new file mode 100644
index 0000000000..b4cf8988f1
--- /dev/null
+++ b/s2tc/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD$
+bin/s2tc_compress
+bin/s2tc_decompress
+bin/s2tc_from_s3tc
+include/txc_dxtn.h
+lib/libtxc_dxtn.la
+lib/pkgconfig/txc_dxtn.pc
diff --git a/s2tc/distinfo b/s2tc/distinfo
new file mode 100644
index 0000000000..b01e98c889
--- /dev/null
+++ b/s2tc/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (s2tc/v1.0.tar.gz) = 95e5aaea6d05f40c4ce41e13f93f093f63139045
+RMD160 (s2tc/v1.0.tar.gz) = 729f2d9090e7f1f39445b944b8ba464d47f39c3f
+SHA512 (s2tc/v1.0.tar.gz) = 0da247334b9048feb85e685448119f1fa2734905ee4f837f45285a4526c1d28e300dce4ed803132849042b4f8a6c6e7bc944591cea7880ceed6e4d8bb024be92
+Size (s2tc/v1.0.tar.gz) = 1397232 bytes
+SHA1 (patch-Makefile.am) = b7a3c88490dbb121670b765eb47e3b2a22364346
diff --git a/s2tc/files/DEINSTALL b/s2tc/files/DEINSTALL
new file mode 100644
index 0000000000..734f341a53
--- /dev/null
+++ b/s2tc/files/DEINSTALL
@@ -0,0 +1,3 @@
+if [ ${STAGE} = DEINSTALL -a ${X11BASE} != ${PREFIX} ]; then
+	${RM} ${X11BASE}/lib/libtxc_dxtn.so
+fi
diff --git a/s2tc/files/INSTALL b/s2tc/files/INSTALL
new file mode 100644
index 0000000000..82a0b89c4e
--- /dev/null
+++ b/s2tc/files/INSTALL
@@ -0,0 +1,3 @@
+if [ ${STAGE} = POST-INSTALL -a ${X11BASE} != ${PREFIX} ]; then
+	${LN} -s ${PREFIX}/lib/libtxc_dxtn.so ${X11BASE}/lib/libtxc_dxtn.so
+fi
diff --git a/s2tc/patches/patch-Makefile.am b/s2tc/patches/patch-Makefile.am
new file mode 100644
index 0000000000..1f5fb3af4d
--- /dev/null
+++ b/s2tc/patches/patch-Makefile.am
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Use the correct flags for dlopen.
+
+--- Makefile.am.orig	2013-11-04 12:14:46.000000000 +0000
++++ Makefile.am
+@@ -10,8 +10,8 @@ s2tc_from_s3tc_SOURCES = s2tc_from_s3tc.
+ s2tc_compress_SOURCES = s2tc_compress.cpp txc_dxtn.h s2tc_license.h
+ s2tc_decompress_SOURCES = s2tc_decompress.cpp txc_dxtn.h s2tc_license.h
+ if ENABLE_RUNTIME_LINKING
+-s2tc_compress_LDADD = -ldl
+-s2tc_decompress_LDADD = -ldl
++s2tc_compress_LDADD = ${DL_LDFLAGS}
++s2tc_decompress_LDADD = ${DL_LDFLAGS}
+ else
+ if ENABLE_LIB
+ s2tc_compress_LDADD = libtxc_dxtn.la


Home | Main Index | Thread Index | Old Index