aboutsummaryrefslogtreecommitdiff
path: root/graphics/s2tc
diff options
context:
space:
mode:
authorDavid Naylor <dbn@FreeBSD.org>2016-03-20 21:30:27 +0000
committerDavid Naylor <dbn@FreeBSD.org>2016-03-20 21:30:27 +0000
commit5aa4a113c07243331a839b0652d88fca0d566c68 (patch)
tree5263d95c61a0ae54f827813bc4435f19d863f5a1 /graphics/s2tc
parentce0fd42ed63dd0093fca44976d66ce29212b7ee4 (diff)
Notes
Diffstat (limited to 'graphics/s2tc')
-rw-r--r--graphics/s2tc/Makefile20
-rw-r--r--graphics/s2tc/distinfo4
-rw-r--r--graphics/s2tc/files/patch-Makefile.am11
-rw-r--r--graphics/s2tc/files/patch-tests_test.sh66
-rw-r--r--graphics/s2tc/pkg-plist7
5 files changed, 86 insertions, 22 deletions
diff --git a/graphics/s2tc/Makefile b/graphics/s2tc/Makefile
index 3a3457a6700e..6e8b5ca11dcb 100644
--- a/graphics/s2tc/Makefile
+++ b/graphics/s2tc/Makefile
@@ -2,25 +2,33 @@
# $FreeBSD$
PORTNAME= s2tc
-PORTVERSION= 1.0
-DISTVERSIONPREFIX= v
+PORTVERSION= 1.0+20151228
CATEGORIES= graphics
MAINTAINER= dbn@FreeBSD.org
-COMMENT= S2TC is a subset of a wellknown texture compression scheme
+COMMENT= Subset of a well-known texture compression scheme
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
-USES= autoreconf libtool
-USE_GL= gl
+BUILD_DEPENDS= libGL>=9.1.7:${PORTSDIR}/graphics/libGL
+TEST_DEPENDS= convert:${PORTSDIR}/graphics/ImageMagick \
+ nvcompress:${PORTSDIR}/graphics/nvidia-texture-tools \
+ wget:${PORTSDIR}/ftp/wget
+
+USES= autoreconf libtool pathfix
USE_GITHUB= yes
+USE_LDCONFIG= yes
GH_ACCOUNT= divVerent
+GH_TAGNAME= f6ec862
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
+PATHFIX_MAKEFILEIN=Makefile.am
CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+
+do-test:
+ (cd ${WRKSRC}/tests; ${SETENV} use_external=false use_nvcompress=true ${SH} test.sh)
.include <bsd.port.mk>
diff --git a/graphics/s2tc/distinfo b/graphics/s2tc/distinfo
index e2698262c221..2638ecabcc44 100644
--- a/graphics/s2tc/distinfo
+++ b/graphics/s2tc/distinfo
@@ -1,2 +1,2 @@
-SHA256 (divVerent-s2tc-v1.0_GH0.tar.gz) = a21c5babd3810af4f7d4e8099e830f545b4e5f5dc0aadf375ed09d23566c6e45
-SIZE (divVerent-s2tc-v1.0_GH0.tar.gz) = 1397232
+SHA256 (divVerent-s2tc-1.0+20151228-f6ec862_GH0.tar.gz) = 5785b81e2254e08f810ddb26acc5c6fd39631f94e9993fc0ee5807d802a2d4cb
+SIZE (divVerent-s2tc-1.0+20151228-f6ec862_GH0.tar.gz) = 1398883
diff --git a/graphics/s2tc/files/patch-Makefile.am b/graphics/s2tc/files/patch-Makefile.am
deleted file mode 100644
index 8ec342d31f68..000000000000
--- a/graphics/s2tc/files/patch-Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.am.orig 2016-03-20 18:59:03 UTC
-+++ Makefile.am
-@@ -10,8 +10,6 @@ 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
- else
- if ENABLE_LIB
- s2tc_compress_LDADD = libtxc_dxtn.la
diff --git a/graphics/s2tc/files/patch-tests_test.sh b/graphics/s2tc/files/patch-tests_test.sh
new file mode 100644
index 000000000000..95101f410f2f
--- /dev/null
+++ b/graphics/s2tc/files/patch-tests_test.sh
@@ -0,0 +1,66 @@
+--- tests/test.sh.orig 2015-12-27 22:40:35 UTC
++++ tests/test.sh
+@@ -5,14 +5,6 @@ set -e
+ exec 4>&1
+ exec 1>&2
+
+-cd ..
+-make clean || true
+-sh autogen.sh
+-./configure --prefix="`pwd`/tests" --enable-shared --disable-static "$@"
+-make
+-make install
+-cd tests
+-
+ rm -rf html
+ rm -f *.dds
+ mkdir html
+@@ -143,10 +135,9 @@ html_end()
+
+ timing()
+ {
+- t0=`date +%s%N`
+- "$@"
+- t1=`date +%s%N`
+- deltatime_raw=`echo "$t1 - $t0" | bc`
++ /usr/bin/time -p -o timing.log "$@"
++ t=`cat timing.log | head -n 1 | cut -f 2 -d ' '`
++ deltatime_raw=`echo "$t * 1000000000" | bc`
+ deltatime=`echo "scale=3; $deltatime_raw / 1000000000" | bc -l`
+ deltatime=" ($deltatime seconds)"
+ }
+@@ -197,7 +188,7 @@ xon textures/facility114x/misc/lift02.tg
+ # sunset: GPLv2+
+ xon env/distant_sunset/distant_sunset_rt.jpg sunset.tga
+
+-export LD_LIBRARY_PATH="$PWD/lib"
++export LD_LIBRARY_PATH="$PWD/../.libs"
+ for i in dxtfail floor_tread01_norm fract001 base_concrete1a disabled lift02 sunset noise noise_solid supernova; do
+ html_rowstart "$i"
+
+@@ -228,21 +219,21 @@ for i in dxtfail floor_tread01_norm frac
+ if $use_nvcompress; then
+ timing nvcompress $nvopts "$i".tga "$i"-nvcompress.dds
+ html "$i"-nvcompress.dds
+- timing bin/s2tc_from_s3tc -i "$i"-nvcompress.dds -o "$i"-nvcompress-s2tc.dds
++ timing ../s2tc_from_s3tc -i "$i"-nvcompress.dds -o "$i"-nvcompress-s2tc.dds
+ html "$i"-nvcompress-s2tc.dds
+ fi
+
+ S2TC_DITHER_MODE=FLOYDSTEINBERG S2TC_COLORDIST_MODE=$goodmetric S2TC_RANDOM_COLORS=32 S2TC_REFINE_COLORS=LOOP \
+- t "$i".tga "$i"-rand32-mrgb-l.dds bin/s2tc_compress -t $fourcc
++ t "$i".tga "$i"-rand32-mrgb-l.dds ../s2tc_compress -t $fourcc
+ if $use_libtxc_dxtn; then
+ t "$i".tga "$i"-libtxc_dxtn.dds bin/s2tc_compress -t $fourcc -l /usr/lib/libtxc_dxtn.so
+ timing bin/s2tc_from_s3tc -i "$i"-libtxc_dxtn.dds -o "$i"-libtxc_dxtn-s2tc.dds
+ html "$i"-libtxc_dxtn-s2tc.dds
+ fi
+ S2TC_DITHER_MODE=SIMPLE S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=-1 S2TC_REFINE_COLORS=ALWAYS \
+- t "$i".tga "$i"-faster-wavg-r.dds bin/s2tc_compress -t $fourcc
++ t "$i".tga "$i"-faster-wavg-r.dds ../s2tc_compress -t $fourcc
+ S2TC_DITHER_MODE=SIMPLE S2TC_COLORDIST_MODE=WAVG S2TC_RANDOM_COLORS=-1 S2TC_REFINE_COLORS=LOOP \
+- t "$i".tga "$i"-faster-wavg-l.dds bin/s2tc_compress -t $fourcc
++ t "$i".tga "$i"-faster-wavg-l.dds ../s2tc_compress -t $fourcc
+
+ html_rowend
+ done
diff --git a/graphics/s2tc/pkg-plist b/graphics/s2tc/pkg-plist
index c9619b0bdc34..fdcbb25a56b0 100644
--- a/graphics/s2tc/pkg-plist
+++ b/graphics/s2tc/pkg-plist
@@ -4,6 +4,7 @@ bin/s2tc_from_s3tc
include/txc_dxtn.h
lib/libtxc_dxtn.a
lib/libtxc_dxtn.so
-lib/libtxc_dxtn.so.0
-lib/libtxc_dxtn.so.0.0.0
-lib/pkgconfig/txc_dxtn.pc
+libdata/pkgconfig/txc_dxtn.pc
+man/man1/s2tc_compress.1.gz
+man/man1/s2tc_decompress.1.gz
+man/man1/s2tc_from_s3tc.1.gz