1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00
freebsd-ports/multimedia/xvid/Makefile
Ed Maste d43312d77a multimedia/xvid: link with -znotext on i386
This port links some non-PIC code, which fails with lld as it defaults
to disallowing relocations against read-only segments. For i386 we can
just add -znotext unconditionally: for GNU BFD ld it just affirms BFD's
existing default.

PR:		214864, 230208
Approved by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17195
2018-09-18 16:04:19 +00:00

61 lines
1.3 KiB
Makefile

# Created by: Michael Nottebrock <michaelnottebrock@gmx.net> et al
# $FreeBSD$
PORTNAME= xvid
PORTVERSION= 1.3.5
PORTEPOCH= 1
CATEGORIES= multimedia
MASTER_SITES= https://downloads.xvid.com/downloads/
DISTNAME= ${PORTNAME}core-${PORTVERSION}
MAINTAINER= riggs@FreeBSD.org
COMMENT= Opensource MPEG-4 codec, based on OpenDivx
LICENSE= GPLv2+
LICENSE_FILE= ${WRKDIR}/xvidcore/LICENSE
USES= gmake tar:bz2
GNU_CONFIGURE= yes
MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= yes
# PR230208 Allow relocations against read-only segments (override lld default)
LDFLAGS_i386= -Wl,-z,notext
CONFIGURE_ENV+= ac_cv_prog_ac_yasm=no
PLIST_FILES= include/xvid.h \
lib/libxvidcore.a \
lib/libxvidcore.so \
lib/libxvidcore.so.4 \
lib/libxvidcore.so.4.3
WRKSRC= ${WRKDIR}/xvidcore/build/generic
OPTIONS_DEFINE= OPTIMIZED_CFLAGS
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL}
.endif
.if ${ARCH}=="i386"
# relocation against symbol in readonly segment
LLD_UNSAFE= yes
.endif
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
BUILD_DEPENDS+= nasm:devel/nasm
.endif
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
# let xvid's build system override CFLAGS
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cflags
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libxvidcore.so
.include <bsd.port.post.mk>