update to libass-0.16.0, from Brad Smith (maintainer)

This commit is contained in:
sthen 2022-06-06 23:38:49 +00:00
parent 7b35f6bd19
commit 701aebea49
4 changed files with 3 additions and 74 deletions

View File

@ -1,6 +1,6 @@
COMMENT= portable ASS/SSA subtitle renderer
VER= 0.15.2
VER= 0.16.0
DISTNAME= libass-${VER}
CATEGORIES= multimedia devel
MASTER_SITES= https://github.com/libass/libass/releases/download/${VER}/
@ -34,7 +34,4 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
ASFLAGS="-DPIC=1 "
post-patch:
chmod ${BINMODE} ${WRKSRC}/ltnasm.sh
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (libass-0.15.2.tar.xz) = G+LfnESFpX14uxjAqO0Ve8h6Wo3UjGYZYcYlyxEoMv0=
SIZE (libass-0.15.2.tar.xz) = 382036
SHA256 (libass-0.16.0.tar.xz) = Xb3p4iM5EZz47tWe6mxiOgdG71qQtonmigkBCQeOPAg=
SIZE (libass-0.16.0.tar.xz) = 396304

View File

@ -1,24 +0,0 @@
Use a libtool-wrapper script for NASM.
Libtool thinks NASM acts just like the C-compiler, which isn't true
for e.g. -f options. Previously we used -prefer-non-pic to avoid libtool
passing any additional flags, which worked well on all tested platforms
but as it turns out at least on OpenBSD this does not work.
This now also means we'll automatically get the -DPIC flag as needed,
which might perhaps also help some platforms we didn't test yet; before
we fully relied on x86inc's automatic setting for PIC in assembly.
https://github.com/libass/libass/issues/539
Index: libass/Makefile.in
--- libass/Makefile.in.orig
+++ libass/Makefile.in
@@ -845,7 +845,7 @@ uninstall-am: uninstall-dist_assheadersHEADERS \
.asm.lo:
- $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $< -prefer-non-pic
+ $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -o $@ $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -1,44 +0,0 @@
Use a libtool-wrapper script for NASM.
Libtool thinks NASM acts just like the C-compiler, which isn't true
for e.g. -f options. Previously we used -prefer-non-pic to avoid libtool
passing any additional flags, which worked well on all tested platforms
but as it turns out at least on OpenBSD this does not work.
This now also means we'll automatically get the -DPIC flag as needed,
which might perhaps also help some platforms we didn't test yet; before
we fully relied on x86inc's automatic setting for PIC in assembly.
https://github.com/libass/libass/issues/539
Index: ltnasm.sh
--- ltnasm.sh.orig
+++ ltnasm.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# Translate libtool supplied C-compiler options for NASM.
+# libtool treats NASM like the C compiler, and may supply -f… options
+# which are interpreted as the output file format by NASM, causing errors.
+# Notably libtool will set -DPIC -fPIC and -fno-common;
+# we want to use -DPIC by translating it to -DPIC=1, but remove everything else
+#
+# Theoretically the way the filtering is done here in a plain POSIX shell script,
+# does mess up if there were spaces in any argument. However this will never happen
+# since neither our filenames nor options do not contain spaces and source paths
+# are not allowed to contain spaces by configure.
+
+cmd=""
+while [ "$#" -gt 0 ] ; do
+ case "$1" in
+ # NASM accepts both -f format and -fformat,
+ # we always use the former, and libtool supplied
+ # C-compiler options will always use the latter.
+ -f) cmd="$cmd $1" ;;
+ -f*) : ;;
+ -DPIC) cmd="$cmd -DPIC=1" ;;
+ *) cmd="$cmd $1" ;;
+ esac
+ shift
+done
+
+exec $cmd