diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2009-03-17 06:57:07 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2009-03-17 06:57:07 +0800 |
commit | e4e59aae4627333a6b6f727772437d41577ef68a (patch) | |
tree | 3172147e6ac525c2a0913f7bc0e01493cc6a4ee2 | |
parent | 2ce340eb554ee8ad938dc8d95c7ea3fccdcc5093 (diff) | |
download | freebsd-ports-gnome-e4e59aae4627333a6b6f727772437d41577ef68a.tar.gz freebsd-ports-gnome-e4e59aae4627333a6b6f727772437d41577ef68a.tar.zst freebsd-ports-gnome-e4e59aae4627333a6b6f727772437d41577ef68a.zip |
- Improve previous fix:
- add patches by [3] to fix assembly
- make use of assembly OPTIONal and depend on nasm when it's enabled
PR: 131021 [1], 129362 [2]
Submitted by: myself [1], "J. Altman <freebsd at chthonic dot com> [2]
Patch by: Edward Sutton <mirror176 at hotmail dot com> [3]
Approved by: oliver, maintainer timeout
-rw-r--r-- | audio/openal/Makefile | 12 | ||||
-rw-r--r-- | audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm | 10 | ||||
-rw-r--r-- | audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm | 10 |
3 files changed, 30 insertions, 2 deletions
diff --git a/audio/openal/Makefile b/audio/openal/Makefile index d61dd594d25b..487ab3da75bb 100644 --- a/audio/openal/Makefile +++ b/audio/openal/Makefile @@ -7,7 +7,7 @@ PORTNAME= openal PORTVERSION= 20060211 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= audio MASTER_SITES= http://openal.org/openal_webstf/downloads/ DISTVERSION= 0.0.8 @@ -74,6 +74,13 @@ CONFIGURE_ARGS+=--enable-smpeg CONFIGURE_ARGS+=--disable-smpeg .endif +.if ${ARCH} == "i386" +OPTIONS+= X86_ASM "Enable x86 assembly code" on +.if !defined(WITHOUT_X86_ASM) +BUILD_DEPENDS+= nasm:${LOCALBASE}/devel/nasm +.endif +.endif + NOT_FOR_ARCHS= ia64 NOT_FOR_ARCHS_REASON_ia64= does not compile @@ -89,8 +96,9 @@ post-patch: s|Libs: |&${PTHREAD_LIBS} |;\ s|Cflags: |&${PTHREAD_CFLAGS} |' \ ${WRKSRC}/admin/pkgconfig/openal.pc.in -# broken openal library will be produced if nasm is installed +.if defined(WITHOUT_X86_ASM) @${REINPLACE_CMD} -e '/^NASM=/ s|=.*|=no|' ${WRKSRC}/configure +.endif post-install: @${CAT} ${PKGMESSAGE} diff --git a/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm b/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm new file mode 100644 index 000000000000..1ac4253aba18 --- /dev/null +++ b/audio/openal/files/patch-src-arch-i386-memcpy_mmx_prk.nasm @@ -0,0 +1,10 @@ +--- src/arch/i386/memcpy_mmx_prk.nasm.orig 2005-12-17 15:50:39.000000000 +0300 ++++ src/arch/i386/memcpy_mmx_prk.nasm 2009-03-16 17:20:23.000000000 +0300 +@@ -22,6 +22,7 @@ + ; pretty straight-forward implementation + ; by design broken for n<8, so check that before calling + ; x86 32 bit only! ++[Section .text] + global __alMMXmemcpy + global _alMMXmemcpy + diff --git a/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm b/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm new file mode 100644 index 000000000000..ba816063911b --- /dev/null +++ b/audio/openal/files/patch-src-arch-i386-x86_cpu_caps_detect_prk.nasm @@ -0,0 +1,10 @@ +--- src/arch/i386/x86_cpu_caps_detect_prk.nasm.orig 2005-12-17 15:50:39.000000000 +0300 ++++ src/arch/i386/x86_cpu_caps_detect_prk.nasm 2009-03-16 17:20:50.000000000 +0300 +@@ -23,6 +23,7 @@ + ; using infos from sandpile.org + + ; returns 0 if no CPUID available ++[Section .text] + global __alDetectx86CPUCaps + global _alDetectx86CPUCaps + |