pkgsrc-Bugs archive

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

pkg/57274: libass package doesn't use optimised assembly



>Number:         57274
>Category:       pkg
>Synopsis:       libass package doesn't use optimised assembly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 16 17:15:00 +0000 2023
>Originator:     Oneric
>Release:        pkgsrc trunk 2023-03-16; libass-0.17.1
>Organization:
>Environment:
NetBSD localhost 9.3 NetBSD 9.3 (GENERIC) #0: Thu Aug  4 15:30:37 UTC 2022 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
pkgsrc?s Makefile for libass explicitly disables building with assembly since 2014 in response to pkg/48703 when yasm was still used and no tag supplied to libtool.
Since then things changed, libass now uses NASM instead of yasm, a tag was added and other bugs were fixed. Since assembly greatly improves performance, it would be great if it could be enabled in the builds.

Additionally, the Makefile still references enca, but libass doesn't use enca anymore since 0.13.0 (2015).
>How-To-Repeat:
Build libass package from current pkgsrc.
>Fix:
When building from git or a tarball outside of pkgsrc everything works out of the box for me with NASM installed. In fact, amd64-NetBSD builds are regularly tested upstream atm: https://github.com/libass/libass-tests/actions/runs/4432910793/jobs/7777431707

However, after adjusting pkgsrc?s Makefile I initially got build errors with assembling failing without an error message. This appears to be due some issue with the "replacing libtool" step and libass?s ltnasm.sh script used to translate libtools C-compiler options into NASM options.
By disabling replacement of libtool pkgsrc builds work as well; see changes below.


diff --git a/multimedia/libass/Makefile b/multimedia/libass/Makefile
index 953cd8188..dc5acbf6f 100644
--- a/multimedia/libass/Makefile
+++ b/multimedia/libass/Makefile
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.34 2023/02/27 12:38:05 adam Exp $
 
 DISTNAME=	libass-0.17.1
+PKGREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	${MASTER_SITE_GITHUB:=libass/}
 GITHUB_RELEASE=	${PKGVERSION_NOREV}
@@ -14,15 +15,20 @@ LICENSE=	isc
 USE_LIBTOOL=		yes
 USE_TOOLS+=		pkg-config
 GNU_CONFIGURE=		yes
-CONFIGURE_ARGS+=	--disable-asm
 PKGCONFIG_OVERRIDE+=	libass.pc.in
 
 LDFLAGS+=	${BUILDLINK_LDADD.iconv}
 
+.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
+BUILD_DEPENDS+=		nasm>=2.10:../../devel/nasm
+CONFIGURE_ARGS+=	--with-pic
+# Overriding libtool somehow screws up the custom ltnasm.sh script used by libass
+SHLIBTOOL_OVERRIDE=
+.endif
+
 .include "../../converters/fribidi/buildlink3.mk"
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../fonts/harfbuzz/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
-.include "../../textproc/enca/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index